]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
i386: correct division modeling in lujiazui.md
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
d2ef2327
GA
12022-12-19 Marek Polacek <polacek@redhat.com>
2
3 PR c/98487
4 * c-format.cc (check_function_format): Use get_attribute_name.
5
5fb1e674
GA
62022-12-16 Qing Zhao <qing.zhao@oracle.com>
7
8 * c.opt (Wstrict-flex-arrays): New option.
9
596dbfff
GA
102022-12-02 Andrew MacLeod <amacleod@redhat.com>
11
12 * c-attribs.cc (handle_deprecated_attribute): Use type when
13 using TYPE_NAME.
14
b35680ec
GA
152022-12-02 Jakub Jelinek <jakub@redhat.com>
16
17 PR c++/84469
18 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
19 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
20 to any of the structured binding decls.
21
6eea85a9
GA
222022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
23 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
24
25 PR driver/107787
26 * c-common.cc (fold_offsetof,
27 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
28 instead of OPT_Warray_bounds.
29
9a1b4f1d
GA
302022-11-24 Jakub Jelinek <jakub@redhat.com>
31
32 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
33 with a dot.
34
8761284f
GA
352022-11-23 Andrew Pinski <apinski@marvell.com>
36 Jakub Jelinek <jakub@redhat.com>
37
38 PR c/107127
39 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
40 instead of walk_tree for c_genericize_control_r.
41
422022-11-23 Jakub Jelinek <jakub@redhat.com>
43
44 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
45 fcontract-role=, fcontract-semantic=): Add RejectNegative.
46 (fcontract-build-level=): Terminate description with dot.
47
fb98ede8
GA
482022-11-19 Jakub Jelinek <jakub@redhat.com>
49
50 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
51 value from 202207L to 202211L.
52
532022-11-19 Jeff Chapman II <jchapman@lock3software.com>
54 Andrew Sutton <asutton@lock3software.com>
55 Andrew Marmaduke <amarmaduke@lock3software.com>
56 Michael Lopez <mlopez@lock3software.com>
57 Jason Merrill <jason@redhat.com>
58
59 * c.opt: Add contracts flags.
60 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
61 macros.
62
80909529
GA
632022-11-16 Marek Polacek <polacek@redhat.com>
64
65 PR c++/106649
66 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
67 C++23.
68 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
69 depending on cxx_dialect.
70 * c.opt (Winvalid-constexpr): New option.
71
722022-11-16 Jakub Jelinek <jakub@redhat.com>
73
74 * c-common.def (CONCEPT_DECL): New tree, moved here from
75 cp-tree.def.
76 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
77 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
78 attribute on CONCEPT_DECL.
79
cdc34229
GA
802022-11-15 Lewis Hyatt <lhyatt@gmail.com>
81
82 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
83 than a hard-coded string.
84
83d400bd
GA
852022-11-15 Jakub Jelinek <jakub@redhat.com>
86
87 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
88 __cpp_multidimensional_subscript macro value to 202211L.
89
902022-11-15 Patrick Palka <ppalka@redhat.com>
91
92 PR c++/107638
93 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
94 iff SUPPORTS_INIT_PRIORITY.
95
962022-11-14 Martin Liska <mliska@suse.cz>
97
98 Revert:
99 2022-11-09 Martin Liska <mliska@suse.cz>
100
101 * c-target.def: Port to RST.
102
30d77d49
GA
1032022-11-12 Joseph Myers <joseph@codesourcery.com>
104
105 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
106
5b6ce16a
GA
1072022-11-11 Jonathan Wakely <jwakely@redhat.com>
108
109 PR c/85487
110 * c-pragma.cc (handle_pragma_ignore): New function.
111 (init_pragma): Register region and endregion pragmas.
112
1cdfd0e5
GA
1132022-11-09 Martin Liska <mliska@suse.cz>
114
115 * c-target.def: Port to RST.
116
05788e9b
GA
1172022-11-05 Lewis Hyatt <lhyatt@gmail.com>
118
119 PR preprocessor/55971
120 * c-ppoutput.cc (adjust_for_newlines): Update comment.
121
d29260ce
GA
1222022-11-03 Jason Merrill <jason@redhat.com>
123
124 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
125 -fconcepts-ts before C++20.
126
3055829a
GA
1272022-10-28 Joseph Myers <joseph@codesourcery.com>
128
129 * c-common.cc (def_fn_type): Call build_function_type for
130 zero-argument variable-argument function.
131 (c_common_nodes_and_builtins): Build default_function_type with
132 build_function_type.
133 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
134 option.
135
1362022-10-28 Joseph Myers <joseph@codesourcery.com>
137
138 PR c/61469
139 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
140 New. Moved from cp/cp-tree.h.
141 * c-warn.cc (warnings_for_convert_and_check): Do not consider
142 conversions to enum with underlying type bool to overflow.
143
486a5037
GA
1442022-10-26 Marek Polacek <polacek@redhat.com>
145
146 PR c++/106393
147 * c.opt (Wdangling-reference): New.
148
87f9c4a4
GA
1492022-10-19 Joseph Myers <joseph@codesourcery.com>
150
151 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
152 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
153 and FMT_LEN_wf64.
154 (NOARGUMENTS, NOLENGTHS): Update definitions.
155 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
156 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
157 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
158 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
159 (T_UF64, T2X_UF64): New macros.
160 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
161 and wfN length modifiers.
162 (print_char_table, scan_char_table): Add entries using wN and wfN
163 length modifiers.
164
21de009f
GA
1652022-10-18 Joseph Myers <joseph@codesourcery.com>
166
167 PR c/36113
168 * c-common.cc (c_common_type_for_size): Add fallback to
169 widest_unsigned_literal_type_node or
170 widest_integer_literal_type_node for precision that may not
171 exactly match the precision of those types.
172
baeec7cc
GA
1732022-10-14 Jakub Jelinek <jakub@redhat.com>
174
175 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
176 predefine __BFLT16_*__ macros and for C++23 also
177 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
178 macros for -fbuilding-libgcc.
179 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
180
1812022-10-14 Jakub Jelinek <jakub@redhat.com>
182
183 PR middle-end/323
184 PR c++/107097
185 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
186 the tree being specific to C/ObjC.
187 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
188 in C++ the same as in C.
189 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
190 even for C++.
191
621a911d
GA
1922022-10-13 Joseph Myers <joseph@codesourcery.com>
193
194 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
195 value 2 for *_IS_IEC_60559.
196
781f477a
GA
1972022-10-12 Lewis Hyatt <lhyatt@gmail.com>
198
199 PR preprocessor/60014
200 PR preprocessor/60723
201 * c-ppoutput.cc (class token_streamer): Remove member
202 line_marker_emitted to...
203 (token_streamer::stream): ...a local variable here. Set
204 print.prev_was_system_token on all code paths.
205
27bfe54e
GA
2062022-10-10 Nathan Sidwell <nathan@acm.org>
207
208 * c-opts.cc (c_common_post_options): Bump abi to 18.
209
2102022-10-10 Marek Polacek <polacek@redhat.com>
211
212 PR c++/106937
213 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
214 attributes here.
215 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
216 attributes here.
217 (pp_c_attributes): Remove.
218 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
219 get_attribute_name. Don't print a trailing space when printing the
220 [[]] form.
221 * c-pretty-print.h (pp_c_attributes): Remove.
222
9ff6c33e
GA
2232022-10-07 Qing Zhao <qing.zhao@oracle.com>
224
225 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
226 (c_common_attribute_table): New item for strict_flex_array.
227 * c.opt: (fstrict-flex-arrays): New option.
228 (fstrict-flex-arrays=): New option.
229
2302022-10-07 Martin Liska <mliska@suse.cz>
231
232 * name-hint.h: Use std::move.
233
2342022-10-07 Jakub Jelinek <jakub@redhat.com>
235
236 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
237 only in gnu namespace or as standard attribute, treat fallthrough
238 attributes in other namespaces like any other unknown attribute.
239
629d04d3
GA
2402022-10-06 Joseph Myers <joseph@codesourcery.com>
241
242 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
243 typeof_unqual.
244 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
245 (D_EXT11): New macro. Values of subsequent macros updated.
246
2472022-10-06 Jakub Jelinek <jakub@redhat.com>
248
249 PR c++/106654
250 * c-attribs.cc (handle_assume_attribute): New function.
251 (c_common_attribute_table): Add entry for assume attribute.
252 * c-lex.cc (c_common_has_attribute): Handle
253 __have_cpp_attribute (assume).
254
85872a69
GA
2552022-10-04 Jakub Jelinek <jakub@redhat.com>
256
257 * c-omp.cc (c_omp_directives): Uncomment begin declare target
258 entry.
259
69fd6dcc
GA
2602022-10-03 Patrick Palka <ppalka@redhat.com>
261
262 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
263 RID_IS_SAME_AS.
264
2652022-10-03 Joseph Myers <joseph@codesourcery.com>
266
267 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
268 special-case __*_EPSILON__ setting for IBM long double for C2x.
269
3a221b73
GA
2702022-09-30 Patrick Palka <ppalka@redhat.com>
271
272 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
273 C++ traits.
274 * c-common.h (enum rid): Likewise.
275
bbdcdf5c
GA
2762022-09-29 Joseph Myers <joseph@codesourcery.com>
277
278 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
279 C.
280
2812022-09-29 Patrick Palka <ppalka@redhat.com>
282
283 * c-common.cc (c_common_reswords): Add __remove_cv,
284 __remove_reference and __remove_cvref.
285 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
286 and RID_REMOVE_CVREF.
287
1f16a020
GA
2882022-09-27 Marek Polacek <polacek@redhat.com>
289
290 PR c++/101165
291 PR c++/106882
292 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
293
2942022-09-27 Marek Polacek <polacek@redhat.com>
295
296 * c-format.cc (c_keywords): Drop nothrow.
297
2982022-09-27 Jakub Jelinek <jakub@redhat.com>
299
300 PR c++/106651
301 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
302 __cpp_static_call_operator=202207L for C++23.
303
3042022-09-27 Jakub Jelinek <jakub@redhat.com>
305
306 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
307 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
308 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
309 * c-pragma.cc (omp_pragmas): Add assumes and begin.
310 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
311 (omp_pragmas_simd): Add assume.
312 * c-common.h (c_omp_directives): Declare.
313 * c-omp.cc (omp_directives): Rename to ...
314 (c_omp_directives): ... this. No longer static. Uncomment
315 assume, assumes, begin assumes and end assumes entries.
316 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
317 to PRAGMA_OMP_END.
318 (c_omp_categorize_directive): Adjust for omp_directives to
319 c_omp_directives renaming.
320
3212022-09-27 Jakub Jelinek <jakub@redhat.com>
322
323 PR c++/106652
324 PR c++/85518
325 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
326 _Float{32,64,128}x flags from D_CONLY to 0.
327 (shorten_binary_op): Punt if common_type returns error_mark_node.
328 (shorten_compare): Likewise.
329 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
330 and _Float{32,64,128}x builtin types if available. For C++
331 clear float128t_type_node.
332 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
333 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
334 * c-lex.cc (interpret_float): For q/Q suffixes prefer
335 float128t_type_node over float128_type_node. Allow
336 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
337 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
338 with pedwarn. Don't call excess_precision_type for C++.
339
220c4d8e
GA
3402022-09-26 Marek Polacek <polacek@redhat.com>
341
342 PR c++/106656
343 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
344 for C++20.
345
4afaeaab
GA
3462022-09-23 Marek Polacek <polacek@redhat.com>
347
348 PR c++/106784
349 * c-common.cc (c_common_reswords): Add __is_convertible and
350 __is_nothrow_convertible.
351 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
352 RID_IS_NOTHROW_CONVERTIBLE.
353
279c6715
GA
3542022-09-22 David Malcolm <dmalcolm@redhat.com>
355
356 PR c/106830
357 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
358 values that don't fit in uhwi.
359
d0fc05e8
GA
3602022-09-15 Richard Biener <rguenther@suse.de>
361
362 * c-common.h (build_void_list_node): Remove.
363 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
364 void_list_node.
365
861d1a11
GA
3662022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
367
368 * c-format.cc (convert_format_name_to_system_name): Fix warning.
369
fe2a8ce9
GA
3702022-09-07 Joseph Myers <joseph@codesourcery.com>
371
372 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
373 for alignas, alignof, bool, false, static_assert, thread_local and
374 true.
375
3762022-09-07 Jakub Jelinek <jakub@redhat.com>
377
378 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
379 " in comments" from description.
380 (Wunicode): New option.
381
25aeb922
GA
3822022-09-06 Jakub Jelinek <jakub@redhat.com>
383
384 PR c/106836
385 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
386
83f2f228
GA
3872022-09-03 Jakub Jelinek <jakub@redhat.com>
388
389 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
390 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
391 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
392 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
393
c64b0947
GA
3942022-09-02 David Malcolm <dmalcolm@redhat.com>
395
396 PR c/90885
397 * c-common.h (check_for_xor_used_as_pow): New decl.
398 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
399 * c-warn.cc (check_for_xor_used_as_pow): New.
400 * c.opt (Wxor-used-as-pow): New.
401
bb0a1556
GA
4022022-09-01 Jason Merrill <jason@redhat.com>
403
404 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
405 char8_t.
406 (braced_list_to_string): Check for char-sized elements.
407
4082022-09-01 Jakub Jelinek <jakub@redhat.com>
409
410 PR c++/106655
411 * c.opt (-Winvalid-utf8): New warning.
412 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
413 Set cpp_opts->cpp_input_charset_explicit.
414 (c_common_post_options): If -finput-charset=UTF-8 is explicit
415 in C++23, enable -Winvalid-utf8 by default and if -pedantic
416 or -pedantic-errors, make it a pedwarn.
417
542c60c4
GA
4182022-08-31 Joseph Myers <joseph@codesourcery.com>
419
420 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
421 for LABEL_DECL.
422 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
423 decl_attributes.
424 * c-common.h (do_case, c_add_case_label): Update declarations.
425 * c-lex.cc (c_common_has_attribute): For C, produce a result of
426 201910 for fallthrough and 202106 for maybe_unused.
427
16f542d6
GA
4282022-08-26 Marek Polacek <polacek@redhat.com>
429
430 PR c++/81159
431 * c.opt (Wself-move): New option.
432
4332022-08-26 Jakub Jelinek <jakub@redhat.com>
434
435 * c-common.cc (check_builtin_function_arguments): Handle
436 BUILT_IN_ISSIGNALING.
437
4382022-08-26 Jakub Jelinek <jakub@redhat.com>
439
440 PR c++/106648
441 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
442 __cpp_named_character_escapes to 202207L.
443
5d4389dc
GA
4442022-08-25 Marek Polacek <polacek@redhat.com>
445
446 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
447 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
448 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
449 (struct c_common_resword): Resize the disable member.
450 (D_C2X): Add.
451 (nullptr_node): Define.
452 (nullptr_type_node): Define.
453 (NULLPTR_TYPE_P): Define.
454 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
455 NULLPTR_TYPE.
456 (c_pretty_printer::direct_abstract_declarator): Likewise.
457 (c_pretty_printer::constant): Likewise.
458
47a61e65
GA
4592022-08-16 Tom Honermann <tom@honermann.net>
460
461 PR c++/106423
462 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
463 diagnostics in C++20 and later.
464 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
465
5cd525f0
GA
4662022-08-11 Marek Polacek <polacek@redhat.com>
467
468 PR middle-end/102633
469 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
470 suppress_warning here.
471
5f17badb
GA
4722022-08-08 Tom Honermann <tom@honermann.net>
473
474 PR preprocessor/106426
475 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
476 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
477
4782022-08-08 Tom Honermann <tom@honermann.net>
479
480 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
481 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
482 enabled.
483 * c-opts.cc (c_common_post_options): Set flag_char8_t if
484 targeting C2x.
485
4a7274dd
GA
4862022-07-31 Lewis Hyatt <lhyatt@gmail.com>
487
488 PR c++/66290
489 * c-common.h: Rename global done_lexing to
490 override_libcpp_locations.
491 * c-common.cc (c_cpp_diagnostic): Likewise.
492 * c-opts.cc (c_common_finish): Set override_libcpp_locations
493 (formerly done_lexing) immediately prior to calling cpp_finish ().
494
1e2c5f4c
GA
4952022-07-27 Lewis Hyatt <lhyatt@gmail.com>
496
497 * c-ppoutput.cc (token_streamer::stream): Update input_location
498 prior to streaming each token.
499
0e6fa997
GA
5002022-07-23 Immad Mir <mirimmad@outlook.com>
501
502 * c-attribs.cc: (c_common_attribute_table): add three new attributes
503 namely: fd_arg, fd_arg_read and fd_arg_write.
504 (handle_fd_arg_attribute): New.
505
bdc7b765
GA
5062022-07-15 Marek Polacek <polacek@redhat.com>
507
508 PR c++/104477
509 * c-common.cc (c_common_reswords): Add
510 __reference_constructs_from_temporary and
511 __reference_converts_from_temporary.
512 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
513 RID_REF_CONVERTS_FROM_TEMPORARY.
514
5152022-07-15 Jonathan Wakely <jwakely@redhat.com>
516
517 * c-format.cc (class range_label_for_format_type_mismatch):
518 Adjust to new label_text API.
519
c72d4714
GA
5202022-07-11 Lewis Hyatt <lhyatt@gmail.com>
521
522 PR preprocessor/106252
523 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
524 option argument prior to verifying the option was found.
525
6345c414
GA
5262022-07-07 David Malcolm <dmalcolm@redhat.com>
527
528 * c-format.cc (range_label_for_format_type_mismatch::get_text):
529 Update for removal of label_text::maybe_free in favor of automatic
530 memory management.
531
4bc92c3b
GA
5322022-07-06 Lewis Hyatt <lhyatt@gmail.com>
533
534 PR preprocessor/53920
535 PR c++/53431
536 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
537 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
538 (c_pp_stream_token): Declare.
539 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
540 pragmas to...
541 (should_output_pragmas): ...here. New function.
542 (token_streamer::stream): Support handling early pragmas.
543 (do_line_change): Likewise.
544 (c_pp_stream_token): New function.
545 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
546 (pragma_diagnostic_lex_normal): New function. Moved logic for
547 interpreting GCC diagnostic pragmas here.
548 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
549 directly from libcpp.
550 (handle_pragma_diagnostic): Refactor into helper function...
551 (handle_pragma_diagnostic_impl): ...here. New function.
552 (handle_pragma_diagnostic_early): New function.
553 (handle_pragma_diagnostic_early_pp): New function.
554 (struct pragma_ns_name): Renamed to...
555 (struct pragma_pp_data): ...this. Add new "early_handler" member.
556 (c_register_pragma_1): Support early pragmas in the preprocessor.
557 (c_register_pragma_with_early_handler): New function.
558 (c_register_pragma): Support the new early handlers in struct
559 internal_pragma_handler.
560 (c_register_pragma_with_data): Likewise.
561 (c_register_pragma_with_expansion): Likewise.
562 (c_register_pragma_with_expansion_and_data): Likewise.
563 (c_invoke_early_pragma_handler): New function.
564 (c_pp_invoke_early_pragma_handler): New function.
565 (init_pragma): Add early pragma support for diagnostic pragmas.
566 * c-pragma.h (struct internal_pragma_handler): Add new early handler
567 members.
568 (c_register_pragma_with_early_handler): Declare.
569 (c_invoke_early_pragma_handler): Declare.
570 (c_pp_invoke_early_pragma_handler): Declare.
571
d1f3a3ff
GA
5722022-07-05 Marek Polacek <polacek@redhat.com>
573
574 PR c++/105626
575 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
576 u8 strings.
577
ed974488
GA
5782022-07-01 Marek Polacek <polacek@redhat.com>
579
580 PR c++/106111
581 * c-common.h (enum rid): Update RID_LAST_CXX20.
582
976196b3
GA
5832022-06-30 Jonathan Wakely <jwakely@redhat.com>
584
585 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
586 names.
587
84c2131d
GA
5882022-06-24 Jason Merrill <jason@redhat.com>
589
590 PR c++/87729
591 PR c++/20423
592 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
593
4390e7bf
GA
5942022-06-18 Jakub Jelinek <jakub@redhat.com>
595
596 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
597 Use flag_sanitize_trap & SANITIZE_??? instead of
598 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
599 and flag_sanitize_trap differs for them, emit __builtin_trap only
600 for the comparison where trap is requested.
601 (ubsan_instrument_vla, ubsan_instrument_return): Use
602 lag_sanitize_trap & SANITIZE_??? instead of
603 flag_sanitize_undefined_trap_on_error.
604
c3642271
GA
6052022-06-13 Jason Merrill <jason@redhat.com>
606
607 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
608
d9176e64
GA
6092022-05-27 Marek Polacek <polacek@redhat.com>
610
611 PR c/90658
612 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
613
6142022-05-27 Jakub Jelinek <jakub@redhat.com>
615
616 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
617
57f2ce6a
GA
6182022-05-20 David Malcolm <dmalcolm@redhat.com>
619
620 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
621 and "override".
622 * c-pretty-print.h: Likewise.
623
1cda629f
GA
6242022-05-18 Marek Polacek <polacek@redhat.com>
625
626 PR c/105131
627 * c.opt (Wenum-int-mismatch): New.
628
6292022-05-18 Marek Polacek <polacek@redhat.com>
630
631 PR c++/105497
632 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
633 enumerator when it was marked with attribute unused.
634
6352022-05-18 Eric Botcazou <ebotcazou@adacore.com>
636
637 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
638 floating-point complex types.
639 <POINTER_TYPE>: Do not use limited_with clause if the designated
640 type is a scalar type.
641
3d9439b1
GA
6422022-05-17 Jakub Jelinek <jakub@redhat.com>
643
644 * c-omp.cc (c_finish_omp_depobj): Handle
645 OMP_CLAUSE_DEPEND_INOUTSET.
646
702bd11f
GA
6472022-05-16 Jason Merrill <jason@redhat.com>
648
649 PR c/105492
650 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
651 here.
652
6532022-05-16 Martin Liska <mliska@suse.cz>
654
655 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
656 (c_common_nodes_and_builtins): Likewise.
657 * c-format.cc (check_tokens): Likewise.
658 (check_plain): Likewise.
659 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
660 (init_pragma): Likewise.
661 * known-headers.cc (get_string_macro_hint): Likewise.
662 (get_stdlib_header_for_name): Likewise.
663 * c-attribs.cc: Likewise.
664
9df4ffe4
GA
6652022-05-13 Richard Biener <rguenther@suse.de>
666
667 * c-omp.cc: Remove gimple-fold.h include.
668
49ace834
GA
6692022-05-12 Jakub Jelinek <jakub@redhat.com>
670
671 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
672 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
673 if null_pointer_node.
674
d0d513b5
GA
6752022-05-11 Martin Liska <mliska@suse.cz>
676
677 PR target/105355
678 * c-opts.cc (c_common_handle_option): Change option name.
679 * c.opt: Remove Joined and use Separate option.
680
bd022ff9
GA
6812022-05-09 Alex Coplan <alex.coplan@arm.com>
682
683 * c-common.h (get_dump_info): Delete.
684 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
685 from the global dump_manager instead of the (now obsolete)
686 get_dump_info.
687 * c-opts.cc (original_dump_file): Delete.
688 (original_dump_flags): Delete.
689 (c_common_parse_file): Switch to using global dump_manager to
690 manage the original dump file; fix leak of dump file.
691 (get_dump_info): Delete.
692
a1947c92
GA
6932022-05-07 Marek Polacek <polacek@redhat.com>
694
695 PR c++/101833
696 PR c++/47634
697 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
698 with FN being either a function declaration or function type. Use
699 maybe_adjust_arg_pos_for_attribute.
700 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
701 check_function_format.
702 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
703 (positional_argument): Adjust.
704 * c-format.cc (get_constant): Rename to ...
705 (validate_constant): ... this. Take EXPR by reference. Return bool
706 instead of tree.
707 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
708 return value of validate_constant.
709 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
710 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
711 (check_function_format): Adjust a parameter name.
712 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
713
3e7db517
GA
7142022-05-04 Marek Polacek <polacek@redhat.com>
715
716 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
717 char to int.
718
95874f95
GA
7192022-04-30 Jason Merrill <jason@redhat.com>
720
721 PR c/100545
722 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
723 and typedef.
724 * c-common.cc (set_underlying_type): Add assert.
725
01ad093b
GA
7262022-04-26 Patrick Palka <ppalka@redhat.com>
727
728 PR c++/105304
729 * c-common.cc (verify_tree) [restart]: Move up to before the
730 NULL test.
731
da066c42
GA
7322022-04-11 Jakub Jelinek <jakub@redhat.com>
733
734 PR c++/105186
735 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
736 and __int%d__ builtin types, initialize corresponding ridpointers
737 entry.
738
150ab50f
GA
7392022-03-30 Marek Polacek <polacek@redhat.com>
740
741 PR c++/101030
742 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
743 conversion_warning when OP1 is null.
744
7452022-03-30 Thomas Schwinge <thomas@codesourcery.com>
746
747 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
748 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
749 option properties.
750
7512022-03-30 Thomas Schwinge <thomas@codesourcery.com>
752
753 * c.opt (Wuse-after-free): Remove.
754
7552022-03-30 Thomas Schwinge <thomas@codesourcery.com>
756
757 * c.opt (Warray-bounds): Remove.
758
d2906412
GA
7592022-03-26 Thomas Schwinge <thomas@codesourcery.com>
760
761 * c.opt: Properly quote comment.
762
31e989a2
GA
7632022-03-25 Eric Botcazou <ebotcazou@adacore.com>
764
765 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
766 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
767 the referenced type instead. Deal with the anonymous original type
768 of a typedef'ed type. In the actual access case, follow the chain
769 of external subtypes.
770 <TYPE_DECL>: Tidy up control flow.
771
d156bb87
GA
7722022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
773
774 * c-ada-spec.cc: Change array length
775
d7f00da1
GA
7762022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
777
778 * c-common.cc (c_family_tests): Call the new tests.
779 * c-common.h (c_diagnostic_tests): Declare.
780 (c_opt_problem_cc_tests): Likewise.
781
7822022-03-19 Jakub Jelinek <jakub@redhat.com>
783
784 PR c++/101515
785 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
786 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
787 be printed.
788
9fc8f278
GA
7892022-03-16 Christophe Lyon <christophe.lyon@arm.com>
790 Roger Sayle <roger@nextmovesoftware.com>
791
792 PR c/98198
793 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
794
7952022-03-16 Patrick Palka <ppalka@redhat.com>
796
797 PR c++/96780
798 * c.opt: Add -ffold-simple-inlines.
799
b9756c08
GA
8002022-03-13 Tobias Burnus <tobias@codesourcery.com>
801
802 * c-target.def (check_string_object_format_arg): Fix description typo.
803
57eeedda
GA
8042022-03-12 Thomas Schwinge <thomas@codesourcery.com>
805
806 PR other/65095
807 * c-common.h (c_omp_map_clause_name): Remove.
808 * c-omp.cc (c_omp_map_clause_name): Remove.
809
8cc4f9cd
GA
8102022-03-09 Jakub Jelinek <jakub@redhat.com>
811
812 PR c/104711
813 * c-opts.cc (c_common_post_options): Don't enable
814 -Wshift-negative-value from -Wextra for C++20 or later.
815 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
816 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
817 instead of TYPE_UNSIGNED.
818
e6533e2e
GA
8192022-03-07 Jakub Jelinek <jakub@redhat.com>
820
821 * c-attribs.cc: Fix up duplicated word issue in a comment.
822
12d4552e
GA
8232022-03-01 Martin Liska <mliska@suse.cz>
824
825 PR ipa/104533
826 * c-attribs.cc (handle_target_clones_attribute): Use
827 get_target_clone_attr_len and report warning soon.
828
0bdb0498
GA
8292022-02-17 Jonathan Wakely <jwakely@redhat.com>
830
831 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
832 (handle_pragma_weak): Likewise.
833 (handle_pragma_scalar_storage_order): Likewise.
834 (handle_pragma_redefine_extname): Likewise.
835 (handle_pragma_visibility): Likewise.
836 (handle_pragma_diagnostic): Likewise.
837 (handle_pragma_target): Likewise.
838 (handle_pragma_optimize): Likewise.
839 (handle_pragma_push_options): Likewise.
840 (handle_pragma_pop_options): Likewise.
841 (handle_pragma_reset_options): Likewise.
842 (handle_pragma_message): Likewise.
843 (handle_pragma_float_const_decimal64): Likewise.
844
cb3afcd2
GA
8452022-02-16 Jakub Jelinek <jakub@redhat.com>
846
847 PR c/104531
848 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
849 build_binary_op with LT_EXPR and only if that doesn't return
850 error_mark_node call build_modify_expr.
851
8522022-02-16 Jakub Jelinek <jakub@redhat.com>
853
854 PR c/104510
855 * c-common.cc (shorten_compare): Convert original arguments to
856 the original *restype_ptr when mixing binary and decimal float.
857
1f8a09d2
GA
8582022-02-14 Richard Biener <rguenther@suse.de>
859
860 PR c/104505
861 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
862 internal function calls.
863
e8d68f0a
GA
8642022-02-11 Richard Biener <rguenther@suse.de>
865
866 * c-attribs.cc (c_common_attribute_table): Add entry for
867 vector_mask.
868 (handle_vector_mask_attribute): New.
869
a645583d
GA
8702022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
871
872 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
873 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
874 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
875
3adf509f
GA
8762022-02-09 Jason Merrill <jason@redhat.com>
877
878 * c-cppbuiltin.cc (c_cpp_builtins): Update values
879 of __cpp_constexpr and __cpp_concepts for C++20.
880
bb99171b
GA
8812022-01-24 Marek Polacek <polacek@redhat.com>
882
883 PR preprocessor/104030
884 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
885
9dd44357
GA
8862022-01-21 Jakub Jelinek <jakub@redhat.com>
887
888 PR c++/104148
889 * c-common.h (check_function_arguments_recurse): Add for_format
890 arg.
891 * c-common.cc (check_function_nonnull): Pass false to
892 check_function_arguments_recurse's last argument.
893 (check_function_arguments_recurse): Add for_format argument,
894 if true, don't stop on warning_suppressed_p.
895 * c-format.cc (check_format_info): Pass true to
896 check_function_arguments_recurse's last argument.
897
fe1ad141
GA
8982022-01-19 David Malcolm <dmalcolm@redhat.com>
899
900 * c-common.cc (c_common_c_tests): Rename to...
901 (c_common_cc_tests): ...this.
902 (c_family_tests): Update calls for .c to .cc renaming.
903 * c-common.h (c_format_c_tests): Rename to...
904 (c_format_cc_tests): ...this.
905 (c_indentation_c_tests): Rename to...
906 (c_indentation_cc_tests): ...this.
907 (c_pretty_print_c_tests): Rename to...
908 (c_pretty_print_cc_tests): ...this.
909 * c-format.cc (c_format_c_tests): Rename to...
910 (c_format_cc_tests): ...this.
911 * c-indentation.cc (c_indentation_c_tests): Rename to...
912 (c_indentation_cc_tests): ...this.
913 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
914 (c_pretty_print_cc_tests): ...this.
915
fc829782
GA
9162022-01-17 Martin Liska <mliska@suse.cz>
917
918 * c-ada-spec.cc: Rename .c names to .cc.
919 * c-ada-spec.h: Likewise.
920 * c-common.cc (c_build_vec_convert): Likewise.
921 (warning_candidate_p): Likewise.
922 * c-common.h (enum rid): Likewise.
923 (build_real_imag_expr): Likewise.
924 (finish_label_address_expr): Likewise.
925 (c_get_substring_location): Likewise.
926 (c_build_bind_expr): Likewise.
927 (conflict_marker_get_final_tok_kind): Likewise.
928 (c_parse_error): Likewise.
929 (check_missing_format_attribute): Likewise.
930 (invalid_array_size_error): Likewise.
931 (warn_for_multistatement_macros): Likewise.
932 (build_attr_access_from_parms): Likewise.
933 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
934 * c-format.cc: Likewise.
935 * c-gimplify.cc (c_gimplify_expr): Likewise.
936 * c-indentation.h: Likewise.
937 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
938 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
939 * c-opts.cc (c_common_post_options): Likewise.
940 (set_std_cxx23): Likewise.
941 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
942 * c-pretty-print.h: Likewise.
943
9442022-01-17 Martin Liska <mliska@suse.cz>
945
946 * c-ada-spec.c: Moved to...
947 * c-ada-spec.cc: ...here.
948 * c-attribs.c: Moved to...
949 * c-attribs.cc: ...here.
950 * c-common.c: Moved to...
951 * c-common.cc: ...here.
952 * c-cppbuiltin.c: Moved to...
953 * c-cppbuiltin.cc: ...here.
954 * c-dump.c: Moved to...
955 * c-dump.cc: ...here.
956 * c-format.c: Moved to...
957 * c-format.cc: ...here.
958 * c-gimplify.c: Moved to...
959 * c-gimplify.cc: ...here.
960 * c-indentation.c: Moved to...
961 * c-indentation.cc: ...here.
962 * c-lex.c: Moved to...
963 * c-lex.cc: ...here.
964 * c-omp.c: Moved to...
965 * c-omp.cc: ...here.
966 * c-opts.c: Moved to...
967 * c-opts.cc: ...here.
968 * c-pch.c: Moved to...
969 * c-pch.cc: ...here.
970 * c-ppoutput.c: Moved to...
971 * c-ppoutput.cc: ...here.
972 * c-pragma.c: Moved to...
973 * c-pragma.cc: ...here.
974 * c-pretty-print.c: Moved to...
975 * c-pretty-print.cc: ...here.
976 * c-semantics.c: Moved to...
977 * c-semantics.cc: ...here.
978 * c-ubsan.c: Moved to...
979 * c-ubsan.cc: ...here.
980 * c-warn.c: Moved to...
981 * c-warn.cc: ...here.
982 * cppspec.c: Moved to...
983 * cppspec.cc: ...here.
984 * stub-objc.c: Moved to...
985 * stub-objc.cc: ...here.
986
9248ee41
GA
9872022-01-15 Martin Sebor <msebor@redhat.com>
988
989 PR c/63272
990 * c.opt (-Wdangling-pointer): New option.
991
9922022-01-15 Martin Sebor <msebor@redhat.com>
993
994 PR tree-optimization/80532
995 * c.opt (-Wuse-after-free): New options.
996
617db51d
GA
9972022-01-14 David Malcolm <dmalcolm@redhat.com>
998
999 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1000 (handle_tainted_args_attribute): New.
1001
ad3f0d08
GA
10022022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1003 Jason Merrill <jason@redhat.com>
1004
1005 PR c++/70417
1006 * c.opt: Added -Wmissing-template-keyword.
1007
10082022-01-13 Richard Biener <rguenther@suse.de>
1009
1010 PR c/104002
1011 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1012
02a8a01b
GA
10132022-01-12 Martin Liska <mliska@suse.cz>
1014
1015 PR target/103804
1016 * c-attribs.c (handle_optimize_attribute): Do not call
1017 cl_optimization_compare if we seen an error.
1018
01a254e3
GA
10192022-01-11 Jakub Jelinek <jakub@redhat.com>
1020
1021 PR c/101537
1022 PR c/103881
1023 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1024 and BIT_XOR_EXPR.
1025
d9450aa0
GA
10262022-01-10 Richard Biener <rguenther@suse.de>
1027
1028 PR middle-end/101530
1029 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1030 in a TARGET_EXPR to force a temporary.
1031
11ce8d04
GA
10322022-01-06 Marek Polacek <polacek@redhat.com>
1033
1034 PR c++/103758
1035 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1036 diagnostic messages.
1037 (handle_pragma_diagnostic): Likewise.
1038
a4ae8c37
GA
10392022-01-03 Marek Polacek <polacek@redhat.com>
1040
1041 PR c++/103758
1042 * c-format.c (check_tokens): Accept "decl-specifier*".
1043
10442022-01-03 Jakub Jelinek <jakub@redhat.com>
1045
1046 PR c++/103600
1047 * c-attribs.c (handle_non_overlapping_attribute): New function.
1048 (c_common_attribute_table): Add "non overlapping" attribute.
1049
84790a9d
GA
10502021-12-30 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c++/103012
1053 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1054 cpp_define_unused/cpp_undef calls with forced token locations
1055 BUILTINS_LOCATION.
1056
d1e111da
GA
10572021-12-27 Patrick Palka <ppalka@redhat.com>
1058
1059 PR c++/103700
1060 * c-common.c (pointer_int_sum): When quiet, return
1061 error_mark_node for an incomplete pointed-to type and don't
1062 call size_in_bytes_loc.
1063
2554e2da
GA
10642021-12-17 Jason Merrill <jason@redhat.com>
1065
1066 PR c++/103681
1067 * c-opts.c (c_common_post_options): Update defaults.
1068
774269aa
GA
10692021-12-16 Martin Liska <mliska@suse.cz>
1070
1071 PR target/103709
1072 * c-pragma.c (handle_pragma_pop_options): Do not check
1073 global options modification when an error is seen in parsing
1074 of options (pragmas or attributes).
1075
c8dcf64b
GA
10762021-12-12 Jonathan Wakely <jwakely@redhat.com>
1077
1078 * known-headers.cc: Define INCLUDE_MEMORY instead of
1079 INCLUDE_UNIQUE_PTR.
1080 * name-hint.h: Likewise.
1081 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1082
4b4839e3
GA
10832021-12-09 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR pch/71934
1086 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1087 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1088
03a9bd05
GA
10892021-12-03 Jakub Jelinek <jakub@redhat.com>
1090
1091 PR pch/71934
1092 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1093 (pch_init): Don't initialize v.pch_init.
1094 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1095
40fa651e
GA
10962021-12-01 Jason Merrill <jason@redhat.com>
1097
1098 PR c++/103310
1099 * c.opt: Add -fconstexpr-fp-except.
1100
87cd82c8
GA
11012021-11-29 Richard Biener <rguenther@suse.de>
1102
1103 * c-format.c (check_format_string): Remove spurious
1104 gcc_unreachable.
1105
11062021-11-29 Richard Biener <rguenther@suse.de>
1107
1108 * c-opts.c (c_common_post_options): Remove unreachable return.
1109 * c-pragma.c (handle_pragma_target): Likewise.
1110 (handle_pragma_optimize): Likewise.
1111
091ccc06
GA
11122021-11-25 Jakub Jelinek <jakub@redhat.com>
1113
1114 PR c++/102611
1115 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1116 default for C++23 regardless of warn_deprecated.
1117 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1118 __cpp_multidimensional_subscript=202110L for C++23.
1119
e1d43592
GA
11202021-11-23 Martin Sebor <msebor@redhat.com>
1121
1122 PR middle-end/88232
1123 * c.opt: Add -Winfinite-recursion.
1124
9c077398
GA
11252021-11-19 Martin Sebor <msebor@redhat.com>
1126
1127 PR c++/33925
1128 PR c/102867
1129 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1130 and improve handling tof defined symbols.
1131
11322021-11-19 Martin Liska <mliska@suse.cz>
1133
1134 Revert:
1135 2021-11-18 Martin Liska <mliska@suse.cz>
1136
1137 * c-gimplify.c (genericize_c_loop): Use option directly.
1138
483092d3
GA
11392021-11-18 Matthias Kretz <m.kretz@gsi.de>
1140
1141 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1142 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1143
11442021-11-18 Martin Liska <mliska@suse.cz>
1145
1146 * c-gimplify.c (genericize_c_loop): Use option directly.
1147
280d2838
GA
11482021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1149
1150 PR c/91038
1151 PR c/29970
1152 * c-common.c (pointer_int_sum): Make sure pointer expressions
1153 are evaluated first when the size expression depends on for
1154 variably-modified types.
1155
11562021-11-17 Marek Polacek <polacek@redhat.com>
1157
1158 PR preprocessor/103026
1159 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1160
6b1695f4
GA
11612021-11-16 Jason Merrill <jason@redhat.com>
1162
1163 * c-common.c (release_tree_vector): Only cache vecs smaller than
1164 16 elements.
1165
e2b57363
GA
11662021-11-15 Jason Merrill <jason@redhat.com>
1167
1168 * c.opt: Add -fimplicit-constexpr.
1169 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1170 * c-opts.c (c_common_post_options): Disable below C++14.
1171
11722021-11-15 Jakub Jelinek <jakub@redhat.com>
1173
1174 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1175 Duplicate to both OMP_TARGET and OMP_TEAMS.
1176
8d36a0d2
GA
11772021-11-10 Marek Polacek <polacek@redhat.com>
1178
1179 PR c++/101940
1180 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1181 ignored_attributes.
1182
c9b1334e
GA
11832021-11-09 David Malcolm <dmalcolm@redhat.com>
1184
1185 * c-pragma.c (GCC_BAD_AT): New macro.
1186 (GCC_BAD2_AT): New macro.
1187 (handle_pragma_pack): Use the location of the pertinent token when
1188 issuing diagnostics about invalid constants/actions, and trailing
1189 junk.
1190 (handle_pragma_target): Likewise for non-string "GCC option".
1191 (handle_pragma_message): Likewise for trailing junk.
1192
18ae471f
GA
11932021-11-03 Joseph Myers <joseph@codesourcery.com>
1194
1195 PR c/103031
1196 * c-common.c (convert_and_check): Add argument init_const. Call
1197 convert_init if init_const.
1198 * c-common.h (convert_and_check): Update prototype.
1199 (convert_init): New prototype.
1200
cf82e8d9
GA
12012021-11-01 David Malcolm <dmalcolm@redhat.com>
1202
1203 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1204 CPP_OTHER tokens, set the "escape on output" flag.
1205
04a2cf3f
GA
12062021-10-27 Jakub Jelinek <jakub@redhat.com>
1207
1208 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1209 POINTER_PLUS_EXPR.
1210 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1211 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1212
12132021-10-27 Jakub Jelinek <jakub@redhat.com>
1214
1215 PR c++/102854
1216 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1217 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1218 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1219 conversions temporarily clear the 3rd bit from d->kind while walking
1220 subtrees.
1221 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1222 if possibly non-rectangular.
1223
ae5c5406
GA
12242021-10-21 Jakub Jelinek <jakub@redhat.com>
1225
1226 PR middle-end/64888
1227 * c-omp.c (c_omp_predefined_variable): Return true also for
1228 ubsan_create_data created artificial variables.
1229
5d5885c9
GA
12302021-10-14 Joseph Myers <joseph@codesourcery.com>
1231
1232 * c-format.c (printf_length_specs, scanf_length_specs)
1233 (print_char_table, scan_char_table): Support DFP formats for C2X.
1234 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1235 (T2X_D32, T2X_D64, T2X_D128): New macros.
1236
12372021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1238
1239 * c-omp.c (c_omp_check_context_selector): Rename to
1240 omp_check_context_selector and move to omp-general.c.
1241 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1242 move to omp-general.c.
1243
52055987
GA
12442021-10-12 Joseph Myers <joseph@codesourcery.com>
1245
1246 * c-format.c (print_char_table): Add %b and %B formats.
1247 (scan_char_table): Add %b format.
1248 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1249 (T2X_UPD, T2X_UIM): New macros.
1250
12512021-10-12 Jakub Jelinek <jakub@redhat.com>
1252
1253 * c-omp.c (c_finish_omp_atomic): Use
1254 clear_padding_type_may_have_padding_p.
1255
ce6eec39
GA
12562021-10-08 Martin Liska <mliska@suse.cz>
1257
1258 * c-opts.c (c_common_post_options): Use new macro
1259 OPTION_SET_P.
1260
50e20ee6
GA
12612021-10-07 Martin Liska <mliska@suse.cz>
1262
1263 * c-common.c (parse_optimize_options): Make
1264 save_opt_decoded_options a pointer type.
1265
57c7ec62
GA
12662021-10-06 Jakub Jelinek <jakub@redhat.com>
1267
1268 PR tree-optimization/102571
1269 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1270 padding, but the non-padding bits are contiguous set of bytes
1271 by adjusting the memcmp call arguments instead of emitting
1272 __builtin_clear_padding and then comparing all the type's bytes.
1273
12742021-10-06 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c++/102612
1277 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1278 __cpp_constexpr to 202110L rather than 201907L.
1279
da9c5f78
GA
12802021-10-04 Marek Polacek <polacek@redhat.com>
1281
1282 PR c++/97573
1283 * c-common.h (do_warn_array_compare): Declare.
1284 * c-warn.c (do_warn_array_compare): New.
1285 * c.opt (Warray-compare): New option.
1286
e3e07b89
GA
12872021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1288
1289 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1290 NULL, this is not needed.
1291
9d116bcc
GA
12922021-10-01 Martin Sebor <msebor@redhat.com>
1293
1294 PR c/102103
1295 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1296 Check and perform warning suppression.
1297 (c_common_truthvalue_conversion): Enhance warning suppression.
1298
12992021-10-01 Martin Liska <mliska@suse.cz>
1300
1301 PR target/102552
1302 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1303 used for program name, so merged_decoded_options should also
1304 respect that.
9d116bcc
GA
1305
13062021-10-01 Jakub Jelinek <jakub@redhat.com>
1307 Richard Biener <rguenther@suse.de>
1308
1309 PR sanitizer/102515
1310 * c-ubsan.c (ubsan_instrument_division): Check the right
1311 flag_sanitize_recover bit, depending on which sanitization
1312 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1313 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1314 and SANITIZE_DIVIDE is enabled, neither check is known
1315 to be false and flag_sanitize_recover bits for those two
1316 aren't the same, emit both __ubsan_handle_divrem_overflow
1317 and __ubsan_handle_divrem_overflow_abort calls.
1318
13192021-10-01 Martin Liska <mliska@suse.cz>
1320
1321 * c-common.c (parse_optimize_options): Combine optimize
1322 options with what was provided on the command line.
1323
13242021-10-01 Jakub Jelinek <jakub@redhat.com>
1325
1326 * c-omp.c (c_omp_split_clauses): Also copy
1327 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1328
cf966403
GA
13292021-09-27 Martin Liska <mliska@suse.cz>
1330
1331 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1332 x_flag_default_complex_method.
cf966403 1333
e4777439
GA
13342021-09-22 Jakub Jelinek <jakub@redhat.com>
1335
1336 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1337
62498024
GA
13382021-09-20 Matthias Kretz <m.kretz@gsi.de>
1339
1340 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1341 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1342 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1343 __ROUNDING_MATH__ according to the new optimization flags.
1344
cf74e7b5
GA
13452021-09-18 Jakub Jelinek <jakub@redhat.com>
1346
1347 * c-omp.c (c_omp_split_clauses): Split order clause also to
1348 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1349
0a4cb439
GA
13502021-09-17 Jakub Jelinek <jakub@redhat.com>
1351
1352 * c-omp.c (c_finish_omp_atomic): Avoid creating
1353 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1354 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1355 had NULL initializer. When omitting operands after v = x,
1356 use type of v rather than type of x. Fix type of vtmp
1357 TARGET_EXPR.
1358
07985c47
GA
13592021-09-13 Jason Merrill <jason@redhat.com>
1360
1361 * c.opt: Add -Winterference-size.
1362 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1363 and __GCC_CONSTRUCTIVE_SIZE.
1364
a26206ec
GA
13652021-09-10 Jakub Jelinek <jakub@redhat.com>
1366
1367 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1368 * c-omp.c: Include gimple-fold.h.
1369 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1370 OpenMP 5.1 atomics.
1371
f84e2f0b
GA
13722021-09-09 qing zhao <qing.zhao@oracle.com>
1373
1374 * c-attribs.c (handle_uninitialized_attribute): New function.
1375 (c_common_attribute_table): Add "uninitialized" attribute.
1376
b6db7cd4
GA
13772021-09-08 liuhongt <hongtao.liu@intel.com>
1378
1379 * c-common.c (excess_precision_mode_join): Update below comments.
1380 (c_ts18661_flt_eval_method): Set excess_precision_type to
1381 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1382 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1383 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1384 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1385
b2748138
GA
13862021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1387
1388 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1389
7b739540
GA
13902021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1391
1392 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1393 and -gnatwu warning for the package specification.
1394
e11c6046
GA
13952021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1396
1397 * c-attribs.c (handle_unavailable_attribute): New.
1398
1e2f030b
GA
13992021-08-30 Jason Merrill <jason@redhat.com>
1400
1401 * c.opt: Add -Wmissing-requires.
1402
85d77ac4
GA
14032021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1404
1405 PR other/93067
1406 * c-opts.c (c_common_input_charset_cb): New function.
1407 (c_common_post_options): Call new function
1408 diagnostic_initialize_input_context().
1409
7c9e1645
GA
14102021-08-20 Tobias Burnus <tobias@codesourcery.com>
1411
1412 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1413 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1414 "di" and "u", respecitively; fill with BADLEN to match
1415 size of 'types'.
1416 (get_init_dynamic_hwi): Split off from ...
1417 (init_dynamic_diag_info): ... here. Call it.
1418 (init_dynamic_gfc_info): Call it.
1419
14202021-08-20 Jakub Jelinek <jakub@redhat.com>
1421
1422 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1423 * c-pragma.c (omp_pragmas): Add error directive.
1424 * c-omp.c (omp_directives): Uncomment error directive entry.
1425
6e529985
GA
14262021-08-18 Jakub Jelinek <jakub@redhat.com>
1427
1428 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1429 * c-pragma.c (omp_pragmas): Add nothing directive.
1430 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1431
2d14d64b
GA
14322021-08-17 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR c++/101539
1435 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1436 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1437
14382021-08-17 Matt Jacobson <mhjacobson@me.com>
1439
1440 * c-opts.c (c_common_post_options): Default to
1441 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1442
14432021-08-17 Jakub Jelinek <jakub@redhat.com>
1444
1445 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1446 * c-pragma.c (omp_pragmas): Add scope construct.
1447 * c-omp.c (omp_directives): Uncomment scope directive entry.
1448
9d1d9fc8
GA
14492021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1450
1451 * c-cppbuiltin.c (c_cpp_builtins): Define
1452 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1453
72be20e2
GA
14542021-08-12 Jakub Jelinek <jakub@redhat.com>
1455
1456 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1457 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1458 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1459 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1460 enumerator.
1461 (c_finish_omp_masked): Declare.
1462 * c-omp.c (c_finish_omp_masked): New function.
1463 (c_omp_split_clauses): Handle combined masked constructs.
1464
4d17ca1b
GA
14652021-07-30 Jakub Jelinek <jakub@redhat.com>
1466
1467 PR c++/101539
1468 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1469 * c-common.c (c_common_reswords): Add
1470 __is_pointer_interconvertible_base_of.
1471
14722021-07-29 Richard Biener <rguenther@suse.de>
1473
1474 PR c/101512
1475 * c-common.c (c_common_mark_addressable_vec): Look through
1476 C_MAYBE_CONST_EXPR even if not at the toplevel.
1477
af3f12e6
GA
14782021-07-27 Martin Sebor <msebor@redhat.com>
1479
1480 PR c/101585
1481 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1482
ead235f6
GA
14832021-07-23 Jakub Jelinek <jakub@redhat.com>
1484
1485 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1486 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1487 and later.
1488
14892021-07-23 Jakub Jelinek <jakub@redhat.com>
1490
1491 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1492 PRAGMA_OMP__LAST_ enumerators.
1493
419c6c68
GA
14942021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1495 Joseph Myers <joseph@codesourcery.com>
1496 Cesar Philippidis <cesar@codesourcery.com>
1497
1498 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1499
92d45509
GA
15002021-07-20 Martin Sebor <msebor@redhat.com>
1501
1502 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1503 by-const-reference.
1504 * c-common.h (c_build_shufflevector): Same.
1505
87277b6a
GA
15062021-07-16 Andrew Pinski <apinski@marvell.com>
1507
1508 PR c/101453
1509 * c-common.c (parse_optimize_options): Use the correct
1510 size for buffer.
1511
d97d71a1
GA
15122021-07-15 Martin Sebor <msebor@redhat.com>
1513
1514 PR c/101289
1515 PR c/97548
1516 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1517
c4fee1c6
GA
15182021-07-14 Jason Merrill <jason@redhat.com>
1519
1520 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1521
6fba0eea
GA
15222021-07-06 Martin Sebor <msebor@redhat.com>
1523
1524 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1525 (gcc_cdiag_char_table): Same.
1526 (gcc_cxxdiag_char_table): Same.
6fba0eea 1527
7a60a6e8
GA
15282021-07-02 Jakub Jelinek <jakub@redhat.com>
1529
1530 * c-common.h (enum c_omp_directive_kind): New enum.
1531 (struct c_omp_directive): New type.
1532 (c_omp_categorize_directive): Declare.
1533 * c-omp.c (omp_directives): New variable.
1534 (c_omp_categorize_directive): New function.
1535
bea7c16a
GA
15362021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1537
1538 * c-ada-spec.c (packed_layout): New global variable.
1539 (dump_ada_declaration): Set it upon seeing a packed record type.
1540 Do not put the "aliased" keyword if it is set.
1541 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1542
15432021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1544
1545 * c-ada-spec.c (check_name): Rename into...
1546 (check_type_name_conflict): ...this. Minor tweak.
1547 (dump_ada_function_declaration): Adjust to above renaming.
1548 (dump_ada_array_domains): Fix oversight.
1549 (dump_ada_declaration): Call check_type_name_conflict for variables.
1550
90708f87
GA
15512021-06-25 Martin Sebor <msebor@redhat.com>
1552
1553 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1554 (c_common_truthvalue_conversion): Replace direct uses of
1555 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1556 copy_no_warning.
1557 (check_function_arguments_recurse): Same.
1558 * c-gimplify.c (c_gimplify_expr): Same.
1559 * c-warn.c (overflow_warning): Same.
1560 (warn_logical_operator): Same.
1561 (warn_if_unused_value): Same.
1562 (do_warn_unused_parameter): Same.
1563
9aa8327e
GA
15642021-06-24 Jakub Jelinek <jakub@redhat.com>
1565
1566 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1567 C_ORT_OMP_TARGET.
1568 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1569 combined target constructs also add map (always, tofrom:) clause.
1570
ede6c356
GA
15712021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1572
1573 * c-attribs.c (common_handle_aligned_attribute): Remove short
1574 circuit and dead code.
1575
8dc48181
GA
15762021-06-14 Jonathan Wakely <jwakely@redhat.com>
1577
1578 PR c++/101052
1579 * known-headers.cc (get_stdlib_header_for_name): Add known
1580 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1581 exit, and getenv.
1582
8b8c3912
GA
15832021-06-12 Jason Merrill <jason@redhat.com>
1584
1585 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1586
f16f65f8
GA
15872021-06-11 Jakub Jelinek <jakub@redhat.com>
1588
1589 PR c++/100974
1590 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1591 -std=c++2b for P1938R3 consteval if support.
1592
4f625f47
GA
15932021-06-09 Jason Merrill <jason@redhat.com>
1594
1595 PR c++/100879
1596 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1597 warning.
1598
438aac59
GA
15992021-06-07 Martin Liska <mliska@suse.cz>
1600
1601 * c-target.def: Split long lines and replace them
1602 with '\n\'.
1603
600f90cb
GA
16042021-06-04 Martin Sebor <msebor@redhat.com>
1605
1606 PR c/100783
1607 * c-attribs.c (positional_argument): Bail on erroneous types.
1608
16092021-06-04 Martin Sebor <msebor@redhat.com>
1610
1611 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1612 for element presence.
1613
440c8a0a
GA
16142021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1615
1616 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1617 (dump_ada_decl_name): Likewise.
1618 (dump_anonymous_type_name): Remove parent parameter and adjust.
1619 (dump_sloc): Minor tweak.
1620 (dump_ada_array_type): Remove type parameter and adjust.
1621 (dump_ada_enum_type): Remove parent parameter and adjust.
1622 (dump_ada_node): Adjust calls to above functions.
1623 (dumped_anonymous_types): New global variable.
1624 (dump_nested_types_1): Rename into...
1625 (dump_nested_types): ...this.
1626 (dump_nested_type): Remove parent and dumped_types parameters.
1627 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1628 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1629 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1630
16312021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1632
1633 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1634 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1635
16362021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1637
1638 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1639 (htable_t): New typedef.
1640 (overloaded_names): Use it.
1641 (add_name): New function.
1642 (init_overloaded_names): Use add_name to populate the table and add
1643 special cases for sigaction and stat.
1644 (overloaded_name_p): Rename into...
1645 (overloading_index): ...this. Do not initialize overloaded_names table
1646 here. Return the index or zero.
1647 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1648 but add an overloading suffix instead.
1649 (dump_ada_specs): Initialize overloaded_names tables here.
1650
b75978d1
GA
16512021-06-01 Martin Liska <mliska@suse.cz>
1652
1653 PR other/100759
1654 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1655 to a situation where we are not in processing of an optimize
1656 pragma.
1657 * c-pragma.c (handle_pragma_pop_options): Restore target
1658 options.
1659
ee682192
GA
16602021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1661
1662 PR testsuite/100749
1663 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1664
16652021-05-31 Richard Biener <rguenther@suse.de>
1666
1667 PR c++/88601
1668 * c-common.c: Include tree-vector-builder.h and
1669 vec-perm-indices.h.
1670 (c_common_reswords): Add __builtin_shufflevector.
1671 (c_build_shufflevector): New funtion.
1672 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1673 (c_build_shufflevector): Declare.
1674
48166757
GA
16752021-05-28 Jakub Jelinek <jakub@redhat.com>
1676
1677 PR middle-end/99928
1678 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1679 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1680
16812021-05-28 Tobias Burnus <tobias@codesourcery.com>
1682
1683 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1684
2bc6dace
GA
16852021-05-25 Martin Liska <mliska@suse.cz>
1686
1687 PR tree-optimization/92860
1688 PR target/99592
1689 * c-attribs.c (handle_optimize_attribute): Save target node
1690 before calling parse_optimize_options and save it in case
1691 it changes.
1692 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1693 (handle_pragma_pop_options): Likewise here.
1694
16952021-05-25 Martin Liska <mliska@suse.cz>
1696
1697 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1698
16992021-05-25 Jakub Jelinek <jakub@redhat.com>
1700
1701 PR middle-end/99928
1702 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1703 combined with simd and not with taskloop or for.
1704
2832d51b
GA
17052021-05-21 Jakub Jelinek <jakub@redhat.com>
1706
1707 PR middle-end/99928
1708 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1709 on firstprivate clause copy going to target construct, and for
1710 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1711
ea34e2ed
GA
17122021-05-20 Jonathan Wakely <jwakely@redhat.com>
1713
1714 * c.opt (Wc++11-extensions, Wc++14-extensions)
1715 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1716 options.
1717
17182021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1719
1720 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1721
17222021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1723
1724 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1725 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1726 (pch_init): Renamed member.
1727 (c_common_valid_pch): Adjust access to debug_type_names.
1728
65f32e5d
GA
17292021-05-19 Martin Sebor <msebor@redhat.com>
1730
1731 PR c/100619
1732 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1733 bounds.
1734
a8daf9a1
GA
17352021-05-18 Richard Biener <rguenther@suse.de>
1736
1737 PR c/100547
1738 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1739 Reword existing nunit diagnostic.
1740
a7ffc1ef
GA
17412021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1742
1743 * c-common.c (braced_list_to_string): Return CTOR unchanged
1744 if host and target character sizes don't match.
1745
87a7d10c
GA
17462021-05-14 Martin Liska <mliska@suse.cz>
1747
1748 * c.opt: Add Warning keyword for 2 options.
1749
f9af11c7
GA
17502021-05-13 Martin Liska <mliska@suse.cz>
1751
1752 PR middle-end/100504
1753 * c-attribs.c (handle_target_clones_attribute): Expect a string
1754 argument to target_clone argument.
1755
037e3661
GA
17562021-05-11 Joseph Myers <joseph@codesourcery.com>
1757
1758 * c-lex.c (interpret_float): Handle digit separators for C2X.
1759
aa891c56
GA
17602021-05-10 Martin Liska <mliska@suse.cz>
1761
1762 * c-ada-spec.c (print_destructor): Use startswith
1763 function instead of strncmp.
1764 (dump_ada_declaration): Likewise.
1765 * c-common.c (disable_builtin_function): Likewise.
1766 (def_builtin_1): Likewise.
1767 * c-format.c (check_tokens): Likewise.
1768 (check_plain): Likewise.
1769 (convert_format_name_to_system_name): Likewise.
1770
e4ff4ffb
GA
17712021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1772
1773 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1774 complex divide
1775
c0fa3f2f
GA
17762021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1777 Nathan Sidwell <nathan@codesourcery.com>
1778 Tom de Vries <vries@codesourcery.com>
1779 Julian Brown <julian@codesourcery.com>
1780 Kwok Cheung Yeung <kcy@codesourcery.com>
1781
1782 * c.opt (Wopenacc-parallelism): New.
1783
6e81e015
GA
17842021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1785
1786 * c.opt (fopenacc-kernels=): Remove.
1787
019a9220
GA
17882021-04-08 Jakub Jelinek <jakub@redhat.com>
1789
1790 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1791 occured -> occurred.
1792 (check_alignment_of_packed_member): Fix a comment typo,
1793 memeber -> member.
1794 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1795 and onless -> unless.
1796 (warn_parm_array_mismatch): Fix comment typos, declaratation
1797 -> declaration and woud -> would. Fix up comment indentation.
1798
17992021-04-08 Martin Sebor <msebor@redhat.com>
1800
1801 PR middle-end/99883
1802 * c.opt (Wmismatched-new-delete): Correct spelling.
1803
b1da9916
GA
18042021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1805
1806 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1807 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1808 enumeral types use again the type name for the enumeration constants.
1809 (dump_ada_node): Adjust call to dump_ada_enum_type.
1810 (dump_nested_type): Likewise.
1811
f1607029
GA
18122021-04-01 Jason Merrill <jason@redhat.com>
1813
1814 PR c++/98481
1815 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1816
4493b1c1
GA
18172021-03-25 Jakub Jelinek <jakub@redhat.com>
1818
1819 PR c++/99565
1820 * c-warn.c (do_warn_duplicated_branches): Pass also
1821 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1822
6af7b307
GA
18232021-03-20 Jakub Jelinek <jakub@redhat.com>
1824
1825 PR debug/99230
1826 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1827
ceae9533
GA
18282021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1829
1830 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1831 after entering the separate class package, if any.
1832
67f10d28
GA
18332021-03-04 Richard Biener <rguenther@suse.de>
1834
1835 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1836 Handle ERROR_MARK.
1837
18382021-03-04 Jakub Jelinek <jakub@redhat.com>
1839
1840 PR c/99325
1841 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1842 (token_streamer::stream) Likewise.
1843 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1844 UNKNOWN_LOCATION.
1845
f3641ac7
GA
18462021-03-03 Jakub Jelinek <jakub@redhat.com>
1847
1848 PR c/99324
1849 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1850 instead of mark_addressable. Fix a comment typo -
1851 neutrallly -> neutrally.
1852
2c83c3fb
GA
18532021-02-28 Jakub Jelinek <jakub@redhat.com>
1854
1855 PR c/99304
1856 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1857 message - refernced -> referenced. Remove superfluous space before
1858 closing paren of function calls.
1859
daa68844
GA
18602021-02-25 Nathan Sidwell <nathan@acm.org>
1861
1862 PR c++/99166
1863 * c.opt (-flang-info-module-cmi): Renamed option.
1864
50352c6c
GA
18652021-02-19 Nathan Sidwell <nathan@acm.org>
1866
1867 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1868
bf81237e
GA
18692021-02-18 H.J. Lu <hjl.tools@gmail.com>
1870
1871 PR target/99113
1872 * c-attribs.c (c_common_attribute_table): Add the "retain"
1873 attribute.
1874 (handle_retain_attribute): New function.
1875
0e804ce3
GA
18762021-02-16 Marek Polacek <polacek@redhat.com>
1877
1878 PR c++/99062
1879 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1880 alignment argument is non-negative. Tweak a warning message.
1881
fab095da
GA
18822021-02-12 Martin Sebor <msebor@redhat.com>
1883
1884 PR c/99055
1885 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1886 print_generic_expr_to_str.
1887
4b37c3ea
GA
18882021-02-10 Richard Biener <rguenther@suse.de>
1889
1890 * c-common.c (parse_optimize_options): Free decoded_options.
1891
a19dd5e6
GA
18922021-02-04 emsr <3dw4rd@verizon.net>
1893
1894 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1895
9faaa807
GA
18962021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1897
1898 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1899 * c-lex.c (interpret_integer): Set node type for size literal.
1900
85d04a2e
GA
19012021-01-28 Jakub Jelinek <jakub@redhat.com>
1902
1903 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1904 draft from description.
1905 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1906
e62bb7f0
GA
19072021-01-26 Paul Fee <paul.f.fee@gmail.com>
1908
1909 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1910 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1911 and -std=gnu++2b
1912 * c-opts.c (set_std_cxx23): New.
1913 (c_common_handle_option): Set options when -std=c++23 is enabled.
1914 (c_common_post_options): Adjust comments.
1915 (set_std_cxx20): Likewise.
1916
161e4c08
GA
19172021-01-25 Martin Sebor <msebor@redhat.com>
1918
1919 PR c++/98646
1920 * c-common.c (check_nonnull_arg): Adjust warning text.
1921
4c9bcd5c
GA
19222021-01-17 Martin Sebor <msebor@redhat.com>
1923
1924 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1925 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1926
59cf67d1
GA
19272021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1928
1929 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1930 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1931
2f7f0d32
GA
19322021-01-15 Jakub Jelinek <jakub@redhat.com>
1933
1934 PR tree-optimization/98597
1935 * c-pretty-print.c: Include options.h.
1936 (c_fold_indirect_ref_for_warn): New function.
1937 (print_mem_ref): Use it. If it returns something that has compatible
1938 type and is TBAA compatible with zero offset, print it and return,
1939 otherwise print it using offsetof syntax or array ref syntax. Fix up
1940 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1941 argument has pointer to array type. Print pointers using the standard
1942 formatting.
1943
6851dda2
GA
19442021-01-12 Martin Sebor <msebor@redhat.com>
1945
1946 PR c/98597
1947 PR c/98592
1948 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1949 has pointer type. Remove redundant code. Avoid calling
1950 gimple_canonical_types_compatible_p.
1951
7d187e4f
GA
19522021-01-07 Martin Sebor <msebor@redhat.com>
1953
1954 PR middle-end/98578
1955 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1956 Avoid assuming acces type's size is constant. Correct condition
1957 guarding the printing of a parenthesis.
1958
942ae5be
GA
19592021-01-06 Martin Sebor <msebor@redhat.com>
1960
1961 PR c++/95768
1962 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1963 SSA_NAMEs print VLA names and GIMPLE defining statements.
1964 (print_mem_ref): New function.
1965 (c_pretty_printer::unary_expression): Call it.
1966
19672021-01-06 Richard Biener <rguenther@suse.de>
1968
1969 PR tree-optimization/95582
1970 * c-attribs.c (c_common_attribute_table): Add entry for
1971 signed_bool_precision.
1972 (handle_signed_bool_precision_attribute): New.
1973
8daa719b
GA
19742020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1975
1976 * c.opt: Add -stdlib= option and enumerations for
1977 libstdc++ and libc++.
1978
eefe499f
GA
19792020-12-16 Martin Liska <mliska@suse.cz>
1980
1981 * c.opt: Remove usage of Report.
1982
d52945ce
GA
19832020-12-14 Martin Sebor <msebor@redhat.com>
1984
1985 PR middle-end/98166
1986 PR c++/57111
1987 PR middle-end/98160
1988 * c-attribs.c (maybe_add_noinline): New function.
1989 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1990 Implicitly add attribute noinline to functions not declared inline
1991 and warn on those.
1992
ca2bd949
GA
19932020-12-09 Tobias Burnus <tobias@codesourcery.com>
1994
1995 * c-pragma.c (omp_pragmas): Add 'allocate'.
1996 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1997
f6e8e279
GA
19982020-12-08 Jakub Jelinek <jakub@redhat.com>
1999
2000 PR c++/98187
2001 * c-pragma.c (omp_pragmas): Remove "master".
2002 (omp_pragmas_simd): Add "master".
2003
bc8a7013
GA
20042020-12-07 Marek Polacek <polacek@redhat.com>
2005
2006 PR c++/98126
2007 * c-common.c (verify_tree_lim_r): New function.
2008 (verify_sequence_points): Use it. Use nullptr instead of 0.
2009
b8dd0ef7
GA
20102020-12-03 Martin Sebor <msebor@redhat.com>
2011
2012 PR c++/90629
2013 PR middle-end/94527
2014 * c-attribs.c (handle_dealloc_attribute): New function.
2015 (handle_malloc_attribute): Handle argument forms of attribute.
2016 * c.opt (-Wmismatched-dealloc): New option.
2017 (-Wmismatched-new-delete): New option.
2018
20192020-12-03 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR libstdc++/93121
2022 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2023 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2024
e0f5e792
GA
20252020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2026
2027 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2028 {__GNUC_EXECUTION_CHARSET_NAME} and
2029 _WIDE_EXECUTION_CHARSET_NAME} macros.
2030
20312020-12-01 Nathan Sidwell <nathan@acm.org>
2032
2033 * c-common.c (module, import, export): New internal tokens (with
2034 trailing space).
2035 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2036 them.
2037 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2038 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2039
20402020-12-01 Nathan Sidwell <nathan@acm.org>
2041
2042 * c-opts.c (c_common_init_options): Ask for module dependencies.
2043 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2044 * c-pch.c (c_common_valid_pch): ... does not play with C++
2045 modules.
2046 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2047 options.
2048 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2049 (fmodule-only, fmodule-mapper, fmodule-lazy)
2050 (fmodule-version-ignore, Winvalid-imported-macros)
2051 (flang-info-include-translate, flang-info-include-translate-not):
2052 New options
2053
5fbf0ecb
GA
20542020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2055
2056 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2057 (dump_ada_structure): Also deal with convention, unchecked union and
2058 bit-field for nested types. In the latter case, print an Alignment
2059 aspect along with the Pack aspect.
2060
360258da
GA
20612020-11-25 Martin Sebor <msebor@redhat.com>
2062
2063 PR bootstrap/94982
2064 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2065 -Wformat-diag.
2066
1e2c9a27
GA
20672020-11-24 Martin Sebor <msebor@redhat.com>
2068
2069 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2070
8e6198d0
GA
20712020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2072
2073 * c-attribs.c (handle_special_var_sec_attribute): New.
2074 (handle_noinit_attribute): Remove.
2075 (attr_noinit_exclusions): Rename to...
2076 (attr_section_exclusions): ...this, and add "persistent" attribute
2077 exclusion.
2078 (c_common_attribute_table): Add "persistent" attribute.
2079
7a97e2fc
GA
20802020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2081
2082 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2083 Treat opaque types like other types.
2084 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2085 supported types.
2086
82e5048e
GA
20872020-11-20 Martin Sebor <msebor@redhat.com>
2088
2089 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2090 with fewer arguments.
2091
20922020-11-20 Martin Sebor <msebor@redhat.com>
2093
2094 PR middle-end/97879
2095 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2096 Error out on invalid modes.
2097
20982020-11-20 Jakub Jelinek <jakub@redhat.com>
2099
2100 PR libstdc++/88101
2101 * c-common.c (check_builtin_function_arguments): Handle
2102 BUILT_IN_CLEAR_PADDING.
2103
25bb75f8
GA
21042020-11-18 Nathan Sidwell <nathan@acm.org>
2105
2106 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2107
4dabb037
GA
21082020-11-17 Nathan Sidwell <nathan@acm.org>
2109
2110 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2111 after newly-added CTI_MODULE_HWM.
2112
21132020-11-17 Joseph Myers <joseph@codesourcery.com>
2114
2115 * c-cppbuiltin.c (builtin_define_float_constants): Define
2116 "*_IS_IEC_60559__" macros.
2117
21182020-11-17 Nathan Sidwell <nathan@acm.org>
2119
2120 * c-lex.c: #include "langhooks.h".
2121 (cb_undef): Maybe call preprocess_undef lang hook.
2122 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2123 lang hook.
2124 (push_command_line_include): Maybe call preprocess_main_file lang
2125 hook.
2126 (cb_file_change): Likewise.
2127 * c-ppoutput.c: #include "langhooks.h.
2128 (scan_translation_unit): Maybe call preprocess_token lang hook.
2129 (class do_streamer): New, derive from token_streamer.
2130 (directives_only_cb): Data pointer is do_streamer, call
2131 preprocess_token lang hook.
2132 (scan_translation_unit_directives_only): Use do_streamer.
2133 (print_line_1): Move src_line recording to after string output.
2134 (cb_undef): Maybe call preprocess_undef lang hook.
2135
21362020-11-17 Nathan Sidwell <nathan@acm.org>
2137
2138 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2139 code duplicating that functionality.
2140
21412020-11-17 Jakub Jelinek <jakub@redhat.com>
2142
2143 PR c/90628
2144 * c-common.c (check_builtin_function_arguments)
2145 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2146 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2147 for more builtins and argument positions.
2148
29c5d9ce
GA
21492020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2150
2151 PR objc/97854
2152 * stub-objc.c: Include c-common.h to declare enum rid.
2153
77f67db2
GA
21542020-11-13 Jakub Jelinek <jakub@redhat.com>
2155
2156 PR c++/63287
2157 * c-cppbuiltin.c: Include configargs.h.
2158 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2159 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2160 "single".
2161
21622020-11-13 Gergö Barany <gergo@codesourcery.com>
2163 Thomas Schwinge <thomas@codesourcery.com>
2164
2165 * c.opt (fopenacc-kernels): Add.
2166
21672020-11-13 Jason Merrill <jason@redhat.com>
2168
2169 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2170
21712020-11-13 Piotr H. Dabrowski <phd@phd.re>
2172
2173 PR c++/91318
2174 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2175
21762020-11-13 Martin Liska <mliska@suse.cz>
2177
2178 * c-attribs.c (build_attr_access_from_parms): Format properly.
2179
21802020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2181
2182 PR objc/90707
2183 * c-common.c (c_common_reswords): null_unspecified, nullable,
2184 nonnull, null_resettable: New keywords.
2185 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2186 RID_NONNULL, RID_NULL_RESETTABLE: New.
2187 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2188 ranges accepted for property attributes.
2189 * c-attribs.c (handle_objc_nullability_attribute): New.
2190 * c-objc.h (enum objc_property_attribute_group): Add
2191 OBJC_PROPATTR_GROUP_NULLABLE.
2192 (enum objc_property_attribute_kind):Add
2193 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2194 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2195
21962020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2197
2198 PR objc/77404
2199 * c-attribs.c (handle_objc_root_class_attribute): New
2200 * c-objc.h (objc_start_class_interface): Add a location
2201 value for the position of the class name.
2202 * c.opt: Add Wobjc-root-class.
2203 * stub-objc.c (objc_start_class_interface): Add a location
2204 value for the position of the class name.
2205
a5a11525
GA
22062020-11-12 Joseph Myers <joseph@codesourcery.com>
2207
2208 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2209 Allow scope for C. Handle standard attributes for C. Do not
2210 accept unscoped attributes if std_syntax and not handled as
2211 standard attributes.
2212 * c-common.h (c_common_has_attribute): Update prototype.
2213
22142020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2215
2216 PR pch/86674
2217 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2218 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2219
0f5f9ed5
GA
22202020-11-11 Patrick Palka <ppalka@redhat.com>
2221
2222 PR c++/88115
2223 * c-opts.c (c_common_post_options): Update latest_abi_version.
2224
bb622641
GA
22252020-11-10 Jakub Jelinek <jakub@redhat.com>
2226
2227 PR c/97748
2228 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2229 to false.
2230 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2231 recursively and just return true instead of warning if it is true.
2232 Handle COMPLEX_EXPR.
2233
22342020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2235
2236 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2237 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2238 (c_omp_adjust_map_clauses): New function.
2239
2bee28dd
GA
22402020-11-09 Marek Polacek <polacek@redhat.com>
2241
2242 DR 1914
2243 * c-common.c (attribute_fallthrough_p): Tweak the warning
2244 message.
2245
22462020-11-09 Patrick Palka <ppalka@redhat.com>
2247
2248 * c-pragma.c (handle_pragma_diagnostic): Split the
2249 unknown-option -Wpragmas diagnostic into a warning and a
2250 subsequent note containing a spelling suggestion. Avoid
2251 computing the suggestion if -Wpragmas warnings are being
2252 suppressed.
2253
22542020-11-09 Patrick Palka <ppalka@redhat.com>
2255
2256 PR testsuite/97117
2257 * c-indentation.c (get_visual_column): Remove location_t
2258 parameter. Move the column-tracking diagnostic code from here
2259 to ...
2260 (should_warn_for_misleading_indentation): ... here, before the
2261 early exit for when the loci are not all distinct. Don't pass a
2262 location_t argument to get_visual_column.
2263 (assert_get_visual_column_succeeds): Don't pass a location_t
2264 argument to get_visual_column.
2265 (assert_get_visual_column_fails): Likewise.
2266
fb95de7a
GA
22672020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2268
2269 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2270 of keywords accepted in @property attribute contexts.
2271 * c-objc.h (enum objc_property_attribute_group): Add
2272 OBJC_PROPATTR_GROUP_CLASS.
2273 (enum objc_property_attribute_kind): Add
2274 OBJC_PROPERTY_ATTR_CLASS.
2275
2da7ee05
GA
22762020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2277
2278 * c-common.c (c_common_reswords): Add 'atomic' property
2279 attribute.
2280 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2281 property attributes.
2282
22832020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2284
2285 * c-attribs.c (handle_nsobject_attribute): New.
2286 * c.opt: Add WNSObject-attribute.
2287
44cab2d8
GA
22882020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2289
2290 * c-objc.h (enum objc_property_attribute_group): New
2291 (enum objc_property_attribute_kind): New.
2292 (OBJC_PROPATTR_GROUP_MASK): New.
2293 (struct property_attribute_info): Small class encapsulating
2294 parser output from property attributes.
2295 (objc_prop_attr_kind_for_rid): New
2296 (objc_add_property_declaration): Simplify interface.
2297 * stub-objc.c (enum rid): Dummy type.
2298 (objc_add_property_declaration): Simplify interface.
2299 (objc_prop_attr_kind_for_rid): New.
2300
23012020-11-06 Nathan Sidwell <nathan@acm.org>
2302
2303 * c-ada-spec.c (collect_ada_nodes): Rename
2304 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2305 (collect_ada_node): Likewise.
2306 (dump_forward_type): Likewise.
2307 * c-common.c (set_underlying_type): Rename
2308 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2309 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2310
23112020-11-06 Jakub Jelinek <jakub@redhat.com>
2312
2313 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2314
0cfd9109
GA
23152020-11-05 Marek Polacek <polacek@redhat.com>
2316
2317 PR c++/97675
2318 * c.opt (Wexceptions): New option.
2319
23202020-11-05 Marek Polacek <polacek@redhat.com>
2321
2322 PR c++/25814
2323 * c.opt (Wvexing-parse): New option.
2324
35c125cb
GA
23252020-11-04 Jakub Jelinek <jakub@redhat.com>
2326
2327 PR c++/97670
2328 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2329 underlying decl to clear in the allocate_head bitmap.
2330
23312020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2332
2333 * c-objc.h (objc_non_constant_expr_p): New.
2334 * stub-objc.c (objc_non_constant_expr_p): New.
2335
fd2325ea
GA
23362020-11-03 Nathan Sidwell <nathan@acm.org>
2337
2338 * c.opt (MQ,MT): Reword description to be make-agnostic.
2339
88ce3d5f
GA
23402020-11-02 Nathan Sidwell <nathan@acm.org>
2341
2342 * c-opts.c (c_common_post_options): Move var decl to its
2343 initialization point.
2344
23452020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2346
2347 * c-lex.c (c_lex_with_flags): When combining '@' with a
2348 keyword for Objective-C, combine the location ranges too.
2349
23502020-10-30 Qing Zhao <qing.zhao@oracle.com>
2351 H.J.Lu <hjl.tools@gmail.com>
2352
2353 * c-attribs.c (c_common_attribute_table): Add new attribute
2354 zero_call_used_regs.
2355 (handle_zero_call_used_regs_attribute): New function.
2356
e93aae4a
GA
23572020-10-28 Marek Polacek <polacek@redhat.com>
2358
2359 PR c++/97573
2360 * c-opts.c (c_common_post_options): In C++20, turn on
2361 -Wdeprecated-enum-enum-conversion and
2362 -Wdeprecated-enum-float-conversion.
2363 * c.opt (Wdeprecated-enum-enum-conversion,
2364 Wdeprecated-enum-float-conversion): New options.
2365 (Wenum-conversion): Allow for C++ too.
2366
23672020-10-28 Jakub Jelinek <jakub@redhat.com>
2368
2369 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2370 * c-omp.c: Include bitmap.h.
2371 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2372
f19e7c8d
GA
23732020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2374
2375 * c-common.c (__is_nothrow_assignable): New.
2376 (__is_nothrow_constructible): Likewise.
2377 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2378 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2379
efe71fcc
GA
23802020-10-23 Jan Hubicka <hubicka@ucw.cz>
2381
2382 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2383
23842020-10-23 Marek Polacek <polacek@redhat.com>
2385
2386 PR c++/91741
2387 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2388 (c_common_init_ts): Likewise.
2389 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2390 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2391 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2392 (maybe_warn_sizeof_array_div): New function.
2393 * c.opt (Wsizeof-array-div): New option.
2394
23952020-10-23 Martin Sebor <msebor@redhat.com>
2396
2397 PR c/97463
2398 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2399
56ddd5e2
GA
24002020-10-22 Martin Liska <mliska@suse.cz>
2401
2402 PR c/94722
2403 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2404 (handle_stack_protect_attribute): Add error message for a
2405 no_stack_protector function.
2406
24072020-10-22 Martin Liska <mliska@suse.cz>
2408
2409 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2410
24112020-10-22 Jan Hubicka <hubicka@ucw.cz>
2412
2413 * c-gimplify.c: Include tree-nested.h
2414 (c_genericize): Update for new nested function info.
2415
b2698c21
GA
24162020-10-14 Martin Sebor <msebor@redhat.com>
2417
2418 PR c/97413
2419 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2420 bounds in an extra list.
2421
7e9282ae
GA
24222020-10-05 Richard Biener <rguenther@suse.de>
2423 Jakub Jelinek <jakub@redhat.com>
2424
2425 PR c++/97197
2426 * c-pretty-print.c: Include langhooks.h.
2427 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2428 expression.
2429 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2430 unary_expression.
2431 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2432
660bfe61
GA
24332020-09-30 Martin Sebor <msebor@redhat.com>
2434
2435 PR middle-end/97189
2436 * c-attribs.c (append_access_attr): Use the function declaration
2437 location for a warning about an attribute access argument.
2438
93bca37c
GA
24392020-09-29 Marek Polacek <polacek@redhat.com>
2440
2441 PR c++/94695
2442 * c.opt (Wrange-loop-construct): New option.
2443
82b77dee
GA
24442020-09-23 Martin Sebor <msebor@redhat.com>
2445
2446 PR c/97131
2447 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2448
24492020-09-23 Marek Polacek <polacek@redhat.com>
2450
2451 PR c/97125
2452 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2453 after loops and other structured control constructs have been lowered.
2454
521d2711
GA
24552020-09-22 Jakub Jelinek <jakub@redhat.com>
2456
2457 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2458 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2459
44135373
GA
24602020-09-21 Marek Polacek <polacek@redhat.com>
2461
2462 * c.opt (Wctad-maybe-unsupported): New option.
2463
2fe5b7d1
GA
24642020-09-19 Martin Sebor <msebor@redhat.com>
2465
2466 PR c/50584
2467 * c-common.h (warn_parm_array_mismatch): Declare new function.
2468 (has_attribute): Move declaration of an existing function.
2469 (build_attr_access_from_parms): Declare new function.
2470 * c-warn.c (parm_array_as_string): Define new function.
2471 (plus_one): Define new function.
2472 (warn_parm_ptrarray_mismatch): Define new function.
2473 (warn_parm_array_mismatch): Define new function.
2474 (vla_bound_parm_decl): New function.
2475 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2476 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2477 qualifiers here...
2478 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2479 them in brackets here. Also print [static]. Strip extraneous
2480 expressions from VLA bounds.
2481
24822020-09-19 Martin Sebor <msebor@redhat.com>
2483
2484 PR c/50584
2485 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2486 (handle_argspec_attribute): New function.
2487 (get_argument, get_argument_type): New functions.
2488 (append_access_attrs): Add overload. Handle internal attribute
2489 representation in addition to external.
2490 (handle_access_attribute): Handle internal attribute representation
2491 in addition to external.
2492 (build_attr_access_from_parms): New function.
2493
24942020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2495
2496 * c-gimplify.c (genericize_c_loop): Rewrite to match
2497 c_finish_loop in c-typeck.c.
2498
24992020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2500
2501 * c-common.c (c_block_may_fallthrough): New, split from
2502 cxx_block_may_fallthrough in the cp front end.
2503 (c_common_init_ts): Move handling of loop and switch-related
2504 statements here from the cp front end.
2505 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2506 cp front end.
2507 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2508 * c-common.h (c_block_may_fallthru): Declare.
2509 (bc_state_t): Move here from cp front end.
2510 (save_bc_state, restore_bc_state): Declare.
2511 (c_genericize_control_stmt): Declare.
2512 (WHILE_COND, WHILE_BODY): Likewise.
2513 (DO_COND, DO_BODY): Likewise.
2514 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2515 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2516 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2517 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2518 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2519 * c-dump.c (dump_stmt): Copy from cp front end.
2520 (c_dump_tree): Move code to handle structured loop and switch
2521 tree nodes here from cp front end.
2522 * c-gimplify.c: Adjust includes.
2523 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2524 cp front end.
2525 (save_bc_state, restore_bc_state): New functions using old code
2526 from cp front end.
2527 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2528 (genericize_c_loop): Move from cp front end.
2529 (genericize_for_stmt, genericize_while_stmt): Likewise.
2530 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2531 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2532 (genericize_omp_for_stmt): Likewise.
2533 (c_genericize_control_stmt): New function using code split from
2534 cp front end.
2535 (c_genericize_control_r): New.
2536 (c_genericize): Call walk_tree with c_genericize_control_r.
2537 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2538 structured loop and switch tree nodes here from cp front end.
2539
2aad20c0
GA
25402020-09-17 Patrick Palka <ppalka@redhat.com>
2541
2542 PR c/80076
2543 * c-indentation.c (should_warn_for_misleading_indentation): Move
2544 declarations of local variables closer to their first use.
2545 Handle virtual token locations by resolving them to their
2546 respective macro expansion points. If all three tokens are
2547 produced from the same macro expansion, then instead use their
2548 loci within the macro definition.
2549
ecde1b0a
GA
25502020-09-16 Martin Sebor <msebor@redhat.com>
2551
2552 PR c/78666
2553 PR c/96126
2554 * c-attribs.c (validate_attr_args): New function.
2555 (validate_attr_arg): Same.
2556 (handle_section_attribute): Call it. Introduce a local variable.
2557 (handle_alloc_size_attribute): Same.
2558 (handle_alloc_align_attribute): Same.
2559
50a71cd0
GA
25602020-09-14 Jakub Jelinek <jakub@redhat.com>
2561
2562 * c-attribs.c (handle_optimize_attribute): Adjust
2563 cl_optimization_save, cl_optimization_restore and
2564 build_optimization_node callers.
2565 * c-pragma.c (handle_pragma_optimize): Adjust
2566 build_optimization_node caller.
2567 (handle_pragma_push_options): Adjust
2568 build_optimization_node and build_target_option_node callers.
2569 (handle_pragma_pop_options, handle_pragma_reset_options):
2570 Adjust cl_optimization_restore callers.
2571
8f7ea26a
GA
25722020-08-28 Martin Sebor <msebor@redhat.com>
2573
2574 * c.opt (Wstringop-overread): New option.
2575
a6493809
GA
25762020-08-11 Jakub Jelinek <jakub@redhat.com>
2577
2578 PR c/96545
2579 * c-common.c (get_atomic_generic_size): Require that first argument's
2580 type points to a complete type and use tree_fits_uhwi_p instead of
2581 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2582
48cc2e46
GA
25832020-07-31 Martin Sebor <msebor@redhat.com>
2584
2585 PR c++/96003
2586 * c-common.c (check_function_arguments_recurse): Return early when
2587 no-warning bit is set.
2588
25892020-07-31 Richard Biener <rguenther@suse.de>
2590
2591 PR debug/96383
2592 * c-common.h (c_common_finalize_early_debug): Declare.
2593 * c-common.c: Include debug.h.
2594 (c_common_finalize_early_debug): finalize_early_debug langhook
2595 implementation generating debug for extern declarations.
2596
e71dab87
GA
25972020-07-27 Nathan Sidwell <nathan@acm.org>
2598
2599 * c-common.c (try_to_locate_new_include_insertion_point): Use
2600 strcmp, not pointer equality.
2601
ae2e0bc1
GA
26022020-07-25 Martin Sebor <msebor@redhat.com>
2603
2604 PR c++/96310
2605 * c-common.c (check_nonnull_arg): Print note only when warning was
2606 issued.
2607
3ea9abca
GA
26082020-07-22 Tobias Burnus <tobias@codesourcery.com>
2609
2610 * c-omp.c (c_finish_omp_critical): Check for no name but
2611 nonzero hint provided.
2612
0933f508
GA
26132020-07-20 Jason Merrill <jason@redhat.com>
2614
2615 * c-cppbuiltin.c (c_cpp_builtins): Update
2616 __cpp_nontype_template_args for C++20.
2617
26182020-07-20 Martin Sebor <msebor@redhat.com>
2619
2620 PR c/96249
2621 * c.opt: Remove stray text.
2622
8ca07a30
GA
26232020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2624
2625 PR other/86904
2626 * c-indentation.c (should_warn_for_misleading_indentation): Get
2627 global tabstop from the new source.
2628 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2629 is now a common option.
2630 * c.opt: Likewise.
2631
a82c4c4c 26322020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2633
2634 * c.opt (Wscalar-storage-order): Add explicit variable.
2635
f60ee68d
GA
26362020-07-07 Nathan Sidwell <nathan@acm.org>
2637
2638 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2639 cpp_read_main_file.
2640 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2641 maps. Force token position to line_table's highest line.
2642 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2643 (cb_define): Always increment source line.
2644
4077d74c
GA
26452020-07-06 Martin Sebor <msebor@redhat.com>
2646
2647 PR c++/95984
2648 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2649 to stub lambda objects with null this pointer.
2650 (check_nonnull_arg): Handle C++ nullptr.
2651
b5f24739
GA
26522020-07-02 Jason Merrill <jason@redhat.com>
2653 Jakub Jelinek <jakub@redhat.com>
2654
2655 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2656
46fbb6c6
GA
26572020-06-30 Jakub Jelinek <jakub@redhat.com>
2658
2659 PR c++/95963
2660 * c-common.c (check_function_arguments_recurse): Don't crash on
2661 calls to internal functions.
2662
69273534
GA
26632020-06-28 Martin Sebor <msebor@redhat.com>
2664
2665 PR c++/86568
2666 * c-common.c (struct nonnull_arg_ctx): Add members.
2667 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2668 C++ member functions specially. Consider the this pointer implicitly
2669 nonnull.
2670 (check_nonnull_arg): Use location of argument when available.
2671 (check_function_arguments): Use nonnull_arg_ctx as argument.
2672
9a33c41f
GA
26732020-06-27 Jakub Jelinek <jakub@redhat.com>
2674
2675 PR middle-end/95903
2676 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2677 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2678 smaller precision intop operands separately.
2679
c9c05f73
GA
26802020-06-26 Marek Polacek <polacek@redhat.com>
2681
2682 * c-opts.c (c_common_init_options): Default to gnu++17.
2683
aff95ee7
GA
26842020-06-17 Jonathan Wakely <jwakely@redhat.com>
2685
bd0a89dc 2686 PR c/95378
aff95ee7
GA
2687 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2688 pointer arguments.
2689
56638b9b
GA
26902020-06-16 Jakub Jelinek <jakub@redhat.com>
2691
2692 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2693 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2694 idx members.
2695 (c_omp_is_loop_iterator): New function.
2696 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2697 if outer loop iterator is present. Perform duplicate checking through
2698 hash_set in the function rather than expecting caller to do that.
2699 Pass NULL instead of d->ppset to walk_tree_1.
2700 (c_omp_check_nonrect_loop_iv): New function.
2701 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2702 non-rectangular loop forms, diagnose multiple associated loops with
2703 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2704 (c_omp_check_loop_iv_exprs): Likewise.
2705
ec6ffbb9
GA
27062020-06-10 Martin Liska <mliska@suse.cz>
2707
2708 PR tree-optimization/92860
2709 * c-attribs.c (handle_optimize_attribute):
2710 Save global options and compare it after parsing of function
2711 attribute.
2712 * c-pragma.c (opt_stack::saved_global_options): New field.
2713 (handle_pragma_push_options): Save global_options.
2714 (handle_pragma_pop_options): Compare them after pop.
2715
b952c2cf
GA
27162020-06-09 Jakub Jelinek <jakub@redhat.com>
2717
2718 PR c/95580
2719 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2720 case when MEM_REF's first argument has type pointer to incomplete type.
2721
1a59f3db
GA
27222020-06-05 Jason Merrill <jason@redhat.com>
2723
2724 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2725 operand to POINTER_PLUS_EXPR.
2726
3add3425
GA
27272020-06-04 Martin Sebor <msebor@redhat.com>
2728
2729 PR middle-end/10138
2730 PR middle-end/95136
2731 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2732 (handle_access_attribute): Same.
2733
9a5b7438
GA
27342020-06-03 Mark Wielaard <mark@klomp.org>
2735
2736 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2737 New function.
2738 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2739 New function declaration.
2740
27412020-06-03 Mark Wielaard <mark@klomp.org>
2742
2743 * known-headers.cc (get_string_macro_hint): New function.
2744 (get_stdlib_header_for_name): Use get_string_macro_hint.
2745 (get_c_stdlib_header_for_string_macro_name): New function.
2746 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2747 New function declaration.
2748
27492020-06-03 Tobias Burnus <tobias@codesourcery.com>
2750
2751 * c-common.h (c_omp_predetermined_mapping): Declare.
2752 * c-omp.c (c_omp_predetermined_mapping): New.
2753
af114c38
MW
27542020-05-22 Mark Wielaard <mark@klomp.org>
2755
2756 * known-headers.cc (get_stdlib_header_for_name): Add a new
2757 stdlib_hint array for stdbool and stdint.
2758
45c50b6a
MW
27592020-05-22 Mark Wielaard <mark@klomp.org>
2760
2761 * known-headers.cc (get_stdlib_header_for_name): Return
2762 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2763 flag_isoc99.
2764
c22027a0
NS
27652020-05-20 Nathan Sidwell <nathan@acm.org>
2766
38a4db21
NS
2767 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2768
c22027a0
NS
2769 * c-common.c (try_to_locate_new_include_insertion_point): Use
2770 strcmp to compare filenames.
2771 * c-lex.c (init_c_lex): Move declaration to initialization.
2772 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2773 deferred count loop.
2774
29f0e90d
JM
27752020-05-15 Jason Merrill <jason@redhat.com>
2776
2777 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2778
b04445d4
JM
27792020-05-13 Jason Merrill <jason@redhat.com>
2780
2781 * c.opt (std=c++20): Make c++2a the alias.
2782 (std=gnu++20): Likewise.
2783 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2784 * c-opts.c: Adjust.
2785 * c-cppbuiltin.c: Adjust.
2786 * c-ubsan.c: Adjust.
2787 * c-warn.c: Adjust.
2788
11dd3be5
EB
27892020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2790
2791 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2792
b224c376
NS
27932020-05-08 Nathan Sidwell <nathan@acm.org>
2794
2795 Reimplement directives only processing.
2796 * c-ppoutput.c (token_streamer): Ne.
2797 (directives_only_cb): New. Swallow ...
2798 (print_lines_directives_only): ... this.
2799 (scan_translation_unit_directives_only): Reimplment using the
2800 published interface.
2801
f1d94677
MP
28022020-05-07 Marek Polacek <polacek@redhat.com>
2803
2804 * c-format.c (badwords): Add "nonstatic".
2805
9b95bb52
JJ
2806202-05-07 Jakub Jelinek <jakub@redhat.com>
2807
2808 PR c/94968
2809 * c-common.c (speculation_safe_value_resolve_params): Return false if
2810 error_operand_p (val2).
2811 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2812 Remove extraneous semicolon.
2813
530b4409 28142020-05-06 qing zhao <qing.zhao@oracle.com>
2815
2816 PR c/94230
2817 * c-indentation.c (get_visual_column): Add a hint to use the new
2818 -flarge-source-files option.
2819
b776bdca
SSF
28202020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2821
2822 * c-attribs.c (handle_vector_size_attribute): Add attribute
2823 nonnull for argument args in order to silence warning of
2824 uninitialized variable usage. Since this is local to the
2825 compilation unit and thus cannot be checked at call sides by the
2826 compiler, added an assert statement in order to verify this.
2827
6607bdd9
L
28282020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2829
2830 PR target/93492
2831 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2832 value to USHRT_MAX (65535).
2833
691eeb65
JJ
28342020-04-29 Jakub Jelinek <jakub@redhat.com>
2835
2836 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2837
26d76be7
JJ
28382020-04-27 Jakub Jelinek <jakub@redhat.com>
2839
2840 PR c/94755
2841 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2842 fncode == BUILT_IN_NONE before initialization of first_param.
2843
7291b2ed
MP
28442020-04-23 Marek Polacek <polacek@redhat.com>
2845
2846 PR c++/94733
2847 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2848 TREE_PURPOSE.
2849
58a29af8
PP
28502020-04-14 Patrick Palka <ppalka@redhat.com>
2851
2852 PR c++/85278
2853 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2854 ampersand if it's an rvalue reference type.
2855
09f04139
MS
28562020-04-13 Martin Sebor <msebor@redhat.com>
2857
2858 PR c/92326
2859 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2860 printing array bound for flexible array members.
2861
ee26baf4
IS
28622020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2863
2864 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2865 define, per n4861.
2866
75efe9cb
RB
28672020-04-02 Richard Biener <rguenther@suse.de>
2868
2869 PR c/94392
2870 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2871 for -O2 and C++11 or newer.
2872
75defde9
PP
28732020-03-28 Patrick Palka <ppalka@redhat.com>
2874
2875 * c.opt: Add -fconcepts-diagnostics-depth.
2876
52f24a9e
MS
28772020-03-27 Martin Sebor <msebor@redhat.com>
2878
2879 PR c++/94346
2880 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2881 to decl_attributes. Make handling of different kinds of entities
2882 more robust.
2883
ccacf77b
MS
28842020-03-27 Martin Sebor <msebor@redhat.com>
2885
2886 PR c++/94098
2887 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2888 here.
2889
ca6c7225
JJ
28902020-03-23 Jakub Jelinek <jakub@redhat.com>
2891
2892 PR c++/91993
2893 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2894 result being COMPOUND_EXPRs, skip to ultimate rhs.
2895
1aa22b19
RS
28962020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2897
2898 PR middle-end/94072
2899 * c-common.c (c_common_type_for_mode): Before using a registered
2900 built-in type, check that the vectorness of the type matches
2901 the vectorness of the mode.
2902
700d4cb0
JJ
29032020-03-17 Jakub Jelinek <jakub@redhat.com>
2904
2905 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2906 issue in a diagnostic message.
2907
b408e010
LH
29082020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2909
2910 * c.opt: Avoid redundancy in the help text.
2911
e78e50d5
MP
29122020-03-02 Marek Polacek <polacek@redhat.com>
2913
2914 PR c++/93958 - add missing -std=gnu++20.
2915 * c.opt: Add -std=gnu++20.
2916
649e1741
MS
29172020-03-01 Martin Sebor <msebor@redhat.com>
2918
2919 PR c++/92721
2920 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2921 (handle_access_attribute): Same.
2922
7b60f3ba
JJ
29232020-02-25 Jakub Jelinek <jakub@redhat.com>
2924
2925 PR c/93858
2926 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2927 "did you mean" hint in diagnostics.
2928
fb260504
JM
29292020-02-15 Jason Merrill <jason@redhat.com>
2930
2931 * c.opt: Add -std=c++20.
2932
1d757b09
EB
29332020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2934
2935 * c-ada-spec.c: Include bitmap.h.
2936 (dump_ada_double_name): Rename into...
2937 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2938 (dump_ada_array_type): Adjust to above renaming. Robustify.
2939 (dump_nested_types_1): New function copied from... Add dumped_types
2940 parameter and pass it down to dump_nested_type.
2941 (dump_nested_types): ...this. Remove parent parameter. Just call
2942 dump_nested_types_1 on an automatic bitmap.
2943 (dump_nested_type): Add dumped_types parameter.
2944 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2945 Adjust recursive calls and adjust to above renaming.
2946 (dump_ada_declaration): Adjust call to dump_nested_types.
2947 Tidy up and adjust to above renaming.
2948 (dump_ada_specs): Initialize and release bitmap obstack.
2949
0cc575e4
MS
29502020-02-10 Martin Sebor <msebor@redhat.com>
2951
2952 PR c/93640
2953 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2954
a59aa302
JJ
29552020-02-10 Jakub Jelinek <jakub@redhat.com>
2956
2957 PR other/93641
2958 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2959 Remove useless extra test.
2960
e464fc90
TB
29612020-02-03 Julian Brown <julian@codesourcery.com>
2962 Tobias Burnus <tobias@codesourcery.com>
2963
2964 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2965
e3b6c052
JM
29662020-01-29 Jason Merrill <jason@redhat.com>
2967
2968 PR c++/89357
2969 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2970
6d00f052
JM
29712020-01-23 Jason Merrill <jason@redhat.com>
2972
2973 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2974
8a990ffa
MS
29752020-01-23 Martin Sebor <msebor@redhat.com>
2976
2977 PR c/84919
2978 * c-common.c (check_function_arguments): Avoid overlap checking
2979 of sprintf functions.
2980
55b7df8b
JM
29812020-01-22 Jason Merrill <jason@redhat.com>
2982
2983 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2984 PR c++/40752
2985 * c-warn.c (conversion_warning): Check operands only after checking
2986 the whole expression. Don't check second operand of + for sign.
2987
c77074d0
JM
29882020-01-21 Jason Merrill <jason@redhat.com>
2989 Manuel López-Ibáñez <manu@gcc.gnu.org>
2990
2991 PR c++/40752 - useless -Wconversion with short +=.
2992 * c.opt (-Warith-conversion): New.
2993 * c-warn.c (conversion_warning): Recurse for operands of
2994 operators. Only warn about the whole expression with
2995 -Warith-conversion.
2996
731dbfc3
JM
29972020-01-21 Jason Merrill <jason@redhat.com>
2998
2999 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3000 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3001
ad1a3914
NS
30022020-01-20 Nathan Sidwell <nathan@acm.org>
3003
3004 PR preprocessor/80005
3005 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3006
49789fd0
IS
30072020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3008
3009 * c-common.c (co_await, co_yield, co_return): New.
3010 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3011 RID_CO_RETURN): New enumeration values.
3012 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3013 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3014 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3015 * c.opt (fcoroutines): New command-line switch.
3016
4bc1899b
DM
30172020-01-10 David Malcolm <dmalcolm@redhat.com>
3018
3019 * c-format.c (local_event_ptr_node): New.
3020 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3021 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3022 * c-format.h (T_EVENT_PTR): New define.
3023
f25e33fa
MS
30242020-01-10 Martin Sebor <msebor@redhat.com>
3025
3026 PR c/93132
3027 * c-attribs.c (append_access_attrs): Validate against the translated
3028 access string rather than the human-readable representation.
3029
8d9254fc
JJ
30302020-01-01 Jakub Jelinek <jakub@redhat.com>
3031
3032 Update copyright years.
3033
39292e25
EB
30342019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3035
3036 * c-ada-spec.h (decl_sloc): Delete.
3037 * c-ada-spec.c (decl_sloc): Make static.
3038
519d7496
JB
30392019-12-19 Julian Brown <julian@codesourcery.com>
3040
3041 * c-common.h (c_omp_map_clause_name): Add prototype.
3042 * c-omp.c (c_omp_map_clause_name): New function.
3043 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3044 PRAGMA_OACC_CLAUSE_DETACH.
3045
a6163563
JB
30462019-12-19 Julian Brown <julian@codesourcery.com>
3047 Maciej W. Rozycki <macro@codesourcery.com>
3048 Tobias Burnus <tobias@codesourcery.com>
3049 Thomas Schwinge <thomas@codesourcery.com>
3050
3051 * c-pragma.h (pragma_omp_clause): Add
3052 PRAGMA_OACC_CLAUSE_NO_CREATE.
3053
e8f1ade2
MS
30542019-12-17 Martin Sebor <msebor@redhat.com>
3055
3056 PR c++/61339
3057 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3058
368877a1
DM
30592019-12-11 David Malcolm <dmalcolm@redhat.com>
3060
3061 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3062 implementation.
3063 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3064
d68f5d45
DM
30652019-12-09 David Malcolm <dmalcolm@redhat.com>
3066
3067 * c-format.c (range_label_for_format_type_mismatch::get_text):
3068 Replace label_text ctor called with true with label_text::take.
3069
d3e28653
DM
30702019-12-09 David Malcolm <dmalcolm@redhat.com>
3071
3072 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3073 initial newline from expected outputs.
3074 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3075 call to diagnostic_show_locus.
3076
abd6d8cc
JJ
30772019-12-06 Jakub Jelinek <jakub@redhat.com>
3078
3079 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3080 now.
3081
7906797e
MP
30822019-12-05 Marek Polacek <polacek@redhat.com>
3083 Jakub Jelinek <jakub@redhat.com>
3084
3085 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3086 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3087
5c04da88
MP
30882019-12-05 Marek Polacek <polacek@redhat.com>
3089
3090 PR c++/92271 - make __is_same alias for __is_same_as.
3091 * c-common.c: Add __is_same, an alias for __is_same_as.
3092
43aae289
MP
30932019-12-03 Marek Polacek <polacek@redhat.com>
3094
3095 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3096 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3097 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3098
d7ddfbcb
JH
30992019-11-30 Jan Hubicka <hubicka@ucw.cz>
3100
3101 * c-attribs.c (handle_symver_attribute): New function
3102 (c_common_attributes): Add symver.
3103
65ef05d0
RS
31042019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3105
3106 * c-common.c (pointer_int_sum): Use verify_type_context to check
3107 whether the target allows pointer arithmetic for the types involved.
3108 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3109 to check whether the target allows sizeof and alignof operations
3110 for the types involved.
3111
1a291106
JM
31122019-11-27 Jason Merrill <jason@redhat.com>
3113
3114 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3115
05d6cb1a
JJ
31162019-11-26 Jakub Jelinek <jakub@redhat.com>
3117
3118 PR c++/61414
3119 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3120 ENUMERAL_TYPEs.
3121
5b8d9367
JM
31222019-11-25 Joseph Myers <joseph@codesourcery.com>
3123
3124 PR c/91985
3125 * c-common.c (c_common_type_for_mode): Handle decimal
3126 floating-point types being NULL_TREE.
3127 * c-format.c (get_format_for_type_1): Handle specified types being
3128 NULL_TREE.
3129 * c-lex.c (interpret_float): Give an error for decimal
3130 floating-point constants when decimal floating-point not
3131 supported.
3132
1fbf51cb
JJ
31332019-11-23 Jakub Jelinek <jakub@redhat.com>
3134
3135 PR middle-end/83859
3136 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3137 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3138 group warning with inform together.
3139 (handle_access_attribute): Formatting fix.
3140
761df906
JJ
31412019-11-22 Jakub Jelinek <jakub@redhat.com>
3142
bdaf8be1
JJ
3143 PR c/90677
3144 * c-common.h (identifier_global_tag): Declare.
3145 * c-format.c (get_pointer_to_named_type): Renamed to ...
3146 (get_named_type): ... this. Use identifier_global_tag instead of
3147 identifier_global_value, handle the return value being a TYPE_P.
3148 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3149 to call get_named_type instead. Formatting fixes.
3150
c2ecce6d 3151 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3152 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3153 and __cpp_generic_lambdas for -std=c++2a. Define
3154 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3155 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3156 __cpp_concepts for -std=c++2a.
3157
54aa6b58
MS
31582019-11-22 Martin Sebor <msebor@redhat.com>
3159
3160 PR middle-end/83859
3161 * c-attribs.c (handle_access_attribute): New function.
3162 (c_common_attribute_table): Add new attribute.
3163 (get_argument_type): New function.
3164 (append_access_attrs): New function.
3165 (get_nonnull_operand): Rename...
3166 (get_attribute_operand): ...to this.
3167 * c-common.c (get_nonnull_operand): Rename...
3168 (get_attribute_operand): ...to this.
3169
6c80b1b5
JM
31702019-11-21 Joseph Myers <joseph@codesourcery.com>
3171
3172 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3173 of warning.
3174
192961ff
JM
31752019-11-19 Joseph Myers <joseph@codesourcery.com>
3176
3177 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3178 warning for standard attributes mixed with fallthrough attributes.
3179
f8aea5e3
JM
31802019-11-15 Joseph Myers <joseph@codesourcery.com>
3181
3182 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3183 * c-common.h (handle_fallthrough_attribute): Declare.
3184
2cc94aa8
JM
31852019-11-15 Joseph Myers <joseph@codesourcery.com>
3186
3187 * c-attribs.c (handle_deprecated_attribute): Remove static.
3188 * c-common.h (handle_deprecated_attribute): Declare.
3189
7c5890cc
JM
31902019-11-14 Joseph Myers <joseph@codesourcery.com>
3191
3192 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3193 char for C.
3194
b2417b59
JJ
31952019-11-14 Jakub Jelinek <jakub@redhat.com>
3196
d0ec7c93
JJ
3197 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3198 valid vendors.
3199
b2417b59
JJ
3200 * c-omp.c (c_omp_check_context_selector): Handle name lists
3201 containing string literals. Don't diagnose atomic_default_mem_order
3202 with multiple props.
3203
00be2a5f
JM
32042019-11-13 Joseph Myers <joseph@codesourcery.com>
3205
3206 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3207 NORM_MAX constants. Update call to get_max_float.
3208 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3209 constants.
3210
2dbad62d
EB
32112019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3212
3213 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3214 (dump_forward_type): Do not generate a declaration for function types.
3215 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3216 of the component type if it is declared in another file.
3217
6ed76044
ML
32182019-11-12 Martin Liska <mliska@suse.cz>
3219
3220 * c-opts.c (c_common_post_options):
3221 Use SET_OPTION_IF_UNSET.
3222
62aee289
MR
32232019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3224 Frederik Harwath <frederik@codesourcery.com>
3225
3226 gcc/c-family/
3227 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3228 constant.
3229 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3230
f486280c
RS
32312019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3232
3233 * c-common.h (gnu_vector_type_p): New function.
3234 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3235 vectors to satisfy gnu_vector_type_p.
3236 (c_build_vec_convert): Likewise __builtin_convertvector.
3237 (convert_vector_to_array_for_subscript): Likewise when applying
3238 implicit vector to array conversion.
3239 (scalar_to_vector): Likewise when converting vector-scalar
3240 operations to vector-vector operations.
3241
017c6491
JM
32422019-11-08 Joseph Myers <joseph@codesourcery.com>
3243
3244 * c.opt (Wold-style-definition): Initialize to -1.
3245 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3246 to flag_isoc2x if not set explicitly.
3247
c01bd174
JM
32482019-11-07 Joseph Myers <joseph@codesourcery.com>
3249
3250 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3251
0df65305
JM
32522019-11-05 Jason Merrill <jason@redhat.com>
3253
3254 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3255 -fconcepts.
3256
e0c866dd
KK
32572019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3258
3259 * c-opts.c (c_common_post_options): Update
3260 latest_abi_version.
3261
f968ef9b
JJ
32622019-11-02 Jakub Jelinek <jakub@redhat.com>
3263
d0c464d2
JJ
3264 * c-common.h (c_omp_get_context_selector): Remove.
3265 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3266 and renamed to omp_get_context_selector.
3267
917dd789
JJ
3268 * c-omp.c (c_omp_mark_declare_variant): Use
3269 omp_context_selector_set_compare.
3270
f968ef9b
JJ
3271 PR c++/88335 - Implement P1073R3: Immediate functions
3272 * c-common.h (enum rid): Add RID_CONSTEVAL.
3273 * c-common.c (c_common_reswords): Add consteval.
3274
5f6705b7
JJ
32752019-11-01 Martin Sebor <msebor@redhat.com>
3276
3277 PR middle-end/91679
3278 PR middle-end/91647
3279 PR middle-end/91463
3280 PR middle-end/92312
3281 * c-pretty-print.c (direct_abstract_declarator): Print
3282 bound in zero-length arrays.
3283 * c.opt (-Wzero-length-bounds): New option.
3284
43f1814c
NS
32852019-10-30 Nathan Sidwell <nathan@acm.org>
3286
3287 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3288 macros.
3289
ad1539d5
MS
32902019-10-28 Martin Sebor <msebor@redhat.com>
3291
3292 PR c/66970
3293 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3294 even when only preprocessing.
3295 * c-common.h (names_builtin_p): Declare new function.
3296 * c-lex.c (init_c_lex): Set has_builtin.
3297 (c_common_has_builtin): Define a new function.
3298 * c-ppoutput.c (init_pp_output): Set has_builtin.
3299
135df52c
JJ
33002019-10-24 Jakub Jelinek <jakub@redhat.com>
3301
3302 * c-common.h (c_omp_context_selector_matches): Remove.
3303 * c-omp.c (c_omp_context_selector_matches): Remove.
3304 * c-attribs.c (c_common_attribute_table): Add
3305 "omp declare target {host,nohost,block}" attributes.
3306
8ad0c477
JM
33072019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3308
3309 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3310
56898e43
RS
33112019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3312
3313 * c-common.h (user_facing_original_type_p): Declare.
3314 * c-common.c: Include c-spellcheck.h.
3315 (user_facing_original_type_p): New function.
3316
20de9568
JJ
33172019-10-12 Jakub Jelinek <jakub@redhat.com>
3318
3319 * c-common.h (c_omp_mark_declare_variant,
3320 c_omp_context_selector_matches): Declare.
3321 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3322 and hsa-common.h.
3323 (c_omp_get_context_selector): Support second argument NULL.
3324 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3325 functions.
3326 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3327 attribute, add "omp declare variant base" and
3328 "omp declare variant variant" attributes.
3329
175a85b2
JM
33302019-10-11 Joseph Myers <joseph@codesourcery.com>
3331
3332 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3333 CppReason(CPP_W_C11_C2X_COMPAT).
3334
fe2bc27c
JM
33352019-10-11 Joseph Myers <joseph@codesourcery.com>
3336
3337 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3338 _Decimal64 and _Decimal128.
3339
27dfdc0f
JM
33402019-10-10 Joseph Myers <joseph@codesourcery.com>
3341
3342 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3343 types if DFP not supported.
3344
94e7f906
JJ
33452019-10-10 Jakub Jelinek <jakub@redhat.com>
3346
3347 * c-common.h (c_omp_check_context_selector,
3348 c_omp_get_context_selector): Declare.
3349 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3350 in diagnostic message.
3351 (c_omp_check_context_selector, c_omp_get_context_selector): New
3352 functions.
3353 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3354 attribute.
3355 (handle_omp_declare_variant_attribute): New function.
3356
a7160771
MS
33572019-10-09 Martin Sebor <msebor@redhat.com>
3358
3359 PR tree-optimization/90879
3360 * c.opt (-Wstring-compare): New option.
3361
cb57504a
JM
33622019-10-08 Andrew Sutton <asutton@lock3software.com>
3363 Jason Merrill <jason@redhat.com>
3364
3365 Update the concepts implementation to conform to the C++20
3366 specification, improve compile times, and generally clean up
3367 the implementation.
3368
3369 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3370 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3371 * c.opt: Add -Wconcepts-ts.
3372 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3373 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3374 (set_std_cxx2a): Enable concepts by default.
3375
fbb2a6dc
JM
33762019-10-08 Joseph Myers <joseph@codesourcery.com>
3377
3378 * c-opts.c (c_common_post_options): Set
3379 -fno-fp-int-builtin-inexact for C2X.
3380
8e007055
JJ
33812019-10-05 Jakub Jelinek <jakub@redhat.com>
3382
3383 PR c++/91369 - Implement P0784R7: constexpr new
3384 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3385 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3386
843f104d
JM
33872019-10-04 Joseph Myers <joseph@codesourcery.com>
3388
3389 PR c/82752
3390 * c-format.c (C_STD_VER): Handle C2x.
3391 (C_STD_NAME): Likewise.
3392 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3393 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3394 modifier allowed and 'p' flag.
3395 * c-format.h (enum format_std_version): Add STD_C2X.
3396 (struct format_char_info): Mention 'p' in comment on flags2.
3397
e9c9a142
DM
33982019-10-01 David Malcolm <dmalcolm@redhat.com>
3399
3400 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3401 calling diagnostic_show_locus, rather than destroying it afterwards.
3402
7552c36a
JJ
34032019-10-01 Jakub Jelinek <jakub@redhat.com>
3404
3405 PR c++/91925
3406 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3407 with NULL DECL_FIELD_OFFSET.
3408
8209db25
RS
34092019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3410
3411 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3412 has a type name, use it in preference to the __vector syntax.
3413
9343bf99
RS
34142019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3415
3416 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3417 two spaces between a comma and "...".
3418
59bc434a
JJ
34192019-09-27 Jakub Jelinek <jakub@redhat.com>
3420
3421 PR c++/88203
3422 * c-common.h (c_omp_predefined_variable): Declare.
3423 * c-omp.c (c_omp_predefined_variable): New function.
3424 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3425 for predefined variables.
3426
c6447c20
RS
34272019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3428
3429 * c-common.h (build_function_call_vec): Take the original
3430 function decl as an optional final parameter.
3431 (check_builtin_function_arguments): Take the original function decl.
3432 * c-common.c (check_builtin_function_arguments): Likewise.
3433 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3434 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3435
c4438114
JM
34362019-09-15 Jason Merrill <jason@redhat.com>
3437
3438 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3439 fold_for_warn in "|| mask" warning.
3440
68a57628
ML
34412019-09-10 Martin Liska <mliska@suse.cz>
3442
3443 * c.opt: Use newly added WarnRemoved.
3444
f48ef52e
ML
34452019-09-09 Martin Liska <mliska@suse.cz>
3446
3447 * c.opt: Update comment of removed
3448 options that are preserved only for backward
3449 compatibility.
3450
67f6e649
ML
34512019-09-06 Martin Liska <mliska@suse.cz>
3452
3453 PR c++/91125
3454 * c-common.c: Remove definition of flag_use_repository.
3455 * c-common.h: Likewise.
3456 * c-opts.c (c_common_handle_option):
3457 Do not handle OPT_frepo option.
3458 * c.opt: Mark the option with Deprecated.
3459
db9d2274
MP
34602019-09-04 Marek Polacek <polacek@redhat.com>
3461
3462 * c.opt (fdeduce-init-list): Ignored.
3463
68e2c199
PK
34642019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3465
3466 PR c/78736
3467 * c.opt (Wenum-conversion): New option.
3468
7a4418a5
JL
34692019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3470
3471 * c-attribs.c (handle_section_attribute): Call the
3472 handle_generic_attribute target hook after performing target
3473 independent processing.
3474 (handle_noinit_attribute): Likewise.
3475
5f76ab15
ILT
34762019-09-03 Ian Lance Taylor <iant@golang.org>
3477
3478 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3479 when using -fgo-dump-spec.
3480
ae0d3f6a
ML
34812019-09-02 Martin Liska <mliska@suse.cz>
3482
3483 PR c++/91155
3484 * c-common.c (fname_as_string): Use cxx_printable_name for
3485 __PRETTY_FUNCTION__ same as was used before r265711.
3486
8a902edb
MP
34872019-08-28 Marek Polacek <polacek@redhat.com>
3488
3489 Implement P1152R4: Deprecating some uses of volatile.
3490 PR c++/91361
3491 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3492 default for C++2a, unless -Wno-deprecated.
3493 * c.opt (Wvolatile): New warning.
3494
4742dbe7
MP
34952019-08-28 Marek Polacek <polacek@redhat.com>
3496
3497 PR c++/91360 - Implement C++20 P1143R2: constinit.
3498 * c-common.c (c_common_reswords): Add constinit and __constinit.
3499 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3500 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3501 RID_LAST_CXX20.
3502 (D_CXX20): Define.
3503 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3504 * c-format.c (cxx_keywords): Add "constinit".
3505 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3506
6a074892
JJ
35072019-08-27 Jakub Jelinek <jakub@redhat.com>
3508
3509 PR c++/91415
3510 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3511 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3512 like COMPOUND_EXPR rather than normal expression.
3513
22f8849d
IS
35142019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3515
3516 PR pch/61250
3517 * c-lex.c (c_lex_with_flags): Don't call
3518 c_common_no_more_pch () from here.
3519
df375b03
JJ
35202019-08-23 Jakub Jelinek <jakub@redhat.com>
3521
3522 PR middle-end/91283
3523 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3524 instead of flag_excess_precision_cmdline.
3525 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3526 * c-opts.c (c_common_post_options): Likewise.
3527
14b7950f
MS
35282019-08-22 Martin Sebor <msebor@redhat.com>
3529
3530 PR middle-end/91490
3531 * c-common.c (braced_list_to_string): Add argument and overload.
3532 Handle flexible length arrays and unions.
3533
8bb2ee59
EB
35342019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3535
3536 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3537 function declarations where arguments are missing. Rename variables.
3538
21c1e205
RB
35392019-08-15 Richard Biener <rguenther@suse.de>
3540
3541 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3542 enabled, define __SIZETYPE__.
3543
f0033821
CL
35442019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3545
3546 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3547 exclusion with "section" attribute.
3548 (attr_noinit_exclusions): New table.
3549 (handle_noinit_attribute): New function.
3550
4d732405
RS
35512019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3552
3553 PR middle-end/91421
3554 * c-common.c (resolve_overloaded_builtin): Use
3555 copy_decl_built_in_function.
3556
51ad8481
MS
35572019-08-13 Martin Sebor <msebor@redhat.com>
3558
3559 PR c/80619
3560 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3561 (asm_fprintf_length_spec): Same.
3562 * c-format.h (format_lengths): Add FMT_LEN_w.
3563
77eb117f
JJ
35642019-08-10 Jakub Jelinek <jakub@redhat.com>
3565
3566 * c-pragma.h (enum pragma_omp_clause): Add
3567 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3568
398e3feb
JJ
35692019-08-07 Jakub Jelinek <jakub@redhat.com>
3570
3571 * c-pragma.h (enum pragma_omp_clause): Add
3572 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3573 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3574 enumeration value.
3575
ab574db6
MP
35762019-08-05 Marek Polacek <polacek@redhat.com>
3577
3578 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3579 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3580 default for C++2a, unless -Wno-deprecated.
3581 * c.opt (Wcomma-subscript): New warning.
3582
554a530f
JJ
35832019-07-20 Jakub Jelinek <jakub@redhat.com>
3584
3585 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3586 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3587 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3588 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3589 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3590 constructs with the loop construct.
3591
1a888209
JJ
35922019-07-13 Jakub Jelinek <jakub@redhat.com>
3593
3594 PR c/91149
3595 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3596 OMP_CLAUSE_REDUCTION_TASK handling.
3597
1fdd6f04
JJ
35982019-07-12 Jakub Jelinek <jakub@redhat.com>
3599
3600 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3601 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3602
99b1c316
MS
36032019-07-09 Martin Sebor <msebor@redhat.com>
3604
3605 PR c++/61339
1fdd6f04 3606 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3607 and others to class.
3608 * c-pretty-print.h: Same.
3609
6c1dae73
MS
36102019-07-09 Martin Sebor <msebor@redhat.com>
3611
3612 PR c++/61339
3613 * c-format.c (check_argument_type): Change class-key from class to
3614 struct and vice versa to match convention and avoid -Wclass-is-pod
3615 and -Wstruct-no-pod.
3616 * c-pretty-print.h: Same.
3617
8ba6ea87
ML
36182019-07-03 Martin Liska <mliska@suse.cz>
3619
3620 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3621 dead assignemts.
3622
83eb9522
JJ
36232019-07-03 Jakub Jelinek <jakub@redhat.com>
3624
3625 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3626 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3627 with OMP_PARALLEL.
3628
1c6ffbab
QZ
36292019-07-02 qing zhao <qing.zhao@oracle.com>
3630
3631 PR preprocessor/90581
3632 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3633 * c.opt: Add new option -fmax-include-depth.
3634
7ffc7de5
JM
36352019-06-26 Jason Merrill <jason@redhat.com>
3636
3637 PR c++/55442 - memory-hog with highly recursive constexpr.
3638 * c.opt (fconstexpr-loop-limit): New.
3639
361af3e4
JJ
36402019-06-25 Jakub Jelinek <jakub@redhat.com>
3641
3642 PR sanitizer/90954
3643 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3644 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3645
ab20d992
JJ
36462019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3647
3648 * c-common.c (c_common_nodes_and_builtins): Define
3649 alternate "__intN__" name for "__intN" types.
3650
f4af4019
JH
36512019-06-24 Jan Hubicka <jh@suse.cz>
3652
3653 * c-common.c (braced_lists_to_strings): Check that
3654 type is array or integer prior checking string flag.
3655
da9e9b57
MB
36562019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3657
3658 PR c++/90875 - added -Wswitch-outside-range option
3659 * c.opt (Wswitch-outside-range): Added new option.
3660 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3661
3f3d6a6f
MP
36622019-06-21 Marek Polacek <polacek@redhat.com>
3663
3664 PR c++/90953 - ICE with -Wmissing-format-attribute.
3665 * c-common.c (check_function_arguments_recurse): Use
3666 get_attribute_name.
3667 (check_missing_format_attribute): Likewise.
3668
1bf32c11
MP
36692019-06-19 Marek Polacek <polacek@redhat.com>
3670
3671 PR c++/60364 - noreturn after first decl not diagnosed.
3672 * c-attribs.c (handle_noreturn_attribute): No longer static.
3673 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3674 Declare.
3675 * c-format.c (check_function_format): Use get_attribute_name.
3676
a04c0734
MS
36772019-06-19 Martin Sebor <msebor@redhat.com>
3678
3679 PR translation/90156
3680 * c-format.c (function_format_info::format_type): Adjust type.
3681 (function_format_info::is_raw): New member.
3682 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3683 (decode_format_attr): Adjust call to decode_format_type.
3684 Avoid a redundant call to convert_format_name_to_system_name.
3685 Avoid abbreviating the word "arguments" in a diagnostic.
3686 (format_warning_substr): New function.
3687 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3688 (finish_dollar_format_checking): Same.
3689 (check_format_info): Same.
3690 (struct baltoks_t): New.
3691 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3692 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3693 functions.
3694 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3695 maybe_diag_unbalanced_tokens.
3696 (handle_format_attribute): Spell out the word "arguments" in
3697 a diagnostic.
3698
d3786ebb
MB
36992019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3700
3701 PR c++/90449 - add -Winaccessible-base option.
3702 * c.opt (Winaccessible-base): New option.
3703
bf38f7e9
JJ
37042019-06-10 Jakub Jelinek <jakub@redhat.com>
3705
3706 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3707 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3708 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3709 combined/composite constructs where it is not allowed. Copy over
3710 OMP_CLAUSE_REDUCTION_INSCAN.
3711
0ecf545c
MS
37122019-06-05 Martin Sebor <msebor@redhat.com>
3713
3714 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3715 (handle_alias_ifunc_attribute): Same.
3716 (handle_copy_attribute): Same.
3717 (handle_weakref_attribute): Same.
3718 (handle_nonnull_attribute): Same.
3719 * c-warn.c (warn_for_sign_compare): Same.
3720 (warn_for_restrict): Same.
3721 * c.opt: Same.
3722
36b34127
MS
37232019-06-05 Martin Sebor <msebor@redhat.com>
3724
3725 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3726 * c.opt (-Wformat-diag): Remove a spurious period.
3727
357a352f
JJ
37282019-05-29 Jakub Jelinek <jakub@redhat.com>
3729
3730 PR c/90628
3731 * c-common.c (check_builtin_function_arguments)
3732 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3733 as last argument.
3734
2b8235ea
EB
37352019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3736
3737 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3738
6d86ddc4
ML
37392019-05-22 Martin Liska <mliska@suse.cz>
3740
3741 PR lto/90500
3742 * c-attribs.c (handle_copy_attribute): Do not copy
3743 target_clones attribute.
3744
419ba5b9
EB
37452019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3746
3747 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3748 * c-ada-spec.c (print_assignment_operator): New function.
3749 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3750 assignment operators declared as methods and filter out the others.
3751
e03436e7
TS
37522019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3753
3754 PR c/89433
3755 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3756 "omp declare target".
3757
a9c697b8
MS
37582019-05-16 Martin Sebor <msebor@redhat.com>
3759
ab20d992
JJ
3760 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3761 keywords, operators, and types in diagnostics.
3762 (handle_scalar_storage_order_attribute): Same.
3763 (handle_mode_attribute): Same.
3764 (handle_visibility_attribute): Same.
3765 (handle_assume_aligned_attribute): Same.
3766 (handle_no_split_stack_attribute): Same.
3767 * c-common.c (shorten_compare): Same.
3768 (c_common_truthvalue_conversion): Same.
3769 (cb_get_source_date_epoch): Same.
3770 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3771 in diagnostics.
3772 (interpret_float): Same.
3773 * c-omp.c (c_finish_omp_for): Same.
3774 * c-opts.c (c_common_post_options): Same.
3775 * c-pch.c (c_common_pch_pragma): Same.
3776 * c-pragma.c (pop_alignment): Same.
3777 (handle_pragma_pack): Same.
3778 (apply_pragma_weak): Same.
3779 (handle_pragma_weak): Same.
3780 (handle_pragma_scalar_storage_order): Same.
3781 (handle_pragma_redefine_extname): Same.
3782 (add_to_renaming_pragma_list): Same.
3783 (maybe_apply_renaming_pragma): Same.
3784 (push_visibility): Same.
3785 (handle_pragma_visibility): Same.
3786 (handle_pragma_optimize): Same.
3787 (handle_pragma_message): Same.
3788 * c-warn.c (warn_for_omitted_condop): Same.
3789 (lvalue_error): Same.
a9c697b8 3790
6b943512
RB
37912019-05-15 Richard Biener <rguenther@suse.de>
3792
3793 PR c/90474
3794 * c-common.c (c_common_mark_addressable_vec): Also mark
3795 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3796 c_mark_addressable.
ab20d992 3797
b744fc85
NS
37982019-05-06 Nathan Sidwell <nathan@acm.org>
3799
3800 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3801
598f50d7
NS
38022019-04-30 Nathan Sidwell <nathan@acm.org>
3803
3804 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3805
5bcc5a3b
ML
38062019-04-30 Martin Liska <mliska@suse.cz>
3807
3808 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3809 for unknown options.
3810
e78a87f7
RS
38112019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3812
3813 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3814 the pointer target rather than the pointer itself.
3815
c280b7ee
JJ
38162019-04-19 Jakub Jelinek <jakub@redhat.com>
3817
3818 PR c/89888
3819 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3820 arguments.
3821 (c_do_switch_warnings): Remove outside_range_p argument.
3822 * c-common.c (check_case_bounds): Removed.
3823 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3824 Don't call check_case_bounds. Fold low_value as well as high_value.
3825 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3826 Check for case labels outside of range of original type here and
3827 adjust them.
3828
8e8225e6
JJ
38292019-04-12 Jakub Jelinek <jakub@redhat.com>
3830
63b8a166
JJ
3831 PR translation/90041
3832 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3833 in the Warn diagnostics.
3834
8e8225e6
JJ
3835 PR c/89946
3836 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3837 function comment. Warn if arguments of the attribute are not positive
3838 integer constants.
3839
53a3f614
EB
38402019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3841
3842 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3843 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3844
22be5873
EB
38452019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3846
3847 * c-ada-spec.c (is_float128): New predicate extracted from...
3848 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3849 <REAL_TYPE>: ...here. Call it.
3850
34facf20
DM
38512019-04-05 David Malcolm <dmalcolm@redhat.com>
3852
3853 PR c/89985
3854 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3855 auto_diagnostic_group. Guard inform calls by result of
3856 warning_at call.
3857
05564120
MP
38582019-04-05 Marek Polacek <polacek@redhat.com>
3859
ab20d992 3860 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3861 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3862 of RHS.
3863
7a506c3c
JM
38642019-04-03 Jason Merrill <jason@redhat.com>
3865
3866 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3867 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3868
ddeae8c8
MS
38692019-04-01 Martin Sebor <msebor@redhat.com>
3870
3871 PR c/89685
3872 * c-attribs.c (handle_copy_attribute): Handle references and
3873 non-constant expressions.
3874
a15ffa22
JJ
38752019-03-22 Jakub Jelinek <jakub@redhat.com>
3876
3877 PR c++/87481
3878 * c.opt (-fconstexpr-ops-limit=): New option.
3879
36a3a7a3
JJ
38802019-03-21 Jakub Jelinek <jakub@redhat.com>
3881
3882 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3883 template param.
3884
bec1da64
MS
38852019-03-19 Martin Sebor <msebor@redhat.com>
3886
3887 PR tree-optimization/89688
3888 * c-common.c (braced_list_to_string): Make static.
3889 (braced_lists_to_strings): Define new function.
3890 * c-common.h (braced_list_to_string): Remove.
3891 (braced_lists_to_strings): Declare.
3892
1fe61adf
ML
38932019-03-12 Martin Liska <mliska@suse.cz>
3894
3895 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3896
93964ebd
ML
38972019-03-11 Martin Liska <mliska@suse.cz>
3898
3899 * c-opts.c (c_common_post_options): Wrap apostrophes
3900 in gcc internal format with %'.
3901
a3f9f006
ML
39022019-03-11 Martin Liska <mliska@suse.cz>
3903
3904 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3905 in a string format message and fix GNU coding style.
3906 * c-common.c (vector_types_convertible_p): Likewise.
3907 (c_build_vec_perm_expr): Likewise.
3908 * c-indentation.c (get_visual_column): Likewise.
3909 * c-opts.c (c_common_handle_option): Likewise.
3910 (c_common_post_options): Likewise.
3911 (sanitize_cpp_opts): Likewise.
3912 * c-pch.c (c_common_pch_pragma): Likewise.
3913 * c-pragma.c (handle_pragma_pack): Likewise.
3914
1db01ff9
JJ
39152019-03-08 Jakub Jelinek <jakub@redhat.com>
3916
3917 PR tree-optimization/89550
3918 * c-common.c (c_common_truthvalue_conversion): Only set
3919 TREE_NO_WARNING if warning_at returned true.
3920 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3921
ba790e6f
JJ
39222019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3923 Martin Sebor <msebor@gmail.com>
3924
3925 * c.opt (Wmissing-attributes): Clean up doc string.
3926
7da73ba7
JJ
39272019-02-25 Jakub Jelinek <jakub@redhat.com>
3928
3929 PR c/89495
3930 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3931 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3932 checking.
3933
921bb9d1
RB
39342019-02-22 Richard Biener <rguenther@suse.de>
3935
3936 * c-pch.c (no_checksum): Remove.
3937 (pch_init): Remove assertion that executable_checksum is not
3938 all zero.
3939 (c_common_valid_pch): Likewise.
3940
e2ebb05c
MS
39412019-02-18 Martin Sebor <msebor@redhat.com>
3942
3943 PR middle-end/89294
3944 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3945
3fe53000
DM
39462019-02-16 David Malcolm <dmalcolm@redhat.com>
3947
3948 PR c++/88680
3949 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3950 implementing -Wtype-limits.
3951
28a8cef1
MS
39522019-02-11 Martin Sebor <msebor@redhat.com>
3953
3954 PR c++/87996
3955 * c-common.c (invalid_array_size_error): New function.
3956 (valid_array_size_p): Call it. Handle size as well as type.
3957 * c-common.h (valid_constant_size_p): New function.
3958 (enum cst_size_error): New type.
3959
ec2be203
DM
39602019-01-31 David Malcolm <dmalcolm@redhat.com>
3961
3962 PR c/89122
3963 * known-headers.cc (get_stdlib_header_for_name): Add
3964 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3965
8936f047
JJ
39662019-01-31 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR libstdc++/88170
3969 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3970 a C cast in pp_c_flag_gnu_v3 mode.
3971
6a335b96
JJ
39722019-01-29 Jakub Jelinek <jakub@redhat.com>
3973
3974 PR c/86125
3975 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3976 builtin_structptr_types types even for C.
3977
2a06eba5
BE
39782019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3979
3980 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3981 when rhs is of array type correctly. Fix handling of nested structures.
3982 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3983 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3984 type casts within nested compound expressions.
3985
18a23298
JJ
39862019-01-22 Jakub Jelinek <jakub@redhat.com>
3987
3988 PR middle-end/88968
3989 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3990 variable after using BIT_FIELD_REF.
3991
420183d9
L
39922019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3993
3994 PR c/51628
3995 PR c/88664
3996 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3997 Remove the boolean argument.
3998 * c-warn.c (check_address_of_packed_member): Renamed to ...
3999 (check_address_or_pointer_of_packed_member): This. Also
4000 warn pointer conversion.
4001 (check_and_warn_address_of_packed_member): Renamed to ...
4002 (check_and_warn_address_or_pointer_of_packed_member): This.
4003 Also warn pointer conversion.
4004 (warn_for_address_or_pointer_of_packed_member): Remove the
4005 boolean argument. Don't check pointer conversion here.
4006
99063eee
RS
40072019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4008
4009 PR inline-asm/52813
4010 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4011
a30d0196
JJ
40122019-01-14 Jakub Jelinek <jakub@redhat.com>
4013
4014 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4015 and __cpp_nontype_template_parameter_auto. Add a comment that
4016 __cpp_template_auto is deprecated.
4017
2d91f79d
TH
40182019-01-14 Tom Honermann <tom@honermann.net>
4019
4020 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4021 * c-common.c (c_common_reswords): Add char8_t.
4022 (fix_string_type): Use char8_t for the type of u8 string literals.
4023 (c_common_get_alias_set): char8_t doesn't alias.
4024 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4025 C++.
4026 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4027 (keyword_begins_type_specifier): Add RID_CHAR8.
4028 * c-common.h (rid): Add RID_CHAR8.
4029 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4030 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4031 Define char8_type_node and char8_array_type_node.
4032 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4033 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4034 (c_cpp_builtins): Predefine __cpp_char8_t.
4035 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4036 CPP_UTF8STRING.
4037 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4038 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4039 targeting C++2a.
4040 * c.opt: Add the -fchar8_t command line option.
4041
23db6ced
MS
40422019-01-14 Martin Sebor <msebor@redhat.com>
4043
4044 PR target/88638
4045 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4046 and issue errors if it fails.
4047 * c-common.h (valid_format_string_type_p): Declare.
4048 * c-format.c (valid_stringptr_type_p): Rename...
4049 (valid_format_string_type_p): ...to this and make extern.
4050 (handle_format_arg_attribute): Adjust to new name.
4051 (check_format_string): Same.
4052
234c3818
L
40532019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4054
4055 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4056 Replace "may may" with "may" in warning message.
4057
d8fcab68
JJ
40582019-01-07 Jakub Jelinek <jakub@redhat.com>
4059
4060 PR c++/85052
4061 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4062 (c_build_vec_convert): Declare.
4063 * c-common.c (c_build_vec_convert): New function.
4064
29d24852
MS
40652019-01-04 Martin Sebor <msebor@redhat.com>
4066
4067 PR c/88546
4068 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4069 Handle C++ empty throw specification and C11 _Noreturn.
4070 (has_attribute): Also handle C11 _Noreturn.
4071
9069a4c9
MS
40722019-01-04 Martin Sebor <msebor@redhat.com>
4073
4074 PR c/88363
4075 * c-attribs.c (positional_argument): Also accept enumerated types.
4076
a5544970
JJ
40772019-01-01 Jakub Jelinek <jakub@redhat.com>
4078
4079 Update copyright years.
4080
da77eace
L
40812018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4082
4083 PR c/51628
4084 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4085 * c-warn.c (check_alignment_of_packed_member): New function.
4086 (check_address_of_packed_member): Likewise.
4087 (check_and_warn_address_of_packed_member): Likewise.
4088 (warn_for_address_or_pointer_of_packed_member): Likewise.
4089 * c.opt: Add -Wno-address-of-packed-member.
4090
573767d4
DM
40912018-12-20 David Malcolm <dmalcolm@redhat.com>
4092
4093 PR c++/87504
4094 * c-warn.c (get_outermost_macro_expansion): New function.
4095 (spelled_the_same_p): Use it to unwind the macro expansions, and
4096 compare the outermost macro in each nested expansion, rather than
4097 the innermost.
4098
a14feb3c
DM
40992018-12-19 David Malcolm <dmalcolm@redhat.com>
4100
4101 PR c++/87504
4102 * c-common.h (warn_tautological_cmp): Convert 1st param from
4103 location_t to const op_location_t &.
4104 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4105 when testing for INTEGER_CST.
4106 (warn_tautological_bitwise_comparison): Convert 1st param from
4107 location_t to const op_location_t &; use it to build a
4108 binary_op_rich_location, and use this.
4109 (spelled_the_same_p): New function.
4110 (warn_tautological_cmp): Convert 1st param from location_t to
4111 const op_location_t &. Warn for macro expansions if
4112 spelled_the_same_p. Use binary_op_rich_location.
4113
dfd7fdca
DM
41142018-12-19 David Malcolm <dmalcolm@redhat.com>
4115
4116 PR c++/43064
4117 PR c++/43486
4118 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4119 (verify_tree): Handle location wrappers.
4120 (c_common_truthvalue_conversion): Strip any location wrapper.
4121 Handle CONST_DECL.
4122 (fold_offsetof): Strip any location wrapper.
4123 (complete_array_type): Likewise for initial_value.
4124 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4125 index before checking for INTEGER_CST.
4126 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4127 print parentheses around location wrappers.
4128 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4129 before checking for INTEGER_CST.
4130 (warn_tautological_bitwise_comparison): Call
4131 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4132 before checking for INTEGER_CST.
4133 (readonly_error): Strip any location wrapper.
4134 (warn_array_subscript_with_type_char): Strip location wrappers
4135 before checking for INTEGER_CST. Use the location of the index if
4136 available.
4137
5c8b3702
JM
41382018-12-06 Jason Merrill <jason@redhat.com>
4139
4140 PR c++/88136 - -Wdeprecated-copy false positives
4141 * c.opt (Wdeprecated-copy-dtor): New.
4142 (Wdeprecated-copy): Move to -Wextra.
4143
673670da
MS
41442018-11-29 Martin Sebor <msebor@redhat.com>
4145
4146 PR c/88172
4147 PR testsuite/88208
4148 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4149 alignments to values less than the target requires.
4150 (has_attribute): For attribute aligned consider both the attribute
4151 and the alignment bits.
4152 * c-common.c (c_init_attributes): Optionally issue a warning for
4153 zero alignment.
4154
04864ec8
MS
41552018-11-28 Martin Sebor <msebor@redhat.com>
4156
4157 PR c/88065
4158 PR c/87297
4159 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4160 or destination is an error.
4161
ace83db0
JJ
41622018-11-28 Jakub Jelinek <jakub@redhat.com>
4163
4164 PR c++/88215
4165 * c-ubsan.c: Include langhooks.h.
4166 (ubsan_instrument_division): Change gcc_assert that main variants
4167 of op0 and op1 types are equal to gcc_checking_assert that the
4168 main variants are compatible types.
4169
da193a27
EB
41702018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4171
4172 * c-ada-spec.c: Include stringpool.h.
4173 (has_static_fields): Return false for incomplete types.
4174 (is_tagged_type): Likewise.
4175 (has_nontrivial_methods): Likewise.
4176 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4177 (struct overloaded_name_hash): New structure.
4178 (struct overloaded_name_hasher): Likewise.
4179 (overloaded_names): New global variable.
4180 (init_overloaded_names): New static function.
4181 (overloaded_name_p): New predicate.
4182 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4183 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4184 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4185 Remove always-true condition and dump forward types.
4186 (dump_ada_specs): Delete overloaded_names.
4187
98f08eb8
MS
41882018-11-20 Martin Sebor <msebor@redhat.com>
4189
4190 * c-attribs.c (type_for_vector_size): New function.
4191 (type_valid_for_vector_size): Same.
4192 (handle_vector_size_attribute): Move code to the functions above
4193 and call them.
4194 (validate_attribute, has_attribute): New functions.
4195 * c-common.h (has_attribute): Declare.
4196 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4197 * c-common.c (c_common_resword): Same.
4198
2674fa47
JM
41992018-11-16 Jason Merrill <jason@redhat.com>
4200
4201 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4202 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4203
258b3854
JJ
42042018-11-16 Jakub Jelinek <jakub@redhat.com>
4205
4206 PR middle-end/87854
4207 * c-common.c (fix_string_type): Reject string literals larger than
4208 TYPE_MAX_VALUE (ssizetype) bytes.
4209
1d249509
MS
42102018-11-15 Martin Sebor <msebor@redhat.com>
4211
4212 PR c++/87541
4213 PR c++/87542
4214 * c-attribs.c (positional_argument): New function.
4215 (handle_alloc_size_attribute): Use it and simplify.
4216 (handle_alloc_align_attribute): Same.
4217 (handle_assume_aligned_attribute): Same.
4218 (handle_nonnull_attribute): Same.
4219 * c-common.c (check_function_arguments): Pass fntype to
4220 check_function_format.
4221 * c-common.h (check_function_format): Add an argument.
4222 (PosArgFlags, positional_argument): Declare new type and function.
4223 * c-format.c (decode_format_attr): Add arguments.
4224 (check_format_string, get_constant): Same.
4225 (convert_format_name_to_system_name): Adjust.
4226
478dd60d
DM
42272018-11-15 David Malcolm <dmalcolm@redhat.com>
4228
4229 PR other/19165
4230 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4231
8cca0163
JJ
42322018-11-14 Jakub Jelinek <jakub@redhat.com>
4233
8ee09943
JJ
4234 P1236R1 - Signed integers are two's complement
4235 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4236 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4237 with in-range second operand well defined for -std=c++2a.
4238
8cca0163
JJ
4239 PR other/88007
4240 * c-common.c (parse_optimize_options): Allocate option string from
4241 opts_obstack rather than as GC memory. Move the allocation after
4242 warning for invalid option.
4243
620e594b
DM
42442018-11-13 David Malcolm <dmalcolm@redhat.com>
4245
4246 * c-common.c (c_get_substring_location): Update for renaming of
4247 get_source_location_for_substring to get_location_within_string.
4248 * c-lex.c: Replace "source_location" with "location_t".
4249 * c-opts.c: Likewise.
4250 * c-ppoutput.c: Likewise.
4251
f9731de3
MS
42522018-11-13 Martin Sebor <msebor@redhat.com>
4253
4254 PR middle-end/81824
4255 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4256 (handle_tls_model_attribute): Improve diagnostics.
4257
e4bd6d5e
JM
42582018-11-12 Jason Merrill <jason@redhat.com>
4259
a6bb6b07
JM
4260 * c-cppbuiltin.c (c_cpp_builtins): Define
4261 __cpp_impl_destroying_delete.
4262
e4bd6d5e
JM
4263 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4264 __cpp_conditional_explicit.
4265
79a2c428
MS
42662018-11-09 Martin Sebor <msebor@redhat.com>
4267
4268 PR middle-end/81824
4269 * c-attribs.c (handle_copy_attribute): New function.
4270
4c7bd361
MS
42712018-11-09 Martin Sebor <msebor@redhat.com>
4272
4273 PR c/87795
4274 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4275
28567c40
JJ
42762018-11-08 Jakub Jelinek <jakub@redhat.com>
4277
4278 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4279 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4280 enum omp_memory_order MEMORY_ORDER.
4281 (c_finish_omp_flush): Add MO argument.
4282 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4283 (c_finish_omp_for): Add FINAL_P argument.
4284 * c-omp.c: Include memmodel.h.
4285 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4286 OMP_TASKGROUP_CLAUSES to it.
4287 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4288 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4289 instead of OMP_ATOMIC_SEQ_CST.
4290 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4291 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4292 __atomic_thread_fence call with the given value.
4293 (check_omp_for_incr_expr): Formatting fixes.
4294 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4295 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4296 is not constant expression 1 or -1. Transform NE_EXPR loops
4297 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4298 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4299 loops too.
4300 (c_omp_split_clauses): Add support for combined
4301 #pragma omp parallel master and
4302 #pragma omp {,parallel }master taskloop{, simd} constructs.
4303 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4304 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4305 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4306 (c_omp_predetermined_sharing): Don't return
4307 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4308 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4309 PRAGMA_OMP_REQUIRES.
4310 * c-pragma.h (enum pragma_kind): Likewise.
4311 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4312 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4313
204839e7
DM
43142018-11-08 David Malcolm <dmalcolm@redhat.com>
4315
4316 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4317
d8010ee4
DM
43182018-11-08 David Malcolm <dmalcolm@redhat.com>
4319
4320 * c-format.c (local_cgraph_node_ptr_node): New variable.
4321 (gcc_dump_printf_char_table): Add entry for %C.
4322 (get_pointer_to_named_type): New function, taken from the handling
4323 code for "gimple *" from...
4324 (init_dynamic_diag_info): ...here. Add handling for
4325 "cgraph_node *".
4326 * c-format.h (T_CGRAPH_NODE): New.
4327
4be5c72c
JM
43282018-10-19 Jason Merrill <jason@redhat.com>
4329
4330 * c-cppbuiltin.c (c_cpp_builtins): Add
4331 __cpp_nontype_template_parameter_class.
4332
f3f6029d
NS
43332018-10-31 Nathan Sidwell <nathan@acm.org>
4334
ab5324fb
NS
4335 * c-opts.c (c_finish_options): Force command line macro
4336 location. Refactor to avoid repeating main debug hook.
4337 (push_command_line_include): Clarify comment.
4338
f3f6029d
NS
4339 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4340
91e3ec29
MS
43412018-10-30 Martin Sebor <msebor@redhat.com>
4342
4343 PR middle-end/87041
4344 * c-format.c (check_format_types): Avoid diagnosing null pointer
4345 arguments to printf-family of functions.
4346
b5ff4f5c
MP
43472018-10-30 Marek Polacek <polacek@redhat.com>
4348
4349 Implement P0892R2, explicit(bool).
4350 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4351
7e2de6df
DM
43522018-10-29 David Malcolm <dmalcolm@redhat.com>
4353
4354 * name-hint.h (name_hint::take_deferred): New member function.
4355
b2bf438c
DM
43562018-10-29 David Malcolm <dmalcolm@redhat.com>
4357
4358 PR c++/56856
4359 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4360 argument.
4361 (check_function_restrict): Rename param "argarray" to
4362 "unfolded_argarray", and make a copy named "argarray", calling
4363 fold_for_warn on each argument.
4364 (check_function_arguments): Add note about responsibility for
4365 folding the arguments.
4366
9f936c86
JM
43672018-10-17 Joseph Myers <joseph@codesourcery.com>
4368
4369 * c-common.c (flag_isoc2x): New variable.
4370 * c-common.h (clk_c): Update comment to reference C2X.
4371 (flag_isoc99, flag_isoc11): Update comments to reference future
4372 standard versions in general.
4373 (flag_isoc2x): Declare.
4374 * c-opts.c (set_std_c2x): New function.
4375 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4376 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4377 flag_isoc2x to 0.
4378 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4379
7a8a92c4
JM
43802018-10-17 Joseph Myers <joseph@codesourcery.com>
4381
4382 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4383 (std=iso9899:2018): Document C17 as published in 2018.
4384
4dc003ff
CL
43852018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4386
4387 PR c++/87364
4388 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4389
79371671
WW
43902018-10-11 Will Wray <wjwray@gmail.com>
4391
4392 PR c++/87364
4393 * c-pretty-print.h (pp_c_type_cast): Prototype.
4394 (pp_c_integer_constant): Likewise.
4395 * c-pretty-print.c (pp_c_type_cast): No longer static.
4396 (pp_c_integer_constant): Likewise.
4397 (pp_c_enumeration_constant): Fix loop termination when finding
4398 name of constant. No longer returns a value. Call
4399 pp_c_integer_constant.
4400 (c_pretty_printer::constant): Update for changes to
4401 pp_c_enumeration_constant.
4402
46c62690
JJ
44032018-10-11 Jakub Jelinek <jakub@redhat.com>
4404
4405 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4406 for no_unique_address.
4407
c24300ba
DM
44082018-10-09 David Malcolm <dmalcolm@redhat.com>
4409
4410 * c-common.c (c_option_controlling_cpp_error): Rename to...
4411 (c_option_controlling_cpp_diagnostic): ...this, and convert
4412 "reason" from int to enum.
4413 (c_cpp_error): Rename to...
4414 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4415 * c-common.h (c_cpp_error): Rename to...
4416 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4417 * c-opts.c (c_common_init_options): Update for renaming.
4418
8656dafa
RS
44192018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4420
4421 PR c/87286
4422 * c-common.c (vector_types_compatible_elements_p): Use
4423 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4424
8cff0652
VK
44252018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4426
4427 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4428 to generate constructor destructor priority warning.
4429 * c.opt (-Wprio-ctor-dtor): New option.
4430
bedf03a2
JM
44312018-10-01 Jason Merrill <jason@redhat.com>
4432
4433 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4434
6cc430c1
EB
44352018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4436
4437 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4438 (dump_ada_node): Add const keyword.
4439
87677ac7
ML
44402018-09-25 Martin Liska <mliska@suse.cz>
4441
4442 * c-common.c (c_common_truthvalue_conversion):
4443 Remove Pascal from documentation.
4444
518196cb
EB
44452018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4446
4447 * c-ada-spec.c: Include diagnostic.h.
4448 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4449
a599af84
MP
44502018-09-19 Marek Polacek <polacek@redhat.com>
4451
4452 * c.opt (Wclass-conversion): New.
4453
9c4a4b3c
DM
44542018-09-17 David Malcolm <dmalcolm@redhat.com>
4455
4456 * c-format.c (range_label_for_format_type_mismatch::get_text):
4457 Update for new param.
4458
c896ecfe
DM
44592018-09-17 David Malcolm <dmalcolm@redhat.com>
4460
4461 * c-format.c (format_warning_at_char): Update for introduction of
4462 format_string_diagnostic_t.
4463 (format_type_warning): Likewise.
4464
80c6d1f4
MJ
44652018-09-17 Martin Jambor <mjambor@suse.cz>
4466
4467 PR c/63886
4468 * c.opt (Wabsolute-value): New.
4469
6d900107
BE
44702018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4471
4472 * c-common.c (complete_flexible_array_elts): New helper function.
4473 * c-common.h (complete_flexible_array_elts): Declare.
4474
b5764229
BE
44752018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4476
4477 * c-common.c (braced_list_to_string): Remove eval parameter.
4478 Add some more checks. Always create zero-terminated STRING_CST.
4479 * c-common.h (braced_list_to_string): Adjust prototype.
4480
85204e23
DM
44812018-08-27 David Malcolm <dmalcolm@redhat.com>
4482
4483 PR 87091
4484 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4485 to a tri-state.
4486 (maybe_suggest_missing_token_insertion): Likewise.
4487 (maybe_add_include_fixit): Add param "override_location". If set,
4488 and source-printing is enabled, then override the rich_location's
4489 primary location with that of the insertion point for the fix-it
4490 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4491 * c-common.h (extern void maybe_add_include_fixit): Add bool
4492 param.
4493 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4494 for conversion of show_caret_p to a tri-state.
4495 * c-warn.c (warn_for_restrict): Likewise.
4496 * known-headers.cc
4497 (suggest_missing_header::~suggest_missing_header): Update call to
4498 maybe_add_include_fixit to suggest overriding the location, as it
4499 is for a note.
4500
3d78e008
ML
45012018-08-27 Martin Liska <mliska@suse.cz>
4502
4503 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4504 fndecl_built_in_p and remove check for FUNCTION_DECL if
4505 possible.
3d78e008
ML
4506 (check_builtin_function_arguments): Likewise.
4507 (reject_gcc_builtin): Likewise.
4508 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4509
b5be6d0c
MP
45102018-08-26 Marek Polacek <polacek@redhat.com>
4511
4512 PR c++/87029, Implement -Wredundant-move.
4513 * c.opt (Wredundant-move): New option.
4514
79ca9c35
MP
45152018-08-21 Marek Polacek <polacek@redhat.com>
4516
4517 PR c++/86981, Implement -Wpessimizing-move.
4518 * c.opt (Wpessimizing-move): New option.
4519
097f82ec
DM
45202018-08-20 David Malcolm <dmalcolm@redhat.com>
4521
4522 PR other/84889
4523 * c-attribs.c (common_handle_aligned_attribute): Add
4524 auto_diagnostic_group instance.
4525 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4526 * c-opts.c (c_common_post_options): Likewise.
4527 * c-warn.c (warn_logical_not_parentheses): Likewise.
4528 (warn_duplicated_cond_add_or_warn): Likewise.
4529 (warn_for_multistatement_macros): Likewise.
4530
3fb558b1
NS
45312018-08-20 Nathan Sidwell <nathan@acm.org>
4532
4533 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4534 access.
4535
800c0e98
NS
45362018-08-17 Nathan Sidwell <nathan@acm.org>
4537
4538 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4539 field.
4540 (laxy_hex_fp_value_count): Make unsigned.
4541 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4542 manipulate the macro.
4543 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4544 cpp_define_lazily.
4545
6f795a92
DM
45462018-08-17 David Malcolm <dmalcolm@redhat.com>
4547
4548 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4549 (gcc_dump_printf_length_specs): New.
4550 (gcc_dump_printf_flag_pairs): New.
4551 (gcc_dump_printf_flag_specs): New.
4552 (gcc_dump_printf_char_table): New.
4553 (format_types_orig): Add entry for "gcc_dump_printf".
4554 (init_dynamic_diag_info): Set up length_char_specs and
4555 conversion_specs for gcc_dump_printf_format_type.
4556 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4557
c5d725c0
NS
45582018-08-17 Nathan Sidwell <nathan@acm.org>
4559
10f04917
NS
4560 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4561
c5d725c0
NS
4562 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4563 * c-cppbuiltin.c: Likewise.
4564
c0c12356
ML
45652018-08-17 Martin Liska <mliska@suse.cz>
4566
4567 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4568 Ignore/Deprecated flag. Warning is done automatically for
4569 Deprecated flags.
c0c12356 4570
10fcc142
DM
45712018-08-16 David Malcolm <dmalcolm@redhat.com>
4572
4573 PR c++/70693
4574 * c-common.c (selftest::c_family_tests): Call
4575 selftest::c_indentation_c_tests.
4576 * c-common.h (selftest::c_indentation_c_tests): New decl.
4577 * c-indentation.c: Include "selftest.h".
4578 (next_tab_stop): Add "tab_width" param, rather than accessing
4579 cpp_opts.
4580 (get_visual_column): Likewise. Clarify comment. Bulletproof
4581 against reading past the end of the line.
4582 (get_first_nws_vis_column): Add "tab_width" param.
4583 (detect_intervening_unindent): Likewise.
4584 (should_warn_for_misleading_indentation): Read tab width from
4585 cpp_opts and pass around.
4586 (selftest::test_next_tab_stop): New test.
4587 (selftest::assert_get_visual_column_succeeds): New function.
4588 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4589 (selftest::assert_get_visual_column_fails): New function.
4590 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4591 (selftest::test_get_visual_column): New test.
4592 (selftest::c_indentation_c_tests): New function.
4593
3f6677f4
NS
45942018-08-16 Nathan Sidwell <nathan@acm.org>
4595
4596 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4597 (store_ada_macro): Likewise.
4598 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4599 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4600
96e6ae57
DM
46012018-08-15 David Malcolm <dmalcolm@redhat.com>
4602
4603 * c-format.c: Include "selftest-diagnostic.h" and
4604 "gcc-rich-location.h".
4605 (format_warning_at_char): Pass NULL for new label params of
4606 format_warning_va.
4607 (class indirection_suffix): New class.
4608 (class range_label_for_format_type_mismatch): New class.
4609 (format_type_warning): Move logic for generating "*" suffix to
4610 class indirection_suffix. Create "fmt_label" and "param_label"
4611 to show their types, and pass them to the
4612 format_warning_at_substring calls.
4613 (selftest::test_type_mismatch_range_labels): New test.
4614 (selftest::c_format_c_tests): Call it.
4615
23aa9f7c
MS
46162018-08-13 Martin Sebor <msebor@redhat.com>
4617
4618 PR tree-optimization/71625
4619 * c-common.c (braced_list_to_string): New function.
4620 * c-common.h (braced_list_to_string): Declare it.
4621
f10a9135
NS
46222018-08-08 Nathan Sidwell <nathan@acm.org>
4623
4624 * c-common.c (try_to_locate_new_include_inertion_point): Use
4625 linemap_included_from_linemap.
4626 * c-lex.c (fe_file_change): Use linemap_included_from.
4627 * c-ppoutput.c (pp_file_change): Likewise.
4628
8a45b051
MS
46292018-08-01 Martin Sebor <msebor@redhat.com>
4630
4631 PR tree-optimization/86650
ab20d992 4632 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4633 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4634 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4635 * c-format.h (T89_G): Update to be "gimple *" rather than
4636 "gcall *".
4637 (local_gcall_ptr_node): Rename...
4638 (local_gimple_ptr_node): ...to this.
4639
e540ccc0
DM
46402018-07-31 David Malcolm <dmalcolm@redhat.com>
4641
4642 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4643 table entries for gcc_diag_char_table, and the 'Z' entry from
4644 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4645 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4646 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4647 adding missing "Z" for this table. Remove erroneous "G" and "K"
4648 entries.
4649 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4650 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4651 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4652
425fc685
RE
46532018-07-31 Richard Earnshaw <rearnsha@arm.com>
4654
4655 * c-common.c (speculation_safe_resolve_call): New function.
4656 (speculation_safe_resolve_params): New function.
4657 (speculation_safe_resolve_return): New function.
4658 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4659 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4660 __HAVE_SPECULATION_SAFE_VALUE.
4661
181463c2
DM
46622018-07-20 David Malcolm <dmalcolm@redhat.com>
4663
4664 * c-common.c (c_cpp_error): Remove redundant "line_table"
4665 parameter from call to rich_location::set_range.
4666 (maybe_suggest_missing_token_insertion): Likewise.
4667
0d7f9065
MS
46682018-07-20 Martin Sebor <msebor@redhat.com>
4669
4670 PR middle-end/82063
ab20d992 4671 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4672
00abf86c
MS
46732018-07-20 Martin Sebor <msebor@redhat.com>
4674
4675 PR middle-end/82063
4676 * c-common.h (c_common_handle_option): Change function argument
4677 to HOST_WIDE_INT.
4678 * c-opts.c (c_common_init_options): Same.
4679 (c_common_handle_option): Same. Remove special handling of
4680 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4681 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4682 options to take a HOST_WIDE_INT argument and accept a byte-size
4683 suffix. Initialize.
4684 (-Wvla-larger-than): Same.
4685 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4686 (-Wno-vla-larger-than): Same.
4687
9b452033
JJ
46882018-07-12 Jakub Jelinek <jakub@redhat.com>
4689
4690 * c-attribs.c (c_common_attribute_table): Add
4691 "omp declare target implicit" attribute.
4692
cd0762f3
RB
46932018-07-12 Richard Biener <rguenther@suse.de>
4694
4695 PR c/86453
4696 * c-attribs.c (handle_packed_attribute): Do not build a variant
4697 type with TYPE_PACKED, instead ignore the attribute if we may
4698 not apply to the original type.
4699
0b27c3ed
JJ
47002018-07-10 Jakub Jelinek <jakub@redhat.com>
4701
4702 PR c++/86443
4703 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4704 to contain TREE_LIST for both the original class iterator and the
4705 "last" helper var.
4706
e730a0ef
EB
47072018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4708
4709 * c-ada-spec.c (to_ada_name): Remove index parameter.
4710 (pp_ada_tree_identifier): Likewise.
4711 (dump_ada_macros): Adjust call to to_ada_name.
4712 (struct overloaded_name_hash): Delete.
4713 (struct overloaded_name_hasher): Likewise.
4714 (overloaded_names): Likewise.
4715 (compute_overloading_index): Likewise.
4716 (dump_ada_decl_name): Do not call compute_overloading_index and
4717 adjust calls to pp_ada_tree_identifier.
4718 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4719 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4720 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4721 (dump_ada_enum_type): Remove type and display_convention parameters.
4722 Adjust calls to pp_ada_tree_identifier.
4723 (dump_ada_node): Likewise and for dump_ada_structure.
4724 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4725 and tidy up.
4726 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4727 syntax.
4728 (print_constructor): Adjust call to pp_ada_tree_identifier.
4729 (print_destructor): Likewise.
4730 (dump_ada_declaration): Switch to aspect syntax.
4731 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4732 parameter with nested parameter.
4733 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4734 (dump_ada_specs): Do not delete overloaded_names table.
4735
8de583fc
PB
47362018-07-06 Peter Bergner <bergner@linux.ibm.com>
4737
4738 PR target/86324
e730a0ef 4739 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4740 target hook.
4741
09cff37b
NS
47422018-07-05 Nathan Sidwell <nathan@acm.org>
4743
4744 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4745 NO_IMPLICIT_EXTERN_C.
4746
98086b2b
ML
47472018-06-28 Martin Liska <mliska@suse.cz>
4748
4749 * cppspec.c: Include opt-suggestions.h.
4750
ab20d992
JJ
47512018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4752 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4753 Cesar Philippidis <cesar@codesourcery.com>
4754
4755 * c-pragma.h (enum pragma_omp_clause): Add
4756 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4757 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4758
f41b7612
JJ
47592018-06-20 Jakub Jelinek <jakub@redhat.com>
4760
4761 PR c++/86210
4762 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4763 comment.
4764
4252ccd7
MS
47652018-06-18 Martin Sebor <msebor@redhat.com>
4766
4767 PR middle-end/85602
4768 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4769 nonstring.
4770
e197e64e
KV
47712018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4772
4773 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4774
34a7a230
JM
47752018-06-13 Jason Merrill <jason@redhat.com>
4776
5cef3733
JM
4777 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4778 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4779 handling.
4780
34a7a230
JM
4781 PR c++/86094 - wrong code with defaulted move ctor.
4782 * c-opts.c (c_common_post_options): Bump the current ABI version to
4783 13. Set warn_abi_version and flag_abi_compat_version to the current
4784 version rather than 0. Fix defaulting flag_abi_compat_version from
4785 warn_abi_version.
4786
bb0f14ae
MS
47872018-06-12 Martin Sebor <msebor@redhat.com>
4788
4789 PR c/85931
4790 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4791 sizeof source and destination yields the same value.
4792
3713f2e2
ML
47932018-06-12 Martin Liska <mliska@suse.cz>
4794
4795 * c.opt: Make MPX-related options as Deprecated.
4796
4af78ef8
DM
47972018-06-08 David Malcolm <dmalcolm@redhat.com>
4798
4799 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4800 rather than 0.
4801
31db0fe0
ML
48022018-06-08 Martin Liska <mliska@suse.cz>
4803
4804 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4805 for MPX (macros, related functions, fields in cgraph_node, ...).
4806 (handle_bnd_legacy): Likewise.
4807 (handle_bnd_instrument): Likewise.
4808 * c.opt: Likewise.
4809
fe16acf2
JJ
48102018-06-06 Jakub Jelinek <jakub@redhat.com>
4811
4812 PR c++/86068
4813 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4814 __cpp_transactional_memory to 201500 instead of 210500.
4815
4dbdb49b
JM
48162018-06-06 Jason Merrill <jason@redhat.com>
4817
4818 PR c++/85710 - ICE with -Wmemset-elt-size.
4819 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4820
f8ad043f
JM
48212018-06-01 Jason Merrill <jason@redhat.com>
4822
4823 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4824 201703.
4825
abc24d93
EB
48262018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4827
4828 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4829 declaration for a typedef independently of whether the declaration of
4830 the subtype is generated.
4831
d258f4aa
MS
48322018-05-31 Martin Sebor <msebor@redhat.com>
4833
4834 PR c/82063
4835 * c.opt (-Wno-alloc-size-larger-than): New option.
4836
b67b9225
DP
48372018-04-22 David Pagan <dave.pagan@oracle.com>
4838
4839 PR c/55976
4840 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4841 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4842 differentiate between default (no option), -Wreturn-type, and
4843 -Wno-return-type.
4844
04eb9c55
JM
48452018-05-29 Jason Merrill <jason@redhat.com>
4846
4847 * c.opt (Winit-list-lifetime): New flag.
4848
b0c31bc6
BE
48492018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4850
4851 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4852 splay_tree_delete_pointers.
4853
44284983
JJ
48542018-05-26 Jakub Jelinek <jakub@redhat.com>
4855
4856 PR bootstrap/85921
4857 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4858 noinline variable to workaround broken kernel headers.
4859
b46b715d
JM
48602018-05-18 Jason Merrill <jason@redhat.com>
4861
4862 * c.opt (Wdeprecated-copy): New flag.
4863
40659769
ML
48642018-05-17 Martin Liska <mliska@suse.cz>
4865
4866 * c-warn.c (overflow_warning): Do not use
4867 space in between 'G_' and '('.
4868
403962ea
JM
48692018-05-09 Jason Merrill <jason@redhat.com>
4870
4871 * c-common.c (valid_array_size_p): Add complain parameter.
4872 * c-common.h: ...which defaults to true.
4873
1c9ee609
JJ
48742018-05-11 Jakub Jelinek <jakub@redhat.com>
4875
4876 PR c/85696
4877 * c-omp.c (c_omp_predetermined_sharing): Return
4878 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4879
19916065
ML
48802018-05-11 Martin Liska <mliska@suse.cz>
4881
92a285c1 4882 PR sanitizer/85556
19916065
ML
4883 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4884 TREE_LIST values.
4885
79e7b1fe
JJ
48862018-05-10 Jakub Jelinek <jakub@redhat.com>
4887
4888 PR c++/85662
4889 * c-common.h (fold_offsetof_1): Removed.
4890 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4891 CTX argument defaulted to ERROR_MARK.
4892 * c-common.c (fold_offsetof_1): Renamed to ...
4893 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4894 argument, convert the pointer constant to TYPE and use size_binop
4895 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4896 a pointer type. Adjust recursive calls.
4897
86c12f76
EB
48982018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4899
4900 PR c++/85400
4901 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4902
ee336e84
NS
49032018-05-07 Nathan Sidwell <nathan@acm.org>
4904
4905 * c.opt (ffor-scope): Remove functionality, issue warning.
4906
6c072e21
NS
49072018-05-03 Nathan Sidwell <nathan@acm.org>
4908
4909 * c.opt (ffriend-injection): Remove functionality, issue warning.
4910
2cc7d3a7
DM
49112018-05-01 David Malcolm <dmalcolm@redhat.com>
4912
4913 PR c/84258
4914 * c-format.c (struct format_check_results): Add field
4915 "number_non_char".
4916 (check_format_info): Initialize it, and warn if encountered.
4917 (check_format_arg): Distinguish between wide char and
4918 everything else when detecting arrays of non-char.
4919
7761dfbe
DM
49202018-04-30 David Malcolm <dmalcolm@redhat.com>
4921
4922 * c-format.c (get_corrected_substring): Update for
4923 location_get_source_line returning a char_span. Use a char_span
4924 when handling the prefix of the correction.
4925 * c-indentation.c (get_visual_column): Update for
4926 location_get_source_line returning a char_span.
4927 (get_first_nws_vis_column): Likewise.
4928
62e98ef1
DM
49292018-03-29 David Malcolm <dmalcolm@redhat.com>
4930
4931 PR c++/84269
4932 * known-headers.cc (get_stdlib_header_for_name): Add various names
4933 from <assert.h>, <string.h>, and <memory.h>; add more names from
4934 <stdio.h>.
4935
a7dea617
JJ
49362018-03-27 Jakub Jelinek <jakub@redhat.com>
4937
4938 PR c++/85061
4939 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4940 get_base_address of the second operand is a VAR_P, rather than the
4941 operand itself, and use gcc_checking_assert instead of gcc_assert.
4942
889a3a30
MP
49432018-03-23 Marek Polacek <polacek@redhat.com>
4944
4945 PR c++/85045
4946 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4947 <case RDIV_EXPR>: Tweak condition.
4948
452154b9
EB
49492018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4950
4951 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4952
63ecb626
JJ
49532018-03-16 Jakub Jelinek <jakub@redhat.com>
4954
ce811fc4
JJ
4955 PR c/84909
4956 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4957 diagnostics.
4958
63ecb626
JJ
4959 PR c/84910
4960 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4961 diagnostics.
4962
a1295eec
RB
49632018-03-16 Richard Biener <rguenther@suse.de>
4964
4965 PR c/84873
4966 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4967 unshare the possibly folded expression.
4968
919674fb
RB
49692018-03-15 Richard Biener <rguenther@suse.de>
4970
4971 PR c/84873
4972 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4973
f99309b2
MS
49742018-03-13 Martin Sebor <msebor@redhat.com>
4975
4976 PR tree-optimization/84725
4977 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4978 with all three narrow character types, including their qualified forms.
4979
e9b9fa4c
MS
49802018-03-12 Martin Sebor <msebor@redhat.com>
4981
4982 PR tree-optimization/83456
ab20d992 4983 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4984 Restore checking of bounded built-in functions.
4985 (check_function_arguments): Also return the result
4986 of warn_for_restrict.
ab20d992
JJ
4987 * c-common.c (check_function_restrict): Return bool.
4988 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4989
0805d020
MP
49902018-03-02 Marek Polacek <polacek@redhat.com>
4991
4992 PR c++/84171
4993 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4994 is erroneous.
4995
ed2a2f08
TS
49962018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4997
4998 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4999 function".
5000
90abdde0
MP
50012018-03-01 Marek Polacek <polacek@redhat.com>
5002
5003 PR c++/84639
5004 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5005 alignment in computation.
5006
c6db43fa
EB
50072018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5008
5009 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5010 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5011
9e25c7ed
EB
50122018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5013
5014 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5015 (is_char_array): Take a type instead of a declaration.
5016 (dump_ada_array_type): Likewise.
5017 (is_simple_enum): Minor tweak.
5018 (dump_ada_enum_type): New function extracted from...
5019 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5020 <INTEGER_TYPE>: Remove unreachable code.
5021 <RECORD_TYPE>: Likewise. Minor tweaks.
5022 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5023 <ENUMERAL_TYPE>: New case.
5024 <RECORD_TYPE>: Factor out common code.
5025 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5026 Minor tweaks. Deal with enumeral types.
5027 (dump_ada_structure): Minor tweaks.
5028
09de3550
EB
50292018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5030
5031 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5032 address for incomplete structures.
5033 (dump_forward_type): Do not bail out for incomplete structures.
5034 (dump_ada_declaration): Do not special-case incomplete structures
5035 for subtypes. Dump them as null records for types.
5036
095d8d4b
EB
50372018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5038
5039 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5040 (is_char_array): Fix formatting.
5041 (dump_template_types): Likewise.
5042 (dump_generic_ada_node): Rename into...
5043 (dump_ada_node): ...this.
5044 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5045 incomplete structures and not for empty structures. Do not use it
5046 when forward declarations are needed.
5047 (dump_forward_type): New function.
5048 (dump_nested_types): Remove FORWARD parameter. Do not consider
5049 TREE_VISITED and do not generate a forward declaration. Only dump
5050 original nested types for nested declaration.
5051 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5052 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5053 <RECORD_TYPE>: Do not consider TREE_VISITED.
5054 (dump_ada_declaration): Use booleans and fix formatting throughout.
5055 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5056 Call dump_forward_type instead of dump_nested_types for a typedef.
5057 Remove superfluous check and adjust call to dump_nested_types.
5058 <POINTER_TYPE>: Call dump_forward_type and fall through.
5059 (dump_ada_struct_decl): Rename into...
5060 (dump_ada_structure): ...this. Do not special-case empty structures.
5061
d4cfd486
MS
50622018-02-27 Martin Sebor <msebor@redhat.com>
5063
5064 PR c++/83871
5065 * c.opt (-Wmissing-attributes): New option.
5066
b22dbd03
ML
50672018-02-21 Martin Liska <mliska@suse.cz>
5068
5069 * c.opt (Wcatch-value=): Add IntegerRange.
5070
883dfe2a
JM
50712018-02-15 Jason Merrill <jason@redhat.com>
5072
5073 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5074
0444aa9c
NS
50752018-02-09 Nathan Sidwell <nathan@acm.org>
5076
5077 PR c/84293
5078 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5079 arg.
5080 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5081 arg. Adjust.
5082
cea71f0a
MS
50832018-02-09 Martin Sebor <msebor@redhat.com>
5084
5085 PR lto/84212
5086 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5087 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5088 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5089 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5090 (-Wuninitialized): Same.
5091
8c8b7be5
EB
50922018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5093
5094 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5095 keyword for components.
5096
7c30b12a
PC
50972018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5098
5099 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5100
eece7fe5
JK
51012018-02-02 Julia Koval <julia.koval@intel.com>
5102
5103 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5104
7d07a93a
MP
51052018-01-29 Marek Polacek <polacek@redhat.com>
5106
5107 PR c/83966
5108 * c-format.c (check_function_format): Check current_function_decl.
5109
53723269
JJ
51102018-01-27 Jakub Jelinek <jakub@redhat.com>
5111
5112 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5113 argument.
5114 (LAZY_HEX_FP_VALUES_CNT): Define.
5115 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5116 values rather than just 12.
5117 (builtin_define_with_hex_fp_value): Likewise.
5118
7365279f
BK
51192018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5120
92a285c1
ML
5121 PR other/70268
5122 * c.opt (-fmacro-prefix-map): New option.
5123 * c-opts.c (c_common_handle_option): Handle it.
5124 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5125 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5126
bb9869d5
DM
51272018-01-17 David Malcolm <dmalcolm@redhat.com>
5128
5129 PR c++/83814
5130 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5131
68dc87c3
EB
51322018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5133
5134 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5135 Skip 'f' and 'F' characters if it is true.
5136 (store_ada_macro): Minor tweak.
5137 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5138 <CPP_WSTRING>: Likewise.
5139 <CPP_STRING>: Output '&' in the buffer if not the first string.
5140 <CPP_NUMBER>: Adjust calls to dump_number.
5141
9a004410
DM
51422018-01-10 David Malcolm <dmalcolm@redhat.com>
5143
5144 PR c++/43486
5145 * c-common.c: Include "selftest.h".
5146 (get_atomic_generic_size): Perform the test for integral type
5147 before the range test for any integer constant, fixing indentation
5148 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5149 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5150 (selftest::test_fold_for_warn): New function.
5151 (selftest::c_common_c_tests): New function.
5152 (selftest::c_family_tests): Call it, and
5153 selftest::c_pretty_print_c_tests.
5154 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5155 * c-format.c (check_format_arg): Convert VAR_P check to a
5156 fold_for_warn.
5157 * c-pretty-print.c: Include "selftest.h".
5158 (pp_c_cast_expression): Don't print casts for location wrappers.
5159 (selftest::assert_c_pretty_printer_output): New function.
5160 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5161 (selftest::test_location_wrappers): New function.
5162 (selftest::c_pretty_print_c_tests): New function.
5163 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5164
5c0caeb3
RS
51652018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5166 Alan Hayward <alan.hayward@arm.com>
5167 David Sherwood <david.sherwood@arm.com>
5168
5169 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5170
73a699ae
RS
51712018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5172 Alan Hayward <alan.hayward@arm.com>
5173 David Sherwood <david.sherwood@arm.com>
5174
5175 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5176 as polynomial.
5177
928686b1
RS
51782018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5179 Alan Hayward <alan.hayward@arm.com>
5180 David Sherwood <david.sherwood@arm.com>
5181
5182 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5183 (convert_vector_to_array_for_subscript): Handle polynomial
5184 TYPE_VECTOR_SUBPARTS.
5185 (c_common_type_for_mode): Check valid_vector_subparts_p.
5186 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5187 VECTOR_CST_NELTS.
5188
85ec4feb
JJ
51892018-01-03 Jakub Jelinek <jakub@redhat.com>
5190
5191 Update copyright years.
5192
170a8bd6 51932017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5194 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5195
5196 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5197 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5198
ab20d992 51992017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5200
5201 PR debug/83527
5202 PR debug/83419
5203 * c-semantics.c (only_debug_stmts_after_p): New.
5204 (pop_stmt_list): Clear side effects in debug-only stmt list.
5205 Check for single nondebug stmt followed by debug stmts only.
5206
c12d20d4
AO
52072017-12-21 Alexandre Oliva <aoliva@redhat.com>
5208
5209 PR debug/83419
5210 * c-semantics.c (pop_stmt_list): Propagate side effects from
5211 single nondebug stmt to container list.
5212
01512446
JJ
52132017-12-19 Jakub Jelinek <jakub@redhat.com>
5214
5215 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5216 conditions with typical order conditions.
5217
82cfbd01
MP
52182017-12-18 Marek Polacek <polacek@redhat.com>
5219
5220 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5221 not in effect.
5222
99da11ec
MS
52232017-12-17 Martin Sebor <msebor@redhat.com>
5224
5225 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5226 an error for attribute warn_if_not_aligned.
5227
cc8bea0a
MS
52282017-12-16 Martin Sebor <msebor@redhat.com>
5229
5230 PR tree-optimization/78918
5231 * c-common.c (check_function_restrict): Avoid checking built-ins.
5232 * c.opt (-Wrestrict): Include in -Wall.
5233
4849deb1
JJ
52342017-12-15 Jakub Jelinek <jakub@redhat.com>
5235
5236 * c-attribs.c (c_common_attribute_table,
5237 c_common_format_attribute_table): Swap affects_type_identity
5238 and handler fields, adjust comments.
5239
c65e18d3
BE
52402017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5241
5242 * c.opt (Wcast-function-type): New warning option.
5243 * c-lex.c (get_fileinfo): Avoid warning.
5244 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5245
2004617a
QZ
52462017-12-14 Qing Zhao <qing.zhao@oracle.com>
5247
7365279f 5248 PR middle_end/79538
2004617a
QZ
5249 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5250 Adjust the size of buf1 and buf2, add a new buf to avoid
5251 format-overflow warning.
5252
ab20d992 52532017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5254
5255 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5256 subsequent statement list.
5257
5d9ae53d
MS
52582017-12-07 Martin Sebor <msebor@redhat.com>
5259
5260 PR c/81544
5261 PR c/81566
5262 * c-attribs.c (attr_aligned_exclusions): New array.
5263 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5264 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5265 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5266 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5267 (attr_warn_unused_result_exclusions): Same.
5268 (handle_hot_attribute, handle_cold_attribute): Simplify.
5269 (handle_const_attribute): Warn on function returning void.
5270 (handle_pure_attribute): Same.
5271 (handle_aligned_attribute): Diagnose conflicting attribute
5272 specifications.
5273 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5274
c79144f8
DM
52752017-12-06 David Malcolm <dmalcolm@redhat.com>
5276
5277 PR c/83236
5278 * c-common.c (selftest::c_family_tests): Call
5279 selftest::c_spellcheck_cc_tests.
5280 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5281 * c-spellcheck.cc: Include "selftest.h".
5282 (name_reserved_for_implementation_p): New function.
5283 (should_suggest_as_macro_p): New function.
5284 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5285 should_suggest_as_macro_p and call it.
5286 (selftest::test_name_reserved_for_implementation_p): New function.
5287 (selftest::c_spellcheck_cc_tests): New function.
5288 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5289
613bc14f
DM
52902017-12-06 David Malcolm <dmalcolm@redhat.com>
5291
5292 * c-spellcheck.cc: New file, taken from macro-handling code in
5293 spellcheck-tree.c.
5294 * c-spellcheck.h: New file, taken from macro-handling code in
5295 spellcheck-tree.h.
5296
e76c7157
JJ
52972017-12-01 Jakub Jelinek <jakub@redhat.com>
5298
5299 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5300 attribute.
5301 (handle_simd_attribute): Don't check for "cilk simd function"
5302 attribute. Reindent, formatting changes.
5303
b0da4034
JK
53042017-11-30 Julia Koval <julia.koval@intel.com>
5305
5306 * c-common.h (inv_list): Remove.
5307
058f0b9e
JJ
53082017-11-28 Jakub Jelinek <jakub@redhat.com>
5309
5310 PR sanitizer/81275
5311 * c-common.c (c_switch_covers_all_cases_p_1,
5312 c_switch_covers_all_cases_p): New functions.
5313 * c-common.h (c_switch_covers_all_cases_p): Declare.
5314
5e9d6aa4 53152017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5316 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5317
5318 * array-notation-common.c: Delete.
5319 * c-cilkplus.c: Ditto.
5320 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5321 * c-common.def (ARRAY_NOTATION_REF): Remove.
5322 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5323 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5324 c_validate_cilk_plus_loop, cilkplus_an_parts,
5325 cilk_ignorable_spawn_rhs_op,
5326 cilk_recognize_spawn): Remove.
5327 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5328 * c-omp.c: Remove CILK_SIMD check.
5329 * c-pragma.c: Ditto.
5330 * c-pragma.h: Remove CILK related pragmas.
5331 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5332 ARRAY_NOTATION_REF condition.
5333 (c_pretty_printer::expression): Ditto.
5334 * c.opt (fcilkplus): Remove.
5335 * cilk.c: Delete.
5336
1af4ebf5
MG
53372017-11-21 Marc Glisse <marc.glisse@inria.fr>
5338
5339 * c-pretty-print.c (pp_c_additive_expression,
5340 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5341
d44ed508
JJ
53422017-11-21 Jakub Jelinek <jakub@redhat.com>
5343
7d2f0f9b
JJ
5344 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5345
d44ed508
JJ
5346 PR c++/83059
5347 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5348 instead of tree_to_uhwi, formatting fix.
5349
26edace6
DM
53502017-11-20 David Malcolm <dmalcolm@redhat.com>
5351
5352 PR c/81404
5353 * known-headers.cc: New file, based on material from c/c-decl.c.
5354 (suggest_missing_header): Copied as-is.
5355 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5356 heavily edited to add C++ support. Add some knowledge about
5357 <limits.h>, <stdint.h>, and <wchar.h>.
5358 * known-headers.h: Likewise.
5359
6c7a259b
DM
53602017-11-20 David Malcolm <dmalcolm@redhat.com>
5361
5362 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5363 (lookup_name_fuzzy): Likewise. Convert return type from
5364 const char * to name_hint. Add location_t param.
5365 * name-hint.h: New header.
5366
f9c59f7e
JJ
53672017-11-19 Jakub Jelinek <jakub@redhat.com>
5368
5369 PR c/66618
5370 PR c/69960
5371 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5372
1e39313a
JM
53732017-11-16 Joseph Myers <joseph@codesourcery.com>
5374
5375 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5376 expected publication date of C17.
5377 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5378
3ca0dc60
JM
53792017-11-15 Joseph Myers <joseph@codesourcery.com>
5380
5381 PR c/81156
5382 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5383 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5384
025d57f0
MS
53852017-11-10 Martin Sebor <msebor@redhat.com>
5386
5387 PR c/81117
5388 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5389 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5390 * c.opt (-Wstringop-truncation): New option.
5391
1b6fa695
ML
53922017-11-06 Martin Liska <mliska@suse.cz>
5393
5394 PR middle-end/82404
5395 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5396 FE.
5397 * c.opt: Set default value of warn_return_type.
5398
64a5912c
DM
53992017-10-31 David Malcolm <dmalcolm@redhat.com>
5400
5401 * c-common.c (binary_op_error): Update for renaming of
5402 error_at_rich_loc.
5403 (c_parse_error): Likewise.
5404 * c-warn.c (warn_logical_not_parentheses): Likewise for
5405 renaming of inform_at_rich_loc.
5406 (warn_for_restrict): Likewise for renaming of
5407 warning_at_rich_loc_n.
5408
c76dc9c3
JM
54092017-10-30 Joseph Myers <joseph@codesourcery.com>
5410
5411 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5412 * c-opts.c (set_std_c17): New function.
5413 (c_common_init_options): Use gnu17 as default C version.
5414 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5415
ee5fd23a
MM
54162017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5417
5418 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5419 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5420 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5421 __FP_FAST_FMA<N>X.
5422
d1047465
MP
54232017-10-23 Marek Polacek <polacek@redhat.com>
5424
5425 PR c/82681
5426 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5427
9e878cf1
EB
54282017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5429
5430 * c-common.c (check_builtin_function_arguments): Also check arguments
5431 of __builtin_alloca_with_align_and_max.
5432
89b6abbb
DM
54332017-10-17 David Malcolm <dmalcolm@redhat.com>
5434
5435 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5436 rather than NULL to format_warning_va.
5437 (check_format_types): Likewise when calling format_type_warning.
5438 Remove code to extract source_ranges and source_range * in favor
5439 of just a location_t.
5440 (format_type_warning): Convert source_range * param to a
5441 location_t.
5442
39382c09
JJ
54432017-10-13 Jakub Jelinek <jakub@redhat.com>
5444
5445 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5446 [LR]SHIFT_EXPR.
5447
62e1c678
DM
54482017-10-12 David Malcolm <dmalcolm@redhat.com>
5449
5450 * c-common.c (enum missing_token_insertion_kind): New enum.
5451 (get_missing_token_insertion_kind): New function.
5452 (maybe_suggest_missing_token_insertion): New function.
5453 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5454
b90c9338
NS
54552017-10-11 Nathan Sidwell <nathan@acm.org>
5456
5457 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5458 (c_common_handle_option): Update incpath_kind names.
5459
3a266bcd
ML
54602017-10-11 Martin Liska <mliska@suse.cz>
5461
5462 PR sanitizer/82490
5463 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5464 Wattributes warning.
5465
8e6cdc90
RS
54662017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5467
5468 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5469 operating on trees as wide_ints.
5470 * c-common.c (pointer_int_sum): Likewise.
5471 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5472 * c-warn.c (match_case_to_enum_1): Likewise.
5473 (c_do_switch_warnings): Likewise.
5474 (maybe_warn_shift_overflow): Likewise.
5475
802b38c9
JJ
54762017-10-10 Jakub Jelinek <jakub@redhat.com>
5477
5478 PR c/82437
5479 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5480 instead of wide_int::from.
5481
4e34b338
JJ
54822017-10-06 Jakub Jelinek <jakub@redhat.com>
5483
5484 PR c/82437
5485 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5486 using to_widest use wide_int with the larger of the two precisions.
5487
4bc4b2b4
BE
54882017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5489
5490 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5491 functions.
5492
a1488398
RS
54932017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5494
5495 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5496 when combining the original unconverted comparison operands.
5497
01c9fb68
JJ
54982017-09-29 Jakub Jelinek <jakub@redhat.com>
5499
5500 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5501 attribute.
5502
6e3e8419
EB
55032017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5504
5505 * c-ada-spec.c (to_ada_name): Add index parameter.
5506 (pp_ada_tree_identifier): Likewise.
5507 (dump_ada_macros): Adjust call to to_ada_name.
5508 (struct overloaded_name_hash): New type.
5509 (struct overloaded_name_hasher): Likewise.
5510 (overloaded_names): New hash table.
5511 (compute_overloading_index): New function.
5512 (dump_ada_decl_name): Call it and pass the result to
5513 pp_ada_tree_identifier.
5514 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5515 (dump_ada_function_declaration): Likewise.
5516 (dump_generic_ada_node): Likewise.
5517 (print_constructor): Likewise.
5518 (print_destructor): Likewise.
5519 (dump_ada_specs): Delete overloaded_names table.
5520
79310774
EB
55212017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5522
5523 * c-ada-spec.c (max_ada_macros): Move around.
5524 (store_ada_macro_index): Likewise.
5525 (source_file): Rename into...
5526 (macro_source_file): ...this.
5527 (count_ada_macro): Move around.
5528 (store_ada_macro): Likewise.
5529 (compare_macro): Likewise.
5530 (print_ada_macros): Merge in...
5531 (dump_ada_macros): ...this.
5532 (source_file_base): Rename into...
5533 (current_source_file): ...this.
5534 (print_comment): Move around.
5535 (dump_ada_nodes): Call dump_ada_declaration directly.
5536 (struct with): Change type of limited field to bool.
5537 (append_withs): Change type of limited_access parameter to bool.
5538 (pp_ada_tree_identifie): Likewise.
5539 (dump_ada_decl_nam): Likewise.
5540 (dump_generic_ada_node): Likewise. Do not print the return type.
5541 (to_ada_name): Change type of space_found parameter to bool.
5542 (dump_ada_function_declaration): Return void and change type of
5543 parameters to bool. Also print the return type for a function.
5544 (print_ada_methods): Rename into...
5545 (dump_ada_methods): ...this.
5546 (print_ada_declaration): Rename into ...
5547 (dump_ada_declaration): ...this. Do not print the return type.
5548 (print_ada_struct_decl): Rename into...
5549 (dump_ada_struct_decl): ...this.
5550
7d386d45
JJ
55512017-09-29 Jakub Jelinek <jakub@redhat.com>
5552
5553 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5554 rather than DECL_INITIAL.
5555 (common_handle_aligned_attribute): Likewise.
5556
ab20d992 55572017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5558
5559 * c.opt (gen-decls): Add RejectNegative.
5560
026a79f7
AS
55612017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5562 Jakub Jelinek <jakub@redhat.com>
5563
5564 Add support for -std=c++2a.
5565 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5566 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5567 * c-opts.c (set_std_cxx2a): New.
5568 (c_common_handle_option): Set options when -std=c++2a is enabled.
5569 (c_common_post_options): Adjust comments.
5570 (set_std_cxx14, set_std_cxx17): Likewise.
5571
4a8ca690
EB
55722017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5573
5574 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5575 message for non-uniform endianness and issue a warning in C++.
5576
7b936140
JJ
55772017-09-15 Jakub Jelinek <jakub@redhat.com>
5578
5579 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5580 (Wc++17-compat): Change from undocumented alias to option.
5581 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5582 change C++1z to C++17 in description.
5583 (std=c++1z, std=gnu++1z): Change from option to undocumented
5584 deprecated alias.
5585 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5586 Adjust description.
5587 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5588 * c-opts.c (set_std_cxx1z): Rename to ...
5589 (set_std_cxx17): ... this.
5590 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5591 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5592 caller.
7b936140
JJ
5593 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5594 comments.
5595
12263f13
L
55962017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5597
5598 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5599 function alignment if warn_if_not_aligned_p is true.
5600
6836632e
NS
56012017-09-12 Nathan Sidwell <nathan@acm.org>
5602
5603 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5604 resort_sorted_fields): Move to c/c-decl.c.
5605 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5606 (struct sorted_fields_type): Move to c/c-lang.h.
5607
019bf9ad
JW
56082017-09-09 Jonathan Wakely <jwakely@redhat.com>
5609
5610 PR c++/81852
5611 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5612
bc7fe952
MP
56132017-09-04 Marek Polacek <polacek@redhat.com>
5614
5615 PR c/81783
5616 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5617 (warn_tautological_cmp): Call it.
5618
ab20d992 56192017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5620
5621 * c-opts.c (c_common_finish): Write dependency information even if
5622 there are errors.
5623
d2e05fcb
JJ
56242017-09-01 Jakub Jelinek <jakub@redhat.com>
5625
5626 PR c/81887
5627 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5628 (omp_pragmas_simd): ... here.
5629 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5630 create new clauses list containing just simd clause.
5631
18e2a8b8
RS
56322017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5633 Alan Hayward <alan.hayward@arm.com>
5634 David Sherwood <david.sherwood@arm.com>
5635
5636 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5637 into scalar_mode_supported_p call.
5638 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5639
16d22000
RS
56402017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5641 Alan Hayward <alan.hayward@arm.com>
5642 David Sherwood <david.sherwood@arm.com>
5643
5644 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5645 for the mode iterator.
5646
b397965c
RS
56472017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5648 Alan Hayward <alan.hayward@arm.com>
5649 David Sherwood <david.sherwood@arm.com>
5650
5651 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5652 * c-common.c (c_build_vec_perm_expr): Likewise.
5653
357b7604
RS
56542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5655 Alan Hayward <alan.hayward@arm.com>
5656 David Sherwood <david.sherwood@arm.com>
5657
5658 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5659
e05c94ba
RS
56602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5661 Alan Hayward <alan.hayward@arm.com>
5662 David Sherwood <david.sherwood@arm.com>
5663
5664 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5665 before calling targetm.addr_space.valid_pointer_mode.
5666
5c20c4af
RS
56672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5668 Alan Hayward <alan.hayward@arm.com>
5669 David Sherwood <david.sherwood@arm.com>
5670
5671 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5672
c94843d2 56732017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5674 Alan Hayward <alan.hayward@arm.com>
5675 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5676
5677 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5678 iterators.
5679 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5680
4e10a5a7
RS
56812017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5682 Alan Hayward <alan.hayward@arm.com>
5683 David Sherwood <david.sherwood@arm.com>
5684
5685 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5686 case statements.
5687
130fcab0
ML
56882017-08-29 Martin Liska <mliska@suse.cz>
5689
5690 PR other/39851
5691 * c-common.c (parse_optimize_options): Add argument to function
5692 call.
5693 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5694
14e18d71
DM
56952017-08-24 David Malcolm <dmalcolm@redhat.com>
5696
5697 * c-lex.c (interpret_float): Use token location
5698 when building an EXCESS_PRECISION_EXPR.
5699
2f687306
DM
57002017-08-21 David Malcolm <dmalcolm@redhat.com>
5701
5702 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5703 it to check_function_format.
5704 * c-common.h (check_function_arguments): Add vec<location_t> *
5705 param.
5706 (check_function_format): Likewise.
5707 * c-format.c (struct format_check_context): Add field "arglocs".
5708 (check_function_format): Add param "arglocs"; pass it to
5709 check_format_info.
ab20d992 5710 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5711 new field of format_ctx.
5712 (check_format_arg): Pass format_ctx->arglocs to new param of
5713 check_format_info_main.
5714 (class argument_parser): New field "arglocs".
5715 (argument_parser::argument_parser): Add "arglocs_" param and use
5716 it to initialize new field.
5717 (argument_parser::check_argument_type): Pass new arglocs field to
5718 check_format_types.
5719 (check_format_info_main): Add param "arglocs", and use it when
5720 constructing arg_parser.
5721 (check_format_types): Add param "arglocs"; use it if non-NULL when
5722 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5723
00aa1fa2
L
57242017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5725
5726 PR c/53037
5727 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5728 (c_common_attribute_table): Add warn_if_not_aligned.
5729 (handle_aligned_attribute): Renamed to ...
5730 (common_handle_aligned_attribute): Remove argument, name, and add
5731 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5732 (handle_aligned_attribute): New.
5733 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5734
27be025d
MS
57352017-08-14 Martin Sebor <msebor@redhat.com>
5736
5737 PR c/81117
5738 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5739 (handle_nonstring_attribute): New function.
5740
da67acb9
MS
57412017-08-14 Martin Sebor <msebor@redhat.com>
5742
5743 PR c/81117
5744 * c-format.h (T89_G): New macro.
5745 * c-format.c (local_gcall_ptr_node): New variable.
5746 (init_dynamic_diag_info): Initialize it.
5747
a8b522b4
ML
57482017-08-11 Martin Liska <mliska@suse.cz>
5749
5750 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5751 TARGET_SUPPORTS_ALIASES.
5752
32129a17
DM
57532017-08-10 David Malcolm <dmalcolm@redhat.com>
5754
5755 * c-common.c (c_parse_error): Add rich_location * param, using it
5756 rather implicitly using input_location.
5757 * c-common.h (c_parse_error): Add rich_location * param.
5758
30af3a2b
MP
57592017-08-09 Marek Polacek <polacek@redhat.com>
5760
5761 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5762 (c_common_truthvalue_conversion): Likewise.
5763 * c-omp.c (c_finish_omp_atomic): Likewise.
5764 * c-common.h (build_binary_op): Update declaration.
5765
314e6352
ML
57662017-08-08 Martin Liska <mliska@suse.cz>
5767
5768 * c-ada-spec.c: Include header files.
5769 * c-ubsan.c: Likewise.
5770 * c-warn.c: Likewise.
5771
56b5041c
JJ
57722017-08-07 Jakub Jelinek <jakub@redhat.com>
5773
5774 PR c/69389
5775 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5776
db440138
EB
57772017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5778
5779 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5780 (print_ada_methods): Likewise.
5781 (print_ada_declaration): Likewise.
5782
577eec56
ML
57832017-08-07 Martin Liska <mliska@suse.cz>
5784
5785 * array-notation-common.c: Add new includes.
5786 * c-format.c( handle_format_attribute): Canonicalize a format
5787 function name.
5788 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5789 attribute.
5790 * c-pretty-print.c: Add new include.
5791
b854df3c
EB
57922017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5793
5794 * c-ada-spec.c (has_static_fields): Look only into variables.
5795 (print_constructor): Add TYPE parameter and use it for the name.
5796 (print_destructor): Likewise.
5797 (print_ada_declaration): Adjust to new constructor/destructor names.
5798 Adjust calls to print_constructor and print_destructor.
5799 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5800 Look only into variables in the final loop.
5801
9f2cb25e
EB
58022017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5803
5804 * c-ada-spec.c (has_static_fields): Look only into fields.
5805 (dump_generic_ada_node): Small tweak.
5806 (dump_nested_types): Look only into fields.
5807 (print_ada_declaration): Look only into methods. Small tweak.
5808 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5809
f4bcd9eb
EB
58102017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5811
5812 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5813 (dump_ada_function_declaration): Likewise.
5814 (dump_generic_ada_node): Likewise.
5815 (print_ada_declaration): Add support for const-qualified variables.
5816
f34ebeb2
ML
58172017-07-31 Martin Liska <mliska@suse.cz>
5818
5819 PR sanitize/81530
5820 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5821 Guard condition with flag_sanitize_p also with current_function_decl
5822 non-null equality.
5823 (ubsan_maybe_instrument_reference_or_call): Likewise.
5824
218e5d04
UB
58252017-07-30 Uros Bizjak <ubizjak@gmail.com>
5826
5827 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5828
942047f2
EB
58292017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5830
5831 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5832 for enumeral types.
5833 (print_ada_declaration): Add missing guard for record types.
5834
a40ff0ae
JJ
58352017-07-27 Jakub Jelinek <jakub@redhat.com>
5836
5837 PR c/45784
5838 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5839 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5840 new COMPOUND_EXPRs around the rhs of the comparison.
5841
06bd22f6
MP
58422017-07-27 Marek Polacek <polacek@redhat.com>
5843
5844 PR c/81417
5845 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5846 the types.
5847
036ea399
JJ
58482017-07-27 Jakub Jelinek <jakub@redhat.com>
5849
5850 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5851 (handle_noipa_attribute): New function.
5852
417ca011
TD
58532017-07-07 Torsten Duwe <duwe@suse.de>
5854
5855 * c-attribs.c (c_common_attribute_table): Add entry for
5856 "patchable_function_entry".
5857
5aaa8fb4
NS
58582017-07-20 Nathan Sidwell <nathan@acm.org>
5859
5860 Remove TYPE_METHODS.
5861 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5862 dump_ada_template, print_ada_methods,
5863 print_ada_declaration): Member fns are on TYPE_FIELDS.
5864
ff22eb12
NS
58652017-07-18 Nathan Sidwell <nathan@acm.org>
5866
5867 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5868
eea77d1f
DM
58692017-07-14 David Malcolm <dmalcolm@redhat.com>
5870
5871 * c-common.c (try_to_locate_new_include_insertion_point): New
5872 function.
5873 (per_file_includes_t): New typedef.
5874 (added_includes_t): New typedef.
5875 (added_includes): New variable.
5876 (maybe_add_include_fixit): New function.
5877 * c-common.h (maybe_add_include_fixit): New decl.
5878
281ac396
MS
58792017-07-10 Martin Sebor <msebor@redhat.com>
5880
5881 PR other/81345
5882 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5883
b6f43128
DM
58842017-07-06 David Malcolm <dmalcolm@redhat.com>
5885
5886 * c-common.c (selftest::c_family_tests): New.
5887 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5888 (selftest::c_family_tests): New decl.
5889
efbf55b0
MP
58902017-07-04 Marek Polacek <polacek@redhat.com>
5891
5892 PR c/81231
5893 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5894 types.
5895
6c86bd88
MP
58962017-07-04 Marek Polacek <polacek@redhat.com>
5897
5898 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5899
17a7218b
ML
59002017-06-28 Martin Liska <mliska@suse.cz>
5901
5902 PR ipa/81128
5903 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5904 to a function declaration.
5905
63010089
ML
59062017-06-28 Martin Liska <mliska@suse.cz>
5907
5908 PR driver/79659
5909 * c.opt: Add IntegerRange to various options.
5910
3e2becc4
MP
59112017-06-26 Marek Polacek <polacek@redhat.com>
5912
5913 PR c/80116
5914 * c-common.h (warn_for_multistatement_macros): Declare.
5915 * c-warn.c: Include "c-family/c-indentation.h".
5916 (warn_for_multistatement_macros): New function.
5917 * c.opt (Wmultistatement-macros): New option.
5918 * c-indentation.c (guard_tinfo_to_string): No longer static.
5919 Change the parameter type to "enum rid". Handle RID_SWITCH.
5920 * c-indentation.h (guard_tinfo_to_string): Declare.
5921
2db9b7cd
MG
59222017-06-23 Marc Glisse <marc.glisse@inria.fr>
5923
5924 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5925
c3684b7b
MS
59262017-06-15 Martin Sebor <msebor@redhat.com>
5927
5928 PR c++/80560
5929 * c.opt (-Wclass-memaccess): New option.
5930
e72c4afd
BK
59312017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5932
5933 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5934
8a516588
MP
59352017-06-13 Marek Polacek <polacek@redhat.com>
5936
5937 PR objc/80949
5938 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5939 branches is null.
5940
45b2222a
ML
59412017-06-13 Martin Liska <mliska@suse.cz>
5942
5943 PR sanitize/78204
5944 * c-attribs.c (add_no_sanitize_value): New function.
5945 (handle_no_sanitize_attribute): Likewise.
5946 (handle_no_sanitize_address_attribute): Use the function.
5947 (handle_no_sanitize_thread_attribute): New function.
5948 (handle_no_address_safety_analysis_attribute): Use
5949 add_no_sanitize_value.
5950 (handle_no_sanitize_undefined_attribute): Likewise.
5951 * c-common.h: Declare new functions.
5952 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5953 (ubsan_instrument_shift): Likewise.
5954 (ubsan_instrument_bounds): Likewise.
5955 (ubsan_maybe_instrument_array_ref): Likewise.
5956 (ubsan_maybe_instrument_reference_or_call): Likewise.
5957
a01f151f
JM
59582017-06-11 Jason Merrill <jason@redhat.com>
5959
5960 * c-ada-spec.c, c-pragma.c: Use id_equal.
5961
3de4ac6d
MP
59622017-06-04 Marek Polacek <polacek@redhat.com>
5963
5964 PR c/80919
5965 * c-format.c (matching_type_p): Return false if any of the types
5966 requires structural equality.
5967
2474f48f
MS
59682017-06-02 Martin Sebor <msebor@redhat.com>
5969
5970 PR c/80892
5971 * c-warn.c (conversion_warning): Use -Wconversion for integer
5972 conversion and -Wfloat-conversion for floating one.
5973
40ffd95f
BE
59742017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5975
5976 * c.opt (Wsizeof-pointer-div): New warning option.
5977
3fa4634c
VR
59782017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5979
5980 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5981 (Wcatch-value=1): Enable by -Wall.
5982
f012c8ef
DM
59832017-05-30 David Malcolm <dmalcolm@redhat.com>
5984
5985 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5986 format_chars.
5987 * c.opt (fdiagnostics-show-template-tree): New option.
5988 (felide-type): New option.
5989
63dbcd13
VR
59902017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5991
5992 * c.opt (Wcatch-value=): New C++ warning flag.
5993
be136b5c
NS
59942017-05-24 Nathan Sidwell <nathan@acm.org>
5995
5996 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5997 const casts to avoid warning.
5998
3cd211af
MS
59992017-05-24 Martin Sebor <msebor@redhat.com>
6000
6001 PR c/80731
6002 * c-common.h (unsafe_conversion_p): Add a function argument.
6003 * c-common.c (unsafe_conversion_p): Same.
6004 Add type names and values to diagnostics.
6005 (scalar_to_vector): Adjust.
6006 * c-warn.c (constant_expression_error): Add a function argument.
6007 Add type names and values to diagnostics.
6008 (conversion_warning): Add a function argument.
6009 Add type names and values to diagnostics.
6010 (warnings_for_convert_and_check): Same.
6011
1ff7be5a
JM
60122017-05-19 Jason Merrill <jason@redhat.com>
6013
6014 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6015 enumerators.
6016
ff502317
BE
60172017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6018
6019 * c-format.c (locus): Move out of function scope,
6020 add GTY attribute.
6021
2a8a8d7b
NS
60222017-05-19 Nathan Sidwell <nathan@acm.org>
6023
6024 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6025 (c_common_parse_file): Remove class dump handling.
6026 (get_dump_info): Likewise.
6027
39aac208
RB
60282017-05-19 Richard Biener <rguenther@suse.de>
6029
6030 PR c++/80593
6031 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6032 to alias-set zero memory.
6033
6ecd2339
BE
60342017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6035
6036 * c-format.c (local_tree_type_node): Add GTY attribute.
6037
6574d78e
MP
60382017-05-18 Marek Polacek <polacek@redhat.com>
6039
6040 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6041 (c_common_fixed_point_type_for_size): Likewise.
6042 (c_common_type_for_mode): Likewise.
6043 (shorten_compare): Likewise.
6044 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6045 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6046
e3455240
MP
60472017-05-18 Marek Polacek <polacek@redhat.com>
6048
6049 * c-common.c (self_promoting_args_p): Change the return type to bool.
6050 Use false/true instead of 0/1.
6051 * c-common.h (self_promoting_args_p): Update.
6052
3fa8871b
MP
60532017-05-17 Marek Polacek <polacek@redhat.com>
6054
6055 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6056 * c-warn.c: Likewise.
6057
b42cc3ca
VV
60582017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6059
6060 Implement new C++ intrinsics __is_assignable and __is_constructible.
6061 * c-common.c (__is_assignable, __is_constructible): New.
6062 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6063
1a817418
ML
60642017-05-17 Martin Liska <mliska@suse.cz>
6065
6066 * c-common.h: Introduce dump_flags_t type and
6067 use it instead of int type.
6068 * c-gimplify.c (c_genericize): Likewise.
6069 * c-opts.c: Likewise.
6070
b2fa0a8b
MP
60712017-05-17 Marek Polacek <polacek@redhat.com>
6072
6073 * c-common.c (c_save_expr): Remove.
6074 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6075 * c-common.h (c_save_expr): Remove declaration.
6076
31c2d57d
VR
60772017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6078
6079 PR c/35441
6080 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6081 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6082 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6083 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6084 RDIV_EXPR.
6085 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6086
684f84de
MP
60872017-05-09 Marek Polacek <polacek@redhat.com>
6088
6089 PR c/80525
6090 * c-warn.c (unwrap_c_maybe_const): New.
6091 (warn_logical_operator): Call it.
6092
641da50a
NS
60932017-05-09 Nathan Sidwell <nathan@acm.org>
6094
6095 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6096 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6097
631238ac
MS
60982017-05-08 Martin Sebor <msebor@redhat.com>
6099
6100 PR translation/80280
6101 * c-format.h (struct format_flag_spec): Add new member.
6102 (T89_T): New macro.
6103 * c-format.c (local_tree_type_node): New global.
6104 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6105 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6106 (strfmon_flag_specs): Likewise.
6107 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6108 with distinct quoting properties.
6109 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6110 (flag_chars_t::validate): Add argument and handle bad quoting.
6111 (check_format_info_main): Handle quoting problems.
6112 (init_dynamic_diag_info): Simplify.
6113
49f0c04c
JM
61142017-05-08 Jason Merrill <jason@redhat.com>
6115
6116 * c-opts.c (c_common_post_options): Update defaults for
6117 flag_abi_version and flag_abi_compat_version.
6118
56d35585
DM
61192017-05-05 David Malcolm <dmalcolm@redhat.com>
6120
6121 * c-common.c (c_cpp_error): Replace report_diagnostic
6122 with diagnostic_report_diagnostic.
6123
0f2c4a8f
MS
61242017-05-04 Martin Sebor <msebor@redhat.com>
6125
6126 PR translation/80280
6127 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6128 (handle_weakref_attribute): Same.
6129
6fe63fb4
NS
61302017-05-03 Nathan Sidwell <nathan@acm.org>
6131
6132 Canonicalize canonical type hashing
6133 * c-common.c (complete_array_type): Use type_hash_canon.
6134
815d9cc6
XR
61352017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6136
92a285c1 6137 PR c++/80038
815d9cc6
XR
6138 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6139 prototype.
6140 (cilk_install_body_pedigree_operations): Likewise.
6141 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6142 detatched.
6143 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6144 (cilk_install_body_pedigree_operations): Likewise.
6145 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6146 unwrapping.
6147
f8a36447
JJ
61482017-04-27 Jakub Jelinek <jakub@redhat.com>
6149
6150 PR c++/80534
6151 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6152 flag on non-aggregate element types.
6153
7c145456
BE
61542017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6155
6156 * c-common.c (c_type_hasher, type_hash_table): Remove.
6157 (c_common_get_alias_set): Remove unreachable code.
6158 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6159
c3cbcd45
VR
61602017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6161
6162 * c.opt (Wextra-semi): New C++ warning flag.
6163
8a59d466
JJ
61642017-04-20 Jakub Jelinek <jakub@redhat.com>
6165
6166 PR middle-end/80423
6167 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6168
8487c9a5
JJ
61692017-04-18 Jakub Jelinek <jakub@redhat.com>
6170
6171 PR middle-end/79788
6172 PR middle-end/80375
6173 * c-common.c (c_common_type_for_mode): Don't handle
6174 widest_*_literal_type_node here.
6175 c_common_signed_or_unsigned_type): Likewise.
6176 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6177 to *intTI_type_node or *intDI_type_node depending on whether
6178 TImode is supported by the target or not.
6179
3ee0fb02
ML
61802017-04-10 Martin Liska <mliska@suse.cz>
6181
6182 PR sanitizer/80350
6183 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6184 doing an UBSAN check.
6185
5764ee3c
JW
61862017-04-03 Jonathan Wakely <jwakely@redhat.com>
6187
6188 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6189
6f3af356
JJ
61902017-03-31 Jakub Jelinek <jakub@redhat.com>
6191
6192 PR c++/79572
6193 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6194 tree *.
6195 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6196 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6197 REFERENCE_TYPE.
6198
f6a7a9d5
DM
61992017-03-31 David Malcolm <dmalcolm@redhat.com>
6200
6201 PR documentation/78732
6202 * c.opt (Wendif-labels): Fix description to refer to
6203 #else rather than #elif.
6204
af88f557
JJ
62052017-03-31 Jakub Jelinek <jakub@redhat.com>
6206
6207 PR libstdc++/80251
6208 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6209 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6210
a9e4a1a5
JJ
62112017-03-27 Jakub Jelinek <jakub@redhat.com>
6212
6213 PR middle-end/80162
6214 * c-common.c (c_common_mark_addressable_vec): Don't set
6215 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6216
3f01b620
MS
62172017-03-21 Martin Sebor <msebor@redhat.com>
6218
6219 PR c++/79548
6220 * c-common.c (set_underlying_type): Mark type used only when
6221 original del is declared unused.
6222
2f6f187a
DM
62232017-03-10 David Malcolm <dmalcolm@redhat.com>
6224
6225 PR translation/79848
6226 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6227 "%qs".
6228
a02fa805
DM
62292017-03-10 David Malcolm <dmalcolm@redhat.com>
6230
6231 PR c/79921
6232 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6233 from inform's message, so that xgettext can locate it.
6234
822a132c
MP
62352017-03-09 Marek Polacek <polacek@redhat.com>
6236
6237 PR c++/79962
6238 PR c++/79984
6239 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6240 conversion to the attribute list.
6241
bba81f1c
ML
62422017-03-09 Martin Liska <mliska@suse.cz>
6243
6244 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6245
108154ff
JM
62462017-03-03 Jason Merrill <jason@redhat.com>
6247
6248 * c.opt (Wnoexcept-type): New.
6249
eb0e7c34
RB
62502017-03-02 Richard Biener <rguenther@suse.de>
6251
6252 PR c/79756
6253 * c-common.c (c_common_mark_addressable_vec): Look through
6254 C_MAYBE_CONST_EXPR.
6255
9453ba0a
ML
62562017-02-28 Martin Liska <mliska@suse.cz>
6257
6258 * c.opt: Replace space with tabular for options of <number>
6259 type.
6260
6a825afe
ML
62612017-02-28 Martin Liska <mliska@suse.cz>
6262
6263 * c.opt: Fix --help=option -Q for options which are of
6264 an enum type.
6265
4227c9ad
JJ
62662017-02-24 Jakub Jelinek <jakub@redhat.com>
6267
6268 PR c++/79588
6269 * c-common.c (check_function_restrict): New function.
6270 (check_function_arguments): Add FNDECL argument. Call
6271 check_function_restrict if -Wrestrict.
6272 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6273 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6274 * c-common.h (check_function_arguments): Add FNDECL argument.
6275 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6276
59909673
EB
62772017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6278
6279 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6280 treatment of parameters with pointer-to-tagged type and tidy up.
6281 (print_ada_methods): Remove the special treatment of C++ static member
6282 functions.
6283
54dcd526
ML
62842017-02-22 Martin Liska <mliska@suse.cz>
6285
6286 * c.opt: Replace inequality signs with square brackets
6287 for -Wnornalized.
6288
00bc9de3
JJ
62892017-02-21 Jakub Jelinek <jakub@redhat.com>
6290
6291 PR c++/79641
6292 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6293 preserve quals.
6294
97fcf744
JM
62952017-02-17 Joseph Myers <joseph@codesourcery.com>
6296
6297 * c-cppbuiltin.c (builtin_define_float_constants): Define
6298 __DECIMAL_DIG__ to the value for long double.
6299
c7545f1c
MP
63002017-02-15 Marek Polacek <polacek@redhat.com>
6301
6302 PR c/79515
6303 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6304 conversion has occured.
6305
c2e84327
DM
63062017-01-24 David Malcolm <dmalcolm@redhat.com>
6307
6308 * c-common.c (c_common_reswords): Add "__RTL".
6309 * c-common.h (enum rid): Add RID_RTL.
6310
2ebd93e1
MP
63112017-01-20 Marek Polacek <polacek@redhat.com>
6312
6313 PR c/64279
6314 * c-common.h (do_warn_duplicated_branches_r): Declare.
6315 * c-gimplify.c (c_genericize): Walk the function tree calling
6316 do_warn_duplicated_branches_r.
6317 * c-warn.c (expr_from_macro_expansion_r): New.
6318 (do_warn_duplicated_branches): New.
6319 (do_warn_duplicated_branches_r): New.
6320 * c.opt (Wduplicated-branches): New option.
6321
0d80ab91
DM
63222017-01-17 David Malcolm <dmalcolm@redhat.com>
6323
6324 PR c++/71497
6325 * c-indentation.c (warn_for_misleading_indentation): Use the past
6326 subjunctive in the note.
6327
7f991c36
AH
63282017-01-17 Aldy Hernandez <aldyh@redhat.com>
6329
6330 PR c/79116
6331 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6332 start type to integer_type.
6333
1c70261c
JJ
63342017-01-16 Jakub Jelinek <jakub@redhat.com>
6335
6336 PR driver/49726
6337 * c.opt (gen-decls): Add Driver flag.
6338
1ddca3f3
PC
63392017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6340
6341 Revert:
6342 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6343
6344 PR c++/71737
6345 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6346
7d2f3f1d
PC
63472017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6348
6349 PR c++/71737
6350 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6351
bce6f760
MS
63522017-01-12 Martin Sebor <msebor@redhat.com>
6353
6354 (-Wformat-overflow): ...to this.
6355
bf5fbf46
MS
63562017-01-11 Martin Sebor <msebor@redhat.com>
6357
6358 PR c/78768
6359 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6360 Also enable for LTO.
6361
e363df3f
JM
63622017-01-10 Jason Merrill <jason@redhat.com>
6363
6364 Implement P0195R2, C++17 variadic using.
6365 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6366
bd2c6270
JJ
63672017-01-09 Jakub Jelinek <jakub@redhat.com>
6368
6369 PR translation/79019
6370 PR translation/79020
6371 * c.opt (Wnormalized=): Fix typo in description.
6372
efcc8d38
MS
63732017-01-08 Martin Sebor <msebor@redhat.com>
6374
6375 PR middle-end/77708
6376 * c.opt (-Wformat-truncation): New option.
6377
ab20d992 63782017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6379
6380 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6381 value to unsigned short to fit in 4 hex digits without
6382 warnings.
6383
4e89adf9
EB
63842017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6385
6386 * c.opt (fsso-struct): Add 'native' value.
6387
cd445b54
ML
63882017-01-05 Martin Liska <mliska@suse.cz>
6389
6390 PR pch/78970
6391 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6392 header.
6393
a9342885
MP
63942017-01-04 Marek Polacek <polacek@redhat.com>
6395
6396 PR c++/64767
6397 * c.opt (Wpointer-compare): New option.
6398
fc73e60c
JJ
63992017-01-04 Jakub Jelinek <jakub@redhat.com>
6400
6401 PR driver/78957
6402 * c.opt (fsso-struct=): Add RejectNegative.
6403
cbe34bb5
JJ
64042017-01-01 Jakub Jelinek <jakub@redhat.com>
6405
6406 Update copyright years.
6407
d4a6c0ea
ML
64082016-12-29 Martin Liska <mliska@suse.cz>
6409
6410 PR c/78933
6411 * c.opt (strong-eval-order): Add RejectNegative keyword.
6412
67a5ad7c
JM
64132016-12-22 Jason Merrill <jason@redhat.com>
6414
6415 Implement P0522R0, matching of template template arguments.
6416 * c-cppbuiltin.c (c_cpp_builtins): Define
6417 __cpp_template_template_args.
6418
0dba7960
JJ
64192016-12-21 Jakub Jelinek <jakub@redhat.com>
6420
6421 PR bootstrap/78817
6422 * c-common.c (struct nonnull_arg_ctx): New type.
6423 (check_function_nonnull): Return bool instead of void. Use
6424 nonnull_arg_ctx as context rather than just location_t.
6425 (check_nonnull_arg): Adjust for the new context type, set
6426 warned_p to true if a warning has been diagnosed.
6427 (check_function_arguments): Return bool instead of void.
6428 * c-common.h (check_function_arguments): Adjust prototype.
6429
31bfc9b9
JM
64302016-12-21 Jason Merrill <jason@redhat.com>
6431
6432 * c.opt (-fnew-ttp-matching): New flag.
6433 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6434
629b3d75
MJ
64352016-12-14 Martin Jambor <mjambor@suse.cz>
6436
6437 * c-omp.c: Include omp-general.h instead of omp-low.h.
6438 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6439 name.
6440
474da67e
MS
64412016-12-14 Martin Sebor <msebor@redhat.com>
6442
6443 PR c/17308
6444 * c-common.c (check_nonnull_arg): Disable when optimization
6445 is enabled.
6446
fe366b87
MP
64472016-12-12 Marek Polacek <polacek@redhat.com>
6448
6449 PR c++/78647
6450 * c-common.c (attribute_fallthrough_p): Return false for
6451 error_mark_node.
6452
8bd9f164
MS
64532016-12-08 Martin Sebor <msebor@redhat.com>
6454
6455 PR c/78284
6456 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6457
060162e0
MS
64582016-12-08 Martin Sebor <msebor@redhat.com>
6459
6460 PR c/78165
92a285c1
ML
6461 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6462 suffix.
060162e0 6463
ee92e7ba
MS
64642016-12-07 Martin Sebor <msebor@redhat.com>
6465
6466 PR c/53562
6467 PR middle-end/77784
6468 PR middle-end/78149
6469 PR middle-end/78138
6470 * c.opt (-Wstringop-overflow): New option.
6471
84b0769e
MO
64722016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6473
6474 * c-attribs.c (asan odr indicator): New attribute.
6475 (handle_asan_odr_indicator_attribute): New function.
6476
7fa6a965
PK
64772016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6478
6479 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6480 ptrdiff_type_node;
6481
56d8ffc1
JG
64822016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6483
6484 * c-common.c (excess_precision_mode_join): New.
6485 (c_ts18661_flt_eval_method): New.
6486 (c_c11_flt_eval_method): Likewise.
6487 (c_flt_eval_method): Likewise.
6488 * c-common.h (excess_precision_mode_join): New.
6489 (c_flt_eval_method): Likewise.
6490 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6491 (cpp_iec_559_value): Call it.
6492 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6493 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6494 __FLT_EVAL_METHOD_TS_18661_3__.
6495
04f0fcf7
JG
64962016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6497
6498 * c-opts.c (c_common_post_options): Add logic to handle the default
6499 case for -fpermitted-flt-eval-methods.
6500
fb2675cb
PB
65012016-11-23 Paolo Bonzini <bonzini@gnu.org>
6502
6503 * c.opt (Wexpansion-to-defined): New.
6504
ec1c5694
JJ
65052016-11-23 Jakub Jelinek <jakub@redhat.com>
6506
6507 PR target/78451
6508 * c-pragma.c (handle_pragma_target): Don't replace
6509 current_target_pragma, but chainon the new args to the current one.
6510
730c9e75
NS
65112016-11-22 Nathan Sidwell <nathan@acm.org>
6512
6513 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6514 indentation and formatting.
730c9e75 6515
89990732
MS
65162016-11-21 Martin Sebor <msebor@redhat.com>
6517
6518 * c.opt (-fprintf-return-value): Enable by default.
6519
48330c93
BE
65202016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6521
6522 PR c++/71973
6523 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6524 * c-common.c (c_common_nodes_and_builtins): Initialize
6525 const_tm_ptr_type_node.
6526
0d939c95
MP
65272016-11-16 Marek Polacek <polacek@redhat.com>
6528
6529 PR c/78285
6530 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6531
8e745a17
JJ
65322016-11-14 Jakub Jelinek <jakub@redhat.com>
6533
6534 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6535
1ee62b92 65362016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6537 Richard Biener <rguenther@suse.de>
6538
6539 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6540 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6541 * c.opt (fgimple): New option.
1ee62b92 6542
22b15758
UB
65432016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6544
6545 PR c/35503
6546 * c-common.h (warn_for_restrict): Declare.
6547 * c-warn.c: Include gcc-rich-location.h.
6548 (warn_for_restrict): New function.
6549 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6550 (gcc_cdiag_char_table): Likewise.
6551 (gcc_cxxdiag_char_table): Likewise.
6552 * c.opt (Wrestrict): New option.
6553
4be719cd
EB
65542016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6555
6556 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6557 for nested types only if the type is a record or union and dump SLOC.
6558
4a826ca6
JM
65592016-11-09 Jason Merrill <jason@redhat.com>
6560
6561 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6562
2e955d50
JJ
65632016-11-09 Jakub Jelinek <jakub@redhat.com>
6564
6565 * c-ubsan.c (ubsan_instrument_shift): Handle split
6566 -fsanitize=shift-base and -fsanitize=shift-exponent.
6567
51dc6603
JM
65682016-11-07 Jason Merrill <jason@redhat.com>
6569
6570 * c.opt (Wc++1z-compat): New.
6571 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6572
6dc4a604
ML
65732016-11-07 Martin Liska <mliska@suse.cz>
6574
6575 * c-warn.c (warn_for_unused_label): Save all labels used
6576 in goto or in &label.
6577
b302001e
JM
65782016-11-03 Jason Merrill <jason@redhat.com>
6579
6580 * c-cppbuiltin.c (c_cpp_builtins): Correct
6581 __cpp_inheriting_constructors.
6582
31f7f784
JM
65832016-11-01 Jason Merrill <jason@redhat.com>
6584
2bc78e3c
JM
6585 * c-cppbuiltin.c (c_cpp_builtins): Update
6586 __cpp_inheriting_constructors.
6587
31f7f784
JM
6588 * c.opt (-fnew-inheriting-ctors): New.
6589 * c-opts.c: Default to on for ABI 11+.
6590
dcb466ec
JJ
65912016-10-31 Jakub Jelinek <jakub@redhat.com>
6592
6593 PR c++/77948
6594 * c.opt (fext-numeric-literals): Add Var and Init.
6595 * c-opts.c (c_common_handle_option): Don't clear
6596 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6597 (c_common_post_options): Clear it here if not set
6598 explicitly.
6599
52e1b91e
AH
66002016-10-28 Aldy Hernandez <aldyh@redhat.com>
6601
6602 PR debug/77773
6603 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6604 if NULL.
6605
e16f1cc7
JJ
66062016-10-25 Jakub Jelinek <jakub@redhat.com>
6607
6608 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6609 * c-common.c (c_common_reswords): Add __builtin_launder.
6610
f8348061
BE
66112016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6612
6613 * c-common.c (c_common_truthvalue_conversion): Warn for
6614 multiplications in boolean context. Fix the quoting of '<<' and '<'
6615 in the shift warning.
6616
eff89e01
BE
66172016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6618
6619 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6620
24bc7bf4
JM
66212016-10-20 Jason Merrill <jason@redhat.com>
6622
6623 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6624
4c712374
BE
66252016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6626
6627 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6628 integer shift ops in boolean context.
6629
66302016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6631
6632 * c.opt (Walloca): New.
6633 (Walloca-larger-than=): New.
6634 (Wvla-larger-than=): New.
6635
8fa18c06
MP
66362016-10-17 Marek Polacek <polacek@redhat.com>
6637
6638 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6639 Return immediately when finding a match.
6640 (warn_tautological_cmp): Remove a boolean variable that is no longer
6641 needed.
6642
b12b1915
MP
66432016-10-17 Marek Polacek <polacek@redhat.com>
6644
6645 * c-attribs.c: New file.
6646 * c-common.c: Move attributes handling to c-attribs.c.
6647 (get_nonnull_operand): No longer static.
6648 * c-common.h: Move the declarations from c-attribs.c to its own section.
6649
2045acd9
JM
66502016-10-14 Jason Merrill <jason@redhat.com>
6651
6652 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6653 and __cpp_deduction_guides.
6654
14a2c9aa
JM
66552016-10-13 Jason Merrill <jason@redhat.com>
6656
6657 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6658
4d0cdd0c
TP
66592016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6660
6661 * c-cppbuiltin.c: Include memmodel.h.
6662 * c-opts.c: Likewise.
6663 * c-pragma.c: Likewise.
6664 * c-warn.c: Likewise.
6665
70f6d5e1
JJ
66662016-10-12 Jakub Jelinek <jakub@redhat.com>
6667
6668 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6669 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6670 * c-opts.c (sanitize_cpp_opts): Initialize
6671 cpp_opts->cpp_warn_implicit_fallthrough.
6672
78f61294
MP
66732016-10-11 Marek Polacek <polacek@redhat.com>
6674
6675 * c-common.c (warning_candidate_p): Change the return type to bool
6676 and return true/false instead of 1/0.
6677 (vector_mode_valid_p): Likewise.
6678
038b5cc0
MP
66792016-10-11 Marek Polacek <polacek@redhat.com>
6680
6681 * c-common.c (fold_for_warn): No longer static.
6682 (bool_promoted_to_int_p): Likewise.
6683 (c_common_get_narrower): Likewise.
6684 (constant_expression_warning): Move to c-warn.c.
6685 (constant_expression_error): Likewise.
6686 (overflow_warning): Likewise.
6687 (warn_logical_operator): Likewise.
6688 (find_array_ref_with_const_idx_r): Likewise.
6689 (warn_tautological_cmp): Likewise.
6690 (expr_has_boolean_operands_p): Likewise.
6691 (warn_logical_not_parentheses): Likewise.
6692 (warn_if_unused_value): Likewise.
6693 (strict_aliasing_warning): Likewise.
6694 (sizeof_pointer_memaccess_warning): Likewise.
6695 (check_main_parameter_types): Likewise.
6696 (conversion_warning): Likewise.
6697 (warnings_for_convert_and_check): Likewise.
6698 (match_case_to_enum_1): Likewise.
6699 (match_case_to_enum): Likewise.
6700 (c_do_switch_warnings): Likewise.
6701 (warn_for_omitted_condop): Likewise.
6702 (readonly_error): Likewise.
6703 (lvalue_error): Likewise.
6704 (invalid_indirection_error): Likewise.
6705 (warn_array_subscript_with_type_char): Likewise.
6706 (warn_about_parentheses): Likewise.
6707 (warn_for_unused_label): Likewise.
6708 (warn_for_div_by_zero): Likewise.
6709 (warn_for_memset): Likewise.
6710 (warn_for_sign_compare): Likewise.
6711 (do_warn_double_promotion): Likewise.
6712 (do_warn_unused_parameter): Likewise.
6713 (record_locally_defined_typedef): Likewise.
6714 (maybe_record_typedef_use): Likewise.
6715 (maybe_warn_unused_local_typedefs): Likewise.
6716 (maybe_warn_bool_compare): Likewise.
6717 (maybe_warn_shift_overflow): Likewise.
6718 (warn_duplicated_cond_add_or_warn): Likewise.
6719 (diagnose_mismatched_attributes): Likewise.
6720 * c-common.h: Move the declarations from c-warn.c to its own section.
6721 * c-warn.c: New file.
6722
627be19f
JM
67232016-10-08 Jason Merrill <jason@redhat.com>
6724
6725 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6726 into COND_EXPR in C++.
6727
7bad794a
JJ
67282016-10-08 Jakub Jelinek <jakub@redhat.com>
6729
6730 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6731 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6732 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6733
be845b04
JJ
67342016-10-07 Jakub Jelinek <jakub@redhat.com>
6735
6736 Implement LWG2296 helper intrinsic
6737 * c-common.h (enum rid): Add RID_ADDRESSOF.
6738 * c-common.c (c_common_reswords): Add __builtin_addressof.
6739
c09c4992
BE
67402016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6741
6742 PR c++/77700
6743 * c-common.c (c_common_truthvalue_conversion): Warn also for
6744 suspicious enum values in boolean context.
6745
342cfb3e
JJ
67462016-10-06 Jakub Jelinek <jakub@redhat.com>
6747
6748 Implement P0258R2 - helper for C++17
6749 std::has_unique_object_representations trait
6750 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6751 * c-common.c (c_common_reswords): Add
6752 __has_unique_object_representations.
6753
2e69f143
JJ
67542016-10-05 Jakub Jelinek <jakub@redhat.com>
6755
6756 PR sanitizer/66343
6757 * c-ubsan.c (ubsan_instrument_return): Don't call
6758 initialize_sanitizer_builtins here.
6759
700fff34
BE
67602016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6761
6762 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6763 conditional expression in boolean context when only one arm is
6764 non-boolean.
6765
9563bfcd
JJ
67662016-10-05 Jakub Jelinek <jakub@redhat.com>
6767
04a32443
JJ
6768 PR sanitizer/77823
6769 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6770 is not integral.
6771
9563bfcd
JJ
6772 * c-common.c (c_common_reswords): Update comment for C++11.
6773
f1644724
JM
67742016-10-04 Jason Merrill <jason@redhat.com>
6775
6776 * c-common.c (make_tree_vector_from_ctor): New.
6777 * c-common.h: Declare it.
6778
5a79befb
JJ
67792016-10-04 Jakub Jelinek <jakub@redhat.com>
6780
6781 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6782 __LIBGCC_JCR_SECTION_NAME__.
6783
1633d3b9
BE
67842016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6785
6786 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6787 left shift in boolean context.
6788
a2c6e7f2
JJ
67892016-09-29 Jakub Jelinek <jakub@redhat.com>
6790
6791 Implement P0001R1 - C++17 removal of register storage class specifier
6792 * c.opt (Wregister): New warning.
6793 * c-opts.c (c_common_post_options): Enable -Wregister by
6794 default for C++17.
6795
75304c87
JG
67962016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6797
6798 * c-opts.c (c_common_post_options): Remove special case for
6799 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6800 in C++.
6801
bbfac6da
JJ
68022016-09-27 Jakub Jelinek <jakub@redhat.com>
6803
6e39060a
JJ
6804 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6805 -std=c++1z.
6806
bbfac6da
JJ
6807 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6808
e73cf9a2
TP
68092016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6810
6811 * c-common.c: Include memmodel.h.
6812
c6147dc4
MP
68132016-09-26 Marek Polacek <polacek@redhat.com>
6814
6815 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6816
81fea426
MP
68172016-09-26 Marek Polacek <polacek@redhat.com>
6818
6819 PR c/7652
6820 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6821 (handle_fallthrough_attribute): New function.
6822 (attribute_fallthrough_p): New function.
6823 * c-common.h (attribute_fallthrough_p): Declare.
6824
9a2300e9
MP
68252016-09-24 Marek Polacek <polacek@redhat.com>
6826
6827 PR c/77490
6828 * c.opt (Wbool-operation): New.
6829
a09e9e35
BE
68302016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6831
6832 * c-common.c (c_common_truthvalue_conversion): Inhibit
6833 Wint-in-bool-context warning with from_macro_definition_at.
6834 Mention the expression will always evaluate to true.
6835
d43b4ccc
MS
68362016-09-21 Martin Sebor <msebor@redhat.com>
6837
6838 PR bootstrap/77676
6839 * c.opt (fprintf-return-value): Temporarily initialize to zero
6840 to unblock bootstrap failures.
6841
2e1c20b1
JJ
68422016-09-21 Jakub Jelinek <jakub@redhat.com>
6843
6844 PR c++/77651
6845 * c.opt (Waligned-new=): Add RejectNegative.
6846 (faligned-new=): Likewise. Spelling fix - change
6847 aligned_new_threshhold to aligned_new_threshold.
6848 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6849 to aligned_new_threshold.
6850
88d0c3f0
MS
68512016-09-20 Martin Sebor <msebor@redhat.com>
6852
6853 PR middle-end/49905
6854 * c.opt: Add -Wformat-length and -fprintf-return-value.
6855
144a96e4
BE
68562016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6857
6858 PR c++/77434
6859 * c.opt (Wint-in-bool-context): New warning.
6860 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6861 constants in boolean context.
6862
63012d9a
JM
68632016-09-19 Joseph Myers <joseph@codesourcery.com>
6864
6865 * c-common.c (max_align_t_align): Also consider alignment of
6866 float128_type_node.
6867
931388ce
JM
68682016-09-15 Jason Merrill <jason@redhat.com>
6869
6870 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6871 DECL_EXTERNAL.
6872
38711381
JM
68732016-09-14 Jason Merrill <jason@redhat.com>
6874
6875 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6876 limit FIELD_DECL, either.
6877
e51fbec3
MP
68782016-09-14 Marek Polacek <polacek@redhat.com>
6879
6880 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6881 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6882 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6883
254830ba
DM
68842016-09-13 David Malcolm <dmalcolm@redhat.com>
6885
6886 * c-common.c (warn_logical_not_parentheses): Replace
6887 rich_location::add_fixit_insert calls with add_fixit_insert_before
6888 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6889
42763690
JM
68902016-09-13 Jason Merrill <jason@redhat.com>
6891 Tom de Vries <tom@codesourcery.com>
6892
6893 PR c++/77427
6894 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6895
9453eee9
JM
68962016-09-13 Jason Merrill <jason@redhat.com>
6897
6898 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6899 limit types at all.
6900
e96809e3
JM
69012016-09-12 Jason Merrill <jason@redhat.com>
6902
6903 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6904 bit/byte confusion, allow large alignment for types.
6905
54dcdb88
BE
69062016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6907
6908 PR c++/77496
6909 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6910
d1463eb9
DM
69112016-09-12 David Malcolm <dmalcolm@redhat.com>
6912
6913 PR c/72858
6914 * c-format.c (argument_parser::check_argument_type): Add params
6915 "type_start" and "conversion_char". Use the former to generate
6916 offset_to_type_start and pass it and conversion_char to
6917 check_format_types.
6918 (check_format_info_main): Capture the start of the type
6919 information as "type_start", and pass it an format_char
6920 to arg_parser.check_argument_type.
6921 (check_format_types): Provide an example in the leading comment.
6922 Add params "offset_to_type_start" and "conversion_char"; pass
6923 them to format_type_warning calls.
6924 (test_get_modifier_for_format_len): Likewise.
6925 (matching_type_p): New function.
6926 (get_format_for_type): Add param "conversion_char" and move
6927 implementation into...
6928 (get_format_for_type_1): ...new function, called twice.
6929 Use new function matching_type_p rather than checking for
6930 TYPE_CANONICAL equality.
6931 (get_corrected_substring): New function.
6932 (format_type_warning): Provide an example in the leading comment.
6933 Add params "offset_to_type_start" and "conversion_char". Replace
6934 call to get_format_for_type with call to get_corrected_substring
6935 and move rejection of hints for widths/precisions there.
6936 (assert_format_for_type_streq): Add param "conversion_char".
6937 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6938 (test_get_format_for_type_printf): Add conversion chars to the
6939 tests, adding coverage for various combinations of integer
6940 vs double conversions, and for preserving octal and hexadecimal
6941 conversions.
6942 (test_get_format_for_type_scanf): Add conversion chars to the
6943 tests.
6944
5b28efbb
TV
69452016-09-10 Tom de Vries <tom@codesourcery.com>
6946
6947 PR C/71602
6948 * c-common.c (build_va_arg): Handle more strict
6949 targetm.canonical_va_list_type. Replace first argument type error with
6950 assert.
6951
3f0177e7
MS
69522016-09-09 Martin Sebor <msebor@redhat.com>
6953
6954 PR c/77520
6955 PR c/77521
6956 * c-format.c (argument_parser::find_format_char_info): Use %qc
6957 format directive unconditionally.
6958
af63ba4b
JM
69592016-09-09 Jason Merrill <jason@redhat.com>
6960
6961 Implement C++17 new of over-aligned types.
6962 * c.opt: Add -faligned-new and -Waligned-new.
6963 * c-common.c (max_align_t_align): Split out from...
6964 (cxx_fundamental_alignment_p): ...here.
6965 * c-common.h: Declare it.
6966 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6967
c65248cb
JM
69682016-09-09 Joseph Myers <joseph@codesourcery.com>
6969
6970 * c-cppbuiltin.c (builtin_define_type_width): New function.
6971 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6972 macros.
6973
e5106e27
DM
69742016-09-07 David Malcolm <dmalcolm@redhat.com>
6975
6976 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6977 a POINTER_TYPE.
6978 (substring_loc::get_location): Move to substring-locations.c,
6979 keeping implementation as...
6980 (c_get_substring_location): New function, from the above, reworked
6981 to use accessors rather than member lookup.
6982 * c-common.h (class substring_loc): Move to substring-locations.h,
6983 replacing with a forward decl.
6984 (c_get_substring_location): New decl.
6985 * c-format.c: Include "substring-locations.h".
6986 (format_warning_va): Move to substring-locations.c.
6987 (format_warning_at_substring): Likewise.
6988
ab20d992 69892016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6990
6991 PR c/77336
6992 * c-format.c (check_function_format): Avoid issuing warnings for
6993 functions unless they call format functions with non-constant
6994 format strings.
6995
b772a565
RB
69962016-09-06 Richard Biener <rguenther@suse.de>
6997
6998 PR c/77450
6999 * c-common.c (c_common_mark_addressable_vec): Handle
7000 COMPOUND_LITERAL_EXPR.
7001
25ff5dd3
MP
70022016-09-05 Marek Polacek <polacek@redhat.com>
7003
7004 PR c/77423
7005 * c-common.c (bool_promoted_to_int_p): New function.
7006 (expr_has_boolean_operands_p): New function.
7007 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7008 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7009
21234eb5
TV
70102016-09-04 Tom de Vries <tom@codesourcery.com>
7011
7012 revert:
7013 2016-08-29 Tom de Vries <tom@codesourcery.com>
7014
7015 * c-common.c (build_va_arg): Replace first argument type error
7016 with assert.
7017
9dc5773f
JJ
70182016-09-02 Jakub Jelinek <jakub@redhat.com>
7019
7020 PR c/65467
7021 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7022 (c_finish_omp_for): Reject _Atomic qualified iterators.
7023
70242016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7025
7026 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7027 size to guarantee it fits the output of the formatted function
7028 regardless of its arguments.
7029
295844f6
MP
70302016-09-01 Marek Polacek <polacek@redhat.com>
7031
7032 PR c/7652
7033 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7034 FALLTHRU comments.
7035
3d06b6f2
MP
70362016-08-29 Marek Polacek <polacek@redhat.com>
7037
7038 PR c/77292
7039 * c-common.c (warn_logical_not_parentheses): Don't warn for
7040 a comparison or a logical operator.
7041
34cedad5
TV
70422016-08-29 Tom de Vries <tom@codesourcery.com>
7043
7044 * c-common.c (build_va_arg): Fix type comparison assert.
7045
f162d717
TV
70462016-08-29 Tom de Vries <tom@codesourcery.com>
7047
7048 * c-common.c (build_va_arg): Replace first argument type error
7049 with assert.
7050
ba9bbd6f
TV
70512016-08-29 Tom de Vries <tom@codesourcery.com>
7052
7053 PR c/77398
7054 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7055 with error_mark_node as va_list instead of with illegal va_list.
7056
ebef225f
MP
70572016-08-25 Marek Polacek <polacek@redhat.com>
7058 David Malcolm <dmalcolm@redhat.com>
7059
7060 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7061 * c-common.h (warn_logical_not_parentheses): Update declaration.
7062
b00e6e75
MP
70632016-08-22 Marek Polacek <polacek@redhat.com>
7064
7065 PR c++/77321
7066 * c-common.c (warn_for_memset): Check type for null.
7067
6dc198e3
JM
70682016-08-22 Joseph Myers <joseph@codesourcery.com>
7069
14ec014e 7070 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7071 _FloatNx types for suffixes for built-in functions.
7072
c65699ef
JM
70732016-08-19 Joseph Myers <joseph@codesourcery.com>
7074
7075 PR c/32187
7076 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7077 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7078 (RID_FLOAT128X): New enum rid values.
7079 (CASE_RID_FLOATN_NX): New macro.
7080 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7081 keywords.
7082 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7083 corresponding complex types.
7084 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7085 _FloatNx and corresponding complex types.
7086 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7087 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7088 and _FloatNx types for the widest type for determining
7089 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7090 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7091 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7092 and _FloatNx types.
7093 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7094 constants.
7095 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7096 _FloatNx types.
7097
cc015f3a
DM
70982016-08-18 David Malcolm <dmalcolm@redhat.com>
7099
7100 * c-opts.c (c_diagnostic_finalizer): Update for change to
7101 diagnostic_show_locus.
7102
cb18fd07
DM
71032016-08-18 David Malcolm <dmalcolm@redhat.com>
7104
7105 * c-common.c: Include "spellcheck.h".
7106 (cb_get_suggestion): New function.
7107 * c-common.h (cb_get_suggestion): New decl.
7108 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7109 cb_get_suggestion.
7110
a76989dc
MP
71112016-08-18 Marek Polacek <polacek@redhat.com>
7112
7113 PR c/71514
7114 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7115 and pointer-to-VLA.
7116
65e736c0
DM
71172016-08-16 David Malcolm <dmalcolm@redhat.com>
7118
7119 PR c/72857
7120 * c-common.c (substring_loc::get_range): Rename to...
7121 (substring_loc::get_location): ...this, converting param from a
7122 source_range * to a location_t *. Call
7123 get_source_location_for_substring rather than
7124 get_source_range_for_substring, and pass in m_caret_idx.
7125 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7126 (substring_loc::get_range): Replace with...
7127 (substring_loc::get_location): ...this.
7128 (substring_loc::set_caret_index): New method.
7129 (substring_loc): Add field m_caret_idx.
7130 * c-format.c (format_warning_va): Update for above changes.
7131 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7132 clashing with type name.
7133 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7134 (check_argument_type): Likewise.
7135 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7136 Use a copy when emitting warnings, setting the caret index from TYPE.
7137
7e1dde14 71382016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7139 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7140
7141 * c-ada-spec.c (dump_number): New function.
7142 (handle_escape_character): Likewise.
7143 (print_ada_macros): Add handling of constant integers and strings.
7144
191816a3
MP
71452016-08-12 Marek Polacek <polacek@redhat.com>
7146
7147 PR c/7652
7148 * c-common.c (scalar_to_vector): Adjust fall through comment.
7149 * c-opts.c (c_common_handle_option): Likewise.
7150 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7151 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7152 fall through comment.
7153 * cilk.c (extract_free_variables): Add FALLTHRU.
7154
452df4a4
JM
71552016-08-10 Jason Merrill <jason@redhat.com>
7156
7157 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7158
f3365c12
JM
71592016-08-09 Jason Merrill <jason@redhat.com>
7160
7161 * c-common.c (c_common_attribute_table): vector_size affects type
7162 identity.
7163
f0bc3323
MP
71642016-08-09 Marek Polacek <polacek@redhat.com>
7165
7166 PR c/7652
7167 * c-ada-spec.c (dump_generic_ada_node): Add return.
7168
98e5a19a
JM
71692016-08-09 Jason Merrill <jason@redhat.com>
7170
7171 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7172 C++17 constexpr lambdas.
7173
895aa8e1
DM
71742016-08-08 David Malcolm <dmalcolm@redhat.com>
7175
7176 PR c/64955
7177 * c-common.h (selftest::c_format_c_tests): New declaration.
7178 (selftest::run_c_tests): New declaration.
7179 * c-format.c: Include "selftest.h.
7180 (format_warning_va): Add param "corrected_substring" and use
7181 it to add a replacement fix-it hint.
7182 (format_warning_at_substring): Likewise.
7183 (format_warning_at_char): Update for new param of
7184 format_warning_va.
7185 (argument_parser::check_argument_type): Pass "fki" to
7186 check_format_types.
7187 (check_format_types): Add param "fki" and pass it to
7188 format_type_warning.
7189 (deref_n_times): New function.
7190 (get_modifier_for_format_len): New function.
7191 (selftest::test_get_modifier_for_format_len): New function.
7192 (get_format_for_type): New function.
7193 (format_type_warning): Add param "fki" and use it to attempt
7194 to provide hints for argument types when calling
7195 format_warning_at_substring.
7196 (selftest::get_info): New function.
7197 (selftest::assert_format_for_type_streq): New function.
7198 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7199 (selftest::test_get_format_for_type_printf): New function.
7200 (selftest::test_get_format_for_type_scanf): New function.
7201 (selftest::c_format_c_tests): New function.
7202
e52ed3fe
DM
72032016-08-08 David Malcolm <dmalcolm@redhat.com>
7204
7205 PR c/52952
7206 * c-format.c: Include "diagnostic.h".
7207 (location_column_from_byte_offset): Delete.
7208 (location_from_offset): Delete.
7209 (format_warning_va): New function.
7210 (format_warning_at_substring): New function.
7211 (format_warning_at_char): New function.
7212 (check_format_arg): Capture location of format_tree and pass to
7213 check_format_info_main.
7214 (argument_parser): Add fields "start_of_this_format" and
7215 "format_string_cst".
7216 (flag_chars_t::validate): Add param "format_string_cst". Convert
7217 warning_at call using location_from_offset to call to
7218 format_warning_at_char.
7219 (argument_parser::argument_parser): Add param "format_string_cst_"
7220 and use use it to initialize field "format_string_cst".
7221 Initialize new field "start_of_this_format".
7222 (argument_parser::read_format_flags): Convert warning_at call
7223 using location_from_offset to a call to format_warning_at_char.
7224 (argument_parser::read_any_format_left_precision): Likewise.
7225 (argument_parser::read_any_format_precision): Likewise.
7226 (argument_parser::read_any_other_modifier): Likewise.
7227 (argument_parser::find_format_char_info): Likewise, in three places.
7228 (argument_parser::parse_any_scan_set): Likewise, in one place.
7229 (argument_parser::handle_conversions): Likewise, in two places.
7230 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7231 and use it to make a substring_loc. Pass the latter to
7232 check_format_types.
7233 (check_format_info_main): Add params "fmt_param_loc" and
7234 "format_string_cst". Convert warning_at calls using
7235 location_from_offset to calls to format_warning_at_char. Pass the
7236 new params to the arg_parser ctor. Pass "format_string_cst" to
7237 flag_chars.validate. Pass "fmt_param_loc" to
7238 arg_parser.check_argument_type.
7239 (check_format_types): Convert first param from a location_t
7240 to a const substring_loc & and rename to "fmt_loc". Attempt
7241 to extract the range of the relevant parameter and pass it
7242 to format_type_warning.
7243 (format_type_warning): Convert first param from a location_t
7244 to a const substring_loc & and rename to "fmt_loc". Add
7245 params "param_range" and "type". Replace calls to warning_at
7246 with calls to format_warning_at_substring.
7247
1c4d457e
DM
72482016-08-08 David Malcolm <dmalcolm@redhat.com>
7249
7250 * c-format.c (class flag_chars_t): New class.
7251 (struct length_modifier): New struct.
7252 (class argument_parser): New class.
7253 (flag_chars_t::flag_chars_t): New ctor.
7254 (flag_chars_t::has_char_p): New method.
7255 (flag_chars_t::add_char): New method.
7256 (flag_chars_t::validate): New method.
7257 (flag_chars_t::get_alloc_flag): New method.
7258 (flag_chars_t::assignment_suppression_p): New method.
7259 (argument_parser::argument_parser): New ctor.
7260 (argument_parser::read_any_dollar): New method.
7261 (argument_parser::read_format_flags): New method.
7262 (argument_parser::read_any_format_width): New method.
7263 (argument_parser::read_any_format_left_precision): New method.
7264 (argument_parser::read_any_format_precision): New method.
7265 (argument_parser::handle_alloc_chars): New method.
7266 (argument_parser::read_any_length_modifier): New method.
7267 (argument_parser::read_any_other_modifier): New method.
7268 (argument_parser::find_format_char_info): New method.
7269 (argument_parser::validate_flag_pairs): New method.
7270 (argument_parser::give_y2k_warnings): New method.
7271 (argument_parser::parse_any_scan_set): New method.
7272 (argument_parser::handle_conversions): New method.
7273 (argument_parser::check_argument_type): New method.
7274 (check_format_info_main): Introduce classes argument_parser
7275 and flag_chars_t, moving the code within the loop into methods
7276 of these classes. Make various locals "const".
7277
88fa5555
DM
72782016-08-05 David Malcolm <dmalcolm@redhat.com>
7279
7280 * c-common.c: Include "substring-locations.h".
7281 (get_cpp_ttype_from_string_type): New function.
7282 (g_string_concat_db): New global.
7283 (substring_loc::get_range): New method.
7284 * c-common.h (g_string_concat_db): New declaration.
7285 (class substring_loc): New class.
7286 * c-lex.c (lex_string): When concatenating strings, capture the
7287 locations of all tokens using a new obstack, and record the
7288 concatenation locations within g_string_concat_db.
7289 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7290 on the ggc-heap.
7291
78169471
MP
72922016-07-29 Marek Polacek <polacek@redhat.com>
7293
638fc14f
MP
7294 PR c/71926
7295 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7296 parentheses warning.
7297
78169471
MP
7298 PR c/71574
7299 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7300
1225d6b1
ML
73012016-07-28 Martin Liska <mliska@suse.cz>
7302
7303 PR gcov-profile/68025
7304 * c-common.c (handle_no_profile_instrument_function_attribute):
7305
ec1e2a40
BE
73062016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7307
7308 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7309 BITS_PER_UNIT_LOG.
7310
5ec2cd9f
JM
73112016-07-25 Jason Merrill <jason@redhat.com>
7312
7313 PR c++/65970
7314 * c.opt (fconstexpr-loop-limit): New.
7315
9dc5773f 73162016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7317
7318 PR c++/71675
7319 * c-common.c (resolve_overloaded_builtin): Avoid converting
7320 __atomic_compare_exchange_n return type to that of what its
7321 first argument points to.
7322
e3fe09c1
UB
73232016-07-22 Uros Bizjak <ubizjak@gmail.com>
7324
7325 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7326 ~(unsigned HOST_WIDE_INT) 0.
7327
bc91c436
ML
73282016-07-22 Martin Liska <mliska@suse.cz>
7329
7330 PR gcov-profile/69028
7331 PR gcov-profile/62047
7332 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7333 to the current_function_decl.
7334
451dcc66
JM
73352016-07-21 Jason Merrill <jason@redhat.com>
7336
7337 PR c++/65168
7338 * c-common.c (c_common_truthvalue_conversion): Check
7339 c_inhibit_evaluation_warnings for warning about address of
7340 reference.
7341
de6a69ee
DM
73422016-07-20 David Malcolm <dmalcolm@redhat.com>
7343
7344 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7345 const char *.
7346
d022c55a
JM
73472016-07-15 Jason Merrill <jason@redhat.com>
7348
7349 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7350
ddbbcb19
JJ
73512016-07-15 Jakub Jelinek <jakub@redhat.com>
7352
7353 PR c/71858
7354 * c-common.h (enum lookup_name_fuzzy_kind): Add
7355 FUZZY_LOOKUP_FUNCTION_NAME.
7356
d0cf395a
JM
73572016-07-08 Jason Merrill <jason@redhat.com>
7358
7359 P0145: Refining Expression Order for C++.
7360 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7361 * c-opts.c: Adjust.
7362
98d44e93
MT
73632016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7364
7365 PR c++/71214
7366 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7367
f9d8d994
TS
73682016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7369
7370 * c-pragma.h (enum pragma_kind): Rename
7371 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7372 users.
7373
4aa83879
RB
73742016-06-29 Richard Biener <rguenther@suse.de>
7375
7376 PR middle-end/71002
7377 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7378
a25bd9e6
JM
73792016-06-24 Jason Merrill <jason@redhat.com>
7380
7381 P0145R2: Refining Expression Order for C++.
7382 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7383 MODIFY_EXPR.
7384
a86451b9
JJ
73852016-06-24 Jakub Jelinek <jakub@redhat.com>
7386
7387 * c-common.c (check_builtin_function_arguments): Require last
7388 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7389 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7390 if the last argument is pointer to enumerated or boolean type.
7391
1a4f11c8
DM
73922016-06-22 David Malcolm <dmalcolm@redhat.com>
7393
7394 PR c/70339
7395 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7396 (lookup_name_fuzzy): New prototype.
7397
fe55692c
JDA
73982016-06-21 John David Anglin <danglin@gcc.gnu.org>
7399
7400 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7401
4eb24e01
JM
74022016-06-14 Jason Merrill <jason@redhat.com>
7403
7404 P0145R2: Refining Expression Order for C++.
7405 * c.opt (fargs-in-order): New.
7406 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7407
ef7cf206
JJ
74082016-06-13 Jakub Jelinek <jakub@redhat.com>
7409
0dda258b
JJ
7410 PR sanitizer/71498
7411 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7412 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7413
ef7cf206
JJ
7414 PR preprocessor/71183
7415 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7416 to cb_get_source_date_epoch.
7417
50b15873
JJ
74182016-06-10 Jakub Jelinek <jakub@redhat.com>
7419
7420 PR c/68657
7421 * c.opt (Wpsabi): Add Warning flag.
7422
4d926e34
MS
74232016-06-10 Martin Sebor <msebor@redhat.com>
7424
7425 PR c/71392
14ec014e 7426 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7427 the nonnull attribute in type-generic builtins.
7428
e01b4e16
MS
74292016-06-09 Martin Sebor <msebor@redhat.com>
7430
7431 PR c/70883
7432 * c-common.c (builtin_function_validate_nargs): Make text of error
7433 message consistent with others like it.
7434
44a845ca
MS
74352016-06-08 Martin Sebor <msebor@redhat.com>
7436 Jakub Jelinek <jakub@redhat.com>
7437
7438 PR c++/70507
7439 PR c/68120
7440 * c-common.c (check_builtin_function_arguments): Handle
7441 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7442
a80a7051
RB
74432016-06-08 Richard Biener <rguenther@suse.de>
7444
7445 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7446
bfd67b47
RB
74472016-06-07 Richard Biener <rguenther@suse.de>
7448
7449 PR c/61564
7450 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7451 options and warn about others.
7452
15c98b2e
ES
74532016-06-01 Eduard Sanou <dhole@openmailbox.org>
7454
7455 * c-common.c (get_source_date_epoch): Rename to
7456 cb_get_source_date_epoch.
7457 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7458 message when the parsing fails. Use error_at instead of fatal_error.
7459 * c-common.h (get_source_date_epoch): Rename to
7460 cb_get_source_date_epoch.
7461 * c-common.h (cb_get_source_date_epoch): Prototype.
7462 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7463 * c-common.h (c_omp_region_type): Remove trailing comma.
7464 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7465 * c-lex.c (c_lex_with_flags): Remove initialization of
7466 pfile->source_date_epoch.
7467
00631022
JJ
74682016-05-30 Jakub Jelinek <jakub@redhat.com>
7469
7470 PR c++/71349
7471 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7472 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7473 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7474 instead of C_OMP_CLAUSE_SPLIT_FOR.
7475
f17a223d
RB
74762016-05-24 Richard Biener <rguenther@suse.de>
7477
7478 PR middle-end/70434
7479 PR c/69504
7480 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7481 (convert_vector_to_array_for_subscript): ... this.
7482 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7483 VIEW_CONVERT_EXPR to an array type. Rename to ...
7484 (convert_vector_to_array_for_subscript): ... this.
7485
4f2e1536
MP
74862016-05-12 Marek Polacek <polacek@redhat.com>
7487
7488 PR c/70756
7489 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7490 size_in_bytes and pass LOC to it.
7491
d6e83a8d
MM
74922016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7493
7494 PR c/43651
7495 * c.opt (Wduplicate-decl-specifier): New option.
7496
5c3a10fb
MP
74972016-05-11 Marek Polacek <polacek@redhat.com>
7498
7499 PR c++/71024
7500 * c-common.c (diagnose_mismatched_attributes): New function.
7501 * c-common.h (diagnose_mismatched_attributes): Declare.
7502
deef7113
MP
75032016-05-04 Marek Polacek <polacek@redhat.com>
7504
7505 * c.opt (Wdangling-else): New option.
7506
79ce98bc
MP
75072016-05-03 Marek Polacek <polacek@redhat.com>
7508
7509 PR c/70859
7510 * c-common.c (builtin_function_validate_nargs): Add location
7511 parameter. Use it.
7512 (check_builtin_function_arguments): Add location and arguments
7513 parameters. Use them.
7514 * c-common.h (check_builtin_function_arguments): Update declaration.
7515
381cdae4
RB
75162016-05-03 Richard Biener <rguenther@suse.de>
7517
7518 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7519 allow call args to gimplify to SSA names.
7520
1d793c34
MP
75212016-05-03 Marek Polacek <polacek@redhat.com>
7522
7523 * c-common.h (enum c_omp_region_type): Remove stray comma.
7524
77886428
CP
75252016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7526
7527 * c-common.h (enum c_omp_region_type): Define.
7528
697e0b28
RS
75292016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7530
7531 * c-common.c (shorten_compare): Use wi::to_wide.
7532
e7ff0319
CP
75332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7534
7535 PR middle-end/70626
7536 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7537 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7538 reduction clauses in acc parallel loops.
7539
2fff3db8
MP
75402016-04-29 Marek Polacek <polacek@redhat.com>
7541
7542 PR c/70852
7543 * c-common.c (warn_for_memset): Check domain before accessing it.
7544
509063eb
DV
75452016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7546
7547 PR/69089
7548 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7549 "aligned" attribute.
7550
b632761d
JM
75512016-04-28 Jason Merrill <jason@redhat.com>
7552
7553 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7554
174f6622
ES
75552016-04-28 Eduard Sanou <dhole@openmailbox.org>
7556 Matthias Klose <doko@debian.org>
7557
7558 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7559 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7560 handling.
7561 * c-common.h (get_source_date_epoch): Prototype.
7562 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7563
6bc2bb18
RB
75642015-04-27 Ryan Burn <contact@rnburn.com>
7565
7566 PR c++/69024
7567 PR c++/68997
7568 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7569 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7570 external linkage.
7571 (cilk_detect_and_unwrap): Corresponding changes.
7572 (extract_free_variables): Don't extract free variables from
7573 AGGR_INIT_EXPR slot.
7574 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7575 (cilk_recognize_spawn): Likewise.
7576
c1e1f433
BS
75772016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7578
7579 * c.opt (Wmemset-elt-size): New option.
7580 * c-common.c (warn_for_memset): New function.
7581 * c-common.h (warn_for_memset): Declare.
7582
d067e05f
JM
75832016-04-25 Jason Merrill <jason@redhat.com>
7584
7585 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7586 No longer static.
7587 * c-common.h: Declare it.
7588 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7589
9aa36ae5
JM
75902016-04-22 Jason Merrill <jason@redhat.com>
7591
7592 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7593
477d4906
IV
75942016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7595
7596 PR c++/69363
7597 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7598 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7599
fe37c7af
MM
76002016-04-18 Michael Matz <matz@suse.de>
7601
7602 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7603 and SET_DECL_ALIGN.
7604
23f2660f
EB
76052016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7606
7607 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7608 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7609 to incomplete types.
7610 (dump_nested_type): Remove redundant tests and tidy up.
7611 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7612 a type which is the typedef of an original type.
7613
1e77281b
MP
76142016-04-15 Marek Polacek <polacek@redhat.com>
7615
7616 PR c/70651
7617 * c-common.c (build_va_arg): Change two asserts into errors and return
7618 error_mark_node.
7619
b3a77f21
MP
76202016-04-13 Marek Polacek <polacek@redhat.com>
7621
7622 PR c++/70639
7623 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7624 for switch statements, too.
7625
322b8466
JM
76262016-03-28 Jason Merrill <jason@redhat.com>
7627
7628 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7629
fbdb6baf
MP
76302016-03-23 Marek Polacek <polacek@redhat.com>
7631
7632 PR c++/69884
7633 * c.opt (Wignored-attributes): New option.
7634
5c240f4d
DM
76352016-03-22 David Malcolm <dmalcolm@redhat.com>
7636
7637 PR c/69993
7638 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7639 diagnostic text, reversing the order of the warning and note so
7640 that they appear in source order.
7641
14ba7b28
MP
76422016-03-17 Marek Polacek <polacek@redhat.com>
7643
7644 PR c/69407
7645 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7646 operations.
7647
08a1cadc
JM
76482016-03-14 Jason Merrill <jason@redhat.com>
7649
2aaeea19
JM
7650 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7651
08a1cadc
JM
7652 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7653
c06d25bb
RB
76542016-03-09 Richard Biener <rguenther@suse.de>
7655
7656 PR c/70143
7657 * c-common.c (strict_aliasing_warning): Add back
7658 alias_sets_conflict_p check.
7659
80aac5c8
JM
76602016-03-08 Jason Merrill <jason@redhat.com>
7661
7662 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7663
64b23c13
DM
76642016-03-04 David Malcolm <dmalcolm@redhat.com>
7665
7666 PR c/68187
7667 * c-indentation.c (get_visual_column): Move code to determine next
7668 tab stop to...
7669 (next_tab_stop): ...this new function.
7670 (line_contains_hash_if): Delete function.
7671 (detect_preprocessor_logic): Delete function.
7672 (get_first_nws_vis_column): New function.
7673 (detect_intervening_unindent): New function.
7674 (should_warn_for_misleading_indentation): Replace call to
7675 detect_preprocessor_logic with a call to
7676 detect_intervening_unindent.
7677
729526f5
DM
76782016-03-04 David Malcolm <dmalcolm@redhat.com>
7679
7680 PR c/68187
7681 * c-indentation.c (should_warn_for_misleading_indentation): When
7682 suppressing warnings about cases where the guard and body are on
7683 the same column, only use the first non-whitespace column in place
7684 of the guard token column when dealing with "else" clauses.
7685 When rejecting aligned BODY and NEXT, loosen the requirement
7686 from equality with the first non-whitespace of guard to simply
7687 that they not be indented relative to it.
7688
e9a35493
RB
76892016-03-04 Richard Biener <rguenther@suse.de>
7690
7691 PR c++/70054
7692 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7693 instead of alias_sets_conflict_p.
7694
1be56bc5
MP
76952016-03-01 Marek Polacek <polacek@redhat.com>
7696
7697 PR c++/69795
7698 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7699 any DECL.
7700
35886f0b
MS
77012016-02-22 Martin Sebor <msebor@redhat.com>
7702
7703 PR middle-end/69780
7704 * c-common.c (check_builtin_function_arguments): Validate and
7705 reject invalid arguments to __builtin_alloca_with_align.
7706
4246c8da
MW
77072016-02-20 Mark Wielaard <mjw@redhat.com>
7708
7709 PR c/28901
7710 * c.opt (Wunused-const-variable): Turn into Alias for...
7711 (Wunused-const-variable=): New option.
7712
268be88c
BE
77132016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7714
7715 PR c++/69865
7716 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7717 here...
7718 (c_common_init_options): ...to here.
7719 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7720
871b3f47
JJ
77212016-02-19 Jakub Jelinek <jakub@redhat.com>
7722
7723 PR c++/69826
7724 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7725 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7726 flag_preprocess_only.
7727
bf14eba2
JJ
77282016-02-16 Jakub Jelinek <jakub@redhat.com>
7729
7730 PR c/69835
7731 * c.opt (Wnonnull-compare): Enable for -Wall.
7732
ba6b3795
JJ
77332016-02-15 Jakub Jelinek <jakub@redhat.com>
7734
7735 PR c++/69797
7736 * c-common.c (sync_resolve_size): Diagnose too few arguments
7737 even when params is non-NULL empty vector.
7738
a011cd92
BS
77392016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7740
7741 PR target/60410
7742 * c.opt (fshort-double): Remove.
7743
46cb9332
MS
77442016-02-05 Martin Sebor <msebor@redhat.com>
7745
7746 PR c++/69662
7747 * c.opt (Warning options): Update -Wplacement-new to take
7748 an optional argument.
7749
e1b81f2b
JJ
77502016-02-01 Jakub Jelinek <jakub@redhat.com>
7751
7752 PR preprocessor/69543
7753 PR c/69558
7754 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7755 instead of loc to control_warning_option.
7756
b6adbb9f
NS
77572016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7758
7759 * c.opt (fopenacc-dim=): New option.
7760
5d70666e
RB
77612016-01-27 Ryan Burn <contact@rnburn.com>
7762
7763 PR cilkplus/69267
7764 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7765 gimplify_arg. Removed superfluous post_p argument.
7766 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7767 superfluous post_p argument.
7768 * c-gimplify.c (c_gimplify_expr): Likewise.
7769
01e1dea3
DM
77702016-01-26 David Malcolm <dmalcolm@redhat.com>
7771
7772 PR other/69006
7773 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7774 pp_newline_and_flush with pp_flush.
7775
9f04a53e
MS
77762016-01-20 Martin Sebor <msebor@redhat.com>
7777
7778 PR c/69405
7779 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7780 an incompatible argument when the argument isn't a valid tree node.
7781
7f26f7df
JM
77822016-01-18 Jason Merrill <jason@redhat.com>
7783
7784 PR c++/68767
7785 * c-common.c (check_function_arguments_recurse): Fold the whole
7786 COND_EXPR, not just the condition.
7787
f62bf092
TV
77882016-01-18 Tom de Vries <tom@codesourcery.com>
7789
7790 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7791 classify as loop clause.
7792
e0a575ff
JJ
77932016-01-15 Jakub Jelinek <jakub@redhat.com>
7794
7795 PR bootstrap/68271
7796 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7797 C++ FE no longer has limit on number of pragmas.
7798
77992015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7800
7801 PR c++/69048
7802 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7803 to add missing cleanup point.
b6e3db06 7804
c7df95d8
DM
78052016-01-14 David Malcolm <dmalcolm@redhat.com>
7806
7807 PR c++/68819
7808 * c-indentation.c (get_visual_column): Add location_t param.
7809 Handle the column number being zero by effectively disabling the
7810 warning, with an "inform".
7811 (should_warn_for_misleading_indentation): Add location_t argument
7812 for all uses of get_visual_column.
7813
21efdd80
PP
78142016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7815
7816 PR c++/69029
7817 * c-indentation.c (should_warn_for_misleading_indentation):
7818 Don't warn about do-while statements.
7819
7a127fa7
MS
78202016-01-07 Martin Sebor <msebor@redhat.com>
7821
7822 PR c/68966
7823 * c-common.c (sync_resolve_size): Reject first argument when it's
7824 a pointer to _Bool.
7825
c589e975
DM
78262016-01-05 David Malcolm <dmalcolm@redhat.com>
7827
7828 PR c/69122
7829 * c-indentation.c (get_visual_column): Remove default argument.
7830 (should_warn_for_misleading_indentation): For the multiline case,
7831 update call to get_visual_column for next_stmt_exploc so that it
7832 captures the location of the first non-whitespace character in the
7833 relevant line. Don't issue warnings if there is non-whitespace
7834 before the next statement.
7835
818ab71a
JJ
78362016-01-04 Jakub Jelinek <jakub@redhat.com>
7837
7838 Update copyright years.
7839
745e411d
DM
78402015-12-21 David Malcolm <dmalcolm@redhat.com>
7841
7842 * c-common.c (binary_op_error): Convert first param from
7843 location_t to rich_location * and use it when emitting an error.
7844 * c-common.h (binary_op_error): Convert first param from
7845 location_t to rich_location *.
7846
de67c4c3
DM
78472015-12-16 David Malcolm <dmalcolm@redhat.com>
7848
7849 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7850 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7851
4a38b02b
IV
78522015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7853
7854 * c-common.c (c_common_attribute_table): Handle "omp declare target
7855 link" attribute.
7856
54d62f51
JJ
78572015-12-14 Jakub Jelinek <jakub@redhat.com>
7858
7859 PR c/68833
7860 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7861
8d4227c8
TB
78622014-12-12 Tobias Burnus <burnus@net-b.de>
7863
7864 PR fortran/68815
7865 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7866 specifiers (%d, %i,%u and %c).
7867
f6069ccc
DM
78682015-12-10 David Malcolm <dmalcolm@redhat.com>
7869
7870 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7871
63bbf46d
JJ
78722015-12-08 Jakub Jelinek <jakub@redhat.com>
7873
7874 PR c/48088
7875 PR c/68657
7876 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7877 * c-pragma.c (handle_pragma_diagnostic): Adjust
7878 control_warning_option caller.
7879
f79520bb
DM
78802015-12-07 David Malcolm <dmalcolm@redhat.com>
7881
7882 * c-common.c (c_cpp_error): Update for change to
7883 rich_location::set_range.
7884
b3d5bc62
JJ
78852015-12-04 Paolo Bonzini <bonzini@gnu.org>
7886
7887 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7888 shifting 1 out of the sign bit.
7889
78902015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7891
7892 * c-common.c (c_common_attribute_table[]): Update max arguments
7893 count for "simd" attribute.
7894 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7895
6eb4a537
JJ
78962015-12-03 Jakub Jelinek <jakub@redhat.com>
7897
7898 PR preprocessor/57580
7899 * c-ppoutput.c (print): Change printed field to bool.
7900 Move src_file last for smaller padding.
7901 (init_pp_output): Set print.printed to false instead of 0.
7902 (scan_translation_unit): Fix up formatting. Set print.printed
7903 to true after printing something other than newline.
7904 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7905 (maybe_print_line_1): Set print.printed to false instead of 0.
7906 (print_line_1): Likewise.
7907 (do_line_change): Set print.printed to true instead of 1.
7908 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7909 dump_macro): Set print.printed to false after printing newline.
7910
4250754e
JM
79112015-12-02 Jason Merrill <jason@redhat.com>
7912
f479b43d
JM
7913 * c-common.c (fold_for_warn): New.
7914 (warn_logical_operator, warn_tautological_cmp)
7915 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7916
4250754e
JM
7917 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7918 (c_fully_fold_internal, decl_constant_value_for_optimization):
7919 Move to c/c-fold.c.
7920 * c-common.h: Don't declare decl_constant_value_for_optimization.
7921
e9e32ee6
JM
79222015-12-02 Joseph Myers <joseph@codesourcery.com>
7923
7924 PR c/68162
7925 * c-common.h (c_build_qualified_type): Add extra default
7926 arguments.
7927
37d5ad46
JB
79282015-12-01 Julian Brown <julian@codesourcery.com>
7929 Cesar Philippidis <cesar@codesourcery.com>
7930 James Norris <James_Norris@mentor.com>
7931
7932 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7933 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7934 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7935
f07862c7
EB
79362015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7937
7938 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7939 (decl_sloc_common): Delete and move bulk of processing to...
7940 (decl_sloc): ...here.
7941 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7942 (dump_ada_double_name): Remove S parameter and compute the suffix.
7943 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7944 element type and deal with an anonymous one.
7945 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7946 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7947 and remove reference to QUAL_UNION_TYPE.
7948 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7949 (dump_nested_type): ...here. New function extracted from above.
7950 Generate a full declaration for anonymous element type of arrays.
7951 (print_ada_declaration): Really skip anonymous declarations. Remove
7952 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7953 Clean up processing of declarations of array types and objects.
7954 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7955 Remove obsolete code and tidy up.
7956
75c8aac3
JH
79572015-11-29 Jan Hubicka <hubicka@ucw.cz>
7958
7959 PR c/67581
7960 * c-common.c (handle_transparent_union_attribute): Update
7961 also type variants.
7962
b58d3df2
ML
79632015-11-27 Martin Liska <mliska@suse.cz>
7964
7965 PR c++/68312
7966 * array-notation-common.c (cilkplus_extract_an_triplets):
7967 Release vector of vectors.
7968 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7969
89a01fcf
EB
79702015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7971
7972 PR c++/68527
7973 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7974 (print_ada_struct_decl): Likewise.
7975
cc5c5226
IZ
79762015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7977
7978 PR c++/68001
7979 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7980 * cilk.c (recognize_spawn): Determine location in a more precise
7981 way.
7982
269adb9d
JM
79832015-11-19 Jason Merrill <jason@redhat.com>
7984
7985 * c-common.c (shorten_compare): But look through macros from
7986 system headers.
7987
d0eccfcd
JM
79882015-11-18 Jason Merrill <jason@redhat.com>
7989
7990 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7991 non-constant operand comes from a macro.
7992
3e44547c
JM
79932015-11-17 Jason Merrill <jason@redhat.com>
7994
7995 PR bootstrap/68346
7996 * c-common.c (warn_tautological_cmp): Fold before checking for
7997 constants.
7998
0f62c7a0
MP
79992015-11-16 Marek Polacek <polacek@redhat.com>
8000
8001 PR c++/68362
8002 * c-common.c (check_case_bounds): Fold low and high cases.
8003
a868811e
MP
80042015-11-16 Marek Polacek <polacek@redhat.com>
8005
8006 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8007 * c-common.c (c_common_get_alias_set): Likewise.
8008 (handle_visibility_attribute): Likewise.
8009
fff77217
KY
80102015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8011
8012 * c-common.c (handle_simd_attribute): New.
8013 (struct attribute_spec): Add entry for "simd".
8014 (handle_simd_attribute): New.
8015
269e63b7
KT
80162015-11-13 Kai Tietz <ktietz70@googlemail.com>
8017
8018 * c-lex.c (interpret_float): Use fold_convert.
8019
ebedc9a3
DM
80202015-11-13 David Malcolm <dmalcolm@redhat.com>
8021
8022 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8023 and store it on the result.
8024 * c-opts.c (c_common_init_options): Set
8025 global_dc->colorize_source_p.
8026
6e232ba4
JN
80272015-11-12 James Norris <jnorris@codesourcery.com>
8028 Joseph Myers <joseph@codesourcery.com>
8029
7365279f 8030 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8031 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8032 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8033 PRAGMA_OACC_CLAUSE_LINK.
8034
e78bede6
MP
80352015-11-11 Marek Polacek <polacek@redhat.com>
8036
8037 PR c/68107
8038 PR c++/68266
8039 * c-common.c (valid_array_size_p): New function.
8040 * c-common.h (valid_array_size_p): Declare.
8041
3f8257db 80422015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8043
8044 PR bootstrap/68271
8045 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8046
69f293c9
AM
80472015-11-11 Andrew MacLeod <amacleod@redhat.com>
8048
8049 * array-notation-common.c: Remove unused header files.
8050 * c-ada-spec.c: Likewise.
8051 * c-cilkplus.c: Likewise.
8052 * c-common.c: Likewise.
8053 * c-cppbuiltin.c: Likewise.
8054 * c-dump.c: Likewise.
8055 * c-format.c: Likewise.
8056 * c-gimplify.c: Likewise.
8057 * c-indentation.c: Likewise.
8058 * c-lex.c: Likewise.
8059 * c-omp.c: Likewise.
8060 * c-opts.c: Likewise.
8061 * c-pch.c: Likewise.
8062 * c-ppoutput.c: Likewise.
8063 * c-pragma.c: Likewise.
8064 * c-pretty-print.c: Likewise.
8065 * c-semantics.c: Likewise.
8066 * c-ubsan.c: Likewise.
8067 * cilk.c: Likewise.
8068 * stub-objc.c: Likewise.
8069
3a40d81d
NS
80702015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8071 Cesar Philippidis <cesar@codesourcery.com>
8072 James Norris <jnorris@codesourcery.com>
8073 Julian Brown <julian@codesourcery.com>
8074 Nathan Sidwell <nathan@codesourcery.com>
8075
8076 * c-pragma.c (oacc_pragmas): Add "routine".
8077 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8078
ee45a32d
EB
80792015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8080
8081 * c-common.c (c_common_attributes): Add scalar_storage_order.
8082 (handle_scalar_storage_order_attribute): New function.
8083 * c-pragma.c (global_sso): New variable.
8084 (maybe_apply_pragma_scalar_storage_order): New function.
8085 (handle_pragma_scalar_storage_order): Likewise.
8086 (init_pragma): Register scalar_storage_order.
8087 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8088 * c.opt (Wscalar-storage-order): New warning.
8089 (fsso-struct=): New option.
8090
eb11eb15
MS
80912015-11-08 Martin Sebor <msebor@redhat.com>
8092
8093 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8094
0aad0198
RS
80952015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8096
8097 * c-common.c: Don't undef DEF_BUILTIN.
8098
8a645150
DM
80992015-11-06 David Malcolm <dmalcolm@redhat.com>
8100
8101 * c-common.c (c_cpp_error): Convert parameter from location_t to
8102 rich_location *. Eliminate the "column_override" parameter and
8103 the call to diagnostic_override_column.
8104 Update the "done_lexing" clause to set range 0
8105 on the rich_location, rather than overwriting a location_t.
8106 * c-common.h (c_cpp_error): Convert parameter from location_t to
8107 rich_location *. Eliminate the "column_override" parameter.
8108
7a5e4956
CP
81092015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8110 Thomas Schwinge <thomas@codesourcery.com>
8111 James Norris <jnorris@codesourcery.com>
8112
8113 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8114 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8115 clauses with parallel and kernels and loops.
8116 * c-pragma.h (enum pragma_omp_clause): Add entries for
8117 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8118 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8119 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8120 INDEPENDENT,SEQ}.
8121 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8122
e2f5cc96
MS
81232015-11-05 Martin Sebor <msebor@redhat.com>
8124
8125 PR c++/67942
8126 * c.opt (-Wplacement-new): New option.
8127
e01d41e5
JJ
81282015-11-05 Jakub Jelinek <jakub@redhat.com>
8129
8130 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8131 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8132 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8133 save_expr or create_tmp_var* if TEST is true.
8134 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8135 Don't call add_stmt here.
8136 (struct c_omp_check_loop_iv_data): New type.
8137 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8138 c_omp_check_loop_iv_exprs): New functions.
8139 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8140 distribute.
8141 (c_omp_declare_simd_clauses_to_numbers): Change
8142 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8143 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8144 from numbers to PARM_DECLs.
8145
595278be
MM
81462015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8147
8148 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8149 flag_checking.
8150
3f8257db 81512015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8152
8153 PR c++-common/67882
b3d5bc62
JJ
8154 * c-common.h (fold_offsetof_1): Add argument.
8155 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8156 offsetof expressions that reference elements past the end of
8157 an array.
8158
4bf9e5a8
TS
81592015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8160 Chung-Lin Tang <cltang@codesourcery.com>
8161
8162 * c-pragma.c (oacc_pragmas): Add "atomic".
8163 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8164
3b1661a9
ES
81652015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8166
8167 * c-common.c (handle_target_clones_attribute): New.
8168 (c_common_attribute_table): Add handle_target_clones_attribute.
8169 (handle_always_inline_attribute): Add check on target_clones attribute.
8170 (handle_target_attribute): Ditto.
8171
2adfab87
AM
81722015-10-29 Andrew MacLeod <amacleod@redhat.com>
8173
8174 * array-notation-common.c: Reorder #include's and remove duplicates.
8175 * c-ada-spec.c: Likewise.
8176 * c-cilkplus.c: Likewise.
8177 * c-common.c: Likewise.
8178 * c-cppbuiltin.c: Likewise.
8179 * c-dump.c: Likewise.
8180 * c-format.c: Likewise.
8181 * c-gimplify.c: Likewise.
8182 * c-indentation.c: Likewise.
8183 * c-lex.c: Likewise.
8184 * c-omp.c: Likewise.
8185 * c-opts.c: Likewise.
8186 * c-pch.c: Likewise.
8187 * c-ppoutput.c: Likewise.
8188 * c-pragma.c: Likewise.
8189 * c-pretty-print.c: Likewise.
8190 * c-semantics.c: Likewise.
8191 * c-ubsan.c: Likewise.
8192 * cilk.c: Likewise.
8193 * stub-objc.c: Likewise.
8194
d90ec4f2
JM
81952015-10-28 Jason Merrill <jason@redhat.com>
8196
8197 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8198
88bae6f4
TS
81992015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8200 James Norris <jnorris@codesourcery.com>
8201 Cesar Philippidis <cesar@codesourcery.com>
8202
8203 PR c/64765
8204 PR c/64880
8205 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8206 * c-omp.c (c_oacc_split_loop_clauses): New function.
8207
b1726d6c
MS
82082015-10-21 Martin Sebor <msebor@redhat.com>
8209
8210 PR driver/68043
8211 * c.opt: End each sentence that describes an option with a period.
8212
fa60eeb9
MP
82132015-10-20 Marek Polacek <polacek@redhat.com>
8214
8215 * array-notation-common.c (is_cilkplus_vector_p): Define.
8216 * c-common.h (is_cilkplus_vector_p): Declare.
8217
95979049
MP
82182015-10-20 Marek Polacek <polacek@redhat.com>
8219
8220 * c.opt (std=gnu++11): Do not describe as experimental.
8221 (std=gnu++14): Likewise.
8222
2a9fb712
JM
82232015-10-19 Jason Merrill <jason@redhat.com>
8224
8225 * c-cppbuiltin.c (c_cpp_builtins): Define
8226 __cpp_nontype_template_args.
8227
13b380a3
JM
82282015-10-19 Jason Merrill <jason@redhat.com>
8229
8230 * c-cppbuiltin.c (c_cpp_builtins): Define
8231 __cpp_enumerator_attributes, __cpp_fold_expressions,
8232 __cpp_unicode_characters.
8233
d9a6bd32
JJ
82342015-10-13 Jakub Jelinek <jakub@redhat.com>
8235 Aldy Hernandez <aldyh@redhat.com>
8236
8237 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8238 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8239 (c_define_builtins): Likewise.
8240 * c-common.h (enum c_omp_clause_split): Add
8241 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8242 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8243 (c_finish_omp_for): Add ORIG_DECLV argument.
8244 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8245 201511 instead of 201307.
8246 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8247 OMP_CRITICAL_CLAUSES to it.
8248 (c_finish_omp_ordered): Add CLAUSES argument, set
8249 OMP_ORDERED_CLAUSES to it.
8250 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8251 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8252 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8253 constructs and new OpenMP 4.5 clauses. Clear
8254 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8255 verification code.
8256 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8257 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8258 (enum pragma_omp_clause): Add
8259 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8260 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8261
624d31fe
RS
82622015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8263
8264 * c-lex.c (interpret_float): Use real_equal instead of
8265 REAL_VALUES_EQUAL.
8266
b8fd7909
JM
82672015-10-04 Jason Merrill <jason@redhat.com>
8268
8269 Implement N4514, C++ Extensions for Transactional Memory.
8270 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8271 (c_common_attribute_table): Add transaction_safe_dynamic.
8272 transaction_safe now affects type identity.
8273 (handle_tm_attribute): Handle transaction_safe_dynamic.
8274 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8275 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8276 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8277 (D_TRANSMEM): New.
8278 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8279 * c-pretty-print.c (pp_c_attributes_display): Don't print
8280 transaction_safe in C++.
8281
12651878
MP
82822015-10-02 Marek Polacek <polacek@redhat.com>
8283
8284 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8285
3e3b8d63
MP
82862015-10-02 Marek Polacek <polacek@redhat.com>
8287
8288 PR c/64249
8289 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8290 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8291 * c.opt (Wduplicated-cond): New option.
8292
0d1a8f75
JM
82932015-10-01 Joseph Myers <joseph@codesourcery.com>
8294
8295 * c.opt (std=c11): Do not describe as experimental.
8296 (std=gnu11): Likewise.
8297 (std=iso9899:2011): Likewise.
8298
3e32ee19
NS
82992015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8300
8301 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8302 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8303
974348ee
MP
83042015-09-25 Marek Polacek <polacek@redhat.com>
8305
8306 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8307 (ubsan_instrument_shift): Likewise.
8308
15dbc1a6
MP
83092015-09-25 Marek Polacek <polacek@redhat.com>
8310
8311 PR sanitizer/64906
8312 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8313
6b95d7cc
PP
83142015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8315
8316 * c-indentation.c (should_warn_for_misleading_indentation):
8317 Compare next_stmt_vis_column with guard_line_first_nws instead
8318 of with guard_line_vis_column.
8319
c1822f9c
MLI
83202015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8321
8322 PR c/49654
8323 PR c/49655
8324 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8325 options and options not valid for the current language.
8326
d5398058
PP
83272015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8328
8329 * c-indentation.c (should_warn_for_misleading_indentation):
8330 Float out and consolidate the calls to get_visual_column that
8331 are passed guard_exploc as an argument. Compare
8332 next_stmt_vis_column with guard_line_first_nws instead of with
8333 body_line_first_nws.
8334
6b333269
NS
83352015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8336
8337 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8338 Wnamespaces): New C++ warnings.
8339
a75f1574
JM
83402015-09-22 Jason Merrill <jason@redhat.com>
8341
8342 * c-common.h (abi_compat_version_crosses): New.
8343 (warn_abi_version): Declare.
8344 * c-common.c: Define it.
8345 * c-opts.c (c_common_post_options): Handle it.
8346 flag_abi_compat_version defaults to 8.
8347
bdaaa8b7
VV
83482015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8349
8350 Complete the implementation of N4230, Nested namespace definition.
8351 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8352 __cpp_nested_namespace_definitions.
8353
eaa797e8
MLI
83542015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8355
8356 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8357
c4914de6
MLI
83582015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8359
8360 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8361 when warning.
8362 * c-pragma.h (pragma_lex): Add optional loc argument.
8363
fcb87c50
MM
83642015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8365
8366 * c-format.c (check_format_arg): Adjust to use common block size in all
8367 object pools.
8368
31bdd08a
DM
83692015-09-15 David Malcolm <dmalcolm@redhat.com>
8370
8371 * c-format.c (location_from_offset): Update for change in
8372 signature of location_get_source_line.
8373 * c-indentation.c (get_visual_column): Likewise.
8374 (line_contains_hash_if): Likewise.
8375
aa9f4b4c
MP
83762015-09-14 Marek Polacek <polacek@redhat.com>
8377
8378 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8379 setting various warnings.
8380
aa256c4a
MP
83812015-09-14 Marek Polacek <polacek@redhat.com>
8382
8383 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8384 a negative value.
8385
0f876f22
MW
83862015-09-11 Mark Wielaard <mjw@redhat.com>
8387
8388 PR c/28901
8389 * c.opt (Wunused-variable): Option from common.opt.
8390 (Wunused-const-variable): New option.
8391
273aa49e
PC
83922015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8393
8394 PR c++/53184
8395 * c.opt ([Wsubobject-linkage]): Add.
8396
1807ffc1
MS
83972015-09-03 Martin Sebor <msebor@redhat.com>
8398
8399 PR c/66516
8400 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8401 functions.
8402 * c-common.c (reject_gcc_builtin): Define.
8403
38942840
BI
84042015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8405
8406 PR middle-end/60586
8407 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8408 prototype.
8409 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8410 cilk_gimplify_call_params_in_spawned_fn.
8411 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8412 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8413 unwrapping.
8414
c316b5e4
MP
84152015-08-25 Marek Polacek <polacek@redhat.com>
8416
8417 PR middle-end/67330
8418 * c-common.c (handle_weak_attribute): Don't check whether the
8419 visibility can be changed here.
8420
584a7c46
MLI
84212015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8422
8423 * c-lex.c (c_lex_with_flags): Use explicit locations.
8424
a79683d5
TS
84252015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8426
8427 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8428 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8429
61717a45
FXC
84302015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8431
8432 PR middle-end/36757
8433 * c-common.c (check_builtin_function_arguments): Add check
8434 for BUILT_IN_SIGNBIT argument.
8435
329524f5
PC
84362015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8437
8438 PR c++/67160
8439 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8440 in c++1z mode.
8441
4ee55665
MP
84422015-08-17 Marek Polacek <polacek@redhat.com>
8443
8444 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8445 with whitespaces before qualifier names.
8446
b893e375
MP
84472015-08-12 Marek Polacek <polacek@redhat.com>
8448
8449 PR c++/55095
8450 * c-common.c (maybe_warn_shift_overflow): Properly handle
8451 left-shifting 1 into the sign bit.
8452
c2d89095
MLI
84532015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8454
8455 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8456
971e17ff
AS
84572015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8458 Braden Obrzut <admin@maniacsvault.net>
8459 Jason Merrill <jason@redhat.com>
8460
8461 Add C++ Concepts TS support.
8462 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8463 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8464 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8465 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8466 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8467 * c.opt (fconcepts): New.
8468
b3d5bc62
JJ
84692015-08-02 Martin Sebor <msebor@redhat.com>
8470
8471 * c.opt (-Wframe-address): New warning option.
8472
8ebca419
PP
84732015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8474
8475 * c-indentation.c (should_warn_for_misleading_indentation):
8476 Improve heuristics.
8477
1a1e101f
PP
84782015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8479
8480 * c-indentation.c (get_visual_column): Add parameter first_nws,
8481 use it. Update comment documenting the function.
8482 (is_first_nonwhitespace_on_line): Remove.
8483 (should_warn_for_misleading_indentation): Replace usage of
8484 of is_first_nonwhitespace_on_line with get_visual_column.
8485
992118a1
PP
84862015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8487
8488 * c-indentation.h (struct token_indent_info): Define.
8489 (get_token_indent_info): Define.
8490 (warn_for_misleading_information): Declare.
8491 * c-common.h (warn_for_misleading_information): Remove.
8492 * c-identation.c (warn_for_misleading_indentation):
8493 Change declaration to take three token_indent_infos. Adjust
8494 accordingly.
8495 * c-identation.c (should_warn_for_misleading_indentation):
8496 Likewise. Bail out early if the body is a compound statement.
8497 (guard_tinfo_to_string): Define.
8498
e8fa3817
JM
84992015-07-30 Jason Merrill <jason@redhat.com>
8500
8501 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8502 '*' for reference decay.
8503
173864e8
MP
85042015-07-30 Marek Polacek <polacek@redhat.com>
8505
8506 * c-common.c (warn_tautological_cmp): Bail for float types.
8507
f2afe6dd
MP
85082015-07-27 Marek Polacek <polacek@redhat.com>
8509
8510 PR bootstrap/67030
8511 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8512
05b28fd6
MP
85132015-07-27 Marek Polacek <polacek@redhat.com>
8514
8515 PR c++/66555
8516 PR c/54979
8517 * c-common.c (find_array_ref_with_const_idx_r): New function.
8518 (warn_tautological_cmp): New function.
8519 * c-common.h (warn_tautological_cmp): Declare.
8520 * c.opt (Wtautological-compare): New option.
8521
5a5062b8
MP
85222015-07-23 Marek Polacek <polacek@redhat.com>
8523
8524 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8525 (ubsan_instrument_shift): Likewise.
8526
dc891fe7
MP
85272015-07-23 Marek Polacek <polacek@redhat.com>
8528
8529 PR sanitizer/66908
8530 * c-ubsan.c: Include gimplify.h.
8531 (ubsan_instrument_division): Unshare OP0 and OP1.
8532 (ubsan_instrument_shift): Likewise.
8533
451b5e48
MP
85342015-07-20 Marek Polacek <polacek@redhat.com>
8535 Richard Sandiford <richard.sandiford@arm.com>
8536
8537 PR c++/55095
8538 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8539 Use EXPR_LOC_OR_LOC.
8540 (maybe_warn_shift_overflow): New function.
8541 * c-common.h (maybe_warn_shift_overflow): Declare.
8542 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8543 * c.opt (Wshift-overflow): New option.
8544
fb0b2914
ML
85452015-07-16 Martin Liska <mliska@suse.cz>
8546
8547 * c-format.c (static void check_format_info_main): Use
8548 object_allocator instead of pool_allocator.
8549 (check_format_arg): Likewise.
8550 (check_format_info_main): Likewise.
8551
903f5c23
AM
85522015-07-15 Andrew MacLeod <amacleod@redhat.com>
8553
8554 * c-opts.c: Remove multiline #include comment.
8555
026c3cfd
AH
85562015-07-12 Aldy Hernandez <aldyh@redhat.com>
8557
8558 * c-common.c: Fix double word typos.
8559
bb49ee66
EB
85602015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8561
8562 * c-ada-spec.h (cpp_operation): Revert latest change.
8563 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8564 constructors and destructors.
8565
1916bcb5
AM
85662015-07-09 Andrew MacLeod <amacleod@redhat.com>
8567
8568 * c-common.h: Adjust includes for flags.h changes.
8569 * stub-objc.c: Likewise.
026c3cfd 8570
a9dcd529
EB
85712015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8572
8573 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8574 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8575
b03b462f
JJ
85762015-07-08 Jakub Jelinek <jakub@redhat.com>
8577
8578 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8579 are to be removed, return NULL rather than original clauses list.
8580
c7131fb2
AM
85812015-07-07 Andrew MacLeod <amacleod@redhat.com>
8582
8583 * array-notation-common.c: Adjust includes.
8584 * c-ada-spec.c: Likewise.
8585 * c-cilkplus.c: Likewise.
8586 * c-common.h: Likewise.
8587 * c-cppbuiltin.c: Likewise.
8588 * c-dump.c: Likewise.
8589 * c-format.c: Likewise.
8590 * c-gimplify.c: Likewise.
8591 * c-indentation.c: Likewise.
8592 * c-lex.c: Likewise.
8593 * c-omp.c: Likewise.
8594 * c-opts.c: Likewise.
8595 * c-pch.c: Likewise.
8596 * c-ppoutput.c: Likewise.
8597 * c-pragma.c: Likewise.
8598 * c-pretty-print.c: Likewise.
8599 * c-semantics.c: Likewise.
8600 * c-ubsan.c: Likewise.
8601 * cilk.c: Likewise.
8602 * stub-objc.c: Likewise.
8603
2a7fb83f
EB
86042015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8605
8606 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8607 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8608
a03c9bf1
JM
86092015-07-01 Jason Merrill <jason@redhat.com>
8610
36a85135
JM
8611 * c-common.h (D_CXX11): Rename from D_CXX0X.
8612 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8613 * c-common.c: Adjust.
8614
e7fa68d5
JM
8615 * c-opts.c (c_common_post_options): Default to C++14.
8616
a03c9bf1
JM
8617 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8618
fe95b036
ESR
86192015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8620
8621 Implement N4197 - Adding u8 character literals
b3d5bc62 8622 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8623 CPP_CHAR.
b3d5bc62 8624 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8625 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8626 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8627 and CPP_UTF8CHAR tokens.
8628 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8629
da2e71c9
MLI
86302015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8631
8632 PR fortran/66605
8633 * c-common.c (do_warn_unused_parameter): Move here.
8634 * c-common.h (do_warn_unused_parameter): Declare.
8635
b155cfd9
MP
86362015-06-29 Marek Polacek <polacek@redhat.com>
8637
8638 PR c/66322
8639 * c-common.c (check_case_bounds): Add bool * parameter. Set
8640 OUTSIDE_RANGE_P.
8641 (c_add_case_label): Add bool * parameter. Pass it down to
8642 check_case_bounds.
8643 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8644 warning here.
8645 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8646 declarations.
8647
31521951
MP
86482015-06-27 Marek Polacek <polacek@redhat.com>
8649
8650 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8651 or VECTOR_INTEGER_TYPE_P throughout.
8652 * c-gimplify.c: Likewise.
8653
22d03525
MP
86542015-06-26 Marek Polacek <polacek@redhat.com>
8655
8656 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8657 * c-common.c (c_fully_fold_internal): Likewise.
8658 (c_alignof_expr): Likewise.
8659 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8660 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8661 * cilk.c (create_parm_list): Likewise.
22d03525 8662
af05e6e5
MP
86632015-06-26 Marek Polacek <polacek@redhat.com>
8664
8665 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8666
f0889939
AM
86672015-06-25 Andrew MacLeod <amacleod@redhat.com>
8668
8669 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8670 * c-gimplify.c: Likewise.
8671 * c-pragma.c: Likewise.
8672 * c-ubsan.c: Likewise.
8673 * cilk.c: Likewise.
8674
ca752f39
RS
86752015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8676
8677 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8678 ggc_hasher.
8679
16a16ec7
AM
86802015-06-25 Andrew MacLeod <amacleod@redhat.com>
8681
8682 * cilk.c: Move calls.h after tm.h in the include chain.
8683
0ae9bd27
MP
86842015-06-25 Marek Polacek <polacek@redhat.com>
8685
8686 * array-notation-common.c: Use VAR_P throughout.
8687 * c-ada-spec.c: Likewise.
8688 * c-common.c: Likewise.
8689 * c-format.c: Likewise.
8690 * c-gimplify.c: Likewise.
8691 * c-omp.c: Likewise.
8692 * c-pragma.c: Likewise.
8693 * c-pretty-print.c: Likewise.
8694 * cilk.c: Likewise.
8695
62f9079a
MP
86962015-06-25 Marek Polacek <polacek@redhat.com>
8697
8698 * cilk.c (extract_free_variables): Use is_global_var.
8699
0fa16060
RS
87002015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8701
8702 * c-common.c: Don't include target-def.h.
8703
a68ae2e1
MP
87042015-06-23 Marek Polacek <polacek@redhat.com>
8705
8706 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8707 when comparing INTEGER_CSTs.
8708
c6a2f2d9
PMR
87092015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8710
8711 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8712 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8713 (dump_ada_template): Skip partially specialized types.
8714
6b4db501
MM
87152015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8716
8717 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8718 swapping.
8719
abb226c9
AM
87202015-06-17 Andrew MacLeod <amacleod@redhat.com>
8721
8722 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8723 * c-ada-spec.c: Likewise.
8724 * c-cilkplus.c: Likewise.
8725 * c-common.c: Likewise.
8726 * c-common.h: Likewise.
8727 * c-cppbuiltin.c: Likewise.
8728 * c-dump.c: Likewise.
8729 * c-format.c: Likewise.
8730 * c-gimplify.c: Likewise.
8731 * c-indentation.c: Likewise.
8732 * c-lex.c: Likewise.
8733 * c-omp.c: Likewise.
8734 * c-opts.c: Likewise.
8735 * c-pch.c: Likewise.
8736 * c-ppoutput.c: Likewise.
8737 * c-pragma.c: Likewise.
8738 * c-pretty-print.c: Likewise.
8739 * c-semantics.c: Likewise.
8740 * c-ubsan.c: Likewise.
8741 * cilk.c: Likewise.
8742 * stub-objc.c: Likewise.
8743
076fecad
PP
87442015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8745
8746 PR c++/65168
8747 * c-common.c (c_common_truthvalue_conversion): Warn when
8748 converting an address of a reference to a truth value.
8749
13fdf2e2
AM
87502015-06-08 Andrew MacLeod <amacleod@redhat.com>
8751
8752 * array-notation-common.c : Adjust include files.
8753 * c-ada-spec.c : Likewise.
8754 * c-cilkplus.c : Likewise.
8755 * c-common.c : Likewise.
8756 * c-common.h : Likewise.
8757 * c-cppbuiltin.c : Likewise.
8758 * c-dump.c : Likewise.
8759 * c-format.c : Likewise.
8760 * c-gimplify.c : Likewise.
8761 * c-indentation.c : Likewise.
8762 * c-lex.c : Likewise.
8763 * c-omp.c : Likewise.
8764 * c-opts.c : Likewise.
8765 * c-pch.c : Likewise.
8766 * c-ppoutput.c : Likewise.
8767 * c-pragma.c : Likewise.
8768 * c-pretty-print.c : Likewise.
8769 * c-semantics.c : Likewise.
8770 * c-ubsan.c : Likewise.
8771 * cilk.c : Likewise.
8772 * stub-objc.c : Likewise.
8773
a1661b90
MP
87742015-06-08 Marek Polacek <polacek@redhat.com>
8775
8776 PR c/66415
8777 * c-format.c (location_from_offset): Return LOC if LINE is null.
8778
d7438551
AH
87792015-06-05 Aldy Hernandez <aldyh@redhat.com>
8780
8781 * c-common.h (c_parse_final_cleanups): New prototype.
8782 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8783
b3d5bc62
JJ
87842015-06-04 Sriraman Tallam <tmsriram@google.com>
8785
8786 * c-common.c (noplt): New attribute.
8787 (handle_noplt_attribute): New handler.
8788
ecb9f223
AM
87892015-06-04 Andrew MacLeod <amacleod@redhat.com>
8790
8791 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8792 * c-ada-spec.c: Likewise.
8793 * c-cilkplus.c: Likewise.
8794 * c-common.c: Likewise.
8795 * c-common.h: Likewise.
8796 * c-cppbuiltin.c: Likewise.
8797 * c-dump.c: Likewise.
8798 * c-format.c: Likewise.
8799 * c-gimplify.c: Likewise.
8800 * c-indentation.c: Likewise.
8801 * c-lex.c: Likewise.
8802 * c-omp.c: Likewise.
8803 * c-opts.c: Likewise.
8804 * c-pch.c: Likewise.
8805 * c-ppoutput.c: Likewise.
8806 * c-pragma.c: Likewise.
8807 * c-pretty-print.c: Likewise.
8808 * c-semantics.c: Likewise.
8809 * c-ubsan.c: Likewise.
8810 * cilk.c: Likewise.
8811 * stub-objc.c: Likewise.
8812
6ac48155
DM
88132015-06-02 David Malcolm <dmalcolm@redhat.com>
8814
8815 PR c/66220:
8816 * c-indentation.c (should_warn_for_misleading_indentation): Use
8817 expand_location rather than expand_location_to_spelling_point.
8818 Don't warn if the guarding statement is more indented than the
8819 next/body stmts.
8820
773ce42e
DM
88212015-06-02 David Malcolm <dmalcolm@redhat.com>
8822
8823 * c-indentation.c (warn_for_misleading_indentation): Bail out
8824 immediately if -Wmisleading-indentation isn't enabled.
8825
4fef8379
ML
88262015-06-01 Martin Liska <mliska@suse.cz>
8827
8828 * c-format.c (check_format_arg):Use new type-based pool allocator.
8829 (check_format_info_main) Likewise.
8830
1edfb384
EB
88312015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8832
8833 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8834 (has_nontrivial_methods): Likewise.
8835
9677ef52
MP
88362015-05-25 Marek Polacek <polacek@redhat.com>
8837
8838 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8839
fd5c817a
MP
88402015-05-22 Marek Polacek <polacek@redhat.com>
8841
8842 PR c/47043
8843 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8844
a2f45fe6 88452015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8846
8847 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8848 STACK_GROWS_DOWNWARD.
8849
a2f45fe6 88502015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8851
8852 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8853 STACK_GROWS_DOWNWARD rather than if it is defined.
8854
0fee2ac2 88552015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8856
0fee2ac2
MLI
8857 PR c/52952
8858 * c-format.c (location_column_from_byte_offset): New.
8859 (location_from_offset): New.
8860 (struct format_wanted_type): Add offset_loc field.
8861 (check_format_info): Move handling of location for extra arguments
8862 closer to the point of warning.
8863 (check_format_info_main): Pass the result of location_from_offset
8864 to warning_at.
8865 (format_type_warning): Pass the result of location_from_offset
8866 to warning_at.
8867
cf4ef6f7
MP
88682015-05-20 Marek Polacek <polacek@redhat.com>
8869
8870 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8871
3a65ee74
MP
88722015-05-20 Marek Polacek <polacek@redhat.com>
8873
8874 * c-ada-spec.c (dump_sloc): Use DECL_P.
8875
21b634ae
MP
88762015-05-20 Marek Polacek <polacek@redhat.com>
8877
8878 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8879 * c-common.c: Likewise.
8880
0e50b624
DM
88812015-05-19 David Malcolm <dmalcolm@redhat.com>
8882
8883 * c-common.h (fe_file_change): Strengthen param from
8884 const line_map * to const line_map_ordinary *.
8885 (pp_file_change): Likewise.
8886 * c-lex.c (fe_file_change): Likewise.
8887 (cb_define): Use linemap_check_ordinary when invoking
8888 SOURCE_LINE.
8889 (cb_undef): Likewise.
8890 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8891 invoking cb_file_change.
8892 (c_finish_options): Likewise.
8893 (push_command_line_include): Likewise.
8894 (cb_file_change): Strengthen param "new_map" from
8895 const line_map * to const line_map_ordinary *.
8896 * c-ppoutput.c (cb_define): Likewise for local "map".
8897 (pp_file_change): Likewise for param "map" and local "from".
8898
fab27f52
MM
88992015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8900
8901 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8902
2fe1d762
TV
89032015-05-18 Tom de Vries <tom@codesourcery.com>
8904
8905 * c-common.c (build_va_arg_1): New function.
8906 (build_va_arg): Add address operator to va_list operand if necessary.
8907
7a37fa90
MM
89082015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8909
8910 PR c/48956
8911 * c-common.c (int_safely_convertible_to_real_p): Define.
8912 (unsafe_conversion_p): Check conversions involving complex types.
8913 (conversion_warning): Add new warning message for conversions which
8914 discard imaginary component.
8915 * c-common.h: (enum conversion_safety): Add new enumerator for such
8916 conversions.
8917
3aa3c9fc
MP
89182015-05-14 Marek Polacek <polacek@redhat.com>
8919
8920 PR c/66066
8921 PR c/66127
8922 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8923 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8924 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8925 use it. If FOR_INT_CONST, require that all evaluated operands be
8926 INTEGER_CSTs.
8927
c3388e62
DM
89282015-05-12 David Malcolm <dmalcolm@redhat.com>
8929
8930 * c-common.h (warn_for_misleading_indentation): New prototype.
8931 * c-indentation.c: New file.
8932 * c.opt (Wmisleading-indentation): New option.
8933
c7b38fd5
TV
89342015-05-12 Tom de Vries <tom@codesourcery.com>
8935
8936 PR tree-optimization/66010
8937 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8938
381bf11e
JM
89392015-05-09 Jason Merrill <jason@redhat.com>
8940
edff0c06
JM
8941 * c-opts.c (c_common_post_options): Also clear
8942 cpp_opts->cpp_warn_cxx11_compat.
8943
129211bc
JM
8944 * c-common.h (enum cxx_dialect): Add cxx_unset.
8945 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8946 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8947
381bf11e
JM
8948 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8949 (std=gnu++0x): Mark as Undocumented.
8950 (std=gnu++1y): Add deprecated message.
8951
fe191308
JM
89522015-05-08 Jason Merrill <jason@redhat.com>
8953
765189ff
JM
8954 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8955 * c-opts.c: Adjust.
8956
fe191308
JM
8957 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8958
755e528f
MP
89592015-05-08 Marek Polacek <polacek@redhat.com>
8960
8961 PR c/64918
8962 * c.opt (Woverride-init-side-effects): New option.
8963
0173bd2a
MP
89642015-05-07 Marek Polacek <polacek@redhat.com>
8965
8966 PR c/65179
8967 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8968 negative value.
8969 * c.opt (Wshift-negative-value): New option.
8970 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8971 when -Wextra and C99/C++11 mode.
8972
e0f0d3b9
MP
89732015-05-07 Marek Polacek <polacek@redhat.com>
8974 Martin Uecker <uecker@eecs.berkeley.edu>
8975
8976 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8977 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8978
8243e2a9
JM
89792015-05-05 Jason Merrill <jason@redhat.com>
8980
8981 * c.opt (Wterminate): New.
8982
577cd070
MP
89832015-04-30 Marek Polacek <polacek@redhat.com>
8984
8985 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8986 require that the non-constant be of a boolean type.
8987
0373796b
JT
89882015-04-29 Josh Triplett <josh@joshtriplett.org>
8989
e0f0d3b9
MP
8990 * c-common.c (handle_section_attribute): Refactor to reduce
8991 nesting and distinguish between error cases.
0373796b 8992
716c0ba6
MP
89932015-04-29 Marek Polacek <polacek@redhat.com>
8994
8995 PR c/64610
8996 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8997 with 0/1.
8998
8848828b
JJ
89992015-04-29 Jakub Jelinek <jakub@redhat.com>
9000
9001 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9002 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9003 HOST_BITS_PER_WIDE_INT.
9004
ecd0e562
TV
90052015-04-28 Tom de Vries <tom@codesourcery.com>
9006
9007 PR tree-optimization/65887
9008 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9009
2a877204 90102015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9011 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9012
9013 * c-ada-spec.c (in_function): Delete.
9014 (dump_generic_ada_node): Do not change in_function and remove the
9015 redundant code dealing with it.
9016 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9017 (print_ada_methods): Output the static member functions in a nested
9018 package after the regular methods as well as associated renamings.
9019
4853031e
MP
90202015-04-24 Marek Polacek <polacek@redhat.com>
9021
9022 PR c/65830
9023 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9024 and OPT_Wshift_count_overflow.
9025
8c2b7f79
MP
9026 PR c/63357
9027 * c-common.c (warn_logical_operator): Warn if the operands have the
9028 same expressions.
9029
b8787813
MP
90302015-04-24 Marek Polacek <polacek@redhat.com>
9031
9032 PR c/61534
9033 * c-common.c (warn_logical_operator): Bail if either operand comes
9034 from a macro expansion.
9035
8fba1830
BRF
90362015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9037
9038 PR target/55143
9039 * c-common.c (c_default_pointer_mode): Add definition.
9040 * c-common.h (c_default_pointer_mode): Add declaration.
9041
17958621
JJ
90422015-03-11 Jakub Jelinek <jakub@redhat.com>
9043
9044 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9045 on record_builtin_type argument.
9046
7ccb1a11
JJ
90472015-03-10 Jakub Jelinek <jakub@redhat.com>
9048
9049 PR c/65120
9050 * c-common.c (warn_logical_not_parentheses): Don't warn for
9051 !x == 0 or !x != 0.
9052
04fd785e
MP
90532015-03-07 Marek Polacek <polacek@redhat.com>
9054
9055 PR sanitizer/65280
9056 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9057 before trying to figure out whether we have a flexible array member.
9058
a4e26206 90592015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9060 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9061
9062 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9063
0d2489f4
EB
90642015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9065
9066 PR ada/65319
9067 * c-ada-spec.c (print_destructor): Remove obsolete code.
9068
83ed54d7
EB
90692015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9070
9071 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9072 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9073 DECL_TEMPLATE_RESULT emulations.
9074 (dump_ada_template)): Add guard for TYPE_METHODS.
9075
7631f0e2
MP
90762015-02-27 Marek Polacek <polacek@redhat.com>
9077
9078 PR c/65040
9079 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9080
d1783ae5
KT
90812015-02-27 Kai Tietz <ktietz@redhat.com>
9082
9083 PR c/35330
9084 * c-pragma.c (handle_pragma_weak): Do not try to create
9085 weak/alias of declarations not being function, or variable
9086 declarations.
9087
56a9f6bc
TS
90882015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9089
9090 PR libgomp/64625
9091 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9092 Remove macros.
9093 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9094
3d5cb23d
MP
90952015-02-16 Marek Polacek <polacek@redhat.com>
9096
9097 PR c/65066
9098 * c-format.c (check_format_types): Handle null param.
9099
fa008882
MP
91002015-02-13 Marek Polacek <polacek@redhat.com>
9101
9102 PR c/65040
9103 * c-format.c (check_format_types): Don't warn about different
9104 signedness if the original value is in the range of WANTED_TYPE.
9105
785f21af
JM
91062015-02-12 Jason Merrill <jason@redhat.com>
9107
9108 PR c++/64956
9109 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9110 to the current highest version.
9111 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9112
4886ec8e
JJ
91132015-02-04 Jakub Jelinek <jakub@redhat.com>
9114
9115 PR c/64824
9116 PR c/64868
9117 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9118 instead of RDIV_EXPR. Use build_binary_op instead of
9119 build2_loc.
9120
40fecdd6
JM
91212015-01-30 Joseph Myers <joseph@codesourcery.com>
9122
9123 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9124 to pass input_location as first argument.
9125
a0c88d06
TV
91262015-01-23 Tom de Vries <tom@codesourcery.com>
9127
9128 PR libgomp/64672
9129 * c.opt (fopenacc): Mark as LTO option.
9130
1506ae0e
TV
91312015-01-23 Tom de Vries <tom@codesourcery.com>
9132
9133 PR libgomp/64707
9134 * c.opt (fopenmp): Mark as LTO option.
9135
31be63ab
JJ
91362015-01-21 Jakub Jelinek <jakub@redhat.com>
9137
9138 PR c/63307
b1726d6c 9139 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9140 (compare_decls): Fix up formatting.
9141
91422015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9143
9144 PR c/63307
9145 * cilk.c: Include vec.h.
9146 (struct cilk_decls): New structure.
9147 (wrapper_parm_cb): Split this function to...
9148 (fill_decls_vec): ...this...
9149 (create_parm_list): ...and this.
9150 (compare_decls): New function.
9151 (for_local_cb): Remove.
9152 (wrapper_local_cb): Ditto.
9153 (build_wrapper_type): For now first traverse and fill vector of
9154 declarations then sort it and then deal with sorted vector.
9155 (cilk_outline): Ditto.
9156 (declare_one_free_variable): Ditto.
9157
6875457f
JM
91582015-01-21 Jason Merrill <jason@redhat.com>
9159
9160 PR c++/64629
9161 * c-format.c (check_format_arg): Call decl_constant_value.
9162
185c9e56
ML
91632015-01-19 Martin Liska <mliska@suse.cz>
9164
9165 * c-common.c (handle_noicf_attribute): New function.
9166
41dbbb37
TS
91672015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9168 Bernd Schmidt <bernds@codesourcery.com>
9169 James Norris <jnorris@codesourcery.com>
9170 Cesar Philippidis <cesar@codesourcery.com>
9171 Ilmir Usmanov <i.usmanov@samsung.com>
9172 Jakub Jelinek <jakub@redhat.com>
9173
9174 * c.opt (fopenacc): New option.
9175 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9176 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9177 New macros.
9178 * c-common.h (c_finish_oacc_wait): New prototype.
9179 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9180 (c_finish_oacc_wait): New function.
9181 * c-pragma.c (oacc_pragmas): New variable.
9182 (c_pp_lookup_pragma, init_pragma): Handle it.
9183 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9184 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9185 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9186 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9187 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9188 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9189 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9190 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9191 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9192 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9193 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9194 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9195 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9196 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9197 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9198 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9199 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9200 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9201 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9202 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9203 PRAGMA_OACC_CLAUSE_WORKER.
9204
3f8257db 92052015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9206
9207 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9208 for the new option fstack-protector_explicit.
9209 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9210 (handle_stack_protect_attribute): New function.
9211
3f8257db 92122015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9213
9214 * c.opt: New option -Warray-bounds=.
9215
adfac8df
JJ
92162015-01-09 Michael Collison <michael.collison@linaro.org>
9217
9218 * array-notation-common.c: Include hash-set.h, machmode.h,
9219 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9220 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9221 * c-ada-spec.c: Ditto.
9222 * c-cilkplus.c: Ditto.
9223 * c-common.c: Include input.h due to flattening of tree.h.
9224 Define macro GCC_C_COMMON_C.
9225 * c-common.h: Flatten tree.h header files into c-common.h.
9226 Remove include of tree-core.h.
9227 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9228 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9229 fold-const.h, wide-int.h, and inchash.h due to
9230 flattening of tree.h.
9231 * c-dump.c: Ditto.
9232 * c-format.c: Flatten tree.h header files into c-common.h.
9233 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9234 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9235 fold-const.h, wide-int.h, and inchash.h due to
9236 flattening of tree.h.
9237 * c-dump.c: Include hash-set.h, machmode.h,
9238 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9239 fold-const.h, wide-int.h, and inchash.h due to
9240 flattening of tree.h.
9241 * c-format.c: Include hash-set.h, machmode.h,
9242 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9243 fold-const.h, wide-int.h, inchash.h and real.h due to
9244 flattening of tree.h.
9245 * c-gimplify.c: Include hash-set.h, machmode.h,
9246 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9247 fold-const.h, wide-int.h, and inchash.h due to
9248 flattening of tree.h.
9249 * cilk.c: Ditto.
9250 * c-lex.c: Ditto.
9251 * c-omp.c: Ditto.
9252 * c-opts.c: Ditto.
9253 * c-pch.c: Ditto.
9254 * c-ppoutput.c: Ditto.
9255 * c-pragma.c: Ditto.
9256 * c-pretty-print.c: Ditto.
9257 * c-semantics.c: Ditto.
9258 * c-ubsan.c: Ditto.
9259 * stub-objc.c: Ditto.
9260
f5481fc4
JM
92612015-01-08 Jason Merrill <jason@redhat.com>
9262
9263 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9264 do_ubsan_in_current_function.
9265 (ubsan_maybe_instrument_reference_or_call): Likewise.
9266 * c-ubsan.h: Declare it.
9267
de35aa66
MS
92682015-01-08 Mike Stump <mikestump@comcast.net>
9269
9270 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9271
4a9a42ab
MP
92722015-01-07 Marek Polacek <polacek@redhat.com>
9273
9274 PR c/64440
9275 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9276 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9277
2f42e5de
TS
92782015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9279
9280 PR c++/31397
9281 * c.opt (Wsuggest-override): New option.
9282
5624e564
JJ
92832015-01-05 Jakub Jelinek <jakub@redhat.com>
9284
9285 Update copyright years.
9286
5bd012f8
MP
92872015-01-05 Marek Polacek <polacek@redhat.com>
9288
9289 PR c/64423
9290 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9291 parameter. Use it.
9292 * c-common.h (warn_array_subscript_with_type_char): Update
9293 declaration.
9294
a7fa8d18
ESR
92952014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9296
9297 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9298 Control macro with flag_sized_deallocation.
9299
3f8257db 93002014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9301
9302 * c.opt (Wdiscarded-array-qualifiers): New option.
9303
1f8d3e84
JJ
93042014-12-19 Jakub Jelinek <jakub@redhat.com>
9305
9306 PR preprocessor/63831
9307 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9308 and __has_cpp_attribute here.
9309 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9310 c_common_has_attribute.
9311 * c-common.h (c_common_has_attribute): New prototype.
9312 * c-lex.c (init_c_lex): Set cb->has_attribute to
9313 c_common_has_attribute instead of cb_has_attribute.
9314 (get_token_no_padding): New function.
9315 (cb_has_attribute): Renamed to ...
9316 (c_common_has_attribute): ... this. No longer static. Use
9317 get_token_no_padding, require ()s, don't build TREE_LIST
9318 unnecessarily, fix up formatting, adjust diagnostics, call
9319 init_attributes.
9320
20b06add
JM
93212014-12-15 Jason Merrill <jason@redhat.com>
9322
9323 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9324 (-Wsized-deallocation): New.
9325 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9326 to on in C++14 and up.
9327
94a073b2
JM
93282014-12-11 Jason Merrill <jason@redhat.com>
9329
acaa5911
JM
9330 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9331
94a073b2
JM
9332 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9333 we aren't complaining about VLAs.
9334
7fb66c15
MP
93352014-12-06 Marek Polacek <polacek@redhat.com>
9336
9337 PR tree-optimization/64183
9338 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9339 shift-expression if it is integer_type_node. Use types_compatible_p.
9340
b731b390
JJ
93412014-11-29 Jakub Jelinek <jakub@redhat.com>
9342
9343 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9344 last argument from create_tmp_var_raw and create_tmp_var calls.
9345 * cilk.c (gimplify_cilk_spawn): Likewise.
9346 * c-omp.c (c_finish_omp_atomic): Likewise.
9347
6a4da643
MP
93482014-11-28 Marek Polacek <polacek@redhat.com>
9349
9350 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9351 instead of unsigned_type_node.
9352
541e35a6
MP
93532014-11-28 Marek Polacek <polacek@redhat.com>
9354
9355 PR c/63862
9356 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9357 to op1_utype.
9358 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9359 expression to unsigned_type_node.
9360
dcc97066
MW
93612014-11-20 Mark Wielaard <mjw@redhat.com>
9362
9363 PR debug/38757
9364 * c-opts.c (set_std_c89): Set lang_hooks.name.
9365 (set_std_c99): Likewise.
9366 (set_std_c11): Likewise.
9367 (set_std_cxx98): Likewise.
9368 (set_std_cxx11): Likewise.
9369 (set_std_cxx14): Likewise.
9370 (set_std_cxx1z): Likewise.
9371
aa7da51a
JJ
93722014-11-21 Jakub Jelinek <jakub@redhat.com>
9373
9374 PR target/63764
9375 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9376 return type to bool.
009a3480 9377 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9378 (convert_vector_to_pointer_for_subscript): Change return type to
9379 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9380 and copy it into a TARGET_EXPR and use that instead of *vecp
9381 directly.
9382
538dd0b7
DM
93832014-11-19 David Malcolm <dmalcolm@redhat.com>
9384
9385 Merger of git branch "gimple-classes-v2-option-3".
9386 * ChangeLog.gimple-classes: New.
9387 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9388 from being just a vec<gimple> to a vec<gbind *>.
9389
c39a5e99
JJ
93902014-11-18 Jakub Jelinek <jakub@redhat.com>
9391
9392 PR sanitizer/63813
9393 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9394 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9395 get_pointer_alignment for non-pointers. Use ptype, or if it is
9396 reference type, corresponding pointer type, as type of kind
9397 argument.
9398 (ubsan_maybe_instrument_reference,
9399 ubsan_maybe_instrument_member_call): Adjust callers.
9400
8537a4a9
MP
94012014-11-15 Marek Polacek <polacek@redhat.com>
9402
9403 PR middle-end/63884
9404 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9405 for NULL fndecl.
9406 (extract_array_notation_exprs): Return for NULL node.
9407
2079956a
JM
94082014-11-12 Joseph Myers <joseph@codesourcery.com>
9409
9410 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9411 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9412
1304953e
JJ
94132014-11-12 Jakub Jelinek <jakub@redhat.com>
9414
9415 PR c/59708
9416 * c-common.c (check_builtin_function_arguments): Handle
9417 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9418
e5e44252
AK
94192014-11-10 Andi Kleen <ak@linux.intel.com>
9420
9421 PR c/60804
9422 * c-common.h (check_no_cilk): Declare.
9423 * cilk.c (get_error_location): New function.
9424 (check_no_cilk): Dito.
9425
e64b984d
AK
94262014-11-10 Andi Kleen <ak@linux.intel.com>
9427
9428 * cilk.c (recognize_spawn): Use expression location
9429 for error message.
9430
13c21655
PC
94312014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9432
9433 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9434
42fd12b1
ESR
94352014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9436
9437 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9438 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9439 (__cpp_range_based_for, __cpp_initializer_lists,
9440 __cpp_delegating_constructors, __cpp_nsdmi,
9441 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9442 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9443 __has_cpp_attribute.
9444 * c-lex.c (cb_has_attribute): New callback CPP function;
9445 (init_c_lex): Set has_attribute callback.
9446
6f450181
RB
94472014-11-04 Richard Biener <rguenther@suse.de>
9448
9449 * c-common.c (shorten_compare): Do not shorten mixed
9450 DFP and non-DFP compares.
9451
26f0e1d6
ESR
94522014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9453
9454 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9455 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9456 Commentary and rearrangement of tests.
9457 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9458 Commentary and rearrangement of tests.
ab20d992 9459 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9460 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9461
ef4bddc2
RS
94622014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9463
9464 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9465 enum from machine_mode.
9466
c582198b
AM
94672014-10-28 Andrew MacLeod <amacleod@redhat.com>
9468
adfac8df
JJ
9469 * c-common.c: Adjust include files.
9470 * c-gimplify.c: Ditto.
9471 * cilk.c: Ditto.
9472 * c-pragma.c: Ditto.
9473 * c-ubsan.c: Ditto.
c582198b 9474
60393bbc
AM
94752014-10-27 Andrew MacLeod <amacleod@redhat.com>
9476
9477 * c-gimplify.c: Adjust include files.
9478
d723bb7c
MLI
94792014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9480
9481 PR c++/53061
9482 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9483 c_common_initialize_diagnostics.
9484 * c-common.h: Likewise.
9485
90f3520e
MP
94862014-10-24 Marek Polacek <polacek@redhat.com>
9487
9488 PR c/56980
9489 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9490 print "struct"/"union"/"enum" for typedefed names.
9491
59d7607a
MP
94922014-10-23 Marek Polacek <polacek@redhat.com>
9493
9494 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9495 in unsigned type.
9496
d95a2703
JJ
94972014-10-22 Jakub Jelinek <jakub@redhat.com>
9498 Yury Gribov <y.gribov@samsung.com>
9499
9500 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9501 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9502 instead of flag_sanitize_recover as bool flag.
9503
8e6ef852
KY
95042014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9505
9506 * cilk.c: Revert previous change.
9507
948cf550
IZ
95082014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9509
9510 PR c/63307
9511 * cilk.c: Include vec.h.
9512 (struct cilk_decls): New structure.
9513 (wrapper_parm_cb): Split this function to...
9514 (fill_decls_vec): ...this...
9515 (create_parm_list): ...and this.
9516 (compare_decls): New function.
9517 (for_local_cb): Remove.
9518 (wrapper_local_cb): Ditto.
9519 (build_wrapper_type): For now first traverse and fill vector of
9520 declarations then sort it and then deal with sorted vector.
9521 (cilk_outline): Ditto.
9522 (declare_one_free_variable): Ditto.
9523
92574c7c
MP
95242014-10-17 Marek Polacek <polacek@redhat.com>
9525
9526 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9527 * c.opt (Wimplicit-int): Initialize to -1.
9528
83685514
AM
95292014-10-16 Andrew MacLeod <amacleod@redhat.com>
9530
9531 * c-pragma.c: Adjust include files.
9532 * c-semantics.c: Likewise.
9533
5b8300ea
DD
95342014-10-16 DJ Delorie <dj@redhat.com>
9535
9536 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9537 multiples of bytes.
9538
5f83e90b
JM
95392014-10-14 Jason Merrill <jason@redhat.com>
9540
9541 PR c++/63455
9542 * c-common.h (CPP_PREPARSED_EXPR): New.
9543 (N_CP_TTYPES): Adjust.
9544
d73326ca
MP
95452014-10-15 Marek Polacek <polacek@redhat.com>
9546
9547 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9548
78a7c317
DD
95492014-10-14 DJ Delorie <dj@redhat.com>
9550
9551 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9552 types, not just __int128.
9553 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9554 types, not just __int128.
9555 (cpp_atomic_builtins): Round pointer sizes up.
9556 (type_suffix): Use type precision, not specific types.
9557 * c-common.c (c_common_reswords): Remove __int128 special case.
9558 (c_common_type_for_size): Check for all __intN types, not just
9559 __int128.
9560 (c_common_type_for_mode): Likewise.
9561 (c_common_signed_or_unsigned_type): Likewise.
9562 (c_build_bitfield_integer_type): Likewise.
9563 (c_common_nodes_and_builtins): Likewise.
9564 (keyword_begins_type_specifier): Likewise.
9565 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9566 __intN variants.
9567
2a22f99c
TS
95682014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9569
9570 * c-common.c: Use hash_table instead of hashtab.
9571
2a8ef767
ESR
95722014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9573
adfac8df 9574 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9575 C++11 section.
9576
3c9aabbd
MG
95772014-10-03 Marc Glisse <marc.glisse@inria.fr>
9578
9579 PR c++/54427
9580 PR c++/57198
9581 PR c++/58845
9582 * c-common.c (warn_logical_operator): Punt for vectors.
9583
a15f7cb8
ESR
95842014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9585
9586 Implement SD-6: SG10 Feature Test Recommendations
9587 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9588 macros and the __has_header macro.
9589
8d0cf15e
JM
95902014-09-30 Jason Merrill <jason@redhat.com>
9591
dd5d5481
JM
9592 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9593 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9594 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9595
b752325e
JM
9596 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9597 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9598
8d0cf15e
JM
9599 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9600 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9601
083e891e
MP
96022014-09-24 Marek Polacek <polacek@redhat.com>
9603
9604 PR c/61405
9605 PR c/53874
9606 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9607
7861b648
AK
96082014-09-23 Andi Kleen <ak@linux.intel.com>
9609
9610 * c-common.c (handle_no_reorder_attribute): New function.
9611 (c_common_attribute_table): Add no_reorder attribute.
9612
9a79452d
JM
96132014-09-22 Joseph Myers <joseph@codesourcery.com>
9614
9615 * c-cppbuiltin.c (c_cpp_builtins): Define
9616 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9617 modes.
9618
dd69f047
JM
96192014-09-18 Joseph Myers <joseph@codesourcery.com>
9620
9621 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9622 for supported floating-point modes.
9623
737a4826
MLI
96242014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9625
9626 * c.opt (Wpsabi): Use LangEnabledBy.
9627 * c-opts.c (c_common_handle_option): Do not handle here.
9628
8cc4b7a2
JM
96292014-09-12 Joseph Myers <joseph@codesourcery.com>
9630
9631 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9632 macros for floating-point modes.
9633
179b5a55
MG
96342014-09-11 Marc Glisse <marc.glisse@inria.fr>
9635
9636 PR target/58757
9637 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9638 __*_DENORM_MIN__ without denormals.
9639
570a11fe
JJ
96402014-09-10 Jakub Jelinek <jakub@redhat.com>
9641
9642 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9643 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9644 ubsan_create_data callers.
9645 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9646 index is constant or BIT_AND_EXPR with constant mask and is
9647 small enough for the bound.
9648 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9649 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9650
b559c810
MLI
96512014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9652
9653 * c.opt: Add CppReason to various flags.
9654 (Wdate-time): Re-sort.
9655 * c-common.c: Include c-common.h earlier.
9656 (struct reason_option_codes_t): Delete.
9657 (c_option_controlling_cpp_error): Prefix global type and struct
9658 with cpp_.
9659
1ef33fd4
MLI
96602014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9661
9662 * c.opt (Wnormalized): New.
9663 (Wnormalized=): Use Enum and Reject Negative.
9664 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9665
66bb34c0
JM
96662014-09-08 Joseph Myers <joseph@codesourcery.com>
9667
9668 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9669 digits of floating-point modes if -fbuilding-libgcc.
9670
53d68b9f
JM
96712014-09-05 Joseph Myers <joseph@codesourcery.com>
9672
9673 * c-cppbuiltin.c (c_cpp_builtins): Also define
9674 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9675 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9676 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9677 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9678 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9679 __LIBGCC_STACK_GROWS_DOWNWARD__,
9680 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9681 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9682 __LIBGCC_DWARF_FRAME_REGISTERS__,
9683 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9684 __LIBGCC_STACK_POINTER_REGNUM__ and
9685 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9686 (builtin_define_with_value): Handle backslash-escaping in string
9687 macro values.
9688
f65586dc
RB
96892014-09-05 Richard Biener <rguenther@suse.de>
9690
9691 PR middle-end/63148
9692 * c-format.c (check_format_arg): Properly handle
9693 effectively signed POINTER_PLUS_EXPR offset.
9694
2b71f4a4
MLI
96952014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9696
9697 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9698 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9699 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9700 and Init.
9701 * c-opts.c (c_common_handle_option): Do not handle here.
9702 (sanitize_cpp_opts): Likewise.
9703 * c-common.c (struct reason_option_codes_t): Handle
9704 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9705
d2e4feca
MP
97062014-09-03 Marek Polacek <polacek@redhat.com>
9707
9708 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9709
9a771876
JJ
97102014-09-02 Jakub Jelinek <jakub@redhat.com>
9711 Balaji V. Iyer <balaji.v.iyer@intel.com>
9712 Igor Zamyatin <igor.zamyatin@intel.com>
9713
9714 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9715 * c-common.c (c_common_reswords): Added _Cilk_for.
9716 * c-common.h (enum rid): Added RID_CILK_FOR.
9717 (cilk_for_number_of_iterations): Add declaration.
9718 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9719 CILK_FOR.
9720 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9721 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9722
81b5d104
MLI
97232014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9724
9725 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9726 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9727 Wundef): Use CPP, Var and Init.
9728 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9729
b753b37b
MLI
97302014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9731
9732 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9733 * c-opts.c (c_common_handle_option): Do not handle here.
9734
028aee17
JM
97352014-08-25 Jason Merrill <jason@redhat.com>
9736
9737 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9738 -std=c++14 and -std=gnu++14, rather than the reverse.
9739 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9740 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9741 * c-common.h (cxx_dialect): Remove cxx1y.
9742
e4276ba5
ESR
97432014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9744
9745 * c-common.h (enum cxx_dialect): Add cxx14.
9746 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9747 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9748 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9749
a545cacd
JM
97502014-08-22 Jason Merrill <jason@redhat.com>
9751
9752 * c.opt (std=gnu++17): Fix alias.
9753
59ea0364
MP
97542014-08-22 Marek Polacek <polacek@redhat.com>
9755
9756 PR c++/62199
9757 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9758 check for vector types. Drop LHS argument.
9759 * c-common.h (warn_logical_not_parentheses): Adjust.
9760
596e808c
MLI
97612014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9762
9763 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9764 (Wmultichar): Likewise.
9765 (Wdate-time): Use C-family languages instead of Common. Use CPP
9766 and Var.
9767 * c-opts.c (c_common_handle_option): Do not handle the above
9768 options here.
9769 (sanitize_cpp_opts): Likewise.
9770
18767f65
MLI
97712014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9772
9773 PR fortran/44054
9774 * c-opts.c: Include tree-diagnostics.h.
9775 (c_diagnostic_finalizer): New.
9776 (c_common_initialize_diagnostics): Use it.
9777
b4413594
MLI
97782014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9779
9780 PR preprocessor/51303
9781 * c-common.c (struct reason_option_codes_t option_codes):
9782 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9783
43f9a13c
MLI
97842014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9785
9786 PR c/60975
9787 PR c/53063
9788 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9789 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9790 (c_common_post_options): Call init_global_opts_from_cpp.
9791 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9792
04159acf
MP
97932014-08-19 Marek Polacek <polacek@redhat.com>
9794
9795 PR c++/62153
9796 * c-common.c (maybe_warn_bool_compare): New function.
9797 * c-common.h (maybe_warn_bool_compare): Declare.
9798 * c.opt (Wbool-compare): New option.
9799
35aff4fb
MP
98002014-08-19 Marek Polacek <polacek@redhat.com>
9801
9802 * c.opt (Wc99-c11-compat): New option.
9803
177cce46
MP
98042014-08-19 Marek Polacek <polacek@redhat.com>
9805
9806 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9807 to warn_c90_c99_compat.
9808 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9809 to -1.
9810
6ae9194f
MLI
98112014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9812 Steven Bosscher <steven@gcc.gnu.org>
9813
9814 PR c/52952
9815 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9816 format_check_results.
9817 (check_function_format): Use true and add comment for boolean
9818 argument.
9819 (finish_dollar_format_checking): Use explicit location when warning.
9820 (check_format_info): Likewise.
9821 (check_format_arg): Set extra_arg_loc and format_string_loc.
9822 (check_format_info_main): Use explicit location when warning.
9823 (check_format_types): Pass explicit location.
9824 (format_type_warning): Likewise.
9825
8e54f6d3
MLI
98262014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9827
9828 PR fortran/44054
9829 * c-format.c: Handle Fortran flags.
9830
cd4e76fc
IZ
98312014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9832
9833 PR other/61962
9834 * array-notation-common.c (find_rank): Added handling for other
9835 types of references.
9836
f3bede71
MP
98372014-08-10 Marek Polacek <polacek@redhat.com>
9838
9839 PR c/51849
9840 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9841 * c.opt (Wc90-c99-compat): Add option.
9842
9f25a338
TS
98432014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9844
9845 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9846
62e4eb35
MP
98472014-08-03 Marek Polacek <polacek@redhat.com>
9848
ab20d992 9849 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9850 (c_add_case_label): Pass loc to check_case_value.
9851
b787e7a2
TS
98522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9853
9854 * cilk.c: Use hash_map instead of pointer_map.
9855
6e2830c3
TS
98562014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9857
9858 * c-gimplify.c: Use hash_set instead of pointer_set.
9859
a7ee52fb
IZ
98602014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9861
9862 PR middle-end/61455
9863 * array-notation-common.c (extract_array_notation_exprs): Handling
9864 of DECL_EXPR added.
9865
944fa280
JJ
98662014-08-01 Jakub Jelinek <jakub@redhat.com>
9867
9868 * c-common.h (min_align_of_type): Removed prototype.
9869 * c-common.c (min_align_of_type): Removed.
9870 * c-ubsan.h (ubsan_maybe_instrument_reference,
9871 ubsan_maybe_instrument_member_call): New prototypes.
9872 * c-ubsan.c: Include stor-layout.h and builtins.h.
9873 (ubsan_maybe_instrument_reference_or_call,
9874 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9875 functions.
9876
b4dfdc11
MG
98772014-07-31 Marc Glisse <marc.glisse@inria.fr>
9878
9879 PR c++/60517
9880 * c.opt (-Wreturn-local-addr): Move to common.opt.
9881
a41844e5
JM
98822014-07-30 Jason Merrill <jason@redhat.com>
9883
9884 PR c++/61659
9885 PR c++/61687
9886 Revert:
9887 * c.opt (-fuse-all-virtuals): New.
9888
976d5a22
TT
98892014-07-30 Tom Tromey <tromey@redhat.com>
9890
9891 PR c/59855
9892 * c.opt (Wdesignated-init): New option.
9893 * c-common.c (c_common_attribute_table): Add "designated_init".
9894 (handle_designated_init): New function.
9895
cdc94aca
MP
98962014-07-24 Marek Polacek <polacek@redhat.com>
9897
9898 PR c/57653
9899 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9900
f41373b6
DS
99012014-07-16 Dodji Seketeli <dodji@redhat.com>
9902
9903 PR preprocessor/60723 - missing system-ness marks for macro tokens
9904 * c-ppoutput.c (struct print::prev_was_system_token): New data
9905 member.
9906 (init_pp_output): Initialize it.
9907 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9908 (do_line_change): Return a flag saying if a line marker was
9909 emitted or not.
9910 (scan_translation_unit): Detect if the system-ness of the token we
9911 are about to emit is different from the one of the previously
9912 emitted token. If so, emit a line marker. Avoid emitting useless
9913 adjacent line markers. Avoid emitting line markers for tokens
9914 originating from the expansion of built-in macros.
9915 (scan_translation_unit_directives_only): Adjust.
9916
4d661eaa
MP
99172014-07-15 Marek Polacek <polacek@redhat.com>
9918
9919 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9920 TYPE_MAX_VALUE is NULL.
9921
b108f48f
JJ
99222014-07-14 Jakub Jelinek <jakub@redhat.com>
9923
9924 PR middle-end/61294
9925 * c.opt (Wmemset-transposed-args): New warning.
9926
c0221884
JM
99272014-07-10 Jason Merrill <jason@redhat.com>
9928
9929 PR c++/61659
9930 PR c++/61687
9931 * c.opt (-fuse-all-virtuals): New.
9932
63dfbb95
RB
99332014-07-09 Richard Biener <rguenther@suse.de>
9934
9935 PR c-family/61741
9936 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9937 using unsigned arithmetic if overflow does not wrap instead of
9938 if overflow is undefined.
9939
773ec47f
MP
99402014-07-06 Marek Polacek <polacek@redhat.com>
9941
9942 PR c/6940
9943 * c.opt (Wsizeof-array-argument): New option.
9944
00a7ba58
JJ
99452014-07-03 Jakub Jelinek <jakub@redhat.com>
9946
b1726d6c 9947 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9948 comments->count <= 1, as comments->entries might be NULL.
9949
52ec0ea3
MP
99502014-07-01 Marek Polacek <polacek@redhat.com>
9951
9952 * c.opt (Wint-conversion): New option.
9953
d5c3d343
MP
99542014-07-01 Marek Polacek <polacek@redhat.com>
9955
9956 PR c/58286
9957 * c.opt (Wincompatible-pointer-types): New option.
9958
6e7ceb17
PC
99592014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9960
9961 PR c++/51400
9962 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9963 Do not discard TYPE_QUALS of type.
9964
da73100b
JM
99652014-06-26 Jason Merrill <jason@redhat.com>
9966
9967 * c-common.h (enum cxx_dialect): Add cxx1z.
9968 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9969 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9970
08eedf75
TJ
99712014-06-26 Teresa Johnson <tejohnson@google.com>
9972
9973 * c-common.h (get_dump_info): Declare.
9974 * c-gimplify.c (c_genericize): Use saved dump files.
9975 * c-opts.c (c_common_parse_file): Begin and end dumps
9976 once around parsing invocation.
9977 (get_dump_info): New function.
9978
7b56b2f8
MP
99792014-06-23 Marek Polacek <polacek@redhat.com>
9980 Andrew MacLeod <amacleod@redhat.com>
9981
9982 PR c/61553
9983 * c-common.c (get_atomic_generic_size): Don't segfault if the
9984 type doesn't have a size.
9985
0e37a2f3
MP
99862014-06-20 Marek Polacek <polacek@redhat.com>
9987
9988 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9989 (ubsan_walk_array_refs_r): New function.
9990 (c_genericize): Instrument array bounds.
9991 * c-ubsan.c: Include "internal-fn.h".
9992 (ubsan_instrument_division): Mark instrumented arrays as having
9993 side effects. Adjust ubsan_type_descriptor call.
9994 (ubsan_instrument_shift): Likewise.
9995 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9996 (ubsan_instrument_bounds): New function.
9997 (ubsan_array_ref_instrumented_p): New function.
9998 (ubsan_maybe_instrument_array_ref): New function.
9999 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10000 (ubsan_array_ref_instrumented_p): Declare.
10001 (ubsan_maybe_instrument_array_ref): Declare.
10002
100032014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10004
10005 PR lto/61123
10006 * c.opt (fshort-enums): Add to LTO.
10007 * c.opt (fshort-wchar): Likewise.
10008
5c3d09f7
MP
100092014-06-16 Marek Polacek <polacek@redhat.com>
10010
10011 PR c/60439
10012 * c.opt (Wswitch-bool): Add Var.
10013
9cf32741
JJ
100142014-06-12 Jakub Jelinek <jakub@redhat.com>
10015
10016 PR middle-end/61486
10017 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10018 #pragma omp target teams or
10019 #pragma omp {,target }teams distribute simd.
10020
62984918
JM
100212014-06-12 Jason Merrill <jason@redhat.com>
10022
10023 * c.opt (Wabi=, fabi-compat-version): New.
10024 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10025 (c_common_post_options): Handle flag_abi_compat_version default.
10026 Disallow -fabi-compat-version=1.
10027 * c-common.h (abi_version_crosses): New.
10028
f961457f
JH
100292014-06-11 Jan Hubicka <hubicka@ucw.cz>
10030
adfac8df 10031 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10032 section names that are no longer trees.
10033
92d28cbb
JJ
100342014-06-10 Jakub Jelinek <jakub@redhat.com>
10035
10036 PR fortran/60928
10037 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10038 (omp_pragmas): ... back here.
10039
742938c9
MP
100402014-06-05 Marek Polacek <polacek@redhat.com>
10041
10042 PR c/49706
10043 * c-common.c (warn_logical_not_parentheses): New function.
10044 * c-common.h (warn_logical_not_parentheses): Declare.
10045 * c.opt (Wlogical-not-parentheses): New option.
10046
9d548dfb
MP
100472014-06-04 Marek Polacek <polacek@redhat.com>
10048
10049 PR c/30020
10050 * c-common.c (check_case_bounds): Add location parameter.
10051 Use it.
10052 (c_add_case_label): Pass loc to check_case_bounds.
10053
fedfecef
MP
100542014-06-03 Marek Polacek <polacek@redhat.com>
10055
10056 PR c/60439
10057 * c.opt (Wswitch-bool): New option.
10058
f6a7cffc
TS
100592014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10060
040d18b6
TS
10061 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10062 Remove prototypes.
10063 (record_types_used_by_current_var_decl): Move prototype to where
10064 it belongs.
10065
f6a7cffc
TS
10066 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10067 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10068 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10069
632f2871
RS
100702014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10071
10072 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10073 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10074 void_zero_node.
10075 * c-pretty-print.c (pp_c_void_constant): New function.
10076 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10077 (c_pretty_printer::expression): Handle VOID_CST.
10078 * cilk.c (extract_free_variables): Likewise.
10079 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10080 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10081
766090c2
TS
100822014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10083
10084 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10085 * c-pragma.c (push_alignment): Adjust.
10086 (handle_pragma_push_options): Likewise.
10087
661a0813
MP
100882014-05-09 Marek Polacek <polacek@redhat.com>
10089
10090 PR c/50459
10091 * c-common.c (check_user_alignment): Return -1 if alignment is error
10092 node.
10093 (handle_aligned_attribute): Don't call default_conversion on
10094 FUNCTION_DECLs.
10095 (handle_vector_size_attribute): Likewise.
10096 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10097 (handle_sentinel_attribute): Call default_conversion and allow even
10098 integral types as an argument.
10099
2793eeab
MP
101002014-05-08 Marek Polacek <polacek@redhat.com>
10101
10102 PR c/61053
10103 * c-common.c (min_align_of_type): New function factored out from...
10104 (c_sizeof_or_alignof_type): ...here.
10105 * c-common.h (min_align_of_type): Declare.
10106
f827930a
MP
101072014-05-08 Marek Polacek <polacek@redhat.com>
10108
10109 PR c/61077
10110 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10111 parameter type of main.
10112
ca49b74e
DD
101132014-05-07 DJ Delorie <dj@redhat.com>
10114
10115 * c-cppbuiltin.c (print_bits_of_hex): New.
10116 (builtin_define_type_minmax): Print values using hex so as not to
10117 require a pre-computed list of string values.
10118
1d60af08
KZ
101192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10120 Mike Stump <mikestump@comcast.net>
10121 Richard Sandiford <rdsandiford@googlemail.com>
10122
10123 * c-ada-spec.c: Include wide-int.h.
10124 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10125 (dump_generic_ada_node): Use wide-int interfaces.
10126 * c-common.c: Include wide-int-print.h.
10127 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10128 (pointer_int_sum): Use wide-int interfaces.
10129 (c_common_nodes_and_builtins): Use make_int_cst.
10130 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10131 (handle_alloc_size_attribute): Use wide-int interfaces.
10132 (get_nonnull_operand): Likewise.
10133 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10134 * c-lex.c: Include wide-int.h.
10135 (narrowest_unsigned_type): Take a widest_int rather than two
10136 HOST_WIDE_INTs.
10137 (narrowest_signed_type): Likewise.
10138 (interpret_integer): Update accordingly. Use wide-int interfaces.
10139 (lex_charconst): Use wide-int interfaces.
10140 * c-pretty-print.c: Include wide-int.h.
10141 (pp_c_integer_constant): Use wide-int interfaces.
10142 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10143 INT_CST_LT_UNSIGNED.
10144
b15458be
RB
101452014-05-06 Richard Biener <rguenther@suse.de>
10146
10147 * c-opts.c (c_common_post_options): For -freestanding,
10148 -fno-hosted and -fno-builtin disable pattern recognition
10149 if not enabled explicitely.
10150
6577374e
MP
101512014-05-02 Marek Polacek <polacek@redhat.com>
10152
10153 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10154
d00887e8
MP
101552014-05-01 Marek Polacek <polacek@redhat.com>
10156
10157 PR c/43245
10158 * c.opt (Wdiscarded-qualifiers): Add.
10159
f8ed5150
MP
101602014-04-30 Marek Polacek <polacek@redhat.com>
10161
10162 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10163 INT_MIN / -1 sanitization only for integer types.
10164
45484dcf
MP
101652014-04-25 Marek Polacek <polacek@redhat.com>
10166
10167 PR c/18079
10168 * c-common.c (handle_noinline_attribute): Warn if the attribute
10169 conflicts with always_inline attribute.
10170 (handle_always_inline_attribute): Warn if the attribute conflicts
10171 with noinline attribute.
10172
38e514c0
MP
101732014-04-25 Marek Polacek <polacek@redhat.com>
10174
10175 PR c/60156
10176 * c-common.c (check_main_parameter_types): Warn about variadic main.
10177
44875f92
MS
101782014-04-24 Mike Stump <mikestump@comcast.net>
10179
10180 * c.opt (Wshadow-ivar): Default to on.
10181
dcaaa5a0
DP
101822014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10183
10184 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10185
c07d7c02
MP
101862014-04-23 Marek Polacek <polacek@redhat.com>
10187
10188 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10189
1c33c9b7
JJ
101902014-04-22 Jakub Jelinek <jakub@redhat.com>
10191
10192 PR sanitizer/60275
10193 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10194 if flag_sanitize_undefined_trap_on_error.
10195 (ubsan_instrument_division, ubsan_instrument_shift,
10196 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10197 if !flag_sanitize_recover.
10198
793c625f
MG
101992014-04-22 Marc Glisse <marc.glisse@inria.fr>
10200
10201 PR libstdc++/43622
10202 * c-common.c (registered_builtin_types): Make non-static.
10203 * c-common.h (registered_builtin_types): Declare.
10204
b0f1bf36 102052014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10206 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10207
10208 PR c/60819
10209 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10210 apply may-alias the scalar pointer type when applicable.
10211
3b07fa4a
IZ
102122014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10213
10214 PR middle-end/60467
10215 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10216 as possible argument for Cilk_spawn.
10217
cbbd2b1c
TB
102182014-04-11 Tobias Burnus <burnus@net-b.de>
10219
10220 PR c/60194
10221 * c.opt (Wformat-signedness): Add
10222 * c-format.c(check_format_types): Use it.
10223
6415bd5d
JM
102242014-04-11 Jason Merrill <jason@redhat.com>
10225
10226 PR c++/57926
10227 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10228 default_conversion for an array argument.
10229
6525783a
MP
102302014-04-08 Marek Polacek <polacek@redhat.com>
10231
10232 PR sanitizer/60745
10233 * c-ubsan.c: Include asan.h.
10234 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10235
880a467b
NS
102362014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10237
10238 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10239
7b59ff2d
MP
102402014-04-02 Marek Polacek <polacek@redhat.com>
10241
10242 * c-common.h (c_expand_expr): Remove declaration.
10243
8edbfaa6
JJ
102442014-03-28 Jakub Jelinek <jakub@redhat.com>
10245
10246 PR c++/60689
10247 * c-common.c (add_atomic_size_parameter): When creating new
10248 params vector, push the size argument first.
10249
07d72e1d
JJ
102502014-03-26 Jakub Jelinek <jakub@redhat.com>
10251
10252 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10253 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10254 ubsan_create_data callers.
10255
b35e0fa0
JJ
102562014-03-22 Jakub Jelinek <jakub@redhat.com>
10257
10258 PR debug/60603
10259 * c-opts.c (c_finish_options): Restore cb_file_change call to
10260 <built-in>.
10261
39a1ebb3
JJ
102622014-03-13 Jakub Jelinek <jakub@redhat.com>
10263
10264 PR middle-end/36282
10265 * c-pragma.c (apply_pragma_weak): Only look at
10266 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10267 DECL_ASSEMBLER_NAME_SET_P (decl).
10268 (maybe_apply_pending_pragma_weaks): Exit early if
10269 vec_safe_is_empty (pending_weaks) rather than only when
10270 !pending_weaks.
10271 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10272 set assembler name back to NULL afterwards.
10273
a07f6ed2
JM
102742014-03-11 Jason Merrill <jason@redhat.com>
10275
10276 * c.opt: Add -std=gnu++14.
10277
75b107f5
IB
102782014-03-11 Ian Bolton <ian.bolton@arm.com>
10279
10280 * c-opts.c (c_common_post_options): Don't override
10281 -ffp-contract=fast if unsafe-math-optimizations is on.
10282
f42c637e
PM
102832014-03-08 Paulo Matos <paulo@matos-sorge.com>
10284
22b15758 10285 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10286
70e24808
JM
102872014-03-07 Jason Merrill <jason@redhat.com>
10288
10289 * c.opt: Add -std=c++14.
10290
3af9c5e9
MP
102912014-03-06 Marek Polacek <polacek@redhat.com>
10292
10293 PR c/60197
10294 * cilk.c (contains_cilk_spawn_stmt): New function.
10295 (contains_cilk_spawn_stmt_walker): Likewise.
10296 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10297 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10298
b3bdf019
JJ
102992014-03-03 Jakub Jelinek <jakub@redhat.com>
10300
10301 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10302 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10303 even when flag_preprocess_only.
10304
ca7e759d
JM
103052014-02-26 Jason Merrill <jason@redhat.com>
10306
10307 PR c++/59231
10308 PR c++/11586
10309 * c-common.c (shorten_compare): Don't check
10310 c_inhibit_evaluation_warnings.
10311
28e41874
JJ
103122014-02-19 Jakub Jelinek <jakub@redhat.com>
10313
cca615af
JJ
10314 PR c/37743
10315 * c-common.c (c_common_nodes_and_builtins): When initializing
10316 c_uint{16,32,64}_type_node, also set corresponding
10317 uint{16,32,64}_type_node to the same value.
10318
28e41874
JJ
10319 PR c++/60267
10320 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10321 for PRAGMA_IVDEP if flag_preprocess_only.
10322
c2bf53a1
JJ
103232014-02-12 Jakub Jelinek <jakub@redhat.com>
10324
10325 PR c/60101
10326 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10327 if false, add ADD itself, rather than vice versa.
10328 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10329 copy. For SAVE_EXPR, only call merge_tlist once.
10330
8fcbce72
JJ
103312014-02-08 Jakub Jelinek <jakub@redhat.com>
10332
10333 PR middle-end/60092
10334 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10335 and tree_to_uhwi.
10336 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10337 functions.
10338 (c_common_attribute_table): Add alloc_align and assume_aligned
10339 attributes.
10340
0a756a3f
MP
103412014-02-06 Marek Polacek <polacek@redhat.com>
10342
10343 PR c/60087
10344 * c-common.c (warn_for_sign_compare): Call warning_at with location
10345 instead of warning.
10346
7ec4847a
MP
103472014-02-05 Marek Polacek <polacek@redhat.com>
10348
10349 PR c/53123
10350 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10351 statement.
10352
66f20604
MP
103532014-02-04 Marek Polacek <polacek@redhat.com>
10354
10355 PR c/60036
10356 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10357 SAVE_EXPR.
10358
5d77fb19
MG
103592014-02-03 Marc Glisse <marc.glisse@inria.fr>
10360
10361 PR c++/53017
10362 PR c++/59211
10363 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10364 handle_vector_size_attribute, handle_nonnull_attribute): Call
10365 default_conversion on the attribute argument.
10366 (handle_nonnull_attribute): Increment the argument number.
10367
81e5eca8
MP
103682014-01-31 Marek Polacek <polacek@redhat.com>
10369
10370 PR c/59963
10371 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10372 build_function_call_vec.
10373 (resolve_overloaded_builtin): Likewise.
10374 * c-common.h (build_function_call_vec): Adjust declaration.
10375
68fca595
MP
103762014-01-30 Marek Polacek <polacek@redhat.com>
10377
10378 PR c/59940
10379 * c-common.h (unsafe_conversion_p): Adjust declaration.
10380 (warnings_for_convert_and_check): Likewise.
10381 (convert_and_check): Likewise.
10382 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10383 expansion_point_location_if_in_system_header on it.
10384 (warnings_for_convert_and_check): Add location parameter. Call
10385 expansion_point_location_if_in_system_header on it. Use it.
10386 (convert_and_check): Add location parameter. Use it.
10387 (conversion_warning): Likewise.
10388 (c_add_case_label): Adjust convert_and_check calls.
10389 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10390
b72271b9
BI
103912014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10392
10393 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10394 flag_cilkplus.
10395 * c-pragma.c (init_pragma): Likewise.
10396 * c.opt: Likewise.
10397
393e8e8b
MP
103982014-01-23 Marek Polacek <polacek@redhat.com>
10399
10400 PR c/59846
10401 * c-common.c (shorten_compare): Add location_t parameter.
10402 * c-common.h (shorten_binary_op): Adjust declaration.
10403
f04dda30
MP
104042014-01-23 Marek Polacek <polacek@redhat.com>
10405
10406 PR c/58346
10407 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10408 * c-common.h: Declare it.
10409
621955cb
EB
104102014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10411
10412 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10413 * c-ada-spec.c (dump_ads): Likewise.
10414 (cpp_check): Likewise.
10415 (dump_ada_specs): Likewise.
10416
104172014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10418
10419 PR c++/49718
10420 * c-common.c (handle_no_instrument_function_attribute): Allow
10421 no_instrument_function attribute in class member
10422 definition/declaration.
10423
241f845a
JJ
104242014-01-15 Jakub Jelinek <jakub@redhat.com>
10425
10426 PR c/58943
10427 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10428 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10429 being COMPOUND_EXPR.
10430 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10431 operand a SAVE_EXPR and second MODIFY_EXPR.
10432
e83b8e2e
JJ
104332014-01-09 Jakub Jelinek <jakub@redhat.com>
10434
10435 PR target/58115
10436 * c-pch.c (c_common_write_pch): Call
10437 prepare_target_option_nodes_for_pch.
10438
23a5b65a
RS
104392014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10440
10441 Update copyright years
10442
f9030485
RS
104432014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10444
10445 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10446 the copyright notice.
10447
f2aa696b
EB
104482013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10449
10450 * c-ada-spec.c (print_constructor): New function.
10451 (print_destructor): Retrieve the origin of the destructor.
10452 (print_ada_declaration): Revamp handling of constructors/destructors.
10453
3f8257db 104542013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10455 Bill Maddox <maddox@google.com>
10456 Jason Merrill <jason@redhat.com>
10457
10458 * c.opt: Add -fdeclone-ctor-dtor.
10459 * c-opts.c (c_common_post_options): Default to on iff -Os.
10460
41958c28
BI
104612013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10462
10463 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10464 attribute.
10465 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10466 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10467 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10468 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10469 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10470 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10471 PRAGMA_CILK_CLAUSE_UNIFORM.
10472
b1726d6c 10473
12893402
BI
104742013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10475
10476 * cilk.c (cilk_outline): Made this function non-static.
10477 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10478 (create_cilk_wrapper): Added a new parameter: a function pointer.
10479 (c_install_body_w_frame_cleanup): Remove
10480 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10481 * c-common.h (cilk_outline): New prototype.
10482 (gimplify_cilk_spawn): Removed two parameters.
10483 (cilk_install_body_with_frame_cleanup): New prototype.
10484 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10485 CILK_SPAWN_STMT case.
10486
085b42ed
BS
104872013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10488
2ce064c3
BS
10489 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10490
085b42ed
BS
10491 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10492 (int_array_type_node): Remove.
10493 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10494
9e36c9ed
MP
104952013-12-05 Marek Polacek <polacek@redhat.com>
10496
10497 PR c/52023
10498 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10499 [ADJUST_FIELD_ALIGN].
10500
296674db
JM
105012013-12-04 Joseph Myers <joseph@codesourcery.com>
10502
10503 PR c/52023
10504 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10505 and check field alignment if set.
10506 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10507 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10508
b1726d6c 105092013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10510 Marek Polacek <polacek@redhat.com>
10511
10512 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10513 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10514
d7947e19
L
105152013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10516
10517 PR c/59309
10518 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10519 arguments.
10520
fad7652e
JJ
105212013-11-29 Jakub Jelinek <jakub@redhat.com>
10522
10523 PR c/59280
10524 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10525 goto invalid. If it is error_mark_node, don't issue further
10526 diagnostics.
10527
8b5e1202
SO
105282013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10529
10530 * c.opt (Wopenmp-simd): New.
10531
0a508bb6
JJ
105322013-11-22 Jakub Jelinek <jakub@redhat.com>
10533
10534 * c-ubsan.h (ubsan_instrument_return): New prototype.
10535 * c-ubsan.c (ubsan_instrument_return): New function.
10536
2fb9a547
AM
105372013-11-22 Andrew MacLeod <amacleod@redhat.com>
10538
10539 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10540 * c-gimplify.c: Likewise.
10541 * cilk.c: Likewise.
2fb9a547 10542
8400e75e
DM
105432013-11-22 David Malcolm <dmalcolm@redhat.com>
10544
10545 * c-common.c (unsafe_conversion_p): Remove use of
10546 EXPR_LOC_OR_HERE macro.
10547 (conversion_warning): Likewise.
10548 (warnings_for_convert_and_check): Likewise.
10549 (warn_for_collisions_1): Likewise.
10550 (shorten_compare): Likewise, and remove use of in_system_header
10551 macro, using the location from the former.
10552 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10553 (cb_def_pragma): Remove use of in_system_header macro.
10554 (lex_string): Likewise.
10555 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10556
eb1ce453
KZ
105572013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10558 Mike Stump <mikestump@comcast.net>
10559 Richard Sandiford <rdsandiford@googlemail.com>
10560
10561 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10562 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10563 tree_fits_shwi_p or tree_fits_uhwi_p.
10564 (dump_generic_ada_node): Likewise.
10565 * c-format.c (check_format_arg): Likewise.
10566 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10567
6b3b8c27
KZ
105682013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10569
10570 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10571
49b0aa18
JC
105722013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10573
10574 PR c/53001
10575 * c-common.c (unsafe_conversion_p): Make this function
10576 return an enumeration with more detail.
10577 (conversion_warning): Use the new return type of
10578 unsafe_conversion_p to separately warn either about conversions
10579 that lower floating point number precision or about the other
10580 kinds of conversions.
10581 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10582 (unsafe_conversion_p): switching return type to
10583 conversion_safety enumeration.
49b0aa18
JC
10584 * c.opt: Adding new warning -Wfloat-conversion and
10585 enabling it with -Wconversion.
10586
b826515a
BS
105872013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10588
8e745a17
JJ
10589 * c-opts.c: Include plugin.h.
10590 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10591
b9a55b13
MP
105922013-11-19 Marek Polacek <polacek@redhat.com>
10593
10594 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10595 call.
10596 (ubsan_instrument_shift): Likewise.
10597 (ubsan_instrument_vla): Likewise.
10598
7d362f6c
RS
105992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10600
10601 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10602 cast to unsigned type.
10603
386b1f1f
RS
106042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10605
10606 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10607 tree_low_cst.
10608 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10609 rather than tree_low_cst.
10610
ae7e9ddd
RS
106112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10612
10613 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10614 tree_to_uhwi throughout.
10615
9439e9a1
RS
106162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10617
10618 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10619 tree_low_cst (..., 0) with tree_to_shwi throughout.
10620
cc269bb6
RS
106212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10622
10623 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10624 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10625
9541ffee
RS
106262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10627
10628 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10629 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10630
c02065fc
AH
106312013-11-15 Aldy Hernandez <aldyh@redhat.com>
10632
10633 * c-cilkplus.c: New file.
10634 * c-common.c (readonly_error): Add location argument.
10635 * c-common.h (readonly_error): Same.
10636 (c_finish_cilk_clauses): Protoize.
10637 (c_check_cilk_loop): Same.
10638 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10639 Do not fail on error_mark_node.
10640 Abstract increment canonicalization to here...
10641 (c_omp_for_incr_canonicalize_ptr): New.
10642 c-pragma.c (init_pragma): Register "simd" pragma.
10643 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10644 (enum pragma_cilk_clause): New.
10645
9cc65f15
RS
106462013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10647
10648 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10649 wchar_type and host_integerp checks.
10650
18f429e2
AM
106512013-11-14 Andrew MacLeod <amacleod@redhat.com>
10652
10653 * c-common.c: Likewise.
10654 * c-gimplify.c: Likewise.
10655 * cilk.c: Likewise.
10656
d8a2d370
DN
106572013-11-14 Diego Novillo <dnovillo@google.com>
10658
10659 * c-common.c: Include fold-const.h.
10660 Include stor-layout.h.
10661 Include calls.h.
10662 Include stringpool.h.
10663 Include attribs.h.
10664 Include varasm.h.
10665 Include trans-mem.h.
10666 * c-cppbuiltin.c: Include stor-layout.h.
10667 Include stringpool.h.
10668 * c-format.c: Include stringpool.h.
10669 * c-lex.c: Include stringpool.h.
10670 Include stor-layout.h.
10671 * c-pragma.c: Include stringpool.h.
10672 Include attribs.h.
10673 Include varasm.h.
10674 Include gcc-symtab.h.
10675 * c-pretty-print.c: Include stor-layout.h.
10676 Include attribs.h.
10677 * cilk.c: Include stringpool.h.
10678 Include calls.h.
10679
38b7bc7f
JM
106802013-11-13 Joseph Myers <joseph@codesourcery.com>
10681
10682 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10683 * c-common.c (c_common_reswords): Add __auto_type.
10684 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10685
45b0be94
AM
106862013-11-12 Andrew MacLeod <amacleod@redhat.com>
10687
18f429e2
AM
10688 * c-common.c: Include gimplify.h.
10689 * c-gimplify.c: Likewise.
10690 * cilk.c: Likewise.
10691 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10692 * c-ubsan.c: Don't include gimple.h.
45b0be94 10693
582d9b50
JM
106942013-11-12 Joseph Myers <joseph@codesourcery.com>
10695
10696 * c-common.c (c_common_reswords): Add _Thread_local.
10697
6b28e197
JM
106982013-11-09 Joseph Myers <joseph@codesourcery.com>
10699
10700 * c-common.c (atomic_size_supported_p): New function.
10701 (resolve_overloaded_atomic_exchange)
10702 (resolve_overloaded_atomic_compare_exchange)
10703 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10704 Use it instead of comparing size with a local list of sizes.
10705
267bac10
JM
107062013-11-07 Andrew MacLeod <amacleod@redhat.com>
10707 Joseph Myers <joseph@codesourcery.com>
10708
10709 * c-common.h (enum rid): Add RID_ATOMIC.
10710 * c-common.c (c_common_reswords): Add _Atomic.
10711 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10712 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10713 * c-format.c (check_format_types): Check for extra _Atomic
10714 qualifiers in format argument.
10715 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10716 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10717
5157b91e
TB
107182013-11-06 Tobias Burnus <burnus@net-b.de>
10719
10720 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10721
6dbe0958
JM
107222013-11-06 Joseph Myers <joseph@codesourcery.com>
10723
10724 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10725 standards modes.
10726 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10727 to mean lack of IEEE 754 support.
10728
e8ff5196
TB
107292013-11-05 Tobias Burnus <burnus@net-b.de>
10730
10731 * c.opt (-Wdate-time): New option
10732 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10733
254a0760
JM
107342013-11-05 Joseph Myers <joseph@codesourcery.com>
10735
10736 * c-cppbuiltin.c (cpp_iec_559_value): Test
10737 flag_excess_precision_cmdline not flag_excess_precision.
10738
6d7f7e0a
TB
107392013-11-05 Tobias Burnus <burnus@net-b.de>
10740
10741 * c.opt (fopenmp-simd): New option.
10742 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10743 (omp_pragmas): ... this new struct.
10744 (c_pp_lookup_pragma): Also walk omp_pragmas.
10745 (init_pragma): Init pragmas for -fopenmp-simd.
10746
55a7f02f
MP
107472013-11-04 Marek Polacek <polacek@redhat.com>
10748
10749 PR c++/58979
10750 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10751
9193fb05
JM
107522013-11-04 Joseph Myers <joseph@codesourcery.com>
10753
10754 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10755 New functions.
10756 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10757
94159ecf
EB
107582013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10759
10760 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10761 (dump_ada_specs): Adjust prototype of second callback.
10762 * c-ada-spec.c (cpp_check): New global variable.
10763 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10764 (print_generic_ada_decl): Likewise.
10765 (has_static_fields): Change return type to bool and add guard.
10766 (has_nontrivial_methods): New predicate.
10767 (is_tagged_type): Change return type to bool.
10768 (separate_class_package): Call has_nontrivial_methods.
10769 (pp_ada_tree_identifier): Minor tweaks.
10770 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10771 (dump_ada_array_domains): Likewise.
10772 (dump_ada_array_type): Likewise.
10773 (dump_template_types): Remove cpp_check parameter and do not pass it to
10774 dump_generic_ada_node.
10775 (dump_ada_template): Likewise.
10776 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10777 recursively.
10778 (print_ada_methods): Change return type to integer. Remove cpp_check
10779 parameter and do not pass it down.
10780 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10781 dump_generic_ada_node.
10782 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10783 accessing methods.
10784 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10785 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10786 value of print_ada_methods.
10787 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10788 Set cpp_check to it before invoking dump_ada_nodes.
10789 (dump_ada_specs): Likewise.
10790
b906f4ca
MP
107912013-11-03 Marek Polacek <polacek@redhat.com>
10792
10793 * c-ubsan.c: Don't include hash-table.h.
10794 (ubsan_instrument_vla): New function.
10795 * c-ubsan.h: Declare it.
10796
5e20cdc9
DM
107972013-10-31 David Malcolm <dmalcolm@redhat.com>
10798
10799 Automated part of renaming of symtab_node_base to symtab_node.
10800
10801 Patch autogenerated by rename_symtab.py from
10802 https://github.com/davidmalcolm/gcc-refactoring-scripts
10803 revision 58bb219cc090b2f4516a9297d868c245495ee622
10804
10805 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10806 symtab_node_base to symtab_node.
10807
7057e645
ESR
108082013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10809
8e745a17 10810 Implement C++14 digit separators.
7057e645
ESR
10811 * c-lex.c (interpret_float): Remove digit separators from scratch string
10812 before building real literal.
10813
193ea7bc
JJ
108142013-10-30 Jakub Jelinek <jakub@redhat.com>
10815
10816 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10817
939b37da
BI
108182013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10819
10820 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10821 fields.
10822 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10823 enabled.
10824 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10825 (insert_cilk_frame): New prototype.
10826 (cilk_init_builtins): Likewise.
10827 (gimplify_cilk_spawn): Likewise.
10828 (c_cilk_install_body_w_frame_cleanup): Likewise.
10829 (cilk_detect_spawn_and_unwrap): Likewise.
10830 (cilk_set_spawn_marker): Likewise.
10831 (build_cilk_sync): Likewise.
10832 (build_cilk_spawn): Likewise.
10833 * cilk.c: New file.
10834
67348ccc
DM
108352013-10-29 David Malcolm <dmalcolm@redhat.com>
10836
10837 Patch autogenerated by refactor_symtab.py from
10838 https://github.com/davidmalcolm/gcc-refactoring-scripts
10839 revision 58bb219cc090b2f4516a9297d868c245495ee622
10840
10841 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10842 to a true class hierarchy.
10843 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10844
d570872d
RS
108452013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10846
10847 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10848
98906124
JL
108492013-10-26 Jeff Law <law@redhat.com>
10850
adfac8df
JJ
10851 * c-common.c (c_define_builtins): Remove mudflap support.
10852 * c.opt: Ignore and warn for mudflap options.
98906124 10853
d73749df 108542013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10855
10856 PR other/33426
10857 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10858 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10859
3f04b1bb
JM
108602013-10-23 Jason Merrill <jason@redhat.com>
10861
10862 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10863
acf0174b
JJ
108642013-10-11 Jakub Jelinek <jakub@redhat.com>
10865
acd15a28
JJ
10866 * c-common.h (omp_clause_mask::operator !=): New method.
10867 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10868 instead of if (mask & something) tests everywhere.
10869
acf0174b
JJ
10870 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10871 201307 instead of 201107.
10872 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10873 (c_common_attribute_table): Add "omp declare target" and
10874 "omp declare simd" attributes.
10875 (handle_omp_declare_target_attribute,
10876 handle_omp_declare_simd_attribute): New functions.
10877 * c-omp.c: Include c-pragma.h.
10878 (c_finish_omp_taskgroup): New function.
10879 (c_finish_omp_atomic): Add swapped argument, if true,
10880 build the operation first with rhs, lhs arguments and use NOP_EXPR
10881 build_modify_expr.
10882 (c_finish_omp_for): Add code argument, pass it down to make_code.
10883 (c_omp_split_clauses): New function.
10884 (c_split_parallel_clauses): Removed.
10885 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10886 c_omp_declare_simd_clauses_to_decls): New functions.
10887 * c-common.h (omp_clause_mask): New type.
10888 (OMP_CLAUSE_MASK_1): Define.
10889 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10890 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10891 omp_clause_mask::operator |, omp_clause_mask::operator &,
10892 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10893 omp_clause_mask::operator ==): New methods.
10894 (enum c_omp_clause_split): New.
10895 (c_finish_omp_taskgroup): New prototype.
10896 (c_finish_omp_atomic): Add swapped argument.
10897 (c_finish_omp_for): Add code argument.
10898 (c_omp_split_clauses): New prototype.
10899 (c_split_parallel_clauses): Removed.
10900 (c_omp_declare_simd_clauses_to_numbers,
10901 c_omp_declare_simd_clauses_to_decls): New prototypes.
10902 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10903 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10904 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10905 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10906 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10907 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10908 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10909 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10910 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10911 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10912 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10913 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10914 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10915 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10916 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10917 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10918 PRAGMA_OMP_CLAUSE_UNIFORM.
10919
826cacfe
MG
109202013-10-09 Marc Glisse <marc.glisse@inria.fr>
10921
10922 PR tree-optimization/20318
10923 * c-common.c (handle_returns_nonnull_attribute): New function.
10924 (c_common_attribute_table): Add returns_nonnull.
10925
2284b034
MG
109262013-10-03 Marc Glisse <marc.glisse@inria.fr>
10927
10928 PR c++/19476
10929 * c.opt (fcheck-new): Move to common.opt.
10930
b56e9788
MP
109312013-09-25 Marek Polacek <polacek@redhat.com>
10932 Jakub Jelinek <jakub@redhat.com>
10933
10934 PR sanitizer/58413
10935 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10936 an expression if we can prove it is correct.
10937 (ubsan_instrument_division): Likewise. Remove unnecessary
10938 check.
10939
ce6923c5
MP
109402013-09-18 Marek Polacek <polacek@redhat.com>
10941
10942 PR sanitizer/58411
10943 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10944 Declare it.
10945 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10946
fb5610fb
IS
109472013-09-14 Iain Sandoe <iain@codesourcery.com>
10948
10949 PR target/48094
10950 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10951 fobjc-gc, freplace-objc-classes): Accept for LTO.
10952
88b0e79e
JC
109532013-09-13 Jacek Caban <jacek@codeweavers.com>
10954
10955 * c-target.def: New hook
10956
c9b0866a
PC
109572013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10958
10959 PR c++/43452
10960 * c.opt (Wdelete-incomplete): Add.
10961
0af94e6f
JR
109622013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10963
10964 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10965 (vector_types_compatible_elements_p): New function.
10966 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10967 declaration.
10968 (vector_types_compatible_elements_p): Declare.
10969
7c26172c
GDR
109702013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10971
10972 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10973 a virtual member function.
10974 (pp_simple_type_specifier): Remove.
10975 (pp_c_type_specifier): Likewise.
10976 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10977 Rename from pp_c_type_specifier. Adjust.
10978 (c_pretty_printer::c_pretty_printer): Do not assign to
10979 simple_type_specifier.
10980
20059c8b
GDR
109812013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10982
10983 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10984 member function.
10985 (c_pretty_printer::storage_class_specifier): Likewise.
10986 (c_pretty_printer::initializer): Likewise.
10987 (pp_declaration): Remove.
10988 (pp_declaration_specifiers): Likewise.
10989 (pp_abstract_declarator): Likewise.
10990 (pp_declarator): Likewise.
10991 (pp_type_id): Likewise.
10992 (pp_statement): Likewise.
10993 (pp_constant): Likewise.
10994 (pp_id_expression): Likewise.
10995 (pp_primary_expression): Likewise.
10996 (pp_unary_expression): Likewise.
10997 (pp_multiplicative_expression): Likewise.
10998 (pp_conditional_expression): Likewise.
10999 (pp_assignment_expression): Likewise.
11000 (pp_expression): Likewise.
11001 (pp_c_type_id): Likewise.
11002 (pp_c_storage_class_specifier): Likewise.
11003 * c-pretty-print.c (pp_c_type_cast): Tidy.
11004 (pp_c_pointer): Likewise.
11005 (pp_c_type_specifier): Likewise.
11006 (pp_c_parameter_type_list): Likewise.
11007 (pp_c_function_definition): Likewise.
11008 (pp_c_init_declarator): Likewise.
11009 (pp_c_initializer_list): Likewise.
11010 (pp_c_constructor_elts): Likewise.
11011 (c_pretty_printer::direct_abstract_declarator): Likewise.
11012 (c_pretty_printer::declaration_specifiers): Likewise.
11013 (c_pretty_printer::primary_expression): Likewise.
11014 (c_pretty_printer::postfix_expression): Likewise.
11015 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11016 (c_pretty_printer::storage_class_specifier): Rename from
11017 pp_c_storage_class_specifier.
11018 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11019 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11020 storage_class_specifier, initializer, offset_list, flags.
11021
de5a5fa1
MP
110222013-08-30 Marek Polacek <polacek@redhat.com>
11023
11024 * c-ubsan.c: New file.
11025 * c-ubsan.h: New file.
11026
8f0e4d72
GDR
110272013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11028
11029 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11030 member function.
11031 (c_pretty_printer::declaration_specifiers): Likewise.
11032 (c_pretty_printer::declarator): Likewise.
11033 (c_pretty_printer::abstract_declarator): Likewise.
11034 (c_pretty_printer::direct_abstract_declarator): Likewise.
11035 (c_pretty_printer::direct_declarator): Likewise.
11036 (c_pretty_printer::function_specifier): Likewise.
11037 (pp_declaration): Adjust.
11038 (pp_declaration_specifiers): Likewise.
11039 (pp_abstract_declarator): Likewise.
11040 (pp_direct_declarator): Likewise.
11041 (pp_function_specifier): Likewise.
11042 (pp_direct_abstract_declarator): Remove as unused.
11043 (pp_c_declaration): Remove.
11044 (pp_c_declaration_specifiers): Likewise.
11045 (pp_c_declarator): Likewise.
11046 (pp_c_direct_declarator): Likewise.
11047 (pp_c_function_specifier): Likewise.
11048 (pp_c_direct_abstract_declarator): Likewise.
11049 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11050 from pp_c_abstract_declarator. Adjust.
ab20d992 11051 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11052 pp_c_direct_abstract_declarator. Adjust.
11053 (c_pretty_printer::function_specifier): Rename from
11054 pp_c_function_specifier. Adjust.
11055 (c_pretty_printer::declaration_specifiers): Rename from
11056 pp_c_declaration_specifiers. Adjust.
11057 (c_pretty_printer::direct_declarator): Rename from
11058 pp_c_direct_declarator. Adjust.
11059 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11060 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11061 (c_pretty_printer::c_pretty_printer): Do not assign to
11062 declaration, declaration_specifiers, declarator,
11063 direct_declarator, direct_abstract_declarator, function_specifier.
11064
00d34d3a
GDR
110652013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11066
11067 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11068 virtual member function.
11069 (c_pretty_printer::multiplicative_expression): Likewise.
11070 (c_pretty_printer::conditional_expression): Likewise.
11071 (c_pretty_printer::assignment_expression): Likewise.
11072 (c_pretty_printer::expression): Likewise.
11073 (pp_unary_expression): Adjust.
11074 (pp_multiplicative_expression): Likewise.
11075 (pp_assignment_expression): Likewise.
11076 (pp_conditional_expression): Likewise.
11077 (pp_expression): Likewise.
11078 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11079 from pp_c_unary_expression. Adjust.
11080 (c_pretty_printer::multiplicative_expression): Rename from
11081 pp_c_multiplicative_expression. Adjust.
11082 (c_pretty_printer::conditional_expression): Rename from
11083 pp_c_conditional_expression. Adjust.
11084 (c_pretty_printer::assignment_expression): Rename from
11085 pp_c_assignment_expression. Adjust.
11086 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11087 (c_pretty_printer::c_pretty_printer): Do not assign to
11088 unary_expression, multiplicative_expression,
11089 conditional_expression, expression.
11090
fb22178f
GDR
110912013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11092
11093 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11094 virtual member function.
11095 (pp_postfix_expression): Adjust.
11096 (pp_c_postfix_expression): Remove.
11097 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11098 from pp_c_postfix_expression. Adjust.
11099 (c_pretty_printer::c_pretty_printer): Do not assign to
11100 postfix_expression.
11101
7ecc2600
GDR
111022013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11103
11104 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11105 virtua member function.
11106 (pp_primary_expression): Adjust.
11107 (pp_c_primary_expression): Remove.
11108 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11109 from pp_c_primary_expression. Adjust.
11110 (pp_c_initializer_list): Use pp_primary_expression.
11111 (c_pretty_printer::c_pretty_printer): Do not assign to
11112 primary_expression.
11113
0691175f
GDR
111142013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11115
11116 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11117 * c-pretty-print.c (M_): Remove.
11118 (c_pretty_printer::translate_string): Define.
11119 (pp_c_type_specifier): Use it.
11120 (pp_c_primary_expression): Likewise.
11121 (pp_c_expression): Likewise.
11122
66dfe4c4
GDR
111232013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11124
11125 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11126 virtual function.
11127 (pp_c_id_expression): Remove.
11128 (pp_id_expression): Adjust.
11129 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11130 pp_c_id_expression. Adjust.
11131 (pp_c_postfix_expression): Use pp_id_expression.
11132 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11133
ca43e9d5
GDR
111342013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11135
11136 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11137 member function.
11138 (pp_constant): Adjust.
11139 (pp_c_constant): Remove.
11140 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11141 pp_c_constant. Adjust.
11142 (pp_c_constant)
11143 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11144 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11145
da6ca2b5
GDR
111462013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11147
11148 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11149 (c_pretty_printer::c_pretty_printer): Declare.
11150 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11151 c_pretty_printer_init. Adjust.
11152 (print_c_tree): Do not call c_pretty_printer_init.
11153 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11154
65a372f4
AC
111552013-08-09 Arnaud Charlet <charlet@adacore.com>
11156
11157 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11158
fd9b0f32
PC
111592013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11160
11161 PR c++/58080
11162 * c-common.c (pointer_int_sum): Add bool parameter.
11163 * c-common.h (pointer_int_sum): Adjust declaration.
11164
e0aec1e9
GDR
111652013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11166
11167 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11168 c_pretty_printer variable.
11169
b066401f
GDR
111702013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11171
11172 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11173 (pp_base): Remove.
11174 (pp_c_base): Likewise. Adjust users.
11175 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11176 (pp_c_whitespace): Do not call pp_base.
11177 (pp_c_left_paren): Likewise.
11178 (pp_c_right_paren): Likewise.
11179 (pp_c_left_brace): Likewise.
11180 (pp_c_right_brace): Likewise.
11181 (pp_c_left_bracket): Likewise.
11182 (pp_c_right_bracket): Likewise.
11183 (pp_c_dot): Likewise.
11184 (pp_c_ampersand): Likewise.
11185 (pp_c_star): Likewise.
11186 (pp_c_arrow): Likewise.
11187 (pp_c_semicolon): Likewise.
11188 (pp_c_complement): Likewise.
11189 (pp_c_exclamation): Likewise.
11190 (pp_c_direct_declarator): Likewise.
11191 (pp_c_ws_string): Likewise.
11192 (pp_c_identifier): Likewise.
11193 (pp_c_statement): Likewise.
11194 (print_c_tree): Likewise.
11195
65e5a578
ESR
111962013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11197
11198 PR c++/58072
11199 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11200 provide useful error strings.
11201
137a1a27
GDR
112022013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11203
11204 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11205 printer functions instead of pp_string or operators and punctuators.
11206 (dump_generic_ada_node): Likewise.
11207 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11208 (pp_c_relational_expression): Likewise.
11209 (pp_c_logical_or_expression): Likewise.
11210
07838b13
GDR
112112013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11212
11213 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11214 functions instead of pp_character.
11215 (pp_ada_tree_identifier): Likewise.
11216 (dump_ada_double_name): Likewise.
11217 (dump_ada_function_declaration): Likewise.
11218 (dump_ada_array_domains): Likewise.
11219 (dump_template_types): Likewise.
11220 (dump_generic_ada_node): Likewise.
11221 (print_ada_declaration): Likewise.
11222 (print_ada_struct_decl): Likewise.
11223 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11224
433cc7b0
TT
112252013-07-23 Tom Tromey <tromey@redhat.com>
11226
11227 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11228 * c-common.c (c_common_reswords): Add _Generic.
11229
688010ba
OB
112302013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11231
11232 * c-common.c: Fix typos.
11233 * c-common.h: Likewise.
11234
2a99e5e6
LL
112352013-07-13 Lubos Lunak <l.lunak@suse.cz>
11236
11237 PR c++/55203
11238 * c-common.c (c_common_attribute_table): Add warn_unused.
11239 (handle_warn_unused_attribute): New.
11240
c26302d5
JJ
112412013-07-10 Jakub Jelinek <jakub@redhat.com>
11242
11243 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11244 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11245
dfeadaa0
PC
112462013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11247
11248 PR c++/57869
11249 * c.opt: Add Wconditionally-supported.
11250
6a2fa4b2
GS
112512013-07-08 Graham Stott <graham.stott@btinternet.com>
11252
adfac8df 11253 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11254 unused variables l_length and l_node.
11255
ecdbd01a 112562013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11257
11258 PR c/57821
11259 * c-common.c (complete_array_type): Delay folding first index
11260 like other indices. When folding, check for index overflow.
11261
bedc293e
MG
112622013-06-27 Marc Glisse <marc.glisse@inria.fr>
11263
11264 PR c++/57509
11265 * c-common.h (c_build_vec_perm_expr): New complain argument.
11266 * c-common.c (c_build_vec_perm_expr): Likewise.
11267 Use save_expr also in C++.
11268
604b2bfc
GDR
112692013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11270
11271 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11272 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11273 * c-opts.c (c_common_post_options): Likewise.
11274
dfeadaa0 112752013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11276
11277 * array-notation-common.c (length_mismatch_in_expr): Changed the
11278 parameter type's from a dynamic array to a vec_tree. Also removed
11279 the size parameters.
11280 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11281 the change above.
11282
2ce86d2e
BI
112832013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11284
11285 * c-common.h (struct cilkplus_an_parts): New structure.
11286 (struct cilkplus_an_loop_parts): Likewise.
11287 (cilkplus_extract_an_triplets): New prototype.
11288 (fix_sec_implicit_args): Likewise.
11289 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11290 (fix_sec_implicit_args): Likewise.
604b2bfc 11291
07a6825b
BI
112922013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11293
11294 * array-notation-common.c (find_inv_trees): Removed an unwanted
11295 typecasting.
11296 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11297 enum rid to enum tree_code.
11298
08346abd
JH
112992013-06-11 Jan Hubicka <jh@suse.cz>
11300
11301 * c-common.c (handle_alias_ifunc_attribute): Do not set
11302 DECL_EXTERNAL for weakref variables.
11303 * c-pragma.c (handle_pragma_weak): Make sure aliases
11304 are not declared as external.
11305
d60f1706
BI
113062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11307
11308 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11309 function from c/c-array-notation.c.
11310 (is_cilkplus_reduce_builtin): Likewise.
11311 (find_rank): Likewise.
11312 (extract_array_notation_exprs): Likewise.
11313 (replace_array_notations): Likewise.
11314 (find_inv_trees): Likewise.
11315 (replace_inv_trees): Likewise.
11316 (contains_array_notation_expr): Likewise.
11317 (find_correct_array_notation_type): Likewise.
11318 * c-common.h (struct inv_list): Moved this struct from the file
11319 c/c-array-notation.c and added a new field called additional tcodes.
11320 (length_mismatch_in_expr_p): New prototype.
11321 (is_cilkplus_reduce_builtin): Likewise.
11322 (find_rank): Likewise.
11323 (extract_array_notation_exprs): Likewise.
11324 (replace_array_notation): Likewise.
11325 (find_inv_trees): Likewise.
11326 (replace_inv_trees): Likewise.
11327 (find_correct_array_notation_type): Likewise.
dfeadaa0 11328
36536d79
BI
113292013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11330
11331 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11332 function array_notation_init_builtins is called.
11333 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11334 * c-common.def (ARRAY_NOTATION_REF): New tree.
11335 * c-common.h (build_array_notation_expr): New function declaration.
11336 (build_array_notation_ref): Likewise.
11337 (extract_sec_implicit_index_arg): New extern declaration.
11338 (is_sec_implicit_index_fn): Likewise.
11339 (ARRAY_NOTATION_CHECK): New define.
11340 (ARRAY_NOTATION_ARRAY): Likewise.
11341 (ARRAY_NOTATION_START): Likewise.
11342 (ARRAY_NOTATION_LENGTH): Likewise.
11343 (ARRAY_NOTATION_STRIDE): Likewise.
11344 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11345 ARRAY_NOTATION_REF.
11346 (pp_c_expression): Likewise.
11347 * c.opt (flag_enable_cilkplus): New flag.
11348 * array-notation-common.c: New file.
11349
f7716d57
JJ
113502013-05-14 Jakub Jelinek <jakub@redhat.com>
11351
11352 PR c++/57274
11353 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11354
a5e0cd1d
MG
113552013-05-10 Marc Glisse <marc.glisse@inria.fr>
11356
11357 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11358 vectors.
11359
f6bc1c4a
HS
113602013-05-07 Han Shen <shenhan@google.com>
11361
11362 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11363
3f12f6e9
SKS
113642013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11365
11366 * c-common.c (check_user_alignment): Emit error for negative values.
11367
61949153
PC
113682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11369
11370 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11371
e93e18e9
PC
113722013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11373
11374 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11375 __GXX_EXPERIMENTAL_CXX1Y__.
11376
44d90fe1 113772013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11378 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11379
11380 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11381 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11382 to simply use OPT_Wpointer_arith.
11383 (c_sizeof_or_alignof_type): Likewise.
11384
13f39b2e
PC
113852013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11386
11387 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11388
4b84d650
JJ
113892013-04-12 Jakub Jelinek <jakub@redhat.com>
11390
11391 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11392 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11393 specifiers.
11394
fb037b5d
SB
113952013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11396
11397 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11398
4e856798
PC
113992013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11400
11401 * c-common.c (pointer_int_sum): Remove dead code.
11402
4b1baac8
RS
114032013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11404
11405 PR middle-end/56524
11406 * c-common.c (handle_optimize_attribute): Don't call
11407 save_optabs_if_changed.
11408
0b50e654
JJ
114092013-03-05 Jakub Jelinek <jakub@redhat.com>
11410
11411 PR middle-end/56461
11412 * c-pch.c (pch_init): Free target_validity at the end.
11413
48c41403
JJ
114142013-03-04 Jakub Jelinek <jakub@redhat.com>
11415
11416 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11417
e664c61c
KS
114182013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11419 Jakub Jelinek <jakub@redhat.com>
11420
11421 PR sanitizer/56454
11422 * c-common.c (handle_no_sanitize_address_attribute): New function.
11423 (c_common_attribute_table): Add no_sanitize_address attribute.
11424 (handle_no_address_safety_analysis_attribute): Add
11425 no_sanitize_address attribute, not no_address_safety_analysis
11426 attribute.
11427
a475fd3d 114282013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11429
11430 PR target/52555
11431 * c-common.c (handle_optimize_attribute): Call
11432 save_optabs_if_changed.
11433
f6007d99
JJ
114342013-02-18 Jakub Jelinek <jakub@redhat.com>
11435 Steven Bosscher <steven@gcc.gnu.org>
11436
11437 PR pch/54117
11438 * c-opts.c (c_common_post_options): If debug info is enabled
11439 and non-dwarf*, refuse to load PCH files and when writing PCH
11440 file warn.
11441
cf35e2b1
JJ
114422013-02-05 Jakub Jelinek <jakub@redhat.com>
11443
11444 PR middle-end/56167
11445 * c-common.c (handle_error_attribute): Fix condition.
11446
32887460
JJ
114472013-01-30 Jakub Jelinek <jakub@redhat.com>
11448
11449 PR c++/55742
11450 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11451
5af057d8
JM
114522013-01-18 Jason Merrill <jason@redhat.com>
11453
11454 PR target/54908
11455 * c.opt (-fextern-tls-init): New.
11456 * c-opts.c (c_common_post_options): Handle it.
11457
cc83c823
JJ
114582013-01-09 Jakub Jelinek <jakub@redhat.com>
11459
11460 PR c/48418
11461 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11462 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11463 and is either negative or bigger or equal to type precision
11464 of the first operand.
11465
a859517f
MP
114662012-12-03 Marek Polacek <polacek@redhat.com>
11467
11468 PR c/55570
11469 * c-common.c (check_user_alignment): Swap order of tests,
11470 check TREE_CODE first.
11471
2d7aa578
ESR
114722012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11473
11474 PR c++/52654
11475 * c-common.h (overflow_type): New enum.
11476 (build_userdef_literal): Add overflow_type argument.
11477 (tree_userdef_literal): Add overflow_type.
11478 (USERDEF_LITERAL_OVERFLOW): New access macro.
11479 * c-common.c (build_userdef_literal): Add overflow_type
11480 argument.
11481 * c-lex.c (c_lex_with_flags): Add overflow_type to
11482 build_userdef_literal calls.
11483 (interpret_integer, interpret_float): Add overflow_type argument.
11484
cc3c4f62
RB
114852012-11-28 Richard Biener <rguenther@suse.de>
11486
11487 PR c/35634
11488 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11489 here and use a type with proper overflow behavior for types that would
11490 need to be promoted for the arithmetic.
11491
77bc5132
JJ
114922012-11-23 Jakub Jelinek <jakub@redhat.com>
11493
11494 PR sanitizer/55435
11495 * c-common.c (handle_no_address_safety_analysis_attribute): New
11496 function.
11497 (c_common_attribute_table): Add no_address_safety_analysis.
11498
5dc99c46
SB
114992012-11-16 Simon Baldwin <simonb@google.com>
11500
11501 * c.opt: Add f[no-]canonical-system-headers.
11502 * c-opts.c (c_common_handle_option): Handle
11503 OPT_fcanonical_system_headers.
11504
a4a0016d
ESR
115052012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11506
11507 PR c++/54413
11508 * c-opts.c (c_common_handle_option): Set new flags.
11509 * c.opt: Describe new flags.
11510
7dbb85a7
JM
115112012-11-09 Jason Merrill <jason@redhat.com>
11512
11513 * c.opt (Wabi-tag): New.
11514
ad7bac31
AK
115152012-11-09 Andi Kleen <ak@linux.intel.com>
11516
11517 PR 55139
11518 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11519 MEMMODEL_MASK
ad7bac31 11520
7332899a
MLI
115212012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11522
11523 PR c/53063
11524 * c.opt (Wformat): Make it Alias Wformat=1.
11525 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11526 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11527 LangEnabledBy.
11528 (Wformat=): RejectNegative. Use LangEnabledBy.
11529 (Wnonnull): Use LangEnabledBy.
11530 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11531 * c-format.c (set_Wformat): Delete.
11532 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11533 (maybe_read_dollar_number): Likewise.
11534 (avoid_dollar_number): Likewise.
11535 (finish_dollar_format_checking): Likewise.
11536 (check_format_info): Likewise.
11537 (check_format_info_main): Likewise.
11538 (check_format_types): Likewise.
11539 (format_type_warning): Likewise.
11540 * c-common.c (int): Likewise.
11541 (check_function_sentinel): Likewise.
8e745a17 11542 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11543
34a180a6
MLI
115442012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11545
11546 PR c/53063
11547 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11548 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11549 Use LangEnabledBy.
11550 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11551 common.opt.
11552 (Wvariadic-macros): Init(1).
11553 * c-opts.c (c_common_handle_option): Do not handle them
11554 explicitly.
11555 (c_common_post_options): Likewise.
11556 (sanitize_cpp_opts): warn_unused_macros is now
11557 cpp_warn_unused_macros.
11558 (push_command_line_include): Likewise.
11559 * c-common.c (warn_unknown_pragmas): Do not define.
11560 * c-common.h (warn_unknown_pragmas): Do not declare.
11561
3f46d6a5
MLI
115622012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11563
11564 PR c/51294
11565 * c-common.c (conversion_warning): Handle conditional expressions.
11566
880661a4
JW
115672012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11568
11569 PR c++/54930
11570 * c.opt (Wreturn_local_addr): Define new option.
11571
4514a96b
JM
115722012-10-25 Jason Merrill <jason@redhat.com>
11573
f14edc1a
JM
11574 * c.opt (Wvirtual-move-assign): New.
11575
4514a96b
JM
11576 * c.opt (Winherited-variadic-ctor): New.
11577
93100c6b
MG
115782012-10-25 Marc Glisse <marc.glisse@inria.fr>
11579
11580 PR c++/54427
11581 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11582
1efcb8c6
JM
115832012-10-23 Joseph Myers <joseph@codesourcery.com>
11584
11585 * c-common.h (pch_cpp_save_state): Declare.
11586 * c-target.def (c_preinclude): New hook.
11587 * c-opts.c (done_preinclude): New.
11588 (push_command_line_include): Handle default preincluded header.
11589 (cb_file_change): Call pch_cpp_save_state when calling
11590 push_command_line_include.
11591 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11592 (pch_cpp_save_state): New.
11593 (pch_init): Call pch_cpp_save_state conditionally, instead of
11594 calling cpp_save_state.
11595
4a0ae68e
MLI
115962012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11597
11598 PR c/53063
11599 PR c/40989
11600 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11601 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11602 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11603 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11604 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11605 * c-opts.c (c_common_handle_option): Remove explicit handling from
11606 here.
11607 (c_common_post_options): Likewise.
11608
67e4210b
EB
116092012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11610
11611 * c-ada-spec.c (LOCATION_COL): Delete.
11612 (compare_location): New function.
11613 (compare_node): Use it.
11614 (compare_comment): Likewise.
11615
65d4f2cd
MLI
116162012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11617
11618 PR c/53063
11619 PR c/40989
11620 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11621 * c-opts.c (c_common_handle_option): Do not set them here. Add
11622 comment.
11623 (c_common_post_options): Likewise.
11624
909881cb
EB
116252012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11626
11627 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11628 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11629 Remove POINTER_TYPE handling, add large unsigned handling and use
11630 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11631
3a785c97
JJ
116322012-10-12 Jakub Jelinek <jakub@redhat.com>
11633
11634 PR c/54381
11635 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11636 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11637 locs and array of 3 trees instead of just single loc and single
11638 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11639 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11640 For *cmp* builtins that take two sources strings report warnings
11641 about first and second source, not about destination and source.
11642
5e54f81d
MG
116432012-10-12 Marc Glisse <marc.glisse@inria.fr>
11644
11645 PR c++/53055
11646 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11647
f5b02f1e
EB
116482012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11649
11650 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11651 declaring something coming from another file.
11652
b46dbc6c
AC
116532012-10-10 Arnaud Charlet <charlet@adacore.com>
11654
f5b02f1e 11655 PR ada/54845
b46dbc6c
AC
11656 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11657
5d9de0d0
PC
116582012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11659
11660 PR c++/54194
11661 * c-common.c (warn_about_parentheses): Add location_t parameter;
11662 use EXPR_LOC_OR_LOC.
11663 * c-common.h: Update declaration.
11664
a212e43f
MG
116652012-10-09 Marc Glisse <marc.glisse@inria.fr>
11666
11667 PR c++/54427
11668 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11669 more operations. Make error messages optional.
11670 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11671 (scalar_to_vector): Declare.
11672
b1db7f91
JM
116732012-10-08 Jason Merrill <jason@redhat.com>
11674
11675 * c-common.c (c_common_reswords): Add thread_local.
11676
e28d52cf
DS
116772012-10-08 Dodji Seketeli <dodji@redhat.com>
11678
11679 PR c++/53528 C++11 attribute support
11680 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11681 new functions.
11682 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11683 static function.
11684 (handle_aligned_attribute): In choose strictest alignment
11685 among many. Use new check_cxx_fundamental_alignment_constraints.
11686 (handle_transparent_union_attribute): In c++11 attribute syntax,
11687 don't look through typedefs.
11688
3b78de56
AC
116892012-10-04 Arnaud Charlet <charlet@adacore.com>
11690
11691 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11692 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11693 out of dumpfile.h.
11694
6040bb5f
DC
116952012-09-25 Dehao Chen <dehao@google.com>
11696
11697 PR middle-end/54645
3b78de56 11698 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11699 map when read in the pch.
11700
3f8257db 117012012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11702
11703 * c-ada-spec.c: Style fixes.
11704
3f8257db 117052012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11706
11707 * c.opt (-fada-spec-parent): Define new command line switch.
11708 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11709 is specified, generate binding spec as a child of the specified unit.
11710
0ccb505d
PC
117112012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11712 Manuel López-Ibáñez <manu@gcc.gnu.org>
11713
11714 PR c++/53210
11715 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11716
c583af79
AC
117172012-08-23 Arnaud Charlet <charlet@adacore.com>
11718
11719 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11720 for pointers, and add missing Convention C pragma.
11721 (print_ada_struct_decl): Add missing aliased keyword.
11722 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11723
1a4049e7
JJ
117242012-08-17 Jakub Jelinek <jakub@redhat.com>
11725
11726 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11727 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11728 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11729 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11730 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11731
70b5e7dc
RG
117322012-08-10 Richard Guenther <rguenther@suse.de>
11733
11734 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11735
f8923f7e
SB
117362012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11737
11738 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11739 instead of separate pp_newline and pp_flush.
11740 (print_c_tree): Likewise.
11741
e45abe1f
RH
117422012-07-26 Richard Henderson <rth@redhat.com>
11743
11744 * c-common.c (handle_hot_attribute): Allow labels.
11745 (handle_cold_attribute): Likewise.
11746
332f1d24
JJ
117472012-07-20 Jakub Jelinek <jakub@redhat.com>
11748
11749 PR c++/28656
11750 * c-common.c (check_function_nonnull): Handle multiple nonnull
11751 attributes properly.
11752
7ee2468b
SB
117532012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11754
11755 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11756 * c-ada-spec.c: Likewise.
11757 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11758
ee7b28eb
SB
117592012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11760
11761 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11762 Remove code conditional on it.
11763
6bdf3519
SB
117642012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11765
11766 * c-gimplify.c: Do not include basic-block.h.
11767 * c-common.c: Do not include linfuncs.h.
11768
532aafad
SB
117692012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11770
11771 * c-common.h: Include tree.h.
11772
8d0d1915
JM
117732012-07-02 Jason Merrill <jason@redhat.com>
11774
11775 PR c++/53524
11776 * c-common.c (get_priority): Call default_conversion.
11777
fbc873ad
UB
117782012-07-01 Uros Bizjak <ubizjak@gmail.com>
11779
11780 * c-pch.c (c_common_write_pch): Remove unused variables.
11781
d4a10d0a
SB
117822012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11783
11784 * cppspec.c: Moved from gcc/ to here.
11785
6f3a2e23
KT
117862012-06-27 Kai Tietz <ktietz@redhat.com>
11787
11788 PR preprocessor/37215
11789 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11790
8ca92d04
SB
117912012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11792
11793 * c-common.h (c_common_print_pch_checksum): Remove.
11794 * c-pch.c: Do not include output.h.
11795 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11796 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11797 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11798 (struct c_pch_header): Remove.
11799 (get_ident): Update gpch version.
11800 (pch_init): Do not print executable_checksum to asm_out_file.
11801 Do not fail if there is no asm_out_file to read back from. Set
11802 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11803 (c_common_write_pch): Verify that nothing was written to asm_out_file
11804 since pch_init was called. Do not write a c_pch_header, and do not
11805 copy from asm_out_file to the PCH.
11806 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11807 the content of asm_out_file from the PCH.
11808 (c_common_print_pch_checksum): Remove.
11809 * c-opts.c (c_common_init): Print out executable_checksum directly.
11810
70f42967
SB
118112012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11812
11813 * c-target.def (objc_declare_unresolved_class_reference,
11814 objc_declare_class_definition): Add new hooks.
11815
a8781821
SB
118162012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11817
11818 * c-lex.c: Do not include output.h.
11819 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11820 Remove uses of ASM_OUTPUT_IDENT.
11821
9e1a8dd1
RR
118222012-06-15 Marc Glisse <marc.glisse@inria.fr>
11823
11824 PR c++/51033
11825 * c-common.h (c_build_vec_perm_expr): Move decl here.
11826 * c-common.c (c_build_vec_perm_expr): Move definition
11827 here.
11828
6f07a821
SB
118292012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11830
11831 * c.opt (fconserve-space): Turn into a no-op.
11832
9faeb493 118332012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11834
11835 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11836 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11837 both the start and end of the function.
11838
a4b7d13c
SB
118392012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11840
11841 * c-common.c: Do not include output.h.
11842 * c-pragma.c: Likewise.
11843
c265f413
SA
118442012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11845
11846 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11847 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11848 (lang_decl_name): Handle namespace decls.
11849
be7a421e
SB
118502012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11851
11852 * c-ada-spec.c: Do not include output.h.
11853 * c-semantics.c: Likewise.
11854
65de6659
JM
118552012-05-29 Joseph Myers <joseph@codesourcery.com>
11856
11857 * c-common.c: Fix typo.
11858
ca5f4331
MM
118592012-05-29 Michael Matz <matz@suse.de>
11860
11861 * c-common.h (c_expand_decl): Remove prototype.
11862
4f7f7aca
MLI
118632012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11864
11865 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11866 * c-opts.c (c_common_handle_option): Remove code handling
11867 warn_missing_braces.
11868
4a792f9b
PC
118692012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11870
11871 PR c++/25137
11872 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11873 -Wmissing_braces.
11874
650dc14a
DS
118752012-05-22 Dodji Seketeli <dodji@redhat.com>
11876
11877 PR c++/53322
11878 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11879
9b095bf1
MLI
118802012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11881
11882 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11883 * c-opts.c (c_common_handle_option): Do not handle explicitly
11884 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11885
0b2c4be5
DS
118862012-05-16 Dodji Seketeli <dodji@redhat.com>
11887
11888 PR preprocessor/7263
ab20d992 11889 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11890 to cpp_classify_number. For diagnostics, use the precise location
11891 instead of the global input_location.
11892
a1bde5af
PC
118932012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11894
d02924ef 11895 PR c++/11856
a1bde5af
PC
11896 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11897
d1ede5f4
BS
118982012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11899
a1bde5af 11900 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11901
f2bc201f
MLI
119022012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11903
11904 PR 53063
11905 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11906 Wreorder): Use LangEnabledBy.
11907 * c-opts.c (c_common_handle_option): Do not enable them
11908 explicitly. Call lang-specific generated functions.
11909 (c_common_post_options): Do not set them here.
11910
95744782
MLI
119112012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11912
11913 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11914 Wmissing-field-initializers,Wmissing-parameter-type,
11915 Wold-style-declaration,Woverride-init): Use EnabledBy.
11916 * c-opts.c (c_common_post_options): Do not set here explicitly.
11917
7d5a5747
MLI
119182012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11919
11920 PR 53063
11921 * c-opts.c (c_common_handle_option): Use handle_generated_option
11922 to enable sub-options.
11923
5a3c9cf2
PC
119242012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11925
11926 PR c++/53158
11927 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11928
3ac8781c
RG
119292012-05-10 Richard Guenther <rguenther@suse.de>
11930
11931 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11932 adjust commentary about TYPE_IS_SIZETYPE types.
11933
1e537948
MLI
119342012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11935
11936 PR c++/53261
11937 * c-common.c (warn_logical_operator): Check that argument of
11938 integer_zerop is not NULL.
11939
f2c4a785
MLI
119402012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11941
11942 PR c/43772
11943 * c-common.c (warn_logical_operator): Do not warn if either side
11944 is already true or false.
11945
50f305ca
MLI
119462012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11947
11948 PR c/51712
11949 * c-common.c (expr_original_type): New.
11950 (shorten_compare): Do not warn for enumeration types.
11951
0c3641b0
MLI
119522012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11953
11954 * c.opt (fpermissive): Add Var(flag_permissive).
11955
7edaa4d2
MG
119562012-04-30 Marc Glisse <marc.glisse@inria.fr>
11957
11958 PR c++/51033
11959 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11960 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11961
b9c8da34
DS
119622012-04-30 Dodji Seketeli <dodji@redhat.com>
11963
11964 Add -Wvarargs option
ab20d992 11965 * c.opt (Wvarargs): Define new option.
b9c8da34 11966
e6c69da0
MLI
119672012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11968
11969 * c-common.c (check_function_arguments): Replace
11970 Wmissing-format-attribute with Wsuggest-attribute=format.
11971
90137d8f
MLI
119722012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11973
11974 * c.opt (Wsuggest-attribute=format): New. Alias of
11975 Wmissing-format-attribute.
11976 * c-format.c (decode_format_type): Replace
11977 Wmissing-format-attribute with Wsuggest-attribute=format.
11978 (check_function_format): Likewise.
11979
9faeb493 119802012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11981
11982 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11983 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11984 * c.opt: Add Wliteral-suffix.
11985
c1771a20
MLI
119862012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11987
11988 PR c/44774
11989 * c.opt (Wpedantic): New.
11990 (pedantic): Alias Wpedantic.
11991 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11992 (c_common_post_options): Likewise.
11993 (sanitize_cpp_opts): Likewise.
11994 * c-lex.c (interpret_float): Likewise.
11995 * c-format.c (check_format_types): Likewise.
11996 * c-common.c (pointer_int_sum): Likewise.
11997 (c_sizeof_or_alignof_type): Likewise.
11998 (c_add_case_label): Likewise.
11999 (c_do_switch_warnings): Likewise.
12000 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12001
04b391c1
JM
120022012-04-15 Jason Merrill <jason@redhat.com>
12003
12004 PR c++/52818
12005 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12006 (C_STD_NAME): Distinguish between C++98 and C++11.
12007
ac868f29
EB
120082012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12009
12010 PR target/52624
12011 * c-common.h (uint16_type_node): Rename into...
12012 (c_uint16_type_node): ...this.
12013 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12014 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12015
fd4116f4
MLI
120162012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12017
12018 * c-common.c (warn_if_unused_value): Move definition to here.
12019 * c-common.h (warn_if_unused_value): Move declaration to here.
12020
573ac65e
WB
120212012-03-23 William Bader <williambader@hotmail.com>
12022
12023 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12024
552b8185
JM
120252012-03-20 Jason Merrill <jason@redhat.com>
12026
12027 * c-common.h (enum cxx_dialect): Add cxx1y.
12028 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12029 test.
12030 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12031 * c-opts.c (c_common_post_options): Likewise.
12032 (set_std_cxx1y): New.
12033 (c_common_handle_option): Call it.
12034 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12035
04398fa8
PC
120362012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12037
12038 PR c++/14710
12039 * c.opt ([Wuseless-cast]): Add.
12040
d2a12ae7
RG
120412012-03-16 Richard Guenther <rguenther@suse.de>
12042
12043 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12044
a12bf402
MLI
120452012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12046
12047 PR c++/44783
12048 * c.opt (ftemplate-backtrace-limit) Add.
12049
5c30094f
RO
120502012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12051
12052 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12053 handling.
12054 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12055 (init_pragma): Don't register extern_prefix.
12056
21fa2faf
RG
120572012-03-12 Richard Guenther <rguenther@suse.de>
12058
12059 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12060 (builtin_type_for_size): Likewise.
12061
e3793c6f
JJ
120622012-02-13 Jakub Jelinek <jakub@redhat.com>
12063
12064 PR c++/52215
12065 * c-common.c (sync_resolve_params): Don't decide whether to convert
12066 or not based on TYPE_SIZE comparison, convert whenever arg_type
12067 is unsigned INTEGER_TYPE.
12068
93286335
PC
120692012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12070
12071 PR c/52118
12072 * c.opt ([Wunused-local-typedefs]): Fix description.
12073
7a421706
MS
120742012-01-24 Mike Stump <mikestump@comcast.net>
12075
12076 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12077 exactly.
12078
ba9b1f11
RG
120792012-01-18 Richard Guenther <rguenther@suse.de>
12080
12081 * c-opts.c (c_common_post_options): Reset LTO flags if
12082 we are about to generate a PCH.
12083
465406be
PC
120842012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12085
12086 PR c++/51777
12087 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12088 use pp_unsigned_wide_integer.
12089
aee15221
RG
120902012-01-10 Richard Guenther <rguenther@suse.de>
12091
12092 PR middle-end/51806
12093 * c-opts.c (c_common_handle_option): Move -Werror handling
12094 to language independent code.
12095
5720c0dc
RG
120962012-01-05 Richard Guenther <rguenther@suse.de>
12097
12098 PR middle-end/51764
12099 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12100 from common.opt.
12101
73ac190a
PC
121022011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12103
12104 PR c++/51316
12105 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12106 of array types with an unknown bound.
12107
48b0b196
JM
121082011-12-20 Joseph Myers <joseph@codesourcery.com>
12109
12110 * c-common.c (flag_isoc99): Update comment to refer to C11.
12111 (flag_isoc1x): Change to flag_isoc11.
12112 * c-common.h (flag_isoc99): Update comment to refer to C11.
12113 (flag_isoc1x): Change to flag_isoc11.
12114 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12115 C11.
12116 * c-opts.c (set_std_c1x): Change to set_std_c11.
12117 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12118 Call set_std_c11.
12119 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12120 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12121 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12122 standard.
12123 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12124 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12125 (std=gnu1x): Make alias of std=gnu11.
12126
d58d6eb5
JM
121272011-12-19 Jason Merrill <jason@redhat.com>
12128
12129 PR c++/51228
12130 * c-common.c (handle_transparent_union_attribute): Check the first
12131 field if the type is complete.
12132
b3908fcc
JW
121332011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12134
12135 PR libstdc++/51365
12136 * c-common.c (RID_IS_FINAL): Add.
12137 * c-common.h (RID_IS_FINAL): Add.
12138
fea3ca91
IS
121392011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12140
12141 * c.opt (fgnu-runtime): Provide full description.
12142 (fnext-runtime): Likewise.
12143 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12144
62bad7cd
AM
121452011-11-28 Andrew MacLeod <amacleod@redhat.com>
12146
12147 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12148 predefines in one place. Add LOCK_FREE predefines.
12149 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12150 new func.
12151
c466c4ff
AM
121522011-11-24 Andrew MacLeod <amacleod@redhat.com>
12153
12154 PR c/51256
9faeb493 12155 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12156 conditions
9faeb493
UB
12157 (resolve_overloaded_atomic_exchange,
12158 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12159 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12160 error_mark_node for error conditions.
9faeb493 12161
a5952633
RG
121622011-11-08 Richard Guenther <rguenther@suse.de>
12163
12164 PR middle-end/51010
ab20d992 12165 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12166
0a35513e
AH
121672011-11-07 Richard Henderson <rth@redhat.com>
12168 Aldy Hernandez <aldyh@redhat.com>
12169 Torvald Riegel <triegel@redhat.com>
12170
12171 Merged from transactional-memory.
12172
12173 * c-common.c (handle_tm_wrap_attribute,
12174 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12175 (struct c_common_reswords): Added __transaction* keywords.
12176 (struct c_common_attribute_table): Added transaction* and tm_regparm
12177 attributes.
12178 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12179 masks.
12180 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12181 find_tm_attribute): Declare.
12182
6d87092d
JM
121832011-11-07 Jason Merrill <jason@redhat.com>
12184
12185 PR c++/35688
12186 * c-common.c, c-common.h: Revert yesterday's changes.
12187
8e7860a1
JM
121882011-11-06 Jason Merrill <jason@redhat.com>
12189
12190 PR c++/35688
12191 * c-common.c (decl_has_visibility_attr): Split out from...
12192 (c_determine_visibility): ...here.
12193 * c-common.h: Declare it.
12194
d19fa6b5
JM
121952011-11-06 Joseph Myers <joseph@codesourcery.com>
12196
12197 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12198 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12199 type.
12200 (check_user_alignment): New. Split out of
12201 handle_aligned_attribute. Disallow integer constants with
12202 noninteger types. Conditionally allow zero.
12203 (handle_aligned_attribute): Use check_user_alignment.
12204 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12205
86951993
AM
122062011-11-06 Andrew MacLeod <amacleod@redhat.com>
12207 Richard Henderson <rth@redhat.com>
12208
12209 Merged from cxx-mem-model.
12210
12211 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12212 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12213 parameters that are the same type size.
12214 (get_atomic_generic_size): New. Find size of generic
12215 atomic function parameters and do typechecking.
12216 (add_atomic_size_parameter): New. Insert size into parameter list.
12217 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12218 either __atomic_exchange_n or external library call.
9faeb493 12219 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12220 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12221 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12222 __atomic_load_n or an external library call.
12223 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12224 __atomic_store_n or an external library call.
12225 (resolve_overloaded_builtin): Handle new __atomic builtins.
12226
cf9e9959
EB
122272011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12228
12229 PR c++/50608
12230 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12231 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12232 <INDIRECT_REF>: Return the argument.
12233 <ARRAY_REF>: Remove special code for negative offset.
12234 Call fold_build_pointer_plus instead of size_binop.
12235 (fold_offsetof): Remove STOP_REF argument and adjust.
12236 * c-common.h (fold_offsetof_1): Declare.
12237 (fold_offsetof): Remove STOP_REF argument.
12238
25339f10
JM
122392011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12240
12241 PR c++/50810
12242 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12243 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12244 Wnarrowing for C++0x and C++98.
12245 * c.opt ([Wnarrowing]): Update.
12246
89401152
PC
122472011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12248
12249 PR c++/44277
12250 * c.opt: Add Wzero-as-null-pointer-constant.
12251
97e3ad20
JM
122522011-10-31 Jason Merrill <jason@redhat.com>
12253
15694fdd
JM
12254 * c.opt (-fdeduce-init-list): Off by default.
12255
97e3ad20
JM
12256 PR c++/50920
12257 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12258 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12259 and -Wc++11-compat.
12260 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12261
fb9120e3
RAV
122622011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12263
12264 PR c++/30066
12265 * c.opt (fvisibility-inlines-hidden): Description change.
12266
3ce4f9e4
ESR
122672011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12268
12269 Implement C++11 user-defined literals.
12270 * c-common.c (build_userdef_literal): New.
12271 * c-common.def: New tree code.
12272 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12273 * c-lex.c (interpret_float): Add suffix parm.
12274 (c_lex_with_flags): Build literal tokens.
12275
5f53c243
PC
122762011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12277
12278 PR c++/50841
12279 Revert:
12280 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12281
12282 PR c++/50810
12283 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12284 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12285 Wnarrowing for C++0x and C++98.
12286 * c.opt ([Wnarrowing]): Update.
12287
263734e1
PC
122882011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12289
12290 PR c++/50810
12291 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12292 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12293 Wnarrowing for C++0x and C++98.
12294 * c.opt ([Wnarrowing]): Update.
12295
d2e312d7
PC
122962011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12297
12298 PR c++/45385
12299 * c-common.c (conversion_warning): Remove code looking for
12300 artificial operands.
12301
d17687f6
DS
123022011-10-18 Dodji Seketeli <dodji@redhat.com>
12303
12304 PR bootstrap/50760
12305 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12306 !NO_IMPLICIT_EXTERN_C.
d17687f6 12307
fc8396e9
PC
123082011-10-17 Michael Spertus <mike_spertus@symantec.com>
12309
12310 * c-common.c (c_common_reswords): Add __bases,
12311 __direct_bases.
12312 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12313
123142011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12315
12316 PR c++/50757
12317 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12318
847e697a
TT
123192011-10-15 Tom Tromey <tromey@redhat.com>
12320 Dodji Seketeli <dodji@redhat.com>
12321
12322 * c.opt (fdebug-cpp): New option.
12323 * c-opts.c (c_common_handle_option): Handle the option.
12324 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12325 output stream in parameter. Factorized from ...
12326 (maybe_print_line): ... this. Dump location debug information when
12327 -fdebug-cpp is in effect.
12328 (print_line_1): New static function. Takes an output stream in
12329 parameter. Factorized from ...
12330 (print_line): ... here. Dump location information when -fdebug-cpp
12331 is in effect.
12332 (scan_translation_unit): Dump location information when
12333 -fdebug-cpp is in effect.
12334
92582b75
TT
123352011-10-15 Tom Tromey <tromey@redhat.com>
12336 Dodji Seketeli <dodji@redhat.com>
12337
12338 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12339 without argument.
12340 * c-opts.c (c_common_handle_option)<case
12341 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12342 cases. Handle -ftrack-macro-expansion with and without argument.
12343
46427374
TT
123442011-10-15 Tom Tromey <tromey@redhat.com>
12345 Dodji Seketeli <dodji@redhat.com>
12346
12347 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12348 (print_line, cb_define, do_line_change): Adjust to avoid touching
12349 the internals of struct line_map. Use the public API instead.
12350 * c-pch.c (c_common_read_pch): Likewise.
12351 * c-lex.c (fe_file_change): Likewise.
12352
fc8396e9
PC
123532011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12354
12355 PR c++/17212
12356 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12357
123582011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12359
12360 PR c++/33067
12361 * c-pretty-print.c (pp_c_floating_constant): Output
12362 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12363
e79983f4
MM
123642011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12365
12366 * c-common.c (def_builtin_1): Delete old interface with two
12367 parallel arrays to hold standard builtin declarations, and replace
12368 it with a function based interface that can support creating
12369 builtins on the fly in the future. Change all uses, and poison
12370 the old names. Make sure 0 is not a legitimate builtin index.
12371 * c-omp.c (c_finish_omp_barrier): Ditto.
12372 (c_finish_omp_taskwait): Ditto.
12373 (c_finish_omp_flush): Ditto.
12374
6637388f
TG
123752011-10-11 Tristan Gingold <gingold@adacore.com>
12376
12377 * c.opt: (fallow-parameterless-variadic-functions): New.
12378
3797cb21
DS
123792011-09-08 Dodji Seketeli <dodji@redhat.com>
12380
12381 PR c++/33255 - Support -Wunused-local-typedefs warning
12382 * c-common.h (struct c_language_function::local_typedefs): New
12383 field.
9faeb493
UB
12384 (record_locally_defined_typedef, maybe_record_typedef_use)
12385 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12386 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12387 (maybe_record_typedef_use)
12388 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12389 * c.opt: Declare new -Wunused-local-typedefs flag.
12390
693ddb1b
EB
123912011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12392
12393 PR middle-end/50266
12394 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12395 computations.
12396
830c740f
RG
123972011-09-05 Richard Guenther <rguenther@suse.de>
12398
12399 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12400 of integer_minus_one_node for empty array upper bounds.
12401
892a371f
DS
124022011-08-28 Dodji Seketeli <dodji@redhat.com>
12403
12404 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12405 it's the first time it's being called on this main TU.
12406
0e3fdb48
RB
124072011-08-24 Richard Guenther <rguenther@suse.de>
12408
12409 PR c/49396
12410 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12411
124122011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12413
12414 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12415 defined in cpp_init_builtins and c_cpp_builtins.
12416
d4a83c10
JM
124172011-08-19 Joseph Myers <joseph@codesourcery.com>
12418
12419 * c-common.c (c_common_reswords): Add __builtin_complex.
12420 * c-common.h (RID_BUILTIN_COMPLEX): New.
12421
bbceee64
JM
124222011-08-18 Joseph Myers <joseph@codesourcery.com>
12423
12424 * c-common.c (c_common_reswords): Add _Noreturn.
12425 (keyword_is_function_specifier): Handle RID_NORETURN.
12426 * c-common.h (RID_NORETURN): New.
12427
3f8257db 124282011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12429
12430 * c-common.c (unsafe_conversion_p): New function. Check if it is
12431 unsafe to convert an expression to the type.
12432 (conversion_warning): Adjust, use unsafe_conversion_p.
12433 * c-common.h (unsafe_conversion_p): New function declaration.
12434
20906c66
JJ
124352011-08-02 Jakub Jelinek <jakub@redhat.com>
12436
12437 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12438 (c_finish_omp_taskyield): New prototype.
12439 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12440 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12441 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12442 or RHS1 have side-effects, evaluate those too in the right spot,
12443 if it is a decl and LHS is also a decl, error out if they
12444 aren't the same.
12445 (c_finish_omp_taskyield): New function.
12446 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12447 * c-pragma.c (omp_pragmas): Add taskyield.
12448 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12449 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12450 PRAGMA_OMP_CLAUSE_MERGEABLE.
12451
770e5a2e
DS
124522011-07-25 Dodji Seketeli <dodji@redhat.com>
12453
12454 * c-common.h (set_underlying_type): Remove parm name from
12455 declaration.
12456
1baae426
RG
124572011-07-25 Romain Geissler <romain.geissler@gmail.com>
12458
12459 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12460
fcb21722
JM
124612011-07-22 Jason Merrill <jason@redhat.com>
12462
76f86d00
JM
12463 PR c++/49793
12464 * c.opt (Wnarrowing): New.
12465
3a636414
JM
12466 PR c++/30112
12467 * c-common.h: Declare c_linkage_bindings.
12468 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12469
fcb21722
JM
12470 PR c++/49813
12471 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12472 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12473 as flag_isoc99 for 'restrict'.
12474 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12475
02614448
ILT
124762011-07-21 Ian Lance Taylor <iant@google.com>
12477
12478 PR middle-end/49705
12479 * c-common.c (c_disable_warnings): New static function.
12480 (c_enable_warnings): New static function.
12481 (c_fully_fold_internal): Change local unused_p to bool. Call
12482 c_disable_warnings and c_enable_warnings rather than change
12483 c_inhibit_evaluation_warnings.
12484
34429675
JM
124852011-07-20 Jason Merrill <jason@redhat.com>
12486
12487 PR c++/6709 (DR 743)
12488 PR c++/42603 (DR 950)
12489 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12490 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12491 (CPP_DECLTYPE): New.
12492 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12493
5d49b6a7
RG
124942011-07-19 Richard Guenther <rguenther@suse.de>
12495
12496 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12497 * c-omp.c (c_finish_omp_for): Likewise.
12498
e84a58ff
EB
124992011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12500
12501 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12502 body on the next line.
12503
329af3c7
JM
125042011-07-08 Jason Merrill <jason@redhat.com>
12505
4063e61b
JM
12506 PR c++/45437
12507 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12508
329af3c7
JM
12509 PR c++/49673
12510 * c-common.c (c_apply_type_quals_to_decl): Don't check
12511 TYPE_NEEDS_CONSTRUCTING.
12512
1a072294
RG
125132011-07-06 Richard Guenther <rguenther@suse.de>
12514
12515 * c-common.c (c_common_nodes_and_builtins):
12516 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12517
fce5dddd
RG
125182011-07-05 Richard Guenther <rguenther@suse.de>
12519
12520 * c-common.c (c_common_nodes_and_builtins): Build all common
12521 tree nodes first.
12522
45d439ac
JJ
125232011-06-27 Jakub Jelinek <jakub@redhat.com>
12524
56300785
JJ
12525 * c-common.h (c_tree_chain_next): New static inline function.
12526
45d439ac
JJ
12527 * c-common.c (check_builtin_function_arguments): Handle
12528 BUILT_IN_ASSUME_ALIGNED.
12529
e0a8ecf2
AM
125302011-06-21 Andrew MacLeod <amacleod@redhat.com>
12531
12532 * c-common.c: Add sync_ or SYNC__ to builtin names.
12533 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12534
125352011-06-20 Pierre Vittet <piervit@pvittet.com>
12536
12537 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12538 handler.
12539 (gen_pragma_handler): New union.
12540 (internal_pragma_handler): New type.
12541 (c_register_pragma_with_data)
12542 (c_register_pragma_with_expansion_and_data): New functions.
12543
12544 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12545 (c_register_pragma, c_register_pragma_with_expansion)
12546 (c_invoke_pragma_handler): Changed to work with
12547 internal_pragma_handler.
12548 (c_register_pragma_with_data)
12549 (c_register_pragma_with_expansion_and_data): New functions.
12550
677f3fa8
JM
125512011-06-14 Joseph Myers <joseph@codesourcery.com>
12552
12553 * c-common.c: Include common/common-target.h.
12554 (handle_section_attribute): Use
12555 targetm_common.have_named_sections.
12556 * c-cppbuiltin.c: Include common/common-target.h.
12557 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12558
d7fc8c14
RG
125592011-06-10 Richard Guenther <rguenther@suse.de>
12560
12561 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12562 to print a IDENTIFIER_NODE.
12563
10e48e39
RO
125642011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12565 Joseph Myers <joseph@codesourcery.com>
12566
12567 * c.opt (fbuilding-libgcc): New option.
12568 * c-cppbuiltin.c (c_cpp_builtins): Define
12569 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12570
6976ae51
JM
125712011-06-07 Jason Merrill <jason@redhat.com>
12572
3ff60975
JM
12573 * c-common.c (max_tinst_depth): Lower default to 900.
12574
6976ae51
JM
12575 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12576
009db074
RG
125772011-06-07 Richard Guenther <rguenther@suse.de>
12578
12579 * c-common.c (c_common_nodes_and_builtins): Do not set
12580 size_type_node or call set_sizetype.
12581
b4592b92
DS
125822011-06-07 Dodji Seketeli <dodji@redhat.com>
12583
12584 PR debug/49130
12585 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12586 type when using pointer comparison to compare types.
b4592b92 12587
014ab419
JW
125882011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12589
12590 * c.opt: Add -Wdelete-non-virtual-dtor.
12591 * c-opts.c (c_common_handle_option): Include it in -Wall.
12592
4f60111f
NF
125932011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12594
12595 PR bootstrap/49190
12596
12597 Revert:
12598 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12599
12600 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12601 not tree_common.
12602
4cc4f2f4
JJ
126032011-05-27 Jakub Jelinek <jakub@redhat.com>
12604
12605 PR c++/49165
12606 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12607 C++ don't call c_common_truthvalue_conversion on void type arms.
12608
38e01f9e
NF
126092011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12610
12611 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12612 (stmt_list_stack): Define.
12613 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12614 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12615
92e948a8
NF
126162011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12617
12618 * c-common.c (warning_candidate_p): Check for BLOCKs.
12619
a2fc3e63
NF
126202011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12621
12622 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12623 not tree_common.
12624
0957c029
JJ
126252011-05-25 Jakub Jelinek <jakub@redhat.com>
12626
12627 * c-common.c (def_fn_type): Remove extra va_end.
12628
828fb3ba
JM
126292011-05-23 Jason Merrill <jason@redhat.com>
12630
12631 PR c++/48106
12632 * c-common.c (c_common_get_narrower): New.
12633 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12634
dde05067
NF
126352011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12636
12637 * c-common.h (check_function_arguments): Tweak prototype of
12638 check_function_arguments.
12639 * c-common.c (check_function_arguments): Likewise. Adjust
12640 calls to check_function_nonnull, check_function_format, and
12641 check_function_sentinel.
12642 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12643 separate attributes and typelist arguments. Use
12644 FOREACH_FUNCTION_ARGS to iterate over argument types.
12645
3c0d13bf
PC
126462011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12647
12648 * c-common.c (c_common_reswords): Reorder.
12649 * c-common.h (rid): Likewise.
12650
8242dd04
NF
126512011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12652
12653 * c-common.c (def_fn_type): Don't call build_function_type, call
12654 build_function_type_array or build_varargs_function_type_array
12655 instead.
12656 (c_common_nodes_and_builtins): Likewise.
12657
3d528853
NF
126582011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12659
12660 * c-common.c (c_add_case_label): Omit the loc argument to
12661 build_case_label.
12662 * c-common.h (build_case_label): Remove.
12663 * c-semantics.c (build_case_label): Remove.
12664
a04a722b
JM
126652011-05-05 Joseph Myers <joseph@codesourcery.com>
12666
12667 * c-objc.h (objc_start_method_definition): Update prototype.
12668 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12669
e19a18d4
NF
126702011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12671
12672 * c-common.c (check_main_parameter_types): Reindent. Don't use
12673 TYPE_ARG_TYPES directly.
12674 (handle_nonnull_attribute): Likewise.
12675 (sync_resolve_params): Likewise.
12676 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12677 to check_format_string.
12678 (handle_format_attribute): Likewise.
12679 (check_format_string): Take a function type to examine instead of
12680 a type list. Use a function_arg_iterator to step through argument
12681 types.
12682
c62c040f
RG
126832011-05-04 Richard Guenther <rguenther@suse.de>
12684
12685 * c-common.c (fix_string_type): Use size_int for index type bounds.
12686 (start_fname_decls): Do not pass NULL to build_int_cst.
12687 (c_init_attributes): Likewise.
12688 * c-lex.c (c_lex_with_flags): Likewise.
12689
c12ff9d8
JM
126902011-04-27 Jason Merrill <jason@redhat.com>
12691
12692 * c-common.c (make_tree_vector_from_list): New.
12693 * c-common.h: Declare it.
12694
304dfbe3
RG
126952011-04-26 Richard Guenther <rguenther@suse.de>
12696
12697 PR preprocessor/48248
12698 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12699 for output size with -P.
12700
3c0d13bf
PC
127012011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12702
12703 * c-common.c (struct c_common_resword): Add __underlying_type.
12704 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12705
04695783
JM
127062011-04-20 Jim Meyering <meyering@redhat.com>
12707
12708 * c-format.c (init_dollar_format_checking): Remove useless
12709 if-before-free.
12710
0dc33c3c
NP
127112011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12712
12713 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12714 (objc_detect_field_duplicates): New.
0dc33c3c 12715 * stub-objc.c: Likewise.
3c0d13bf 12716
c59633d9
NP
127172011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12718
12719 * stub-objc.c (objc_declare_protocols): Renamed to
12720 objc_declare_protocol.
12721 * c-objc.h: Likewise.
3c0d13bf 12722
32dabdaf
NP
127232011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12724
12725 * stub-objc.c (objc_declare_class): Updated argument name.
12726
81f653d6
NF
127272011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12728
12729 * c-common.h (c_common_init_ts): Declare.
12730 * c-common.c (c_common_init_ts): Define.
12731
eb345401
NP
127322011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12733
12734 * c-objc.h (objc_build_message_expr): Updated prototype.
12735 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12736
a358e188
MJ
127372011-04-12 Martin Jambor <mjambor@suse.cz>
12738
12739 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12740 of cgraph_node.
12741
e6313a78
RG
127422011-04-11 Richard Guenther <rguenther@suse.de>
12743
12744 * c-common.c (complete_array_type): Build a range type of
12745 proper type.
12746
dcf0c47e
NF
127472011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12748
12749 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12750 (handle_type_generic_attribute): Likewise.
12751
1ee44b26
JM
127522011-04-07 Jason Merrill <jason@redhat.com>
12753
12754 PR c++/48450
12755 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12756 conversion from C++0x scoped enum.
12757
acce4e77
JM
127582011-04-06 Joseph Myers <joseph@codesourcery.com>
12759
12760 * c-target-def.h: New file.
12761 * c-target.def: New file.
12762 * c-target.h: New file.
12763 * c-common.c (targetcm): Don't define here.
12764 * c-common.h (default_handle_c_option): Declare.
12765 * c-format.c: Include c-target.h instead of target.h.
12766 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12767 include tm.h.
12768 (default_handle_c_option): Move from targhooks.c.
12769
e2eefb55
JJ
127702011-03-29 Jakub Jelinek <jakub@redhat.com>
12771
12772 PR preprocessor/48248
12773 * c-ppoutput.c (print): Add src_file field.
12774 (init_pp_output): Initialize it.
12775 (maybe_print_line): Don't optimize by adding up to 8 newlines
12776 if map->to_file and print.src_file are different file.
12777 (print_line): Update print.src_file.
12778
ba78087b
KT
127792011-03-25 Kai Tietz <ktietz@redhat.com>
12780
12781 * c-ada-spec.c (compare_comment): Use filename_cmp
12782 instead of strcmp for filename.
12783
0edf1bb2
JL
127842011-03-25 Jeff Law <law@redhat.com>
12785
adfac8df 12786 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12787
c7dc8804
JM
127882011-03-25 Jason Merrill <jason@redhat.com>
12789
12790 * c.opt: Add -std=c++03.
12791
d1d879b1
EB
127922011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12793
12794 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12795
3f8257db 127962011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12797
12798 PR target/12171
5050afdf
KT
12799 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12800 Display allowed attributes for function pointer types.
12801 (pp_c_attributes_display): New function to display
12802 attributes having affects_type_identity flag set to true.
12803 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12804
62d784f7
KT
12805 * c-common.c (c_common_attribute_table):
12806 Add new element.
12807 (c_common_format_attribute_table): Likewise.
12808
82d37118
JM
128092011-03-18 Jason Merrill <jason@redhat.com>
12810
49a000c3
JM
12811 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12812 * c-common.h: Don't declare it here.
12813 * c-common.c: Or define it here.
12814 * c-opts.c (c_common_handle_option): Or set it here.
12815
82d37118
JM
12816 PR c++/35315
12817 * c-common.c (handle_transparent_union_attribute): Don't
12818 make a duplicate type in C++.
12819
17bc631c
JM
128202011-03-15 Jason Merrill <jason@redhat.com>
12821
12822 * c-common.c (max_constexpr_depth): New.
12823 * c-common.h: Declare it.
12824 * c-opts.c (c_common_handle_option): Set it.
12825 * c.opt (fconstexpr-depth): New option.
12826
1b9b91a6
JM
128272011-03-11 Jason Merrill <jason@redhat.com>
12828
f231b5ff
JM
12829 * c-common.c (attribute_takes_identifier_p): Add missing const.
12830
1b9b91a6
JM
12831 PR c++/46803
12832 * c-common.c (attribute_takes_identifier_p): Assume that an
12833 unknown attribute takes an identifier.
12834
a19e4d44
NF
128352011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12836
12837 PR c/47786
12838 * c-common.c (c_type_hash): Call list_length instead of iterating
12839 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12840
982d62f6
JJ
128412011-02-19 Jakub Jelinek <jakub@redhat.com>
12842
12843 PR c/47809
12844 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12845
0a256240
NP
128462011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12847
12848 * c.opt (fobjc-abi-version=) New.
12849 (fobjc-nilcheck): New.
12850
ba9e6dd5
NF
128512011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12852
12853 PR c++/46890
12854 * c-common.h (keyword_is_decl_specifier): Declare.
12855 * c-common.c (keyword_is_decl_specifier): Define.
12856 (keyword_is_function_specifier): New function.
12857
7273813a
JJ
128582011-01-26 Jakub Jelinek <jakub@redhat.com>
12859
12860 PR c/47473
12861 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12862 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12863 REAL_TYPE.
12864
908ef79b
AC
128652011-01-26 Arnaud Charlet <charlet@adacore.com>
12866
12867 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12868
237e9384
JJ
128692011-01-26 Jakub Jelinek <jakub@redhat.com>
12870
12871 PR pch/47430
12872 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12873 after init_c_lex if pch_file is set.
12874
47ea1edf
DK
128752011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12876
d4dba752 12877 PR c++/43601
47ea1edf
DK
12878 * c.opt (-fkeep-inline-dllexport): New switch.
12879
2aa9c6ae
RG
128802011-01-12 Richard Guenther <rguenther@suse.de>
12881
12882 PR middle-end/32511
12883 * c-common.c (handle_weak_attribute): Warn instead of error
12884 on declaring an inline function weak.
12885
7bd11157
TT
128862011-01-05 Tom Tromey <tromey@redhat.com>
12887
12888 * c-common.h (lvalue_error): Update.
12889 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12890 not error.
12891
0e66e494 128922010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12893
b4f588c4
NP
12894 PR objc/47075
12895 * c-objc.h (objc_finish_message_expr): Added argument to
12896 prototype.
12897
f4da8dce
NF
128982010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12899
12900 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12901 Use prototype_p.
12902
46270f14
NP
129032010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12904
12905 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12906 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12907
4816c593
NF
129082010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12909
12910 * c-common.h (readonly_error): Declare.
12911 * c-common.c (readonly_error): Define.
12912
7a6daeb0
NF
129132010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12914
12915 * c-common.h (invalid_indirection_error): Declare.
12916 * c-common.c (invalid_indirection_error): Define.
12917
892f6119
RG
129182010-12-03 Richard Guenther <rguenther@suse.de>
12919
12920 PR c/46745
12921 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12922 (pp_c_unary_expression): Likewise.
12923 (pp_c_expression): Likewise.
12924
6c39e757
NP
129252010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12926
12927 * c-common.h (objc_finish_function): New.
12928 (objc_non_volatilized_type): Removed.
12929 (objc_type_quals_match): Removed.
12930 * stub-objc.c (objc_finish_function): New.
12931 (objc_non_volatilized_type): Removed.
12932 (objc_type_quals_match): Removed.
9faeb493 12933
7c475d11
JM
129342010-11-30 Joseph Myers <joseph@codesourcery.com>
12935
12936 * c-common.h (parse_optimize_options): Declare.
12937 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12938 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12939
71f3e391
JM
129402010-11-29 Joseph Myers <joseph@codesourcery.com>
12941
12942 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12943 GET_ENVIRONMENT.
12944 * c-pch.c (O_BINARY): Don't define here.
12945 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12946
d5fabb58
JM
129472010-11-25 Joseph Myers <joseph@codesourcery.com>
12948
12949 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12950 targetm.except_unwind_info.
12951
299404a1
JM
129522010-11-23 Joseph Myers <joseph@codesourcery.com>
12953
12954 * c-opts.c (c_common_handle_option): Pass location to
12955 set_struct_debug_option.
12956
c98cd5bf
JM
129572010-11-23 Joseph Myers <joseph@codesourcery.com>
12958
12959 * c-common.c (visibility_options): Move from ../opts.c.
12960 * c-common.h (struct visibility_flags, visibility_options):
12961 Declare here.
12962 * c-opts.c (finish_options): Rename to c_finish_options.
12963 (c_common_init): Update call to finish_options.
12964
a9546771
NP
129652010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12966
12967 PR objc/34033
12968 * c-lex.c (lex_string): Check that each string in an Objective-C
12969 string concat sequence starts with either one or zero '@', and
12970 that there are no spurious '@' signs at the end.
12971
24a57808
JM
129722010-11-20 Joseph Myers <joseph@codesourcery.com>
12973
12974 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12975 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12976 HANDLE_PRAGMA_VISIBILITY.
12977 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12978 HANDLE_PRAGMA_VISIBILITY): Don't define.
12979 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12980
a9aa2c3a
NF
129812010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12982
12983 PR c++/16189
12984 PR c++/36888
12985 PR c++/45331
12986 * c-common.h (keyword_begins_type_specifier): Declare.
12987 (keyword_is_storage_class_specifier): Declare.
12988 (keyword_is_type_qualifier): Declare.
12989 * c-common.c (keyword_begins_type_specifier): New function.
12990 (keyword_is_storage_class_specifier): New function.
12991 (keyword_is_type_qualifier): Declare.
12992
5386338c
JM
129932010-11-19 Joseph Myers <joseph@codesourcery.com>
12994
12995 PR c/46547
12996 * c-common.c (in_late_binary_op): Define.
12997 (c_common_truthvalue_conversion): Check in_late_binary_op before
12998 calling c_save_expr.
12999 * c-common.h (in_late_binary_op): Declare.
13000
69ccdddb
JM
130012010-11-19 Joseph Myers <joseph@codesourcery.com>
13002
13003 * c-opts.c (c_common_handle_option): Update calls to
13004 set_struct_debug_option.
13005
6b192a09
NP
130062010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13007
13008 * c-common.h (objc_declare_protocols): Added additional argument.
13009 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13010
fb52b50a
NF
130112010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13012
13013 PR c/33193
13014 * c-common.h (build_real_imag_expr): Declare.
13015 * c-semantics.c (build_real_imag_expr): Define.
13016
b37421c6
JM
130172010-11-17 Joseph Myers <joseph@codesourcery.com>
13018
13019 * c-opts.c (c_common_parse_file): Take no arguments.
13020 * c-common.h (c_common_parse_file): Update prototype.
13021
07078664
JJ
130222010-11-16 Jakub Jelinek <jakub@redhat.com>
13023
13024 PR c++/46401
13025 * c-common.c (warning_candidate_p): Don't track non-const calls
13026 or STRING_CSTs.
13027
c6a13190
ILT
130282010-11-15 Ian Lance Taylor <iant@google.com>
13029
13030 * c-lex.c (init_c_lex): Set macro debug callbacks if
13031 flag_dump_go_spec is set.
13032
925e8657
NP
130332010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13034
13035 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13036 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13037
bb0a9581
NF
130382010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13039
13040 PR preprocessor/45038
13041 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13042 dialects.
13043
c5fa0890
JM
130442010-11-12 Joseph Myers <joseph@codesourcery.com>
13045
13046 * c-common.h (c_family_lang_mask): Declare.
13047 * c-opts.c (c_family_lang_mask): Make extern.
13048 * c-pragma.c (handle_pragma_diagnostic): Use
13049 control_warning_option.
13050
a4d8c676
JM
130512010-11-12 Joseph Myers <joseph@codesourcery.com>
13052
13053 * c-common.c (parse_optimize_options): Update call to
13054 decode_options.
13055 * c-common.h (c_common_handle_option): Update prototype.
13056 * c-opts.c (c_common_handle_option): Take location_t parameter and
13057 pass it to other functions.
13058
f954bd2c
JM
130592010-11-11 Joseph Myers <joseph@codesourcery.com>
13060
13061 * c-opts.c (warning_as_error_callback): Remove.
13062 (c_common_initialize_diagnostics): Don't call
13063 register_warning_as_error_callback.
13064 (c_common_handle_option): Handle -Werror=normalized= here.
13065
d8a07487
JM
130662010-11-10 Joseph Myers <joseph@codesourcery.com>
13067
13068 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13069 in diagnostic.
13070 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13071 letter.
13072 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13073 Remove trailing '.' from diagnostics.
13074 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13075
d5478783
JM
130762010-11-10 Joseph Myers <joseph@codesourcery.com>
13077
13078 * c-common.c (parse_optimize_options): Pass global_dc to
13079 decode_options.
13080 * c-opts.c (c_common_handle_option): Pass &global_options to
13081 set_Wstrict_aliasing.
13082 * c.opt (v): Don't mark Common or document here.
13083
91ebb981
IS
130842010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13085
13086 PR target/44981
13087 * c-format.c (format_type): New type gcc_objc_string_format_type.
13088 (valid_stringptr_type_p): New.
13089 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13090 (check_format_string): Pass expected type, use
91ebb981
IS
13091 valid_stringptr_type_p (), check that the format string types are
13092 consistent with the format specification.
13093 (decode_format_attr): Warn if NSString is used outside objective-c.
13094 (format_types_orig): Add NSString.
13095 (format_name): New.
13096 (format_flags): New.
13097 (check_format_arg): Handle format strings requiring an external parser.
13098 first_target_format_type: New variable.
13099 (handle_format_attribute): Set up first_target_format_type, pass the
13100 expected format arg string type to check_format_string().
ab20d992 13101 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13102 * stub-objc.c (objc_string_ref_type_p): New.
13103 (objc_check_format_arg): New.
13104
bede2adc
NP
131052010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13106
9faeb493 13107 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13108 * c-common.h (objc_build_class_component_ref): New.
13109 * stub-objc.c (objc_build_class_component_ref): New.
13110
9a179d01
NP
131112010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13112
13113 * c.opt (Wproperty-assign-default): New option.
13114
22d8d616
NP
131152010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13116
13117 Implemented -fobjc-std=objc1 flag.
13118 * c.opt (fobjc-std=objc1): New option.
13119
2debdb4f
NP
131202010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13121
13122 Implemented format and noreturn attributes for Objective-C methods.
13123 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13124 attribute for Objective-C methods.
13125
ec52b111
JM
131262010-10-31 Jason Merrill <jason@redhat.com>
13127
13128 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13129 EXPR_LOC_OR_HERE.
13130
46a88c12
NP
131312010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13132
13133 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13134 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13135 (objc_add_property_declaration): Removed arguments for copies and
13136 ivar.
13137 (objc_build_getter_call): Renamed to
13138 objc_maybe_build_component_ref.
13139 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13140 (objc_is_property_ref): New.
13141 * c-common.c (c_common_reswords): Removed copies and ivar.
13142 * stub-objc.c (objc_add_property_declaration): Removed arguments
13143 for copies and ivar.
13144 (objc_build_getter_call): Renamed to
13145 objc_maybe_build_component_ref.
13146 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13147 (objc_is_property_ref): New.
9faeb493 13148
1e4bf85b
AC
131492010-10-29 Arnaud Charlet <charlet@adacore.com>
13150 Matthew Gingell <gingell@adacore.com>
13151
13152 * c-ada-spec.c (separate_class_package): New function.
13153 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13154 name of their enclosing package.
13155 (print_ada_declaration): Use separate_class_package.
13156
81f0bab2
JM
131572010-10-27 Jason Merrill <jason@redhat.com>
13158
2b08f2c5
JM
13159 * c-common.c (c_common_reswords): Add __is_literal_type.
13160 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13161
81f0bab2
JM
13162 * c-common.c (check_case_value): Remove special C++ code.
13163
200290f2
NP
131642010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13165
13166 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13167 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13168 and RID_LAST_PATTR.
13169 (objc_add_property_declaration): Added additional arguments.
13170 (objc_property_attribute_kind): Removed.
13171 (objc_set_property_attr): Removed.
13172 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13173 copy and nonatomic.
13174 * stub-objc.c (objc_add_property_declaration): Added additional
13175 arguments.
13176 (objc_set_property_attr): Removed.
9faeb493 13177
f614132b
NP
131782010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13179
13180 * c-common.h (objc_add_property_variable): Renamed to
13181 objc_add_property_declaration. Added location argument.
13182 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13183
b8a18805
NP
131842010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13185
13186 * c-common.h (objc_maybe_printable_name): New.
13187 * stub-objc.c (objc_maybe_printable_name): New.
13188
3f8257db
JJ
131892010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13190 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13191
13192 * c-common.h (c_common_mark_addressable_vec): Declare.
13193 * c-common.c (c_common_mark_addressable_vec): New function.
13194
249a82c4
NP
131952010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13196
13197 * c-common.h (objc_set_method_type): Removed.
13198 (objc_add_method_declaration): Added boolean argument.
13199 (objc_start_method_definition): Same change.
13200 (objc_build_method_signature): Same change.
13201 * stub-objc.c (objc_set_method_type): Removed.
13202 (objc_add_method_declaration): Added boolean argument.
13203 (objc_start_method_definition): Same change.
13204 (objc_build_method_signature): Same change.
13205
977e30bc
NP
132062010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13207
13208 * c-common.h (finish_file): Removed.
13209 (objc_write_global_declarations): New.
13210 * c-opts.c (c_common_parse_file): Do not call finish_file.
13211 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13212
da57d1b9
NP
132132010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13214
13215 Implemented parsing @synthesize and @dynamic for
13216 Objective-C/Objective-C++.
13217 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13218 (objc_add_synthesize_declaration): New.
13219 (objc_add_dynamic_declaration): New.
13220 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13221 * stub-objc.c (objc_add_synthesize_declaration): New.
13222 (objc_add_dynamic_declaration): New.
9faeb493 13223
0069111f
MM
132242010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13225
13226 PR target/46041
13227 * c-cppbuiltin.c (mode_has_fma): Move function here from
13228 builtins.c. Don't use the fma optab, instead just use the
13229 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13230 using -save-temps.
13231
e426b47b
NP
132322010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13233
13234 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13235
3f8257db 13236 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13237
9faeb493 13238 Radar 4330422
e426b47b
NP
13239 * c-common.h (objc_non_volatilized_type): New declaration
13240 * stub-objc.c (objc_non_volatilized_type): New stub.
13241
90fbfdc3
NP
132422010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13243
e426b47b 13244 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13245
ab20d992 13246 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13247
9faeb493 13248 Radar 4133425
90fbfdc3 13249 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13250 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13251
c37d8c30
IS
132522010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13253
13254 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13255 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13256 (objc_ivar_visibility_kind): New enum.
13257 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13258 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13259 visibility enum.
13260
1b1562a5
MM
132612010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13262
13263 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13264 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13265 has the appropriate fma builtins.
13266 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13267
668ea4b1
IS
132682010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13269
1b1562a5 13270 merge from FSF apple 'trunk' branch.
3f8257db 13271 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13272
668ea4b1
IS
13273 Radars 4436866, 4505126, 4506903, 4517826
13274 * c-common.c (c_common_resword): Define @property and its attributes.
13275 * c-common.h: Define property attribute enum entries.
13276 (OBJC_IS_PATTR_KEYWORD): New.
13277 (objc_property_attribute_kind): New enum.
13278 Declare objc_set_property_attr (), objc_add_property_variable (),
13279 objc_build_getter_call () and objc_build_setter_call ().
13280 * stub-objc.c (objc_set_property_attr): New stub.
13281 (objc_add_property_variable): Likewise.
13282 (objc_build_getter_call): Likewise.
13283 (objc_build_setter_call) Likewise.
1b1562a5 13284
a1178b30
IS
132852010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13286
1b1562a5 13287 merge from FSF apple 'trunk' branch.
ab20d992 13288 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13289
13290 Radar 3803157 (method attributes)
13291 * c-common.c (handle_deprecated_attribute): Recognize
13292 objc methods as valid declarations.
13293 * c-common.h: Declare objc_method_decl ().
1b1562a5 13294 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13295
a75bfaa6
JM
132962010-10-08 Joseph Myers <joseph@codesourcery.com>
13297
13298 * c-common.c (parse_optimize_options): Call
13299 decode_cmdline_options_to_array_default_mask before
13300 decode_options. Update arguments to decode_options.
13301 * c-common.h (c_common_init_options_struct): Declare.
13302 * c-opts.c (c_common_init_options_struct): New. Split out from
13303 c_common_init_options.
13304
f05b9d93
NP
133052010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13306
13307 Implemented fast enumeration for Objective-C.
13308 * c-common.h (objc_finish_foreach_loop): New.
13309 * stub-objc.c (objc_finish_foreach_loop): New.
13310
1ebe4b4f
JM
133112010-10-05 Joseph Myers <joseph@codesourcery.com>
13312
13313 * c-common.h (struct diagnostic_context): Don't declare here.
13314 (c_common_initialize_diagnostics): Declare using
13315 diagnostic_context typedef.
13316 * c-opts.c (c_common_handle_option): Pass global_dc to
13317 handle_generated_option.
13318
d4d24ba4
JM
133192010-10-04 Joseph Myers <joseph@codesourcery.com>
13320
13321 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13322 handle_generated_option.
13323
478a1c5b
ILT
133242010-10-03 Ian Lance Taylor <iant@google.com>
13325
13326 * c.opt (-fplan9-extensions): New option.
13327
82a1c2fe
FXC
133282010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13329
13330 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13331 Remove.
13332 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13333 of duplicating code.
13334
92902b1b
IS
133352010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13336
13337 * c-common.c: Add two new entries for @optional
13338 and @required keywords.
13339
13340 merge from FSF 'apple/trunk' branch.
3f8257db 13341 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13342
13343 Radar 4386773
13344 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13345 objective-c keywords.
13346 (objc_set_method_opt): New declaration.
13347 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13348
46625112
JM
133492010-09-30 Joseph Myers <joseph@codesourcery.com>
13350
13351 * c-common.c (handle_optimize_attribute): Pass &global_options to
13352 cl_optimization_save and cl_optimization_restore.
13353 * c-opts.c (c_common_handle_option): Pass &global_options to
13354 handle_generated_option.
13355 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13356 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13357 &global_options to cl_optimization_restore.
13358
49b91f05
NP
133592010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13360
13361 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13362 Objective-C/Objective-C++ keywords.
13363
13ed556f 133642010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13365
9faeb493
UB
13366 Merge from 'apple/trunk' branch on FSF servers.
13367
3f8257db 13368 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13369
13370 Radar 4281748
13371 * c-common.h (objc_check_global_decl): New declaration.
13372 * stub-objc.c (objc_check_global_decl): New stub.
13373
f0036cca
JM
133742010-09-29 Joseph Myers <joseph@codesourcery.com>
13375
13376 * c.opt: Don't use VarExists.
13377
e3339d0f
JM
133782010-09-29 Joseph Myers <joseph@codesourcery.com>
13379
13380 * c-common.c (c_cpp_error): Update names of diagnostic_context
13381 members.
13382 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13383 cl_optimization members.
13384 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13385 sanitize_cpp_opts, finish_options): Update names of cpp_options
13386 members.
13387
1973201f
NP
133882010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13389
13390 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13391 (objc_is_reserved_word): Removed.
13392 * c-common.c: Updated comments.
13393 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13394 objc_is_reserved_word.
13395 * stub-objc.c (objc_is_reserved_word): Removed.
13396
f7e71da5
IS
133972010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13398
9faeb493 13399 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13400 include attributes.
13401 (objc_start_method_definition): Likewise.
13402 (objc_build_keyword_decl): Likewise.
13403 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13404 (objc_start_method_definition): Likewise.
13405 (objc_build_keyword_decl): Likewise.
13406
c165dca7
IS
134072010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13408
13409 * c-common.h (objc_start_class_interface): Adjust prototype.
13410 (objc_start_category_interface): Likewise.
13411 (objc_start_protocol): Likewise.
13412 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13413 (objc_start_class_interface): Likewise.
13414 (objc_start_category_interface): Likewise.
13415
7458026b
ILT
134162010-09-27 Ian Lance Taylor <iant@google.com>
13417
13418 * c-common.c (c_common_attribute_table): Add no_split_stack.
13419 (handle_no_split_stack_attribute): New static function.
13420
b581b85b
NP
134212010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13422
9faeb493 13423 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13424
3f8257db 13425 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13426
9faeb493 13427 Radar 4229905
b581b85b
NP
13428 * c-common.h (objc_have_common_type): New declaration.
13429 * stub-objc.c (objc_have_common_type): New stub.
13430
13431 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13432
13433 Radar 4154928
13434 * c-common.h (objc_common_type): New prototype.
9faeb493 13435 * stub-objc.c (objc_common_type): New stub.
b581b85b 13436
46a4da10
JH
134372010-09-24 Jan Hubicka <jh@suse.cz>
13438
13439 * c-common.c (handle_leaf_attribute): New function.
13440 (struct attribute_spec c_common_att): Add leaf.
13441
e200444e
JM
134422010-09-22 Joseph Myers <joseph@codesourcery.com>
13443
13444 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13445 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13446 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13447 -include-barrier, -include-directory, -include-directory=,
13448 -include-directory-after, -include-directory-after=,
13449 -include-prefix, -include-prefix=, -include-with-prefix,
13450 -include-with-prefix=, -include-with-prefix-after,
13451 -include-with-prefix-after=, -include-with-prefix-before,
13452 -include-with-prefix-before=, -no-integrated-cpp,
13453 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13454 -output=, -pedantic, -pedantic-errors, -preprocess,
13455 -print-missing-file-dependencies, -trace-includes, -traditional,
13456 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13457 -user-dependencies, -verbose, -write-dependencies,
13458 -write-user-dependencies, no-integrated-cpp, traditional): New.
13459
29a80ea6
NP
134602010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13461
13462 PR objc/23710
ac1fc2fc
NP
13463 * c-common.h (objc_start_method_definition): Return bool instead
13464 of void.
13465 * stub-objc.c (objc_start_method_definition): Return bool instead
13466 of void.
13467
134682010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13469
13470 PR objc/25965
13471 * c-common.h (objc_get_interface_ivars): New declaration.
13472 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13473
de621752
ILT
134742010-09-15 Ian Lance Taylor <iant@google.com>
13475
13476 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13477 messages. Remove period at end of warning message.
de621752 13478
ba885ec5
NS
134792010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13480
13481 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13482 (handle_alias_attribute): ... here.
13483 (handle_ifunc_attribute): New.
13484
c5ee1358
MM
134852010-09-06 Mark Mitchell <mark@codesourcery.com>
13486
13487 * c-common.h (do_warn_double_promotion): Declare.
13488 * c-common.c (do_warn_double_promotion): Define.
13489
0a0b3574
MM
134902010-09-05 Mark Mitchell <mark@codesourcery.com>
13491
13492 * c.opt (Wdouble-promotion): New.
13493
d1779886
JM
134942010-09-02 Joseph Myers <joseph@codesourcery.com>
13495
13496 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13497 fvtable-thunks, fxref): Mark no longer supported in help text.
13498
2d2bd949
JM
134992010-09-02 Joseph Myers <joseph@codesourcery.com>
13500
13501 * c.opt (Wimport, fall-virtual, falt-external-templates,
13502 fdefault-inline, fenum-int-equiv, fexternal-templates,
13503 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13504 fname-mangling-version-, fnew-abi, fnonnull-objects,
13505 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13506 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13507 applicable.
13508 (fhandle-exceptions): Mark with Alias and Warn.
13509 * c-opts.c (c_common_handle_option): Don't handle options marked
13510 as ignored.
13511
5de8299c
JM
135122010-09-02 Joseph Myers <joseph@codesourcery.com>
13513
13514 * c.opt (Wcomments, Werror-implicit-function-declaration,
13515 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13516 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13517 aliases.
13518 * c-common.c (option_codes): Use OPT_Wcomment instead of
13519 OPT_Wcomments.
13520 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13521 Don't handle options marked as aliases.
13522
0ceb0201
RG
135232010-08-25 Richard Guenther <rguenther@suse.de>
13524
13525 * c-common.c (c_common_get_alias_set): Remove special
13526 handling for pointers.
13527
ac47786e
NF
135282010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13529
13530 * c-common.c: Use FOR_EACH_VEC_ELT.
13531 * c-gimplify.c: Likewise.
13532 * c-pragma.c: Likewise.
13533
c878765b
JM
135342010-08-16 Joseph Myers <joseph@codesourcery.com>
13535
13536 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13537 RejectDriver.
13538 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13539 RejectDriver.
13540 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13541 instead of OPT_MDX and OPT_MMDX.
13542
603349bf
JM
135432010-08-16 Joseph Myers <joseph@codesourcery.com>
13544
13545 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13546
644fa7ac
JM
135472010-08-12 Joseph Myers <joseph@codesourcery.com>
13548
13549 * c.opt (MD, MMD): Change to MDX and MMDX.
13550 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13551
481e1176
JM
135522010-08-11 Joseph Myers <joseph@codesourcery.com>
13553
13554 * c-opts.c (c_common_handle_option): Call handle_generated_option
13555 instead of handle_option.
13556
ac8dc9f7
NF
135572010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13558
13559 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13560 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13561
4f8c876d
NF
135622010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13563
13564 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13565 (pending_redefine_extname): Change type to a VEC.
13566 (add_to_renaming_pragma_list): Update for new type of
13567 pending_redefine_extname.
ac8dc9f7 13568 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13569
3b0c690e
AC
135702010-08-04 Arnaud Charlet <charlet@adacore.com>
13571
13572 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13573 visited.
13574 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13575 decide whether a type has already been declared/seen.
13576 Do not go to the original type.
13577 (dump_nested_types): New parameter forward.
13578 Generate forward declaration if needed and mark type as visited.
13579 (print_ada_declaration): Call dump_nested_types if not already done.
13580 Mark types as visited.
13581
1890bccc
JM
135822010-08-03 Joseph Myers <joseph@codesourcery.com>
13583
13584 * c.opt (-print-pch-checksum): Remove option.
13585 * c-opts.c (c_common_handle_option): Don't handle
13586 OPT_print_pch_checksum.
13587
5f20c657
JM
135882010-07-27 Joseph Myers <joseph@codesourcery.com>
13589
13590 * c-common.h (c_common_handle_option): Update prototype and return
13591 value type.
13592 * c-opts.c (c_common_handle_option): Update prototype and return
13593 value type. Update calls to handle_option and
13594 enable_warning_as_error.
13595
f551f80c
JJ
135962010-07-27 Jakub Jelinek <jakub@redhat.com>
13597
13598 PR c/45079
13599 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13600
61ff2bdc
JM
136012010-07-27 Joseph Myers <joseph@codesourcery.com>
13602
13603 * c-common.h (c_common_missing_argument): Remove.
13604 * c-opts.c (c_common_missing_argument): Remove.
13605 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13606 idirafter, imacros, include, isysroot, isystem, iquote): Add
13607 MissingArgError.
13608 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13609
7a9bf9a4
JM
136102010-07-27 Joseph Myers <joseph@codesourcery.com>
13611
13612 * c-common.h (c_common_option_lang_mask,
13613 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13614 New.
13615 (c_common_init_options): Update prototype.
13616 * c-opts.c (c_common_option_lang_mask): New.
13617 (c_common_initialize_diagnostics): Split out of
13618 c_common_init_options.
13619 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13620 New.
13621 (c_common_init_options): Update prototype. Use decoded options in
13622 search for -lang-asm.
13623
910ad8de
NF
136242010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13625
13626 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13627 * c-format.c: Likewise.
13628
718f9c0f
MLI
136292010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13630
13631 * c-common.h: Include diagnostic-core.h. Error if already
13632 included.
13633 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13634
4d451982
MLI
136352010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13636
adfac8df 13637 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13638 Do not include expr.h
13639 (vector_mode_valid_p): Move here.
13640
119fe915
SB
136412010-06-21 DJ Delorie <dj@redhat.com>
13642
13643 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13644 allow these pragmas anywhere.
13645
136462010-06-14 Jakub Jelinek <jakub@redhat.com>
13647
13648 PR bootstrap/44509
13649 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13650 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13651 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13652 ggc_strdup instead of xstrdup.
13653
136542010-06-10 Jakub Jelinek <jakub@redhat.com>
13655
13656 * c-cppbuiltin.c: Include cpp-id-data.h.
13657 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13658 (lazy_hex_fp_value): New function.
13659 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13660
6662d794
MLI
136612010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13662
13663 * c-gimplify.c: Do not include tree-flow.h
13664
38f8b050
JR
136652010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13666
13667 PR other/44034
13668 * c-common.c: Rename targetm member:
13669 targetm.enum_va_list -> targetm.enum_va_list_p
13670
9589f23e
AS
136712010-06-28 Anatoly Sokolov <aesok@post.ru>
13672
13673 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13674
3b06d379
SB
136752010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13676
13677 * c-cppbuiltin.c: Do not include except.h.
13678
d166d4c3
AK
136792010-06-24 Andi Kleen <ak@linux.intel.com>
13680
9faeb493
UB
13681 * c-common.c (warn_for_omitted_condop): New.
13682 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13683
70cb8be6
JM
136842010-06-21 Joseph Myers <joseph@codesourcery.com>
13685
13686 * c.opt (lang-objc): Remove.
13687 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13688
a4c97feb
JR
136892010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13690
13691 * c-opts.c: Include "tm_p.h".
13692
6e2f1956
JM
136932010-06-20 Joseph Myers <joseph@codesourcery.com>
13694
13695 * c-common.c (parse_optimize_options): Update call to
13696 decode_options.
13697
bc87224e
NF
136982010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13699
13700 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13701 new type of types_used_by_cur_var_decl.
13702
b49cf425
JR
137032010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13704
13705 PR bootstrap/44512
13706 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13707 for C++ standard compliance.
13708
59f9c2ed
JM
137092010-06-16 Jason Merrill <jason@redhat.com>
13710
13711 * c.opt: Add -Wnoexcept.
13712
33766b66
RG
137132010-06-16 Richard Guenther <rguenther@suse.de>
13714
13715 PR c/44555
13716 * c-common.c (c_common_truthvalue_conversion): Remove
13717 premature and wrong optimization concering ADDR_EXPRs.
13718
eff7e30c
AC
137192010-06-15 Arnaud Charlet <charlet@adacore.com>
13720
13721 * c-ada-spec.c (dump_sloc): Remove column info.
13722 (is_simple_enum): New function.
13723 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13724 enum types when relevant.
13725
6312e84d
MLI
137262010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13727
9faeb493 13728 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13729 location.
13730
1cb42611
JM
137312010-06-10 Joseph Myers <joseph@codesourcery.com>
13732
13733 * c-opts.c (c_common_handle_option): Don't handle
13734 OPT_fshow_column.
13735
a9429e29
LB
137362010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13737
13738 * c-pragma.c (push_alignment): Use typed GC allocation.
13739 (handle_pragma_push_options): Likewise.
13740
13741 * c-common.c (parse_optimize_options): Likewise.
13742
13743 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13744 option.
13745
5498f011
JM
137462010-06-07 Joseph Myers <joseph@codesourcery.com>
13747
13748 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13749 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13750 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13751 flag_signed_bitfields, warn_strict_null_sentinel,
13752 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13753 flag_gen_declaration, flag_no_gnu_keywords,
13754 flag_implement_inlines, flag_implicit_templates,
13755 flag_implicit_inline_templates, flag_optional_diags,
13756 flag_elide_constructors, flag_default_inline, flag_rtti,
13757 flag_conserve_space, flag_access_control, flag_check_new,
13758 flag_new_for_scope, flag_weak, flag_working_directory,
13759 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13760 flag_enforce_eh_specs, flag_threadsafe_statics,
13761 flag_pretty_templates): Remove.
13762 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13763 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13764 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13765 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13766 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13767 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13768 flag_no_gnu_keywords, flag_implement_inlines,
13769 flag_implicit_templates, flag_implicit_inline_templates,
13770 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13771 flag_rtti, flag_conserve_space, flag_access_control,
13772 flag_check_new, flag_new_for_scope, flag_weak,
13773 flag_working_directory, flag_use_cxa_atexit,
13774 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13775 flag_threadsafe_statics, flag_pretty_templates,
13776 warn_strict_null_sentinel): Remove.
13777 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13778 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13779 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13780 fimplicit-inline-templates, fimplicit-templates,
13781 flax-vector-conversions, fms-extensions, fnil-receivers,
13782 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13783 frtti, fshort-double, fshort-enums, fshort-wchar,
13784 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13785 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13786 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13787 gen-decls, undef): Use Var.
13788 (fdefault-inline, foptional-diags): Document as doing nothing.
13789 * c-opts.c (c_common_handle_option): Remove cases for options now
13790 using Var. Mark ignored options as such.
13791
39dabefd
SB
137922010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13793
9faeb493 13794 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13795 * c-common.def: Likewise.
13796 * c-common.h: Likewise.
13797 * c-cppbuiltin.c: Likewise.
13798 * c-dump.c: Likewise.
13799 * c-format.c: Likewise.
13800 * c-format.h : Likewise.
13801 * c-gimplify.c: Likewise.
13802 * c-lex.c: Likewise.
13803 * c-omp.c: Likewise.
13804 * c.opt: Likewise.
13805 * c-opts.c: Likewise.
13806 * c-pch.c: Likewise.
13807 * c-ppoutput.c: Likewise.
13808 * c-pragma.c: Likewise.
13809 * c-pragma.h: Likewise.
13810 * c-pretty-print.c: Likewise.
13811 * c-pretty-print.h: Likewise.
13812 * c-semantics.c: Likewise.
13813 * stub-objc.c: Likewise.
13814
13815 * c-common.c: Include gt-c-family-c-common.h.
13816 * c-pragma.c: Include gt-c-family-c-pragma.h.
13817\f
68127a8e 13818Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
13819
13820Copying and distribution of this file, with or without modification,
13821are permitted in any medium without royalty provided the copyright
13822notice and this notice are preserved.