]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
changelog: Fix extra space after tab.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
fb98ede8
GA
12022-11-19 Jakub Jelinek <jakub@redhat.com>
2
3 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
4 value from 202207L to 202211L.
5
62022-11-19 Jeff Chapman II <jchapman@lock3software.com>
7 Andrew Sutton <asutton@lock3software.com>
8 Andrew Marmaduke <amarmaduke@lock3software.com>
9 Michael Lopez <mlopez@lock3software.com>
10 Jason Merrill <jason@redhat.com>
11
12 * c.opt: Add contracts flags.
13 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
14 macros.
15
80909529
GA
162022-11-16 Marek Polacek <polacek@redhat.com>
17
18 PR c++/106649
19 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
20 C++23.
21 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
22 depending on cxx_dialect.
23 * c.opt (Winvalid-constexpr): New option.
24
252022-11-16 Jakub Jelinek <jakub@redhat.com>
26
27 * c-common.def (CONCEPT_DECL): New tree, moved here from
28 cp-tree.def.
29 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
30 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
31 attribute on CONCEPT_DECL.
32
cdc34229
GA
332022-11-15 Lewis Hyatt <lhyatt@gmail.com>
34
35 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
36 than a hard-coded string.
37
83d400bd
GA
382022-11-15 Jakub Jelinek <jakub@redhat.com>
39
40 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
41 __cpp_multidimensional_subscript macro value to 202211L.
42
432022-11-15 Patrick Palka <ppalka@redhat.com>
44
45 PR c++/107638
46 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
47 iff SUPPORTS_INIT_PRIORITY.
48
492022-11-14 Martin Liska <mliska@suse.cz>
50
51 Revert:
52 2022-11-09 Martin Liska <mliska@suse.cz>
53
54 * c-target.def: Port to RST.
55
30d77d49
GA
562022-11-12 Joseph Myers <joseph@codesourcery.com>
57
58 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
59
5b6ce16a
GA
602022-11-11 Jonathan Wakely <jwakely@redhat.com>
61
62 PR c/85487
63 * c-pragma.cc (handle_pragma_ignore): New function.
64 (init_pragma): Register region and endregion pragmas.
65
1cdfd0e5
GA
662022-11-09 Martin Liska <mliska@suse.cz>
67
68 * c-target.def: Port to RST.
69
05788e9b
GA
702022-11-05 Lewis Hyatt <lhyatt@gmail.com>
71
72 PR preprocessor/55971
73 * c-ppoutput.cc (adjust_for_newlines): Update comment.
74
d29260ce
GA
752022-11-03 Jason Merrill <jason@redhat.com>
76
77 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
78 -fconcepts-ts before C++20.
79
3055829a
GA
802022-10-28 Joseph Myers <joseph@codesourcery.com>
81
82 * c-common.cc (def_fn_type): Call build_function_type for
83 zero-argument variable-argument function.
84 (c_common_nodes_and_builtins): Build default_function_type with
85 build_function_type.
86 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
87 option.
88
892022-10-28 Joseph Myers <joseph@codesourcery.com>
90
91 PR c/61469
92 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
93 New. Moved from cp/cp-tree.h.
94 * c-warn.cc (warnings_for_convert_and_check): Do not consider
95 conversions to enum with underlying type bool to overflow.
96
486a5037
GA
972022-10-26 Marek Polacek <polacek@redhat.com>
98
99 PR c++/106393
100 * c.opt (Wdangling-reference): New.
101
87f9c4a4
GA
1022022-10-19 Joseph Myers <joseph@codesourcery.com>
103
104 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
105 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
106 and FMT_LEN_wf64.
107 (NOARGUMENTS, NOLENGTHS): Update definitions.
108 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
109 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
110 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
111 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
112 (T_UF64, T2X_UF64): New macros.
113 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
114 and wfN length modifiers.
115 (print_char_table, scan_char_table): Add entries using wN and wfN
116 length modifiers.
117
21de009f
GA
1182022-10-18 Joseph Myers <joseph@codesourcery.com>
119
120 PR c/36113
121 * c-common.cc (c_common_type_for_size): Add fallback to
122 widest_unsigned_literal_type_node or
123 widest_integer_literal_type_node for precision that may not
124 exactly match the precision of those types.
125
baeec7cc
GA
1262022-10-14 Jakub Jelinek <jakub@redhat.com>
127
128 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
129 predefine __BFLT16_*__ macros and for C++23 also
130 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
131 macros for -fbuilding-libgcc.
132 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
133
1342022-10-14 Jakub Jelinek <jakub@redhat.com>
135
136 PR middle-end/323
137 PR c++/107097
138 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
139 the tree being specific to C/ObjC.
140 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
141 in C++ the same as in C.
142 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
143 even for C++.
144
621a911d
GA
1452022-10-13 Joseph Myers <joseph@codesourcery.com>
146
147 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
148 value 2 for *_IS_IEC_60559.
149
781f477a
GA
1502022-10-12 Lewis Hyatt <lhyatt@gmail.com>
151
152 PR preprocessor/60014
153 PR preprocessor/60723
154 * c-ppoutput.cc (class token_streamer): Remove member
155 line_marker_emitted to...
156 (token_streamer::stream): ...a local variable here. Set
157 print.prev_was_system_token on all code paths.
158
27bfe54e
GA
1592022-10-10 Nathan Sidwell <nathan@acm.org>
160
161 * c-opts.cc (c_common_post_options): Bump abi to 18.
162
1632022-10-10 Marek Polacek <polacek@redhat.com>
164
165 PR c++/106937
166 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
167 attributes here.
168 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
169 attributes here.
170 (pp_c_attributes): Remove.
171 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
172 get_attribute_name. Don't print a trailing space when printing the
173 [[]] form.
174 * c-pretty-print.h (pp_c_attributes): Remove.
175
9ff6c33e
GA
1762022-10-07 Qing Zhao <qing.zhao@oracle.com>
177
178 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
179 (c_common_attribute_table): New item for strict_flex_array.
180 * c.opt: (fstrict-flex-arrays): New option.
181 (fstrict-flex-arrays=): New option.
182
1832022-10-07 Martin Liska <mliska@suse.cz>
184
185 * name-hint.h: Use std::move.
186
1872022-10-07 Jakub Jelinek <jakub@redhat.com>
188
189 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
190 only in gnu namespace or as standard attribute, treat fallthrough
191 attributes in other namespaces like any other unknown attribute.
192
629d04d3
GA
1932022-10-06 Joseph Myers <joseph@codesourcery.com>
194
195 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
196 typeof_unqual.
197 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
198 (D_EXT11): New macro. Values of subsequent macros updated.
199
2002022-10-06 Jakub Jelinek <jakub@redhat.com>
201
202 PR c++/106654
203 * c-attribs.cc (handle_assume_attribute): New function.
204 (c_common_attribute_table): Add entry for assume attribute.
205 * c-lex.cc (c_common_has_attribute): Handle
206 __have_cpp_attribute (assume).
207
85872a69
GA
2082022-10-04 Jakub Jelinek <jakub@redhat.com>
209
210 * c-omp.cc (c_omp_directives): Uncomment begin declare target
211 entry.
212
69fd6dcc
GA
2132022-10-03 Patrick Palka <ppalka@redhat.com>
214
215 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
216 RID_IS_SAME_AS.
217
2182022-10-03 Joseph Myers <joseph@codesourcery.com>
219
220 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
221 special-case __*_EPSILON__ setting for IBM long double for C2x.
222
3a221b73
GA
2232022-09-30 Patrick Palka <ppalka@redhat.com>
224
225 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
226 C++ traits.
227 * c-common.h (enum rid): Likewise.
228
bbdcdf5c
GA
2292022-09-29 Joseph Myers <joseph@codesourcery.com>
230
231 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
232 C.
233
2342022-09-29 Patrick Palka <ppalka@redhat.com>
235
236 * c-common.cc (c_common_reswords): Add __remove_cv,
237 __remove_reference and __remove_cvref.
238 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
239 and RID_REMOVE_CVREF.
240
1f16a020
GA
2412022-09-27 Marek Polacek <polacek@redhat.com>
242
243 PR c++/101165
244 PR c++/106882
245 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
246
2472022-09-27 Marek Polacek <polacek@redhat.com>
248
249 * c-format.cc (c_keywords): Drop nothrow.
250
2512022-09-27 Jakub Jelinek <jakub@redhat.com>
252
253 PR c++/106651
254 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
255 __cpp_static_call_operator=202207L for C++23.
256
2572022-09-27 Jakub Jelinek <jakub@redhat.com>
258
259 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
260 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
261 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
262 * c-pragma.cc (omp_pragmas): Add assumes and begin.
263 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
264 (omp_pragmas_simd): Add assume.
265 * c-common.h (c_omp_directives): Declare.
266 * c-omp.cc (omp_directives): Rename to ...
267 (c_omp_directives): ... this. No longer static. Uncomment
268 assume, assumes, begin assumes and end assumes entries.
269 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
270 to PRAGMA_OMP_END.
271 (c_omp_categorize_directive): Adjust for omp_directives to
272 c_omp_directives renaming.
273
2742022-09-27 Jakub Jelinek <jakub@redhat.com>
275
276 PR c++/106652
277 PR c++/85518
278 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
279 _Float{32,64,128}x flags from D_CONLY to 0.
280 (shorten_binary_op): Punt if common_type returns error_mark_node.
281 (shorten_compare): Likewise.
282 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
283 and _Float{32,64,128}x builtin types if available. For C++
284 clear float128t_type_node.
285 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
286 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
287 * c-lex.cc (interpret_float): For q/Q suffixes prefer
288 float128t_type_node over float128_type_node. Allow
289 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
290 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
291 with pedwarn. Don't call excess_precision_type for C++.
292
220c4d8e
GA
2932022-09-26 Marek Polacek <polacek@redhat.com>
294
295 PR c++/106656
296 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
297 for C++20.
298
4afaeaab
GA
2992022-09-23 Marek Polacek <polacek@redhat.com>
300
301 PR c++/106784
302 * c-common.cc (c_common_reswords): Add __is_convertible and
303 __is_nothrow_convertible.
304 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
305 RID_IS_NOTHROW_CONVERTIBLE.
306
279c6715
GA
3072022-09-22 David Malcolm <dmalcolm@redhat.com>
308
309 PR c/106830
310 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
311 values that don't fit in uhwi.
312
d0fc05e8
GA
3132022-09-15 Richard Biener <rguenther@suse.de>
314
315 * c-common.h (build_void_list_node): Remove.
316 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
317 void_list_node.
318
861d1a11
GA
3192022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
320
321 * c-format.cc (convert_format_name_to_system_name): Fix warning.
322
fe2a8ce9
GA
3232022-09-07 Joseph Myers <joseph@codesourcery.com>
324
325 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
326 for alignas, alignof, bool, false, static_assert, thread_local and
327 true.
328
3292022-09-07 Jakub Jelinek <jakub@redhat.com>
330
331 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
332 " in comments" from description.
333 (Wunicode): New option.
334
25aeb922
GA
3352022-09-06 Jakub Jelinek <jakub@redhat.com>
336
337 PR c/106836
338 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
339
83f2f228
GA
3402022-09-03 Jakub Jelinek <jakub@redhat.com>
341
342 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
343 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
344 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
345 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
346
c64b0947
GA
3472022-09-02 David Malcolm <dmalcolm@redhat.com>
348
349 PR c/90885
350 * c-common.h (check_for_xor_used_as_pow): New decl.
351 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
352 * c-warn.cc (check_for_xor_used_as_pow): New.
353 * c.opt (Wxor-used-as-pow): New.
354
bb0a1556
GA
3552022-09-01 Jason Merrill <jason@redhat.com>
356
357 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
358 char8_t.
359 (braced_list_to_string): Check for char-sized elements.
360
3612022-09-01 Jakub Jelinek <jakub@redhat.com>
362
363 PR c++/106655
364 * c.opt (-Winvalid-utf8): New warning.
365 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
366 Set cpp_opts->cpp_input_charset_explicit.
367 (c_common_post_options): If -finput-charset=UTF-8 is explicit
368 in C++23, enable -Winvalid-utf8 by default and if -pedantic
369 or -pedantic-errors, make it a pedwarn.
370
542c60c4
GA
3712022-08-31 Joseph Myers <joseph@codesourcery.com>
372
373 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
374 for LABEL_DECL.
375 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
376 decl_attributes.
377 * c-common.h (do_case, c_add_case_label): Update declarations.
378 * c-lex.cc (c_common_has_attribute): For C, produce a result of
379 201910 for fallthrough and 202106 for maybe_unused.
380
16f542d6
GA
3812022-08-26 Marek Polacek <polacek@redhat.com>
382
383 PR c++/81159
384 * c.opt (Wself-move): New option.
385
3862022-08-26 Jakub Jelinek <jakub@redhat.com>
387
388 * c-common.cc (check_builtin_function_arguments): Handle
389 BUILT_IN_ISSIGNALING.
390
3912022-08-26 Jakub Jelinek <jakub@redhat.com>
392
393 PR c++/106648
394 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
395 __cpp_named_character_escapes to 202207L.
396
5d4389dc
GA
3972022-08-25 Marek Polacek <polacek@redhat.com>
398
399 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
400 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
401 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
402 (struct c_common_resword): Resize the disable member.
403 (D_C2X): Add.
404 (nullptr_node): Define.
405 (nullptr_type_node): Define.
406 (NULLPTR_TYPE_P): Define.
407 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
408 NULLPTR_TYPE.
409 (c_pretty_printer::direct_abstract_declarator): Likewise.
410 (c_pretty_printer::constant): Likewise.
411
47a61e65
GA
4122022-08-16 Tom Honermann <tom@honermann.net>
413
414 PR c++/106423
415 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
416 diagnostics in C++20 and later.
417 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
418
5cd525f0
GA
4192022-08-11 Marek Polacek <polacek@redhat.com>
420
421 PR middle-end/102633
422 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
423 suppress_warning here.
424
5f17badb
GA
4252022-08-08 Tom Honermann <tom@honermann.net>
426
427 PR preprocessor/106426
428 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
429 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
430
4312022-08-08 Tom Honermann <tom@honermann.net>
432
433 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
434 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
435 enabled.
436 * c-opts.cc (c_common_post_options): Set flag_char8_t if
437 targeting C2x.
438
4a7274dd
GA
4392022-07-31 Lewis Hyatt <lhyatt@gmail.com>
440
441 PR c++/66290
442 * c-common.h: Rename global done_lexing to
443 override_libcpp_locations.
444 * c-common.cc (c_cpp_diagnostic): Likewise.
445 * c-opts.cc (c_common_finish): Set override_libcpp_locations
446 (formerly done_lexing) immediately prior to calling cpp_finish ().
447
1e2c5f4c
GA
4482022-07-27 Lewis Hyatt <lhyatt@gmail.com>
449
450 * c-ppoutput.cc (token_streamer::stream): Update input_location
451 prior to streaming each token.
452
0e6fa997
GA
4532022-07-23 Immad Mir <mirimmad@outlook.com>
454
455 * c-attribs.cc: (c_common_attribute_table): add three new attributes
456 namely: fd_arg, fd_arg_read and fd_arg_write.
457 (handle_fd_arg_attribute): New.
458
bdc7b765
GA
4592022-07-15 Marek Polacek <polacek@redhat.com>
460
461 PR c++/104477
462 * c-common.cc (c_common_reswords): Add
463 __reference_constructs_from_temporary and
464 __reference_converts_from_temporary.
465 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
466 RID_REF_CONVERTS_FROM_TEMPORARY.
467
4682022-07-15 Jonathan Wakely <jwakely@redhat.com>
469
470 * c-format.cc (class range_label_for_format_type_mismatch):
471 Adjust to new label_text API.
472
c72d4714
GA
4732022-07-11 Lewis Hyatt <lhyatt@gmail.com>
474
475 PR preprocessor/106252
476 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
477 option argument prior to verifying the option was found.
478
6345c414
GA
4792022-07-07 David Malcolm <dmalcolm@redhat.com>
480
481 * c-format.cc (range_label_for_format_type_mismatch::get_text):
482 Update for removal of label_text::maybe_free in favor of automatic
483 memory management.
484
4bc92c3b
GA
4852022-07-06 Lewis Hyatt <lhyatt@gmail.com>
486
487 PR preprocessor/53920
488 PR c++/53431
489 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
490 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
491 (c_pp_stream_token): Declare.
492 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
493 pragmas to...
494 (should_output_pragmas): ...here. New function.
495 (token_streamer::stream): Support handling early pragmas.
496 (do_line_change): Likewise.
497 (c_pp_stream_token): New function.
498 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
499 (pragma_diagnostic_lex_normal): New function. Moved logic for
500 interpreting GCC diagnostic pragmas here.
501 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
502 directly from libcpp.
503 (handle_pragma_diagnostic): Refactor into helper function...
504 (handle_pragma_diagnostic_impl): ...here. New function.
505 (handle_pragma_diagnostic_early): New function.
506 (handle_pragma_diagnostic_early_pp): New function.
507 (struct pragma_ns_name): Renamed to...
508 (struct pragma_pp_data): ...this. Add new "early_handler" member.
509 (c_register_pragma_1): Support early pragmas in the preprocessor.
510 (c_register_pragma_with_early_handler): New function.
511 (c_register_pragma): Support the new early handlers in struct
512 internal_pragma_handler.
513 (c_register_pragma_with_data): Likewise.
514 (c_register_pragma_with_expansion): Likewise.
515 (c_register_pragma_with_expansion_and_data): Likewise.
516 (c_invoke_early_pragma_handler): New function.
517 (c_pp_invoke_early_pragma_handler): New function.
518 (init_pragma): Add early pragma support for diagnostic pragmas.
519 * c-pragma.h (struct internal_pragma_handler): Add new early handler
520 members.
521 (c_register_pragma_with_early_handler): Declare.
522 (c_invoke_early_pragma_handler): Declare.
523 (c_pp_invoke_early_pragma_handler): Declare.
524
d1f3a3ff
GA
5252022-07-05 Marek Polacek <polacek@redhat.com>
526
527 PR c++/105626
528 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
529 u8 strings.
530
ed974488
GA
5312022-07-01 Marek Polacek <polacek@redhat.com>
532
533 PR c++/106111
534 * c-common.h (enum rid): Update RID_LAST_CXX20.
535
976196b3
GA
5362022-06-30 Jonathan Wakely <jwakely@redhat.com>
537
538 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
539 names.
540
84c2131d
GA
5412022-06-24 Jason Merrill <jason@redhat.com>
542
543 PR c++/87729
544 PR c++/20423
545 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
546
4390e7bf
GA
5472022-06-18 Jakub Jelinek <jakub@redhat.com>
548
549 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
550 Use flag_sanitize_trap & SANITIZE_??? instead of
551 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
552 and flag_sanitize_trap differs for them, emit __builtin_trap only
553 for the comparison where trap is requested.
554 (ubsan_instrument_vla, ubsan_instrument_return): Use
555 lag_sanitize_trap & SANITIZE_??? instead of
556 flag_sanitize_undefined_trap_on_error.
557
c3642271
GA
5582022-06-13 Jason Merrill <jason@redhat.com>
559
560 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
561
d9176e64
GA
5622022-05-27 Marek Polacek <polacek@redhat.com>
563
564 PR c/90658
565 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
566
5672022-05-27 Jakub Jelinek <jakub@redhat.com>
568
569 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
570
57f2ce6a
GA
5712022-05-20 David Malcolm <dmalcolm@redhat.com>
572
573 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
574 and "override".
575 * c-pretty-print.h: Likewise.
576
1cda629f
GA
5772022-05-18 Marek Polacek <polacek@redhat.com>
578
579 PR c/105131
580 * c.opt (Wenum-int-mismatch): New.
581
5822022-05-18 Marek Polacek <polacek@redhat.com>
583
584 PR c++/105497
585 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
586 enumerator when it was marked with attribute unused.
587
5882022-05-18 Eric Botcazou <ebotcazou@adacore.com>
589
590 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
591 floating-point complex types.
592 <POINTER_TYPE>: Do not use limited_with clause if the designated
593 type is a scalar type.
594
3d9439b1
GA
5952022-05-17 Jakub Jelinek <jakub@redhat.com>
596
597 * c-omp.cc (c_finish_omp_depobj): Handle
598 OMP_CLAUSE_DEPEND_INOUTSET.
599
702bd11f
GA
6002022-05-16 Jason Merrill <jason@redhat.com>
601
602 PR c/105492
603 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
604 here.
605
6062022-05-16 Martin Liska <mliska@suse.cz>
607
608 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
609 (c_common_nodes_and_builtins): Likewise.
610 * c-format.cc (check_tokens): Likewise.
611 (check_plain): Likewise.
612 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
613 (init_pragma): Likewise.
614 * known-headers.cc (get_string_macro_hint): Likewise.
615 (get_stdlib_header_for_name): Likewise.
616 * c-attribs.cc: Likewise.
617
9df4ffe4
GA
6182022-05-13 Richard Biener <rguenther@suse.de>
619
620 * c-omp.cc: Remove gimple-fold.h include.
621
49ace834
GA
6222022-05-12 Jakub Jelinek <jakub@redhat.com>
623
624 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
625 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
626 if null_pointer_node.
627
d0d513b5
GA
6282022-05-11 Martin Liska <mliska@suse.cz>
629
630 PR target/105355
631 * c-opts.cc (c_common_handle_option): Change option name.
632 * c.opt: Remove Joined and use Separate option.
633
bd022ff9
GA
6342022-05-09 Alex Coplan <alex.coplan@arm.com>
635
636 * c-common.h (get_dump_info): Delete.
637 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
638 from the global dump_manager instead of the (now obsolete)
639 get_dump_info.
640 * c-opts.cc (original_dump_file): Delete.
641 (original_dump_flags): Delete.
642 (c_common_parse_file): Switch to using global dump_manager to
643 manage the original dump file; fix leak of dump file.
644 (get_dump_info): Delete.
645
a1947c92
GA
6462022-05-07 Marek Polacek <polacek@redhat.com>
647
648 PR c++/101833
649 PR c++/47634
650 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
651 with FN being either a function declaration or function type. Use
652 maybe_adjust_arg_pos_for_attribute.
653 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
654 check_function_format.
655 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
656 (positional_argument): Adjust.
657 * c-format.cc (get_constant): Rename to ...
658 (validate_constant): ... this. Take EXPR by reference. Return bool
659 instead of tree.
660 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
661 return value of validate_constant.
662 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
663 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
664 (check_function_format): Adjust a parameter name.
665 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
666
3e7db517
GA
6672022-05-04 Marek Polacek <polacek@redhat.com>
668
669 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
670 char to int.
671
95874f95
GA
6722022-04-30 Jason Merrill <jason@redhat.com>
673
674 PR c/100545
675 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
676 and typedef.
677 * c-common.cc (set_underlying_type): Add assert.
678
01ad093b
GA
6792022-04-26 Patrick Palka <ppalka@redhat.com>
680
681 PR c++/105304
682 * c-common.cc (verify_tree) [restart]: Move up to before the
683 NULL test.
684
da066c42
GA
6852022-04-11 Jakub Jelinek <jakub@redhat.com>
686
687 PR c++/105186
688 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
689 and __int%d__ builtin types, initialize corresponding ridpointers
690 entry.
691
150ab50f
GA
6922022-03-30 Marek Polacek <polacek@redhat.com>
693
694 PR c++/101030
695 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
696 conversion_warning when OP1 is null.
697
6982022-03-30 Thomas Schwinge <thomas@codesourcery.com>
699
700 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
701 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
702 option properties.
703
7042022-03-30 Thomas Schwinge <thomas@codesourcery.com>
705
706 * c.opt (Wuse-after-free): Remove.
707
7082022-03-30 Thomas Schwinge <thomas@codesourcery.com>
709
710 * c.opt (Warray-bounds): Remove.
711
d2906412
GA
7122022-03-26 Thomas Schwinge <thomas@codesourcery.com>
713
714 * c.opt: Properly quote comment.
715
31e989a2
GA
7162022-03-25 Eric Botcazou <ebotcazou@adacore.com>
717
718 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
719 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
720 the referenced type instead. Deal with the anonymous original type
721 of a typedef'ed type. In the actual access case, follow the chain
722 of external subtypes.
723 <TYPE_DECL>: Tidy up control flow.
724
d156bb87
GA
7252022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
726
727 * c-ada-spec.cc: Change array length
728
d7f00da1
GA
7292022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
730
731 * c-common.cc (c_family_tests): Call the new tests.
732 * c-common.h (c_diagnostic_tests): Declare.
733 (c_opt_problem_cc_tests): Likewise.
734
7352022-03-19 Jakub Jelinek <jakub@redhat.com>
736
737 PR c++/101515
738 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
739 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
740 be printed.
741
9fc8f278
GA
7422022-03-16 Christophe Lyon <christophe.lyon@arm.com>
743 Roger Sayle <roger@nextmovesoftware.com>
744
745 PR c/98198
746 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
747
7482022-03-16 Patrick Palka <ppalka@redhat.com>
749
750 PR c++/96780
751 * c.opt: Add -ffold-simple-inlines.
752
b9756c08
GA
7532022-03-13 Tobias Burnus <tobias@codesourcery.com>
754
755 * c-target.def (check_string_object_format_arg): Fix description typo.
756
57eeedda
GA
7572022-03-12 Thomas Schwinge <thomas@codesourcery.com>
758
759 PR other/65095
760 * c-common.h (c_omp_map_clause_name): Remove.
761 * c-omp.cc (c_omp_map_clause_name): Remove.
762
8cc4f9cd
GA
7632022-03-09 Jakub Jelinek <jakub@redhat.com>
764
765 PR c/104711
766 * c-opts.cc (c_common_post_options): Don't enable
767 -Wshift-negative-value from -Wextra for C++20 or later.
768 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
769 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
770 instead of TYPE_UNSIGNED.
771
e6533e2e
GA
7722022-03-07 Jakub Jelinek <jakub@redhat.com>
773
774 * c-attribs.cc: Fix up duplicated word issue in a comment.
775
12d4552e
GA
7762022-03-01 Martin Liska <mliska@suse.cz>
777
778 PR ipa/104533
779 * c-attribs.cc (handle_target_clones_attribute): Use
780 get_target_clone_attr_len and report warning soon.
781
0bdb0498
GA
7822022-02-17 Jonathan Wakely <jwakely@redhat.com>
783
784 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
785 (handle_pragma_weak): Likewise.
786 (handle_pragma_scalar_storage_order): Likewise.
787 (handle_pragma_redefine_extname): Likewise.
788 (handle_pragma_visibility): Likewise.
789 (handle_pragma_diagnostic): Likewise.
790 (handle_pragma_target): Likewise.
791 (handle_pragma_optimize): Likewise.
792 (handle_pragma_push_options): Likewise.
793 (handle_pragma_pop_options): Likewise.
794 (handle_pragma_reset_options): Likewise.
795 (handle_pragma_message): Likewise.
796 (handle_pragma_float_const_decimal64): Likewise.
797
cb3afcd2
GA
7982022-02-16 Jakub Jelinek <jakub@redhat.com>
799
800 PR c/104531
801 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
802 build_binary_op with LT_EXPR and only if that doesn't return
803 error_mark_node call build_modify_expr.
804
8052022-02-16 Jakub Jelinek <jakub@redhat.com>
806
807 PR c/104510
808 * c-common.cc (shorten_compare): Convert original arguments to
809 the original *restype_ptr when mixing binary and decimal float.
810
1f8a09d2
GA
8112022-02-14 Richard Biener <rguenther@suse.de>
812
813 PR c/104505
814 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
815 internal function calls.
816
e8d68f0a
GA
8172022-02-11 Richard Biener <rguenther@suse.de>
818
819 * c-attribs.cc (c_common_attribute_table): Add entry for
820 vector_mask.
821 (handle_vector_mask_attribute): New.
822
a645583d
GA
8232022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
824
825 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
826 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
827 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
828
3adf509f
GA
8292022-02-09 Jason Merrill <jason@redhat.com>
830
831 * c-cppbuiltin.cc (c_cpp_builtins): Update values
832 of __cpp_constexpr and __cpp_concepts for C++20.
833
bb99171b
GA
8342022-01-24 Marek Polacek <polacek@redhat.com>
835
836 PR preprocessor/104030
837 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
838
9dd44357
GA
8392022-01-21 Jakub Jelinek <jakub@redhat.com>
840
841 PR c++/104148
842 * c-common.h (check_function_arguments_recurse): Add for_format
843 arg.
844 * c-common.cc (check_function_nonnull): Pass false to
845 check_function_arguments_recurse's last argument.
846 (check_function_arguments_recurse): Add for_format argument,
847 if true, don't stop on warning_suppressed_p.
848 * c-format.cc (check_format_info): Pass true to
849 check_function_arguments_recurse's last argument.
850
fe1ad141
GA
8512022-01-19 David Malcolm <dmalcolm@redhat.com>
852
853 * c-common.cc (c_common_c_tests): Rename to...
854 (c_common_cc_tests): ...this.
855 (c_family_tests): Update calls for .c to .cc renaming.
856 * c-common.h (c_format_c_tests): Rename to...
857 (c_format_cc_tests): ...this.
858 (c_indentation_c_tests): Rename to...
859 (c_indentation_cc_tests): ...this.
860 (c_pretty_print_c_tests): Rename to...
861 (c_pretty_print_cc_tests): ...this.
862 * c-format.cc (c_format_c_tests): Rename to...
863 (c_format_cc_tests): ...this.
864 * c-indentation.cc (c_indentation_c_tests): Rename to...
865 (c_indentation_cc_tests): ...this.
866 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
867 (c_pretty_print_cc_tests): ...this.
868
fc829782
GA
8692022-01-17 Martin Liska <mliska@suse.cz>
870
871 * c-ada-spec.cc: Rename .c names to .cc.
872 * c-ada-spec.h: Likewise.
873 * c-common.cc (c_build_vec_convert): Likewise.
874 (warning_candidate_p): Likewise.
875 * c-common.h (enum rid): Likewise.
876 (build_real_imag_expr): Likewise.
877 (finish_label_address_expr): Likewise.
878 (c_get_substring_location): Likewise.
879 (c_build_bind_expr): Likewise.
880 (conflict_marker_get_final_tok_kind): Likewise.
881 (c_parse_error): Likewise.
882 (check_missing_format_attribute): Likewise.
883 (invalid_array_size_error): Likewise.
884 (warn_for_multistatement_macros): Likewise.
885 (build_attr_access_from_parms): Likewise.
886 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
887 * c-format.cc: Likewise.
888 * c-gimplify.cc (c_gimplify_expr): Likewise.
889 * c-indentation.h: Likewise.
890 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
891 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
892 * c-opts.cc (c_common_post_options): Likewise.
893 (set_std_cxx23): Likewise.
894 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
895 * c-pretty-print.h: Likewise.
896
8972022-01-17 Martin Liska <mliska@suse.cz>
898
899 * c-ada-spec.c: Moved to...
900 * c-ada-spec.cc: ...here.
901 * c-attribs.c: Moved to...
902 * c-attribs.cc: ...here.
903 * c-common.c: Moved to...
904 * c-common.cc: ...here.
905 * c-cppbuiltin.c: Moved to...
906 * c-cppbuiltin.cc: ...here.
907 * c-dump.c: Moved to...
908 * c-dump.cc: ...here.
909 * c-format.c: Moved to...
910 * c-format.cc: ...here.
911 * c-gimplify.c: Moved to...
912 * c-gimplify.cc: ...here.
913 * c-indentation.c: Moved to...
914 * c-indentation.cc: ...here.
915 * c-lex.c: Moved to...
916 * c-lex.cc: ...here.
917 * c-omp.c: Moved to...
918 * c-omp.cc: ...here.
919 * c-opts.c: Moved to...
920 * c-opts.cc: ...here.
921 * c-pch.c: Moved to...
922 * c-pch.cc: ...here.
923 * c-ppoutput.c: Moved to...
924 * c-ppoutput.cc: ...here.
925 * c-pragma.c: Moved to...
926 * c-pragma.cc: ...here.
927 * c-pretty-print.c: Moved to...
928 * c-pretty-print.cc: ...here.
929 * c-semantics.c: Moved to...
930 * c-semantics.cc: ...here.
931 * c-ubsan.c: Moved to...
932 * c-ubsan.cc: ...here.
933 * c-warn.c: Moved to...
934 * c-warn.cc: ...here.
935 * cppspec.c: Moved to...
936 * cppspec.cc: ...here.
937 * stub-objc.c: Moved to...
938 * stub-objc.cc: ...here.
939
9248ee41
GA
9402022-01-15 Martin Sebor <msebor@redhat.com>
941
942 PR c/63272
943 * c.opt (-Wdangling-pointer): New option.
944
9452022-01-15 Martin Sebor <msebor@redhat.com>
946
947 PR tree-optimization/80532
948 * c.opt (-Wuse-after-free): New options.
949
617db51d
GA
9502022-01-14 David Malcolm <dmalcolm@redhat.com>
951
952 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
953 (handle_tainted_args_attribute): New.
954
ad3f0d08
GA
9552022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
956 Jason Merrill <jason@redhat.com>
957
958 PR c++/70417
959 * c.opt: Added -Wmissing-template-keyword.
960
9612022-01-13 Richard Biener <rguenther@suse.de>
962
963 PR c/104002
964 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
965
02a8a01b
GA
9662022-01-12 Martin Liska <mliska@suse.cz>
967
968 PR target/103804
969 * c-attribs.c (handle_optimize_attribute): Do not call
970 cl_optimization_compare if we seen an error.
971
01a254e3
GA
9722022-01-11 Jakub Jelinek <jakub@redhat.com>
973
974 PR c/101537
975 PR c/103881
976 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
977 and BIT_XOR_EXPR.
978
d9450aa0
GA
9792022-01-10 Richard Biener <rguenther@suse.de>
980
981 PR middle-end/101530
982 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
983 in a TARGET_EXPR to force a temporary.
984
11ce8d04
GA
9852022-01-06 Marek Polacek <polacek@redhat.com>
986
987 PR c++/103758
988 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
989 diagnostic messages.
990 (handle_pragma_diagnostic): Likewise.
991
a4ae8c37
GA
9922022-01-03 Marek Polacek <polacek@redhat.com>
993
994 PR c++/103758
995 * c-format.c (check_tokens): Accept "decl-specifier*".
996
9972022-01-03 Jakub Jelinek <jakub@redhat.com>
998
999 PR c++/103600
1000 * c-attribs.c (handle_non_overlapping_attribute): New function.
1001 (c_common_attribute_table): Add "non overlapping" attribute.
1002
84790a9d
GA
10032021-12-30 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR c++/103012
1006 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1007 cpp_define_unused/cpp_undef calls with forced token locations
1008 BUILTINS_LOCATION.
1009
d1e111da
GA
10102021-12-27 Patrick Palka <ppalka@redhat.com>
1011
1012 PR c++/103700
1013 * c-common.c (pointer_int_sum): When quiet, return
1014 error_mark_node for an incomplete pointed-to type and don't
1015 call size_in_bytes_loc.
1016
2554e2da
GA
10172021-12-17 Jason Merrill <jason@redhat.com>
1018
1019 PR c++/103681
1020 * c-opts.c (c_common_post_options): Update defaults.
1021
774269aa
GA
10222021-12-16 Martin Liska <mliska@suse.cz>
1023
1024 PR target/103709
1025 * c-pragma.c (handle_pragma_pop_options): Do not check
1026 global options modification when an error is seen in parsing
1027 of options (pragmas or attributes).
1028
c8dcf64b
GA
10292021-12-12 Jonathan Wakely <jwakely@redhat.com>
1030
1031 * known-headers.cc: Define INCLUDE_MEMORY instead of
1032 INCLUDE_UNIQUE_PTR.
1033 * name-hint.h: Likewise.
1034 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1035
4b4839e3
GA
10362021-12-09 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR pch/71934
1039 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1040 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1041
03a9bd05
GA
10422021-12-03 Jakub Jelinek <jakub@redhat.com>
1043
1044 PR pch/71934
1045 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1046 (pch_init): Don't initialize v.pch_init.
1047 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1048
40fa651e
GA
10492021-12-01 Jason Merrill <jason@redhat.com>
1050
1051 PR c++/103310
1052 * c.opt: Add -fconstexpr-fp-except.
1053
87cd82c8
GA
10542021-11-29 Richard Biener <rguenther@suse.de>
1055
1056 * c-format.c (check_format_string): Remove spurious
1057 gcc_unreachable.
1058
10592021-11-29 Richard Biener <rguenther@suse.de>
1060
1061 * c-opts.c (c_common_post_options): Remove unreachable return.
1062 * c-pragma.c (handle_pragma_target): Likewise.
1063 (handle_pragma_optimize): Likewise.
1064
091ccc06
GA
10652021-11-25 Jakub Jelinek <jakub@redhat.com>
1066
1067 PR c++/102611
1068 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1069 default for C++23 regardless of warn_deprecated.
1070 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1071 __cpp_multidimensional_subscript=202110L for C++23.
1072
e1d43592
GA
10732021-11-23 Martin Sebor <msebor@redhat.com>
1074
1075 PR middle-end/88232
1076 * c.opt: Add -Winfinite-recursion.
1077
9c077398
GA
10782021-11-19 Martin Sebor <msebor@redhat.com>
1079
1080 PR c++/33925
1081 PR c/102867
1082 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1083 and improve handling tof defined symbols.
1084
10852021-11-19 Martin Liska <mliska@suse.cz>
1086
1087 Revert:
1088 2021-11-18 Martin Liska <mliska@suse.cz>
1089
1090 * c-gimplify.c (genericize_c_loop): Use option directly.
1091
483092d3
GA
10922021-11-18 Matthias Kretz <m.kretz@gsi.de>
1093
1094 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1095 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1096
10972021-11-18 Martin Liska <mliska@suse.cz>
1098
1099 * c-gimplify.c (genericize_c_loop): Use option directly.
1100
280d2838
GA
11012021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1102
1103 PR c/91038
1104 PR c/29970
1105 * c-common.c (pointer_int_sum): Make sure pointer expressions
1106 are evaluated first when the size expression depends on for
1107 variably-modified types.
1108
11092021-11-17 Marek Polacek <polacek@redhat.com>
1110
1111 PR preprocessor/103026
1112 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1113
6b1695f4
GA
11142021-11-16 Jason Merrill <jason@redhat.com>
1115
1116 * c-common.c (release_tree_vector): Only cache vecs smaller than
1117 16 elements.
1118
e2b57363
GA
11192021-11-15 Jason Merrill <jason@redhat.com>
1120
1121 * c.opt: Add -fimplicit-constexpr.
1122 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1123 * c-opts.c (c_common_post_options): Disable below C++14.
1124
11252021-11-15 Jakub Jelinek <jakub@redhat.com>
1126
1127 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1128 Duplicate to both OMP_TARGET and OMP_TEAMS.
1129
8d36a0d2
GA
11302021-11-10 Marek Polacek <polacek@redhat.com>
1131
1132 PR c++/101940
1133 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1134 ignored_attributes.
1135
c9b1334e
GA
11362021-11-09 David Malcolm <dmalcolm@redhat.com>
1137
1138 * c-pragma.c (GCC_BAD_AT): New macro.
1139 (GCC_BAD2_AT): New macro.
1140 (handle_pragma_pack): Use the location of the pertinent token when
1141 issuing diagnostics about invalid constants/actions, and trailing
1142 junk.
1143 (handle_pragma_target): Likewise for non-string "GCC option".
1144 (handle_pragma_message): Likewise for trailing junk.
1145
18ae471f
GA
11462021-11-03 Joseph Myers <joseph@codesourcery.com>
1147
1148 PR c/103031
1149 * c-common.c (convert_and_check): Add argument init_const. Call
1150 convert_init if init_const.
1151 * c-common.h (convert_and_check): Update prototype.
1152 (convert_init): New prototype.
1153
cf82e8d9
GA
11542021-11-01 David Malcolm <dmalcolm@redhat.com>
1155
1156 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1157 CPP_OTHER tokens, set the "escape on output" flag.
1158
04a2cf3f
GA
11592021-10-27 Jakub Jelinek <jakub@redhat.com>
1160
1161 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1162 POINTER_PLUS_EXPR.
1163 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1164 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1165
11662021-10-27 Jakub Jelinek <jakub@redhat.com>
1167
1168 PR c++/102854
1169 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1170 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1171 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1172 conversions temporarily clear the 3rd bit from d->kind while walking
1173 subtrees.
1174 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1175 if possibly non-rectangular.
1176
ae5c5406
GA
11772021-10-21 Jakub Jelinek <jakub@redhat.com>
1178
1179 PR middle-end/64888
1180 * c-omp.c (c_omp_predefined_variable): Return true also for
1181 ubsan_create_data created artificial variables.
1182
5d5885c9
GA
11832021-10-14 Joseph Myers <joseph@codesourcery.com>
1184
1185 * c-format.c (printf_length_specs, scanf_length_specs)
1186 (print_char_table, scan_char_table): Support DFP formats for C2X.
1187 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1188 (T2X_D32, T2X_D64, T2X_D128): New macros.
1189
11902021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1191
1192 * c-omp.c (c_omp_check_context_selector): Rename to
1193 omp_check_context_selector and move to omp-general.c.
1194 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1195 move to omp-general.c.
1196
52055987
GA
11972021-10-12 Joseph Myers <joseph@codesourcery.com>
1198
1199 * c-format.c (print_char_table): Add %b and %B formats.
1200 (scan_char_table): Add %b format.
1201 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1202 (T2X_UPD, T2X_UIM): New macros.
1203
12042021-10-12 Jakub Jelinek <jakub@redhat.com>
1205
1206 * c-omp.c (c_finish_omp_atomic): Use
1207 clear_padding_type_may_have_padding_p.
1208
ce6eec39
GA
12092021-10-08 Martin Liska <mliska@suse.cz>
1210
1211 * c-opts.c (c_common_post_options): Use new macro
1212 OPTION_SET_P.
1213
50e20ee6
GA
12142021-10-07 Martin Liska <mliska@suse.cz>
1215
1216 * c-common.c (parse_optimize_options): Make
1217 save_opt_decoded_options a pointer type.
1218
57c7ec62
GA
12192021-10-06 Jakub Jelinek <jakub@redhat.com>
1220
1221 PR tree-optimization/102571
1222 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1223 padding, but the non-padding bits are contiguous set of bytes
1224 by adjusting the memcmp call arguments instead of emitting
1225 __builtin_clear_padding and then comparing all the type's bytes.
1226
12272021-10-06 Jakub Jelinek <jakub@redhat.com>
1228
1229 PR c++/102612
1230 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1231 __cpp_constexpr to 202110L rather than 201907L.
1232
da9c5f78
GA
12332021-10-04 Marek Polacek <polacek@redhat.com>
1234
1235 PR c++/97573
1236 * c-common.h (do_warn_array_compare): Declare.
1237 * c-warn.c (do_warn_array_compare): New.
1238 * c.opt (Warray-compare): New option.
1239
e3e07b89
GA
12402021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1241
1242 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1243 NULL, this is not needed.
1244
9d116bcc
GA
12452021-10-01 Martin Sebor <msebor@redhat.com>
1246
1247 PR c/102103
1248 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1249 Check and perform warning suppression.
1250 (c_common_truthvalue_conversion): Enhance warning suppression.
1251
12522021-10-01 Martin Liska <mliska@suse.cz>
1253
1254 PR target/102552
1255 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1256 used for program name, so merged_decoded_options should also
1257 respect that.
9d116bcc
GA
1258
12592021-10-01 Jakub Jelinek <jakub@redhat.com>
1260 Richard Biener <rguenther@suse.de>
1261
1262 PR sanitizer/102515
1263 * c-ubsan.c (ubsan_instrument_division): Check the right
1264 flag_sanitize_recover bit, depending on which sanitization
1265 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1266 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1267 and SANITIZE_DIVIDE is enabled, neither check is known
1268 to be false and flag_sanitize_recover bits for those two
1269 aren't the same, emit both __ubsan_handle_divrem_overflow
1270 and __ubsan_handle_divrem_overflow_abort calls.
1271
12722021-10-01 Martin Liska <mliska@suse.cz>
1273
1274 * c-common.c (parse_optimize_options): Combine optimize
1275 options with what was provided on the command line.
1276
12772021-10-01 Jakub Jelinek <jakub@redhat.com>
1278
1279 * c-omp.c (c_omp_split_clauses): Also copy
1280 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1281
cf966403
GA
12822021-09-27 Martin Liska <mliska@suse.cz>
1283
1284 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1285 x_flag_default_complex_method.
cf966403 1286
e4777439
GA
12872021-09-22 Jakub Jelinek <jakub@redhat.com>
1288
1289 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1290
62498024
GA
12912021-09-20 Matthias Kretz <m.kretz@gsi.de>
1292
1293 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1294 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1295 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1296 __ROUNDING_MATH__ according to the new optimization flags.
1297
cf74e7b5
GA
12982021-09-18 Jakub Jelinek <jakub@redhat.com>
1299
1300 * c-omp.c (c_omp_split_clauses): Split order clause also to
1301 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1302
0a4cb439
GA
13032021-09-17 Jakub Jelinek <jakub@redhat.com>
1304
1305 * c-omp.c (c_finish_omp_atomic): Avoid creating
1306 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1307 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1308 had NULL initializer. When omitting operands after v = x,
1309 use type of v rather than type of x. Fix type of vtmp
1310 TARGET_EXPR.
1311
07985c47
GA
13122021-09-13 Jason Merrill <jason@redhat.com>
1313
1314 * c.opt: Add -Winterference-size.
1315 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1316 and __GCC_CONSTRUCTIVE_SIZE.
1317
a26206ec
GA
13182021-09-10 Jakub Jelinek <jakub@redhat.com>
1319
1320 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1321 * c-omp.c: Include gimple-fold.h.
1322 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1323 OpenMP 5.1 atomics.
1324
f84e2f0b
GA
13252021-09-09 qing zhao <qing.zhao@oracle.com>
1326
1327 * c-attribs.c (handle_uninitialized_attribute): New function.
1328 (c_common_attribute_table): Add "uninitialized" attribute.
1329
b6db7cd4
GA
13302021-09-08 liuhongt <hongtao.liu@intel.com>
1331
1332 * c-common.c (excess_precision_mode_join): Update below comments.
1333 (c_ts18661_flt_eval_method): Set excess_precision_type to
1334 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1335 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1336 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1337 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1338
b2748138
GA
13392021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1340
1341 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1342
7b739540
GA
13432021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1344
1345 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1346 and -gnatwu warning for the package specification.
1347
e11c6046
GA
13482021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1349
1350 * c-attribs.c (handle_unavailable_attribute): New.
1351
1e2f030b
GA
13522021-08-30 Jason Merrill <jason@redhat.com>
1353
1354 * c.opt: Add -Wmissing-requires.
1355
85d77ac4
GA
13562021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1357
1358 PR other/93067
1359 * c-opts.c (c_common_input_charset_cb): New function.
1360 (c_common_post_options): Call new function
1361 diagnostic_initialize_input_context().
1362
7c9e1645
GA
13632021-08-20 Tobias Burnus <tobias@codesourcery.com>
1364
1365 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1366 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1367 "di" and "u", respecitively; fill with BADLEN to match
1368 size of 'types'.
1369 (get_init_dynamic_hwi): Split off from ...
1370 (init_dynamic_diag_info): ... here. Call it.
1371 (init_dynamic_gfc_info): Call it.
1372
13732021-08-20 Jakub Jelinek <jakub@redhat.com>
1374
1375 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1376 * c-pragma.c (omp_pragmas): Add error directive.
1377 * c-omp.c (omp_directives): Uncomment error directive entry.
1378
6e529985
GA
13792021-08-18 Jakub Jelinek <jakub@redhat.com>
1380
1381 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1382 * c-pragma.c (omp_pragmas): Add nothing directive.
1383 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1384
2d14d64b
GA
13852021-08-17 Jakub Jelinek <jakub@redhat.com>
1386
1387 PR c++/101539
1388 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1389 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1390
13912021-08-17 Matt Jacobson <mhjacobson@me.com>
1392
1393 * c-opts.c (c_common_post_options): Default to
1394 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1395
13962021-08-17 Jakub Jelinek <jakub@redhat.com>
1397
1398 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1399 * c-pragma.c (omp_pragmas): Add scope construct.
1400 * c-omp.c (omp_directives): Uncomment scope directive entry.
1401
9d1d9fc8
GA
14022021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1403
1404 * c-cppbuiltin.c (c_cpp_builtins): Define
1405 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1406
72be20e2
GA
14072021-08-12 Jakub Jelinek <jakub@redhat.com>
1408
1409 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1410 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1411 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1412 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1413 enumerator.
1414 (c_finish_omp_masked): Declare.
1415 * c-omp.c (c_finish_omp_masked): New function.
1416 (c_omp_split_clauses): Handle combined masked constructs.
1417
4d17ca1b
GA
14182021-07-30 Jakub Jelinek <jakub@redhat.com>
1419
1420 PR c++/101539
1421 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1422 * c-common.c (c_common_reswords): Add
1423 __is_pointer_interconvertible_base_of.
1424
14252021-07-29 Richard Biener <rguenther@suse.de>
1426
1427 PR c/101512
1428 * c-common.c (c_common_mark_addressable_vec): Look through
1429 C_MAYBE_CONST_EXPR even if not at the toplevel.
1430
af3f12e6
GA
14312021-07-27 Martin Sebor <msebor@redhat.com>
1432
1433 PR c/101585
1434 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1435
ead235f6
GA
14362021-07-23 Jakub Jelinek <jakub@redhat.com>
1437
1438 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1439 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1440 and later.
1441
14422021-07-23 Jakub Jelinek <jakub@redhat.com>
1443
1444 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1445 PRAGMA_OMP__LAST_ enumerators.
1446
419c6c68
GA
14472021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1448 Joseph Myers <joseph@codesourcery.com>
1449 Cesar Philippidis <cesar@codesourcery.com>
1450
1451 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1452
92d45509
GA
14532021-07-20 Martin Sebor <msebor@redhat.com>
1454
1455 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1456 by-const-reference.
1457 * c-common.h (c_build_shufflevector): Same.
1458
87277b6a
GA
14592021-07-16 Andrew Pinski <apinski@marvell.com>
1460
1461 PR c/101453
1462 * c-common.c (parse_optimize_options): Use the correct
1463 size for buffer.
1464
d97d71a1
GA
14652021-07-15 Martin Sebor <msebor@redhat.com>
1466
1467 PR c/101289
1468 PR c/97548
1469 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1470
c4fee1c6
GA
14712021-07-14 Jason Merrill <jason@redhat.com>
1472
1473 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1474
6fba0eea
GA
14752021-07-06 Martin Sebor <msebor@redhat.com>
1476
1477 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1478 (gcc_cdiag_char_table): Same.
1479 (gcc_cxxdiag_char_table): Same.
6fba0eea 1480
7a60a6e8
GA
14812021-07-02 Jakub Jelinek <jakub@redhat.com>
1482
1483 * c-common.h (enum c_omp_directive_kind): New enum.
1484 (struct c_omp_directive): New type.
1485 (c_omp_categorize_directive): Declare.
1486 * c-omp.c (omp_directives): New variable.
1487 (c_omp_categorize_directive): New function.
1488
bea7c16a
GA
14892021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1490
1491 * c-ada-spec.c (packed_layout): New global variable.
1492 (dump_ada_declaration): Set it upon seeing a packed record type.
1493 Do not put the "aliased" keyword if it is set.
1494 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1495
14962021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1497
1498 * c-ada-spec.c (check_name): Rename into...
1499 (check_type_name_conflict): ...this. Minor tweak.
1500 (dump_ada_function_declaration): Adjust to above renaming.
1501 (dump_ada_array_domains): Fix oversight.
1502 (dump_ada_declaration): Call check_type_name_conflict for variables.
1503
90708f87
GA
15042021-06-25 Martin Sebor <msebor@redhat.com>
1505
1506 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1507 (c_common_truthvalue_conversion): Replace direct uses of
1508 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1509 copy_no_warning.
1510 (check_function_arguments_recurse): Same.
1511 * c-gimplify.c (c_gimplify_expr): Same.
1512 * c-warn.c (overflow_warning): Same.
1513 (warn_logical_operator): Same.
1514 (warn_if_unused_value): Same.
1515 (do_warn_unused_parameter): Same.
1516
9aa8327e
GA
15172021-06-24 Jakub Jelinek <jakub@redhat.com>
1518
1519 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1520 C_ORT_OMP_TARGET.
1521 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1522 combined target constructs also add map (always, tofrom:) clause.
1523
ede6c356
GA
15242021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1525
1526 * c-attribs.c (common_handle_aligned_attribute): Remove short
1527 circuit and dead code.
1528
8dc48181
GA
15292021-06-14 Jonathan Wakely <jwakely@redhat.com>
1530
1531 PR c++/101052
1532 * known-headers.cc (get_stdlib_header_for_name): Add known
1533 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1534 exit, and getenv.
1535
8b8c3912
GA
15362021-06-12 Jason Merrill <jason@redhat.com>
1537
1538 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1539
f16f65f8
GA
15402021-06-11 Jakub Jelinek <jakub@redhat.com>
1541
1542 PR c++/100974
1543 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1544 -std=c++2b for P1938R3 consteval if support.
1545
4f625f47
GA
15462021-06-09 Jason Merrill <jason@redhat.com>
1547
1548 PR c++/100879
1549 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1550 warning.
1551
438aac59
GA
15522021-06-07 Martin Liska <mliska@suse.cz>
1553
1554 * c-target.def: Split long lines and replace them
1555 with '\n\'.
1556
600f90cb
GA
15572021-06-04 Martin Sebor <msebor@redhat.com>
1558
1559 PR c/100783
1560 * c-attribs.c (positional_argument): Bail on erroneous types.
1561
15622021-06-04 Martin Sebor <msebor@redhat.com>
1563
1564 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1565 for element presence.
1566
440c8a0a
GA
15672021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1568
1569 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1570 (dump_ada_decl_name): Likewise.
1571 (dump_anonymous_type_name): Remove parent parameter and adjust.
1572 (dump_sloc): Minor tweak.
1573 (dump_ada_array_type): Remove type parameter and adjust.
1574 (dump_ada_enum_type): Remove parent parameter and adjust.
1575 (dump_ada_node): Adjust calls to above functions.
1576 (dumped_anonymous_types): New global variable.
1577 (dump_nested_types_1): Rename into...
1578 (dump_nested_types): ...this.
1579 (dump_nested_type): Remove parent and dumped_types parameters.
1580 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1581 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1582 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1583
15842021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1585
1586 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1587 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1588
15892021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1590
1591 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1592 (htable_t): New typedef.
1593 (overloaded_names): Use it.
1594 (add_name): New function.
1595 (init_overloaded_names): Use add_name to populate the table and add
1596 special cases for sigaction and stat.
1597 (overloaded_name_p): Rename into...
1598 (overloading_index): ...this. Do not initialize overloaded_names table
1599 here. Return the index or zero.
1600 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1601 but add an overloading suffix instead.
1602 (dump_ada_specs): Initialize overloaded_names tables here.
1603
b75978d1
GA
16042021-06-01 Martin Liska <mliska@suse.cz>
1605
1606 PR other/100759
1607 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1608 to a situation where we are not in processing of an optimize
1609 pragma.
1610 * c-pragma.c (handle_pragma_pop_options): Restore target
1611 options.
1612
ee682192
GA
16132021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1614
1615 PR testsuite/100749
1616 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1617
16182021-05-31 Richard Biener <rguenther@suse.de>
1619
1620 PR c++/88601
1621 * c-common.c: Include tree-vector-builder.h and
1622 vec-perm-indices.h.
1623 (c_common_reswords): Add __builtin_shufflevector.
1624 (c_build_shufflevector): New funtion.
1625 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1626 (c_build_shufflevector): Declare.
1627
48166757
GA
16282021-05-28 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR middle-end/99928
1631 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1632 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1633
16342021-05-28 Tobias Burnus <tobias@codesourcery.com>
1635
1636 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1637
2bc6dace
GA
16382021-05-25 Martin Liska <mliska@suse.cz>
1639
1640 PR tree-optimization/92860
1641 PR target/99592
1642 * c-attribs.c (handle_optimize_attribute): Save target node
1643 before calling parse_optimize_options and save it in case
1644 it changes.
1645 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1646 (handle_pragma_pop_options): Likewise here.
1647
16482021-05-25 Martin Liska <mliska@suse.cz>
1649
1650 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1651
16522021-05-25 Jakub Jelinek <jakub@redhat.com>
1653
1654 PR middle-end/99928
1655 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1656 combined with simd and not with taskloop or for.
1657
2832d51b
GA
16582021-05-21 Jakub Jelinek <jakub@redhat.com>
1659
1660 PR middle-end/99928
1661 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1662 on firstprivate clause copy going to target construct, and for
1663 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1664
ea34e2ed
GA
16652021-05-20 Jonathan Wakely <jwakely@redhat.com>
1666
1667 * c.opt (Wc++11-extensions, Wc++14-extensions)
1668 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1669 options.
1670
16712021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1672
1673 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1674
16752021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1676
1677 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1678 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1679 (pch_init): Renamed member.
1680 (c_common_valid_pch): Adjust access to debug_type_names.
1681
65f32e5d
GA
16822021-05-19 Martin Sebor <msebor@redhat.com>
1683
1684 PR c/100619
1685 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1686 bounds.
1687
a8daf9a1
GA
16882021-05-18 Richard Biener <rguenther@suse.de>
1689
1690 PR c/100547
1691 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1692 Reword existing nunit diagnostic.
1693
a7ffc1ef
GA
16942021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1695
1696 * c-common.c (braced_list_to_string): Return CTOR unchanged
1697 if host and target character sizes don't match.
1698
87a7d10c
GA
16992021-05-14 Martin Liska <mliska@suse.cz>
1700
1701 * c.opt: Add Warning keyword for 2 options.
1702
f9af11c7
GA
17032021-05-13 Martin Liska <mliska@suse.cz>
1704
1705 PR middle-end/100504
1706 * c-attribs.c (handle_target_clones_attribute): Expect a string
1707 argument to target_clone argument.
1708
037e3661
GA
17092021-05-11 Joseph Myers <joseph@codesourcery.com>
1710
1711 * c-lex.c (interpret_float): Handle digit separators for C2X.
1712
aa891c56
GA
17132021-05-10 Martin Liska <mliska@suse.cz>
1714
1715 * c-ada-spec.c (print_destructor): Use startswith
1716 function instead of strncmp.
1717 (dump_ada_declaration): Likewise.
1718 * c-common.c (disable_builtin_function): Likewise.
1719 (def_builtin_1): Likewise.
1720 * c-format.c (check_tokens): Likewise.
1721 (check_plain): Likewise.
1722 (convert_format_name_to_system_name): Likewise.
1723
e4ff4ffb
GA
17242021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1725
1726 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1727 complex divide
1728
c0fa3f2f
GA
17292021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1730 Nathan Sidwell <nathan@codesourcery.com>
1731 Tom de Vries <vries@codesourcery.com>
1732 Julian Brown <julian@codesourcery.com>
1733 Kwok Cheung Yeung <kcy@codesourcery.com>
1734
1735 * c.opt (Wopenacc-parallelism): New.
1736
6e81e015
GA
17372021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1738
1739 * c.opt (fopenacc-kernels=): Remove.
1740
019a9220
GA
17412021-04-08 Jakub Jelinek <jakub@redhat.com>
1742
1743 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1744 occured -> occurred.
1745 (check_alignment_of_packed_member): Fix a comment typo,
1746 memeber -> member.
1747 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1748 and onless -> unless.
1749 (warn_parm_array_mismatch): Fix comment typos, declaratation
1750 -> declaration and woud -> would. Fix up comment indentation.
1751
17522021-04-08 Martin Sebor <msebor@redhat.com>
1753
1754 PR middle-end/99883
1755 * c.opt (Wmismatched-new-delete): Correct spelling.
1756
b1da9916
GA
17572021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1758
1759 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1760 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1761 enumeral types use again the type name for the enumeration constants.
1762 (dump_ada_node): Adjust call to dump_ada_enum_type.
1763 (dump_nested_type): Likewise.
1764
f1607029
GA
17652021-04-01 Jason Merrill <jason@redhat.com>
1766
1767 PR c++/98481
1768 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1769
4493b1c1
GA
17702021-03-25 Jakub Jelinek <jakub@redhat.com>
1771
1772 PR c++/99565
1773 * c-warn.c (do_warn_duplicated_branches): Pass also
1774 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1775
6af7b307
GA
17762021-03-20 Jakub Jelinek <jakub@redhat.com>
1777
1778 PR debug/99230
1779 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1780
ceae9533
GA
17812021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1782
1783 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1784 after entering the separate class package, if any.
1785
67f10d28
GA
17862021-03-04 Richard Biener <rguenther@suse.de>
1787
1788 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1789 Handle ERROR_MARK.
1790
17912021-03-04 Jakub Jelinek <jakub@redhat.com>
1792
1793 PR c/99325
1794 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1795 (token_streamer::stream) Likewise.
1796 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1797 UNKNOWN_LOCATION.
1798
f3641ac7
GA
17992021-03-03 Jakub Jelinek <jakub@redhat.com>
1800
1801 PR c/99324
1802 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1803 instead of mark_addressable. Fix a comment typo -
1804 neutrallly -> neutrally.
1805
2c83c3fb
GA
18062021-02-28 Jakub Jelinek <jakub@redhat.com>
1807
1808 PR c/99304
1809 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1810 message - refernced -> referenced. Remove superfluous space before
1811 closing paren of function calls.
1812
daa68844
GA
18132021-02-25 Nathan Sidwell <nathan@acm.org>
1814
1815 PR c++/99166
1816 * c.opt (-flang-info-module-cmi): Renamed option.
1817
50352c6c
GA
18182021-02-19 Nathan Sidwell <nathan@acm.org>
1819
1820 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1821
bf81237e
GA
18222021-02-18 H.J. Lu <hjl.tools@gmail.com>
1823
1824 PR target/99113
1825 * c-attribs.c (c_common_attribute_table): Add the "retain"
1826 attribute.
1827 (handle_retain_attribute): New function.
1828
0e804ce3
GA
18292021-02-16 Marek Polacek <polacek@redhat.com>
1830
1831 PR c++/99062
1832 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1833 alignment argument is non-negative. Tweak a warning message.
1834
fab095da
GA
18352021-02-12 Martin Sebor <msebor@redhat.com>
1836
1837 PR c/99055
1838 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1839 print_generic_expr_to_str.
1840
4b37c3ea
GA
18412021-02-10 Richard Biener <rguenther@suse.de>
1842
1843 * c-common.c (parse_optimize_options): Free decoded_options.
1844
a19dd5e6
GA
18452021-02-04 emsr <3dw4rd@verizon.net>
1846
1847 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1848
9faaa807
GA
18492021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1850
1851 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1852 * c-lex.c (interpret_integer): Set node type for size literal.
1853
85d04a2e
GA
18542021-01-28 Jakub Jelinek <jakub@redhat.com>
1855
1856 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1857 draft from description.
1858 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1859
e62bb7f0
GA
18602021-01-26 Paul Fee <paul.f.fee@gmail.com>
1861
1862 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1863 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1864 and -std=gnu++2b
1865 * c-opts.c (set_std_cxx23): New.
1866 (c_common_handle_option): Set options when -std=c++23 is enabled.
1867 (c_common_post_options): Adjust comments.
1868 (set_std_cxx20): Likewise.
1869
161e4c08
GA
18702021-01-25 Martin Sebor <msebor@redhat.com>
1871
1872 PR c++/98646
1873 * c-common.c (check_nonnull_arg): Adjust warning text.
1874
4c9bcd5c
GA
18752021-01-17 Martin Sebor <msebor@redhat.com>
1876
1877 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1878 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1879
59cf67d1
GA
18802021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1881
1882 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1883 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1884
2f7f0d32
GA
18852021-01-15 Jakub Jelinek <jakub@redhat.com>
1886
1887 PR tree-optimization/98597
1888 * c-pretty-print.c: Include options.h.
1889 (c_fold_indirect_ref_for_warn): New function.
1890 (print_mem_ref): Use it. If it returns something that has compatible
1891 type and is TBAA compatible with zero offset, print it and return,
1892 otherwise print it using offsetof syntax or array ref syntax. Fix up
1893 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1894 argument has pointer to array type. Print pointers using the standard
1895 formatting.
1896
6851dda2
GA
18972021-01-12 Martin Sebor <msebor@redhat.com>
1898
1899 PR c/98597
1900 PR c/98592
1901 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1902 has pointer type. Remove redundant code. Avoid calling
1903 gimple_canonical_types_compatible_p.
1904
7d187e4f
GA
19052021-01-07 Martin Sebor <msebor@redhat.com>
1906
1907 PR middle-end/98578
1908 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1909 Avoid assuming acces type's size is constant. Correct condition
1910 guarding the printing of a parenthesis.
1911
942ae5be
GA
19122021-01-06 Martin Sebor <msebor@redhat.com>
1913
1914 PR c++/95768
1915 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1916 SSA_NAMEs print VLA names and GIMPLE defining statements.
1917 (print_mem_ref): New function.
1918 (c_pretty_printer::unary_expression): Call it.
1919
19202021-01-06 Richard Biener <rguenther@suse.de>
1921
1922 PR tree-optimization/95582
1923 * c-attribs.c (c_common_attribute_table): Add entry for
1924 signed_bool_precision.
1925 (handle_signed_bool_precision_attribute): New.
1926
8daa719b
GA
19272020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1928
1929 * c.opt: Add -stdlib= option and enumerations for
1930 libstdc++ and libc++.
1931
eefe499f
GA
19322020-12-16 Martin Liska <mliska@suse.cz>
1933
1934 * c.opt: Remove usage of Report.
1935
d52945ce
GA
19362020-12-14 Martin Sebor <msebor@redhat.com>
1937
1938 PR middle-end/98166
1939 PR c++/57111
1940 PR middle-end/98160
1941 * c-attribs.c (maybe_add_noinline): New function.
1942 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1943 Implicitly add attribute noinline to functions not declared inline
1944 and warn on those.
1945
ca2bd949
GA
19462020-12-09 Tobias Burnus <tobias@codesourcery.com>
1947
1948 * c-pragma.c (omp_pragmas): Add 'allocate'.
1949 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1950
f6e8e279
GA
19512020-12-08 Jakub Jelinek <jakub@redhat.com>
1952
1953 PR c++/98187
1954 * c-pragma.c (omp_pragmas): Remove "master".
1955 (omp_pragmas_simd): Add "master".
1956
bc8a7013
GA
19572020-12-07 Marek Polacek <polacek@redhat.com>
1958
1959 PR c++/98126
1960 * c-common.c (verify_tree_lim_r): New function.
1961 (verify_sequence_points): Use it. Use nullptr instead of 0.
1962
b8dd0ef7
GA
19632020-12-03 Martin Sebor <msebor@redhat.com>
1964
1965 PR c++/90629
1966 PR middle-end/94527
1967 * c-attribs.c (handle_dealloc_attribute): New function.
1968 (handle_malloc_attribute): Handle argument forms of attribute.
1969 * c.opt (-Wmismatched-dealloc): New option.
1970 (-Wmismatched-new-delete): New option.
1971
19722020-12-03 Jakub Jelinek <jakub@redhat.com>
1973
1974 PR libstdc++/93121
1975 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1976 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1977
e0f5e792
GA
19782020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1979
1980 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1981 {__GNUC_EXECUTION_CHARSET_NAME} and
1982 _WIDE_EXECUTION_CHARSET_NAME} macros.
1983
19842020-12-01 Nathan Sidwell <nathan@acm.org>
1985
1986 * c-common.c (module, import, export): New internal tokens (with
1987 trailing space).
1988 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1989 them.
1990 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1991 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1992
19932020-12-01 Nathan Sidwell <nathan@acm.org>
1994
1995 * c-opts.c (c_common_init_options): Ask for module dependencies.
1996 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1997 * c-pch.c (c_common_valid_pch): ... does not play with C++
1998 modules.
1999 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2000 options.
2001 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2002 (fmodule-only, fmodule-mapper, fmodule-lazy)
2003 (fmodule-version-ignore, Winvalid-imported-macros)
2004 (flang-info-include-translate, flang-info-include-translate-not):
2005 New options
2006
5fbf0ecb
GA
20072020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2008
2009 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2010 (dump_ada_structure): Also deal with convention, unchecked union and
2011 bit-field for nested types. In the latter case, print an Alignment
2012 aspect along with the Pack aspect.
2013
360258da
GA
20142020-11-25 Martin Sebor <msebor@redhat.com>
2015
2016 PR bootstrap/94982
2017 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2018 -Wformat-diag.
2019
1e2c9a27
GA
20202020-11-24 Martin Sebor <msebor@redhat.com>
2021
2022 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2023
8e6198d0
GA
20242020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2025
2026 * c-attribs.c (handle_special_var_sec_attribute): New.
2027 (handle_noinit_attribute): Remove.
2028 (attr_noinit_exclusions): Rename to...
2029 (attr_section_exclusions): ...this, and add "persistent" attribute
2030 exclusion.
2031 (c_common_attribute_table): Add "persistent" attribute.
2032
7a97e2fc
GA
20332020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2034
2035 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2036 Treat opaque types like other types.
2037 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2038 supported types.
2039
82e5048e
GA
20402020-11-20 Martin Sebor <msebor@redhat.com>
2041
2042 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2043 with fewer arguments.
2044
20452020-11-20 Martin Sebor <msebor@redhat.com>
2046
2047 PR middle-end/97879
2048 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2049 Error out on invalid modes.
2050
20512020-11-20 Jakub Jelinek <jakub@redhat.com>
2052
2053 PR libstdc++/88101
2054 * c-common.c (check_builtin_function_arguments): Handle
2055 BUILT_IN_CLEAR_PADDING.
2056
25bb75f8
GA
20572020-11-18 Nathan Sidwell <nathan@acm.org>
2058
2059 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2060
4dabb037
GA
20612020-11-17 Nathan Sidwell <nathan@acm.org>
2062
2063 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2064 after newly-added CTI_MODULE_HWM.
2065
20662020-11-17 Joseph Myers <joseph@codesourcery.com>
2067
2068 * c-cppbuiltin.c (builtin_define_float_constants): Define
2069 "*_IS_IEC_60559__" macros.
2070
20712020-11-17 Nathan Sidwell <nathan@acm.org>
2072
2073 * c-lex.c: #include "langhooks.h".
2074 (cb_undef): Maybe call preprocess_undef lang hook.
2075 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2076 lang hook.
2077 (push_command_line_include): Maybe call preprocess_main_file lang
2078 hook.
2079 (cb_file_change): Likewise.
2080 * c-ppoutput.c: #include "langhooks.h.
2081 (scan_translation_unit): Maybe call preprocess_token lang hook.
2082 (class do_streamer): New, derive from token_streamer.
2083 (directives_only_cb): Data pointer is do_streamer, call
2084 preprocess_token lang hook.
2085 (scan_translation_unit_directives_only): Use do_streamer.
2086 (print_line_1): Move src_line recording to after string output.
2087 (cb_undef): Maybe call preprocess_undef lang hook.
2088
20892020-11-17 Nathan Sidwell <nathan@acm.org>
2090
2091 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2092 code duplicating that functionality.
2093
20942020-11-17 Jakub Jelinek <jakub@redhat.com>
2095
2096 PR c/90628
2097 * c-common.c (check_builtin_function_arguments)
2098 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2099 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2100 for more builtins and argument positions.
2101
29c5d9ce
GA
21022020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2103
2104 PR objc/97854
2105 * stub-objc.c: Include c-common.h to declare enum rid.
2106
77f67db2
GA
21072020-11-13 Jakub Jelinek <jakub@redhat.com>
2108
2109 PR c++/63287
2110 * c-cppbuiltin.c: Include configargs.h.
2111 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2112 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2113 "single".
2114
21152020-11-13 Gergö Barany <gergo@codesourcery.com>
2116 Thomas Schwinge <thomas@codesourcery.com>
2117
2118 * c.opt (fopenacc-kernels): Add.
2119
21202020-11-13 Jason Merrill <jason@redhat.com>
2121
2122 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2123
21242020-11-13 Piotr H. Dabrowski <phd@phd.re>
2125
2126 PR c++/91318
2127 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2128
21292020-11-13 Martin Liska <mliska@suse.cz>
2130
2131 * c-attribs.c (build_attr_access_from_parms): Format properly.
2132
21332020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2134
2135 PR objc/90707
2136 * c-common.c (c_common_reswords): null_unspecified, nullable,
2137 nonnull, null_resettable: New keywords.
2138 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2139 RID_NONNULL, RID_NULL_RESETTABLE: New.
2140 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2141 ranges accepted for property attributes.
2142 * c-attribs.c (handle_objc_nullability_attribute): New.
2143 * c-objc.h (enum objc_property_attribute_group): Add
2144 OBJC_PROPATTR_GROUP_NULLABLE.
2145 (enum objc_property_attribute_kind):Add
2146 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2147 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2148
21492020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2150
2151 PR objc/77404
2152 * c-attribs.c (handle_objc_root_class_attribute): New
2153 * c-objc.h (objc_start_class_interface): Add a location
2154 value for the position of the class name.
2155 * c.opt: Add Wobjc-root-class.
2156 * stub-objc.c (objc_start_class_interface): Add a location
2157 value for the position of the class name.
2158
a5a11525
GA
21592020-11-12 Joseph Myers <joseph@codesourcery.com>
2160
2161 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2162 Allow scope for C. Handle standard attributes for C. Do not
2163 accept unscoped attributes if std_syntax and not handled as
2164 standard attributes.
2165 * c-common.h (c_common_has_attribute): Update prototype.
2166
21672020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2168
2169 PR pch/86674
2170 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2171 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2172
0f5f9ed5
GA
21732020-11-11 Patrick Palka <ppalka@redhat.com>
2174
2175 PR c++/88115
2176 * c-opts.c (c_common_post_options): Update latest_abi_version.
2177
bb622641
GA
21782020-11-10 Jakub Jelinek <jakub@redhat.com>
2179
2180 PR c/97748
2181 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2182 to false.
2183 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2184 recursively and just return true instead of warning if it is true.
2185 Handle COMPLEX_EXPR.
2186
21872020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2188
2189 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2190 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2191 (c_omp_adjust_map_clauses): New function.
2192
2bee28dd
GA
21932020-11-09 Marek Polacek <polacek@redhat.com>
2194
2195 DR 1914
2196 * c-common.c (attribute_fallthrough_p): Tweak the warning
2197 message.
2198
21992020-11-09 Patrick Palka <ppalka@redhat.com>
2200
2201 * c-pragma.c (handle_pragma_diagnostic): Split the
2202 unknown-option -Wpragmas diagnostic into a warning and a
2203 subsequent note containing a spelling suggestion. Avoid
2204 computing the suggestion if -Wpragmas warnings are being
2205 suppressed.
2206
22072020-11-09 Patrick Palka <ppalka@redhat.com>
2208
2209 PR testsuite/97117
2210 * c-indentation.c (get_visual_column): Remove location_t
2211 parameter. Move the column-tracking diagnostic code from here
2212 to ...
2213 (should_warn_for_misleading_indentation): ... here, before the
2214 early exit for when the loci are not all distinct. Don't pass a
2215 location_t argument to get_visual_column.
2216 (assert_get_visual_column_succeeds): Don't pass a location_t
2217 argument to get_visual_column.
2218 (assert_get_visual_column_fails): Likewise.
2219
fb95de7a
GA
22202020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2221
2222 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2223 of keywords accepted in @property attribute contexts.
2224 * c-objc.h (enum objc_property_attribute_group): Add
2225 OBJC_PROPATTR_GROUP_CLASS.
2226 (enum objc_property_attribute_kind): Add
2227 OBJC_PROPERTY_ATTR_CLASS.
2228
2da7ee05
GA
22292020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2230
2231 * c-common.c (c_common_reswords): Add 'atomic' property
2232 attribute.
2233 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2234 property attributes.
2235
22362020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2237
2238 * c-attribs.c (handle_nsobject_attribute): New.
2239 * c.opt: Add WNSObject-attribute.
2240
44cab2d8
GA
22412020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2242
2243 * c-objc.h (enum objc_property_attribute_group): New
2244 (enum objc_property_attribute_kind): New.
2245 (OBJC_PROPATTR_GROUP_MASK): New.
2246 (struct property_attribute_info): Small class encapsulating
2247 parser output from property attributes.
2248 (objc_prop_attr_kind_for_rid): New
2249 (objc_add_property_declaration): Simplify interface.
2250 * stub-objc.c (enum rid): Dummy type.
2251 (objc_add_property_declaration): Simplify interface.
2252 (objc_prop_attr_kind_for_rid): New.
2253
22542020-11-06 Nathan Sidwell <nathan@acm.org>
2255
2256 * c-ada-spec.c (collect_ada_nodes): Rename
2257 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2258 (collect_ada_node): Likewise.
2259 (dump_forward_type): Likewise.
2260 * c-common.c (set_underlying_type): Rename
2261 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2262 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2263
22642020-11-06 Jakub Jelinek <jakub@redhat.com>
2265
2266 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2267
0cfd9109
GA
22682020-11-05 Marek Polacek <polacek@redhat.com>
2269
2270 PR c++/97675
2271 * c.opt (Wexceptions): New option.
2272
22732020-11-05 Marek Polacek <polacek@redhat.com>
2274
2275 PR c++/25814
2276 * c.opt (Wvexing-parse): New option.
2277
35c125cb
GA
22782020-11-04 Jakub Jelinek <jakub@redhat.com>
2279
2280 PR c++/97670
2281 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2282 underlying decl to clear in the allocate_head bitmap.
2283
22842020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2285
2286 * c-objc.h (objc_non_constant_expr_p): New.
2287 * stub-objc.c (objc_non_constant_expr_p): New.
2288
fd2325ea
GA
22892020-11-03 Nathan Sidwell <nathan@acm.org>
2290
2291 * c.opt (MQ,MT): Reword description to be make-agnostic.
2292
88ce3d5f
GA
22932020-11-02 Nathan Sidwell <nathan@acm.org>
2294
2295 * c-opts.c (c_common_post_options): Move var decl to its
2296 initialization point.
2297
22982020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2299
2300 * c-lex.c (c_lex_with_flags): When combining '@' with a
2301 keyword for Objective-C, combine the location ranges too.
2302
23032020-10-30 Qing Zhao <qing.zhao@oracle.com>
2304 H.J.Lu <hjl.tools@gmail.com>
2305
2306 * c-attribs.c (c_common_attribute_table): Add new attribute
2307 zero_call_used_regs.
2308 (handle_zero_call_used_regs_attribute): New function.
2309
e93aae4a
GA
23102020-10-28 Marek Polacek <polacek@redhat.com>
2311
2312 PR c++/97573
2313 * c-opts.c (c_common_post_options): In C++20, turn on
2314 -Wdeprecated-enum-enum-conversion and
2315 -Wdeprecated-enum-float-conversion.
2316 * c.opt (Wdeprecated-enum-enum-conversion,
2317 Wdeprecated-enum-float-conversion): New options.
2318 (Wenum-conversion): Allow for C++ too.
2319
23202020-10-28 Jakub Jelinek <jakub@redhat.com>
2321
2322 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2323 * c-omp.c: Include bitmap.h.
2324 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2325
f19e7c8d
GA
23262020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2327
2328 * c-common.c (__is_nothrow_assignable): New.
2329 (__is_nothrow_constructible): Likewise.
2330 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2331 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2332
efe71fcc
GA
23332020-10-23 Jan Hubicka <hubicka@ucw.cz>
2334
2335 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2336
23372020-10-23 Marek Polacek <polacek@redhat.com>
2338
2339 PR c++/91741
2340 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2341 (c_common_init_ts): Likewise.
2342 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2343 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2344 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2345 (maybe_warn_sizeof_array_div): New function.
2346 * c.opt (Wsizeof-array-div): New option.
2347
23482020-10-23 Martin Sebor <msebor@redhat.com>
2349
2350 PR c/97463
2351 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2352
56ddd5e2
GA
23532020-10-22 Martin Liska <mliska@suse.cz>
2354
2355 PR c/94722
2356 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2357 (handle_stack_protect_attribute): Add error message for a
2358 no_stack_protector function.
2359
23602020-10-22 Martin Liska <mliska@suse.cz>
2361
2362 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2363
23642020-10-22 Jan Hubicka <hubicka@ucw.cz>
2365
2366 * c-gimplify.c: Include tree-nested.h
2367 (c_genericize): Update for new nested function info.
2368
b2698c21
GA
23692020-10-14 Martin Sebor <msebor@redhat.com>
2370
2371 PR c/97413
2372 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2373 bounds in an extra list.
2374
7e9282ae
GA
23752020-10-05 Richard Biener <rguenther@suse.de>
2376 Jakub Jelinek <jakub@redhat.com>
2377
2378 PR c++/97197
2379 * c-pretty-print.c: Include langhooks.h.
2380 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2381 expression.
2382 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2383 unary_expression.
2384 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2385
660bfe61
GA
23862020-09-30 Martin Sebor <msebor@redhat.com>
2387
2388 PR middle-end/97189
2389 * c-attribs.c (append_access_attr): Use the function declaration
2390 location for a warning about an attribute access argument.
2391
93bca37c
GA
23922020-09-29 Marek Polacek <polacek@redhat.com>
2393
2394 PR c++/94695
2395 * c.opt (Wrange-loop-construct): New option.
2396
82b77dee
GA
23972020-09-23 Martin Sebor <msebor@redhat.com>
2398
2399 PR c/97131
2400 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2401
24022020-09-23 Marek Polacek <polacek@redhat.com>
2403
2404 PR c/97125
2405 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2406 after loops and other structured control constructs have been lowered.
2407
521d2711
GA
24082020-09-22 Jakub Jelinek <jakub@redhat.com>
2409
2410 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2411 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2412
44135373
GA
24132020-09-21 Marek Polacek <polacek@redhat.com>
2414
2415 * c.opt (Wctad-maybe-unsupported): New option.
2416
2fe5b7d1
GA
24172020-09-19 Martin Sebor <msebor@redhat.com>
2418
2419 PR c/50584
2420 * c-common.h (warn_parm_array_mismatch): Declare new function.
2421 (has_attribute): Move declaration of an existing function.
2422 (build_attr_access_from_parms): Declare new function.
2423 * c-warn.c (parm_array_as_string): Define new function.
2424 (plus_one): Define new function.
2425 (warn_parm_ptrarray_mismatch): Define new function.
2426 (warn_parm_array_mismatch): Define new function.
2427 (vla_bound_parm_decl): New function.
2428 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2429 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2430 qualifiers here...
2431 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2432 them in brackets here. Also print [static]. Strip extraneous
2433 expressions from VLA bounds.
2434
24352020-09-19 Martin Sebor <msebor@redhat.com>
2436
2437 PR c/50584
2438 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2439 (handle_argspec_attribute): New function.
2440 (get_argument, get_argument_type): New functions.
2441 (append_access_attrs): Add overload. Handle internal attribute
2442 representation in addition to external.
2443 (handle_access_attribute): Handle internal attribute representation
2444 in addition to external.
2445 (build_attr_access_from_parms): New function.
2446
24472020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2448
2449 * c-gimplify.c (genericize_c_loop): Rewrite to match
2450 c_finish_loop in c-typeck.c.
2451
24522020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2453
2454 * c-common.c (c_block_may_fallthrough): New, split from
2455 cxx_block_may_fallthrough in the cp front end.
2456 (c_common_init_ts): Move handling of loop and switch-related
2457 statements here from the cp front end.
2458 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2459 cp front end.
2460 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2461 * c-common.h (c_block_may_fallthru): Declare.
2462 (bc_state_t): Move here from cp front end.
2463 (save_bc_state, restore_bc_state): Declare.
2464 (c_genericize_control_stmt): Declare.
2465 (WHILE_COND, WHILE_BODY): Likewise.
2466 (DO_COND, DO_BODY): Likewise.
2467 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2468 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2469 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2470 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2471 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2472 * c-dump.c (dump_stmt): Copy from cp front end.
2473 (c_dump_tree): Move code to handle structured loop and switch
2474 tree nodes here from cp front end.
2475 * c-gimplify.c: Adjust includes.
2476 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2477 cp front end.
2478 (save_bc_state, restore_bc_state): New functions using old code
2479 from cp front end.
2480 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2481 (genericize_c_loop): Move from cp front end.
2482 (genericize_for_stmt, genericize_while_stmt): Likewise.
2483 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2484 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2485 (genericize_omp_for_stmt): Likewise.
2486 (c_genericize_control_stmt): New function using code split from
2487 cp front end.
2488 (c_genericize_control_r): New.
2489 (c_genericize): Call walk_tree with c_genericize_control_r.
2490 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2491 structured loop and switch tree nodes here from cp front end.
2492
2aad20c0
GA
24932020-09-17 Patrick Palka <ppalka@redhat.com>
2494
2495 PR c/80076
2496 * c-indentation.c (should_warn_for_misleading_indentation): Move
2497 declarations of local variables closer to their first use.
2498 Handle virtual token locations by resolving them to their
2499 respective macro expansion points. If all three tokens are
2500 produced from the same macro expansion, then instead use their
2501 loci within the macro definition.
2502
ecde1b0a
GA
25032020-09-16 Martin Sebor <msebor@redhat.com>
2504
2505 PR c/78666
2506 PR c/96126
2507 * c-attribs.c (validate_attr_args): New function.
2508 (validate_attr_arg): Same.
2509 (handle_section_attribute): Call it. Introduce a local variable.
2510 (handle_alloc_size_attribute): Same.
2511 (handle_alloc_align_attribute): Same.
2512
50a71cd0
GA
25132020-09-14 Jakub Jelinek <jakub@redhat.com>
2514
2515 * c-attribs.c (handle_optimize_attribute): Adjust
2516 cl_optimization_save, cl_optimization_restore and
2517 build_optimization_node callers.
2518 * c-pragma.c (handle_pragma_optimize): Adjust
2519 build_optimization_node caller.
2520 (handle_pragma_push_options): Adjust
2521 build_optimization_node and build_target_option_node callers.
2522 (handle_pragma_pop_options, handle_pragma_reset_options):
2523 Adjust cl_optimization_restore callers.
2524
8f7ea26a
GA
25252020-08-28 Martin Sebor <msebor@redhat.com>
2526
2527 * c.opt (Wstringop-overread): New option.
2528
a6493809
GA
25292020-08-11 Jakub Jelinek <jakub@redhat.com>
2530
2531 PR c/96545
2532 * c-common.c (get_atomic_generic_size): Require that first argument's
2533 type points to a complete type and use tree_fits_uhwi_p instead of
2534 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2535
48cc2e46
GA
25362020-07-31 Martin Sebor <msebor@redhat.com>
2537
2538 PR c++/96003
2539 * c-common.c (check_function_arguments_recurse): Return early when
2540 no-warning bit is set.
2541
25422020-07-31 Richard Biener <rguenther@suse.de>
2543
2544 PR debug/96383
2545 * c-common.h (c_common_finalize_early_debug): Declare.
2546 * c-common.c: Include debug.h.
2547 (c_common_finalize_early_debug): finalize_early_debug langhook
2548 implementation generating debug for extern declarations.
2549
e71dab87
GA
25502020-07-27 Nathan Sidwell <nathan@acm.org>
2551
2552 * c-common.c (try_to_locate_new_include_insertion_point): Use
2553 strcmp, not pointer equality.
2554
ae2e0bc1
GA
25552020-07-25 Martin Sebor <msebor@redhat.com>
2556
2557 PR c++/96310
2558 * c-common.c (check_nonnull_arg): Print note only when warning was
2559 issued.
2560
3ea9abca
GA
25612020-07-22 Tobias Burnus <tobias@codesourcery.com>
2562
2563 * c-omp.c (c_finish_omp_critical): Check for no name but
2564 nonzero hint provided.
2565
0933f508
GA
25662020-07-20 Jason Merrill <jason@redhat.com>
2567
2568 * c-cppbuiltin.c (c_cpp_builtins): Update
2569 __cpp_nontype_template_args for C++20.
2570
25712020-07-20 Martin Sebor <msebor@redhat.com>
2572
2573 PR c/96249
2574 * c.opt: Remove stray text.
2575
8ca07a30
GA
25762020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2577
2578 PR other/86904
2579 * c-indentation.c (should_warn_for_misleading_indentation): Get
2580 global tabstop from the new source.
2581 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2582 is now a common option.
2583 * c.opt: Likewise.
2584
a82c4c4c 25852020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2586
2587 * c.opt (Wscalar-storage-order): Add explicit variable.
2588
f60ee68d
GA
25892020-07-07 Nathan Sidwell <nathan@acm.org>
2590
2591 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2592 cpp_read_main_file.
2593 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2594 maps. Force token position to line_table's highest line.
2595 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2596 (cb_define): Always increment source line.
2597
4077d74c
GA
25982020-07-06 Martin Sebor <msebor@redhat.com>
2599
2600 PR c++/95984
2601 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2602 to stub lambda objects with null this pointer.
2603 (check_nonnull_arg): Handle C++ nullptr.
2604
b5f24739
GA
26052020-07-02 Jason Merrill <jason@redhat.com>
2606 Jakub Jelinek <jakub@redhat.com>
2607
2608 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2609
46fbb6c6
GA
26102020-06-30 Jakub Jelinek <jakub@redhat.com>
2611
2612 PR c++/95963
2613 * c-common.c (check_function_arguments_recurse): Don't crash on
2614 calls to internal functions.
2615
69273534
GA
26162020-06-28 Martin Sebor <msebor@redhat.com>
2617
2618 PR c++/86568
2619 * c-common.c (struct nonnull_arg_ctx): Add members.
2620 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2621 C++ member functions specially. Consider the this pointer implicitly
2622 nonnull.
2623 (check_nonnull_arg): Use location of argument when available.
2624 (check_function_arguments): Use nonnull_arg_ctx as argument.
2625
9a33c41f
GA
26262020-06-27 Jakub Jelinek <jakub@redhat.com>
2627
2628 PR middle-end/95903
2629 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2630 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2631 smaller precision intop operands separately.
2632
c9c05f73
GA
26332020-06-26 Marek Polacek <polacek@redhat.com>
2634
2635 * c-opts.c (c_common_init_options): Default to gnu++17.
2636
aff95ee7
GA
26372020-06-17 Jonathan Wakely <jwakely@redhat.com>
2638
bd0a89dc 2639 PR c/95378
aff95ee7
GA
2640 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2641 pointer arguments.
2642
56638b9b
GA
26432020-06-16 Jakub Jelinek <jakub@redhat.com>
2644
2645 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2646 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2647 idx members.
2648 (c_omp_is_loop_iterator): New function.
2649 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2650 if outer loop iterator is present. Perform duplicate checking through
2651 hash_set in the function rather than expecting caller to do that.
2652 Pass NULL instead of d->ppset to walk_tree_1.
2653 (c_omp_check_nonrect_loop_iv): New function.
2654 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2655 non-rectangular loop forms, diagnose multiple associated loops with
2656 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2657 (c_omp_check_loop_iv_exprs): Likewise.
2658
ec6ffbb9
GA
26592020-06-10 Martin Liska <mliska@suse.cz>
2660
2661 PR tree-optimization/92860
2662 * c-attribs.c (handle_optimize_attribute):
2663 Save global options and compare it after parsing of function
2664 attribute.
2665 * c-pragma.c (opt_stack::saved_global_options): New field.
2666 (handle_pragma_push_options): Save global_options.
2667 (handle_pragma_pop_options): Compare them after pop.
2668
b952c2cf
GA
26692020-06-09 Jakub Jelinek <jakub@redhat.com>
2670
2671 PR c/95580
2672 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2673 case when MEM_REF's first argument has type pointer to incomplete type.
2674
1a59f3db
GA
26752020-06-05 Jason Merrill <jason@redhat.com>
2676
2677 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2678 operand to POINTER_PLUS_EXPR.
2679
3add3425
GA
26802020-06-04 Martin Sebor <msebor@redhat.com>
2681
2682 PR middle-end/10138
2683 PR middle-end/95136
2684 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2685 (handle_access_attribute): Same.
2686
9a5b7438
GA
26872020-06-03 Mark Wielaard <mark@klomp.org>
2688
2689 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2690 New function.
2691 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2692 New function declaration.
2693
26942020-06-03 Mark Wielaard <mark@klomp.org>
2695
2696 * known-headers.cc (get_string_macro_hint): New function.
2697 (get_stdlib_header_for_name): Use get_string_macro_hint.
2698 (get_c_stdlib_header_for_string_macro_name): New function.
2699 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2700 New function declaration.
2701
27022020-06-03 Tobias Burnus <tobias@codesourcery.com>
2703
2704 * c-common.h (c_omp_predetermined_mapping): Declare.
2705 * c-omp.c (c_omp_predetermined_mapping): New.
2706
af114c38
MW
27072020-05-22 Mark Wielaard <mark@klomp.org>
2708
2709 * known-headers.cc (get_stdlib_header_for_name): Add a new
2710 stdlib_hint array for stdbool and stdint.
2711
45c50b6a
MW
27122020-05-22 Mark Wielaard <mark@klomp.org>
2713
2714 * known-headers.cc (get_stdlib_header_for_name): Return
2715 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2716 flag_isoc99.
2717
c22027a0
NS
27182020-05-20 Nathan Sidwell <nathan@acm.org>
2719
38a4db21
NS
2720 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2721
c22027a0
NS
2722 * c-common.c (try_to_locate_new_include_insertion_point): Use
2723 strcmp to compare filenames.
2724 * c-lex.c (init_c_lex): Move declaration to initialization.
2725 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2726 deferred count loop.
2727
29f0e90d
JM
27282020-05-15 Jason Merrill <jason@redhat.com>
2729
2730 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2731
b04445d4
JM
27322020-05-13 Jason Merrill <jason@redhat.com>
2733
2734 * c.opt (std=c++20): Make c++2a the alias.
2735 (std=gnu++20): Likewise.
2736 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2737 * c-opts.c: Adjust.
2738 * c-cppbuiltin.c: Adjust.
2739 * c-ubsan.c: Adjust.
2740 * c-warn.c: Adjust.
2741
11dd3be5
EB
27422020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2743
2744 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2745
b224c376
NS
27462020-05-08 Nathan Sidwell <nathan@acm.org>
2747
2748 Reimplement directives only processing.
2749 * c-ppoutput.c (token_streamer): Ne.
2750 (directives_only_cb): New. Swallow ...
2751 (print_lines_directives_only): ... this.
2752 (scan_translation_unit_directives_only): Reimplment using the
2753 published interface.
2754
f1d94677
MP
27552020-05-07 Marek Polacek <polacek@redhat.com>
2756
2757 * c-format.c (badwords): Add "nonstatic".
2758
9b95bb52
JJ
2759202-05-07 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR c/94968
2762 * c-common.c (speculation_safe_value_resolve_params): Return false if
2763 error_operand_p (val2).
2764 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2765 Remove extraneous semicolon.
2766
530b4409 27672020-05-06 qing zhao <qing.zhao@oracle.com>
2768
2769 PR c/94230
2770 * c-indentation.c (get_visual_column): Add a hint to use the new
2771 -flarge-source-files option.
2772
b776bdca
SSF
27732020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2774
2775 * c-attribs.c (handle_vector_size_attribute): Add attribute
2776 nonnull for argument args in order to silence warning of
2777 uninitialized variable usage. Since this is local to the
2778 compilation unit and thus cannot be checked at call sides by the
2779 compiler, added an assert statement in order to verify this.
2780
6607bdd9
L
27812020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2782
2783 PR target/93492
2784 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2785 value to USHRT_MAX (65535).
2786
691eeb65
JJ
27872020-04-29 Jakub Jelinek <jakub@redhat.com>
2788
2789 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2790
26d76be7
JJ
27912020-04-27 Jakub Jelinek <jakub@redhat.com>
2792
2793 PR c/94755
2794 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2795 fncode == BUILT_IN_NONE before initialization of first_param.
2796
7291b2ed
MP
27972020-04-23 Marek Polacek <polacek@redhat.com>
2798
2799 PR c++/94733
2800 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2801 TREE_PURPOSE.
2802
58a29af8
PP
28032020-04-14 Patrick Palka <ppalka@redhat.com>
2804
2805 PR c++/85278
2806 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2807 ampersand if it's an rvalue reference type.
2808
09f04139
MS
28092020-04-13 Martin Sebor <msebor@redhat.com>
2810
2811 PR c/92326
2812 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2813 printing array bound for flexible array members.
2814
ee26baf4
IS
28152020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2816
2817 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2818 define, per n4861.
2819
75efe9cb
RB
28202020-04-02 Richard Biener <rguenther@suse.de>
2821
2822 PR c/94392
2823 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2824 for -O2 and C++11 or newer.
2825
75defde9
PP
28262020-03-28 Patrick Palka <ppalka@redhat.com>
2827
2828 * c.opt: Add -fconcepts-diagnostics-depth.
2829
52f24a9e
MS
28302020-03-27 Martin Sebor <msebor@redhat.com>
2831
2832 PR c++/94346
2833 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2834 to decl_attributes. Make handling of different kinds of entities
2835 more robust.
2836
ccacf77b
MS
28372020-03-27 Martin Sebor <msebor@redhat.com>
2838
2839 PR c++/94098
2840 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2841 here.
2842
ca6c7225
JJ
28432020-03-23 Jakub Jelinek <jakub@redhat.com>
2844
2845 PR c++/91993
2846 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2847 result being COMPOUND_EXPRs, skip to ultimate rhs.
2848
1aa22b19
RS
28492020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2850
2851 PR middle-end/94072
2852 * c-common.c (c_common_type_for_mode): Before using a registered
2853 built-in type, check that the vectorness of the type matches
2854 the vectorness of the mode.
2855
700d4cb0
JJ
28562020-03-17 Jakub Jelinek <jakub@redhat.com>
2857
2858 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2859 issue in a diagnostic message.
2860
b408e010
LH
28612020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2862
2863 * c.opt: Avoid redundancy in the help text.
2864
e78e50d5
MP
28652020-03-02 Marek Polacek <polacek@redhat.com>
2866
2867 PR c++/93958 - add missing -std=gnu++20.
2868 * c.opt: Add -std=gnu++20.
2869
649e1741
MS
28702020-03-01 Martin Sebor <msebor@redhat.com>
2871
2872 PR c++/92721
2873 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2874 (handle_access_attribute): Same.
2875
7b60f3ba
JJ
28762020-02-25 Jakub Jelinek <jakub@redhat.com>
2877
2878 PR c/93858
2879 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2880 "did you mean" hint in diagnostics.
2881
fb260504
JM
28822020-02-15 Jason Merrill <jason@redhat.com>
2883
2884 * c.opt: Add -std=c++20.
2885
1d757b09
EB
28862020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2887
2888 * c-ada-spec.c: Include bitmap.h.
2889 (dump_ada_double_name): Rename into...
2890 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2891 (dump_ada_array_type): Adjust to above renaming. Robustify.
2892 (dump_nested_types_1): New function copied from... Add dumped_types
2893 parameter and pass it down to dump_nested_type.
2894 (dump_nested_types): ...this. Remove parent parameter. Just call
2895 dump_nested_types_1 on an automatic bitmap.
2896 (dump_nested_type): Add dumped_types parameter.
2897 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2898 Adjust recursive calls and adjust to above renaming.
2899 (dump_ada_declaration): Adjust call to dump_nested_types.
2900 Tidy up and adjust to above renaming.
2901 (dump_ada_specs): Initialize and release bitmap obstack.
2902
0cc575e4
MS
29032020-02-10 Martin Sebor <msebor@redhat.com>
2904
2905 PR c/93640
2906 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2907
a59aa302
JJ
29082020-02-10 Jakub Jelinek <jakub@redhat.com>
2909
2910 PR other/93641
2911 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2912 Remove useless extra test.
2913
e464fc90
TB
29142020-02-03 Julian Brown <julian@codesourcery.com>
2915 Tobias Burnus <tobias@codesourcery.com>
2916
2917 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2918
e3b6c052
JM
29192020-01-29 Jason Merrill <jason@redhat.com>
2920
2921 PR c++/89357
2922 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2923
6d00f052
JM
29242020-01-23 Jason Merrill <jason@redhat.com>
2925
2926 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2927
8a990ffa
MS
29282020-01-23 Martin Sebor <msebor@redhat.com>
2929
2930 PR c/84919
2931 * c-common.c (check_function_arguments): Avoid overlap checking
2932 of sprintf functions.
2933
55b7df8b
JM
29342020-01-22 Jason Merrill <jason@redhat.com>
2935
2936 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2937 PR c++/40752
2938 * c-warn.c (conversion_warning): Check operands only after checking
2939 the whole expression. Don't check second operand of + for sign.
2940
c77074d0
JM
29412020-01-21 Jason Merrill <jason@redhat.com>
2942 Manuel López-Ibáñez <manu@gcc.gnu.org>
2943
2944 PR c++/40752 - useless -Wconversion with short +=.
2945 * c.opt (-Warith-conversion): New.
2946 * c-warn.c (conversion_warning): Recurse for operands of
2947 operators. Only warn about the whole expression with
2948 -Warith-conversion.
2949
731dbfc3
JM
29502020-01-21 Jason Merrill <jason@redhat.com>
2951
2952 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2953 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2954
ad1a3914
NS
29552020-01-20 Nathan Sidwell <nathan@acm.org>
2956
2957 PR preprocessor/80005
2958 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2959
49789fd0
IS
29602020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2961
2962 * c-common.c (co_await, co_yield, co_return): New.
2963 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2964 RID_CO_RETURN): New enumeration values.
2965 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2966 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2967 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2968 * c.opt (fcoroutines): New command-line switch.
2969
4bc1899b
DM
29702020-01-10 David Malcolm <dmalcolm@redhat.com>
2971
2972 * c-format.c (local_event_ptr_node): New.
2973 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2974 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2975 * c-format.h (T_EVENT_PTR): New define.
2976
f25e33fa
MS
29772020-01-10 Martin Sebor <msebor@redhat.com>
2978
2979 PR c/93132
2980 * c-attribs.c (append_access_attrs): Validate against the translated
2981 access string rather than the human-readable representation.
2982
8d9254fc
JJ
29832020-01-01 Jakub Jelinek <jakub@redhat.com>
2984
2985 Update copyright years.
2986
39292e25
EB
29872019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2988
2989 * c-ada-spec.h (decl_sloc): Delete.
2990 * c-ada-spec.c (decl_sloc): Make static.
2991
519d7496
JB
29922019-12-19 Julian Brown <julian@codesourcery.com>
2993
2994 * c-common.h (c_omp_map_clause_name): Add prototype.
2995 * c-omp.c (c_omp_map_clause_name): New function.
2996 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2997 PRAGMA_OACC_CLAUSE_DETACH.
2998
a6163563
JB
29992019-12-19 Julian Brown <julian@codesourcery.com>
3000 Maciej W. Rozycki <macro@codesourcery.com>
3001 Tobias Burnus <tobias@codesourcery.com>
3002 Thomas Schwinge <thomas@codesourcery.com>
3003
3004 * c-pragma.h (pragma_omp_clause): Add
3005 PRAGMA_OACC_CLAUSE_NO_CREATE.
3006
e8f1ade2
MS
30072019-12-17 Martin Sebor <msebor@redhat.com>
3008
3009 PR c++/61339
3010 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3011
368877a1
DM
30122019-12-11 David Malcolm <dmalcolm@redhat.com>
3013
3014 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3015 implementation.
3016 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3017
d68f5d45
DM
30182019-12-09 David Malcolm <dmalcolm@redhat.com>
3019
3020 * c-format.c (range_label_for_format_type_mismatch::get_text):
3021 Replace label_text ctor called with true with label_text::take.
3022
d3e28653
DM
30232019-12-09 David Malcolm <dmalcolm@redhat.com>
3024
3025 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3026 initial newline from expected outputs.
3027 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3028 call to diagnostic_show_locus.
3029
abd6d8cc
JJ
30302019-12-06 Jakub Jelinek <jakub@redhat.com>
3031
3032 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3033 now.
3034
7906797e
MP
30352019-12-05 Marek Polacek <polacek@redhat.com>
3036 Jakub Jelinek <jakub@redhat.com>
3037
3038 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3039 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3040
5c04da88
MP
30412019-12-05 Marek Polacek <polacek@redhat.com>
3042
3043 PR c++/92271 - make __is_same alias for __is_same_as.
3044 * c-common.c: Add __is_same, an alias for __is_same_as.
3045
43aae289
MP
30462019-12-03 Marek Polacek <polacek@redhat.com>
3047
3048 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3049 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3050 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3051
d7ddfbcb
JH
30522019-11-30 Jan Hubicka <hubicka@ucw.cz>
3053
3054 * c-attribs.c (handle_symver_attribute): New function
3055 (c_common_attributes): Add symver.
3056
65ef05d0
RS
30572019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3058
3059 * c-common.c (pointer_int_sum): Use verify_type_context to check
3060 whether the target allows pointer arithmetic for the types involved.
3061 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3062 to check whether the target allows sizeof and alignof operations
3063 for the types involved.
3064
1a291106
JM
30652019-11-27 Jason Merrill <jason@redhat.com>
3066
3067 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3068
05d6cb1a
JJ
30692019-11-26 Jakub Jelinek <jakub@redhat.com>
3070
3071 PR c++/61414
3072 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3073 ENUMERAL_TYPEs.
3074
5b8d9367
JM
30752019-11-25 Joseph Myers <joseph@codesourcery.com>
3076
3077 PR c/91985
3078 * c-common.c (c_common_type_for_mode): Handle decimal
3079 floating-point types being NULL_TREE.
3080 * c-format.c (get_format_for_type_1): Handle specified types being
3081 NULL_TREE.
3082 * c-lex.c (interpret_float): Give an error for decimal
3083 floating-point constants when decimal floating-point not
3084 supported.
3085
1fbf51cb
JJ
30862019-11-23 Jakub Jelinek <jakub@redhat.com>
3087
3088 PR middle-end/83859
3089 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3090 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3091 group warning with inform together.
3092 (handle_access_attribute): Formatting fix.
3093
761df906
JJ
30942019-11-22 Jakub Jelinek <jakub@redhat.com>
3095
bdaf8be1
JJ
3096 PR c/90677
3097 * c-common.h (identifier_global_tag): Declare.
3098 * c-format.c (get_pointer_to_named_type): Renamed to ...
3099 (get_named_type): ... this. Use identifier_global_tag instead of
3100 identifier_global_value, handle the return value being a TYPE_P.
3101 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3102 to call get_named_type instead. Formatting fixes.
3103
c2ecce6d 3104 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3105 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3106 and __cpp_generic_lambdas for -std=c++2a. Define
3107 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3108 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3109 __cpp_concepts for -std=c++2a.
3110
54aa6b58
MS
31112019-11-22 Martin Sebor <msebor@redhat.com>
3112
3113 PR middle-end/83859
3114 * c-attribs.c (handle_access_attribute): New function.
3115 (c_common_attribute_table): Add new attribute.
3116 (get_argument_type): New function.
3117 (append_access_attrs): New function.
3118 (get_nonnull_operand): Rename...
3119 (get_attribute_operand): ...to this.
3120 * c-common.c (get_nonnull_operand): Rename...
3121 (get_attribute_operand): ...to this.
3122
6c80b1b5
JM
31232019-11-21 Joseph Myers <joseph@codesourcery.com>
3124
3125 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3126 of warning.
3127
192961ff
JM
31282019-11-19 Joseph Myers <joseph@codesourcery.com>
3129
3130 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3131 warning for standard attributes mixed with fallthrough attributes.
3132
f8aea5e3
JM
31332019-11-15 Joseph Myers <joseph@codesourcery.com>
3134
3135 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3136 * c-common.h (handle_fallthrough_attribute): Declare.
3137
2cc94aa8
JM
31382019-11-15 Joseph Myers <joseph@codesourcery.com>
3139
3140 * c-attribs.c (handle_deprecated_attribute): Remove static.
3141 * c-common.h (handle_deprecated_attribute): Declare.
3142
7c5890cc
JM
31432019-11-14 Joseph Myers <joseph@codesourcery.com>
3144
3145 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3146 char for C.
3147
b2417b59
JJ
31482019-11-14 Jakub Jelinek <jakub@redhat.com>
3149
d0ec7c93
JJ
3150 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3151 valid vendors.
3152
b2417b59
JJ
3153 * c-omp.c (c_omp_check_context_selector): Handle name lists
3154 containing string literals. Don't diagnose atomic_default_mem_order
3155 with multiple props.
3156
00be2a5f
JM
31572019-11-13 Joseph Myers <joseph@codesourcery.com>
3158
3159 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3160 NORM_MAX constants. Update call to get_max_float.
3161 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3162 constants.
3163
2dbad62d
EB
31642019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3165
3166 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3167 (dump_forward_type): Do not generate a declaration for function types.
3168 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3169 of the component type if it is declared in another file.
3170
6ed76044
ML
31712019-11-12 Martin Liska <mliska@suse.cz>
3172
3173 * c-opts.c (c_common_post_options):
3174 Use SET_OPTION_IF_UNSET.
3175
62aee289
MR
31762019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3177 Frederik Harwath <frederik@codesourcery.com>
3178
3179 gcc/c-family/
3180 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3181 constant.
3182 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3183
f486280c
RS
31842019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3185
3186 * c-common.h (gnu_vector_type_p): New function.
3187 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3188 vectors to satisfy gnu_vector_type_p.
3189 (c_build_vec_convert): Likewise __builtin_convertvector.
3190 (convert_vector_to_array_for_subscript): Likewise when applying
3191 implicit vector to array conversion.
3192 (scalar_to_vector): Likewise when converting vector-scalar
3193 operations to vector-vector operations.
3194
017c6491
JM
31952019-11-08 Joseph Myers <joseph@codesourcery.com>
3196
3197 * c.opt (Wold-style-definition): Initialize to -1.
3198 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3199 to flag_isoc2x if not set explicitly.
3200
c01bd174
JM
32012019-11-07 Joseph Myers <joseph@codesourcery.com>
3202
3203 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3204
0df65305
JM
32052019-11-05 Jason Merrill <jason@redhat.com>
3206
3207 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3208 -fconcepts.
3209
e0c866dd
KK
32102019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3211
3212 * c-opts.c (c_common_post_options): Update
3213 latest_abi_version.
3214
f968ef9b
JJ
32152019-11-02 Jakub Jelinek <jakub@redhat.com>
3216
d0c464d2
JJ
3217 * c-common.h (c_omp_get_context_selector): Remove.
3218 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3219 and renamed to omp_get_context_selector.
3220
917dd789
JJ
3221 * c-omp.c (c_omp_mark_declare_variant): Use
3222 omp_context_selector_set_compare.
3223
f968ef9b
JJ
3224 PR c++/88335 - Implement P1073R3: Immediate functions
3225 * c-common.h (enum rid): Add RID_CONSTEVAL.
3226 * c-common.c (c_common_reswords): Add consteval.
3227
5f6705b7
JJ
32282019-11-01 Martin Sebor <msebor@redhat.com>
3229
3230 PR middle-end/91679
3231 PR middle-end/91647
3232 PR middle-end/91463
3233 PR middle-end/92312
3234 * c-pretty-print.c (direct_abstract_declarator): Print
3235 bound in zero-length arrays.
3236 * c.opt (-Wzero-length-bounds): New option.
3237
43f1814c
NS
32382019-10-30 Nathan Sidwell <nathan@acm.org>
3239
3240 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3241 macros.
3242
ad1539d5
MS
32432019-10-28 Martin Sebor <msebor@redhat.com>
3244
3245 PR c/66970
3246 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3247 even when only preprocessing.
3248 * c-common.h (names_builtin_p): Declare new function.
3249 * c-lex.c (init_c_lex): Set has_builtin.
3250 (c_common_has_builtin): Define a new function.
3251 * c-ppoutput.c (init_pp_output): Set has_builtin.
3252
135df52c
JJ
32532019-10-24 Jakub Jelinek <jakub@redhat.com>
3254
3255 * c-common.h (c_omp_context_selector_matches): Remove.
3256 * c-omp.c (c_omp_context_selector_matches): Remove.
3257 * c-attribs.c (c_common_attribute_table): Add
3258 "omp declare target {host,nohost,block}" attributes.
3259
8ad0c477
JM
32602019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3261
3262 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3263
56898e43
RS
32642019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3265
3266 * c-common.h (user_facing_original_type_p): Declare.
3267 * c-common.c: Include c-spellcheck.h.
3268 (user_facing_original_type_p): New function.
3269
20de9568
JJ
32702019-10-12 Jakub Jelinek <jakub@redhat.com>
3271
3272 * c-common.h (c_omp_mark_declare_variant,
3273 c_omp_context_selector_matches): Declare.
3274 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3275 and hsa-common.h.
3276 (c_omp_get_context_selector): Support second argument NULL.
3277 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3278 functions.
3279 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3280 attribute, add "omp declare variant base" and
3281 "omp declare variant variant" attributes.
3282
175a85b2
JM
32832019-10-11 Joseph Myers <joseph@codesourcery.com>
3284
3285 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3286 CppReason(CPP_W_C11_C2X_COMPAT).
3287
fe2bc27c
JM
32882019-10-11 Joseph Myers <joseph@codesourcery.com>
3289
3290 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3291 _Decimal64 and _Decimal128.
3292
27dfdc0f
JM
32932019-10-10 Joseph Myers <joseph@codesourcery.com>
3294
3295 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3296 types if DFP not supported.
3297
94e7f906
JJ
32982019-10-10 Jakub Jelinek <jakub@redhat.com>
3299
3300 * c-common.h (c_omp_check_context_selector,
3301 c_omp_get_context_selector): Declare.
3302 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3303 in diagnostic message.
3304 (c_omp_check_context_selector, c_omp_get_context_selector): New
3305 functions.
3306 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3307 attribute.
3308 (handle_omp_declare_variant_attribute): New function.
3309
a7160771
MS
33102019-10-09 Martin Sebor <msebor@redhat.com>
3311
3312 PR tree-optimization/90879
3313 * c.opt (-Wstring-compare): New option.
3314
cb57504a
JM
33152019-10-08 Andrew Sutton <asutton@lock3software.com>
3316 Jason Merrill <jason@redhat.com>
3317
3318 Update the concepts implementation to conform to the C++20
3319 specification, improve compile times, and generally clean up
3320 the implementation.
3321
3322 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3323 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3324 * c.opt: Add -Wconcepts-ts.
3325 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3326 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3327 (set_std_cxx2a): Enable concepts by default.
3328
fbb2a6dc
JM
33292019-10-08 Joseph Myers <joseph@codesourcery.com>
3330
3331 * c-opts.c (c_common_post_options): Set
3332 -fno-fp-int-builtin-inexact for C2X.
3333
8e007055
JJ
33342019-10-05 Jakub Jelinek <jakub@redhat.com>
3335
3336 PR c++/91369 - Implement P0784R7: constexpr new
3337 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3338 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3339
843f104d
JM
33402019-10-04 Joseph Myers <joseph@codesourcery.com>
3341
3342 PR c/82752
3343 * c-format.c (C_STD_VER): Handle C2x.
3344 (C_STD_NAME): Likewise.
3345 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3346 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3347 modifier allowed and 'p' flag.
3348 * c-format.h (enum format_std_version): Add STD_C2X.
3349 (struct format_char_info): Mention 'p' in comment on flags2.
3350
e9c9a142
DM
33512019-10-01 David Malcolm <dmalcolm@redhat.com>
3352
3353 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3354 calling diagnostic_show_locus, rather than destroying it afterwards.
3355
7552c36a
JJ
33562019-10-01 Jakub Jelinek <jakub@redhat.com>
3357
3358 PR c++/91925
3359 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3360 with NULL DECL_FIELD_OFFSET.
3361
8209db25
RS
33622019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3363
3364 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3365 has a type name, use it in preference to the __vector syntax.
3366
9343bf99
RS
33672019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3368
3369 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3370 two spaces between a comma and "...".
3371
59bc434a
JJ
33722019-09-27 Jakub Jelinek <jakub@redhat.com>
3373
3374 PR c++/88203
3375 * c-common.h (c_omp_predefined_variable): Declare.
3376 * c-omp.c (c_omp_predefined_variable): New function.
3377 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3378 for predefined variables.
3379
c6447c20
RS
33802019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3381
3382 * c-common.h (build_function_call_vec): Take the original
3383 function decl as an optional final parameter.
3384 (check_builtin_function_arguments): Take the original function decl.
3385 * c-common.c (check_builtin_function_arguments): Likewise.
3386 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3387 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3388
c4438114
JM
33892019-09-15 Jason Merrill <jason@redhat.com>
3390
3391 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3392 fold_for_warn in "|| mask" warning.
3393
68a57628
ML
33942019-09-10 Martin Liska <mliska@suse.cz>
3395
3396 * c.opt: Use newly added WarnRemoved.
3397
f48ef52e
ML
33982019-09-09 Martin Liska <mliska@suse.cz>
3399
3400 * c.opt: Update comment of removed
3401 options that are preserved only for backward
3402 compatibility.
3403
67f6e649
ML
34042019-09-06 Martin Liska <mliska@suse.cz>
3405
3406 PR c++/91125
3407 * c-common.c: Remove definition of flag_use_repository.
3408 * c-common.h: Likewise.
3409 * c-opts.c (c_common_handle_option):
3410 Do not handle OPT_frepo option.
3411 * c.opt: Mark the option with Deprecated.
3412
db9d2274
MP
34132019-09-04 Marek Polacek <polacek@redhat.com>
3414
3415 * c.opt (fdeduce-init-list): Ignored.
3416
68e2c199
PK
34172019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3418
3419 PR c/78736
3420 * c.opt (Wenum-conversion): New option.
3421
7a4418a5
JL
34222019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3423
3424 * c-attribs.c (handle_section_attribute): Call the
3425 handle_generic_attribute target hook after performing target
3426 independent processing.
3427 (handle_noinit_attribute): Likewise.
3428
5f76ab15
ILT
34292019-09-03 Ian Lance Taylor <iant@golang.org>
3430
3431 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3432 when using -fgo-dump-spec.
3433
ae0d3f6a
ML
34342019-09-02 Martin Liska <mliska@suse.cz>
3435
3436 PR c++/91155
3437 * c-common.c (fname_as_string): Use cxx_printable_name for
3438 __PRETTY_FUNCTION__ same as was used before r265711.
3439
8a902edb
MP
34402019-08-28 Marek Polacek <polacek@redhat.com>
3441
3442 Implement P1152R4: Deprecating some uses of volatile.
3443 PR c++/91361
3444 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3445 default for C++2a, unless -Wno-deprecated.
3446 * c.opt (Wvolatile): New warning.
3447
4742dbe7
MP
34482019-08-28 Marek Polacek <polacek@redhat.com>
3449
3450 PR c++/91360 - Implement C++20 P1143R2: constinit.
3451 * c-common.c (c_common_reswords): Add constinit and __constinit.
3452 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3453 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3454 RID_LAST_CXX20.
3455 (D_CXX20): Define.
3456 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3457 * c-format.c (cxx_keywords): Add "constinit".
3458 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3459
6a074892
JJ
34602019-08-27 Jakub Jelinek <jakub@redhat.com>
3461
3462 PR c++/91415
3463 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3464 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3465 like COMPOUND_EXPR rather than normal expression.
3466
22f8849d
IS
34672019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3468
3469 PR pch/61250
3470 * c-lex.c (c_lex_with_flags): Don't call
3471 c_common_no_more_pch () from here.
3472
df375b03
JJ
34732019-08-23 Jakub Jelinek <jakub@redhat.com>
3474
3475 PR middle-end/91283
3476 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3477 instead of flag_excess_precision_cmdline.
3478 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3479 * c-opts.c (c_common_post_options): Likewise.
3480
14b7950f
MS
34812019-08-22 Martin Sebor <msebor@redhat.com>
3482
3483 PR middle-end/91490
3484 * c-common.c (braced_list_to_string): Add argument and overload.
3485 Handle flexible length arrays and unions.
3486
8bb2ee59
EB
34872019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3488
3489 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3490 function declarations where arguments are missing. Rename variables.
3491
21c1e205
RB
34922019-08-15 Richard Biener <rguenther@suse.de>
3493
3494 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3495 enabled, define __SIZETYPE__.
3496
f0033821
CL
34972019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3498
3499 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3500 exclusion with "section" attribute.
3501 (attr_noinit_exclusions): New table.
3502 (handle_noinit_attribute): New function.
3503
4d732405
RS
35042019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3505
3506 PR middle-end/91421
3507 * c-common.c (resolve_overloaded_builtin): Use
3508 copy_decl_built_in_function.
3509
51ad8481
MS
35102019-08-13 Martin Sebor <msebor@redhat.com>
3511
3512 PR c/80619
3513 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3514 (asm_fprintf_length_spec): Same.
3515 * c-format.h (format_lengths): Add FMT_LEN_w.
3516
77eb117f
JJ
35172019-08-10 Jakub Jelinek <jakub@redhat.com>
3518
3519 * c-pragma.h (enum pragma_omp_clause): Add
3520 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3521
398e3feb
JJ
35222019-08-07 Jakub Jelinek <jakub@redhat.com>
3523
3524 * c-pragma.h (enum pragma_omp_clause): Add
3525 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3526 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3527 enumeration value.
3528
ab574db6
MP
35292019-08-05 Marek Polacek <polacek@redhat.com>
3530
3531 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3532 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3533 default for C++2a, unless -Wno-deprecated.
3534 * c.opt (Wcomma-subscript): New warning.
3535
554a530f
JJ
35362019-07-20 Jakub Jelinek <jakub@redhat.com>
3537
3538 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3539 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3540 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3541 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3542 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3543 constructs with the loop construct.
3544
1a888209
JJ
35452019-07-13 Jakub Jelinek <jakub@redhat.com>
3546
3547 PR c/91149
3548 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3549 OMP_CLAUSE_REDUCTION_TASK handling.
3550
1fdd6f04
JJ
35512019-07-12 Jakub Jelinek <jakub@redhat.com>
3552
3553 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3554 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3555
99b1c316
MS
35562019-07-09 Martin Sebor <msebor@redhat.com>
3557
3558 PR c++/61339
1fdd6f04 3559 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3560 and others to class.
3561 * c-pretty-print.h: Same.
3562
6c1dae73
MS
35632019-07-09 Martin Sebor <msebor@redhat.com>
3564
3565 PR c++/61339
3566 * c-format.c (check_argument_type): Change class-key from class to
3567 struct and vice versa to match convention and avoid -Wclass-is-pod
3568 and -Wstruct-no-pod.
3569 * c-pretty-print.h: Same.
3570
8ba6ea87
ML
35712019-07-03 Martin Liska <mliska@suse.cz>
3572
3573 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3574 dead assignemts.
3575
83eb9522
JJ
35762019-07-03 Jakub Jelinek <jakub@redhat.com>
3577
3578 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3579 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3580 with OMP_PARALLEL.
3581
1c6ffbab
QZ
35822019-07-02 qing zhao <qing.zhao@oracle.com>
3583
3584 PR preprocessor/90581
3585 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3586 * c.opt: Add new option -fmax-include-depth.
3587
7ffc7de5
JM
35882019-06-26 Jason Merrill <jason@redhat.com>
3589
3590 PR c++/55442 - memory-hog with highly recursive constexpr.
3591 * c.opt (fconstexpr-loop-limit): New.
3592
361af3e4
JJ
35932019-06-25 Jakub Jelinek <jakub@redhat.com>
3594
3595 PR sanitizer/90954
3596 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3597 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3598
ab20d992
JJ
35992019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3600
3601 * c-common.c (c_common_nodes_and_builtins): Define
3602 alternate "__intN__" name for "__intN" types.
3603
f4af4019
JH
36042019-06-24 Jan Hubicka <jh@suse.cz>
3605
3606 * c-common.c (braced_lists_to_strings): Check that
3607 type is array or integer prior checking string flag.
3608
da9e9b57
MB
36092019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3610
3611 PR c++/90875 - added -Wswitch-outside-range option
3612 * c.opt (Wswitch-outside-range): Added new option.
3613 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3614
3f3d6a6f
MP
36152019-06-21 Marek Polacek <polacek@redhat.com>
3616
3617 PR c++/90953 - ICE with -Wmissing-format-attribute.
3618 * c-common.c (check_function_arguments_recurse): Use
3619 get_attribute_name.
3620 (check_missing_format_attribute): Likewise.
3621
1bf32c11
MP
36222019-06-19 Marek Polacek <polacek@redhat.com>
3623
3624 PR c++/60364 - noreturn after first decl not diagnosed.
3625 * c-attribs.c (handle_noreturn_attribute): No longer static.
3626 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3627 Declare.
3628 * c-format.c (check_function_format): Use get_attribute_name.
3629
a04c0734
MS
36302019-06-19 Martin Sebor <msebor@redhat.com>
3631
3632 PR translation/90156
3633 * c-format.c (function_format_info::format_type): Adjust type.
3634 (function_format_info::is_raw): New member.
3635 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3636 (decode_format_attr): Adjust call to decode_format_type.
3637 Avoid a redundant call to convert_format_name_to_system_name.
3638 Avoid abbreviating the word "arguments" in a diagnostic.
3639 (format_warning_substr): New function.
3640 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3641 (finish_dollar_format_checking): Same.
3642 (check_format_info): Same.
3643 (struct baltoks_t): New.
3644 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3645 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3646 functions.
3647 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3648 maybe_diag_unbalanced_tokens.
3649 (handle_format_attribute): Spell out the word "arguments" in
3650 a diagnostic.
3651
d3786ebb
MB
36522019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3653
3654 PR c++/90449 - add -Winaccessible-base option.
3655 * c.opt (Winaccessible-base): New option.
3656
bf38f7e9
JJ
36572019-06-10 Jakub Jelinek <jakub@redhat.com>
3658
3659 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3660 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3661 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3662 combined/composite constructs where it is not allowed. Copy over
3663 OMP_CLAUSE_REDUCTION_INSCAN.
3664
0ecf545c
MS
36652019-06-05 Martin Sebor <msebor@redhat.com>
3666
3667 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3668 (handle_alias_ifunc_attribute): Same.
3669 (handle_copy_attribute): Same.
3670 (handle_weakref_attribute): Same.
3671 (handle_nonnull_attribute): Same.
3672 * c-warn.c (warn_for_sign_compare): Same.
3673 (warn_for_restrict): Same.
3674 * c.opt: Same.
3675
36b34127
MS
36762019-06-05 Martin Sebor <msebor@redhat.com>
3677
3678 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3679 * c.opt (-Wformat-diag): Remove a spurious period.
3680
357a352f
JJ
36812019-05-29 Jakub Jelinek <jakub@redhat.com>
3682
3683 PR c/90628
3684 * c-common.c (check_builtin_function_arguments)
3685 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3686 as last argument.
3687
2b8235ea
EB
36882019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3689
3690 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3691
6d86ddc4
ML
36922019-05-22 Martin Liska <mliska@suse.cz>
3693
3694 PR lto/90500
3695 * c-attribs.c (handle_copy_attribute): Do not copy
3696 target_clones attribute.
3697
419ba5b9
EB
36982019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3699
3700 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3701 * c-ada-spec.c (print_assignment_operator): New function.
3702 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3703 assignment operators declared as methods and filter out the others.
3704
e03436e7
TS
37052019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3706
3707 PR c/89433
3708 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3709 "omp declare target".
3710
a9c697b8
MS
37112019-05-16 Martin Sebor <msebor@redhat.com>
3712
ab20d992
JJ
3713 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3714 keywords, operators, and types in diagnostics.
3715 (handle_scalar_storage_order_attribute): Same.
3716 (handle_mode_attribute): Same.
3717 (handle_visibility_attribute): Same.
3718 (handle_assume_aligned_attribute): Same.
3719 (handle_no_split_stack_attribute): Same.
3720 * c-common.c (shorten_compare): Same.
3721 (c_common_truthvalue_conversion): Same.
3722 (cb_get_source_date_epoch): Same.
3723 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3724 in diagnostics.
3725 (interpret_float): Same.
3726 * c-omp.c (c_finish_omp_for): Same.
3727 * c-opts.c (c_common_post_options): Same.
3728 * c-pch.c (c_common_pch_pragma): Same.
3729 * c-pragma.c (pop_alignment): Same.
3730 (handle_pragma_pack): Same.
3731 (apply_pragma_weak): Same.
3732 (handle_pragma_weak): Same.
3733 (handle_pragma_scalar_storage_order): Same.
3734 (handle_pragma_redefine_extname): Same.
3735 (add_to_renaming_pragma_list): Same.
3736 (maybe_apply_renaming_pragma): Same.
3737 (push_visibility): Same.
3738 (handle_pragma_visibility): Same.
3739 (handle_pragma_optimize): Same.
3740 (handle_pragma_message): Same.
3741 * c-warn.c (warn_for_omitted_condop): Same.
3742 (lvalue_error): Same.
a9c697b8 3743
6b943512
RB
37442019-05-15 Richard Biener <rguenther@suse.de>
3745
3746 PR c/90474
3747 * c-common.c (c_common_mark_addressable_vec): Also mark
3748 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3749 c_mark_addressable.
ab20d992 3750
b744fc85
NS
37512019-05-06 Nathan Sidwell <nathan@acm.org>
3752
3753 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3754
598f50d7
NS
37552019-04-30 Nathan Sidwell <nathan@acm.org>
3756
3757 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3758
5bcc5a3b
ML
37592019-04-30 Martin Liska <mliska@suse.cz>
3760
3761 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3762 for unknown options.
3763
e78a87f7
RS
37642019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3765
3766 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3767 the pointer target rather than the pointer itself.
3768
c280b7ee
JJ
37692019-04-19 Jakub Jelinek <jakub@redhat.com>
3770
3771 PR c/89888
3772 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3773 arguments.
3774 (c_do_switch_warnings): Remove outside_range_p argument.
3775 * c-common.c (check_case_bounds): Removed.
3776 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3777 Don't call check_case_bounds. Fold low_value as well as high_value.
3778 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3779 Check for case labels outside of range of original type here and
3780 adjust them.
3781
8e8225e6
JJ
37822019-04-12 Jakub Jelinek <jakub@redhat.com>
3783
63b8a166
JJ
3784 PR translation/90041
3785 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3786 in the Warn diagnostics.
3787
8e8225e6
JJ
3788 PR c/89946
3789 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3790 function comment. Warn if arguments of the attribute are not positive
3791 integer constants.
3792
53a3f614
EB
37932019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3794
3795 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3796 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3797
22be5873
EB
37982019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3799
3800 * c-ada-spec.c (is_float128): New predicate extracted from...
3801 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3802 <REAL_TYPE>: ...here. Call it.
3803
34facf20
DM
38042019-04-05 David Malcolm <dmalcolm@redhat.com>
3805
3806 PR c/89985
3807 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3808 auto_diagnostic_group. Guard inform calls by result of
3809 warning_at call.
3810
05564120
MP
38112019-04-05 Marek Polacek <polacek@redhat.com>
3812
ab20d992 3813 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3814 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3815 of RHS.
3816
7a506c3c
JM
38172019-04-03 Jason Merrill <jason@redhat.com>
3818
3819 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3820 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3821
ddeae8c8
MS
38222019-04-01 Martin Sebor <msebor@redhat.com>
3823
3824 PR c/89685
3825 * c-attribs.c (handle_copy_attribute): Handle references and
3826 non-constant expressions.
3827
a15ffa22
JJ
38282019-03-22 Jakub Jelinek <jakub@redhat.com>
3829
3830 PR c++/87481
3831 * c.opt (-fconstexpr-ops-limit=): New option.
3832
36a3a7a3
JJ
38332019-03-21 Jakub Jelinek <jakub@redhat.com>
3834
3835 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3836 template param.
3837
bec1da64
MS
38382019-03-19 Martin Sebor <msebor@redhat.com>
3839
3840 PR tree-optimization/89688
3841 * c-common.c (braced_list_to_string): Make static.
3842 (braced_lists_to_strings): Define new function.
3843 * c-common.h (braced_list_to_string): Remove.
3844 (braced_lists_to_strings): Declare.
3845
1fe61adf
ML
38462019-03-12 Martin Liska <mliska@suse.cz>
3847
3848 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3849
93964ebd
ML
38502019-03-11 Martin Liska <mliska@suse.cz>
3851
3852 * c-opts.c (c_common_post_options): Wrap apostrophes
3853 in gcc internal format with %'.
3854
a3f9f006
ML
38552019-03-11 Martin Liska <mliska@suse.cz>
3856
3857 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3858 in a string format message and fix GNU coding style.
3859 * c-common.c (vector_types_convertible_p): Likewise.
3860 (c_build_vec_perm_expr): Likewise.
3861 * c-indentation.c (get_visual_column): Likewise.
3862 * c-opts.c (c_common_handle_option): Likewise.
3863 (c_common_post_options): Likewise.
3864 (sanitize_cpp_opts): Likewise.
3865 * c-pch.c (c_common_pch_pragma): Likewise.
3866 * c-pragma.c (handle_pragma_pack): Likewise.
3867
1db01ff9
JJ
38682019-03-08 Jakub Jelinek <jakub@redhat.com>
3869
3870 PR tree-optimization/89550
3871 * c-common.c (c_common_truthvalue_conversion): Only set
3872 TREE_NO_WARNING if warning_at returned true.
3873 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3874
ba790e6f
JJ
38752019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3876 Martin Sebor <msebor@gmail.com>
3877
3878 * c.opt (Wmissing-attributes): Clean up doc string.
3879
7da73ba7
JJ
38802019-02-25 Jakub Jelinek <jakub@redhat.com>
3881
3882 PR c/89495
3883 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3884 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3885 checking.
3886
921bb9d1
RB
38872019-02-22 Richard Biener <rguenther@suse.de>
3888
3889 * c-pch.c (no_checksum): Remove.
3890 (pch_init): Remove assertion that executable_checksum is not
3891 all zero.
3892 (c_common_valid_pch): Likewise.
3893
e2ebb05c
MS
38942019-02-18 Martin Sebor <msebor@redhat.com>
3895
3896 PR middle-end/89294
3897 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3898
3fe53000
DM
38992019-02-16 David Malcolm <dmalcolm@redhat.com>
3900
3901 PR c++/88680
3902 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3903 implementing -Wtype-limits.
3904
28a8cef1
MS
39052019-02-11 Martin Sebor <msebor@redhat.com>
3906
3907 PR c++/87996
3908 * c-common.c (invalid_array_size_error): New function.
3909 (valid_array_size_p): Call it. Handle size as well as type.
3910 * c-common.h (valid_constant_size_p): New function.
3911 (enum cst_size_error): New type.
3912
ec2be203
DM
39132019-01-31 David Malcolm <dmalcolm@redhat.com>
3914
3915 PR c/89122
3916 * known-headers.cc (get_stdlib_header_for_name): Add
3917 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3918
8936f047
JJ
39192019-01-31 Jakub Jelinek <jakub@redhat.com>
3920
3921 PR libstdc++/88170
3922 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3923 a C cast in pp_c_flag_gnu_v3 mode.
3924
6a335b96
JJ
39252019-01-29 Jakub Jelinek <jakub@redhat.com>
3926
3927 PR c/86125
3928 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3929 builtin_structptr_types types even for C.
3930
2a06eba5
BE
39312019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3932
3933 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3934 when rhs is of array type correctly. Fix handling of nested structures.
3935 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3936 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3937 type casts within nested compound expressions.
3938
18a23298
JJ
39392019-01-22 Jakub Jelinek <jakub@redhat.com>
3940
3941 PR middle-end/88968
3942 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3943 variable after using BIT_FIELD_REF.
3944
420183d9
L
39452019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3946
3947 PR c/51628
3948 PR c/88664
3949 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3950 Remove the boolean argument.
3951 * c-warn.c (check_address_of_packed_member): Renamed to ...
3952 (check_address_or_pointer_of_packed_member): This. Also
3953 warn pointer conversion.
3954 (check_and_warn_address_of_packed_member): Renamed to ...
3955 (check_and_warn_address_or_pointer_of_packed_member): This.
3956 Also warn pointer conversion.
3957 (warn_for_address_or_pointer_of_packed_member): Remove the
3958 boolean argument. Don't check pointer conversion here.
3959
99063eee
RS
39602019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3961
3962 PR inline-asm/52813
3963 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3964
a30d0196
JJ
39652019-01-14 Jakub Jelinek <jakub@redhat.com>
3966
3967 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3968 and __cpp_nontype_template_parameter_auto. Add a comment that
3969 __cpp_template_auto is deprecated.
3970
2d91f79d
TH
39712019-01-14 Tom Honermann <tom@honermann.net>
3972
3973 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3974 * c-common.c (c_common_reswords): Add char8_t.
3975 (fix_string_type): Use char8_t for the type of u8 string literals.
3976 (c_common_get_alias_set): char8_t doesn't alias.
3977 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3978 C++.
3979 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3980 (keyword_begins_type_specifier): Add RID_CHAR8.
3981 * c-common.h (rid): Add RID_CHAR8.
3982 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3983 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3984 Define char8_type_node and char8_array_type_node.
3985 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3986 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3987 (c_cpp_builtins): Predefine __cpp_char8_t.
3988 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3989 CPP_UTF8STRING.
3990 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3991 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3992 targeting C++2a.
3993 * c.opt: Add the -fchar8_t command line option.
3994
23db6ced
MS
39952019-01-14 Martin Sebor <msebor@redhat.com>
3996
3997 PR target/88638
3998 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3999 and issue errors if it fails.
4000 * c-common.h (valid_format_string_type_p): Declare.
4001 * c-format.c (valid_stringptr_type_p): Rename...
4002 (valid_format_string_type_p): ...to this and make extern.
4003 (handle_format_arg_attribute): Adjust to new name.
4004 (check_format_string): Same.
4005
234c3818
L
40062019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4007
4008 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4009 Replace "may may" with "may" in warning message.
4010
d8fcab68
JJ
40112019-01-07 Jakub Jelinek <jakub@redhat.com>
4012
4013 PR c++/85052
4014 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4015 (c_build_vec_convert): Declare.
4016 * c-common.c (c_build_vec_convert): New function.
4017
29d24852
MS
40182019-01-04 Martin Sebor <msebor@redhat.com>
4019
4020 PR c/88546
4021 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4022 Handle C++ empty throw specification and C11 _Noreturn.
4023 (has_attribute): Also handle C11 _Noreturn.
4024
9069a4c9
MS
40252019-01-04 Martin Sebor <msebor@redhat.com>
4026
4027 PR c/88363
4028 * c-attribs.c (positional_argument): Also accept enumerated types.
4029
a5544970
JJ
40302019-01-01 Jakub Jelinek <jakub@redhat.com>
4031
4032 Update copyright years.
4033
da77eace
L
40342018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4035
4036 PR c/51628
4037 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4038 * c-warn.c (check_alignment_of_packed_member): New function.
4039 (check_address_of_packed_member): Likewise.
4040 (check_and_warn_address_of_packed_member): Likewise.
4041 (warn_for_address_or_pointer_of_packed_member): Likewise.
4042 * c.opt: Add -Wno-address-of-packed-member.
4043
573767d4
DM
40442018-12-20 David Malcolm <dmalcolm@redhat.com>
4045
4046 PR c++/87504
4047 * c-warn.c (get_outermost_macro_expansion): New function.
4048 (spelled_the_same_p): Use it to unwind the macro expansions, and
4049 compare the outermost macro in each nested expansion, rather than
4050 the innermost.
4051
a14feb3c
DM
40522018-12-19 David Malcolm <dmalcolm@redhat.com>
4053
4054 PR c++/87504
4055 * c-common.h (warn_tautological_cmp): Convert 1st param from
4056 location_t to const op_location_t &.
4057 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4058 when testing for INTEGER_CST.
4059 (warn_tautological_bitwise_comparison): Convert 1st param from
4060 location_t to const op_location_t &; use it to build a
4061 binary_op_rich_location, and use this.
4062 (spelled_the_same_p): New function.
4063 (warn_tautological_cmp): Convert 1st param from location_t to
4064 const op_location_t &. Warn for macro expansions if
4065 spelled_the_same_p. Use binary_op_rich_location.
4066
dfd7fdca
DM
40672018-12-19 David Malcolm <dmalcolm@redhat.com>
4068
4069 PR c++/43064
4070 PR c++/43486
4071 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4072 (verify_tree): Handle location wrappers.
4073 (c_common_truthvalue_conversion): Strip any location wrapper.
4074 Handle CONST_DECL.
4075 (fold_offsetof): Strip any location wrapper.
4076 (complete_array_type): Likewise for initial_value.
4077 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4078 index before checking for INTEGER_CST.
4079 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4080 print parentheses around location wrappers.
4081 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4082 before checking for INTEGER_CST.
4083 (warn_tautological_bitwise_comparison): Call
4084 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4085 before checking for INTEGER_CST.
4086 (readonly_error): Strip any location wrapper.
4087 (warn_array_subscript_with_type_char): Strip location wrappers
4088 before checking for INTEGER_CST. Use the location of the index if
4089 available.
4090
5c8b3702
JM
40912018-12-06 Jason Merrill <jason@redhat.com>
4092
4093 PR c++/88136 - -Wdeprecated-copy false positives
4094 * c.opt (Wdeprecated-copy-dtor): New.
4095 (Wdeprecated-copy): Move to -Wextra.
4096
673670da
MS
40972018-11-29 Martin Sebor <msebor@redhat.com>
4098
4099 PR c/88172
4100 PR testsuite/88208
4101 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4102 alignments to values less than the target requires.
4103 (has_attribute): For attribute aligned consider both the attribute
4104 and the alignment bits.
4105 * c-common.c (c_init_attributes): Optionally issue a warning for
4106 zero alignment.
4107
04864ec8
MS
41082018-11-28 Martin Sebor <msebor@redhat.com>
4109
4110 PR c/88065
4111 PR c/87297
4112 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4113 or destination is an error.
4114
ace83db0
JJ
41152018-11-28 Jakub Jelinek <jakub@redhat.com>
4116
4117 PR c++/88215
4118 * c-ubsan.c: Include langhooks.h.
4119 (ubsan_instrument_division): Change gcc_assert that main variants
4120 of op0 and op1 types are equal to gcc_checking_assert that the
4121 main variants are compatible types.
4122
da193a27
EB
41232018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4124
4125 * c-ada-spec.c: Include stringpool.h.
4126 (has_static_fields): Return false for incomplete types.
4127 (is_tagged_type): Likewise.
4128 (has_nontrivial_methods): Likewise.
4129 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4130 (struct overloaded_name_hash): New structure.
4131 (struct overloaded_name_hasher): Likewise.
4132 (overloaded_names): New global variable.
4133 (init_overloaded_names): New static function.
4134 (overloaded_name_p): New predicate.
4135 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4136 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4137 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4138 Remove always-true condition and dump forward types.
4139 (dump_ada_specs): Delete overloaded_names.
4140
98f08eb8
MS
41412018-11-20 Martin Sebor <msebor@redhat.com>
4142
4143 * c-attribs.c (type_for_vector_size): New function.
4144 (type_valid_for_vector_size): Same.
4145 (handle_vector_size_attribute): Move code to the functions above
4146 and call them.
4147 (validate_attribute, has_attribute): New functions.
4148 * c-common.h (has_attribute): Declare.
4149 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4150 * c-common.c (c_common_resword): Same.
4151
2674fa47
JM
41522018-11-16 Jason Merrill <jason@redhat.com>
4153
4154 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4155 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4156
258b3854
JJ
41572018-11-16 Jakub Jelinek <jakub@redhat.com>
4158
4159 PR middle-end/87854
4160 * c-common.c (fix_string_type): Reject string literals larger than
4161 TYPE_MAX_VALUE (ssizetype) bytes.
4162
1d249509
MS
41632018-11-15 Martin Sebor <msebor@redhat.com>
4164
4165 PR c++/87541
4166 PR c++/87542
4167 * c-attribs.c (positional_argument): New function.
4168 (handle_alloc_size_attribute): Use it and simplify.
4169 (handle_alloc_align_attribute): Same.
4170 (handle_assume_aligned_attribute): Same.
4171 (handle_nonnull_attribute): Same.
4172 * c-common.c (check_function_arguments): Pass fntype to
4173 check_function_format.
4174 * c-common.h (check_function_format): Add an argument.
4175 (PosArgFlags, positional_argument): Declare new type and function.
4176 * c-format.c (decode_format_attr): Add arguments.
4177 (check_format_string, get_constant): Same.
4178 (convert_format_name_to_system_name): Adjust.
4179
478dd60d
DM
41802018-11-15 David Malcolm <dmalcolm@redhat.com>
4181
4182 PR other/19165
4183 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4184
8cca0163
JJ
41852018-11-14 Jakub Jelinek <jakub@redhat.com>
4186
8ee09943
JJ
4187 P1236R1 - Signed integers are two's complement
4188 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4189 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4190 with in-range second operand well defined for -std=c++2a.
4191
8cca0163
JJ
4192 PR other/88007
4193 * c-common.c (parse_optimize_options): Allocate option string from
4194 opts_obstack rather than as GC memory. Move the allocation after
4195 warning for invalid option.
4196
620e594b
DM
41972018-11-13 David Malcolm <dmalcolm@redhat.com>
4198
4199 * c-common.c (c_get_substring_location): Update for renaming of
4200 get_source_location_for_substring to get_location_within_string.
4201 * c-lex.c: Replace "source_location" with "location_t".
4202 * c-opts.c: Likewise.
4203 * c-ppoutput.c: Likewise.
4204
f9731de3
MS
42052018-11-13 Martin Sebor <msebor@redhat.com>
4206
4207 PR middle-end/81824
4208 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4209 (handle_tls_model_attribute): Improve diagnostics.
4210
e4bd6d5e
JM
42112018-11-12 Jason Merrill <jason@redhat.com>
4212
a6bb6b07
JM
4213 * c-cppbuiltin.c (c_cpp_builtins): Define
4214 __cpp_impl_destroying_delete.
4215
e4bd6d5e
JM
4216 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4217 __cpp_conditional_explicit.
4218
79a2c428
MS
42192018-11-09 Martin Sebor <msebor@redhat.com>
4220
4221 PR middle-end/81824
4222 * c-attribs.c (handle_copy_attribute): New function.
4223
4c7bd361
MS
42242018-11-09 Martin Sebor <msebor@redhat.com>
4225
4226 PR c/87795
4227 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4228
28567c40
JJ
42292018-11-08 Jakub Jelinek <jakub@redhat.com>
4230
4231 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4232 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4233 enum omp_memory_order MEMORY_ORDER.
4234 (c_finish_omp_flush): Add MO argument.
4235 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4236 (c_finish_omp_for): Add FINAL_P argument.
4237 * c-omp.c: Include memmodel.h.
4238 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4239 OMP_TASKGROUP_CLAUSES to it.
4240 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4241 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4242 instead of OMP_ATOMIC_SEQ_CST.
4243 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4244 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4245 __atomic_thread_fence call with the given value.
4246 (check_omp_for_incr_expr): Formatting fixes.
4247 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4248 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4249 is not constant expression 1 or -1. Transform NE_EXPR loops
4250 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4251 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4252 loops too.
4253 (c_omp_split_clauses): Add support for combined
4254 #pragma omp parallel master and
4255 #pragma omp {,parallel }master taskloop{, simd} constructs.
4256 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4257 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4258 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4259 (c_omp_predetermined_sharing): Don't return
4260 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4261 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4262 PRAGMA_OMP_REQUIRES.
4263 * c-pragma.h (enum pragma_kind): Likewise.
4264 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4265 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4266
204839e7
DM
42672018-11-08 David Malcolm <dmalcolm@redhat.com>
4268
4269 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4270
d8010ee4
DM
42712018-11-08 David Malcolm <dmalcolm@redhat.com>
4272
4273 * c-format.c (local_cgraph_node_ptr_node): New variable.
4274 (gcc_dump_printf_char_table): Add entry for %C.
4275 (get_pointer_to_named_type): New function, taken from the handling
4276 code for "gimple *" from...
4277 (init_dynamic_diag_info): ...here. Add handling for
4278 "cgraph_node *".
4279 * c-format.h (T_CGRAPH_NODE): New.
4280
4be5c72c
JM
42812018-10-19 Jason Merrill <jason@redhat.com>
4282
4283 * c-cppbuiltin.c (c_cpp_builtins): Add
4284 __cpp_nontype_template_parameter_class.
4285
f3f6029d
NS
42862018-10-31 Nathan Sidwell <nathan@acm.org>
4287
ab5324fb
NS
4288 * c-opts.c (c_finish_options): Force command line macro
4289 location. Refactor to avoid repeating main debug hook.
4290 (push_command_line_include): Clarify comment.
4291
f3f6029d
NS
4292 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4293
91e3ec29
MS
42942018-10-30 Martin Sebor <msebor@redhat.com>
4295
4296 PR middle-end/87041
4297 * c-format.c (check_format_types): Avoid diagnosing null pointer
4298 arguments to printf-family of functions.
4299
b5ff4f5c
MP
43002018-10-30 Marek Polacek <polacek@redhat.com>
4301
4302 Implement P0892R2, explicit(bool).
4303 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4304
7e2de6df
DM
43052018-10-29 David Malcolm <dmalcolm@redhat.com>
4306
4307 * name-hint.h (name_hint::take_deferred): New member function.
4308
b2bf438c
DM
43092018-10-29 David Malcolm <dmalcolm@redhat.com>
4310
4311 PR c++/56856
4312 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4313 argument.
4314 (check_function_restrict): Rename param "argarray" to
4315 "unfolded_argarray", and make a copy named "argarray", calling
4316 fold_for_warn on each argument.
4317 (check_function_arguments): Add note about responsibility for
4318 folding the arguments.
4319
9f936c86
JM
43202018-10-17 Joseph Myers <joseph@codesourcery.com>
4321
4322 * c-common.c (flag_isoc2x): New variable.
4323 * c-common.h (clk_c): Update comment to reference C2X.
4324 (flag_isoc99, flag_isoc11): Update comments to reference future
4325 standard versions in general.
4326 (flag_isoc2x): Declare.
4327 * c-opts.c (set_std_c2x): New function.
4328 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4329 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4330 flag_isoc2x to 0.
4331 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4332
7a8a92c4
JM
43332018-10-17 Joseph Myers <joseph@codesourcery.com>
4334
4335 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4336 (std=iso9899:2018): Document C17 as published in 2018.
4337
4dc003ff
CL
43382018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4339
4340 PR c++/87364
4341 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4342
79371671
WW
43432018-10-11 Will Wray <wjwray@gmail.com>
4344
4345 PR c++/87364
4346 * c-pretty-print.h (pp_c_type_cast): Prototype.
4347 (pp_c_integer_constant): Likewise.
4348 * c-pretty-print.c (pp_c_type_cast): No longer static.
4349 (pp_c_integer_constant): Likewise.
4350 (pp_c_enumeration_constant): Fix loop termination when finding
4351 name of constant. No longer returns a value. Call
4352 pp_c_integer_constant.
4353 (c_pretty_printer::constant): Update for changes to
4354 pp_c_enumeration_constant.
4355
46c62690
JJ
43562018-10-11 Jakub Jelinek <jakub@redhat.com>
4357
4358 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4359 for no_unique_address.
4360
c24300ba
DM
43612018-10-09 David Malcolm <dmalcolm@redhat.com>
4362
4363 * c-common.c (c_option_controlling_cpp_error): Rename to...
4364 (c_option_controlling_cpp_diagnostic): ...this, and convert
4365 "reason" from int to enum.
4366 (c_cpp_error): Rename to...
4367 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4368 * c-common.h (c_cpp_error): Rename to...
4369 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4370 * c-opts.c (c_common_init_options): Update for renaming.
4371
8656dafa
RS
43722018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4373
4374 PR c/87286
4375 * c-common.c (vector_types_compatible_elements_p): Use
4376 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4377
8cff0652
VK
43782018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4379
4380 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4381 to generate constructor destructor priority warning.
4382 * c.opt (-Wprio-ctor-dtor): New option.
4383
bedf03a2
JM
43842018-10-01 Jason Merrill <jason@redhat.com>
4385
4386 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4387
6cc430c1
EB
43882018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4389
4390 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4391 (dump_ada_node): Add const keyword.
4392
87677ac7
ML
43932018-09-25 Martin Liska <mliska@suse.cz>
4394
4395 * c-common.c (c_common_truthvalue_conversion):
4396 Remove Pascal from documentation.
4397
518196cb
EB
43982018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4399
4400 * c-ada-spec.c: Include diagnostic.h.
4401 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4402
a599af84
MP
44032018-09-19 Marek Polacek <polacek@redhat.com>
4404
4405 * c.opt (Wclass-conversion): New.
4406
9c4a4b3c
DM
44072018-09-17 David Malcolm <dmalcolm@redhat.com>
4408
4409 * c-format.c (range_label_for_format_type_mismatch::get_text):
4410 Update for new param.
4411
c896ecfe
DM
44122018-09-17 David Malcolm <dmalcolm@redhat.com>
4413
4414 * c-format.c (format_warning_at_char): Update for introduction of
4415 format_string_diagnostic_t.
4416 (format_type_warning): Likewise.
4417
80c6d1f4
MJ
44182018-09-17 Martin Jambor <mjambor@suse.cz>
4419
4420 PR c/63886
4421 * c.opt (Wabsolute-value): New.
4422
6d900107
BE
44232018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4424
4425 * c-common.c (complete_flexible_array_elts): New helper function.
4426 * c-common.h (complete_flexible_array_elts): Declare.
4427
b5764229
BE
44282018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4429
4430 * c-common.c (braced_list_to_string): Remove eval parameter.
4431 Add some more checks. Always create zero-terminated STRING_CST.
4432 * c-common.h (braced_list_to_string): Adjust prototype.
4433
85204e23
DM
44342018-08-27 David Malcolm <dmalcolm@redhat.com>
4435
4436 PR 87091
4437 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4438 to a tri-state.
4439 (maybe_suggest_missing_token_insertion): Likewise.
4440 (maybe_add_include_fixit): Add param "override_location". If set,
4441 and source-printing is enabled, then override the rich_location's
4442 primary location with that of the insertion point for the fix-it
4443 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4444 * c-common.h (extern void maybe_add_include_fixit): Add bool
4445 param.
4446 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4447 for conversion of show_caret_p to a tri-state.
4448 * c-warn.c (warn_for_restrict): Likewise.
4449 * known-headers.cc
4450 (suggest_missing_header::~suggest_missing_header): Update call to
4451 maybe_add_include_fixit to suggest overriding the location, as it
4452 is for a note.
4453
3d78e008
ML
44542018-08-27 Martin Liska <mliska@suse.cz>
4455
4456 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4457 fndecl_built_in_p and remove check for FUNCTION_DECL if
4458 possible.
3d78e008
ML
4459 (check_builtin_function_arguments): Likewise.
4460 (reject_gcc_builtin): Likewise.
4461 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4462
b5be6d0c
MP
44632018-08-26 Marek Polacek <polacek@redhat.com>
4464
4465 PR c++/87029, Implement -Wredundant-move.
4466 * c.opt (Wredundant-move): New option.
4467
79ca9c35
MP
44682018-08-21 Marek Polacek <polacek@redhat.com>
4469
4470 PR c++/86981, Implement -Wpessimizing-move.
4471 * c.opt (Wpessimizing-move): New option.
4472
097f82ec
DM
44732018-08-20 David Malcolm <dmalcolm@redhat.com>
4474
4475 PR other/84889
4476 * c-attribs.c (common_handle_aligned_attribute): Add
4477 auto_diagnostic_group instance.
4478 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4479 * c-opts.c (c_common_post_options): Likewise.
4480 * c-warn.c (warn_logical_not_parentheses): Likewise.
4481 (warn_duplicated_cond_add_or_warn): Likewise.
4482 (warn_for_multistatement_macros): Likewise.
4483
3fb558b1
NS
44842018-08-20 Nathan Sidwell <nathan@acm.org>
4485
4486 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4487 access.
4488
800c0e98
NS
44892018-08-17 Nathan Sidwell <nathan@acm.org>
4490
4491 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4492 field.
4493 (laxy_hex_fp_value_count): Make unsigned.
4494 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4495 manipulate the macro.
4496 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4497 cpp_define_lazily.
4498
6f795a92
DM
44992018-08-17 David Malcolm <dmalcolm@redhat.com>
4500
4501 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4502 (gcc_dump_printf_length_specs): New.
4503 (gcc_dump_printf_flag_pairs): New.
4504 (gcc_dump_printf_flag_specs): New.
4505 (gcc_dump_printf_char_table): New.
4506 (format_types_orig): Add entry for "gcc_dump_printf".
4507 (init_dynamic_diag_info): Set up length_char_specs and
4508 conversion_specs for gcc_dump_printf_format_type.
4509 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4510
c5d725c0
NS
45112018-08-17 Nathan Sidwell <nathan@acm.org>
4512
10f04917
NS
4513 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4514
c5d725c0
NS
4515 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4516 * c-cppbuiltin.c: Likewise.
4517
c0c12356
ML
45182018-08-17 Martin Liska <mliska@suse.cz>
4519
4520 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4521 Ignore/Deprecated flag. Warning is done automatically for
4522 Deprecated flags.
c0c12356 4523
10fcc142
DM
45242018-08-16 David Malcolm <dmalcolm@redhat.com>
4525
4526 PR c++/70693
4527 * c-common.c (selftest::c_family_tests): Call
4528 selftest::c_indentation_c_tests.
4529 * c-common.h (selftest::c_indentation_c_tests): New decl.
4530 * c-indentation.c: Include "selftest.h".
4531 (next_tab_stop): Add "tab_width" param, rather than accessing
4532 cpp_opts.
4533 (get_visual_column): Likewise. Clarify comment. Bulletproof
4534 against reading past the end of the line.
4535 (get_first_nws_vis_column): Add "tab_width" param.
4536 (detect_intervening_unindent): Likewise.
4537 (should_warn_for_misleading_indentation): Read tab width from
4538 cpp_opts and pass around.
4539 (selftest::test_next_tab_stop): New test.
4540 (selftest::assert_get_visual_column_succeeds): New function.
4541 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4542 (selftest::assert_get_visual_column_fails): New function.
4543 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4544 (selftest::test_get_visual_column): New test.
4545 (selftest::c_indentation_c_tests): New function.
4546
3f6677f4
NS
45472018-08-16 Nathan Sidwell <nathan@acm.org>
4548
4549 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4550 (store_ada_macro): Likewise.
4551 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4552 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4553
96e6ae57
DM
45542018-08-15 David Malcolm <dmalcolm@redhat.com>
4555
4556 * c-format.c: Include "selftest-diagnostic.h" and
4557 "gcc-rich-location.h".
4558 (format_warning_at_char): Pass NULL for new label params of
4559 format_warning_va.
4560 (class indirection_suffix): New class.
4561 (class range_label_for_format_type_mismatch): New class.
4562 (format_type_warning): Move logic for generating "*" suffix to
4563 class indirection_suffix. Create "fmt_label" and "param_label"
4564 to show their types, and pass them to the
4565 format_warning_at_substring calls.
4566 (selftest::test_type_mismatch_range_labels): New test.
4567 (selftest::c_format_c_tests): Call it.
4568
23aa9f7c
MS
45692018-08-13 Martin Sebor <msebor@redhat.com>
4570
4571 PR tree-optimization/71625
4572 * c-common.c (braced_list_to_string): New function.
4573 * c-common.h (braced_list_to_string): Declare it.
4574
f10a9135
NS
45752018-08-08 Nathan Sidwell <nathan@acm.org>
4576
4577 * c-common.c (try_to_locate_new_include_inertion_point): Use
4578 linemap_included_from_linemap.
4579 * c-lex.c (fe_file_change): Use linemap_included_from.
4580 * c-ppoutput.c (pp_file_change): Likewise.
4581
8a45b051
MS
45822018-08-01 Martin Sebor <msebor@redhat.com>
4583
4584 PR tree-optimization/86650
ab20d992 4585 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4586 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4587 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4588 * c-format.h (T89_G): Update to be "gimple *" rather than
4589 "gcall *".
4590 (local_gcall_ptr_node): Rename...
4591 (local_gimple_ptr_node): ...to this.
4592
e540ccc0
DM
45932018-07-31 David Malcolm <dmalcolm@redhat.com>
4594
4595 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4596 table entries for gcc_diag_char_table, and the 'Z' entry from
4597 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4598 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4599 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4600 adding missing "Z" for this table. Remove erroneous "G" and "K"
4601 entries.
4602 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4603 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4604 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4605
425fc685
RE
46062018-07-31 Richard Earnshaw <rearnsha@arm.com>
4607
4608 * c-common.c (speculation_safe_resolve_call): New function.
4609 (speculation_safe_resolve_params): New function.
4610 (speculation_safe_resolve_return): New function.
4611 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4612 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4613 __HAVE_SPECULATION_SAFE_VALUE.
4614
181463c2
DM
46152018-07-20 David Malcolm <dmalcolm@redhat.com>
4616
4617 * c-common.c (c_cpp_error): Remove redundant "line_table"
4618 parameter from call to rich_location::set_range.
4619 (maybe_suggest_missing_token_insertion): Likewise.
4620
0d7f9065
MS
46212018-07-20 Martin Sebor <msebor@redhat.com>
4622
4623 PR middle-end/82063
ab20d992 4624 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4625
00abf86c
MS
46262018-07-20 Martin Sebor <msebor@redhat.com>
4627
4628 PR middle-end/82063
4629 * c-common.h (c_common_handle_option): Change function argument
4630 to HOST_WIDE_INT.
4631 * c-opts.c (c_common_init_options): Same.
4632 (c_common_handle_option): Same. Remove special handling of
4633 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4634 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4635 options to take a HOST_WIDE_INT argument and accept a byte-size
4636 suffix. Initialize.
4637 (-Wvla-larger-than): Same.
4638 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4639 (-Wno-vla-larger-than): Same.
4640
9b452033
JJ
46412018-07-12 Jakub Jelinek <jakub@redhat.com>
4642
4643 * c-attribs.c (c_common_attribute_table): Add
4644 "omp declare target implicit" attribute.
4645
cd0762f3
RB
46462018-07-12 Richard Biener <rguenther@suse.de>
4647
4648 PR c/86453
4649 * c-attribs.c (handle_packed_attribute): Do not build a variant
4650 type with TYPE_PACKED, instead ignore the attribute if we may
4651 not apply to the original type.
4652
0b27c3ed
JJ
46532018-07-10 Jakub Jelinek <jakub@redhat.com>
4654
4655 PR c++/86443
4656 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4657 to contain TREE_LIST for both the original class iterator and the
4658 "last" helper var.
4659
e730a0ef
EB
46602018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4661
4662 * c-ada-spec.c (to_ada_name): Remove index parameter.
4663 (pp_ada_tree_identifier): Likewise.
4664 (dump_ada_macros): Adjust call to to_ada_name.
4665 (struct overloaded_name_hash): Delete.
4666 (struct overloaded_name_hasher): Likewise.
4667 (overloaded_names): Likewise.
4668 (compute_overloading_index): Likewise.
4669 (dump_ada_decl_name): Do not call compute_overloading_index and
4670 adjust calls to pp_ada_tree_identifier.
4671 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4672 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4673 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4674 (dump_ada_enum_type): Remove type and display_convention parameters.
4675 Adjust calls to pp_ada_tree_identifier.
4676 (dump_ada_node): Likewise and for dump_ada_structure.
4677 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4678 and tidy up.
4679 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4680 syntax.
4681 (print_constructor): Adjust call to pp_ada_tree_identifier.
4682 (print_destructor): Likewise.
4683 (dump_ada_declaration): Switch to aspect syntax.
4684 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4685 parameter with nested parameter.
4686 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4687 (dump_ada_specs): Do not delete overloaded_names table.
4688
8de583fc
PB
46892018-07-06 Peter Bergner <bergner@linux.ibm.com>
4690
4691 PR target/86324
e730a0ef 4692 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4693 target hook.
4694
09cff37b
NS
46952018-07-05 Nathan Sidwell <nathan@acm.org>
4696
4697 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4698 NO_IMPLICIT_EXTERN_C.
4699
98086b2b
ML
47002018-06-28 Martin Liska <mliska@suse.cz>
4701
4702 * cppspec.c: Include opt-suggestions.h.
4703
ab20d992
JJ
47042018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4705 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4706 Cesar Philippidis <cesar@codesourcery.com>
4707
4708 * c-pragma.h (enum pragma_omp_clause): Add
4709 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4710 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4711
f41b7612
JJ
47122018-06-20 Jakub Jelinek <jakub@redhat.com>
4713
4714 PR c++/86210
4715 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4716 comment.
4717
4252ccd7
MS
47182018-06-18 Martin Sebor <msebor@redhat.com>
4719
4720 PR middle-end/85602
4721 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4722 nonstring.
4723
e197e64e
KV
47242018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4725
4726 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4727
34a7a230
JM
47282018-06-13 Jason Merrill <jason@redhat.com>
4729
5cef3733
JM
4730 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4731 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4732 handling.
4733
34a7a230
JM
4734 PR c++/86094 - wrong code with defaulted move ctor.
4735 * c-opts.c (c_common_post_options): Bump the current ABI version to
4736 13. Set warn_abi_version and flag_abi_compat_version to the current
4737 version rather than 0. Fix defaulting flag_abi_compat_version from
4738 warn_abi_version.
4739
bb0f14ae
MS
47402018-06-12 Martin Sebor <msebor@redhat.com>
4741
4742 PR c/85931
4743 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4744 sizeof source and destination yields the same value.
4745
3713f2e2
ML
47462018-06-12 Martin Liska <mliska@suse.cz>
4747
4748 * c.opt: Make MPX-related options as Deprecated.
4749
4af78ef8
DM
47502018-06-08 David Malcolm <dmalcolm@redhat.com>
4751
4752 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4753 rather than 0.
4754
31db0fe0
ML
47552018-06-08 Martin Liska <mliska@suse.cz>
4756
4757 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4758 for MPX (macros, related functions, fields in cgraph_node, ...).
4759 (handle_bnd_legacy): Likewise.
4760 (handle_bnd_instrument): Likewise.
4761 * c.opt: Likewise.
4762
fe16acf2
JJ
47632018-06-06 Jakub Jelinek <jakub@redhat.com>
4764
4765 PR c++/86068
4766 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4767 __cpp_transactional_memory to 201500 instead of 210500.
4768
4dbdb49b
JM
47692018-06-06 Jason Merrill <jason@redhat.com>
4770
4771 PR c++/85710 - ICE with -Wmemset-elt-size.
4772 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4773
f8ad043f
JM
47742018-06-01 Jason Merrill <jason@redhat.com>
4775
4776 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4777 201703.
4778
abc24d93
EB
47792018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4780
4781 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4782 declaration for a typedef independently of whether the declaration of
4783 the subtype is generated.
4784
d258f4aa
MS
47852018-05-31 Martin Sebor <msebor@redhat.com>
4786
4787 PR c/82063
4788 * c.opt (-Wno-alloc-size-larger-than): New option.
4789
b67b9225
DP
47902018-04-22 David Pagan <dave.pagan@oracle.com>
4791
4792 PR c/55976
4793 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4794 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4795 differentiate between default (no option), -Wreturn-type, and
4796 -Wno-return-type.
4797
04eb9c55
JM
47982018-05-29 Jason Merrill <jason@redhat.com>
4799
4800 * c.opt (Winit-list-lifetime): New flag.
4801
b0c31bc6
BE
48022018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4803
4804 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4805 splay_tree_delete_pointers.
4806
44284983
JJ
48072018-05-26 Jakub Jelinek <jakub@redhat.com>
4808
4809 PR bootstrap/85921
4810 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4811 noinline variable to workaround broken kernel headers.
4812
b46b715d
JM
48132018-05-18 Jason Merrill <jason@redhat.com>
4814
4815 * c.opt (Wdeprecated-copy): New flag.
4816
40659769
ML
48172018-05-17 Martin Liska <mliska@suse.cz>
4818
4819 * c-warn.c (overflow_warning): Do not use
4820 space in between 'G_' and '('.
4821
403962ea
JM
48222018-05-09 Jason Merrill <jason@redhat.com>
4823
4824 * c-common.c (valid_array_size_p): Add complain parameter.
4825 * c-common.h: ...which defaults to true.
4826
1c9ee609
JJ
48272018-05-11 Jakub Jelinek <jakub@redhat.com>
4828
4829 PR c/85696
4830 * c-omp.c (c_omp_predetermined_sharing): Return
4831 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4832
19916065
ML
48332018-05-11 Martin Liska <mliska@suse.cz>
4834
92a285c1 4835 PR sanitizer/85556
19916065
ML
4836 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4837 TREE_LIST values.
4838
79e7b1fe
JJ
48392018-05-10 Jakub Jelinek <jakub@redhat.com>
4840
4841 PR c++/85662
4842 * c-common.h (fold_offsetof_1): Removed.
4843 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4844 CTX argument defaulted to ERROR_MARK.
4845 * c-common.c (fold_offsetof_1): Renamed to ...
4846 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4847 argument, convert the pointer constant to TYPE and use size_binop
4848 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4849 a pointer type. Adjust recursive calls.
4850
86c12f76
EB
48512018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4852
4853 PR c++/85400
4854 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4855
ee336e84
NS
48562018-05-07 Nathan Sidwell <nathan@acm.org>
4857
4858 * c.opt (ffor-scope): Remove functionality, issue warning.
4859
6c072e21
NS
48602018-05-03 Nathan Sidwell <nathan@acm.org>
4861
4862 * c.opt (ffriend-injection): Remove functionality, issue warning.
4863
2cc7d3a7
DM
48642018-05-01 David Malcolm <dmalcolm@redhat.com>
4865
4866 PR c/84258
4867 * c-format.c (struct format_check_results): Add field
4868 "number_non_char".
4869 (check_format_info): Initialize it, and warn if encountered.
4870 (check_format_arg): Distinguish between wide char and
4871 everything else when detecting arrays of non-char.
4872
7761dfbe
DM
48732018-04-30 David Malcolm <dmalcolm@redhat.com>
4874
4875 * c-format.c (get_corrected_substring): Update for
4876 location_get_source_line returning a char_span. Use a char_span
4877 when handling the prefix of the correction.
4878 * c-indentation.c (get_visual_column): Update for
4879 location_get_source_line returning a char_span.
4880 (get_first_nws_vis_column): Likewise.
4881
62e98ef1
DM
48822018-03-29 David Malcolm <dmalcolm@redhat.com>
4883
4884 PR c++/84269
4885 * known-headers.cc (get_stdlib_header_for_name): Add various names
4886 from <assert.h>, <string.h>, and <memory.h>; add more names from
4887 <stdio.h>.
4888
a7dea617
JJ
48892018-03-27 Jakub Jelinek <jakub@redhat.com>
4890
4891 PR c++/85061
4892 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4893 get_base_address of the second operand is a VAR_P, rather than the
4894 operand itself, and use gcc_checking_assert instead of gcc_assert.
4895
889a3a30
MP
48962018-03-23 Marek Polacek <polacek@redhat.com>
4897
4898 PR c++/85045
4899 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4900 <case RDIV_EXPR>: Tweak condition.
4901
452154b9
EB
49022018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4903
4904 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4905
63ecb626
JJ
49062018-03-16 Jakub Jelinek <jakub@redhat.com>
4907
ce811fc4
JJ
4908 PR c/84909
4909 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4910 diagnostics.
4911
63ecb626
JJ
4912 PR c/84910
4913 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4914 diagnostics.
4915
a1295eec
RB
49162018-03-16 Richard Biener <rguenther@suse.de>
4917
4918 PR c/84873
4919 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4920 unshare the possibly folded expression.
4921
919674fb
RB
49222018-03-15 Richard Biener <rguenther@suse.de>
4923
4924 PR c/84873
4925 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4926
f99309b2
MS
49272018-03-13 Martin Sebor <msebor@redhat.com>
4928
4929 PR tree-optimization/84725
4930 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4931 with all three narrow character types, including their qualified forms.
4932
e9b9fa4c
MS
49332018-03-12 Martin Sebor <msebor@redhat.com>
4934
4935 PR tree-optimization/83456
ab20d992 4936 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4937 Restore checking of bounded built-in functions.
4938 (check_function_arguments): Also return the result
4939 of warn_for_restrict.
ab20d992
JJ
4940 * c-common.c (check_function_restrict): Return bool.
4941 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4942
0805d020
MP
49432018-03-02 Marek Polacek <polacek@redhat.com>
4944
4945 PR c++/84171
4946 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4947 is erroneous.
4948
ed2a2f08
TS
49492018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4950
4951 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4952 function".
4953
90abdde0
MP
49542018-03-01 Marek Polacek <polacek@redhat.com>
4955
4956 PR c++/84639
4957 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4958 alignment in computation.
4959
c6db43fa
EB
49602018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4961
4962 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4963 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4964
9e25c7ed
EB
49652018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4966
4967 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4968 (is_char_array): Take a type instead of a declaration.
4969 (dump_ada_array_type): Likewise.
4970 (is_simple_enum): Minor tweak.
4971 (dump_ada_enum_type): New function extracted from...
4972 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4973 <INTEGER_TYPE>: Remove unreachable code.
4974 <RECORD_TYPE>: Likewise. Minor tweaks.
4975 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4976 <ENUMERAL_TYPE>: New case.
4977 <RECORD_TYPE>: Factor out common code.
4978 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4979 Minor tweaks. Deal with enumeral types.
4980 (dump_ada_structure): Minor tweaks.
4981
09de3550
EB
49822018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4983
4984 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4985 address for incomplete structures.
4986 (dump_forward_type): Do not bail out for incomplete structures.
4987 (dump_ada_declaration): Do not special-case incomplete structures
4988 for subtypes. Dump them as null records for types.
4989
095d8d4b
EB
49902018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4991
4992 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4993 (is_char_array): Fix formatting.
4994 (dump_template_types): Likewise.
4995 (dump_generic_ada_node): Rename into...
4996 (dump_ada_node): ...this.
4997 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4998 incomplete structures and not for empty structures. Do not use it
4999 when forward declarations are needed.
5000 (dump_forward_type): New function.
5001 (dump_nested_types): Remove FORWARD parameter. Do not consider
5002 TREE_VISITED and do not generate a forward declaration. Only dump
5003 original nested types for nested declaration.
5004 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5005 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5006 <RECORD_TYPE>: Do not consider TREE_VISITED.
5007 (dump_ada_declaration): Use booleans and fix formatting throughout.
5008 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5009 Call dump_forward_type instead of dump_nested_types for a typedef.
5010 Remove superfluous check and adjust call to dump_nested_types.
5011 <POINTER_TYPE>: Call dump_forward_type and fall through.
5012 (dump_ada_struct_decl): Rename into...
5013 (dump_ada_structure): ...this. Do not special-case empty structures.
5014
d4cfd486
MS
50152018-02-27 Martin Sebor <msebor@redhat.com>
5016
5017 PR c++/83871
5018 * c.opt (-Wmissing-attributes): New option.
5019
b22dbd03
ML
50202018-02-21 Martin Liska <mliska@suse.cz>
5021
5022 * c.opt (Wcatch-value=): Add IntegerRange.
5023
883dfe2a
JM
50242018-02-15 Jason Merrill <jason@redhat.com>
5025
5026 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5027
0444aa9c
NS
50282018-02-09 Nathan Sidwell <nathan@acm.org>
5029
5030 PR c/84293
5031 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5032 arg.
5033 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5034 arg. Adjust.
5035
cea71f0a
MS
50362018-02-09 Martin Sebor <msebor@redhat.com>
5037
5038 PR lto/84212
5039 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5040 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5041 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5042 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5043 (-Wuninitialized): Same.
5044
8c8b7be5
EB
50452018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5046
5047 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5048 keyword for components.
5049
7c30b12a
PC
50502018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5051
5052 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5053
eece7fe5
JK
50542018-02-02 Julia Koval <julia.koval@intel.com>
5055
5056 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5057
7d07a93a
MP
50582018-01-29 Marek Polacek <polacek@redhat.com>
5059
5060 PR c/83966
5061 * c-format.c (check_function_format): Check current_function_decl.
5062
53723269
JJ
50632018-01-27 Jakub Jelinek <jakub@redhat.com>
5064
5065 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5066 argument.
5067 (LAZY_HEX_FP_VALUES_CNT): Define.
5068 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5069 values rather than just 12.
5070 (builtin_define_with_hex_fp_value): Likewise.
5071
7365279f
BK
50722018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5073
92a285c1
ML
5074 PR other/70268
5075 * c.opt (-fmacro-prefix-map): New option.
5076 * c-opts.c (c_common_handle_option): Handle it.
5077 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5078 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5079
bb9869d5
DM
50802018-01-17 David Malcolm <dmalcolm@redhat.com>
5081
5082 PR c++/83814
5083 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5084
68dc87c3
EB
50852018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5086
5087 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5088 Skip 'f' and 'F' characters if it is true.
5089 (store_ada_macro): Minor tweak.
5090 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5091 <CPP_WSTRING>: Likewise.
5092 <CPP_STRING>: Output '&' in the buffer if not the first string.
5093 <CPP_NUMBER>: Adjust calls to dump_number.
5094
9a004410
DM
50952018-01-10 David Malcolm <dmalcolm@redhat.com>
5096
5097 PR c++/43486
5098 * c-common.c: Include "selftest.h".
5099 (get_atomic_generic_size): Perform the test for integral type
5100 before the range test for any integer constant, fixing indentation
5101 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5102 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5103 (selftest::test_fold_for_warn): New function.
5104 (selftest::c_common_c_tests): New function.
5105 (selftest::c_family_tests): Call it, and
5106 selftest::c_pretty_print_c_tests.
5107 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5108 * c-format.c (check_format_arg): Convert VAR_P check to a
5109 fold_for_warn.
5110 * c-pretty-print.c: Include "selftest.h".
5111 (pp_c_cast_expression): Don't print casts for location wrappers.
5112 (selftest::assert_c_pretty_printer_output): New function.
5113 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5114 (selftest::test_location_wrappers): New function.
5115 (selftest::c_pretty_print_c_tests): New function.
5116 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5117
5c0caeb3
RS
51182018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5119 Alan Hayward <alan.hayward@arm.com>
5120 David Sherwood <david.sherwood@arm.com>
5121
5122 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5123
73a699ae
RS
51242018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5125 Alan Hayward <alan.hayward@arm.com>
5126 David Sherwood <david.sherwood@arm.com>
5127
5128 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5129 as polynomial.
5130
928686b1
RS
51312018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5132 Alan Hayward <alan.hayward@arm.com>
5133 David Sherwood <david.sherwood@arm.com>
5134
5135 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5136 (convert_vector_to_array_for_subscript): Handle polynomial
5137 TYPE_VECTOR_SUBPARTS.
5138 (c_common_type_for_mode): Check valid_vector_subparts_p.
5139 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5140 VECTOR_CST_NELTS.
5141
85ec4feb
JJ
51422018-01-03 Jakub Jelinek <jakub@redhat.com>
5143
5144 Update copyright years.
5145
170a8bd6 51462017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5147 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5148
5149 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5150 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5151
ab20d992 51522017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5153
5154 PR debug/83527
5155 PR debug/83419
5156 * c-semantics.c (only_debug_stmts_after_p): New.
5157 (pop_stmt_list): Clear side effects in debug-only stmt list.
5158 Check for single nondebug stmt followed by debug stmts only.
5159
c12d20d4
AO
51602017-12-21 Alexandre Oliva <aoliva@redhat.com>
5161
5162 PR debug/83419
5163 * c-semantics.c (pop_stmt_list): Propagate side effects from
5164 single nondebug stmt to container list.
5165
01512446
JJ
51662017-12-19 Jakub Jelinek <jakub@redhat.com>
5167
5168 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5169 conditions with typical order conditions.
5170
82cfbd01
MP
51712017-12-18 Marek Polacek <polacek@redhat.com>
5172
5173 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5174 not in effect.
5175
99da11ec
MS
51762017-12-17 Martin Sebor <msebor@redhat.com>
5177
5178 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5179 an error for attribute warn_if_not_aligned.
5180
cc8bea0a
MS
51812017-12-16 Martin Sebor <msebor@redhat.com>
5182
5183 PR tree-optimization/78918
5184 * c-common.c (check_function_restrict): Avoid checking built-ins.
5185 * c.opt (-Wrestrict): Include in -Wall.
5186
4849deb1
JJ
51872017-12-15 Jakub Jelinek <jakub@redhat.com>
5188
5189 * c-attribs.c (c_common_attribute_table,
5190 c_common_format_attribute_table): Swap affects_type_identity
5191 and handler fields, adjust comments.
5192
c65e18d3
BE
51932017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5194
5195 * c.opt (Wcast-function-type): New warning option.
5196 * c-lex.c (get_fileinfo): Avoid warning.
5197 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5198
2004617a
QZ
51992017-12-14 Qing Zhao <qing.zhao@oracle.com>
5200
7365279f 5201 PR middle_end/79538
2004617a
QZ
5202 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5203 Adjust the size of buf1 and buf2, add a new buf to avoid
5204 format-overflow warning.
5205
ab20d992 52062017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5207
5208 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5209 subsequent statement list.
5210
5d9ae53d
MS
52112017-12-07 Martin Sebor <msebor@redhat.com>
5212
5213 PR c/81544
5214 PR c/81566
5215 * c-attribs.c (attr_aligned_exclusions): New array.
5216 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5217 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5218 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5219 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5220 (attr_warn_unused_result_exclusions): Same.
5221 (handle_hot_attribute, handle_cold_attribute): Simplify.
5222 (handle_const_attribute): Warn on function returning void.
5223 (handle_pure_attribute): Same.
5224 (handle_aligned_attribute): Diagnose conflicting attribute
5225 specifications.
5226 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5227
c79144f8
DM
52282017-12-06 David Malcolm <dmalcolm@redhat.com>
5229
5230 PR c/83236
5231 * c-common.c (selftest::c_family_tests): Call
5232 selftest::c_spellcheck_cc_tests.
5233 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5234 * c-spellcheck.cc: Include "selftest.h".
5235 (name_reserved_for_implementation_p): New function.
5236 (should_suggest_as_macro_p): New function.
5237 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5238 should_suggest_as_macro_p and call it.
5239 (selftest::test_name_reserved_for_implementation_p): New function.
5240 (selftest::c_spellcheck_cc_tests): New function.
5241 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5242
613bc14f
DM
52432017-12-06 David Malcolm <dmalcolm@redhat.com>
5244
5245 * c-spellcheck.cc: New file, taken from macro-handling code in
5246 spellcheck-tree.c.
5247 * c-spellcheck.h: New file, taken from macro-handling code in
5248 spellcheck-tree.h.
5249
e76c7157
JJ
52502017-12-01 Jakub Jelinek <jakub@redhat.com>
5251
5252 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5253 attribute.
5254 (handle_simd_attribute): Don't check for "cilk simd function"
5255 attribute. Reindent, formatting changes.
5256
b0da4034
JK
52572017-11-30 Julia Koval <julia.koval@intel.com>
5258
5259 * c-common.h (inv_list): Remove.
5260
058f0b9e
JJ
52612017-11-28 Jakub Jelinek <jakub@redhat.com>
5262
5263 PR sanitizer/81275
5264 * c-common.c (c_switch_covers_all_cases_p_1,
5265 c_switch_covers_all_cases_p): New functions.
5266 * c-common.h (c_switch_covers_all_cases_p): Declare.
5267
5e9d6aa4 52682017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5269 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5270
5271 * array-notation-common.c: Delete.
5272 * c-cilkplus.c: Ditto.
5273 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5274 * c-common.def (ARRAY_NOTATION_REF): Remove.
5275 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5276 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5277 c_validate_cilk_plus_loop, cilkplus_an_parts,
5278 cilk_ignorable_spawn_rhs_op,
5279 cilk_recognize_spawn): Remove.
5280 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5281 * c-omp.c: Remove CILK_SIMD check.
5282 * c-pragma.c: Ditto.
5283 * c-pragma.h: Remove CILK related pragmas.
5284 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5285 ARRAY_NOTATION_REF condition.
5286 (c_pretty_printer::expression): Ditto.
5287 * c.opt (fcilkplus): Remove.
5288 * cilk.c: Delete.
5289
1af4ebf5
MG
52902017-11-21 Marc Glisse <marc.glisse@inria.fr>
5291
5292 * c-pretty-print.c (pp_c_additive_expression,
5293 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5294
d44ed508
JJ
52952017-11-21 Jakub Jelinek <jakub@redhat.com>
5296
7d2f0f9b
JJ
5297 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5298
d44ed508
JJ
5299 PR c++/83059
5300 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5301 instead of tree_to_uhwi, formatting fix.
5302
26edace6
DM
53032017-11-20 David Malcolm <dmalcolm@redhat.com>
5304
5305 PR c/81404
5306 * known-headers.cc: New file, based on material from c/c-decl.c.
5307 (suggest_missing_header): Copied as-is.
5308 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5309 heavily edited to add C++ support. Add some knowledge about
5310 <limits.h>, <stdint.h>, and <wchar.h>.
5311 * known-headers.h: Likewise.
5312
6c7a259b
DM
53132017-11-20 David Malcolm <dmalcolm@redhat.com>
5314
5315 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5316 (lookup_name_fuzzy): Likewise. Convert return type from
5317 const char * to name_hint. Add location_t param.
5318 * name-hint.h: New header.
5319
f9c59f7e
JJ
53202017-11-19 Jakub Jelinek <jakub@redhat.com>
5321
5322 PR c/66618
5323 PR c/69960
5324 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5325
1e39313a
JM
53262017-11-16 Joseph Myers <joseph@codesourcery.com>
5327
5328 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5329 expected publication date of C17.
5330 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5331
3ca0dc60
JM
53322017-11-15 Joseph Myers <joseph@codesourcery.com>
5333
5334 PR c/81156
5335 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5336 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5337
025d57f0
MS
53382017-11-10 Martin Sebor <msebor@redhat.com>
5339
5340 PR c/81117
5341 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5342 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5343 * c.opt (-Wstringop-truncation): New option.
5344
1b6fa695
ML
53452017-11-06 Martin Liska <mliska@suse.cz>
5346
5347 PR middle-end/82404
5348 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5349 FE.
5350 * c.opt: Set default value of warn_return_type.
5351
64a5912c
DM
53522017-10-31 David Malcolm <dmalcolm@redhat.com>
5353
5354 * c-common.c (binary_op_error): Update for renaming of
5355 error_at_rich_loc.
5356 (c_parse_error): Likewise.
5357 * c-warn.c (warn_logical_not_parentheses): Likewise for
5358 renaming of inform_at_rich_loc.
5359 (warn_for_restrict): Likewise for renaming of
5360 warning_at_rich_loc_n.
5361
c76dc9c3
JM
53622017-10-30 Joseph Myers <joseph@codesourcery.com>
5363
5364 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5365 * c-opts.c (set_std_c17): New function.
5366 (c_common_init_options): Use gnu17 as default C version.
5367 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5368
ee5fd23a
MM
53692017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5370
5371 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5372 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5373 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5374 __FP_FAST_FMA<N>X.
5375
d1047465
MP
53762017-10-23 Marek Polacek <polacek@redhat.com>
5377
5378 PR c/82681
5379 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5380
9e878cf1
EB
53812017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5382
5383 * c-common.c (check_builtin_function_arguments): Also check arguments
5384 of __builtin_alloca_with_align_and_max.
5385
89b6abbb
DM
53862017-10-17 David Malcolm <dmalcolm@redhat.com>
5387
5388 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5389 rather than NULL to format_warning_va.
5390 (check_format_types): Likewise when calling format_type_warning.
5391 Remove code to extract source_ranges and source_range * in favor
5392 of just a location_t.
5393 (format_type_warning): Convert source_range * param to a
5394 location_t.
5395
39382c09
JJ
53962017-10-13 Jakub Jelinek <jakub@redhat.com>
5397
5398 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5399 [LR]SHIFT_EXPR.
5400
62e1c678
DM
54012017-10-12 David Malcolm <dmalcolm@redhat.com>
5402
5403 * c-common.c (enum missing_token_insertion_kind): New enum.
5404 (get_missing_token_insertion_kind): New function.
5405 (maybe_suggest_missing_token_insertion): New function.
5406 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5407
b90c9338
NS
54082017-10-11 Nathan Sidwell <nathan@acm.org>
5409
5410 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5411 (c_common_handle_option): Update incpath_kind names.
5412
3a266bcd
ML
54132017-10-11 Martin Liska <mliska@suse.cz>
5414
5415 PR sanitizer/82490
5416 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5417 Wattributes warning.
5418
8e6cdc90
RS
54192017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5420
5421 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5422 operating on trees as wide_ints.
5423 * c-common.c (pointer_int_sum): Likewise.
5424 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5425 * c-warn.c (match_case_to_enum_1): Likewise.
5426 (c_do_switch_warnings): Likewise.
5427 (maybe_warn_shift_overflow): Likewise.
5428
802b38c9
JJ
54292017-10-10 Jakub Jelinek <jakub@redhat.com>
5430
5431 PR c/82437
5432 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5433 instead of wide_int::from.
5434
4e34b338
JJ
54352017-10-06 Jakub Jelinek <jakub@redhat.com>
5436
5437 PR c/82437
5438 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5439 using to_widest use wide_int with the larger of the two precisions.
5440
4bc4b2b4
BE
54412017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5442
5443 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5444 functions.
5445
a1488398
RS
54462017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5447
5448 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5449 when combining the original unconverted comparison operands.
5450
01c9fb68
JJ
54512017-09-29 Jakub Jelinek <jakub@redhat.com>
5452
5453 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5454 attribute.
5455
6e3e8419
EB
54562017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5457
5458 * c-ada-spec.c (to_ada_name): Add index parameter.
5459 (pp_ada_tree_identifier): Likewise.
5460 (dump_ada_macros): Adjust call to to_ada_name.
5461 (struct overloaded_name_hash): New type.
5462 (struct overloaded_name_hasher): Likewise.
5463 (overloaded_names): New hash table.
5464 (compute_overloading_index): New function.
5465 (dump_ada_decl_name): Call it and pass the result to
5466 pp_ada_tree_identifier.
5467 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5468 (dump_ada_function_declaration): Likewise.
5469 (dump_generic_ada_node): Likewise.
5470 (print_constructor): Likewise.
5471 (print_destructor): Likewise.
5472 (dump_ada_specs): Delete overloaded_names table.
5473
79310774
EB
54742017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5475
5476 * c-ada-spec.c (max_ada_macros): Move around.
5477 (store_ada_macro_index): Likewise.
5478 (source_file): Rename into...
5479 (macro_source_file): ...this.
5480 (count_ada_macro): Move around.
5481 (store_ada_macro): Likewise.
5482 (compare_macro): Likewise.
5483 (print_ada_macros): Merge in...
5484 (dump_ada_macros): ...this.
5485 (source_file_base): Rename into...
5486 (current_source_file): ...this.
5487 (print_comment): Move around.
5488 (dump_ada_nodes): Call dump_ada_declaration directly.
5489 (struct with): Change type of limited field to bool.
5490 (append_withs): Change type of limited_access parameter to bool.
5491 (pp_ada_tree_identifie): Likewise.
5492 (dump_ada_decl_nam): Likewise.
5493 (dump_generic_ada_node): Likewise. Do not print the return type.
5494 (to_ada_name): Change type of space_found parameter to bool.
5495 (dump_ada_function_declaration): Return void and change type of
5496 parameters to bool. Also print the return type for a function.
5497 (print_ada_methods): Rename into...
5498 (dump_ada_methods): ...this.
5499 (print_ada_declaration): Rename into ...
5500 (dump_ada_declaration): ...this. Do not print the return type.
5501 (print_ada_struct_decl): Rename into...
5502 (dump_ada_struct_decl): ...this.
5503
7d386d45
JJ
55042017-09-29 Jakub Jelinek <jakub@redhat.com>
5505
5506 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5507 rather than DECL_INITIAL.
5508 (common_handle_aligned_attribute): Likewise.
5509
ab20d992 55102017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5511
5512 * c.opt (gen-decls): Add RejectNegative.
5513
026a79f7
AS
55142017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5515 Jakub Jelinek <jakub@redhat.com>
5516
5517 Add support for -std=c++2a.
5518 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5519 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5520 * c-opts.c (set_std_cxx2a): New.
5521 (c_common_handle_option): Set options when -std=c++2a is enabled.
5522 (c_common_post_options): Adjust comments.
5523 (set_std_cxx14, set_std_cxx17): Likewise.
5524
4a8ca690
EB
55252017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5526
5527 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5528 message for non-uniform endianness and issue a warning in C++.
5529
7b936140
JJ
55302017-09-15 Jakub Jelinek <jakub@redhat.com>
5531
5532 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5533 (Wc++17-compat): Change from undocumented alias to option.
5534 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5535 change C++1z to C++17 in description.
5536 (std=c++1z, std=gnu++1z): Change from option to undocumented
5537 deprecated alias.
5538 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5539 Adjust description.
5540 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5541 * c-opts.c (set_std_cxx1z): Rename to ...
5542 (set_std_cxx17): ... this.
5543 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5544 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5545 caller.
7b936140
JJ
5546 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5547 comments.
5548
12263f13
L
55492017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5550
5551 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5552 function alignment if warn_if_not_aligned_p is true.
5553
6836632e
NS
55542017-09-12 Nathan Sidwell <nathan@acm.org>
5555
5556 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5557 resort_sorted_fields): Move to c/c-decl.c.
5558 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5559 (struct sorted_fields_type): Move to c/c-lang.h.
5560
019bf9ad
JW
55612017-09-09 Jonathan Wakely <jwakely@redhat.com>
5562
5563 PR c++/81852
5564 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5565
bc7fe952
MP
55662017-09-04 Marek Polacek <polacek@redhat.com>
5567
5568 PR c/81783
5569 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5570 (warn_tautological_cmp): Call it.
5571
ab20d992 55722017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5573
5574 * c-opts.c (c_common_finish): Write dependency information even if
5575 there are errors.
5576
d2e05fcb
JJ
55772017-09-01 Jakub Jelinek <jakub@redhat.com>
5578
5579 PR c/81887
5580 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5581 (omp_pragmas_simd): ... here.
5582 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5583 create new clauses list containing just simd clause.
5584
18e2a8b8
RS
55852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5586 Alan Hayward <alan.hayward@arm.com>
5587 David Sherwood <david.sherwood@arm.com>
5588
5589 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5590 into scalar_mode_supported_p call.
5591 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5592
16d22000
RS
55932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5594 Alan Hayward <alan.hayward@arm.com>
5595 David Sherwood <david.sherwood@arm.com>
5596
5597 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5598 for the mode iterator.
5599
b397965c
RS
56002017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5601 Alan Hayward <alan.hayward@arm.com>
5602 David Sherwood <david.sherwood@arm.com>
5603
5604 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5605 * c-common.c (c_build_vec_perm_expr): Likewise.
5606
357b7604
RS
56072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5608 Alan Hayward <alan.hayward@arm.com>
5609 David Sherwood <david.sherwood@arm.com>
5610
5611 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5612
e05c94ba
RS
56132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5614 Alan Hayward <alan.hayward@arm.com>
5615 David Sherwood <david.sherwood@arm.com>
5616
5617 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5618 before calling targetm.addr_space.valid_pointer_mode.
5619
5c20c4af
RS
56202017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5621 Alan Hayward <alan.hayward@arm.com>
5622 David Sherwood <david.sherwood@arm.com>
5623
5624 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5625
c94843d2 56262017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5627 Alan Hayward <alan.hayward@arm.com>
5628 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5629
5630 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5631 iterators.
5632 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5633
4e10a5a7
RS
56342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5635 Alan Hayward <alan.hayward@arm.com>
5636 David Sherwood <david.sherwood@arm.com>
5637
5638 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5639 case statements.
5640
130fcab0
ML
56412017-08-29 Martin Liska <mliska@suse.cz>
5642
5643 PR other/39851
5644 * c-common.c (parse_optimize_options): Add argument to function
5645 call.
5646 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5647
14e18d71
DM
56482017-08-24 David Malcolm <dmalcolm@redhat.com>
5649
5650 * c-lex.c (interpret_float): Use token location
5651 when building an EXCESS_PRECISION_EXPR.
5652
2f687306
DM
56532017-08-21 David Malcolm <dmalcolm@redhat.com>
5654
5655 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5656 it to check_function_format.
5657 * c-common.h (check_function_arguments): Add vec<location_t> *
5658 param.
5659 (check_function_format): Likewise.
5660 * c-format.c (struct format_check_context): Add field "arglocs".
5661 (check_function_format): Add param "arglocs"; pass it to
5662 check_format_info.
ab20d992 5663 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5664 new field of format_ctx.
5665 (check_format_arg): Pass format_ctx->arglocs to new param of
5666 check_format_info_main.
5667 (class argument_parser): New field "arglocs".
5668 (argument_parser::argument_parser): Add "arglocs_" param and use
5669 it to initialize new field.
5670 (argument_parser::check_argument_type): Pass new arglocs field to
5671 check_format_types.
5672 (check_format_info_main): Add param "arglocs", and use it when
5673 constructing arg_parser.
5674 (check_format_types): Add param "arglocs"; use it if non-NULL when
5675 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5676
00aa1fa2
L
56772017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5678
5679 PR c/53037
5680 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5681 (c_common_attribute_table): Add warn_if_not_aligned.
5682 (handle_aligned_attribute): Renamed to ...
5683 (common_handle_aligned_attribute): Remove argument, name, and add
5684 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5685 (handle_aligned_attribute): New.
5686 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5687
27be025d
MS
56882017-08-14 Martin Sebor <msebor@redhat.com>
5689
5690 PR c/81117
5691 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5692 (handle_nonstring_attribute): New function.
5693
da67acb9
MS
56942017-08-14 Martin Sebor <msebor@redhat.com>
5695
5696 PR c/81117
5697 * c-format.h (T89_G): New macro.
5698 * c-format.c (local_gcall_ptr_node): New variable.
5699 (init_dynamic_diag_info): Initialize it.
5700
a8b522b4
ML
57012017-08-11 Martin Liska <mliska@suse.cz>
5702
5703 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5704 TARGET_SUPPORTS_ALIASES.
5705
32129a17
DM
57062017-08-10 David Malcolm <dmalcolm@redhat.com>
5707
5708 * c-common.c (c_parse_error): Add rich_location * param, using it
5709 rather implicitly using input_location.
5710 * c-common.h (c_parse_error): Add rich_location * param.
5711
30af3a2b
MP
57122017-08-09 Marek Polacek <polacek@redhat.com>
5713
5714 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5715 (c_common_truthvalue_conversion): Likewise.
5716 * c-omp.c (c_finish_omp_atomic): Likewise.
5717 * c-common.h (build_binary_op): Update declaration.
5718
314e6352
ML
57192017-08-08 Martin Liska <mliska@suse.cz>
5720
5721 * c-ada-spec.c: Include header files.
5722 * c-ubsan.c: Likewise.
5723 * c-warn.c: Likewise.
5724
56b5041c
JJ
57252017-08-07 Jakub Jelinek <jakub@redhat.com>
5726
5727 PR c/69389
5728 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5729
db440138
EB
57302017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5731
5732 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5733 (print_ada_methods): Likewise.
5734 (print_ada_declaration): Likewise.
5735
577eec56
ML
57362017-08-07 Martin Liska <mliska@suse.cz>
5737
5738 * array-notation-common.c: Add new includes.
5739 * c-format.c( handle_format_attribute): Canonicalize a format
5740 function name.
5741 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5742 attribute.
5743 * c-pretty-print.c: Add new include.
5744
b854df3c
EB
57452017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5746
5747 * c-ada-spec.c (has_static_fields): Look only into variables.
5748 (print_constructor): Add TYPE parameter and use it for the name.
5749 (print_destructor): Likewise.
5750 (print_ada_declaration): Adjust to new constructor/destructor names.
5751 Adjust calls to print_constructor and print_destructor.
5752 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5753 Look only into variables in the final loop.
5754
9f2cb25e
EB
57552017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5756
5757 * c-ada-spec.c (has_static_fields): Look only into fields.
5758 (dump_generic_ada_node): Small tweak.
5759 (dump_nested_types): Look only into fields.
5760 (print_ada_declaration): Look only into methods. Small tweak.
5761 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5762
f4bcd9eb
EB
57632017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5764
5765 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5766 (dump_ada_function_declaration): Likewise.
5767 (dump_generic_ada_node): Likewise.
5768 (print_ada_declaration): Add support for const-qualified variables.
5769
f34ebeb2
ML
57702017-07-31 Martin Liska <mliska@suse.cz>
5771
5772 PR sanitize/81530
5773 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5774 Guard condition with flag_sanitize_p also with current_function_decl
5775 non-null equality.
5776 (ubsan_maybe_instrument_reference_or_call): Likewise.
5777
218e5d04
UB
57782017-07-30 Uros Bizjak <ubizjak@gmail.com>
5779
5780 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5781
942047f2
EB
57822017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5783
5784 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5785 for enumeral types.
5786 (print_ada_declaration): Add missing guard for record types.
5787
a40ff0ae
JJ
57882017-07-27 Jakub Jelinek <jakub@redhat.com>
5789
5790 PR c/45784
5791 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5792 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5793 new COMPOUND_EXPRs around the rhs of the comparison.
5794
06bd22f6
MP
57952017-07-27 Marek Polacek <polacek@redhat.com>
5796
5797 PR c/81417
5798 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5799 the types.
5800
036ea399
JJ
58012017-07-27 Jakub Jelinek <jakub@redhat.com>
5802
5803 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5804 (handle_noipa_attribute): New function.
5805
417ca011
TD
58062017-07-07 Torsten Duwe <duwe@suse.de>
5807
5808 * c-attribs.c (c_common_attribute_table): Add entry for
5809 "patchable_function_entry".
5810
5aaa8fb4
NS
58112017-07-20 Nathan Sidwell <nathan@acm.org>
5812
5813 Remove TYPE_METHODS.
5814 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5815 dump_ada_template, print_ada_methods,
5816 print_ada_declaration): Member fns are on TYPE_FIELDS.
5817
ff22eb12
NS
58182017-07-18 Nathan Sidwell <nathan@acm.org>
5819
5820 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5821
eea77d1f
DM
58222017-07-14 David Malcolm <dmalcolm@redhat.com>
5823
5824 * c-common.c (try_to_locate_new_include_insertion_point): New
5825 function.
5826 (per_file_includes_t): New typedef.
5827 (added_includes_t): New typedef.
5828 (added_includes): New variable.
5829 (maybe_add_include_fixit): New function.
5830 * c-common.h (maybe_add_include_fixit): New decl.
5831
281ac396
MS
58322017-07-10 Martin Sebor <msebor@redhat.com>
5833
5834 PR other/81345
5835 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5836
b6f43128
DM
58372017-07-06 David Malcolm <dmalcolm@redhat.com>
5838
5839 * c-common.c (selftest::c_family_tests): New.
5840 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5841 (selftest::c_family_tests): New decl.
5842
efbf55b0
MP
58432017-07-04 Marek Polacek <polacek@redhat.com>
5844
5845 PR c/81231
5846 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5847 types.
5848
6c86bd88
MP
58492017-07-04 Marek Polacek <polacek@redhat.com>
5850
5851 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5852
17a7218b
ML
58532017-06-28 Martin Liska <mliska@suse.cz>
5854
5855 PR ipa/81128
5856 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5857 to a function declaration.
5858
63010089
ML
58592017-06-28 Martin Liska <mliska@suse.cz>
5860
5861 PR driver/79659
5862 * c.opt: Add IntegerRange to various options.
5863
3e2becc4
MP
58642017-06-26 Marek Polacek <polacek@redhat.com>
5865
5866 PR c/80116
5867 * c-common.h (warn_for_multistatement_macros): Declare.
5868 * c-warn.c: Include "c-family/c-indentation.h".
5869 (warn_for_multistatement_macros): New function.
5870 * c.opt (Wmultistatement-macros): New option.
5871 * c-indentation.c (guard_tinfo_to_string): No longer static.
5872 Change the parameter type to "enum rid". Handle RID_SWITCH.
5873 * c-indentation.h (guard_tinfo_to_string): Declare.
5874
2db9b7cd
MG
58752017-06-23 Marc Glisse <marc.glisse@inria.fr>
5876
5877 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5878
c3684b7b
MS
58792017-06-15 Martin Sebor <msebor@redhat.com>
5880
5881 PR c++/80560
5882 * c.opt (-Wclass-memaccess): New option.
5883
e72c4afd
BK
58842017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5885
5886 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5887
8a516588
MP
58882017-06-13 Marek Polacek <polacek@redhat.com>
5889
5890 PR objc/80949
5891 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5892 branches is null.
5893
45b2222a
ML
58942017-06-13 Martin Liska <mliska@suse.cz>
5895
5896 PR sanitize/78204
5897 * c-attribs.c (add_no_sanitize_value): New function.
5898 (handle_no_sanitize_attribute): Likewise.
5899 (handle_no_sanitize_address_attribute): Use the function.
5900 (handle_no_sanitize_thread_attribute): New function.
5901 (handle_no_address_safety_analysis_attribute): Use
5902 add_no_sanitize_value.
5903 (handle_no_sanitize_undefined_attribute): Likewise.
5904 * c-common.h: Declare new functions.
5905 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5906 (ubsan_instrument_shift): Likewise.
5907 (ubsan_instrument_bounds): Likewise.
5908 (ubsan_maybe_instrument_array_ref): Likewise.
5909 (ubsan_maybe_instrument_reference_or_call): Likewise.
5910
a01f151f
JM
59112017-06-11 Jason Merrill <jason@redhat.com>
5912
5913 * c-ada-spec.c, c-pragma.c: Use id_equal.
5914
3de4ac6d
MP
59152017-06-04 Marek Polacek <polacek@redhat.com>
5916
5917 PR c/80919
5918 * c-format.c (matching_type_p): Return false if any of the types
5919 requires structural equality.
5920
2474f48f
MS
59212017-06-02 Martin Sebor <msebor@redhat.com>
5922
5923 PR c/80892
5924 * c-warn.c (conversion_warning): Use -Wconversion for integer
5925 conversion and -Wfloat-conversion for floating one.
5926
40ffd95f
BE
59272017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5928
5929 * c.opt (Wsizeof-pointer-div): New warning option.
5930
3fa4634c
VR
59312017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5932
5933 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5934 (Wcatch-value=1): Enable by -Wall.
5935
f012c8ef
DM
59362017-05-30 David Malcolm <dmalcolm@redhat.com>
5937
5938 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5939 format_chars.
5940 * c.opt (fdiagnostics-show-template-tree): New option.
5941 (felide-type): New option.
5942
63dbcd13
VR
59432017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5944
5945 * c.opt (Wcatch-value=): New C++ warning flag.
5946
be136b5c
NS
59472017-05-24 Nathan Sidwell <nathan@acm.org>
5948
5949 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5950 const casts to avoid warning.
5951
3cd211af
MS
59522017-05-24 Martin Sebor <msebor@redhat.com>
5953
5954 PR c/80731
5955 * c-common.h (unsafe_conversion_p): Add a function argument.
5956 * c-common.c (unsafe_conversion_p): Same.
5957 Add type names and values to diagnostics.
5958 (scalar_to_vector): Adjust.
5959 * c-warn.c (constant_expression_error): Add a function argument.
5960 Add type names and values to diagnostics.
5961 (conversion_warning): Add a function argument.
5962 Add type names and values to diagnostics.
5963 (warnings_for_convert_and_check): Same.
5964
1ff7be5a
JM
59652017-05-19 Jason Merrill <jason@redhat.com>
5966
5967 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5968 enumerators.
5969
ff502317
BE
59702017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5971
5972 * c-format.c (locus): Move out of function scope,
5973 add GTY attribute.
5974
2a8a8d7b
NS
59752017-05-19 Nathan Sidwell <nathan@acm.org>
5976
5977 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5978 (c_common_parse_file): Remove class dump handling.
5979 (get_dump_info): Likewise.
5980
39aac208
RB
59812017-05-19 Richard Biener <rguenther@suse.de>
5982
5983 PR c++/80593
5984 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5985 to alias-set zero memory.
5986
6ecd2339
BE
59872017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5988
5989 * c-format.c (local_tree_type_node): Add GTY attribute.
5990
6574d78e
MP
59912017-05-18 Marek Polacek <polacek@redhat.com>
5992
5993 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5994 (c_common_fixed_point_type_for_size): Likewise.
5995 (c_common_type_for_mode): Likewise.
5996 (shorten_compare): Likewise.
5997 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5998 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5999
e3455240
MP
60002017-05-18 Marek Polacek <polacek@redhat.com>
6001
6002 * c-common.c (self_promoting_args_p): Change the return type to bool.
6003 Use false/true instead of 0/1.
6004 * c-common.h (self_promoting_args_p): Update.
6005
3fa8871b
MP
60062017-05-17 Marek Polacek <polacek@redhat.com>
6007
6008 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6009 * c-warn.c: Likewise.
6010
b42cc3ca
VV
60112017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6012
6013 Implement new C++ intrinsics __is_assignable and __is_constructible.
6014 * c-common.c (__is_assignable, __is_constructible): New.
6015 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6016
1a817418
ML
60172017-05-17 Martin Liska <mliska@suse.cz>
6018
6019 * c-common.h: Introduce dump_flags_t type and
6020 use it instead of int type.
6021 * c-gimplify.c (c_genericize): Likewise.
6022 * c-opts.c: Likewise.
6023
b2fa0a8b
MP
60242017-05-17 Marek Polacek <polacek@redhat.com>
6025
6026 * c-common.c (c_save_expr): Remove.
6027 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6028 * c-common.h (c_save_expr): Remove declaration.
6029
31c2d57d
VR
60302017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6031
6032 PR c/35441
6033 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6034 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6035 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6036 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6037 RDIV_EXPR.
6038 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6039
684f84de
MP
60402017-05-09 Marek Polacek <polacek@redhat.com>
6041
6042 PR c/80525
6043 * c-warn.c (unwrap_c_maybe_const): New.
6044 (warn_logical_operator): Call it.
6045
641da50a
NS
60462017-05-09 Nathan Sidwell <nathan@acm.org>
6047
6048 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6049 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6050
631238ac
MS
60512017-05-08 Martin Sebor <msebor@redhat.com>
6052
6053 PR translation/80280
6054 * c-format.h (struct format_flag_spec): Add new member.
6055 (T89_T): New macro.
6056 * c-format.c (local_tree_type_node): New global.
6057 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6058 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6059 (strfmon_flag_specs): Likewise.
6060 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6061 with distinct quoting properties.
6062 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6063 (flag_chars_t::validate): Add argument and handle bad quoting.
6064 (check_format_info_main): Handle quoting problems.
6065 (init_dynamic_diag_info): Simplify.
6066
49f0c04c
JM
60672017-05-08 Jason Merrill <jason@redhat.com>
6068
6069 * c-opts.c (c_common_post_options): Update defaults for
6070 flag_abi_version and flag_abi_compat_version.
6071
56d35585
DM
60722017-05-05 David Malcolm <dmalcolm@redhat.com>
6073
6074 * c-common.c (c_cpp_error): Replace report_diagnostic
6075 with diagnostic_report_diagnostic.
6076
0f2c4a8f
MS
60772017-05-04 Martin Sebor <msebor@redhat.com>
6078
6079 PR translation/80280
6080 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6081 (handle_weakref_attribute): Same.
6082
6fe63fb4
NS
60832017-05-03 Nathan Sidwell <nathan@acm.org>
6084
6085 Canonicalize canonical type hashing
6086 * c-common.c (complete_array_type): Use type_hash_canon.
6087
815d9cc6
XR
60882017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6089
92a285c1 6090 PR c++/80038
815d9cc6
XR
6091 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6092 prototype.
6093 (cilk_install_body_pedigree_operations): Likewise.
6094 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6095 detatched.
6096 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6097 (cilk_install_body_pedigree_operations): Likewise.
6098 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6099 unwrapping.
6100
f8a36447
JJ
61012017-04-27 Jakub Jelinek <jakub@redhat.com>
6102
6103 PR c++/80534
6104 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6105 flag on non-aggregate element types.
6106
7c145456
BE
61072017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6108
6109 * c-common.c (c_type_hasher, type_hash_table): Remove.
6110 (c_common_get_alias_set): Remove unreachable code.
6111 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6112
c3cbcd45
VR
61132017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6114
6115 * c.opt (Wextra-semi): New C++ warning flag.
6116
8a59d466
JJ
61172017-04-20 Jakub Jelinek <jakub@redhat.com>
6118
6119 PR middle-end/80423
6120 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6121
8487c9a5
JJ
61222017-04-18 Jakub Jelinek <jakub@redhat.com>
6123
6124 PR middle-end/79788
6125 PR middle-end/80375
6126 * c-common.c (c_common_type_for_mode): Don't handle
6127 widest_*_literal_type_node here.
6128 c_common_signed_or_unsigned_type): Likewise.
6129 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6130 to *intTI_type_node or *intDI_type_node depending on whether
6131 TImode is supported by the target or not.
6132
3ee0fb02
ML
61332017-04-10 Martin Liska <mliska@suse.cz>
6134
6135 PR sanitizer/80350
6136 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6137 doing an UBSAN check.
6138
5764ee3c
JW
61392017-04-03 Jonathan Wakely <jwakely@redhat.com>
6140
6141 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6142
6f3af356
JJ
61432017-03-31 Jakub Jelinek <jakub@redhat.com>
6144
6145 PR c++/79572
6146 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6147 tree *.
6148 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6149 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6150 REFERENCE_TYPE.
6151
f6a7a9d5
DM
61522017-03-31 David Malcolm <dmalcolm@redhat.com>
6153
6154 PR documentation/78732
6155 * c.opt (Wendif-labels): Fix description to refer to
6156 #else rather than #elif.
6157
af88f557
JJ
61582017-03-31 Jakub Jelinek <jakub@redhat.com>
6159
6160 PR libstdc++/80251
6161 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6162 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6163
a9e4a1a5
JJ
61642017-03-27 Jakub Jelinek <jakub@redhat.com>
6165
6166 PR middle-end/80162
6167 * c-common.c (c_common_mark_addressable_vec): Don't set
6168 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6169
3f01b620
MS
61702017-03-21 Martin Sebor <msebor@redhat.com>
6171
6172 PR c++/79548
6173 * c-common.c (set_underlying_type): Mark type used only when
6174 original del is declared unused.
6175
2f6f187a
DM
61762017-03-10 David Malcolm <dmalcolm@redhat.com>
6177
6178 PR translation/79848
6179 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6180 "%qs".
6181
a02fa805
DM
61822017-03-10 David Malcolm <dmalcolm@redhat.com>
6183
6184 PR c/79921
6185 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6186 from inform's message, so that xgettext can locate it.
6187
822a132c
MP
61882017-03-09 Marek Polacek <polacek@redhat.com>
6189
6190 PR c++/79962
6191 PR c++/79984
6192 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6193 conversion to the attribute list.
6194
bba81f1c
ML
61952017-03-09 Martin Liska <mliska@suse.cz>
6196
6197 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6198
108154ff
JM
61992017-03-03 Jason Merrill <jason@redhat.com>
6200
6201 * c.opt (Wnoexcept-type): New.
6202
eb0e7c34
RB
62032017-03-02 Richard Biener <rguenther@suse.de>
6204
6205 PR c/79756
6206 * c-common.c (c_common_mark_addressable_vec): Look through
6207 C_MAYBE_CONST_EXPR.
6208
9453ba0a
ML
62092017-02-28 Martin Liska <mliska@suse.cz>
6210
6211 * c.opt: Replace space with tabular for options of <number>
6212 type.
6213
6a825afe
ML
62142017-02-28 Martin Liska <mliska@suse.cz>
6215
6216 * c.opt: Fix --help=option -Q for options which are of
6217 an enum type.
6218
4227c9ad
JJ
62192017-02-24 Jakub Jelinek <jakub@redhat.com>
6220
6221 PR c++/79588
6222 * c-common.c (check_function_restrict): New function.
6223 (check_function_arguments): Add FNDECL argument. Call
6224 check_function_restrict if -Wrestrict.
6225 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6226 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6227 * c-common.h (check_function_arguments): Add FNDECL argument.
6228 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6229
59909673
EB
62302017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6231
6232 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6233 treatment of parameters with pointer-to-tagged type and tidy up.
6234 (print_ada_methods): Remove the special treatment of C++ static member
6235 functions.
6236
54dcd526
ML
62372017-02-22 Martin Liska <mliska@suse.cz>
6238
6239 * c.opt: Replace inequality signs with square brackets
6240 for -Wnornalized.
6241
00bc9de3
JJ
62422017-02-21 Jakub Jelinek <jakub@redhat.com>
6243
6244 PR c++/79641
6245 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6246 preserve quals.
6247
97fcf744
JM
62482017-02-17 Joseph Myers <joseph@codesourcery.com>
6249
6250 * c-cppbuiltin.c (builtin_define_float_constants): Define
6251 __DECIMAL_DIG__ to the value for long double.
6252
c7545f1c
MP
62532017-02-15 Marek Polacek <polacek@redhat.com>
6254
6255 PR c/79515
6256 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6257 conversion has occured.
6258
c2e84327
DM
62592017-01-24 David Malcolm <dmalcolm@redhat.com>
6260
6261 * c-common.c (c_common_reswords): Add "__RTL".
6262 * c-common.h (enum rid): Add RID_RTL.
6263
2ebd93e1
MP
62642017-01-20 Marek Polacek <polacek@redhat.com>
6265
6266 PR c/64279
6267 * c-common.h (do_warn_duplicated_branches_r): Declare.
6268 * c-gimplify.c (c_genericize): Walk the function tree calling
6269 do_warn_duplicated_branches_r.
6270 * c-warn.c (expr_from_macro_expansion_r): New.
6271 (do_warn_duplicated_branches): New.
6272 (do_warn_duplicated_branches_r): New.
6273 * c.opt (Wduplicated-branches): New option.
6274
0d80ab91
DM
62752017-01-17 David Malcolm <dmalcolm@redhat.com>
6276
6277 PR c++/71497
6278 * c-indentation.c (warn_for_misleading_indentation): Use the past
6279 subjunctive in the note.
6280
7f991c36
AH
62812017-01-17 Aldy Hernandez <aldyh@redhat.com>
6282
6283 PR c/79116
6284 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6285 start type to integer_type.
6286
1c70261c
JJ
62872017-01-16 Jakub Jelinek <jakub@redhat.com>
6288
6289 PR driver/49726
6290 * c.opt (gen-decls): Add Driver flag.
6291
1ddca3f3
PC
62922017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6293
6294 Revert:
6295 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6296
6297 PR c++/71737
6298 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6299
7d2f3f1d
PC
63002017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6301
6302 PR c++/71737
6303 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6304
bce6f760
MS
63052017-01-12 Martin Sebor <msebor@redhat.com>
6306
6307 (-Wformat-overflow): ...to this.
6308
bf5fbf46
MS
63092017-01-11 Martin Sebor <msebor@redhat.com>
6310
6311 PR c/78768
6312 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6313 Also enable for LTO.
6314
e363df3f
JM
63152017-01-10 Jason Merrill <jason@redhat.com>
6316
6317 Implement P0195R2, C++17 variadic using.
6318 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6319
bd2c6270
JJ
63202017-01-09 Jakub Jelinek <jakub@redhat.com>
6321
6322 PR translation/79019
6323 PR translation/79020
6324 * c.opt (Wnormalized=): Fix typo in description.
6325
efcc8d38
MS
63262017-01-08 Martin Sebor <msebor@redhat.com>
6327
6328 PR middle-end/77708
6329 * c.opt (-Wformat-truncation): New option.
6330
ab20d992 63312017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6332
6333 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6334 value to unsigned short to fit in 4 hex digits without
6335 warnings.
6336
4e89adf9
EB
63372017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6338
6339 * c.opt (fsso-struct): Add 'native' value.
6340
cd445b54
ML
63412017-01-05 Martin Liska <mliska@suse.cz>
6342
6343 PR pch/78970
6344 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6345 header.
6346
a9342885
MP
63472017-01-04 Marek Polacek <polacek@redhat.com>
6348
6349 PR c++/64767
6350 * c.opt (Wpointer-compare): New option.
6351
fc73e60c
JJ
63522017-01-04 Jakub Jelinek <jakub@redhat.com>
6353
6354 PR driver/78957
6355 * c.opt (fsso-struct=): Add RejectNegative.
6356
cbe34bb5
JJ
63572017-01-01 Jakub Jelinek <jakub@redhat.com>
6358
6359 Update copyright years.
6360
d4a6c0ea
ML
63612016-12-29 Martin Liska <mliska@suse.cz>
6362
6363 PR c/78933
6364 * c.opt (strong-eval-order): Add RejectNegative keyword.
6365
67a5ad7c
JM
63662016-12-22 Jason Merrill <jason@redhat.com>
6367
6368 Implement P0522R0, matching of template template arguments.
6369 * c-cppbuiltin.c (c_cpp_builtins): Define
6370 __cpp_template_template_args.
6371
0dba7960
JJ
63722016-12-21 Jakub Jelinek <jakub@redhat.com>
6373
6374 PR bootstrap/78817
6375 * c-common.c (struct nonnull_arg_ctx): New type.
6376 (check_function_nonnull): Return bool instead of void. Use
6377 nonnull_arg_ctx as context rather than just location_t.
6378 (check_nonnull_arg): Adjust for the new context type, set
6379 warned_p to true if a warning has been diagnosed.
6380 (check_function_arguments): Return bool instead of void.
6381 * c-common.h (check_function_arguments): Adjust prototype.
6382
31bfc9b9
JM
63832016-12-21 Jason Merrill <jason@redhat.com>
6384
6385 * c.opt (-fnew-ttp-matching): New flag.
6386 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6387
629b3d75
MJ
63882016-12-14 Martin Jambor <mjambor@suse.cz>
6389
6390 * c-omp.c: Include omp-general.h instead of omp-low.h.
6391 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6392 name.
6393
474da67e
MS
63942016-12-14 Martin Sebor <msebor@redhat.com>
6395
6396 PR c/17308
6397 * c-common.c (check_nonnull_arg): Disable when optimization
6398 is enabled.
6399
fe366b87
MP
64002016-12-12 Marek Polacek <polacek@redhat.com>
6401
6402 PR c++/78647
6403 * c-common.c (attribute_fallthrough_p): Return false for
6404 error_mark_node.
6405
8bd9f164
MS
64062016-12-08 Martin Sebor <msebor@redhat.com>
6407
6408 PR c/78284
6409 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6410
060162e0
MS
64112016-12-08 Martin Sebor <msebor@redhat.com>
6412
6413 PR c/78165
92a285c1
ML
6414 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6415 suffix.
060162e0 6416
ee92e7ba
MS
64172016-12-07 Martin Sebor <msebor@redhat.com>
6418
6419 PR c/53562
6420 PR middle-end/77784
6421 PR middle-end/78149
6422 PR middle-end/78138
6423 * c.opt (-Wstringop-overflow): New option.
6424
84b0769e
MO
64252016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6426
6427 * c-attribs.c (asan odr indicator): New attribute.
6428 (handle_asan_odr_indicator_attribute): New function.
6429
7fa6a965
PK
64302016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6431
6432 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6433 ptrdiff_type_node;
6434
56d8ffc1
JG
64352016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6436
6437 * c-common.c (excess_precision_mode_join): New.
6438 (c_ts18661_flt_eval_method): New.
6439 (c_c11_flt_eval_method): Likewise.
6440 (c_flt_eval_method): Likewise.
6441 * c-common.h (excess_precision_mode_join): New.
6442 (c_flt_eval_method): Likewise.
6443 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6444 (cpp_iec_559_value): Call it.
6445 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6446 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6447 __FLT_EVAL_METHOD_TS_18661_3__.
6448
04f0fcf7
JG
64492016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6450
6451 * c-opts.c (c_common_post_options): Add logic to handle the default
6452 case for -fpermitted-flt-eval-methods.
6453
fb2675cb
PB
64542016-11-23 Paolo Bonzini <bonzini@gnu.org>
6455
6456 * c.opt (Wexpansion-to-defined): New.
6457
ec1c5694
JJ
64582016-11-23 Jakub Jelinek <jakub@redhat.com>
6459
6460 PR target/78451
6461 * c-pragma.c (handle_pragma_target): Don't replace
6462 current_target_pragma, but chainon the new args to the current one.
6463
730c9e75
NS
64642016-11-22 Nathan Sidwell <nathan@acm.org>
6465
6466 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6467 indentation and formatting.
730c9e75 6468
89990732
MS
64692016-11-21 Martin Sebor <msebor@redhat.com>
6470
6471 * c.opt (-fprintf-return-value): Enable by default.
6472
48330c93
BE
64732016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6474
6475 PR c++/71973
6476 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6477 * c-common.c (c_common_nodes_and_builtins): Initialize
6478 const_tm_ptr_type_node.
6479
0d939c95
MP
64802016-11-16 Marek Polacek <polacek@redhat.com>
6481
6482 PR c/78285
6483 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6484
8e745a17
JJ
64852016-11-14 Jakub Jelinek <jakub@redhat.com>
6486
6487 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6488
1ee62b92 64892016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6490 Richard Biener <rguenther@suse.de>
6491
6492 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6493 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6494 * c.opt (fgimple): New option.
1ee62b92 6495
22b15758
UB
64962016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6497
6498 PR c/35503
6499 * c-common.h (warn_for_restrict): Declare.
6500 * c-warn.c: Include gcc-rich-location.h.
6501 (warn_for_restrict): New function.
6502 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6503 (gcc_cdiag_char_table): Likewise.
6504 (gcc_cxxdiag_char_table): Likewise.
6505 * c.opt (Wrestrict): New option.
6506
4be719cd
EB
65072016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6508
6509 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6510 for nested types only if the type is a record or union and dump SLOC.
6511
4a826ca6
JM
65122016-11-09 Jason Merrill <jason@redhat.com>
6513
6514 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6515
2e955d50
JJ
65162016-11-09 Jakub Jelinek <jakub@redhat.com>
6517
6518 * c-ubsan.c (ubsan_instrument_shift): Handle split
6519 -fsanitize=shift-base and -fsanitize=shift-exponent.
6520
51dc6603
JM
65212016-11-07 Jason Merrill <jason@redhat.com>
6522
6523 * c.opt (Wc++1z-compat): New.
6524 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6525
6dc4a604
ML
65262016-11-07 Martin Liska <mliska@suse.cz>
6527
6528 * c-warn.c (warn_for_unused_label): Save all labels used
6529 in goto or in &label.
6530
b302001e
JM
65312016-11-03 Jason Merrill <jason@redhat.com>
6532
6533 * c-cppbuiltin.c (c_cpp_builtins): Correct
6534 __cpp_inheriting_constructors.
6535
31f7f784
JM
65362016-11-01 Jason Merrill <jason@redhat.com>
6537
2bc78e3c
JM
6538 * c-cppbuiltin.c (c_cpp_builtins): Update
6539 __cpp_inheriting_constructors.
6540
31f7f784
JM
6541 * c.opt (-fnew-inheriting-ctors): New.
6542 * c-opts.c: Default to on for ABI 11+.
6543
dcb466ec
JJ
65442016-10-31 Jakub Jelinek <jakub@redhat.com>
6545
6546 PR c++/77948
6547 * c.opt (fext-numeric-literals): Add Var and Init.
6548 * c-opts.c (c_common_handle_option): Don't clear
6549 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6550 (c_common_post_options): Clear it here if not set
6551 explicitly.
6552
52e1b91e
AH
65532016-10-28 Aldy Hernandez <aldyh@redhat.com>
6554
6555 PR debug/77773
6556 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6557 if NULL.
6558
e16f1cc7
JJ
65592016-10-25 Jakub Jelinek <jakub@redhat.com>
6560
6561 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6562 * c-common.c (c_common_reswords): Add __builtin_launder.
6563
f8348061
BE
65642016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6565
6566 * c-common.c (c_common_truthvalue_conversion): Warn for
6567 multiplications in boolean context. Fix the quoting of '<<' and '<'
6568 in the shift warning.
6569
eff89e01
BE
65702016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6571
6572 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6573
24bc7bf4
JM
65742016-10-20 Jason Merrill <jason@redhat.com>
6575
6576 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6577
4c712374
BE
65782016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6579
6580 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6581 integer shift ops in boolean context.
6582
65832016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6584
6585 * c.opt (Walloca): New.
6586 (Walloca-larger-than=): New.
6587 (Wvla-larger-than=): New.
6588
8fa18c06
MP
65892016-10-17 Marek Polacek <polacek@redhat.com>
6590
6591 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6592 Return immediately when finding a match.
6593 (warn_tautological_cmp): Remove a boolean variable that is no longer
6594 needed.
6595
b12b1915
MP
65962016-10-17 Marek Polacek <polacek@redhat.com>
6597
6598 * c-attribs.c: New file.
6599 * c-common.c: Move attributes handling to c-attribs.c.
6600 (get_nonnull_operand): No longer static.
6601 * c-common.h: Move the declarations from c-attribs.c to its own section.
6602
2045acd9
JM
66032016-10-14 Jason Merrill <jason@redhat.com>
6604
6605 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6606 and __cpp_deduction_guides.
6607
14a2c9aa
JM
66082016-10-13 Jason Merrill <jason@redhat.com>
6609
6610 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6611
4d0cdd0c
TP
66122016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6613
6614 * c-cppbuiltin.c: Include memmodel.h.
6615 * c-opts.c: Likewise.
6616 * c-pragma.c: Likewise.
6617 * c-warn.c: Likewise.
6618
70f6d5e1
JJ
66192016-10-12 Jakub Jelinek <jakub@redhat.com>
6620
6621 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6622 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6623 * c-opts.c (sanitize_cpp_opts): Initialize
6624 cpp_opts->cpp_warn_implicit_fallthrough.
6625
78f61294
MP
66262016-10-11 Marek Polacek <polacek@redhat.com>
6627
6628 * c-common.c (warning_candidate_p): Change the return type to bool
6629 and return true/false instead of 1/0.
6630 (vector_mode_valid_p): Likewise.
6631
038b5cc0
MP
66322016-10-11 Marek Polacek <polacek@redhat.com>
6633
6634 * c-common.c (fold_for_warn): No longer static.
6635 (bool_promoted_to_int_p): Likewise.
6636 (c_common_get_narrower): Likewise.
6637 (constant_expression_warning): Move to c-warn.c.
6638 (constant_expression_error): Likewise.
6639 (overflow_warning): Likewise.
6640 (warn_logical_operator): Likewise.
6641 (find_array_ref_with_const_idx_r): Likewise.
6642 (warn_tautological_cmp): Likewise.
6643 (expr_has_boolean_operands_p): Likewise.
6644 (warn_logical_not_parentheses): Likewise.
6645 (warn_if_unused_value): Likewise.
6646 (strict_aliasing_warning): Likewise.
6647 (sizeof_pointer_memaccess_warning): Likewise.
6648 (check_main_parameter_types): Likewise.
6649 (conversion_warning): Likewise.
6650 (warnings_for_convert_and_check): Likewise.
6651 (match_case_to_enum_1): Likewise.
6652 (match_case_to_enum): Likewise.
6653 (c_do_switch_warnings): Likewise.
6654 (warn_for_omitted_condop): Likewise.
6655 (readonly_error): Likewise.
6656 (lvalue_error): Likewise.
6657 (invalid_indirection_error): Likewise.
6658 (warn_array_subscript_with_type_char): Likewise.
6659 (warn_about_parentheses): Likewise.
6660 (warn_for_unused_label): Likewise.
6661 (warn_for_div_by_zero): Likewise.
6662 (warn_for_memset): Likewise.
6663 (warn_for_sign_compare): Likewise.
6664 (do_warn_double_promotion): Likewise.
6665 (do_warn_unused_parameter): Likewise.
6666 (record_locally_defined_typedef): Likewise.
6667 (maybe_record_typedef_use): Likewise.
6668 (maybe_warn_unused_local_typedefs): Likewise.
6669 (maybe_warn_bool_compare): Likewise.
6670 (maybe_warn_shift_overflow): Likewise.
6671 (warn_duplicated_cond_add_or_warn): Likewise.
6672 (diagnose_mismatched_attributes): Likewise.
6673 * c-common.h: Move the declarations from c-warn.c to its own section.
6674 * c-warn.c: New file.
6675
627be19f
JM
66762016-10-08 Jason Merrill <jason@redhat.com>
6677
6678 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6679 into COND_EXPR in C++.
6680
7bad794a
JJ
66812016-10-08 Jakub Jelinek <jakub@redhat.com>
6682
6683 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6684 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6685 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6686
be845b04
JJ
66872016-10-07 Jakub Jelinek <jakub@redhat.com>
6688
6689 Implement LWG2296 helper intrinsic
6690 * c-common.h (enum rid): Add RID_ADDRESSOF.
6691 * c-common.c (c_common_reswords): Add __builtin_addressof.
6692
c09c4992
BE
66932016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6694
6695 PR c++/77700
6696 * c-common.c (c_common_truthvalue_conversion): Warn also for
6697 suspicious enum values in boolean context.
6698
342cfb3e
JJ
66992016-10-06 Jakub Jelinek <jakub@redhat.com>
6700
6701 Implement P0258R2 - helper for C++17
6702 std::has_unique_object_representations trait
6703 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6704 * c-common.c (c_common_reswords): Add
6705 __has_unique_object_representations.
6706
2e69f143
JJ
67072016-10-05 Jakub Jelinek <jakub@redhat.com>
6708
6709 PR sanitizer/66343
6710 * c-ubsan.c (ubsan_instrument_return): Don't call
6711 initialize_sanitizer_builtins here.
6712
700fff34
BE
67132016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6714
6715 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6716 conditional expression in boolean context when only one arm is
6717 non-boolean.
6718
9563bfcd
JJ
67192016-10-05 Jakub Jelinek <jakub@redhat.com>
6720
04a32443
JJ
6721 PR sanitizer/77823
6722 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6723 is not integral.
6724
9563bfcd
JJ
6725 * c-common.c (c_common_reswords): Update comment for C++11.
6726
f1644724
JM
67272016-10-04 Jason Merrill <jason@redhat.com>
6728
6729 * c-common.c (make_tree_vector_from_ctor): New.
6730 * c-common.h: Declare it.
6731
5a79befb
JJ
67322016-10-04 Jakub Jelinek <jakub@redhat.com>
6733
6734 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6735 __LIBGCC_JCR_SECTION_NAME__.
6736
1633d3b9
BE
67372016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6738
6739 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6740 left shift in boolean context.
6741
a2c6e7f2
JJ
67422016-09-29 Jakub Jelinek <jakub@redhat.com>
6743
6744 Implement P0001R1 - C++17 removal of register storage class specifier
6745 * c.opt (Wregister): New warning.
6746 * c-opts.c (c_common_post_options): Enable -Wregister by
6747 default for C++17.
6748
75304c87
JG
67492016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6750
6751 * c-opts.c (c_common_post_options): Remove special case for
6752 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6753 in C++.
6754
bbfac6da
JJ
67552016-09-27 Jakub Jelinek <jakub@redhat.com>
6756
6e39060a
JJ
6757 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6758 -std=c++1z.
6759
bbfac6da
JJ
6760 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6761
e73cf9a2
TP
67622016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6763
6764 * c-common.c: Include memmodel.h.
6765
c6147dc4
MP
67662016-09-26 Marek Polacek <polacek@redhat.com>
6767
6768 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6769
81fea426
MP
67702016-09-26 Marek Polacek <polacek@redhat.com>
6771
6772 PR c/7652
6773 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6774 (handle_fallthrough_attribute): New function.
6775 (attribute_fallthrough_p): New function.
6776 * c-common.h (attribute_fallthrough_p): Declare.
6777
9a2300e9
MP
67782016-09-24 Marek Polacek <polacek@redhat.com>
6779
6780 PR c/77490
6781 * c.opt (Wbool-operation): New.
6782
a09e9e35
BE
67832016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6784
6785 * c-common.c (c_common_truthvalue_conversion): Inhibit
6786 Wint-in-bool-context warning with from_macro_definition_at.
6787 Mention the expression will always evaluate to true.
6788
d43b4ccc
MS
67892016-09-21 Martin Sebor <msebor@redhat.com>
6790
6791 PR bootstrap/77676
6792 * c.opt (fprintf-return-value): Temporarily initialize to zero
6793 to unblock bootstrap failures.
6794
2e1c20b1
JJ
67952016-09-21 Jakub Jelinek <jakub@redhat.com>
6796
6797 PR c++/77651
6798 * c.opt (Waligned-new=): Add RejectNegative.
6799 (faligned-new=): Likewise. Spelling fix - change
6800 aligned_new_threshhold to aligned_new_threshold.
6801 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6802 to aligned_new_threshold.
6803
88d0c3f0
MS
68042016-09-20 Martin Sebor <msebor@redhat.com>
6805
6806 PR middle-end/49905
6807 * c.opt: Add -Wformat-length and -fprintf-return-value.
6808
144a96e4
BE
68092016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6810
6811 PR c++/77434
6812 * c.opt (Wint-in-bool-context): New warning.
6813 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6814 constants in boolean context.
6815
63012d9a
JM
68162016-09-19 Joseph Myers <joseph@codesourcery.com>
6817
6818 * c-common.c (max_align_t_align): Also consider alignment of
6819 float128_type_node.
6820
931388ce
JM
68212016-09-15 Jason Merrill <jason@redhat.com>
6822
6823 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6824 DECL_EXTERNAL.
6825
38711381
JM
68262016-09-14 Jason Merrill <jason@redhat.com>
6827
6828 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6829 limit FIELD_DECL, either.
6830
e51fbec3
MP
68312016-09-14 Marek Polacek <polacek@redhat.com>
6832
6833 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6834 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6835 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6836
254830ba
DM
68372016-09-13 David Malcolm <dmalcolm@redhat.com>
6838
6839 * c-common.c (warn_logical_not_parentheses): Replace
6840 rich_location::add_fixit_insert calls with add_fixit_insert_before
6841 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6842
42763690
JM
68432016-09-13 Jason Merrill <jason@redhat.com>
6844 Tom de Vries <tom@codesourcery.com>
6845
6846 PR c++/77427
6847 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6848
9453eee9
JM
68492016-09-13 Jason Merrill <jason@redhat.com>
6850
6851 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6852 limit types at all.
6853
e96809e3
JM
68542016-09-12 Jason Merrill <jason@redhat.com>
6855
6856 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6857 bit/byte confusion, allow large alignment for types.
6858
54dcdb88
BE
68592016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6860
6861 PR c++/77496
6862 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6863
d1463eb9
DM
68642016-09-12 David Malcolm <dmalcolm@redhat.com>
6865
6866 PR c/72858
6867 * c-format.c (argument_parser::check_argument_type): Add params
6868 "type_start" and "conversion_char". Use the former to generate
6869 offset_to_type_start and pass it and conversion_char to
6870 check_format_types.
6871 (check_format_info_main): Capture the start of the type
6872 information as "type_start", and pass it an format_char
6873 to arg_parser.check_argument_type.
6874 (check_format_types): Provide an example in the leading comment.
6875 Add params "offset_to_type_start" and "conversion_char"; pass
6876 them to format_type_warning calls.
6877 (test_get_modifier_for_format_len): Likewise.
6878 (matching_type_p): New function.
6879 (get_format_for_type): Add param "conversion_char" and move
6880 implementation into...
6881 (get_format_for_type_1): ...new function, called twice.
6882 Use new function matching_type_p rather than checking for
6883 TYPE_CANONICAL equality.
6884 (get_corrected_substring): New function.
6885 (format_type_warning): Provide an example in the leading comment.
6886 Add params "offset_to_type_start" and "conversion_char". Replace
6887 call to get_format_for_type with call to get_corrected_substring
6888 and move rejection of hints for widths/precisions there.
6889 (assert_format_for_type_streq): Add param "conversion_char".
6890 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6891 (test_get_format_for_type_printf): Add conversion chars to the
6892 tests, adding coverage for various combinations of integer
6893 vs double conversions, and for preserving octal and hexadecimal
6894 conversions.
6895 (test_get_format_for_type_scanf): Add conversion chars to the
6896 tests.
6897
5b28efbb
TV
68982016-09-10 Tom de Vries <tom@codesourcery.com>
6899
6900 PR C/71602
6901 * c-common.c (build_va_arg): Handle more strict
6902 targetm.canonical_va_list_type. Replace first argument type error with
6903 assert.
6904
3f0177e7
MS
69052016-09-09 Martin Sebor <msebor@redhat.com>
6906
6907 PR c/77520
6908 PR c/77521
6909 * c-format.c (argument_parser::find_format_char_info): Use %qc
6910 format directive unconditionally.
6911
af63ba4b
JM
69122016-09-09 Jason Merrill <jason@redhat.com>
6913
6914 Implement C++17 new of over-aligned types.
6915 * c.opt: Add -faligned-new and -Waligned-new.
6916 * c-common.c (max_align_t_align): Split out from...
6917 (cxx_fundamental_alignment_p): ...here.
6918 * c-common.h: Declare it.
6919 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6920
c65248cb
JM
69212016-09-09 Joseph Myers <joseph@codesourcery.com>
6922
6923 * c-cppbuiltin.c (builtin_define_type_width): New function.
6924 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6925 macros.
6926
e5106e27
DM
69272016-09-07 David Malcolm <dmalcolm@redhat.com>
6928
6929 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6930 a POINTER_TYPE.
6931 (substring_loc::get_location): Move to substring-locations.c,
6932 keeping implementation as...
6933 (c_get_substring_location): New function, from the above, reworked
6934 to use accessors rather than member lookup.
6935 * c-common.h (class substring_loc): Move to substring-locations.h,
6936 replacing with a forward decl.
6937 (c_get_substring_location): New decl.
6938 * c-format.c: Include "substring-locations.h".
6939 (format_warning_va): Move to substring-locations.c.
6940 (format_warning_at_substring): Likewise.
6941
ab20d992 69422016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6943
6944 PR c/77336
6945 * c-format.c (check_function_format): Avoid issuing warnings for
6946 functions unless they call format functions with non-constant
6947 format strings.
6948
b772a565
RB
69492016-09-06 Richard Biener <rguenther@suse.de>
6950
6951 PR c/77450
6952 * c-common.c (c_common_mark_addressable_vec): Handle
6953 COMPOUND_LITERAL_EXPR.
6954
25ff5dd3
MP
69552016-09-05 Marek Polacek <polacek@redhat.com>
6956
6957 PR c/77423
6958 * c-common.c (bool_promoted_to_int_p): New function.
6959 (expr_has_boolean_operands_p): New function.
6960 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6961 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6962
21234eb5
TV
69632016-09-04 Tom de Vries <tom@codesourcery.com>
6964
6965 revert:
6966 2016-08-29 Tom de Vries <tom@codesourcery.com>
6967
6968 * c-common.c (build_va_arg): Replace first argument type error
6969 with assert.
6970
9dc5773f
JJ
69712016-09-02 Jakub Jelinek <jakub@redhat.com>
6972
6973 PR c/65467
6974 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6975 (c_finish_omp_for): Reject _Atomic qualified iterators.
6976
69772016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6978
6979 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6980 size to guarantee it fits the output of the formatted function
6981 regardless of its arguments.
6982
295844f6
MP
69832016-09-01 Marek Polacek <polacek@redhat.com>
6984
6985 PR c/7652
6986 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6987 FALLTHRU comments.
6988
3d06b6f2
MP
69892016-08-29 Marek Polacek <polacek@redhat.com>
6990
6991 PR c/77292
6992 * c-common.c (warn_logical_not_parentheses): Don't warn for
6993 a comparison or a logical operator.
6994
34cedad5
TV
69952016-08-29 Tom de Vries <tom@codesourcery.com>
6996
6997 * c-common.c (build_va_arg): Fix type comparison assert.
6998
f162d717
TV
69992016-08-29 Tom de Vries <tom@codesourcery.com>
7000
7001 * c-common.c (build_va_arg): Replace first argument type error
7002 with assert.
7003
ba9bbd6f
TV
70042016-08-29 Tom de Vries <tom@codesourcery.com>
7005
7006 PR c/77398
7007 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7008 with error_mark_node as va_list instead of with illegal va_list.
7009
ebef225f
MP
70102016-08-25 Marek Polacek <polacek@redhat.com>
7011 David Malcolm <dmalcolm@redhat.com>
7012
7013 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7014 * c-common.h (warn_logical_not_parentheses): Update declaration.
7015
b00e6e75
MP
70162016-08-22 Marek Polacek <polacek@redhat.com>
7017
7018 PR c++/77321
7019 * c-common.c (warn_for_memset): Check type for null.
7020
6dc198e3
JM
70212016-08-22 Joseph Myers <joseph@codesourcery.com>
7022
14ec014e 7023 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7024 _FloatNx types for suffixes for built-in functions.
7025
c65699ef
JM
70262016-08-19 Joseph Myers <joseph@codesourcery.com>
7027
7028 PR c/32187
7029 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7030 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7031 (RID_FLOAT128X): New enum rid values.
7032 (CASE_RID_FLOATN_NX): New macro.
7033 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7034 keywords.
7035 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7036 corresponding complex types.
7037 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7038 _FloatNx and corresponding complex types.
7039 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7040 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7041 and _FloatNx types for the widest type for determining
7042 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7043 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7044 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7045 and _FloatNx types.
7046 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7047 constants.
7048 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7049 _FloatNx types.
7050
cc015f3a
DM
70512016-08-18 David Malcolm <dmalcolm@redhat.com>
7052
7053 * c-opts.c (c_diagnostic_finalizer): Update for change to
7054 diagnostic_show_locus.
7055
cb18fd07
DM
70562016-08-18 David Malcolm <dmalcolm@redhat.com>
7057
7058 * c-common.c: Include "spellcheck.h".
7059 (cb_get_suggestion): New function.
7060 * c-common.h (cb_get_suggestion): New decl.
7061 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7062 cb_get_suggestion.
7063
a76989dc
MP
70642016-08-18 Marek Polacek <polacek@redhat.com>
7065
7066 PR c/71514
7067 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7068 and pointer-to-VLA.
7069
65e736c0
DM
70702016-08-16 David Malcolm <dmalcolm@redhat.com>
7071
7072 PR c/72857
7073 * c-common.c (substring_loc::get_range): Rename to...
7074 (substring_loc::get_location): ...this, converting param from a
7075 source_range * to a location_t *. Call
7076 get_source_location_for_substring rather than
7077 get_source_range_for_substring, and pass in m_caret_idx.
7078 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7079 (substring_loc::get_range): Replace with...
7080 (substring_loc::get_location): ...this.
7081 (substring_loc::set_caret_index): New method.
7082 (substring_loc): Add field m_caret_idx.
7083 * c-format.c (format_warning_va): Update for above changes.
7084 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7085 clashing with type name.
7086 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7087 (check_argument_type): Likewise.
7088 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7089 Use a copy when emitting warnings, setting the caret index from TYPE.
7090
7e1dde14 70912016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7092 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7093
7094 * c-ada-spec.c (dump_number): New function.
7095 (handle_escape_character): Likewise.
7096 (print_ada_macros): Add handling of constant integers and strings.
7097
191816a3
MP
70982016-08-12 Marek Polacek <polacek@redhat.com>
7099
7100 PR c/7652
7101 * c-common.c (scalar_to_vector): Adjust fall through comment.
7102 * c-opts.c (c_common_handle_option): Likewise.
7103 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7104 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7105 fall through comment.
7106 * cilk.c (extract_free_variables): Add FALLTHRU.
7107
452df4a4
JM
71082016-08-10 Jason Merrill <jason@redhat.com>
7109
7110 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7111
f3365c12
JM
71122016-08-09 Jason Merrill <jason@redhat.com>
7113
7114 * c-common.c (c_common_attribute_table): vector_size affects type
7115 identity.
7116
f0bc3323
MP
71172016-08-09 Marek Polacek <polacek@redhat.com>
7118
7119 PR c/7652
7120 * c-ada-spec.c (dump_generic_ada_node): Add return.
7121
98e5a19a
JM
71222016-08-09 Jason Merrill <jason@redhat.com>
7123
7124 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7125 C++17 constexpr lambdas.
7126
895aa8e1
DM
71272016-08-08 David Malcolm <dmalcolm@redhat.com>
7128
7129 PR c/64955
7130 * c-common.h (selftest::c_format_c_tests): New declaration.
7131 (selftest::run_c_tests): New declaration.
7132 * c-format.c: Include "selftest.h.
7133 (format_warning_va): Add param "corrected_substring" and use
7134 it to add a replacement fix-it hint.
7135 (format_warning_at_substring): Likewise.
7136 (format_warning_at_char): Update for new param of
7137 format_warning_va.
7138 (argument_parser::check_argument_type): Pass "fki" to
7139 check_format_types.
7140 (check_format_types): Add param "fki" and pass it to
7141 format_type_warning.
7142 (deref_n_times): New function.
7143 (get_modifier_for_format_len): New function.
7144 (selftest::test_get_modifier_for_format_len): New function.
7145 (get_format_for_type): New function.
7146 (format_type_warning): Add param "fki" and use it to attempt
7147 to provide hints for argument types when calling
7148 format_warning_at_substring.
7149 (selftest::get_info): New function.
7150 (selftest::assert_format_for_type_streq): New function.
7151 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7152 (selftest::test_get_format_for_type_printf): New function.
7153 (selftest::test_get_format_for_type_scanf): New function.
7154 (selftest::c_format_c_tests): New function.
7155
e52ed3fe
DM
71562016-08-08 David Malcolm <dmalcolm@redhat.com>
7157
7158 PR c/52952
7159 * c-format.c: Include "diagnostic.h".
7160 (location_column_from_byte_offset): Delete.
7161 (location_from_offset): Delete.
7162 (format_warning_va): New function.
7163 (format_warning_at_substring): New function.
7164 (format_warning_at_char): New function.
7165 (check_format_arg): Capture location of format_tree and pass to
7166 check_format_info_main.
7167 (argument_parser): Add fields "start_of_this_format" and
7168 "format_string_cst".
7169 (flag_chars_t::validate): Add param "format_string_cst". Convert
7170 warning_at call using location_from_offset to call to
7171 format_warning_at_char.
7172 (argument_parser::argument_parser): Add param "format_string_cst_"
7173 and use use it to initialize field "format_string_cst".
7174 Initialize new field "start_of_this_format".
7175 (argument_parser::read_format_flags): Convert warning_at call
7176 using location_from_offset to a call to format_warning_at_char.
7177 (argument_parser::read_any_format_left_precision): Likewise.
7178 (argument_parser::read_any_format_precision): Likewise.
7179 (argument_parser::read_any_other_modifier): Likewise.
7180 (argument_parser::find_format_char_info): Likewise, in three places.
7181 (argument_parser::parse_any_scan_set): Likewise, in one place.
7182 (argument_parser::handle_conversions): Likewise, in two places.
7183 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7184 and use it to make a substring_loc. Pass the latter to
7185 check_format_types.
7186 (check_format_info_main): Add params "fmt_param_loc" and
7187 "format_string_cst". Convert warning_at calls using
7188 location_from_offset to calls to format_warning_at_char. Pass the
7189 new params to the arg_parser ctor. Pass "format_string_cst" to
7190 flag_chars.validate. Pass "fmt_param_loc" to
7191 arg_parser.check_argument_type.
7192 (check_format_types): Convert first param from a location_t
7193 to a const substring_loc & and rename to "fmt_loc". Attempt
7194 to extract the range of the relevant parameter and pass it
7195 to format_type_warning.
7196 (format_type_warning): Convert first param from a location_t
7197 to a const substring_loc & and rename to "fmt_loc". Add
7198 params "param_range" and "type". Replace calls to warning_at
7199 with calls to format_warning_at_substring.
7200
1c4d457e
DM
72012016-08-08 David Malcolm <dmalcolm@redhat.com>
7202
7203 * c-format.c (class flag_chars_t): New class.
7204 (struct length_modifier): New struct.
7205 (class argument_parser): New class.
7206 (flag_chars_t::flag_chars_t): New ctor.
7207 (flag_chars_t::has_char_p): New method.
7208 (flag_chars_t::add_char): New method.
7209 (flag_chars_t::validate): New method.
7210 (flag_chars_t::get_alloc_flag): New method.
7211 (flag_chars_t::assignment_suppression_p): New method.
7212 (argument_parser::argument_parser): New ctor.
7213 (argument_parser::read_any_dollar): New method.
7214 (argument_parser::read_format_flags): New method.
7215 (argument_parser::read_any_format_width): New method.
7216 (argument_parser::read_any_format_left_precision): New method.
7217 (argument_parser::read_any_format_precision): New method.
7218 (argument_parser::handle_alloc_chars): New method.
7219 (argument_parser::read_any_length_modifier): New method.
7220 (argument_parser::read_any_other_modifier): New method.
7221 (argument_parser::find_format_char_info): New method.
7222 (argument_parser::validate_flag_pairs): New method.
7223 (argument_parser::give_y2k_warnings): New method.
7224 (argument_parser::parse_any_scan_set): New method.
7225 (argument_parser::handle_conversions): New method.
7226 (argument_parser::check_argument_type): New method.
7227 (check_format_info_main): Introduce classes argument_parser
7228 and flag_chars_t, moving the code within the loop into methods
7229 of these classes. Make various locals "const".
7230
88fa5555
DM
72312016-08-05 David Malcolm <dmalcolm@redhat.com>
7232
7233 * c-common.c: Include "substring-locations.h".
7234 (get_cpp_ttype_from_string_type): New function.
7235 (g_string_concat_db): New global.
7236 (substring_loc::get_range): New method.
7237 * c-common.h (g_string_concat_db): New declaration.
7238 (class substring_loc): New class.
7239 * c-lex.c (lex_string): When concatenating strings, capture the
7240 locations of all tokens using a new obstack, and record the
7241 concatenation locations within g_string_concat_db.
7242 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7243 on the ggc-heap.
7244
78169471
MP
72452016-07-29 Marek Polacek <polacek@redhat.com>
7246
638fc14f
MP
7247 PR c/71926
7248 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7249 parentheses warning.
7250
78169471
MP
7251 PR c/71574
7252 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7253
1225d6b1
ML
72542016-07-28 Martin Liska <mliska@suse.cz>
7255
7256 PR gcov-profile/68025
7257 * c-common.c (handle_no_profile_instrument_function_attribute):
7258
ec1e2a40
BE
72592016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7260
7261 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7262 BITS_PER_UNIT_LOG.
7263
5ec2cd9f
JM
72642016-07-25 Jason Merrill <jason@redhat.com>
7265
7266 PR c++/65970
7267 * c.opt (fconstexpr-loop-limit): New.
7268
9dc5773f 72692016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7270
7271 PR c++/71675
7272 * c-common.c (resolve_overloaded_builtin): Avoid converting
7273 __atomic_compare_exchange_n return type to that of what its
7274 first argument points to.
7275
e3fe09c1
UB
72762016-07-22 Uros Bizjak <ubizjak@gmail.com>
7277
7278 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7279 ~(unsigned HOST_WIDE_INT) 0.
7280
bc91c436
ML
72812016-07-22 Martin Liska <mliska@suse.cz>
7282
7283 PR gcov-profile/69028
7284 PR gcov-profile/62047
7285 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7286 to the current_function_decl.
7287
451dcc66
JM
72882016-07-21 Jason Merrill <jason@redhat.com>
7289
7290 PR c++/65168
7291 * c-common.c (c_common_truthvalue_conversion): Check
7292 c_inhibit_evaluation_warnings for warning about address of
7293 reference.
7294
de6a69ee
DM
72952016-07-20 David Malcolm <dmalcolm@redhat.com>
7296
7297 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7298 const char *.
7299
d022c55a
JM
73002016-07-15 Jason Merrill <jason@redhat.com>
7301
7302 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7303
ddbbcb19
JJ
73042016-07-15 Jakub Jelinek <jakub@redhat.com>
7305
7306 PR c/71858
7307 * c-common.h (enum lookup_name_fuzzy_kind): Add
7308 FUZZY_LOOKUP_FUNCTION_NAME.
7309
d0cf395a
JM
73102016-07-08 Jason Merrill <jason@redhat.com>
7311
7312 P0145: Refining Expression Order for C++.
7313 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7314 * c-opts.c: Adjust.
7315
98d44e93
MT
73162016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7317
7318 PR c++/71214
7319 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7320
f9d8d994
TS
73212016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7322
7323 * c-pragma.h (enum pragma_kind): Rename
7324 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7325 users.
7326
4aa83879
RB
73272016-06-29 Richard Biener <rguenther@suse.de>
7328
7329 PR middle-end/71002
7330 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7331
a25bd9e6
JM
73322016-06-24 Jason Merrill <jason@redhat.com>
7333
7334 P0145R2: Refining Expression Order for C++.
7335 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7336 MODIFY_EXPR.
7337
a86451b9
JJ
73382016-06-24 Jakub Jelinek <jakub@redhat.com>
7339
7340 * c-common.c (check_builtin_function_arguments): Require last
7341 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7342 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7343 if the last argument is pointer to enumerated or boolean type.
7344
1a4f11c8
DM
73452016-06-22 David Malcolm <dmalcolm@redhat.com>
7346
7347 PR c/70339
7348 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7349 (lookup_name_fuzzy): New prototype.
7350
fe55692c
JDA
73512016-06-21 John David Anglin <danglin@gcc.gnu.org>
7352
7353 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7354
4eb24e01
JM
73552016-06-14 Jason Merrill <jason@redhat.com>
7356
7357 P0145R2: Refining Expression Order for C++.
7358 * c.opt (fargs-in-order): New.
7359 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7360
ef7cf206
JJ
73612016-06-13 Jakub Jelinek <jakub@redhat.com>
7362
0dda258b
JJ
7363 PR sanitizer/71498
7364 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7365 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7366
ef7cf206
JJ
7367 PR preprocessor/71183
7368 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7369 to cb_get_source_date_epoch.
7370
50b15873
JJ
73712016-06-10 Jakub Jelinek <jakub@redhat.com>
7372
7373 PR c/68657
7374 * c.opt (Wpsabi): Add Warning flag.
7375
4d926e34
MS
73762016-06-10 Martin Sebor <msebor@redhat.com>
7377
7378 PR c/71392
14ec014e 7379 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7380 the nonnull attribute in type-generic builtins.
7381
e01b4e16
MS
73822016-06-09 Martin Sebor <msebor@redhat.com>
7383
7384 PR c/70883
7385 * c-common.c (builtin_function_validate_nargs): Make text of error
7386 message consistent with others like it.
7387
44a845ca
MS
73882016-06-08 Martin Sebor <msebor@redhat.com>
7389 Jakub Jelinek <jakub@redhat.com>
7390
7391 PR c++/70507
7392 PR c/68120
7393 * c-common.c (check_builtin_function_arguments): Handle
7394 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7395
a80a7051
RB
73962016-06-08 Richard Biener <rguenther@suse.de>
7397
7398 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7399
bfd67b47
RB
74002016-06-07 Richard Biener <rguenther@suse.de>
7401
7402 PR c/61564
7403 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7404 options and warn about others.
7405
15c98b2e
ES
74062016-06-01 Eduard Sanou <dhole@openmailbox.org>
7407
7408 * c-common.c (get_source_date_epoch): Rename to
7409 cb_get_source_date_epoch.
7410 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7411 message when the parsing fails. Use error_at instead of fatal_error.
7412 * c-common.h (get_source_date_epoch): Rename to
7413 cb_get_source_date_epoch.
7414 * c-common.h (cb_get_source_date_epoch): Prototype.
7415 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7416 * c-common.h (c_omp_region_type): Remove trailing comma.
7417 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7418 * c-lex.c (c_lex_with_flags): Remove initialization of
7419 pfile->source_date_epoch.
7420
00631022
JJ
74212016-05-30 Jakub Jelinek <jakub@redhat.com>
7422
7423 PR c++/71349
7424 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7425 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7426 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7427 instead of C_OMP_CLAUSE_SPLIT_FOR.
7428
f17a223d
RB
74292016-05-24 Richard Biener <rguenther@suse.de>
7430
7431 PR middle-end/70434
7432 PR c/69504
7433 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7434 (convert_vector_to_array_for_subscript): ... this.
7435 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7436 VIEW_CONVERT_EXPR to an array type. Rename to ...
7437 (convert_vector_to_array_for_subscript): ... this.
7438
4f2e1536
MP
74392016-05-12 Marek Polacek <polacek@redhat.com>
7440
7441 PR c/70756
7442 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7443 size_in_bytes and pass LOC to it.
7444
d6e83a8d
MM
74452016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7446
7447 PR c/43651
7448 * c.opt (Wduplicate-decl-specifier): New option.
7449
5c3a10fb
MP
74502016-05-11 Marek Polacek <polacek@redhat.com>
7451
7452 PR c++/71024
7453 * c-common.c (diagnose_mismatched_attributes): New function.
7454 * c-common.h (diagnose_mismatched_attributes): Declare.
7455
deef7113
MP
74562016-05-04 Marek Polacek <polacek@redhat.com>
7457
7458 * c.opt (Wdangling-else): New option.
7459
79ce98bc
MP
74602016-05-03 Marek Polacek <polacek@redhat.com>
7461
7462 PR c/70859
7463 * c-common.c (builtin_function_validate_nargs): Add location
7464 parameter. Use it.
7465 (check_builtin_function_arguments): Add location and arguments
7466 parameters. Use them.
7467 * c-common.h (check_builtin_function_arguments): Update declaration.
7468
381cdae4
RB
74692016-05-03 Richard Biener <rguenther@suse.de>
7470
7471 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7472 allow call args to gimplify to SSA names.
7473
1d793c34
MP
74742016-05-03 Marek Polacek <polacek@redhat.com>
7475
7476 * c-common.h (enum c_omp_region_type): Remove stray comma.
7477
77886428
CP
74782016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7479
7480 * c-common.h (enum c_omp_region_type): Define.
7481
697e0b28
RS
74822016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7483
7484 * c-common.c (shorten_compare): Use wi::to_wide.
7485
e7ff0319
CP
74862016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7487
7488 PR middle-end/70626
7489 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7490 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7491 reduction clauses in acc parallel loops.
7492
2fff3db8
MP
74932016-04-29 Marek Polacek <polacek@redhat.com>
7494
7495 PR c/70852
7496 * c-common.c (warn_for_memset): Check domain before accessing it.
7497
509063eb
DV
74982016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7499
7500 PR/69089
7501 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7502 "aligned" attribute.
7503
b632761d
JM
75042016-04-28 Jason Merrill <jason@redhat.com>
7505
7506 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7507
174f6622
ES
75082016-04-28 Eduard Sanou <dhole@openmailbox.org>
7509 Matthias Klose <doko@debian.org>
7510
7511 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7512 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7513 handling.
7514 * c-common.h (get_source_date_epoch): Prototype.
7515 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7516
6bc2bb18
RB
75172015-04-27 Ryan Burn <contact@rnburn.com>
7518
7519 PR c++/69024
7520 PR c++/68997
7521 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7522 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7523 external linkage.
7524 (cilk_detect_and_unwrap): Corresponding changes.
7525 (extract_free_variables): Don't extract free variables from
7526 AGGR_INIT_EXPR slot.
7527 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7528 (cilk_recognize_spawn): Likewise.
7529
c1e1f433
BS
75302016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7531
7532 * c.opt (Wmemset-elt-size): New option.
7533 * c-common.c (warn_for_memset): New function.
7534 * c-common.h (warn_for_memset): Declare.
7535
d067e05f
JM
75362016-04-25 Jason Merrill <jason@redhat.com>
7537
7538 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7539 No longer static.
7540 * c-common.h: Declare it.
7541 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7542
9aa36ae5
JM
75432016-04-22 Jason Merrill <jason@redhat.com>
7544
7545 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7546
477d4906
IV
75472016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7548
7549 PR c++/69363
7550 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7551 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7552
fe37c7af
MM
75532016-04-18 Michael Matz <matz@suse.de>
7554
7555 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7556 and SET_DECL_ALIGN.
7557
23f2660f
EB
75582016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7559
7560 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7561 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7562 to incomplete types.
7563 (dump_nested_type): Remove redundant tests and tidy up.
7564 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7565 a type which is the typedef of an original type.
7566
1e77281b
MP
75672016-04-15 Marek Polacek <polacek@redhat.com>
7568
7569 PR c/70651
7570 * c-common.c (build_va_arg): Change two asserts into errors and return
7571 error_mark_node.
7572
b3a77f21
MP
75732016-04-13 Marek Polacek <polacek@redhat.com>
7574
7575 PR c++/70639
7576 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7577 for switch statements, too.
7578
322b8466
JM
75792016-03-28 Jason Merrill <jason@redhat.com>
7580
7581 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7582
fbdb6baf
MP
75832016-03-23 Marek Polacek <polacek@redhat.com>
7584
7585 PR c++/69884
7586 * c.opt (Wignored-attributes): New option.
7587
5c240f4d
DM
75882016-03-22 David Malcolm <dmalcolm@redhat.com>
7589
7590 PR c/69993
7591 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7592 diagnostic text, reversing the order of the warning and note so
7593 that they appear in source order.
7594
14ba7b28
MP
75952016-03-17 Marek Polacek <polacek@redhat.com>
7596
7597 PR c/69407
7598 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7599 operations.
7600
08a1cadc
JM
76012016-03-14 Jason Merrill <jason@redhat.com>
7602
2aaeea19
JM
7603 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7604
08a1cadc
JM
7605 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7606
c06d25bb
RB
76072016-03-09 Richard Biener <rguenther@suse.de>
7608
7609 PR c/70143
7610 * c-common.c (strict_aliasing_warning): Add back
7611 alias_sets_conflict_p check.
7612
80aac5c8
JM
76132016-03-08 Jason Merrill <jason@redhat.com>
7614
7615 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7616
64b23c13
DM
76172016-03-04 David Malcolm <dmalcolm@redhat.com>
7618
7619 PR c/68187
7620 * c-indentation.c (get_visual_column): Move code to determine next
7621 tab stop to...
7622 (next_tab_stop): ...this new function.
7623 (line_contains_hash_if): Delete function.
7624 (detect_preprocessor_logic): Delete function.
7625 (get_first_nws_vis_column): New function.
7626 (detect_intervening_unindent): New function.
7627 (should_warn_for_misleading_indentation): Replace call to
7628 detect_preprocessor_logic with a call to
7629 detect_intervening_unindent.
7630
729526f5
DM
76312016-03-04 David Malcolm <dmalcolm@redhat.com>
7632
7633 PR c/68187
7634 * c-indentation.c (should_warn_for_misleading_indentation): When
7635 suppressing warnings about cases where the guard and body are on
7636 the same column, only use the first non-whitespace column in place
7637 of the guard token column when dealing with "else" clauses.
7638 When rejecting aligned BODY and NEXT, loosen the requirement
7639 from equality with the first non-whitespace of guard to simply
7640 that they not be indented relative to it.
7641
e9a35493
RB
76422016-03-04 Richard Biener <rguenther@suse.de>
7643
7644 PR c++/70054
7645 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7646 instead of alias_sets_conflict_p.
7647
1be56bc5
MP
76482016-03-01 Marek Polacek <polacek@redhat.com>
7649
7650 PR c++/69795
7651 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7652 any DECL.
7653
35886f0b
MS
76542016-02-22 Martin Sebor <msebor@redhat.com>
7655
7656 PR middle-end/69780
7657 * c-common.c (check_builtin_function_arguments): Validate and
7658 reject invalid arguments to __builtin_alloca_with_align.
7659
4246c8da
MW
76602016-02-20 Mark Wielaard <mjw@redhat.com>
7661
7662 PR c/28901
7663 * c.opt (Wunused-const-variable): Turn into Alias for...
7664 (Wunused-const-variable=): New option.
7665
268be88c
BE
76662016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7667
7668 PR c++/69865
7669 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7670 here...
7671 (c_common_init_options): ...to here.
7672 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7673
871b3f47
JJ
76742016-02-19 Jakub Jelinek <jakub@redhat.com>
7675
7676 PR c++/69826
7677 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7678 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7679 flag_preprocess_only.
7680
bf14eba2
JJ
76812016-02-16 Jakub Jelinek <jakub@redhat.com>
7682
7683 PR c/69835
7684 * c.opt (Wnonnull-compare): Enable for -Wall.
7685
ba6b3795
JJ
76862016-02-15 Jakub Jelinek <jakub@redhat.com>
7687
7688 PR c++/69797
7689 * c-common.c (sync_resolve_size): Diagnose too few arguments
7690 even when params is non-NULL empty vector.
7691
a011cd92
BS
76922016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7693
7694 PR target/60410
7695 * c.opt (fshort-double): Remove.
7696
46cb9332
MS
76972016-02-05 Martin Sebor <msebor@redhat.com>
7698
7699 PR c++/69662
7700 * c.opt (Warning options): Update -Wplacement-new to take
7701 an optional argument.
7702
e1b81f2b
JJ
77032016-02-01 Jakub Jelinek <jakub@redhat.com>
7704
7705 PR preprocessor/69543
7706 PR c/69558
7707 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7708 instead of loc to control_warning_option.
7709
b6adbb9f
NS
77102016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7711
7712 * c.opt (fopenacc-dim=): New option.
7713
5d70666e
RB
77142016-01-27 Ryan Burn <contact@rnburn.com>
7715
7716 PR cilkplus/69267
7717 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7718 gimplify_arg. Removed superfluous post_p argument.
7719 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7720 superfluous post_p argument.
7721 * c-gimplify.c (c_gimplify_expr): Likewise.
7722
01e1dea3
DM
77232016-01-26 David Malcolm <dmalcolm@redhat.com>
7724
7725 PR other/69006
7726 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7727 pp_newline_and_flush with pp_flush.
7728
9f04a53e
MS
77292016-01-20 Martin Sebor <msebor@redhat.com>
7730
7731 PR c/69405
7732 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7733 an incompatible argument when the argument isn't a valid tree node.
7734
7f26f7df
JM
77352016-01-18 Jason Merrill <jason@redhat.com>
7736
7737 PR c++/68767
7738 * c-common.c (check_function_arguments_recurse): Fold the whole
7739 COND_EXPR, not just the condition.
7740
f62bf092
TV
77412016-01-18 Tom de Vries <tom@codesourcery.com>
7742
7743 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7744 classify as loop clause.
7745
e0a575ff
JJ
77462016-01-15 Jakub Jelinek <jakub@redhat.com>
7747
7748 PR bootstrap/68271
7749 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7750 C++ FE no longer has limit on number of pragmas.
7751
77522015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7753
7754 PR c++/69048
7755 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7756 to add missing cleanup point.
b6e3db06 7757
c7df95d8
DM
77582016-01-14 David Malcolm <dmalcolm@redhat.com>
7759
7760 PR c++/68819
7761 * c-indentation.c (get_visual_column): Add location_t param.
7762 Handle the column number being zero by effectively disabling the
7763 warning, with an "inform".
7764 (should_warn_for_misleading_indentation): Add location_t argument
7765 for all uses of get_visual_column.
7766
21efdd80
PP
77672016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7768
7769 PR c++/69029
7770 * c-indentation.c (should_warn_for_misleading_indentation):
7771 Don't warn about do-while statements.
7772
7a127fa7
MS
77732016-01-07 Martin Sebor <msebor@redhat.com>
7774
7775 PR c/68966
7776 * c-common.c (sync_resolve_size): Reject first argument when it's
7777 a pointer to _Bool.
7778
c589e975
DM
77792016-01-05 David Malcolm <dmalcolm@redhat.com>
7780
7781 PR c/69122
7782 * c-indentation.c (get_visual_column): Remove default argument.
7783 (should_warn_for_misleading_indentation): For the multiline case,
7784 update call to get_visual_column for next_stmt_exploc so that it
7785 captures the location of the first non-whitespace character in the
7786 relevant line. Don't issue warnings if there is non-whitespace
7787 before the next statement.
7788
818ab71a
JJ
77892016-01-04 Jakub Jelinek <jakub@redhat.com>
7790
7791 Update copyright years.
7792
745e411d
DM
77932015-12-21 David Malcolm <dmalcolm@redhat.com>
7794
7795 * c-common.c (binary_op_error): Convert first param from
7796 location_t to rich_location * and use it when emitting an error.
7797 * c-common.h (binary_op_error): Convert first param from
7798 location_t to rich_location *.
7799
de67c4c3
DM
78002015-12-16 David Malcolm <dmalcolm@redhat.com>
7801
7802 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7803 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7804
4a38b02b
IV
78052015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7806
7807 * c-common.c (c_common_attribute_table): Handle "omp declare target
7808 link" attribute.
7809
54d62f51
JJ
78102015-12-14 Jakub Jelinek <jakub@redhat.com>
7811
7812 PR c/68833
7813 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7814
8d4227c8
TB
78152014-12-12 Tobias Burnus <burnus@net-b.de>
7816
7817 PR fortran/68815
7818 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7819 specifiers (%d, %i,%u and %c).
7820
f6069ccc
DM
78212015-12-10 David Malcolm <dmalcolm@redhat.com>
7822
7823 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7824
63bbf46d
JJ
78252015-12-08 Jakub Jelinek <jakub@redhat.com>
7826
7827 PR c/48088
7828 PR c/68657
7829 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7830 * c-pragma.c (handle_pragma_diagnostic): Adjust
7831 control_warning_option caller.
7832
f79520bb
DM
78332015-12-07 David Malcolm <dmalcolm@redhat.com>
7834
7835 * c-common.c (c_cpp_error): Update for change to
7836 rich_location::set_range.
7837
b3d5bc62
JJ
78382015-12-04 Paolo Bonzini <bonzini@gnu.org>
7839
7840 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7841 shifting 1 out of the sign bit.
7842
78432015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7844
7845 * c-common.c (c_common_attribute_table[]): Update max arguments
7846 count for "simd" attribute.
7847 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7848
6eb4a537
JJ
78492015-12-03 Jakub Jelinek <jakub@redhat.com>
7850
7851 PR preprocessor/57580
7852 * c-ppoutput.c (print): Change printed field to bool.
7853 Move src_file last for smaller padding.
7854 (init_pp_output): Set print.printed to false instead of 0.
7855 (scan_translation_unit): Fix up formatting. Set print.printed
7856 to true after printing something other than newline.
7857 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7858 (maybe_print_line_1): Set print.printed to false instead of 0.
7859 (print_line_1): Likewise.
7860 (do_line_change): Set print.printed to true instead of 1.
7861 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7862 dump_macro): Set print.printed to false after printing newline.
7863
4250754e
JM
78642015-12-02 Jason Merrill <jason@redhat.com>
7865
f479b43d
JM
7866 * c-common.c (fold_for_warn): New.
7867 (warn_logical_operator, warn_tautological_cmp)
7868 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7869
4250754e
JM
7870 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7871 (c_fully_fold_internal, decl_constant_value_for_optimization):
7872 Move to c/c-fold.c.
7873 * c-common.h: Don't declare decl_constant_value_for_optimization.
7874
e9e32ee6
JM
78752015-12-02 Joseph Myers <joseph@codesourcery.com>
7876
7877 PR c/68162
7878 * c-common.h (c_build_qualified_type): Add extra default
7879 arguments.
7880
37d5ad46
JB
78812015-12-01 Julian Brown <julian@codesourcery.com>
7882 Cesar Philippidis <cesar@codesourcery.com>
7883 James Norris <James_Norris@mentor.com>
7884
7885 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7886 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7887 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7888
f07862c7
EB
78892015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7890
7891 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7892 (decl_sloc_common): Delete and move bulk of processing to...
7893 (decl_sloc): ...here.
7894 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7895 (dump_ada_double_name): Remove S parameter and compute the suffix.
7896 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7897 element type and deal with an anonymous one.
7898 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7899 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7900 and remove reference to QUAL_UNION_TYPE.
7901 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7902 (dump_nested_type): ...here. New function extracted from above.
7903 Generate a full declaration for anonymous element type of arrays.
7904 (print_ada_declaration): Really skip anonymous declarations. Remove
7905 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7906 Clean up processing of declarations of array types and objects.
7907 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7908 Remove obsolete code and tidy up.
7909
75c8aac3
JH
79102015-11-29 Jan Hubicka <hubicka@ucw.cz>
7911
7912 PR c/67581
7913 * c-common.c (handle_transparent_union_attribute): Update
7914 also type variants.
7915
b58d3df2
ML
79162015-11-27 Martin Liska <mliska@suse.cz>
7917
7918 PR c++/68312
7919 * array-notation-common.c (cilkplus_extract_an_triplets):
7920 Release vector of vectors.
7921 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7922
89a01fcf
EB
79232015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7924
7925 PR c++/68527
7926 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7927 (print_ada_struct_decl): Likewise.
7928
cc5c5226
IZ
79292015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7930
7931 PR c++/68001
7932 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7933 * cilk.c (recognize_spawn): Determine location in a more precise
7934 way.
7935
269adb9d
JM
79362015-11-19 Jason Merrill <jason@redhat.com>
7937
7938 * c-common.c (shorten_compare): But look through macros from
7939 system headers.
7940
d0eccfcd
JM
79412015-11-18 Jason Merrill <jason@redhat.com>
7942
7943 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7944 non-constant operand comes from a macro.
7945
3e44547c
JM
79462015-11-17 Jason Merrill <jason@redhat.com>
7947
7948 PR bootstrap/68346
7949 * c-common.c (warn_tautological_cmp): Fold before checking for
7950 constants.
7951
0f62c7a0
MP
79522015-11-16 Marek Polacek <polacek@redhat.com>
7953
7954 PR c++/68362
7955 * c-common.c (check_case_bounds): Fold low and high cases.
7956
a868811e
MP
79572015-11-16 Marek Polacek <polacek@redhat.com>
7958
7959 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7960 * c-common.c (c_common_get_alias_set): Likewise.
7961 (handle_visibility_attribute): Likewise.
7962
fff77217
KY
79632015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7964
7965 * c-common.c (handle_simd_attribute): New.
7966 (struct attribute_spec): Add entry for "simd".
7967 (handle_simd_attribute): New.
7968
269e63b7
KT
79692015-11-13 Kai Tietz <ktietz70@googlemail.com>
7970
7971 * c-lex.c (interpret_float): Use fold_convert.
7972
ebedc9a3
DM
79732015-11-13 David Malcolm <dmalcolm@redhat.com>
7974
7975 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7976 and store it on the result.
7977 * c-opts.c (c_common_init_options): Set
7978 global_dc->colorize_source_p.
7979
6e232ba4
JN
79802015-11-12 James Norris <jnorris@codesourcery.com>
7981 Joseph Myers <joseph@codesourcery.com>
7982
7365279f 7983 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7984 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7985 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7986 PRAGMA_OACC_CLAUSE_LINK.
7987
e78bede6
MP
79882015-11-11 Marek Polacek <polacek@redhat.com>
7989
7990 PR c/68107
7991 PR c++/68266
7992 * c-common.c (valid_array_size_p): New function.
7993 * c-common.h (valid_array_size_p): Declare.
7994
3f8257db 79952015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7996
7997 PR bootstrap/68271
7998 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7999
69f293c9
AM
80002015-11-11 Andrew MacLeod <amacleod@redhat.com>
8001
8002 * array-notation-common.c: Remove unused header files.
8003 * c-ada-spec.c: Likewise.
8004 * c-cilkplus.c: Likewise.
8005 * c-common.c: Likewise.
8006 * c-cppbuiltin.c: Likewise.
8007 * c-dump.c: Likewise.
8008 * c-format.c: Likewise.
8009 * c-gimplify.c: Likewise.
8010 * c-indentation.c: Likewise.
8011 * c-lex.c: Likewise.
8012 * c-omp.c: Likewise.
8013 * c-opts.c: Likewise.
8014 * c-pch.c: Likewise.
8015 * c-ppoutput.c: Likewise.
8016 * c-pragma.c: Likewise.
8017 * c-pretty-print.c: Likewise.
8018 * c-semantics.c: Likewise.
8019 * c-ubsan.c: Likewise.
8020 * cilk.c: Likewise.
8021 * stub-objc.c: Likewise.
8022
3a40d81d
NS
80232015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8024 Cesar Philippidis <cesar@codesourcery.com>
8025 James Norris <jnorris@codesourcery.com>
8026 Julian Brown <julian@codesourcery.com>
8027 Nathan Sidwell <nathan@codesourcery.com>
8028
8029 * c-pragma.c (oacc_pragmas): Add "routine".
8030 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8031
ee45a32d
EB
80322015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8033
8034 * c-common.c (c_common_attributes): Add scalar_storage_order.
8035 (handle_scalar_storage_order_attribute): New function.
8036 * c-pragma.c (global_sso): New variable.
8037 (maybe_apply_pragma_scalar_storage_order): New function.
8038 (handle_pragma_scalar_storage_order): Likewise.
8039 (init_pragma): Register scalar_storage_order.
8040 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8041 * c.opt (Wscalar-storage-order): New warning.
8042 (fsso-struct=): New option.
8043
eb11eb15
MS
80442015-11-08 Martin Sebor <msebor@redhat.com>
8045
8046 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8047
0aad0198
RS
80482015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8049
8050 * c-common.c: Don't undef DEF_BUILTIN.
8051
8a645150
DM
80522015-11-06 David Malcolm <dmalcolm@redhat.com>
8053
8054 * c-common.c (c_cpp_error): Convert parameter from location_t to
8055 rich_location *. Eliminate the "column_override" parameter and
8056 the call to diagnostic_override_column.
8057 Update the "done_lexing" clause to set range 0
8058 on the rich_location, rather than overwriting a location_t.
8059 * c-common.h (c_cpp_error): Convert parameter from location_t to
8060 rich_location *. Eliminate the "column_override" parameter.
8061
7a5e4956
CP
80622015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8063 Thomas Schwinge <thomas@codesourcery.com>
8064 James Norris <jnorris@codesourcery.com>
8065
8066 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8067 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8068 clauses with parallel and kernels and loops.
8069 * c-pragma.h (enum pragma_omp_clause): Add entries for
8070 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8071 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8072 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8073 INDEPENDENT,SEQ}.
8074 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8075
e2f5cc96
MS
80762015-11-05 Martin Sebor <msebor@redhat.com>
8077
8078 PR c++/67942
8079 * c.opt (-Wplacement-new): New option.
8080
e01d41e5
JJ
80812015-11-05 Jakub Jelinek <jakub@redhat.com>
8082
8083 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8084 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8085 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8086 save_expr or create_tmp_var* if TEST is true.
8087 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8088 Don't call add_stmt here.
8089 (struct c_omp_check_loop_iv_data): New type.
8090 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8091 c_omp_check_loop_iv_exprs): New functions.
8092 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8093 distribute.
8094 (c_omp_declare_simd_clauses_to_numbers): Change
8095 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8096 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8097 from numbers to PARM_DECLs.
8098
595278be
MM
80992015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8100
8101 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8102 flag_checking.
8103
3f8257db 81042015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8105
8106 PR c++-common/67882
b3d5bc62
JJ
8107 * c-common.h (fold_offsetof_1): Add argument.
8108 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8109 offsetof expressions that reference elements past the end of
8110 an array.
8111
4bf9e5a8
TS
81122015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8113 Chung-Lin Tang <cltang@codesourcery.com>
8114
8115 * c-pragma.c (oacc_pragmas): Add "atomic".
8116 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8117
3b1661a9
ES
81182015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8119
8120 * c-common.c (handle_target_clones_attribute): New.
8121 (c_common_attribute_table): Add handle_target_clones_attribute.
8122 (handle_always_inline_attribute): Add check on target_clones attribute.
8123 (handle_target_attribute): Ditto.
8124
2adfab87
AM
81252015-10-29 Andrew MacLeod <amacleod@redhat.com>
8126
8127 * array-notation-common.c: Reorder #include's and remove duplicates.
8128 * c-ada-spec.c: Likewise.
8129 * c-cilkplus.c: Likewise.
8130 * c-common.c: Likewise.
8131 * c-cppbuiltin.c: Likewise.
8132 * c-dump.c: Likewise.
8133 * c-format.c: Likewise.
8134 * c-gimplify.c: Likewise.
8135 * c-indentation.c: Likewise.
8136 * c-lex.c: Likewise.
8137 * c-omp.c: Likewise.
8138 * c-opts.c: Likewise.
8139 * c-pch.c: Likewise.
8140 * c-ppoutput.c: Likewise.
8141 * c-pragma.c: Likewise.
8142 * c-pretty-print.c: Likewise.
8143 * c-semantics.c: Likewise.
8144 * c-ubsan.c: Likewise.
8145 * cilk.c: Likewise.
8146 * stub-objc.c: Likewise.
8147
d90ec4f2
JM
81482015-10-28 Jason Merrill <jason@redhat.com>
8149
8150 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8151
88bae6f4
TS
81522015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8153 James Norris <jnorris@codesourcery.com>
8154 Cesar Philippidis <cesar@codesourcery.com>
8155
8156 PR c/64765
8157 PR c/64880
8158 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8159 * c-omp.c (c_oacc_split_loop_clauses): New function.
8160
b1726d6c
MS
81612015-10-21 Martin Sebor <msebor@redhat.com>
8162
8163 PR driver/68043
8164 * c.opt: End each sentence that describes an option with a period.
8165
fa60eeb9
MP
81662015-10-20 Marek Polacek <polacek@redhat.com>
8167
8168 * array-notation-common.c (is_cilkplus_vector_p): Define.
8169 * c-common.h (is_cilkplus_vector_p): Declare.
8170
95979049
MP
81712015-10-20 Marek Polacek <polacek@redhat.com>
8172
8173 * c.opt (std=gnu++11): Do not describe as experimental.
8174 (std=gnu++14): Likewise.
8175
2a9fb712
JM
81762015-10-19 Jason Merrill <jason@redhat.com>
8177
8178 * c-cppbuiltin.c (c_cpp_builtins): Define
8179 __cpp_nontype_template_args.
8180
13b380a3
JM
81812015-10-19 Jason Merrill <jason@redhat.com>
8182
8183 * c-cppbuiltin.c (c_cpp_builtins): Define
8184 __cpp_enumerator_attributes, __cpp_fold_expressions,
8185 __cpp_unicode_characters.
8186
d9a6bd32
JJ
81872015-10-13 Jakub Jelinek <jakub@redhat.com>
8188 Aldy Hernandez <aldyh@redhat.com>
8189
8190 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8191 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8192 (c_define_builtins): Likewise.
8193 * c-common.h (enum c_omp_clause_split): Add
8194 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8195 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8196 (c_finish_omp_for): Add ORIG_DECLV argument.
8197 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8198 201511 instead of 201307.
8199 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8200 OMP_CRITICAL_CLAUSES to it.
8201 (c_finish_omp_ordered): Add CLAUSES argument, set
8202 OMP_ORDERED_CLAUSES to it.
8203 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8204 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8205 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8206 constructs and new OpenMP 4.5 clauses. Clear
8207 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8208 verification code.
8209 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8210 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8211 (enum pragma_omp_clause): Add
8212 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8213 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8214
624d31fe
RS
82152015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8216
8217 * c-lex.c (interpret_float): Use real_equal instead of
8218 REAL_VALUES_EQUAL.
8219
b8fd7909
JM
82202015-10-04 Jason Merrill <jason@redhat.com>
8221
8222 Implement N4514, C++ Extensions for Transactional Memory.
8223 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8224 (c_common_attribute_table): Add transaction_safe_dynamic.
8225 transaction_safe now affects type identity.
8226 (handle_tm_attribute): Handle transaction_safe_dynamic.
8227 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8228 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8229 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8230 (D_TRANSMEM): New.
8231 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8232 * c-pretty-print.c (pp_c_attributes_display): Don't print
8233 transaction_safe in C++.
8234
12651878
MP
82352015-10-02 Marek Polacek <polacek@redhat.com>
8236
8237 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8238
3e3b8d63
MP
82392015-10-02 Marek Polacek <polacek@redhat.com>
8240
8241 PR c/64249
8242 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8243 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8244 * c.opt (Wduplicated-cond): New option.
8245
0d1a8f75
JM
82462015-10-01 Joseph Myers <joseph@codesourcery.com>
8247
8248 * c.opt (std=c11): Do not describe as experimental.
8249 (std=gnu11): Likewise.
8250 (std=iso9899:2011): Likewise.
8251
3e32ee19
NS
82522015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8253
8254 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8255 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8256
974348ee
MP
82572015-09-25 Marek Polacek <polacek@redhat.com>
8258
8259 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8260 (ubsan_instrument_shift): Likewise.
8261
15dbc1a6
MP
82622015-09-25 Marek Polacek <polacek@redhat.com>
8263
8264 PR sanitizer/64906
8265 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8266
6b95d7cc
PP
82672015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8268
8269 * c-indentation.c (should_warn_for_misleading_indentation):
8270 Compare next_stmt_vis_column with guard_line_first_nws instead
8271 of with guard_line_vis_column.
8272
c1822f9c
MLI
82732015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8274
8275 PR c/49654
8276 PR c/49655
8277 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8278 options and options not valid for the current language.
8279
d5398058
PP
82802015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8281
8282 * c-indentation.c (should_warn_for_misleading_indentation):
8283 Float out and consolidate the calls to get_visual_column that
8284 are passed guard_exploc as an argument. Compare
8285 next_stmt_vis_column with guard_line_first_nws instead of with
8286 body_line_first_nws.
8287
6b333269
NS
82882015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8289
8290 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8291 Wnamespaces): New C++ warnings.
8292
a75f1574
JM
82932015-09-22 Jason Merrill <jason@redhat.com>
8294
8295 * c-common.h (abi_compat_version_crosses): New.
8296 (warn_abi_version): Declare.
8297 * c-common.c: Define it.
8298 * c-opts.c (c_common_post_options): Handle it.
8299 flag_abi_compat_version defaults to 8.
8300
bdaaa8b7
VV
83012015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8302
8303 Complete the implementation of N4230, Nested namespace definition.
8304 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8305 __cpp_nested_namespace_definitions.
8306
eaa797e8
MLI
83072015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8308
8309 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8310
c4914de6
MLI
83112015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8312
8313 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8314 when warning.
8315 * c-pragma.h (pragma_lex): Add optional loc argument.
8316
fcb87c50
MM
83172015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8318
8319 * c-format.c (check_format_arg): Adjust to use common block size in all
8320 object pools.
8321
31bdd08a
DM
83222015-09-15 David Malcolm <dmalcolm@redhat.com>
8323
8324 * c-format.c (location_from_offset): Update for change in
8325 signature of location_get_source_line.
8326 * c-indentation.c (get_visual_column): Likewise.
8327 (line_contains_hash_if): Likewise.
8328
aa9f4b4c
MP
83292015-09-14 Marek Polacek <polacek@redhat.com>
8330
8331 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8332 setting various warnings.
8333
aa256c4a
MP
83342015-09-14 Marek Polacek <polacek@redhat.com>
8335
8336 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8337 a negative value.
8338
0f876f22
MW
83392015-09-11 Mark Wielaard <mjw@redhat.com>
8340
8341 PR c/28901
8342 * c.opt (Wunused-variable): Option from common.opt.
8343 (Wunused-const-variable): New option.
8344
273aa49e
PC
83452015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8346
8347 PR c++/53184
8348 * c.opt ([Wsubobject-linkage]): Add.
8349
1807ffc1
MS
83502015-09-03 Martin Sebor <msebor@redhat.com>
8351
8352 PR c/66516
8353 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8354 functions.
8355 * c-common.c (reject_gcc_builtin): Define.
8356
38942840
BI
83572015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8358
8359 PR middle-end/60586
8360 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8361 prototype.
8362 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8363 cilk_gimplify_call_params_in_spawned_fn.
8364 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8365 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8366 unwrapping.
8367
c316b5e4
MP
83682015-08-25 Marek Polacek <polacek@redhat.com>
8369
8370 PR middle-end/67330
8371 * c-common.c (handle_weak_attribute): Don't check whether the
8372 visibility can be changed here.
8373
584a7c46
MLI
83742015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8375
8376 * c-lex.c (c_lex_with_flags): Use explicit locations.
8377
a79683d5
TS
83782015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8379
8380 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8381 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8382
61717a45
FXC
83832015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8384
8385 PR middle-end/36757
8386 * c-common.c (check_builtin_function_arguments): Add check
8387 for BUILT_IN_SIGNBIT argument.
8388
329524f5
PC
83892015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8390
8391 PR c++/67160
8392 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8393 in c++1z mode.
8394
4ee55665
MP
83952015-08-17 Marek Polacek <polacek@redhat.com>
8396
8397 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8398 with whitespaces before qualifier names.
8399
b893e375
MP
84002015-08-12 Marek Polacek <polacek@redhat.com>
8401
8402 PR c++/55095
8403 * c-common.c (maybe_warn_shift_overflow): Properly handle
8404 left-shifting 1 into the sign bit.
8405
c2d89095
MLI
84062015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8407
8408 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8409
971e17ff
AS
84102015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8411 Braden Obrzut <admin@maniacsvault.net>
8412 Jason Merrill <jason@redhat.com>
8413
8414 Add C++ Concepts TS support.
8415 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8416 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8417 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8418 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8419 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8420 * c.opt (fconcepts): New.
8421
b3d5bc62
JJ
84222015-08-02 Martin Sebor <msebor@redhat.com>
8423
8424 * c.opt (-Wframe-address): New warning option.
8425
8ebca419
PP
84262015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8427
8428 * c-indentation.c (should_warn_for_misleading_indentation):
8429 Improve heuristics.
8430
1a1e101f
PP
84312015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8432
8433 * c-indentation.c (get_visual_column): Add parameter first_nws,
8434 use it. Update comment documenting the function.
8435 (is_first_nonwhitespace_on_line): Remove.
8436 (should_warn_for_misleading_indentation): Replace usage of
8437 of is_first_nonwhitespace_on_line with get_visual_column.
8438
992118a1
PP
84392015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8440
8441 * c-indentation.h (struct token_indent_info): Define.
8442 (get_token_indent_info): Define.
8443 (warn_for_misleading_information): Declare.
8444 * c-common.h (warn_for_misleading_information): Remove.
8445 * c-identation.c (warn_for_misleading_indentation):
8446 Change declaration to take three token_indent_infos. Adjust
8447 accordingly.
8448 * c-identation.c (should_warn_for_misleading_indentation):
8449 Likewise. Bail out early if the body is a compound statement.
8450 (guard_tinfo_to_string): Define.
8451
e8fa3817
JM
84522015-07-30 Jason Merrill <jason@redhat.com>
8453
8454 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8455 '*' for reference decay.
8456
173864e8
MP
84572015-07-30 Marek Polacek <polacek@redhat.com>
8458
8459 * c-common.c (warn_tautological_cmp): Bail for float types.
8460
f2afe6dd
MP
84612015-07-27 Marek Polacek <polacek@redhat.com>
8462
8463 PR bootstrap/67030
8464 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8465
05b28fd6
MP
84662015-07-27 Marek Polacek <polacek@redhat.com>
8467
8468 PR c++/66555
8469 PR c/54979
8470 * c-common.c (find_array_ref_with_const_idx_r): New function.
8471 (warn_tautological_cmp): New function.
8472 * c-common.h (warn_tautological_cmp): Declare.
8473 * c.opt (Wtautological-compare): New option.
8474
5a5062b8
MP
84752015-07-23 Marek Polacek <polacek@redhat.com>
8476
8477 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8478 (ubsan_instrument_shift): Likewise.
8479
dc891fe7
MP
84802015-07-23 Marek Polacek <polacek@redhat.com>
8481
8482 PR sanitizer/66908
8483 * c-ubsan.c: Include gimplify.h.
8484 (ubsan_instrument_division): Unshare OP0 and OP1.
8485 (ubsan_instrument_shift): Likewise.
8486
451b5e48
MP
84872015-07-20 Marek Polacek <polacek@redhat.com>
8488 Richard Sandiford <richard.sandiford@arm.com>
8489
8490 PR c++/55095
8491 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8492 Use EXPR_LOC_OR_LOC.
8493 (maybe_warn_shift_overflow): New function.
8494 * c-common.h (maybe_warn_shift_overflow): Declare.
8495 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8496 * c.opt (Wshift-overflow): New option.
8497
fb0b2914
ML
84982015-07-16 Martin Liska <mliska@suse.cz>
8499
8500 * c-format.c (static void check_format_info_main): Use
8501 object_allocator instead of pool_allocator.
8502 (check_format_arg): Likewise.
8503 (check_format_info_main): Likewise.
8504
903f5c23
AM
85052015-07-15 Andrew MacLeod <amacleod@redhat.com>
8506
8507 * c-opts.c: Remove multiline #include comment.
8508
026c3cfd
AH
85092015-07-12 Aldy Hernandez <aldyh@redhat.com>
8510
8511 * c-common.c: Fix double word typos.
8512
bb49ee66
EB
85132015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8514
8515 * c-ada-spec.h (cpp_operation): Revert latest change.
8516 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8517 constructors and destructors.
8518
1916bcb5
AM
85192015-07-09 Andrew MacLeod <amacleod@redhat.com>
8520
8521 * c-common.h: Adjust includes for flags.h changes.
8522 * stub-objc.c: Likewise.
026c3cfd 8523
a9dcd529
EB
85242015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8525
8526 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8527 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8528
b03b462f
JJ
85292015-07-08 Jakub Jelinek <jakub@redhat.com>
8530
8531 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8532 are to be removed, return NULL rather than original clauses list.
8533
c7131fb2
AM
85342015-07-07 Andrew MacLeod <amacleod@redhat.com>
8535
8536 * array-notation-common.c: Adjust includes.
8537 * c-ada-spec.c: Likewise.
8538 * c-cilkplus.c: Likewise.
8539 * c-common.h: Likewise.
8540 * c-cppbuiltin.c: Likewise.
8541 * c-dump.c: Likewise.
8542 * c-format.c: Likewise.
8543 * c-gimplify.c: Likewise.
8544 * c-indentation.c: Likewise.
8545 * c-lex.c: Likewise.
8546 * c-omp.c: Likewise.
8547 * c-opts.c: Likewise.
8548 * c-pch.c: Likewise.
8549 * c-ppoutput.c: Likewise.
8550 * c-pragma.c: Likewise.
8551 * c-pretty-print.c: Likewise.
8552 * c-semantics.c: Likewise.
8553 * c-ubsan.c: Likewise.
8554 * cilk.c: Likewise.
8555 * stub-objc.c: Likewise.
8556
2a7fb83f
EB
85572015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8558
8559 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8560 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8561
a03c9bf1
JM
85622015-07-01 Jason Merrill <jason@redhat.com>
8563
36a85135
JM
8564 * c-common.h (D_CXX11): Rename from D_CXX0X.
8565 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8566 * c-common.c: Adjust.
8567
e7fa68d5
JM
8568 * c-opts.c (c_common_post_options): Default to C++14.
8569
a03c9bf1
JM
8570 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8571
fe95b036
ESR
85722015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8573
8574 Implement N4197 - Adding u8 character literals
b3d5bc62 8575 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8576 CPP_CHAR.
b3d5bc62 8577 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8578 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8579 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8580 and CPP_UTF8CHAR tokens.
8581 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8582
da2e71c9
MLI
85832015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8584
8585 PR fortran/66605
8586 * c-common.c (do_warn_unused_parameter): Move here.
8587 * c-common.h (do_warn_unused_parameter): Declare.
8588
b155cfd9
MP
85892015-06-29 Marek Polacek <polacek@redhat.com>
8590
8591 PR c/66322
8592 * c-common.c (check_case_bounds): Add bool * parameter. Set
8593 OUTSIDE_RANGE_P.
8594 (c_add_case_label): Add bool * parameter. Pass it down to
8595 check_case_bounds.
8596 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8597 warning here.
8598 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8599 declarations.
8600
31521951
MP
86012015-06-27 Marek Polacek <polacek@redhat.com>
8602
8603 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8604 or VECTOR_INTEGER_TYPE_P throughout.
8605 * c-gimplify.c: Likewise.
8606
22d03525
MP
86072015-06-26 Marek Polacek <polacek@redhat.com>
8608
8609 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8610 * c-common.c (c_fully_fold_internal): Likewise.
8611 (c_alignof_expr): Likewise.
8612 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8613 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8614 * cilk.c (create_parm_list): Likewise.
22d03525 8615
af05e6e5
MP
86162015-06-26 Marek Polacek <polacek@redhat.com>
8617
8618 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8619
f0889939
AM
86202015-06-25 Andrew MacLeod <amacleod@redhat.com>
8621
8622 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8623 * c-gimplify.c: Likewise.
8624 * c-pragma.c: Likewise.
8625 * c-ubsan.c: Likewise.
8626 * cilk.c: Likewise.
8627
ca752f39
RS
86282015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8629
8630 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8631 ggc_hasher.
8632
16a16ec7
AM
86332015-06-25 Andrew MacLeod <amacleod@redhat.com>
8634
8635 * cilk.c: Move calls.h after tm.h in the include chain.
8636
0ae9bd27
MP
86372015-06-25 Marek Polacek <polacek@redhat.com>
8638
8639 * array-notation-common.c: Use VAR_P throughout.
8640 * c-ada-spec.c: Likewise.
8641 * c-common.c: Likewise.
8642 * c-format.c: Likewise.
8643 * c-gimplify.c: Likewise.
8644 * c-omp.c: Likewise.
8645 * c-pragma.c: Likewise.
8646 * c-pretty-print.c: Likewise.
8647 * cilk.c: Likewise.
8648
62f9079a
MP
86492015-06-25 Marek Polacek <polacek@redhat.com>
8650
8651 * cilk.c (extract_free_variables): Use is_global_var.
8652
0fa16060
RS
86532015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8654
8655 * c-common.c: Don't include target-def.h.
8656
a68ae2e1
MP
86572015-06-23 Marek Polacek <polacek@redhat.com>
8658
8659 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8660 when comparing INTEGER_CSTs.
8661
c6a2f2d9
PMR
86622015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8663
8664 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8665 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8666 (dump_ada_template): Skip partially specialized types.
8667
6b4db501
MM
86682015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8669
8670 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8671 swapping.
8672
abb226c9
AM
86732015-06-17 Andrew MacLeod <amacleod@redhat.com>
8674
8675 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8676 * c-ada-spec.c: Likewise.
8677 * c-cilkplus.c: Likewise.
8678 * c-common.c: Likewise.
8679 * c-common.h: Likewise.
8680 * c-cppbuiltin.c: Likewise.
8681 * c-dump.c: Likewise.
8682 * c-format.c: Likewise.
8683 * c-gimplify.c: Likewise.
8684 * c-indentation.c: Likewise.
8685 * c-lex.c: Likewise.
8686 * c-omp.c: Likewise.
8687 * c-opts.c: Likewise.
8688 * c-pch.c: Likewise.
8689 * c-ppoutput.c: Likewise.
8690 * c-pragma.c: Likewise.
8691 * c-pretty-print.c: Likewise.
8692 * c-semantics.c: Likewise.
8693 * c-ubsan.c: Likewise.
8694 * cilk.c: Likewise.
8695 * stub-objc.c: Likewise.
8696
076fecad
PP
86972015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8698
8699 PR c++/65168
8700 * c-common.c (c_common_truthvalue_conversion): Warn when
8701 converting an address of a reference to a truth value.
8702
13fdf2e2
AM
87032015-06-08 Andrew MacLeod <amacleod@redhat.com>
8704
8705 * array-notation-common.c : Adjust include files.
8706 * c-ada-spec.c : Likewise.
8707 * c-cilkplus.c : Likewise.
8708 * c-common.c : Likewise.
8709 * c-common.h : Likewise.
8710 * c-cppbuiltin.c : Likewise.
8711 * c-dump.c : Likewise.
8712 * c-format.c : Likewise.
8713 * c-gimplify.c : Likewise.
8714 * c-indentation.c : Likewise.
8715 * c-lex.c : Likewise.
8716 * c-omp.c : Likewise.
8717 * c-opts.c : Likewise.
8718 * c-pch.c : Likewise.
8719 * c-ppoutput.c : Likewise.
8720 * c-pragma.c : Likewise.
8721 * c-pretty-print.c : Likewise.
8722 * c-semantics.c : Likewise.
8723 * c-ubsan.c : Likewise.
8724 * cilk.c : Likewise.
8725 * stub-objc.c : Likewise.
8726
a1661b90
MP
87272015-06-08 Marek Polacek <polacek@redhat.com>
8728
8729 PR c/66415
8730 * c-format.c (location_from_offset): Return LOC if LINE is null.
8731
d7438551
AH
87322015-06-05 Aldy Hernandez <aldyh@redhat.com>
8733
8734 * c-common.h (c_parse_final_cleanups): New prototype.
8735 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8736
b3d5bc62
JJ
87372015-06-04 Sriraman Tallam <tmsriram@google.com>
8738
8739 * c-common.c (noplt): New attribute.
8740 (handle_noplt_attribute): New handler.
8741
ecb9f223
AM
87422015-06-04 Andrew MacLeod <amacleod@redhat.com>
8743
8744 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8745 * c-ada-spec.c: Likewise.
8746 * c-cilkplus.c: Likewise.
8747 * c-common.c: Likewise.
8748 * c-common.h: Likewise.
8749 * c-cppbuiltin.c: Likewise.
8750 * c-dump.c: Likewise.
8751 * c-format.c: Likewise.
8752 * c-gimplify.c: Likewise.
8753 * c-indentation.c: Likewise.
8754 * c-lex.c: Likewise.
8755 * c-omp.c: Likewise.
8756 * c-opts.c: Likewise.
8757 * c-pch.c: Likewise.
8758 * c-ppoutput.c: Likewise.
8759 * c-pragma.c: Likewise.
8760 * c-pretty-print.c: Likewise.
8761 * c-semantics.c: Likewise.
8762 * c-ubsan.c: Likewise.
8763 * cilk.c: Likewise.
8764 * stub-objc.c: Likewise.
8765
6ac48155
DM
87662015-06-02 David Malcolm <dmalcolm@redhat.com>
8767
8768 PR c/66220:
8769 * c-indentation.c (should_warn_for_misleading_indentation): Use
8770 expand_location rather than expand_location_to_spelling_point.
8771 Don't warn if the guarding statement is more indented than the
8772 next/body stmts.
8773
773ce42e
DM
87742015-06-02 David Malcolm <dmalcolm@redhat.com>
8775
8776 * c-indentation.c (warn_for_misleading_indentation): Bail out
8777 immediately if -Wmisleading-indentation isn't enabled.
8778
4fef8379
ML
87792015-06-01 Martin Liska <mliska@suse.cz>
8780
8781 * c-format.c (check_format_arg):Use new type-based pool allocator.
8782 (check_format_info_main) Likewise.
8783
1edfb384
EB
87842015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8785
8786 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8787 (has_nontrivial_methods): Likewise.
8788
9677ef52
MP
87892015-05-25 Marek Polacek <polacek@redhat.com>
8790
8791 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8792
fd5c817a
MP
87932015-05-22 Marek Polacek <polacek@redhat.com>
8794
8795 PR c/47043
8796 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8797
a2f45fe6 87982015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8799
8800 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8801 STACK_GROWS_DOWNWARD.
8802
a2f45fe6 88032015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8804
8805 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8806 STACK_GROWS_DOWNWARD rather than if it is defined.
8807
0fee2ac2 88082015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8809
0fee2ac2
MLI
8810 PR c/52952
8811 * c-format.c (location_column_from_byte_offset): New.
8812 (location_from_offset): New.
8813 (struct format_wanted_type): Add offset_loc field.
8814 (check_format_info): Move handling of location for extra arguments
8815 closer to the point of warning.
8816 (check_format_info_main): Pass the result of location_from_offset
8817 to warning_at.
8818 (format_type_warning): Pass the result of location_from_offset
8819 to warning_at.
8820
cf4ef6f7
MP
88212015-05-20 Marek Polacek <polacek@redhat.com>
8822
8823 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8824
3a65ee74
MP
88252015-05-20 Marek Polacek <polacek@redhat.com>
8826
8827 * c-ada-spec.c (dump_sloc): Use DECL_P.
8828
21b634ae
MP
88292015-05-20 Marek Polacek <polacek@redhat.com>
8830
8831 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8832 * c-common.c: Likewise.
8833
0e50b624
DM
88342015-05-19 David Malcolm <dmalcolm@redhat.com>
8835
8836 * c-common.h (fe_file_change): Strengthen param from
8837 const line_map * to const line_map_ordinary *.
8838 (pp_file_change): Likewise.
8839 * c-lex.c (fe_file_change): Likewise.
8840 (cb_define): Use linemap_check_ordinary when invoking
8841 SOURCE_LINE.
8842 (cb_undef): Likewise.
8843 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8844 invoking cb_file_change.
8845 (c_finish_options): Likewise.
8846 (push_command_line_include): Likewise.
8847 (cb_file_change): Strengthen param "new_map" from
8848 const line_map * to const line_map_ordinary *.
8849 * c-ppoutput.c (cb_define): Likewise for local "map".
8850 (pp_file_change): Likewise for param "map" and local "from".
8851
fab27f52
MM
88522015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8853
8854 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8855
2fe1d762
TV
88562015-05-18 Tom de Vries <tom@codesourcery.com>
8857
8858 * c-common.c (build_va_arg_1): New function.
8859 (build_va_arg): Add address operator to va_list operand if necessary.
8860
7a37fa90
MM
88612015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8862
8863 PR c/48956
8864 * c-common.c (int_safely_convertible_to_real_p): Define.
8865 (unsafe_conversion_p): Check conversions involving complex types.
8866 (conversion_warning): Add new warning message for conversions which
8867 discard imaginary component.
8868 * c-common.h: (enum conversion_safety): Add new enumerator for such
8869 conversions.
8870
3aa3c9fc
MP
88712015-05-14 Marek Polacek <polacek@redhat.com>
8872
8873 PR c/66066
8874 PR c/66127
8875 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8876 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8877 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8878 use it. If FOR_INT_CONST, require that all evaluated operands be
8879 INTEGER_CSTs.
8880
c3388e62
DM
88812015-05-12 David Malcolm <dmalcolm@redhat.com>
8882
8883 * c-common.h (warn_for_misleading_indentation): New prototype.
8884 * c-indentation.c: New file.
8885 * c.opt (Wmisleading-indentation): New option.
8886
c7b38fd5
TV
88872015-05-12 Tom de Vries <tom@codesourcery.com>
8888
8889 PR tree-optimization/66010
8890 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8891
381bf11e
JM
88922015-05-09 Jason Merrill <jason@redhat.com>
8893
edff0c06
JM
8894 * c-opts.c (c_common_post_options): Also clear
8895 cpp_opts->cpp_warn_cxx11_compat.
8896
129211bc
JM
8897 * c-common.h (enum cxx_dialect): Add cxx_unset.
8898 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8899 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8900
381bf11e
JM
8901 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8902 (std=gnu++0x): Mark as Undocumented.
8903 (std=gnu++1y): Add deprecated message.
8904
fe191308
JM
89052015-05-08 Jason Merrill <jason@redhat.com>
8906
765189ff
JM
8907 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8908 * c-opts.c: Adjust.
8909
fe191308
JM
8910 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8911
755e528f
MP
89122015-05-08 Marek Polacek <polacek@redhat.com>
8913
8914 PR c/64918
8915 * c.opt (Woverride-init-side-effects): New option.
8916
0173bd2a
MP
89172015-05-07 Marek Polacek <polacek@redhat.com>
8918
8919 PR c/65179
8920 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8921 negative value.
8922 * c.opt (Wshift-negative-value): New option.
8923 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8924 when -Wextra and C99/C++11 mode.
8925
e0f0d3b9
MP
89262015-05-07 Marek Polacek <polacek@redhat.com>
8927 Martin Uecker <uecker@eecs.berkeley.edu>
8928
8929 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8930 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8931
8243e2a9
JM
89322015-05-05 Jason Merrill <jason@redhat.com>
8933
8934 * c.opt (Wterminate): New.
8935
577cd070
MP
89362015-04-30 Marek Polacek <polacek@redhat.com>
8937
8938 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8939 require that the non-constant be of a boolean type.
8940
0373796b
JT
89412015-04-29 Josh Triplett <josh@joshtriplett.org>
8942
e0f0d3b9
MP
8943 * c-common.c (handle_section_attribute): Refactor to reduce
8944 nesting and distinguish between error cases.
0373796b 8945
716c0ba6
MP
89462015-04-29 Marek Polacek <polacek@redhat.com>
8947
8948 PR c/64610
8949 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8950 with 0/1.
8951
8848828b
JJ
89522015-04-29 Jakub Jelinek <jakub@redhat.com>
8953
8954 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8955 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8956 HOST_BITS_PER_WIDE_INT.
8957
ecd0e562
TV
89582015-04-28 Tom de Vries <tom@codesourcery.com>
8959
8960 PR tree-optimization/65887
8961 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8962
2a877204 89632015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8964 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8965
8966 * c-ada-spec.c (in_function): Delete.
8967 (dump_generic_ada_node): Do not change in_function and remove the
8968 redundant code dealing with it.
8969 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8970 (print_ada_methods): Output the static member functions in a nested
8971 package after the regular methods as well as associated renamings.
8972
4853031e
MP
89732015-04-24 Marek Polacek <polacek@redhat.com>
8974
8975 PR c/65830
8976 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8977 and OPT_Wshift_count_overflow.
8978
8c2b7f79
MP
8979 PR c/63357
8980 * c-common.c (warn_logical_operator): Warn if the operands have the
8981 same expressions.
8982
b8787813
MP
89832015-04-24 Marek Polacek <polacek@redhat.com>
8984
8985 PR c/61534
8986 * c-common.c (warn_logical_operator): Bail if either operand comes
8987 from a macro expansion.
8988
8fba1830
BRF
89892015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8990
8991 PR target/55143
8992 * c-common.c (c_default_pointer_mode): Add definition.
8993 * c-common.h (c_default_pointer_mode): Add declaration.
8994
17958621
JJ
89952015-03-11 Jakub Jelinek <jakub@redhat.com>
8996
8997 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8998 on record_builtin_type argument.
8999
7ccb1a11
JJ
90002015-03-10 Jakub Jelinek <jakub@redhat.com>
9001
9002 PR c/65120
9003 * c-common.c (warn_logical_not_parentheses): Don't warn for
9004 !x == 0 or !x != 0.
9005
04fd785e
MP
90062015-03-07 Marek Polacek <polacek@redhat.com>
9007
9008 PR sanitizer/65280
9009 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9010 before trying to figure out whether we have a flexible array member.
9011
a4e26206 90122015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9013 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9014
9015 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9016
0d2489f4
EB
90172015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9018
9019 PR ada/65319
9020 * c-ada-spec.c (print_destructor): Remove obsolete code.
9021
83ed54d7
EB
90222015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9023
9024 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9025 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9026 DECL_TEMPLATE_RESULT emulations.
9027 (dump_ada_template)): Add guard for TYPE_METHODS.
9028
7631f0e2
MP
90292015-02-27 Marek Polacek <polacek@redhat.com>
9030
9031 PR c/65040
9032 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9033
d1783ae5
KT
90342015-02-27 Kai Tietz <ktietz@redhat.com>
9035
9036 PR c/35330
9037 * c-pragma.c (handle_pragma_weak): Do not try to create
9038 weak/alias of declarations not being function, or variable
9039 declarations.
9040
56a9f6bc
TS
90412015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9042
9043 PR libgomp/64625
9044 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9045 Remove macros.
9046 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9047
3d5cb23d
MP
90482015-02-16 Marek Polacek <polacek@redhat.com>
9049
9050 PR c/65066
9051 * c-format.c (check_format_types): Handle null param.
9052
fa008882
MP
90532015-02-13 Marek Polacek <polacek@redhat.com>
9054
9055 PR c/65040
9056 * c-format.c (check_format_types): Don't warn about different
9057 signedness if the original value is in the range of WANTED_TYPE.
9058
785f21af
JM
90592015-02-12 Jason Merrill <jason@redhat.com>
9060
9061 PR c++/64956
9062 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9063 to the current highest version.
9064 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9065
4886ec8e
JJ
90662015-02-04 Jakub Jelinek <jakub@redhat.com>
9067
9068 PR c/64824
9069 PR c/64868
9070 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9071 instead of RDIV_EXPR. Use build_binary_op instead of
9072 build2_loc.
9073
40fecdd6
JM
90742015-01-30 Joseph Myers <joseph@codesourcery.com>
9075
9076 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9077 to pass input_location as first argument.
9078
a0c88d06
TV
90792015-01-23 Tom de Vries <tom@codesourcery.com>
9080
9081 PR libgomp/64672
9082 * c.opt (fopenacc): Mark as LTO option.
9083
1506ae0e
TV
90842015-01-23 Tom de Vries <tom@codesourcery.com>
9085
9086 PR libgomp/64707
9087 * c.opt (fopenmp): Mark as LTO option.
9088
31be63ab
JJ
90892015-01-21 Jakub Jelinek <jakub@redhat.com>
9090
9091 PR c/63307
b1726d6c 9092 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9093 (compare_decls): Fix up formatting.
9094
90952015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9096
9097 PR c/63307
9098 * cilk.c: Include vec.h.
9099 (struct cilk_decls): New structure.
9100 (wrapper_parm_cb): Split this function to...
9101 (fill_decls_vec): ...this...
9102 (create_parm_list): ...and this.
9103 (compare_decls): New function.
9104 (for_local_cb): Remove.
9105 (wrapper_local_cb): Ditto.
9106 (build_wrapper_type): For now first traverse and fill vector of
9107 declarations then sort it and then deal with sorted vector.
9108 (cilk_outline): Ditto.
9109 (declare_one_free_variable): Ditto.
9110
6875457f
JM
91112015-01-21 Jason Merrill <jason@redhat.com>
9112
9113 PR c++/64629
9114 * c-format.c (check_format_arg): Call decl_constant_value.
9115
185c9e56
ML
91162015-01-19 Martin Liska <mliska@suse.cz>
9117
9118 * c-common.c (handle_noicf_attribute): New function.
9119
41dbbb37
TS
91202015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9121 Bernd Schmidt <bernds@codesourcery.com>
9122 James Norris <jnorris@codesourcery.com>
9123 Cesar Philippidis <cesar@codesourcery.com>
9124 Ilmir Usmanov <i.usmanov@samsung.com>
9125 Jakub Jelinek <jakub@redhat.com>
9126
9127 * c.opt (fopenacc): New option.
9128 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9129 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9130 New macros.
9131 * c-common.h (c_finish_oacc_wait): New prototype.
9132 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9133 (c_finish_oacc_wait): New function.
9134 * c-pragma.c (oacc_pragmas): New variable.
9135 (c_pp_lookup_pragma, init_pragma): Handle it.
9136 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9137 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9138 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9139 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9140 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9141 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9142 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9143 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9144 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9145 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9146 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9147 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9148 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9149 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9150 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9151 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9152 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9153 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9154 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9155 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9156 PRAGMA_OACC_CLAUSE_WORKER.
9157
3f8257db 91582015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9159
9160 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9161 for the new option fstack-protector_explicit.
9162 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9163 (handle_stack_protect_attribute): New function.
9164
3f8257db 91652015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9166
9167 * c.opt: New option -Warray-bounds=.
9168
adfac8df
JJ
91692015-01-09 Michael Collison <michael.collison@linaro.org>
9170
9171 * array-notation-common.c: Include hash-set.h, machmode.h,
9172 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9173 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9174 * c-ada-spec.c: Ditto.
9175 * c-cilkplus.c: Ditto.
9176 * c-common.c: Include input.h due to flattening of tree.h.
9177 Define macro GCC_C_COMMON_C.
9178 * c-common.h: Flatten tree.h header files into c-common.h.
9179 Remove include of tree-core.h.
9180 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9181 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9182 fold-const.h, wide-int.h, and inchash.h due to
9183 flattening of tree.h.
9184 * c-dump.c: Ditto.
9185 * c-format.c: Flatten tree.h header files into c-common.h.
9186 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9187 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9188 fold-const.h, wide-int.h, and inchash.h due to
9189 flattening of tree.h.
9190 * c-dump.c: Include hash-set.h, machmode.h,
9191 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9192 fold-const.h, wide-int.h, and inchash.h due to
9193 flattening of tree.h.
9194 * c-format.c: Include hash-set.h, machmode.h,
9195 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9196 fold-const.h, wide-int.h, inchash.h and real.h due to
9197 flattening of tree.h.
9198 * c-gimplify.c: Include hash-set.h, machmode.h,
9199 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9200 fold-const.h, wide-int.h, and inchash.h due to
9201 flattening of tree.h.
9202 * cilk.c: Ditto.
9203 * c-lex.c: Ditto.
9204 * c-omp.c: Ditto.
9205 * c-opts.c: Ditto.
9206 * c-pch.c: Ditto.
9207 * c-ppoutput.c: Ditto.
9208 * c-pragma.c: Ditto.
9209 * c-pretty-print.c: Ditto.
9210 * c-semantics.c: Ditto.
9211 * c-ubsan.c: Ditto.
9212 * stub-objc.c: Ditto.
9213
f5481fc4
JM
92142015-01-08 Jason Merrill <jason@redhat.com>
9215
9216 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9217 do_ubsan_in_current_function.
9218 (ubsan_maybe_instrument_reference_or_call): Likewise.
9219 * c-ubsan.h: Declare it.
9220
de35aa66
MS
92212015-01-08 Mike Stump <mikestump@comcast.net>
9222
9223 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9224
4a9a42ab
MP
92252015-01-07 Marek Polacek <polacek@redhat.com>
9226
9227 PR c/64440
9228 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9229 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9230
2f42e5de
TS
92312015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9232
9233 PR c++/31397
9234 * c.opt (Wsuggest-override): New option.
9235
5624e564
JJ
92362015-01-05 Jakub Jelinek <jakub@redhat.com>
9237
9238 Update copyright years.
9239
5bd012f8
MP
92402015-01-05 Marek Polacek <polacek@redhat.com>
9241
9242 PR c/64423
9243 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9244 parameter. Use it.
9245 * c-common.h (warn_array_subscript_with_type_char): Update
9246 declaration.
9247
a7fa8d18
ESR
92482014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9249
9250 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9251 Control macro with flag_sized_deallocation.
9252
3f8257db 92532014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9254
9255 * c.opt (Wdiscarded-array-qualifiers): New option.
9256
1f8d3e84
JJ
92572014-12-19 Jakub Jelinek <jakub@redhat.com>
9258
9259 PR preprocessor/63831
9260 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9261 and __has_cpp_attribute here.
9262 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9263 c_common_has_attribute.
9264 * c-common.h (c_common_has_attribute): New prototype.
9265 * c-lex.c (init_c_lex): Set cb->has_attribute to
9266 c_common_has_attribute instead of cb_has_attribute.
9267 (get_token_no_padding): New function.
9268 (cb_has_attribute): Renamed to ...
9269 (c_common_has_attribute): ... this. No longer static. Use
9270 get_token_no_padding, require ()s, don't build TREE_LIST
9271 unnecessarily, fix up formatting, adjust diagnostics, call
9272 init_attributes.
9273
20b06add
JM
92742014-12-15 Jason Merrill <jason@redhat.com>
9275
9276 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9277 (-Wsized-deallocation): New.
9278 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9279 to on in C++14 and up.
9280
94a073b2
JM
92812014-12-11 Jason Merrill <jason@redhat.com>
9282
acaa5911
JM
9283 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9284
94a073b2
JM
9285 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9286 we aren't complaining about VLAs.
9287
7fb66c15
MP
92882014-12-06 Marek Polacek <polacek@redhat.com>
9289
9290 PR tree-optimization/64183
9291 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9292 shift-expression if it is integer_type_node. Use types_compatible_p.
9293
b731b390
JJ
92942014-11-29 Jakub Jelinek <jakub@redhat.com>
9295
9296 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9297 last argument from create_tmp_var_raw and create_tmp_var calls.
9298 * cilk.c (gimplify_cilk_spawn): Likewise.
9299 * c-omp.c (c_finish_omp_atomic): Likewise.
9300
6a4da643
MP
93012014-11-28 Marek Polacek <polacek@redhat.com>
9302
9303 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9304 instead of unsigned_type_node.
9305
541e35a6
MP
93062014-11-28 Marek Polacek <polacek@redhat.com>
9307
9308 PR c/63862
9309 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9310 to op1_utype.
9311 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9312 expression to unsigned_type_node.
9313
dcc97066
MW
93142014-11-20 Mark Wielaard <mjw@redhat.com>
9315
9316 PR debug/38757
9317 * c-opts.c (set_std_c89): Set lang_hooks.name.
9318 (set_std_c99): Likewise.
9319 (set_std_c11): Likewise.
9320 (set_std_cxx98): Likewise.
9321 (set_std_cxx11): Likewise.
9322 (set_std_cxx14): Likewise.
9323 (set_std_cxx1z): Likewise.
9324
aa7da51a
JJ
93252014-11-21 Jakub Jelinek <jakub@redhat.com>
9326
9327 PR target/63764
9328 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9329 return type to bool.
009a3480 9330 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9331 (convert_vector_to_pointer_for_subscript): Change return type to
9332 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9333 and copy it into a TARGET_EXPR and use that instead of *vecp
9334 directly.
9335
538dd0b7
DM
93362014-11-19 David Malcolm <dmalcolm@redhat.com>
9337
9338 Merger of git branch "gimple-classes-v2-option-3".
9339 * ChangeLog.gimple-classes: New.
9340 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9341 from being just a vec<gimple> to a vec<gbind *>.
9342
c39a5e99
JJ
93432014-11-18 Jakub Jelinek <jakub@redhat.com>
9344
9345 PR sanitizer/63813
9346 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9347 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9348 get_pointer_alignment for non-pointers. Use ptype, or if it is
9349 reference type, corresponding pointer type, as type of kind
9350 argument.
9351 (ubsan_maybe_instrument_reference,
9352 ubsan_maybe_instrument_member_call): Adjust callers.
9353
8537a4a9
MP
93542014-11-15 Marek Polacek <polacek@redhat.com>
9355
9356 PR middle-end/63884
9357 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9358 for NULL fndecl.
9359 (extract_array_notation_exprs): Return for NULL node.
9360
2079956a
JM
93612014-11-12 Joseph Myers <joseph@codesourcery.com>
9362
9363 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9364 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9365
1304953e
JJ
93662014-11-12 Jakub Jelinek <jakub@redhat.com>
9367
9368 PR c/59708
9369 * c-common.c (check_builtin_function_arguments): Handle
9370 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9371
e5e44252
AK
93722014-11-10 Andi Kleen <ak@linux.intel.com>
9373
9374 PR c/60804
9375 * c-common.h (check_no_cilk): Declare.
9376 * cilk.c (get_error_location): New function.
9377 (check_no_cilk): Dito.
9378
e64b984d
AK
93792014-11-10 Andi Kleen <ak@linux.intel.com>
9380
9381 * cilk.c (recognize_spawn): Use expression location
9382 for error message.
9383
13c21655
PC
93842014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9385
9386 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9387
42fd12b1
ESR
93882014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9389
9390 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9391 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9392 (__cpp_range_based_for, __cpp_initializer_lists,
9393 __cpp_delegating_constructors, __cpp_nsdmi,
9394 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9395 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9396 __has_cpp_attribute.
9397 * c-lex.c (cb_has_attribute): New callback CPP function;
9398 (init_c_lex): Set has_attribute callback.
9399
6f450181
RB
94002014-11-04 Richard Biener <rguenther@suse.de>
9401
9402 * c-common.c (shorten_compare): Do not shorten mixed
9403 DFP and non-DFP compares.
9404
26f0e1d6
ESR
94052014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9406
9407 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9408 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9409 Commentary and rearrangement of tests.
9410 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9411 Commentary and rearrangement of tests.
ab20d992 9412 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9413 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9414
ef4bddc2
RS
94152014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9416
9417 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9418 enum from machine_mode.
9419
c582198b
AM
94202014-10-28 Andrew MacLeod <amacleod@redhat.com>
9421
adfac8df
JJ
9422 * c-common.c: Adjust include files.
9423 * c-gimplify.c: Ditto.
9424 * cilk.c: Ditto.
9425 * c-pragma.c: Ditto.
9426 * c-ubsan.c: Ditto.
c582198b 9427
60393bbc
AM
94282014-10-27 Andrew MacLeod <amacleod@redhat.com>
9429
9430 * c-gimplify.c: Adjust include files.
9431
d723bb7c
MLI
94322014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9433
9434 PR c++/53061
9435 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9436 c_common_initialize_diagnostics.
9437 * c-common.h: Likewise.
9438
90f3520e
MP
94392014-10-24 Marek Polacek <polacek@redhat.com>
9440
9441 PR c/56980
9442 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9443 print "struct"/"union"/"enum" for typedefed names.
9444
59d7607a
MP
94452014-10-23 Marek Polacek <polacek@redhat.com>
9446
9447 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9448 in unsigned type.
9449
d95a2703
JJ
94502014-10-22 Jakub Jelinek <jakub@redhat.com>
9451 Yury Gribov <y.gribov@samsung.com>
9452
9453 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9454 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9455 instead of flag_sanitize_recover as bool flag.
9456
8e6ef852
KY
94572014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9458
9459 * cilk.c: Revert previous change.
9460
948cf550
IZ
94612014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9462
9463 PR c/63307
9464 * cilk.c: Include vec.h.
9465 (struct cilk_decls): New structure.
9466 (wrapper_parm_cb): Split this function to...
9467 (fill_decls_vec): ...this...
9468 (create_parm_list): ...and this.
9469 (compare_decls): New function.
9470 (for_local_cb): Remove.
9471 (wrapper_local_cb): Ditto.
9472 (build_wrapper_type): For now first traverse and fill vector of
9473 declarations then sort it and then deal with sorted vector.
9474 (cilk_outline): Ditto.
9475 (declare_one_free_variable): Ditto.
9476
92574c7c
MP
94772014-10-17 Marek Polacek <polacek@redhat.com>
9478
9479 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9480 * c.opt (Wimplicit-int): Initialize to -1.
9481
83685514
AM
94822014-10-16 Andrew MacLeod <amacleod@redhat.com>
9483
9484 * c-pragma.c: Adjust include files.
9485 * c-semantics.c: Likewise.
9486
5b8300ea
DD
94872014-10-16 DJ Delorie <dj@redhat.com>
9488
9489 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9490 multiples of bytes.
9491
5f83e90b
JM
94922014-10-14 Jason Merrill <jason@redhat.com>
9493
9494 PR c++/63455
9495 * c-common.h (CPP_PREPARSED_EXPR): New.
9496 (N_CP_TTYPES): Adjust.
9497
d73326ca
MP
94982014-10-15 Marek Polacek <polacek@redhat.com>
9499
9500 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9501
78a7c317
DD
95022014-10-14 DJ Delorie <dj@redhat.com>
9503
9504 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9505 types, not just __int128.
9506 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9507 types, not just __int128.
9508 (cpp_atomic_builtins): Round pointer sizes up.
9509 (type_suffix): Use type precision, not specific types.
9510 * c-common.c (c_common_reswords): Remove __int128 special case.
9511 (c_common_type_for_size): Check for all __intN types, not just
9512 __int128.
9513 (c_common_type_for_mode): Likewise.
9514 (c_common_signed_or_unsigned_type): Likewise.
9515 (c_build_bitfield_integer_type): Likewise.
9516 (c_common_nodes_and_builtins): Likewise.
9517 (keyword_begins_type_specifier): Likewise.
9518 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9519 __intN variants.
9520
2a22f99c
TS
95212014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9522
9523 * c-common.c: Use hash_table instead of hashtab.
9524
2a8ef767
ESR
95252014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9526
adfac8df 9527 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9528 C++11 section.
9529
3c9aabbd
MG
95302014-10-03 Marc Glisse <marc.glisse@inria.fr>
9531
9532 PR c++/54427
9533 PR c++/57198
9534 PR c++/58845
9535 * c-common.c (warn_logical_operator): Punt for vectors.
9536
a15f7cb8
ESR
95372014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9538
9539 Implement SD-6: SG10 Feature Test Recommendations
9540 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9541 macros and the __has_header macro.
9542
8d0cf15e
JM
95432014-09-30 Jason Merrill <jason@redhat.com>
9544
dd5d5481
JM
9545 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9546 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9547 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9548
b752325e
JM
9549 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9550 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9551
8d0cf15e
JM
9552 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9553 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9554
083e891e
MP
95552014-09-24 Marek Polacek <polacek@redhat.com>
9556
9557 PR c/61405
9558 PR c/53874
9559 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9560
7861b648
AK
95612014-09-23 Andi Kleen <ak@linux.intel.com>
9562
9563 * c-common.c (handle_no_reorder_attribute): New function.
9564 (c_common_attribute_table): Add no_reorder attribute.
9565
9a79452d
JM
95662014-09-22 Joseph Myers <joseph@codesourcery.com>
9567
9568 * c-cppbuiltin.c (c_cpp_builtins): Define
9569 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9570 modes.
9571
dd69f047
JM
95722014-09-18 Joseph Myers <joseph@codesourcery.com>
9573
9574 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9575 for supported floating-point modes.
9576
737a4826
MLI
95772014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9578
9579 * c.opt (Wpsabi): Use LangEnabledBy.
9580 * c-opts.c (c_common_handle_option): Do not handle here.
9581
8cc4b7a2
JM
95822014-09-12 Joseph Myers <joseph@codesourcery.com>
9583
9584 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9585 macros for floating-point modes.
9586
179b5a55
MG
95872014-09-11 Marc Glisse <marc.glisse@inria.fr>
9588
9589 PR target/58757
9590 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9591 __*_DENORM_MIN__ without denormals.
9592
570a11fe
JJ
95932014-09-10 Jakub Jelinek <jakub@redhat.com>
9594
9595 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9596 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9597 ubsan_create_data callers.
9598 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9599 index is constant or BIT_AND_EXPR with constant mask and is
9600 small enough for the bound.
9601 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9602 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9603
b559c810
MLI
96042014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9605
9606 * c.opt: Add CppReason to various flags.
9607 (Wdate-time): Re-sort.
9608 * c-common.c: Include c-common.h earlier.
9609 (struct reason_option_codes_t): Delete.
9610 (c_option_controlling_cpp_error): Prefix global type and struct
9611 with cpp_.
9612
1ef33fd4
MLI
96132014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9614
9615 * c.opt (Wnormalized): New.
9616 (Wnormalized=): Use Enum and Reject Negative.
9617 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9618
66bb34c0
JM
96192014-09-08 Joseph Myers <joseph@codesourcery.com>
9620
9621 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9622 digits of floating-point modes if -fbuilding-libgcc.
9623
53d68b9f
JM
96242014-09-05 Joseph Myers <joseph@codesourcery.com>
9625
9626 * c-cppbuiltin.c (c_cpp_builtins): Also define
9627 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9628 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9629 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9630 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9631 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9632 __LIBGCC_STACK_GROWS_DOWNWARD__,
9633 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9634 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9635 __LIBGCC_DWARF_FRAME_REGISTERS__,
9636 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9637 __LIBGCC_STACK_POINTER_REGNUM__ and
9638 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9639 (builtin_define_with_value): Handle backslash-escaping in string
9640 macro values.
9641
f65586dc
RB
96422014-09-05 Richard Biener <rguenther@suse.de>
9643
9644 PR middle-end/63148
9645 * c-format.c (check_format_arg): Properly handle
9646 effectively signed POINTER_PLUS_EXPR offset.
9647
2b71f4a4
MLI
96482014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9649
9650 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9651 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9652 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9653 and Init.
9654 * c-opts.c (c_common_handle_option): Do not handle here.
9655 (sanitize_cpp_opts): Likewise.
9656 * c-common.c (struct reason_option_codes_t): Handle
9657 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9658
d2e4feca
MP
96592014-09-03 Marek Polacek <polacek@redhat.com>
9660
9661 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9662
9a771876
JJ
96632014-09-02 Jakub Jelinek <jakub@redhat.com>
9664 Balaji V. Iyer <balaji.v.iyer@intel.com>
9665 Igor Zamyatin <igor.zamyatin@intel.com>
9666
9667 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9668 * c-common.c (c_common_reswords): Added _Cilk_for.
9669 * c-common.h (enum rid): Added RID_CILK_FOR.
9670 (cilk_for_number_of_iterations): Add declaration.
9671 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9672 CILK_FOR.
9673 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9674 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9675
81b5d104
MLI
96762014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9677
9678 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9679 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9680 Wundef): Use CPP, Var and Init.
9681 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9682
b753b37b
MLI
96832014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9684
9685 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9686 * c-opts.c (c_common_handle_option): Do not handle here.
9687
028aee17
JM
96882014-08-25 Jason Merrill <jason@redhat.com>
9689
9690 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9691 -std=c++14 and -std=gnu++14, rather than the reverse.
9692 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9693 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9694 * c-common.h (cxx_dialect): Remove cxx1y.
9695
e4276ba5
ESR
96962014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9697
9698 * c-common.h (enum cxx_dialect): Add cxx14.
9699 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9700 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9701 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9702
a545cacd
JM
97032014-08-22 Jason Merrill <jason@redhat.com>
9704
9705 * c.opt (std=gnu++17): Fix alias.
9706
59ea0364
MP
97072014-08-22 Marek Polacek <polacek@redhat.com>
9708
9709 PR c++/62199
9710 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9711 check for vector types. Drop LHS argument.
9712 * c-common.h (warn_logical_not_parentheses): Adjust.
9713
596e808c
MLI
97142014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9715
9716 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9717 (Wmultichar): Likewise.
9718 (Wdate-time): Use C-family languages instead of Common. Use CPP
9719 and Var.
9720 * c-opts.c (c_common_handle_option): Do not handle the above
9721 options here.
9722 (sanitize_cpp_opts): Likewise.
9723
18767f65
MLI
97242014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9725
9726 PR fortran/44054
9727 * c-opts.c: Include tree-diagnostics.h.
9728 (c_diagnostic_finalizer): New.
9729 (c_common_initialize_diagnostics): Use it.
9730
b4413594
MLI
97312014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9732
9733 PR preprocessor/51303
9734 * c-common.c (struct reason_option_codes_t option_codes):
9735 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9736
43f9a13c
MLI
97372014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9738
9739 PR c/60975
9740 PR c/53063
9741 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9742 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9743 (c_common_post_options): Call init_global_opts_from_cpp.
9744 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9745
04159acf
MP
97462014-08-19 Marek Polacek <polacek@redhat.com>
9747
9748 PR c++/62153
9749 * c-common.c (maybe_warn_bool_compare): New function.
9750 * c-common.h (maybe_warn_bool_compare): Declare.
9751 * c.opt (Wbool-compare): New option.
9752
35aff4fb
MP
97532014-08-19 Marek Polacek <polacek@redhat.com>
9754
9755 * c.opt (Wc99-c11-compat): New option.
9756
177cce46
MP
97572014-08-19 Marek Polacek <polacek@redhat.com>
9758
9759 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9760 to warn_c90_c99_compat.
9761 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9762 to -1.
9763
6ae9194f
MLI
97642014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9765 Steven Bosscher <steven@gcc.gnu.org>
9766
9767 PR c/52952
9768 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9769 format_check_results.
9770 (check_function_format): Use true and add comment for boolean
9771 argument.
9772 (finish_dollar_format_checking): Use explicit location when warning.
9773 (check_format_info): Likewise.
9774 (check_format_arg): Set extra_arg_loc and format_string_loc.
9775 (check_format_info_main): Use explicit location when warning.
9776 (check_format_types): Pass explicit location.
9777 (format_type_warning): Likewise.
9778
8e54f6d3
MLI
97792014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9780
9781 PR fortran/44054
9782 * c-format.c: Handle Fortran flags.
9783
cd4e76fc
IZ
97842014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9785
9786 PR other/61962
9787 * array-notation-common.c (find_rank): Added handling for other
9788 types of references.
9789
f3bede71
MP
97902014-08-10 Marek Polacek <polacek@redhat.com>
9791
9792 PR c/51849
9793 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9794 * c.opt (Wc90-c99-compat): Add option.
9795
9f25a338
TS
97962014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9797
9798 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9799
62e4eb35
MP
98002014-08-03 Marek Polacek <polacek@redhat.com>
9801
ab20d992 9802 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9803 (c_add_case_label): Pass loc to check_case_value.
9804
b787e7a2
TS
98052014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9806
9807 * cilk.c: Use hash_map instead of pointer_map.
9808
6e2830c3
TS
98092014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9810
9811 * c-gimplify.c: Use hash_set instead of pointer_set.
9812
a7ee52fb
IZ
98132014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9814
9815 PR middle-end/61455
9816 * array-notation-common.c (extract_array_notation_exprs): Handling
9817 of DECL_EXPR added.
9818
944fa280
JJ
98192014-08-01 Jakub Jelinek <jakub@redhat.com>
9820
9821 * c-common.h (min_align_of_type): Removed prototype.
9822 * c-common.c (min_align_of_type): Removed.
9823 * c-ubsan.h (ubsan_maybe_instrument_reference,
9824 ubsan_maybe_instrument_member_call): New prototypes.
9825 * c-ubsan.c: Include stor-layout.h and builtins.h.
9826 (ubsan_maybe_instrument_reference_or_call,
9827 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9828 functions.
9829
b4dfdc11
MG
98302014-07-31 Marc Glisse <marc.glisse@inria.fr>
9831
9832 PR c++/60517
9833 * c.opt (-Wreturn-local-addr): Move to common.opt.
9834
a41844e5
JM
98352014-07-30 Jason Merrill <jason@redhat.com>
9836
9837 PR c++/61659
9838 PR c++/61687
9839 Revert:
9840 * c.opt (-fuse-all-virtuals): New.
9841
976d5a22
TT
98422014-07-30 Tom Tromey <tromey@redhat.com>
9843
9844 PR c/59855
9845 * c.opt (Wdesignated-init): New option.
9846 * c-common.c (c_common_attribute_table): Add "designated_init".
9847 (handle_designated_init): New function.
9848
cdc94aca
MP
98492014-07-24 Marek Polacek <polacek@redhat.com>
9850
9851 PR c/57653
9852 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9853
f41373b6
DS
98542014-07-16 Dodji Seketeli <dodji@redhat.com>
9855
9856 PR preprocessor/60723 - missing system-ness marks for macro tokens
9857 * c-ppoutput.c (struct print::prev_was_system_token): New data
9858 member.
9859 (init_pp_output): Initialize it.
9860 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9861 (do_line_change): Return a flag saying if a line marker was
9862 emitted or not.
9863 (scan_translation_unit): Detect if the system-ness of the token we
9864 are about to emit is different from the one of the previously
9865 emitted token. If so, emit a line marker. Avoid emitting useless
9866 adjacent line markers. Avoid emitting line markers for tokens
9867 originating from the expansion of built-in macros.
9868 (scan_translation_unit_directives_only): Adjust.
9869
4d661eaa
MP
98702014-07-15 Marek Polacek <polacek@redhat.com>
9871
9872 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9873 TYPE_MAX_VALUE is NULL.
9874
b108f48f
JJ
98752014-07-14 Jakub Jelinek <jakub@redhat.com>
9876
9877 PR middle-end/61294
9878 * c.opt (Wmemset-transposed-args): New warning.
9879
c0221884
JM
98802014-07-10 Jason Merrill <jason@redhat.com>
9881
9882 PR c++/61659
9883 PR c++/61687
9884 * c.opt (-fuse-all-virtuals): New.
9885
63dfbb95
RB
98862014-07-09 Richard Biener <rguenther@suse.de>
9887
9888 PR c-family/61741
9889 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9890 using unsigned arithmetic if overflow does not wrap instead of
9891 if overflow is undefined.
9892
773ec47f
MP
98932014-07-06 Marek Polacek <polacek@redhat.com>
9894
9895 PR c/6940
9896 * c.opt (Wsizeof-array-argument): New option.
9897
00a7ba58
JJ
98982014-07-03 Jakub Jelinek <jakub@redhat.com>
9899
b1726d6c 9900 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9901 comments->count <= 1, as comments->entries might be NULL.
9902
52ec0ea3
MP
99032014-07-01 Marek Polacek <polacek@redhat.com>
9904
9905 * c.opt (Wint-conversion): New option.
9906
d5c3d343
MP
99072014-07-01 Marek Polacek <polacek@redhat.com>
9908
9909 PR c/58286
9910 * c.opt (Wincompatible-pointer-types): New option.
9911
6e7ceb17
PC
99122014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9913
9914 PR c++/51400
9915 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9916 Do not discard TYPE_QUALS of type.
9917
da73100b
JM
99182014-06-26 Jason Merrill <jason@redhat.com>
9919
9920 * c-common.h (enum cxx_dialect): Add cxx1z.
9921 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9922 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9923
08eedf75
TJ
99242014-06-26 Teresa Johnson <tejohnson@google.com>
9925
9926 * c-common.h (get_dump_info): Declare.
9927 * c-gimplify.c (c_genericize): Use saved dump files.
9928 * c-opts.c (c_common_parse_file): Begin and end dumps
9929 once around parsing invocation.
9930 (get_dump_info): New function.
9931
7b56b2f8
MP
99322014-06-23 Marek Polacek <polacek@redhat.com>
9933 Andrew MacLeod <amacleod@redhat.com>
9934
9935 PR c/61553
9936 * c-common.c (get_atomic_generic_size): Don't segfault if the
9937 type doesn't have a size.
9938
0e37a2f3
MP
99392014-06-20 Marek Polacek <polacek@redhat.com>
9940
9941 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9942 (ubsan_walk_array_refs_r): New function.
9943 (c_genericize): Instrument array bounds.
9944 * c-ubsan.c: Include "internal-fn.h".
9945 (ubsan_instrument_division): Mark instrumented arrays as having
9946 side effects. Adjust ubsan_type_descriptor call.
9947 (ubsan_instrument_shift): Likewise.
9948 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9949 (ubsan_instrument_bounds): New function.
9950 (ubsan_array_ref_instrumented_p): New function.
9951 (ubsan_maybe_instrument_array_ref): New function.
9952 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9953 (ubsan_array_ref_instrumented_p): Declare.
9954 (ubsan_maybe_instrument_array_ref): Declare.
9955
99562014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9957
9958 PR lto/61123
9959 * c.opt (fshort-enums): Add to LTO.
9960 * c.opt (fshort-wchar): Likewise.
9961
5c3d09f7
MP
99622014-06-16 Marek Polacek <polacek@redhat.com>
9963
9964 PR c/60439
9965 * c.opt (Wswitch-bool): Add Var.
9966
9cf32741
JJ
99672014-06-12 Jakub Jelinek <jakub@redhat.com>
9968
9969 PR middle-end/61486
9970 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9971 #pragma omp target teams or
9972 #pragma omp {,target }teams distribute simd.
9973
62984918
JM
99742014-06-12 Jason Merrill <jason@redhat.com>
9975
9976 * c.opt (Wabi=, fabi-compat-version): New.
9977 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9978 (c_common_post_options): Handle flag_abi_compat_version default.
9979 Disallow -fabi-compat-version=1.
9980 * c-common.h (abi_version_crosses): New.
9981
f961457f
JH
99822014-06-11 Jan Hubicka <hubicka@ucw.cz>
9983
adfac8df 9984 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9985 section names that are no longer trees.
9986
92d28cbb
JJ
99872014-06-10 Jakub Jelinek <jakub@redhat.com>
9988
9989 PR fortran/60928
9990 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9991 (omp_pragmas): ... back here.
9992
742938c9
MP
99932014-06-05 Marek Polacek <polacek@redhat.com>
9994
9995 PR c/49706
9996 * c-common.c (warn_logical_not_parentheses): New function.
9997 * c-common.h (warn_logical_not_parentheses): Declare.
9998 * c.opt (Wlogical-not-parentheses): New option.
9999
9d548dfb
MP
100002014-06-04 Marek Polacek <polacek@redhat.com>
10001
10002 PR c/30020
10003 * c-common.c (check_case_bounds): Add location parameter.
10004 Use it.
10005 (c_add_case_label): Pass loc to check_case_bounds.
10006
fedfecef
MP
100072014-06-03 Marek Polacek <polacek@redhat.com>
10008
10009 PR c/60439
10010 * c.opt (Wswitch-bool): New option.
10011
f6a7cffc
TS
100122014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10013
040d18b6
TS
10014 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10015 Remove prototypes.
10016 (record_types_used_by_current_var_decl): Move prototype to where
10017 it belongs.
10018
f6a7cffc
TS
10019 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10020 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10021 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10022
632f2871
RS
100232014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10024
10025 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10026 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10027 void_zero_node.
10028 * c-pretty-print.c (pp_c_void_constant): New function.
10029 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10030 (c_pretty_printer::expression): Handle VOID_CST.
10031 * cilk.c (extract_free_variables): Likewise.
10032 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10033 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10034
766090c2
TS
100352014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10036
10037 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10038 * c-pragma.c (push_alignment): Adjust.
10039 (handle_pragma_push_options): Likewise.
10040
661a0813
MP
100412014-05-09 Marek Polacek <polacek@redhat.com>
10042
10043 PR c/50459
10044 * c-common.c (check_user_alignment): Return -1 if alignment is error
10045 node.
10046 (handle_aligned_attribute): Don't call default_conversion on
10047 FUNCTION_DECLs.
10048 (handle_vector_size_attribute): Likewise.
10049 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10050 (handle_sentinel_attribute): Call default_conversion and allow even
10051 integral types as an argument.
10052
2793eeab
MP
100532014-05-08 Marek Polacek <polacek@redhat.com>
10054
10055 PR c/61053
10056 * c-common.c (min_align_of_type): New function factored out from...
10057 (c_sizeof_or_alignof_type): ...here.
10058 * c-common.h (min_align_of_type): Declare.
10059
f827930a
MP
100602014-05-08 Marek Polacek <polacek@redhat.com>
10061
10062 PR c/61077
10063 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10064 parameter type of main.
10065
ca49b74e
DD
100662014-05-07 DJ Delorie <dj@redhat.com>
10067
10068 * c-cppbuiltin.c (print_bits_of_hex): New.
10069 (builtin_define_type_minmax): Print values using hex so as not to
10070 require a pre-computed list of string values.
10071
1d60af08
KZ
100722014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10073 Mike Stump <mikestump@comcast.net>
10074 Richard Sandiford <rdsandiford@googlemail.com>
10075
10076 * c-ada-spec.c: Include wide-int.h.
10077 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10078 (dump_generic_ada_node): Use wide-int interfaces.
10079 * c-common.c: Include wide-int-print.h.
10080 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10081 (pointer_int_sum): Use wide-int interfaces.
10082 (c_common_nodes_and_builtins): Use make_int_cst.
10083 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10084 (handle_alloc_size_attribute): Use wide-int interfaces.
10085 (get_nonnull_operand): Likewise.
10086 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10087 * c-lex.c: Include wide-int.h.
10088 (narrowest_unsigned_type): Take a widest_int rather than two
10089 HOST_WIDE_INTs.
10090 (narrowest_signed_type): Likewise.
10091 (interpret_integer): Update accordingly. Use wide-int interfaces.
10092 (lex_charconst): Use wide-int interfaces.
10093 * c-pretty-print.c: Include wide-int.h.
10094 (pp_c_integer_constant): Use wide-int interfaces.
10095 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10096 INT_CST_LT_UNSIGNED.
10097
b15458be
RB
100982014-05-06 Richard Biener <rguenther@suse.de>
10099
10100 * c-opts.c (c_common_post_options): For -freestanding,
10101 -fno-hosted and -fno-builtin disable pattern recognition
10102 if not enabled explicitely.
10103
6577374e
MP
101042014-05-02 Marek Polacek <polacek@redhat.com>
10105
10106 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10107
d00887e8
MP
101082014-05-01 Marek Polacek <polacek@redhat.com>
10109
10110 PR c/43245
10111 * c.opt (Wdiscarded-qualifiers): Add.
10112
f8ed5150
MP
101132014-04-30 Marek Polacek <polacek@redhat.com>
10114
10115 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10116 INT_MIN / -1 sanitization only for integer types.
10117
45484dcf
MP
101182014-04-25 Marek Polacek <polacek@redhat.com>
10119
10120 PR c/18079
10121 * c-common.c (handle_noinline_attribute): Warn if the attribute
10122 conflicts with always_inline attribute.
10123 (handle_always_inline_attribute): Warn if the attribute conflicts
10124 with noinline attribute.
10125
38e514c0
MP
101262014-04-25 Marek Polacek <polacek@redhat.com>
10127
10128 PR c/60156
10129 * c-common.c (check_main_parameter_types): Warn about variadic main.
10130
44875f92
MS
101312014-04-24 Mike Stump <mikestump@comcast.net>
10132
10133 * c.opt (Wshadow-ivar): Default to on.
10134
dcaaa5a0
DP
101352014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10136
10137 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10138
c07d7c02
MP
101392014-04-23 Marek Polacek <polacek@redhat.com>
10140
10141 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10142
1c33c9b7
JJ
101432014-04-22 Jakub Jelinek <jakub@redhat.com>
10144
10145 PR sanitizer/60275
10146 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10147 if flag_sanitize_undefined_trap_on_error.
10148 (ubsan_instrument_division, ubsan_instrument_shift,
10149 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10150 if !flag_sanitize_recover.
10151
793c625f
MG
101522014-04-22 Marc Glisse <marc.glisse@inria.fr>
10153
10154 PR libstdc++/43622
10155 * c-common.c (registered_builtin_types): Make non-static.
10156 * c-common.h (registered_builtin_types): Declare.
10157
b0f1bf36 101582014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10159 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10160
10161 PR c/60819
10162 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10163 apply may-alias the scalar pointer type when applicable.
10164
3b07fa4a
IZ
101652014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10166
10167 PR middle-end/60467
10168 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10169 as possible argument for Cilk_spawn.
10170
cbbd2b1c
TB
101712014-04-11 Tobias Burnus <burnus@net-b.de>
10172
10173 PR c/60194
10174 * c.opt (Wformat-signedness): Add
10175 * c-format.c(check_format_types): Use it.
10176
6415bd5d
JM
101772014-04-11 Jason Merrill <jason@redhat.com>
10178
10179 PR c++/57926
10180 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10181 default_conversion for an array argument.
10182
6525783a
MP
101832014-04-08 Marek Polacek <polacek@redhat.com>
10184
10185 PR sanitizer/60745
10186 * c-ubsan.c: Include asan.h.
10187 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10188
880a467b
NS
101892014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10190
10191 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10192
7b59ff2d
MP
101932014-04-02 Marek Polacek <polacek@redhat.com>
10194
10195 * c-common.h (c_expand_expr): Remove declaration.
10196
8edbfaa6
JJ
101972014-03-28 Jakub Jelinek <jakub@redhat.com>
10198
10199 PR c++/60689
10200 * c-common.c (add_atomic_size_parameter): When creating new
10201 params vector, push the size argument first.
10202
07d72e1d
JJ
102032014-03-26 Jakub Jelinek <jakub@redhat.com>
10204
10205 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10206 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10207 ubsan_create_data callers.
10208
b35e0fa0
JJ
102092014-03-22 Jakub Jelinek <jakub@redhat.com>
10210
10211 PR debug/60603
10212 * c-opts.c (c_finish_options): Restore cb_file_change call to
10213 <built-in>.
10214
39a1ebb3
JJ
102152014-03-13 Jakub Jelinek <jakub@redhat.com>
10216
10217 PR middle-end/36282
10218 * c-pragma.c (apply_pragma_weak): Only look at
10219 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10220 DECL_ASSEMBLER_NAME_SET_P (decl).
10221 (maybe_apply_pending_pragma_weaks): Exit early if
10222 vec_safe_is_empty (pending_weaks) rather than only when
10223 !pending_weaks.
10224 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10225 set assembler name back to NULL afterwards.
10226
a07f6ed2
JM
102272014-03-11 Jason Merrill <jason@redhat.com>
10228
10229 * c.opt: Add -std=gnu++14.
10230
75b107f5
IB
102312014-03-11 Ian Bolton <ian.bolton@arm.com>
10232
10233 * c-opts.c (c_common_post_options): Don't override
10234 -ffp-contract=fast if unsafe-math-optimizations is on.
10235
f42c637e
PM
102362014-03-08 Paulo Matos <paulo@matos-sorge.com>
10237
22b15758 10238 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10239
70e24808
JM
102402014-03-07 Jason Merrill <jason@redhat.com>
10241
10242 * c.opt: Add -std=c++14.
10243
3af9c5e9
MP
102442014-03-06 Marek Polacek <polacek@redhat.com>
10245
10246 PR c/60197
10247 * cilk.c (contains_cilk_spawn_stmt): New function.
10248 (contains_cilk_spawn_stmt_walker): Likewise.
10249 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10250 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10251
b3bdf019
JJ
102522014-03-03 Jakub Jelinek <jakub@redhat.com>
10253
10254 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10255 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10256 even when flag_preprocess_only.
10257
ca7e759d
JM
102582014-02-26 Jason Merrill <jason@redhat.com>
10259
10260 PR c++/59231
10261 PR c++/11586
10262 * c-common.c (shorten_compare): Don't check
10263 c_inhibit_evaluation_warnings.
10264
28e41874
JJ
102652014-02-19 Jakub Jelinek <jakub@redhat.com>
10266
cca615af
JJ
10267 PR c/37743
10268 * c-common.c (c_common_nodes_and_builtins): When initializing
10269 c_uint{16,32,64}_type_node, also set corresponding
10270 uint{16,32,64}_type_node to the same value.
10271
28e41874
JJ
10272 PR c++/60267
10273 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10274 for PRAGMA_IVDEP if flag_preprocess_only.
10275
c2bf53a1
JJ
102762014-02-12 Jakub Jelinek <jakub@redhat.com>
10277
10278 PR c/60101
10279 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10280 if false, add ADD itself, rather than vice versa.
10281 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10282 copy. For SAVE_EXPR, only call merge_tlist once.
10283
8fcbce72
JJ
102842014-02-08 Jakub Jelinek <jakub@redhat.com>
10285
10286 PR middle-end/60092
10287 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10288 and tree_to_uhwi.
10289 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10290 functions.
10291 (c_common_attribute_table): Add alloc_align and assume_aligned
10292 attributes.
10293
0a756a3f
MP
102942014-02-06 Marek Polacek <polacek@redhat.com>
10295
10296 PR c/60087
10297 * c-common.c (warn_for_sign_compare): Call warning_at with location
10298 instead of warning.
10299
7ec4847a
MP
103002014-02-05 Marek Polacek <polacek@redhat.com>
10301
10302 PR c/53123
10303 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10304 statement.
10305
66f20604
MP
103062014-02-04 Marek Polacek <polacek@redhat.com>
10307
10308 PR c/60036
10309 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10310 SAVE_EXPR.
10311
5d77fb19
MG
103122014-02-03 Marc Glisse <marc.glisse@inria.fr>
10313
10314 PR c++/53017
10315 PR c++/59211
10316 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10317 handle_vector_size_attribute, handle_nonnull_attribute): Call
10318 default_conversion on the attribute argument.
10319 (handle_nonnull_attribute): Increment the argument number.
10320
81e5eca8
MP
103212014-01-31 Marek Polacek <polacek@redhat.com>
10322
10323 PR c/59963
10324 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10325 build_function_call_vec.
10326 (resolve_overloaded_builtin): Likewise.
10327 * c-common.h (build_function_call_vec): Adjust declaration.
10328
68fca595
MP
103292014-01-30 Marek Polacek <polacek@redhat.com>
10330
10331 PR c/59940
10332 * c-common.h (unsafe_conversion_p): Adjust declaration.
10333 (warnings_for_convert_and_check): Likewise.
10334 (convert_and_check): Likewise.
10335 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10336 expansion_point_location_if_in_system_header on it.
10337 (warnings_for_convert_and_check): Add location parameter. Call
10338 expansion_point_location_if_in_system_header on it. Use it.
10339 (convert_and_check): Add location parameter. Use it.
10340 (conversion_warning): Likewise.
10341 (c_add_case_label): Adjust convert_and_check calls.
10342 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10343
b72271b9
BI
103442014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10345
10346 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10347 flag_cilkplus.
10348 * c-pragma.c (init_pragma): Likewise.
10349 * c.opt: Likewise.
10350
393e8e8b
MP
103512014-01-23 Marek Polacek <polacek@redhat.com>
10352
10353 PR c/59846
10354 * c-common.c (shorten_compare): Add location_t parameter.
10355 * c-common.h (shorten_binary_op): Adjust declaration.
10356
f04dda30
MP
103572014-01-23 Marek Polacek <polacek@redhat.com>
10358
10359 PR c/58346
10360 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10361 * c-common.h: Declare it.
10362
621955cb
EB
103632014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10364
10365 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10366 * c-ada-spec.c (dump_ads): Likewise.
10367 (cpp_check): Likewise.
10368 (dump_ada_specs): Likewise.
10369
103702014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10371
10372 PR c++/49718
10373 * c-common.c (handle_no_instrument_function_attribute): Allow
10374 no_instrument_function attribute in class member
10375 definition/declaration.
10376
241f845a
JJ
103772014-01-15 Jakub Jelinek <jakub@redhat.com>
10378
10379 PR c/58943
10380 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10381 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10382 being COMPOUND_EXPR.
10383 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10384 operand a SAVE_EXPR and second MODIFY_EXPR.
10385
e83b8e2e
JJ
103862014-01-09 Jakub Jelinek <jakub@redhat.com>
10387
10388 PR target/58115
10389 * c-pch.c (c_common_write_pch): Call
10390 prepare_target_option_nodes_for_pch.
10391
23a5b65a
RS
103922014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10393
10394 Update copyright years
10395
f9030485
RS
103962014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10397
10398 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10399 the copyright notice.
10400
f2aa696b
EB
104012013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10402
10403 * c-ada-spec.c (print_constructor): New function.
10404 (print_destructor): Retrieve the origin of the destructor.
10405 (print_ada_declaration): Revamp handling of constructors/destructors.
10406
3f8257db 104072013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10408 Bill Maddox <maddox@google.com>
10409 Jason Merrill <jason@redhat.com>
10410
10411 * c.opt: Add -fdeclone-ctor-dtor.
10412 * c-opts.c (c_common_post_options): Default to on iff -Os.
10413
41958c28
BI
104142013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10415
10416 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10417 attribute.
10418 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10419 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10420 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10421 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10422 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10423 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10424 PRAGMA_CILK_CLAUSE_UNIFORM.
10425
b1726d6c 10426
12893402
BI
104272013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10428
10429 * cilk.c (cilk_outline): Made this function non-static.
10430 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10431 (create_cilk_wrapper): Added a new parameter: a function pointer.
10432 (c_install_body_w_frame_cleanup): Remove
10433 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10434 * c-common.h (cilk_outline): New prototype.
10435 (gimplify_cilk_spawn): Removed two parameters.
10436 (cilk_install_body_with_frame_cleanup): New prototype.
10437 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10438 CILK_SPAWN_STMT case.
10439
085b42ed
BS
104402013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10441
2ce064c3
BS
10442 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10443
085b42ed
BS
10444 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10445 (int_array_type_node): Remove.
10446 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10447
9e36c9ed
MP
104482013-12-05 Marek Polacek <polacek@redhat.com>
10449
10450 PR c/52023
10451 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10452 [ADJUST_FIELD_ALIGN].
10453
296674db
JM
104542013-12-04 Joseph Myers <joseph@codesourcery.com>
10455
10456 PR c/52023
10457 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10458 and check field alignment if set.
10459 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10460 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10461
b1726d6c 104622013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10463 Marek Polacek <polacek@redhat.com>
10464
10465 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10466 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10467
d7947e19
L
104682013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10469
10470 PR c/59309
10471 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10472 arguments.
10473
fad7652e
JJ
104742013-11-29 Jakub Jelinek <jakub@redhat.com>
10475
10476 PR c/59280
10477 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10478 goto invalid. If it is error_mark_node, don't issue further
10479 diagnostics.
10480
8b5e1202
SO
104812013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10482
10483 * c.opt (Wopenmp-simd): New.
10484
0a508bb6
JJ
104852013-11-22 Jakub Jelinek <jakub@redhat.com>
10486
10487 * c-ubsan.h (ubsan_instrument_return): New prototype.
10488 * c-ubsan.c (ubsan_instrument_return): New function.
10489
2fb9a547
AM
104902013-11-22 Andrew MacLeod <amacleod@redhat.com>
10491
10492 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10493 * c-gimplify.c: Likewise.
10494 * cilk.c: Likewise.
2fb9a547 10495
8400e75e
DM
104962013-11-22 David Malcolm <dmalcolm@redhat.com>
10497
10498 * c-common.c (unsafe_conversion_p): Remove use of
10499 EXPR_LOC_OR_HERE macro.
10500 (conversion_warning): Likewise.
10501 (warnings_for_convert_and_check): Likewise.
10502 (warn_for_collisions_1): Likewise.
10503 (shorten_compare): Likewise, and remove use of in_system_header
10504 macro, using the location from the former.
10505 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10506 (cb_def_pragma): Remove use of in_system_header macro.
10507 (lex_string): Likewise.
10508 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10509
eb1ce453
KZ
105102013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10511 Mike Stump <mikestump@comcast.net>
10512 Richard Sandiford <rdsandiford@googlemail.com>
10513
10514 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10515 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10516 tree_fits_shwi_p or tree_fits_uhwi_p.
10517 (dump_generic_ada_node): Likewise.
10518 * c-format.c (check_format_arg): Likewise.
10519 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10520
6b3b8c27
KZ
105212013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10522
10523 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10524
49b0aa18
JC
105252013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10526
10527 PR c/53001
10528 * c-common.c (unsafe_conversion_p): Make this function
10529 return an enumeration with more detail.
10530 (conversion_warning): Use the new return type of
10531 unsafe_conversion_p to separately warn either about conversions
10532 that lower floating point number precision or about the other
10533 kinds of conversions.
10534 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10535 (unsafe_conversion_p): switching return type to
10536 conversion_safety enumeration.
49b0aa18
JC
10537 * c.opt: Adding new warning -Wfloat-conversion and
10538 enabling it with -Wconversion.
10539
b826515a
BS
105402013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10541
8e745a17
JJ
10542 * c-opts.c: Include plugin.h.
10543 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10544
b9a55b13
MP
105452013-11-19 Marek Polacek <polacek@redhat.com>
10546
10547 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10548 call.
10549 (ubsan_instrument_shift): Likewise.
10550 (ubsan_instrument_vla): Likewise.
10551
7d362f6c
RS
105522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10553
10554 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10555 cast to unsigned type.
10556
386b1f1f
RS
105572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10558
10559 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10560 tree_low_cst.
10561 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10562 rather than tree_low_cst.
10563
ae7e9ddd
RS
105642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10565
10566 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10567 tree_to_uhwi throughout.
10568
9439e9a1
RS
105692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10570
10571 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10572 tree_low_cst (..., 0) with tree_to_shwi throughout.
10573
cc269bb6
RS
105742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10575
10576 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10577 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10578
9541ffee
RS
105792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10580
10581 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10582 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10583
c02065fc
AH
105842013-11-15 Aldy Hernandez <aldyh@redhat.com>
10585
10586 * c-cilkplus.c: New file.
10587 * c-common.c (readonly_error): Add location argument.
10588 * c-common.h (readonly_error): Same.
10589 (c_finish_cilk_clauses): Protoize.
10590 (c_check_cilk_loop): Same.
10591 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10592 Do not fail on error_mark_node.
10593 Abstract increment canonicalization to here...
10594 (c_omp_for_incr_canonicalize_ptr): New.
10595 c-pragma.c (init_pragma): Register "simd" pragma.
10596 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10597 (enum pragma_cilk_clause): New.
10598
9cc65f15
RS
105992013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10600
10601 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10602 wchar_type and host_integerp checks.
10603
18f429e2
AM
106042013-11-14 Andrew MacLeod <amacleod@redhat.com>
10605
10606 * c-common.c: Likewise.
10607 * c-gimplify.c: Likewise.
10608 * cilk.c: Likewise.
10609
d8a2d370
DN
106102013-11-14 Diego Novillo <dnovillo@google.com>
10611
10612 * c-common.c: Include fold-const.h.
10613 Include stor-layout.h.
10614 Include calls.h.
10615 Include stringpool.h.
10616 Include attribs.h.
10617 Include varasm.h.
10618 Include trans-mem.h.
10619 * c-cppbuiltin.c: Include stor-layout.h.
10620 Include stringpool.h.
10621 * c-format.c: Include stringpool.h.
10622 * c-lex.c: Include stringpool.h.
10623 Include stor-layout.h.
10624 * c-pragma.c: Include stringpool.h.
10625 Include attribs.h.
10626 Include varasm.h.
10627 Include gcc-symtab.h.
10628 * c-pretty-print.c: Include stor-layout.h.
10629 Include attribs.h.
10630 * cilk.c: Include stringpool.h.
10631 Include calls.h.
10632
38b7bc7f
JM
106332013-11-13 Joseph Myers <joseph@codesourcery.com>
10634
10635 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10636 * c-common.c (c_common_reswords): Add __auto_type.
10637 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10638
45b0be94
AM
106392013-11-12 Andrew MacLeod <amacleod@redhat.com>
10640
18f429e2
AM
10641 * c-common.c: Include gimplify.h.
10642 * c-gimplify.c: Likewise.
10643 * cilk.c: Likewise.
10644 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10645 * c-ubsan.c: Don't include gimple.h.
45b0be94 10646
582d9b50
JM
106472013-11-12 Joseph Myers <joseph@codesourcery.com>
10648
10649 * c-common.c (c_common_reswords): Add _Thread_local.
10650
6b28e197
JM
106512013-11-09 Joseph Myers <joseph@codesourcery.com>
10652
10653 * c-common.c (atomic_size_supported_p): New function.
10654 (resolve_overloaded_atomic_exchange)
10655 (resolve_overloaded_atomic_compare_exchange)
10656 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10657 Use it instead of comparing size with a local list of sizes.
10658
267bac10
JM
106592013-11-07 Andrew MacLeod <amacleod@redhat.com>
10660 Joseph Myers <joseph@codesourcery.com>
10661
10662 * c-common.h (enum rid): Add RID_ATOMIC.
10663 * c-common.c (c_common_reswords): Add _Atomic.
10664 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10665 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10666 * c-format.c (check_format_types): Check for extra _Atomic
10667 qualifiers in format argument.
10668 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10669 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10670
5157b91e
TB
106712013-11-06 Tobias Burnus <burnus@net-b.de>
10672
10673 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10674
6dbe0958
JM
106752013-11-06 Joseph Myers <joseph@codesourcery.com>
10676
10677 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10678 standards modes.
10679 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10680 to mean lack of IEEE 754 support.
10681
e8ff5196
TB
106822013-11-05 Tobias Burnus <burnus@net-b.de>
10683
10684 * c.opt (-Wdate-time): New option
10685 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10686
254a0760
JM
106872013-11-05 Joseph Myers <joseph@codesourcery.com>
10688
10689 * c-cppbuiltin.c (cpp_iec_559_value): Test
10690 flag_excess_precision_cmdline not flag_excess_precision.
10691
6d7f7e0a
TB
106922013-11-05 Tobias Burnus <burnus@net-b.de>
10693
10694 * c.opt (fopenmp-simd): New option.
10695 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10696 (omp_pragmas): ... this new struct.
10697 (c_pp_lookup_pragma): Also walk omp_pragmas.
10698 (init_pragma): Init pragmas for -fopenmp-simd.
10699
55a7f02f
MP
107002013-11-04 Marek Polacek <polacek@redhat.com>
10701
10702 PR c++/58979
10703 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10704
9193fb05
JM
107052013-11-04 Joseph Myers <joseph@codesourcery.com>
10706
10707 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10708 New functions.
10709 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10710
94159ecf
EB
107112013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10712
10713 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10714 (dump_ada_specs): Adjust prototype of second callback.
10715 * c-ada-spec.c (cpp_check): New global variable.
10716 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10717 (print_generic_ada_decl): Likewise.
10718 (has_static_fields): Change return type to bool and add guard.
10719 (has_nontrivial_methods): New predicate.
10720 (is_tagged_type): Change return type to bool.
10721 (separate_class_package): Call has_nontrivial_methods.
10722 (pp_ada_tree_identifier): Minor tweaks.
10723 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10724 (dump_ada_array_domains): Likewise.
10725 (dump_ada_array_type): Likewise.
10726 (dump_template_types): Remove cpp_check parameter and do not pass it to
10727 dump_generic_ada_node.
10728 (dump_ada_template): Likewise.
10729 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10730 recursively.
10731 (print_ada_methods): Change return type to integer. Remove cpp_check
10732 parameter and do not pass it down.
10733 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10734 dump_generic_ada_node.
10735 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10736 accessing methods.
10737 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10738 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10739 value of print_ada_methods.
10740 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10741 Set cpp_check to it before invoking dump_ada_nodes.
10742 (dump_ada_specs): Likewise.
10743
b906f4ca
MP
107442013-11-03 Marek Polacek <polacek@redhat.com>
10745
10746 * c-ubsan.c: Don't include hash-table.h.
10747 (ubsan_instrument_vla): New function.
10748 * c-ubsan.h: Declare it.
10749
5e20cdc9
DM
107502013-10-31 David Malcolm <dmalcolm@redhat.com>
10751
10752 Automated part of renaming of symtab_node_base to symtab_node.
10753
10754 Patch autogenerated by rename_symtab.py from
10755 https://github.com/davidmalcolm/gcc-refactoring-scripts
10756 revision 58bb219cc090b2f4516a9297d868c245495ee622
10757
10758 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10759 symtab_node_base to symtab_node.
10760
7057e645
ESR
107612013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10762
8e745a17 10763 Implement C++14 digit separators.
7057e645
ESR
10764 * c-lex.c (interpret_float): Remove digit separators from scratch string
10765 before building real literal.
10766
193ea7bc
JJ
107672013-10-30 Jakub Jelinek <jakub@redhat.com>
10768
10769 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10770
939b37da
BI
107712013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10772
10773 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10774 fields.
10775 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10776 enabled.
10777 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10778 (insert_cilk_frame): New prototype.
10779 (cilk_init_builtins): Likewise.
10780 (gimplify_cilk_spawn): Likewise.
10781 (c_cilk_install_body_w_frame_cleanup): Likewise.
10782 (cilk_detect_spawn_and_unwrap): Likewise.
10783 (cilk_set_spawn_marker): Likewise.
10784 (build_cilk_sync): Likewise.
10785 (build_cilk_spawn): Likewise.
10786 * cilk.c: New file.
10787
67348ccc
DM
107882013-10-29 David Malcolm <dmalcolm@redhat.com>
10789
10790 Patch autogenerated by refactor_symtab.py from
10791 https://github.com/davidmalcolm/gcc-refactoring-scripts
10792 revision 58bb219cc090b2f4516a9297d868c245495ee622
10793
10794 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10795 to a true class hierarchy.
10796 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10797
d570872d
RS
107982013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10799
10800 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10801
98906124
JL
108022013-10-26 Jeff Law <law@redhat.com>
10803
adfac8df
JJ
10804 * c-common.c (c_define_builtins): Remove mudflap support.
10805 * c.opt: Ignore and warn for mudflap options.
98906124 10806
d73749df 108072013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10808
10809 PR other/33426
10810 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10811 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10812
3f04b1bb
JM
108132013-10-23 Jason Merrill <jason@redhat.com>
10814
10815 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10816
acf0174b
JJ
108172013-10-11 Jakub Jelinek <jakub@redhat.com>
10818
acd15a28
JJ
10819 * c-common.h (omp_clause_mask::operator !=): New method.
10820 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10821 instead of if (mask & something) tests everywhere.
10822
acf0174b
JJ
10823 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10824 201307 instead of 201107.
10825 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10826 (c_common_attribute_table): Add "omp declare target" and
10827 "omp declare simd" attributes.
10828 (handle_omp_declare_target_attribute,
10829 handle_omp_declare_simd_attribute): New functions.
10830 * c-omp.c: Include c-pragma.h.
10831 (c_finish_omp_taskgroup): New function.
10832 (c_finish_omp_atomic): Add swapped argument, if true,
10833 build the operation first with rhs, lhs arguments and use NOP_EXPR
10834 build_modify_expr.
10835 (c_finish_omp_for): Add code argument, pass it down to make_code.
10836 (c_omp_split_clauses): New function.
10837 (c_split_parallel_clauses): Removed.
10838 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10839 c_omp_declare_simd_clauses_to_decls): New functions.
10840 * c-common.h (omp_clause_mask): New type.
10841 (OMP_CLAUSE_MASK_1): Define.
10842 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10843 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10844 omp_clause_mask::operator |, omp_clause_mask::operator &,
10845 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10846 omp_clause_mask::operator ==): New methods.
10847 (enum c_omp_clause_split): New.
10848 (c_finish_omp_taskgroup): New prototype.
10849 (c_finish_omp_atomic): Add swapped argument.
10850 (c_finish_omp_for): Add code argument.
10851 (c_omp_split_clauses): New prototype.
10852 (c_split_parallel_clauses): Removed.
10853 (c_omp_declare_simd_clauses_to_numbers,
10854 c_omp_declare_simd_clauses_to_decls): New prototypes.
10855 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10856 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10857 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10858 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10859 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10860 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10861 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10862 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10863 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10864 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10865 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10866 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10867 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10868 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10869 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10870 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10871 PRAGMA_OMP_CLAUSE_UNIFORM.
10872
826cacfe
MG
108732013-10-09 Marc Glisse <marc.glisse@inria.fr>
10874
10875 PR tree-optimization/20318
10876 * c-common.c (handle_returns_nonnull_attribute): New function.
10877 (c_common_attribute_table): Add returns_nonnull.
10878
2284b034
MG
108792013-10-03 Marc Glisse <marc.glisse@inria.fr>
10880
10881 PR c++/19476
10882 * c.opt (fcheck-new): Move to common.opt.
10883
b56e9788
MP
108842013-09-25 Marek Polacek <polacek@redhat.com>
10885 Jakub Jelinek <jakub@redhat.com>
10886
10887 PR sanitizer/58413
10888 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10889 an expression if we can prove it is correct.
10890 (ubsan_instrument_division): Likewise. Remove unnecessary
10891 check.
10892
ce6923c5
MP
108932013-09-18 Marek Polacek <polacek@redhat.com>
10894
10895 PR sanitizer/58411
10896 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10897 Declare it.
10898 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10899
fb5610fb
IS
109002013-09-14 Iain Sandoe <iain@codesourcery.com>
10901
10902 PR target/48094
10903 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10904 fobjc-gc, freplace-objc-classes): Accept for LTO.
10905
88b0e79e
JC
109062013-09-13 Jacek Caban <jacek@codeweavers.com>
10907
10908 * c-target.def: New hook
10909
c9b0866a
PC
109102013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10911
10912 PR c++/43452
10913 * c.opt (Wdelete-incomplete): Add.
10914
0af94e6f
JR
109152013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10916
10917 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10918 (vector_types_compatible_elements_p): New function.
10919 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10920 declaration.
10921 (vector_types_compatible_elements_p): Declare.
10922
7c26172c
GDR
109232013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10924
10925 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10926 a virtual member function.
10927 (pp_simple_type_specifier): Remove.
10928 (pp_c_type_specifier): Likewise.
10929 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10930 Rename from pp_c_type_specifier. Adjust.
10931 (c_pretty_printer::c_pretty_printer): Do not assign to
10932 simple_type_specifier.
10933
20059c8b
GDR
109342013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10935
10936 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10937 member function.
10938 (c_pretty_printer::storage_class_specifier): Likewise.
10939 (c_pretty_printer::initializer): Likewise.
10940 (pp_declaration): Remove.
10941 (pp_declaration_specifiers): Likewise.
10942 (pp_abstract_declarator): Likewise.
10943 (pp_declarator): Likewise.
10944 (pp_type_id): Likewise.
10945 (pp_statement): Likewise.
10946 (pp_constant): Likewise.
10947 (pp_id_expression): Likewise.
10948 (pp_primary_expression): Likewise.
10949 (pp_unary_expression): Likewise.
10950 (pp_multiplicative_expression): Likewise.
10951 (pp_conditional_expression): Likewise.
10952 (pp_assignment_expression): Likewise.
10953 (pp_expression): Likewise.
10954 (pp_c_type_id): Likewise.
10955 (pp_c_storage_class_specifier): Likewise.
10956 * c-pretty-print.c (pp_c_type_cast): Tidy.
10957 (pp_c_pointer): Likewise.
10958 (pp_c_type_specifier): Likewise.
10959 (pp_c_parameter_type_list): Likewise.
10960 (pp_c_function_definition): Likewise.
10961 (pp_c_init_declarator): Likewise.
10962 (pp_c_initializer_list): Likewise.
10963 (pp_c_constructor_elts): Likewise.
10964 (c_pretty_printer::direct_abstract_declarator): Likewise.
10965 (c_pretty_printer::declaration_specifiers): Likewise.
10966 (c_pretty_printer::primary_expression): Likewise.
10967 (c_pretty_printer::postfix_expression): Likewise.
10968 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10969 (c_pretty_printer::storage_class_specifier): Rename from
10970 pp_c_storage_class_specifier.
10971 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10972 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10973 storage_class_specifier, initializer, offset_list, flags.
10974
de5a5fa1
MP
109752013-08-30 Marek Polacek <polacek@redhat.com>
10976
10977 * c-ubsan.c: New file.
10978 * c-ubsan.h: New file.
10979
8f0e4d72
GDR
109802013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10981
10982 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10983 member function.
10984 (c_pretty_printer::declaration_specifiers): Likewise.
10985 (c_pretty_printer::declarator): Likewise.
10986 (c_pretty_printer::abstract_declarator): Likewise.
10987 (c_pretty_printer::direct_abstract_declarator): Likewise.
10988 (c_pretty_printer::direct_declarator): Likewise.
10989 (c_pretty_printer::function_specifier): Likewise.
10990 (pp_declaration): Adjust.
10991 (pp_declaration_specifiers): Likewise.
10992 (pp_abstract_declarator): Likewise.
10993 (pp_direct_declarator): Likewise.
10994 (pp_function_specifier): Likewise.
10995 (pp_direct_abstract_declarator): Remove as unused.
10996 (pp_c_declaration): Remove.
10997 (pp_c_declaration_specifiers): Likewise.
10998 (pp_c_declarator): Likewise.
10999 (pp_c_direct_declarator): Likewise.
11000 (pp_c_function_specifier): Likewise.
11001 (pp_c_direct_abstract_declarator): Likewise.
11002 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11003 from pp_c_abstract_declarator. Adjust.
ab20d992 11004 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11005 pp_c_direct_abstract_declarator. Adjust.
11006 (c_pretty_printer::function_specifier): Rename from
11007 pp_c_function_specifier. Adjust.
11008 (c_pretty_printer::declaration_specifiers): Rename from
11009 pp_c_declaration_specifiers. Adjust.
11010 (c_pretty_printer::direct_declarator): Rename from
11011 pp_c_direct_declarator. Adjust.
11012 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11013 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11014 (c_pretty_printer::c_pretty_printer): Do not assign to
11015 declaration, declaration_specifiers, declarator,
11016 direct_declarator, direct_abstract_declarator, function_specifier.
11017
00d34d3a
GDR
110182013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11019
11020 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11021 virtual member function.
11022 (c_pretty_printer::multiplicative_expression): Likewise.
11023 (c_pretty_printer::conditional_expression): Likewise.
11024 (c_pretty_printer::assignment_expression): Likewise.
11025 (c_pretty_printer::expression): Likewise.
11026 (pp_unary_expression): Adjust.
11027 (pp_multiplicative_expression): Likewise.
11028 (pp_assignment_expression): Likewise.
11029 (pp_conditional_expression): Likewise.
11030 (pp_expression): Likewise.
11031 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11032 from pp_c_unary_expression. Adjust.
11033 (c_pretty_printer::multiplicative_expression): Rename from
11034 pp_c_multiplicative_expression. Adjust.
11035 (c_pretty_printer::conditional_expression): Rename from
11036 pp_c_conditional_expression. Adjust.
11037 (c_pretty_printer::assignment_expression): Rename from
11038 pp_c_assignment_expression. Adjust.
11039 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11040 (c_pretty_printer::c_pretty_printer): Do not assign to
11041 unary_expression, multiplicative_expression,
11042 conditional_expression, expression.
11043
fb22178f
GDR
110442013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11045
11046 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11047 virtual member function.
11048 (pp_postfix_expression): Adjust.
11049 (pp_c_postfix_expression): Remove.
11050 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11051 from pp_c_postfix_expression. Adjust.
11052 (c_pretty_printer::c_pretty_printer): Do not assign to
11053 postfix_expression.
11054
7ecc2600
GDR
110552013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11056
11057 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11058 virtua member function.
11059 (pp_primary_expression): Adjust.
11060 (pp_c_primary_expression): Remove.
11061 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11062 from pp_c_primary_expression. Adjust.
11063 (pp_c_initializer_list): Use pp_primary_expression.
11064 (c_pretty_printer::c_pretty_printer): Do not assign to
11065 primary_expression.
11066
0691175f
GDR
110672013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11068
11069 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11070 * c-pretty-print.c (M_): Remove.
11071 (c_pretty_printer::translate_string): Define.
11072 (pp_c_type_specifier): Use it.
11073 (pp_c_primary_expression): Likewise.
11074 (pp_c_expression): Likewise.
11075
66dfe4c4
GDR
110762013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11077
11078 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11079 virtual function.
11080 (pp_c_id_expression): Remove.
11081 (pp_id_expression): Adjust.
11082 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11083 pp_c_id_expression. Adjust.
11084 (pp_c_postfix_expression): Use pp_id_expression.
11085 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11086
ca43e9d5
GDR
110872013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11088
11089 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11090 member function.
11091 (pp_constant): Adjust.
11092 (pp_c_constant): Remove.
11093 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11094 pp_c_constant. Adjust.
11095 (pp_c_constant)
11096 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11097 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11098
da6ca2b5
GDR
110992013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11100
11101 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11102 (c_pretty_printer::c_pretty_printer): Declare.
11103 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11104 c_pretty_printer_init. Adjust.
11105 (print_c_tree): Do not call c_pretty_printer_init.
11106 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11107
65a372f4
AC
111082013-08-09 Arnaud Charlet <charlet@adacore.com>
11109
11110 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11111
fd9b0f32
PC
111122013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11113
11114 PR c++/58080
11115 * c-common.c (pointer_int_sum): Add bool parameter.
11116 * c-common.h (pointer_int_sum): Adjust declaration.
11117
e0aec1e9
GDR
111182013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11119
11120 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11121 c_pretty_printer variable.
11122
b066401f
GDR
111232013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11124
11125 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11126 (pp_base): Remove.
11127 (pp_c_base): Likewise. Adjust users.
11128 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11129 (pp_c_whitespace): Do not call pp_base.
11130 (pp_c_left_paren): Likewise.
11131 (pp_c_right_paren): Likewise.
11132 (pp_c_left_brace): Likewise.
11133 (pp_c_right_brace): Likewise.
11134 (pp_c_left_bracket): Likewise.
11135 (pp_c_right_bracket): Likewise.
11136 (pp_c_dot): Likewise.
11137 (pp_c_ampersand): Likewise.
11138 (pp_c_star): Likewise.
11139 (pp_c_arrow): Likewise.
11140 (pp_c_semicolon): Likewise.
11141 (pp_c_complement): Likewise.
11142 (pp_c_exclamation): Likewise.
11143 (pp_c_direct_declarator): Likewise.
11144 (pp_c_ws_string): Likewise.
11145 (pp_c_identifier): Likewise.
11146 (pp_c_statement): Likewise.
11147 (print_c_tree): Likewise.
11148
65e5a578
ESR
111492013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11150
11151 PR c++/58072
11152 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11153 provide useful error strings.
11154
137a1a27
GDR
111552013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11156
11157 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11158 printer functions instead of pp_string or operators and punctuators.
11159 (dump_generic_ada_node): Likewise.
11160 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11161 (pp_c_relational_expression): Likewise.
11162 (pp_c_logical_or_expression): Likewise.
11163
07838b13
GDR
111642013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11165
11166 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11167 functions instead of pp_character.
11168 (pp_ada_tree_identifier): Likewise.
11169 (dump_ada_double_name): Likewise.
11170 (dump_ada_function_declaration): Likewise.
11171 (dump_ada_array_domains): Likewise.
11172 (dump_template_types): Likewise.
11173 (dump_generic_ada_node): Likewise.
11174 (print_ada_declaration): Likewise.
11175 (print_ada_struct_decl): Likewise.
11176 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11177
433cc7b0
TT
111782013-07-23 Tom Tromey <tromey@redhat.com>
11179
11180 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11181 * c-common.c (c_common_reswords): Add _Generic.
11182
688010ba
OB
111832013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11184
11185 * c-common.c: Fix typos.
11186 * c-common.h: Likewise.
11187
2a99e5e6
LL
111882013-07-13 Lubos Lunak <l.lunak@suse.cz>
11189
11190 PR c++/55203
11191 * c-common.c (c_common_attribute_table): Add warn_unused.
11192 (handle_warn_unused_attribute): New.
11193
c26302d5
JJ
111942013-07-10 Jakub Jelinek <jakub@redhat.com>
11195
11196 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11197 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11198
dfeadaa0
PC
111992013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11200
11201 PR c++/57869
11202 * c.opt: Add Wconditionally-supported.
11203
6a2fa4b2
GS
112042013-07-08 Graham Stott <graham.stott@btinternet.com>
11205
adfac8df 11206 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11207 unused variables l_length and l_node.
11208
ecdbd01a 112092013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11210
11211 PR c/57821
11212 * c-common.c (complete_array_type): Delay folding first index
11213 like other indices. When folding, check for index overflow.
11214
bedc293e
MG
112152013-06-27 Marc Glisse <marc.glisse@inria.fr>
11216
11217 PR c++/57509
11218 * c-common.h (c_build_vec_perm_expr): New complain argument.
11219 * c-common.c (c_build_vec_perm_expr): Likewise.
11220 Use save_expr also in C++.
11221
604b2bfc
GDR
112222013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11223
11224 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11225 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11226 * c-opts.c (c_common_post_options): Likewise.
11227
dfeadaa0 112282013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11229
11230 * array-notation-common.c (length_mismatch_in_expr): Changed the
11231 parameter type's from a dynamic array to a vec_tree. Also removed
11232 the size parameters.
11233 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11234 the change above.
11235
2ce86d2e
BI
112362013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11237
11238 * c-common.h (struct cilkplus_an_parts): New structure.
11239 (struct cilkplus_an_loop_parts): Likewise.
11240 (cilkplus_extract_an_triplets): New prototype.
11241 (fix_sec_implicit_args): Likewise.
11242 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11243 (fix_sec_implicit_args): Likewise.
604b2bfc 11244
07a6825b
BI
112452013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11246
11247 * array-notation-common.c (find_inv_trees): Removed an unwanted
11248 typecasting.
11249 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11250 enum rid to enum tree_code.
11251
08346abd
JH
112522013-06-11 Jan Hubicka <jh@suse.cz>
11253
11254 * c-common.c (handle_alias_ifunc_attribute): Do not set
11255 DECL_EXTERNAL for weakref variables.
11256 * c-pragma.c (handle_pragma_weak): Make sure aliases
11257 are not declared as external.
11258
d60f1706
BI
112592013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11260
11261 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11262 function from c/c-array-notation.c.
11263 (is_cilkplus_reduce_builtin): Likewise.
11264 (find_rank): Likewise.
11265 (extract_array_notation_exprs): Likewise.
11266 (replace_array_notations): Likewise.
11267 (find_inv_trees): Likewise.
11268 (replace_inv_trees): Likewise.
11269 (contains_array_notation_expr): Likewise.
11270 (find_correct_array_notation_type): Likewise.
11271 * c-common.h (struct inv_list): Moved this struct from the file
11272 c/c-array-notation.c and added a new field called additional tcodes.
11273 (length_mismatch_in_expr_p): New prototype.
11274 (is_cilkplus_reduce_builtin): Likewise.
11275 (find_rank): Likewise.
11276 (extract_array_notation_exprs): Likewise.
11277 (replace_array_notation): Likewise.
11278 (find_inv_trees): Likewise.
11279 (replace_inv_trees): Likewise.
11280 (find_correct_array_notation_type): Likewise.
dfeadaa0 11281
36536d79
BI
112822013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11283
11284 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11285 function array_notation_init_builtins is called.
11286 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11287 * c-common.def (ARRAY_NOTATION_REF): New tree.
11288 * c-common.h (build_array_notation_expr): New function declaration.
11289 (build_array_notation_ref): Likewise.
11290 (extract_sec_implicit_index_arg): New extern declaration.
11291 (is_sec_implicit_index_fn): Likewise.
11292 (ARRAY_NOTATION_CHECK): New define.
11293 (ARRAY_NOTATION_ARRAY): Likewise.
11294 (ARRAY_NOTATION_START): Likewise.
11295 (ARRAY_NOTATION_LENGTH): Likewise.
11296 (ARRAY_NOTATION_STRIDE): Likewise.
11297 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11298 ARRAY_NOTATION_REF.
11299 (pp_c_expression): Likewise.
11300 * c.opt (flag_enable_cilkplus): New flag.
11301 * array-notation-common.c: New file.
11302
f7716d57
JJ
113032013-05-14 Jakub Jelinek <jakub@redhat.com>
11304
11305 PR c++/57274
11306 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11307
a5e0cd1d
MG
113082013-05-10 Marc Glisse <marc.glisse@inria.fr>
11309
11310 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11311 vectors.
11312
f6bc1c4a
HS
113132013-05-07 Han Shen <shenhan@google.com>
11314
11315 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11316
3f12f6e9
SKS
113172013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11318
11319 * c-common.c (check_user_alignment): Emit error for negative values.
11320
61949153
PC
113212013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11322
11323 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11324
e93e18e9
PC
113252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11326
11327 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11328 __GXX_EXPERIMENTAL_CXX1Y__.
11329
44d90fe1 113302013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11331 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11332
11333 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11334 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11335 to simply use OPT_Wpointer_arith.
11336 (c_sizeof_or_alignof_type): Likewise.
11337
13f39b2e
PC
113382013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11339
11340 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11341
4b84d650
JJ
113422013-04-12 Jakub Jelinek <jakub@redhat.com>
11343
11344 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11345 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11346 specifiers.
11347
fb037b5d
SB
113482013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11349
11350 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11351
4e856798
PC
113522013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11353
11354 * c-common.c (pointer_int_sum): Remove dead code.
11355
4b1baac8
RS
113562013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11357
11358 PR middle-end/56524
11359 * c-common.c (handle_optimize_attribute): Don't call
11360 save_optabs_if_changed.
11361
0b50e654
JJ
113622013-03-05 Jakub Jelinek <jakub@redhat.com>
11363
11364 PR middle-end/56461
11365 * c-pch.c (pch_init): Free target_validity at the end.
11366
48c41403
JJ
113672013-03-04 Jakub Jelinek <jakub@redhat.com>
11368
11369 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11370
e664c61c
KS
113712013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11372 Jakub Jelinek <jakub@redhat.com>
11373
11374 PR sanitizer/56454
11375 * c-common.c (handle_no_sanitize_address_attribute): New function.
11376 (c_common_attribute_table): Add no_sanitize_address attribute.
11377 (handle_no_address_safety_analysis_attribute): Add
11378 no_sanitize_address attribute, not no_address_safety_analysis
11379 attribute.
11380
a475fd3d 113812013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11382
11383 PR target/52555
11384 * c-common.c (handle_optimize_attribute): Call
11385 save_optabs_if_changed.
11386
f6007d99
JJ
113872013-02-18 Jakub Jelinek <jakub@redhat.com>
11388 Steven Bosscher <steven@gcc.gnu.org>
11389
11390 PR pch/54117
11391 * c-opts.c (c_common_post_options): If debug info is enabled
11392 and non-dwarf*, refuse to load PCH files and when writing PCH
11393 file warn.
11394
cf35e2b1
JJ
113952013-02-05 Jakub Jelinek <jakub@redhat.com>
11396
11397 PR middle-end/56167
11398 * c-common.c (handle_error_attribute): Fix condition.
11399
32887460
JJ
114002013-01-30 Jakub Jelinek <jakub@redhat.com>
11401
11402 PR c++/55742
11403 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11404
5af057d8
JM
114052013-01-18 Jason Merrill <jason@redhat.com>
11406
11407 PR target/54908
11408 * c.opt (-fextern-tls-init): New.
11409 * c-opts.c (c_common_post_options): Handle it.
11410
cc83c823
JJ
114112013-01-09 Jakub Jelinek <jakub@redhat.com>
11412
11413 PR c/48418
11414 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11415 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11416 and is either negative or bigger or equal to type precision
11417 of the first operand.
11418
a859517f
MP
114192012-12-03 Marek Polacek <polacek@redhat.com>
11420
11421 PR c/55570
11422 * c-common.c (check_user_alignment): Swap order of tests,
11423 check TREE_CODE first.
11424
2d7aa578
ESR
114252012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11426
11427 PR c++/52654
11428 * c-common.h (overflow_type): New enum.
11429 (build_userdef_literal): Add overflow_type argument.
11430 (tree_userdef_literal): Add overflow_type.
11431 (USERDEF_LITERAL_OVERFLOW): New access macro.
11432 * c-common.c (build_userdef_literal): Add overflow_type
11433 argument.
11434 * c-lex.c (c_lex_with_flags): Add overflow_type to
11435 build_userdef_literal calls.
11436 (interpret_integer, interpret_float): Add overflow_type argument.
11437
cc3c4f62
RB
114382012-11-28 Richard Biener <rguenther@suse.de>
11439
11440 PR c/35634
11441 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11442 here and use a type with proper overflow behavior for types that would
11443 need to be promoted for the arithmetic.
11444
77bc5132
JJ
114452012-11-23 Jakub Jelinek <jakub@redhat.com>
11446
11447 PR sanitizer/55435
11448 * c-common.c (handle_no_address_safety_analysis_attribute): New
11449 function.
11450 (c_common_attribute_table): Add no_address_safety_analysis.
11451
5dc99c46
SB
114522012-11-16 Simon Baldwin <simonb@google.com>
11453
11454 * c.opt: Add f[no-]canonical-system-headers.
11455 * c-opts.c (c_common_handle_option): Handle
11456 OPT_fcanonical_system_headers.
11457
a4a0016d
ESR
114582012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11459
11460 PR c++/54413
11461 * c-opts.c (c_common_handle_option): Set new flags.
11462 * c.opt: Describe new flags.
11463
7dbb85a7
JM
114642012-11-09 Jason Merrill <jason@redhat.com>
11465
11466 * c.opt (Wabi-tag): New.
11467
ad7bac31
AK
114682012-11-09 Andi Kleen <ak@linux.intel.com>
11469
11470 PR 55139
11471 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11472 MEMMODEL_MASK
ad7bac31 11473
7332899a
MLI
114742012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11475
11476 PR c/53063
11477 * c.opt (Wformat): Make it Alias Wformat=1.
11478 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11479 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11480 LangEnabledBy.
11481 (Wformat=): RejectNegative. Use LangEnabledBy.
11482 (Wnonnull): Use LangEnabledBy.
11483 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11484 * c-format.c (set_Wformat): Delete.
11485 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11486 (maybe_read_dollar_number): Likewise.
11487 (avoid_dollar_number): Likewise.
11488 (finish_dollar_format_checking): Likewise.
11489 (check_format_info): Likewise.
11490 (check_format_info_main): Likewise.
11491 (check_format_types): Likewise.
11492 (format_type_warning): Likewise.
11493 * c-common.c (int): Likewise.
11494 (check_function_sentinel): Likewise.
8e745a17 11495 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11496
34a180a6
MLI
114972012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11498
11499 PR c/53063
11500 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11501 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11502 Use LangEnabledBy.
11503 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11504 common.opt.
11505 (Wvariadic-macros): Init(1).
11506 * c-opts.c (c_common_handle_option): Do not handle them
11507 explicitly.
11508 (c_common_post_options): Likewise.
11509 (sanitize_cpp_opts): warn_unused_macros is now
11510 cpp_warn_unused_macros.
11511 (push_command_line_include): Likewise.
11512 * c-common.c (warn_unknown_pragmas): Do not define.
11513 * c-common.h (warn_unknown_pragmas): Do not declare.
11514
3f46d6a5
MLI
115152012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11516
11517 PR c/51294
11518 * c-common.c (conversion_warning): Handle conditional expressions.
11519
880661a4
JW
115202012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11521
11522 PR c++/54930
11523 * c.opt (Wreturn_local_addr): Define new option.
11524
4514a96b
JM
115252012-10-25 Jason Merrill <jason@redhat.com>
11526
f14edc1a
JM
11527 * c.opt (Wvirtual-move-assign): New.
11528
4514a96b
JM
11529 * c.opt (Winherited-variadic-ctor): New.
11530
93100c6b
MG
115312012-10-25 Marc Glisse <marc.glisse@inria.fr>
11532
11533 PR c++/54427
11534 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11535
1efcb8c6
JM
115362012-10-23 Joseph Myers <joseph@codesourcery.com>
11537
11538 * c-common.h (pch_cpp_save_state): Declare.
11539 * c-target.def (c_preinclude): New hook.
11540 * c-opts.c (done_preinclude): New.
11541 (push_command_line_include): Handle default preincluded header.
11542 (cb_file_change): Call pch_cpp_save_state when calling
11543 push_command_line_include.
11544 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11545 (pch_cpp_save_state): New.
11546 (pch_init): Call pch_cpp_save_state conditionally, instead of
11547 calling cpp_save_state.
11548
4a0ae68e
MLI
115492012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11550
11551 PR c/53063
11552 PR c/40989
11553 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11554 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11555 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11556 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11557 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11558 * c-opts.c (c_common_handle_option): Remove explicit handling from
11559 here.
11560 (c_common_post_options): Likewise.
11561
67e4210b
EB
115622012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11563
11564 * c-ada-spec.c (LOCATION_COL): Delete.
11565 (compare_location): New function.
11566 (compare_node): Use it.
11567 (compare_comment): Likewise.
11568
65d4f2cd
MLI
115692012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11570
11571 PR c/53063
11572 PR c/40989
11573 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11574 * c-opts.c (c_common_handle_option): Do not set them here. Add
11575 comment.
11576 (c_common_post_options): Likewise.
11577
909881cb
EB
115782012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11579
11580 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11581 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11582 Remove POINTER_TYPE handling, add large unsigned handling and use
11583 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11584
3a785c97
JJ
115852012-10-12 Jakub Jelinek <jakub@redhat.com>
11586
11587 PR c/54381
11588 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11589 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11590 locs and array of 3 trees instead of just single loc and single
11591 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11592 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11593 For *cmp* builtins that take two sources strings report warnings
11594 about first and second source, not about destination and source.
11595
5e54f81d
MG
115962012-10-12 Marc Glisse <marc.glisse@inria.fr>
11597
11598 PR c++/53055
11599 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11600
f5b02f1e
EB
116012012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11602
11603 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11604 declaring something coming from another file.
11605
b46dbc6c
AC
116062012-10-10 Arnaud Charlet <charlet@adacore.com>
11607
f5b02f1e 11608 PR ada/54845
b46dbc6c
AC
11609 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11610
5d9de0d0
PC
116112012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11612
11613 PR c++/54194
11614 * c-common.c (warn_about_parentheses): Add location_t parameter;
11615 use EXPR_LOC_OR_LOC.
11616 * c-common.h: Update declaration.
11617
a212e43f
MG
116182012-10-09 Marc Glisse <marc.glisse@inria.fr>
11619
11620 PR c++/54427
11621 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11622 more operations. Make error messages optional.
11623 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11624 (scalar_to_vector): Declare.
11625
b1db7f91
JM
116262012-10-08 Jason Merrill <jason@redhat.com>
11627
11628 * c-common.c (c_common_reswords): Add thread_local.
11629
e28d52cf
DS
116302012-10-08 Dodji Seketeli <dodji@redhat.com>
11631
11632 PR c++/53528 C++11 attribute support
11633 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11634 new functions.
11635 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11636 static function.
11637 (handle_aligned_attribute): In choose strictest alignment
11638 among many. Use new check_cxx_fundamental_alignment_constraints.
11639 (handle_transparent_union_attribute): In c++11 attribute syntax,
11640 don't look through typedefs.
11641
3b78de56
AC
116422012-10-04 Arnaud Charlet <charlet@adacore.com>
11643
11644 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11645 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11646 out of dumpfile.h.
11647
6040bb5f
DC
116482012-09-25 Dehao Chen <dehao@google.com>
11649
11650 PR middle-end/54645
3b78de56 11651 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11652 map when read in the pch.
11653
3f8257db 116542012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11655
11656 * c-ada-spec.c: Style fixes.
11657
3f8257db 116582012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11659
11660 * c.opt (-fada-spec-parent): Define new command line switch.
11661 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11662 is specified, generate binding spec as a child of the specified unit.
11663
0ccb505d
PC
116642012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11665 Manuel López-Ibáñez <manu@gcc.gnu.org>
11666
11667 PR c++/53210
11668 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11669
c583af79
AC
116702012-08-23 Arnaud Charlet <charlet@adacore.com>
11671
11672 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11673 for pointers, and add missing Convention C pragma.
11674 (print_ada_struct_decl): Add missing aliased keyword.
11675 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11676
1a4049e7
JJ
116772012-08-17 Jakub Jelinek <jakub@redhat.com>
11678
11679 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11680 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11681 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11682 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11683 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11684
70b5e7dc
RG
116852012-08-10 Richard Guenther <rguenther@suse.de>
11686
11687 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11688
f8923f7e
SB
116892012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11690
11691 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11692 instead of separate pp_newline and pp_flush.
11693 (print_c_tree): Likewise.
11694
e45abe1f
RH
116952012-07-26 Richard Henderson <rth@redhat.com>
11696
11697 * c-common.c (handle_hot_attribute): Allow labels.
11698 (handle_cold_attribute): Likewise.
11699
332f1d24
JJ
117002012-07-20 Jakub Jelinek <jakub@redhat.com>
11701
11702 PR c++/28656
11703 * c-common.c (check_function_nonnull): Handle multiple nonnull
11704 attributes properly.
11705
7ee2468b
SB
117062012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11707
11708 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11709 * c-ada-spec.c: Likewise.
11710 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11711
ee7b28eb
SB
117122012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11713
11714 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11715 Remove code conditional on it.
11716
6bdf3519
SB
117172012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11718
11719 * c-gimplify.c: Do not include basic-block.h.
11720 * c-common.c: Do not include linfuncs.h.
11721
532aafad
SB
117222012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11723
11724 * c-common.h: Include tree.h.
11725
8d0d1915
JM
117262012-07-02 Jason Merrill <jason@redhat.com>
11727
11728 PR c++/53524
11729 * c-common.c (get_priority): Call default_conversion.
11730
fbc873ad
UB
117312012-07-01 Uros Bizjak <ubizjak@gmail.com>
11732
11733 * c-pch.c (c_common_write_pch): Remove unused variables.
11734
d4a10d0a
SB
117352012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11736
11737 * cppspec.c: Moved from gcc/ to here.
11738
6f3a2e23
KT
117392012-06-27 Kai Tietz <ktietz@redhat.com>
11740
11741 PR preprocessor/37215
11742 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11743
8ca92d04
SB
117442012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11745
11746 * c-common.h (c_common_print_pch_checksum): Remove.
11747 * c-pch.c: Do not include output.h.
11748 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11749 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11750 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11751 (struct c_pch_header): Remove.
11752 (get_ident): Update gpch version.
11753 (pch_init): Do not print executable_checksum to asm_out_file.
11754 Do not fail if there is no asm_out_file to read back from. Set
11755 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11756 (c_common_write_pch): Verify that nothing was written to asm_out_file
11757 since pch_init was called. Do not write a c_pch_header, and do not
11758 copy from asm_out_file to the PCH.
11759 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11760 the content of asm_out_file from the PCH.
11761 (c_common_print_pch_checksum): Remove.
11762 * c-opts.c (c_common_init): Print out executable_checksum directly.
11763
70f42967
SB
117642012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11765
11766 * c-target.def (objc_declare_unresolved_class_reference,
11767 objc_declare_class_definition): Add new hooks.
11768
a8781821
SB
117692012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11770
11771 * c-lex.c: Do not include output.h.
11772 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11773 Remove uses of ASM_OUTPUT_IDENT.
11774
9e1a8dd1
RR
117752012-06-15 Marc Glisse <marc.glisse@inria.fr>
11776
11777 PR c++/51033
11778 * c-common.h (c_build_vec_perm_expr): Move decl here.
11779 * c-common.c (c_build_vec_perm_expr): Move definition
11780 here.
11781
6f07a821
SB
117822012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11783
11784 * c.opt (fconserve-space): Turn into a no-op.
11785
9faeb493 117862012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11787
11788 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11789 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11790 both the start and end of the function.
11791
a4b7d13c
SB
117922012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11793
11794 * c-common.c: Do not include output.h.
11795 * c-pragma.c: Likewise.
11796
c265f413
SA
117972012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11798
11799 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11800 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11801 (lang_decl_name): Handle namespace decls.
11802
be7a421e
SB
118032012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11804
11805 * c-ada-spec.c: Do not include output.h.
11806 * c-semantics.c: Likewise.
11807
65de6659
JM
118082012-05-29 Joseph Myers <joseph@codesourcery.com>
11809
11810 * c-common.c: Fix typo.
11811
ca5f4331
MM
118122012-05-29 Michael Matz <matz@suse.de>
11813
11814 * c-common.h (c_expand_decl): Remove prototype.
11815
4f7f7aca
MLI
118162012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11817
11818 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11819 * c-opts.c (c_common_handle_option): Remove code handling
11820 warn_missing_braces.
11821
4a792f9b
PC
118222012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11823
11824 PR c++/25137
11825 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11826 -Wmissing_braces.
11827
650dc14a
DS
118282012-05-22 Dodji Seketeli <dodji@redhat.com>
11829
11830 PR c++/53322
11831 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11832
9b095bf1
MLI
118332012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11834
11835 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11836 * c-opts.c (c_common_handle_option): Do not handle explicitly
11837 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11838
0b2c4be5
DS
118392012-05-16 Dodji Seketeli <dodji@redhat.com>
11840
11841 PR preprocessor/7263
ab20d992 11842 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11843 to cpp_classify_number. For diagnostics, use the precise location
11844 instead of the global input_location.
11845
a1bde5af
PC
118462012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11847
d02924ef 11848 PR c++/11856
a1bde5af
PC
11849 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11850
d1ede5f4
BS
118512012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11852
a1bde5af 11853 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11854
f2bc201f
MLI
118552012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11856
11857 PR 53063
11858 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11859 Wreorder): Use LangEnabledBy.
11860 * c-opts.c (c_common_handle_option): Do not enable them
11861 explicitly. Call lang-specific generated functions.
11862 (c_common_post_options): Do not set them here.
11863
95744782
MLI
118642012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11865
11866 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11867 Wmissing-field-initializers,Wmissing-parameter-type,
11868 Wold-style-declaration,Woverride-init): Use EnabledBy.
11869 * c-opts.c (c_common_post_options): Do not set here explicitly.
11870
7d5a5747
MLI
118712012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11872
11873 PR 53063
11874 * c-opts.c (c_common_handle_option): Use handle_generated_option
11875 to enable sub-options.
11876
5a3c9cf2
PC
118772012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11878
11879 PR c++/53158
11880 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11881
3ac8781c
RG
118822012-05-10 Richard Guenther <rguenther@suse.de>
11883
11884 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11885 adjust commentary about TYPE_IS_SIZETYPE types.
11886
1e537948
MLI
118872012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11888
11889 PR c++/53261
11890 * c-common.c (warn_logical_operator): Check that argument of
11891 integer_zerop is not NULL.
11892
f2c4a785
MLI
118932012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11894
11895 PR c/43772
11896 * c-common.c (warn_logical_operator): Do not warn if either side
11897 is already true or false.
11898
50f305ca
MLI
118992012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11900
11901 PR c/51712
11902 * c-common.c (expr_original_type): New.
11903 (shorten_compare): Do not warn for enumeration types.
11904
0c3641b0
MLI
119052012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11906
11907 * c.opt (fpermissive): Add Var(flag_permissive).
11908
7edaa4d2
MG
119092012-04-30 Marc Glisse <marc.glisse@inria.fr>
11910
11911 PR c++/51033
11912 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11913 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11914
b9c8da34
DS
119152012-04-30 Dodji Seketeli <dodji@redhat.com>
11916
11917 Add -Wvarargs option
ab20d992 11918 * c.opt (Wvarargs): Define new option.
b9c8da34 11919
e6c69da0
MLI
119202012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11921
11922 * c-common.c (check_function_arguments): Replace
11923 Wmissing-format-attribute with Wsuggest-attribute=format.
11924
90137d8f
MLI
119252012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11926
11927 * c.opt (Wsuggest-attribute=format): New. Alias of
11928 Wmissing-format-attribute.
11929 * c-format.c (decode_format_type): Replace
11930 Wmissing-format-attribute with Wsuggest-attribute=format.
11931 (check_function_format): Likewise.
11932
9faeb493 119332012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11934
11935 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11936 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11937 * c.opt: Add Wliteral-suffix.
11938
c1771a20
MLI
119392012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11940
11941 PR c/44774
11942 * c.opt (Wpedantic): New.
11943 (pedantic): Alias Wpedantic.
11944 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11945 (c_common_post_options): Likewise.
11946 (sanitize_cpp_opts): Likewise.
11947 * c-lex.c (interpret_float): Likewise.
11948 * c-format.c (check_format_types): Likewise.
11949 * c-common.c (pointer_int_sum): Likewise.
11950 (c_sizeof_or_alignof_type): Likewise.
11951 (c_add_case_label): Likewise.
11952 (c_do_switch_warnings): Likewise.
11953 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11954
04b391c1
JM
119552012-04-15 Jason Merrill <jason@redhat.com>
11956
11957 PR c++/52818
11958 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11959 (C_STD_NAME): Distinguish between C++98 and C++11.
11960
ac868f29
EB
119612012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11962
11963 PR target/52624
11964 * c-common.h (uint16_type_node): Rename into...
11965 (c_uint16_type_node): ...this.
11966 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11967 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11968
fd4116f4
MLI
119692012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11970
11971 * c-common.c (warn_if_unused_value): Move definition to here.
11972 * c-common.h (warn_if_unused_value): Move declaration to here.
11973
573ac65e
WB
119742012-03-23 William Bader <williambader@hotmail.com>
11975
11976 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11977
552b8185
JM
119782012-03-20 Jason Merrill <jason@redhat.com>
11979
11980 * c-common.h (enum cxx_dialect): Add cxx1y.
11981 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11982 test.
11983 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11984 * c-opts.c (c_common_post_options): Likewise.
11985 (set_std_cxx1y): New.
11986 (c_common_handle_option): Call it.
11987 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11988
04398fa8
PC
119892012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11990
11991 PR c++/14710
11992 * c.opt ([Wuseless-cast]): Add.
11993
d2a12ae7
RG
119942012-03-16 Richard Guenther <rguenther@suse.de>
11995
11996 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11997
a12bf402
MLI
119982012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11999
12000 PR c++/44783
12001 * c.opt (ftemplate-backtrace-limit) Add.
12002
5c30094f
RO
120032012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12004
12005 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12006 handling.
12007 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12008 (init_pragma): Don't register extern_prefix.
12009
21fa2faf
RG
120102012-03-12 Richard Guenther <rguenther@suse.de>
12011
12012 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12013 (builtin_type_for_size): Likewise.
12014
e3793c6f
JJ
120152012-02-13 Jakub Jelinek <jakub@redhat.com>
12016
12017 PR c++/52215
12018 * c-common.c (sync_resolve_params): Don't decide whether to convert
12019 or not based on TYPE_SIZE comparison, convert whenever arg_type
12020 is unsigned INTEGER_TYPE.
12021
93286335
PC
120222012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12023
12024 PR c/52118
12025 * c.opt ([Wunused-local-typedefs]): Fix description.
12026
7a421706
MS
120272012-01-24 Mike Stump <mikestump@comcast.net>
12028
12029 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12030 exactly.
12031
ba9b1f11
RG
120322012-01-18 Richard Guenther <rguenther@suse.de>
12033
12034 * c-opts.c (c_common_post_options): Reset LTO flags if
12035 we are about to generate a PCH.
12036
465406be
PC
120372012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12038
12039 PR c++/51777
12040 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12041 use pp_unsigned_wide_integer.
12042
aee15221
RG
120432012-01-10 Richard Guenther <rguenther@suse.de>
12044
12045 PR middle-end/51806
12046 * c-opts.c (c_common_handle_option): Move -Werror handling
12047 to language independent code.
12048
5720c0dc
RG
120492012-01-05 Richard Guenther <rguenther@suse.de>
12050
12051 PR middle-end/51764
12052 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12053 from common.opt.
12054
73ac190a
PC
120552011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12056
12057 PR c++/51316
12058 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12059 of array types with an unknown bound.
12060
48b0b196
JM
120612011-12-20 Joseph Myers <joseph@codesourcery.com>
12062
12063 * c-common.c (flag_isoc99): Update comment to refer to C11.
12064 (flag_isoc1x): Change to flag_isoc11.
12065 * c-common.h (flag_isoc99): Update comment to refer to C11.
12066 (flag_isoc1x): Change to flag_isoc11.
12067 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12068 C11.
12069 * c-opts.c (set_std_c1x): Change to set_std_c11.
12070 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12071 Call set_std_c11.
12072 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12073 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12074 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12075 standard.
12076 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12077 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12078 (std=gnu1x): Make alias of std=gnu11.
12079
d58d6eb5
JM
120802011-12-19 Jason Merrill <jason@redhat.com>
12081
12082 PR c++/51228
12083 * c-common.c (handle_transparent_union_attribute): Check the first
12084 field if the type is complete.
12085
b3908fcc
JW
120862011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12087
12088 PR libstdc++/51365
12089 * c-common.c (RID_IS_FINAL): Add.
12090 * c-common.h (RID_IS_FINAL): Add.
12091
fea3ca91
IS
120922011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12093
12094 * c.opt (fgnu-runtime): Provide full description.
12095 (fnext-runtime): Likewise.
12096 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12097
62bad7cd
AM
120982011-11-28 Andrew MacLeod <amacleod@redhat.com>
12099
12100 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12101 predefines in one place. Add LOCK_FREE predefines.
12102 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12103 new func.
12104
c466c4ff
AM
121052011-11-24 Andrew MacLeod <amacleod@redhat.com>
12106
12107 PR c/51256
9faeb493 12108 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12109 conditions
9faeb493
UB
12110 (resolve_overloaded_atomic_exchange,
12111 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12112 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12113 error_mark_node for error conditions.
9faeb493 12114
a5952633
RG
121152011-11-08 Richard Guenther <rguenther@suse.de>
12116
12117 PR middle-end/51010
ab20d992 12118 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12119
0a35513e
AH
121202011-11-07 Richard Henderson <rth@redhat.com>
12121 Aldy Hernandez <aldyh@redhat.com>
12122 Torvald Riegel <triegel@redhat.com>
12123
12124 Merged from transactional-memory.
12125
12126 * c-common.c (handle_tm_wrap_attribute,
12127 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12128 (struct c_common_reswords): Added __transaction* keywords.
12129 (struct c_common_attribute_table): Added transaction* and tm_regparm
12130 attributes.
12131 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12132 masks.
12133 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12134 find_tm_attribute): Declare.
12135
6d87092d
JM
121362011-11-07 Jason Merrill <jason@redhat.com>
12137
12138 PR c++/35688
12139 * c-common.c, c-common.h: Revert yesterday's changes.
12140
8e7860a1
JM
121412011-11-06 Jason Merrill <jason@redhat.com>
12142
12143 PR c++/35688
12144 * c-common.c (decl_has_visibility_attr): Split out from...
12145 (c_determine_visibility): ...here.
12146 * c-common.h: Declare it.
12147
d19fa6b5
JM
121482011-11-06 Joseph Myers <joseph@codesourcery.com>
12149
12150 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12151 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12152 type.
12153 (check_user_alignment): New. Split out of
12154 handle_aligned_attribute. Disallow integer constants with
12155 noninteger types. Conditionally allow zero.
12156 (handle_aligned_attribute): Use check_user_alignment.
12157 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12158
86951993
AM
121592011-11-06 Andrew MacLeod <amacleod@redhat.com>
12160 Richard Henderson <rth@redhat.com>
12161
12162 Merged from cxx-mem-model.
12163
12164 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12165 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12166 parameters that are the same type size.
12167 (get_atomic_generic_size): New. Find size of generic
12168 atomic function parameters and do typechecking.
12169 (add_atomic_size_parameter): New. Insert size into parameter list.
12170 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12171 either __atomic_exchange_n or external library call.
9faeb493 12172 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12173 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12174 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12175 __atomic_load_n or an external library call.
12176 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12177 __atomic_store_n or an external library call.
12178 (resolve_overloaded_builtin): Handle new __atomic builtins.
12179
cf9e9959
EB
121802011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12181
12182 PR c++/50608
12183 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12184 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12185 <INDIRECT_REF>: Return the argument.
12186 <ARRAY_REF>: Remove special code for negative offset.
12187 Call fold_build_pointer_plus instead of size_binop.
12188 (fold_offsetof): Remove STOP_REF argument and adjust.
12189 * c-common.h (fold_offsetof_1): Declare.
12190 (fold_offsetof): Remove STOP_REF argument.
12191
25339f10
JM
121922011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12193
12194 PR c++/50810
12195 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12196 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12197 Wnarrowing for C++0x and C++98.
12198 * c.opt ([Wnarrowing]): Update.
12199
89401152
PC
122002011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12201
12202 PR c++/44277
12203 * c.opt: Add Wzero-as-null-pointer-constant.
12204
97e3ad20
JM
122052011-10-31 Jason Merrill <jason@redhat.com>
12206
15694fdd
JM
12207 * c.opt (-fdeduce-init-list): Off by default.
12208
97e3ad20
JM
12209 PR c++/50920
12210 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12211 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12212 and -Wc++11-compat.
12213 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12214
fb9120e3
RAV
122152011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12216
12217 PR c++/30066
12218 * c.opt (fvisibility-inlines-hidden): Description change.
12219
3ce4f9e4
ESR
122202011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12221
12222 Implement C++11 user-defined literals.
12223 * c-common.c (build_userdef_literal): New.
12224 * c-common.def: New tree code.
12225 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12226 * c-lex.c (interpret_float): Add suffix parm.
12227 (c_lex_with_flags): Build literal tokens.
12228
5f53c243
PC
122292011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12230
12231 PR c++/50841
12232 Revert:
12233 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12234
12235 PR c++/50810
12236 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12237 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12238 Wnarrowing for C++0x and C++98.
12239 * c.opt ([Wnarrowing]): Update.
12240
263734e1
PC
122412011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12242
12243 PR c++/50810
12244 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12245 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12246 Wnarrowing for C++0x and C++98.
12247 * c.opt ([Wnarrowing]): Update.
12248
d2e312d7
PC
122492011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12250
12251 PR c++/45385
12252 * c-common.c (conversion_warning): Remove code looking for
12253 artificial operands.
12254
d17687f6
DS
122552011-10-18 Dodji Seketeli <dodji@redhat.com>
12256
12257 PR bootstrap/50760
12258 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12259 !NO_IMPLICIT_EXTERN_C.
d17687f6 12260
fc8396e9
PC
122612011-10-17 Michael Spertus <mike_spertus@symantec.com>
12262
12263 * c-common.c (c_common_reswords): Add __bases,
12264 __direct_bases.
12265 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12266
122672011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12268
12269 PR c++/50757
12270 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12271
847e697a
TT
122722011-10-15 Tom Tromey <tromey@redhat.com>
12273 Dodji Seketeli <dodji@redhat.com>
12274
12275 * c.opt (fdebug-cpp): New option.
12276 * c-opts.c (c_common_handle_option): Handle the option.
12277 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12278 output stream in parameter. Factorized from ...
12279 (maybe_print_line): ... this. Dump location debug information when
12280 -fdebug-cpp is in effect.
12281 (print_line_1): New static function. Takes an output stream in
12282 parameter. Factorized from ...
12283 (print_line): ... here. Dump location information when -fdebug-cpp
12284 is in effect.
12285 (scan_translation_unit): Dump location information when
12286 -fdebug-cpp is in effect.
12287
92582b75
TT
122882011-10-15 Tom Tromey <tromey@redhat.com>
12289 Dodji Seketeli <dodji@redhat.com>
12290
12291 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12292 without argument.
12293 * c-opts.c (c_common_handle_option)<case
12294 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12295 cases. Handle -ftrack-macro-expansion with and without argument.
12296
46427374
TT
122972011-10-15 Tom Tromey <tromey@redhat.com>
12298 Dodji Seketeli <dodji@redhat.com>
12299
12300 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12301 (print_line, cb_define, do_line_change): Adjust to avoid touching
12302 the internals of struct line_map. Use the public API instead.
12303 * c-pch.c (c_common_read_pch): Likewise.
12304 * c-lex.c (fe_file_change): Likewise.
12305
fc8396e9
PC
123062011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12307
12308 PR c++/17212
12309 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12310
123112011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12312
12313 PR c++/33067
12314 * c-pretty-print.c (pp_c_floating_constant): Output
12315 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12316
e79983f4
MM
123172011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12318
12319 * c-common.c (def_builtin_1): Delete old interface with two
12320 parallel arrays to hold standard builtin declarations, and replace
12321 it with a function based interface that can support creating
12322 builtins on the fly in the future. Change all uses, and poison
12323 the old names. Make sure 0 is not a legitimate builtin index.
12324 * c-omp.c (c_finish_omp_barrier): Ditto.
12325 (c_finish_omp_taskwait): Ditto.
12326 (c_finish_omp_flush): Ditto.
12327
6637388f
TG
123282011-10-11 Tristan Gingold <gingold@adacore.com>
12329
12330 * c.opt: (fallow-parameterless-variadic-functions): New.
12331
3797cb21
DS
123322011-09-08 Dodji Seketeli <dodji@redhat.com>
12333
12334 PR c++/33255 - Support -Wunused-local-typedefs warning
12335 * c-common.h (struct c_language_function::local_typedefs): New
12336 field.
9faeb493
UB
12337 (record_locally_defined_typedef, maybe_record_typedef_use)
12338 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12339 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12340 (maybe_record_typedef_use)
12341 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12342 * c.opt: Declare new -Wunused-local-typedefs flag.
12343
693ddb1b
EB
123442011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12345
12346 PR middle-end/50266
12347 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12348 computations.
12349
830c740f
RG
123502011-09-05 Richard Guenther <rguenther@suse.de>
12351
12352 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12353 of integer_minus_one_node for empty array upper bounds.
12354
892a371f
DS
123552011-08-28 Dodji Seketeli <dodji@redhat.com>
12356
12357 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12358 it's the first time it's being called on this main TU.
12359
0e3fdb48
RB
123602011-08-24 Richard Guenther <rguenther@suse.de>
12361
12362 PR c/49396
12363 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12364
123652011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12366
12367 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12368 defined in cpp_init_builtins and c_cpp_builtins.
12369
d4a83c10
JM
123702011-08-19 Joseph Myers <joseph@codesourcery.com>
12371
12372 * c-common.c (c_common_reswords): Add __builtin_complex.
12373 * c-common.h (RID_BUILTIN_COMPLEX): New.
12374
bbceee64
JM
123752011-08-18 Joseph Myers <joseph@codesourcery.com>
12376
12377 * c-common.c (c_common_reswords): Add _Noreturn.
12378 (keyword_is_function_specifier): Handle RID_NORETURN.
12379 * c-common.h (RID_NORETURN): New.
12380
3f8257db 123812011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12382
12383 * c-common.c (unsafe_conversion_p): New function. Check if it is
12384 unsafe to convert an expression to the type.
12385 (conversion_warning): Adjust, use unsafe_conversion_p.
12386 * c-common.h (unsafe_conversion_p): New function declaration.
12387
20906c66
JJ
123882011-08-02 Jakub Jelinek <jakub@redhat.com>
12389
12390 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12391 (c_finish_omp_taskyield): New prototype.
12392 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12393 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12394 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12395 or RHS1 have side-effects, evaluate those too in the right spot,
12396 if it is a decl and LHS is also a decl, error out if they
12397 aren't the same.
12398 (c_finish_omp_taskyield): New function.
12399 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12400 * c-pragma.c (omp_pragmas): Add taskyield.
12401 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12402 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12403 PRAGMA_OMP_CLAUSE_MERGEABLE.
12404
770e5a2e
DS
124052011-07-25 Dodji Seketeli <dodji@redhat.com>
12406
12407 * c-common.h (set_underlying_type): Remove parm name from
12408 declaration.
12409
1baae426
RG
124102011-07-25 Romain Geissler <romain.geissler@gmail.com>
12411
12412 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12413
fcb21722
JM
124142011-07-22 Jason Merrill <jason@redhat.com>
12415
76f86d00
JM
12416 PR c++/49793
12417 * c.opt (Wnarrowing): New.
12418
3a636414
JM
12419 PR c++/30112
12420 * c-common.h: Declare c_linkage_bindings.
12421 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12422
fcb21722
JM
12423 PR c++/49813
12424 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12425 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12426 as flag_isoc99 for 'restrict'.
12427 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12428
02614448
ILT
124292011-07-21 Ian Lance Taylor <iant@google.com>
12430
12431 PR middle-end/49705
12432 * c-common.c (c_disable_warnings): New static function.
12433 (c_enable_warnings): New static function.
12434 (c_fully_fold_internal): Change local unused_p to bool. Call
12435 c_disable_warnings and c_enable_warnings rather than change
12436 c_inhibit_evaluation_warnings.
12437
34429675
JM
124382011-07-20 Jason Merrill <jason@redhat.com>
12439
12440 PR c++/6709 (DR 743)
12441 PR c++/42603 (DR 950)
12442 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12443 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12444 (CPP_DECLTYPE): New.
12445 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12446
5d49b6a7
RG
124472011-07-19 Richard Guenther <rguenther@suse.de>
12448
12449 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12450 * c-omp.c (c_finish_omp_for): Likewise.
12451
e84a58ff
EB
124522011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12453
12454 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12455 body on the next line.
12456
329af3c7
JM
124572011-07-08 Jason Merrill <jason@redhat.com>
12458
4063e61b
JM
12459 PR c++/45437
12460 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12461
329af3c7
JM
12462 PR c++/49673
12463 * c-common.c (c_apply_type_quals_to_decl): Don't check
12464 TYPE_NEEDS_CONSTRUCTING.
12465
1a072294
RG
124662011-07-06 Richard Guenther <rguenther@suse.de>
12467
12468 * c-common.c (c_common_nodes_and_builtins):
12469 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12470
fce5dddd
RG
124712011-07-05 Richard Guenther <rguenther@suse.de>
12472
12473 * c-common.c (c_common_nodes_and_builtins): Build all common
12474 tree nodes first.
12475
45d439ac
JJ
124762011-06-27 Jakub Jelinek <jakub@redhat.com>
12477
56300785
JJ
12478 * c-common.h (c_tree_chain_next): New static inline function.
12479
45d439ac
JJ
12480 * c-common.c (check_builtin_function_arguments): Handle
12481 BUILT_IN_ASSUME_ALIGNED.
12482
e0a8ecf2
AM
124832011-06-21 Andrew MacLeod <amacleod@redhat.com>
12484
12485 * c-common.c: Add sync_ or SYNC__ to builtin names.
12486 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12487
124882011-06-20 Pierre Vittet <piervit@pvittet.com>
12489
12490 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12491 handler.
12492 (gen_pragma_handler): New union.
12493 (internal_pragma_handler): New type.
12494 (c_register_pragma_with_data)
12495 (c_register_pragma_with_expansion_and_data): New functions.
12496
12497 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12498 (c_register_pragma, c_register_pragma_with_expansion)
12499 (c_invoke_pragma_handler): Changed to work with
12500 internal_pragma_handler.
12501 (c_register_pragma_with_data)
12502 (c_register_pragma_with_expansion_and_data): New functions.
12503
677f3fa8
JM
125042011-06-14 Joseph Myers <joseph@codesourcery.com>
12505
12506 * c-common.c: Include common/common-target.h.
12507 (handle_section_attribute): Use
12508 targetm_common.have_named_sections.
12509 * c-cppbuiltin.c: Include common/common-target.h.
12510 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12511
d7fc8c14
RG
125122011-06-10 Richard Guenther <rguenther@suse.de>
12513
12514 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12515 to print a IDENTIFIER_NODE.
12516
10e48e39
RO
125172011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12518 Joseph Myers <joseph@codesourcery.com>
12519
12520 * c.opt (fbuilding-libgcc): New option.
12521 * c-cppbuiltin.c (c_cpp_builtins): Define
12522 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12523
6976ae51
JM
125242011-06-07 Jason Merrill <jason@redhat.com>
12525
3ff60975
JM
12526 * c-common.c (max_tinst_depth): Lower default to 900.
12527
6976ae51
JM
12528 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12529
009db074
RG
125302011-06-07 Richard Guenther <rguenther@suse.de>
12531
12532 * c-common.c (c_common_nodes_and_builtins): Do not set
12533 size_type_node or call set_sizetype.
12534
b4592b92
DS
125352011-06-07 Dodji Seketeli <dodji@redhat.com>
12536
12537 PR debug/49130
12538 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12539 type when using pointer comparison to compare types.
b4592b92 12540
014ab419
JW
125412011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12542
12543 * c.opt: Add -Wdelete-non-virtual-dtor.
12544 * c-opts.c (c_common_handle_option): Include it in -Wall.
12545
4f60111f
NF
125462011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12547
12548 PR bootstrap/49190
12549
12550 Revert:
12551 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12552
12553 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12554 not tree_common.
12555
4cc4f2f4
JJ
125562011-05-27 Jakub Jelinek <jakub@redhat.com>
12557
12558 PR c++/49165
12559 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12560 C++ don't call c_common_truthvalue_conversion on void type arms.
12561
38e01f9e
NF
125622011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12563
12564 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12565 (stmt_list_stack): Define.
12566 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12567 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12568
92e948a8
NF
125692011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12570
12571 * c-common.c (warning_candidate_p): Check for BLOCKs.
12572
a2fc3e63
NF
125732011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12574
12575 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12576 not tree_common.
12577
0957c029
JJ
125782011-05-25 Jakub Jelinek <jakub@redhat.com>
12579
12580 * c-common.c (def_fn_type): Remove extra va_end.
12581
828fb3ba
JM
125822011-05-23 Jason Merrill <jason@redhat.com>
12583
12584 PR c++/48106
12585 * c-common.c (c_common_get_narrower): New.
12586 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12587
dde05067
NF
125882011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12589
12590 * c-common.h (check_function_arguments): Tweak prototype of
12591 check_function_arguments.
12592 * c-common.c (check_function_arguments): Likewise. Adjust
12593 calls to check_function_nonnull, check_function_format, and
12594 check_function_sentinel.
12595 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12596 separate attributes and typelist arguments. Use
12597 FOREACH_FUNCTION_ARGS to iterate over argument types.
12598
3c0d13bf
PC
125992011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12600
12601 * c-common.c (c_common_reswords): Reorder.
12602 * c-common.h (rid): Likewise.
12603
8242dd04
NF
126042011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12605
12606 * c-common.c (def_fn_type): Don't call build_function_type, call
12607 build_function_type_array or build_varargs_function_type_array
12608 instead.
12609 (c_common_nodes_and_builtins): Likewise.
12610
3d528853
NF
126112011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12612
12613 * c-common.c (c_add_case_label): Omit the loc argument to
12614 build_case_label.
12615 * c-common.h (build_case_label): Remove.
12616 * c-semantics.c (build_case_label): Remove.
12617
a04a722b
JM
126182011-05-05 Joseph Myers <joseph@codesourcery.com>
12619
12620 * c-objc.h (objc_start_method_definition): Update prototype.
12621 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12622
e19a18d4
NF
126232011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12624
12625 * c-common.c (check_main_parameter_types): Reindent. Don't use
12626 TYPE_ARG_TYPES directly.
12627 (handle_nonnull_attribute): Likewise.
12628 (sync_resolve_params): Likewise.
12629 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12630 to check_format_string.
12631 (handle_format_attribute): Likewise.
12632 (check_format_string): Take a function type to examine instead of
12633 a type list. Use a function_arg_iterator to step through argument
12634 types.
12635
c62c040f
RG
126362011-05-04 Richard Guenther <rguenther@suse.de>
12637
12638 * c-common.c (fix_string_type): Use size_int for index type bounds.
12639 (start_fname_decls): Do not pass NULL to build_int_cst.
12640 (c_init_attributes): Likewise.
12641 * c-lex.c (c_lex_with_flags): Likewise.
12642
c12ff9d8
JM
126432011-04-27 Jason Merrill <jason@redhat.com>
12644
12645 * c-common.c (make_tree_vector_from_list): New.
12646 * c-common.h: Declare it.
12647
304dfbe3
RG
126482011-04-26 Richard Guenther <rguenther@suse.de>
12649
12650 PR preprocessor/48248
12651 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12652 for output size with -P.
12653
3c0d13bf
PC
126542011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12655
12656 * c-common.c (struct c_common_resword): Add __underlying_type.
12657 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12658
04695783
JM
126592011-04-20 Jim Meyering <meyering@redhat.com>
12660
12661 * c-format.c (init_dollar_format_checking): Remove useless
12662 if-before-free.
12663
0dc33c3c
NP
126642011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12665
12666 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12667 (objc_detect_field_duplicates): New.
0dc33c3c 12668 * stub-objc.c: Likewise.
3c0d13bf 12669
c59633d9
NP
126702011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12671
12672 * stub-objc.c (objc_declare_protocols): Renamed to
12673 objc_declare_protocol.
12674 * c-objc.h: Likewise.
3c0d13bf 12675
32dabdaf
NP
126762011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12677
12678 * stub-objc.c (objc_declare_class): Updated argument name.
12679
81f653d6
NF
126802011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12681
12682 * c-common.h (c_common_init_ts): Declare.
12683 * c-common.c (c_common_init_ts): Define.
12684
eb345401
NP
126852011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12686
12687 * c-objc.h (objc_build_message_expr): Updated prototype.
12688 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12689
a358e188
MJ
126902011-04-12 Martin Jambor <mjambor@suse.cz>
12691
12692 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12693 of cgraph_node.
12694
e6313a78
RG
126952011-04-11 Richard Guenther <rguenther@suse.de>
12696
12697 * c-common.c (complete_array_type): Build a range type of
12698 proper type.
12699
dcf0c47e
NF
127002011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12701
12702 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12703 (handle_type_generic_attribute): Likewise.
12704
1ee44b26
JM
127052011-04-07 Jason Merrill <jason@redhat.com>
12706
12707 PR c++/48450
12708 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12709 conversion from C++0x scoped enum.
12710
acce4e77
JM
127112011-04-06 Joseph Myers <joseph@codesourcery.com>
12712
12713 * c-target-def.h: New file.
12714 * c-target.def: New file.
12715 * c-target.h: New file.
12716 * c-common.c (targetcm): Don't define here.
12717 * c-common.h (default_handle_c_option): Declare.
12718 * c-format.c: Include c-target.h instead of target.h.
12719 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12720 include tm.h.
12721 (default_handle_c_option): Move from targhooks.c.
12722
e2eefb55
JJ
127232011-03-29 Jakub Jelinek <jakub@redhat.com>
12724
12725 PR preprocessor/48248
12726 * c-ppoutput.c (print): Add src_file field.
12727 (init_pp_output): Initialize it.
12728 (maybe_print_line): Don't optimize by adding up to 8 newlines
12729 if map->to_file and print.src_file are different file.
12730 (print_line): Update print.src_file.
12731
ba78087b
KT
127322011-03-25 Kai Tietz <ktietz@redhat.com>
12733
12734 * c-ada-spec.c (compare_comment): Use filename_cmp
12735 instead of strcmp for filename.
12736
0edf1bb2
JL
127372011-03-25 Jeff Law <law@redhat.com>
12738
adfac8df 12739 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12740
c7dc8804
JM
127412011-03-25 Jason Merrill <jason@redhat.com>
12742
12743 * c.opt: Add -std=c++03.
12744
d1d879b1
EB
127452011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12746
12747 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12748
3f8257db 127492011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12750
12751 PR target/12171
5050afdf
KT
12752 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12753 Display allowed attributes for function pointer types.
12754 (pp_c_attributes_display): New function to display
12755 attributes having affects_type_identity flag set to true.
12756 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12757
62d784f7
KT
12758 * c-common.c (c_common_attribute_table):
12759 Add new element.
12760 (c_common_format_attribute_table): Likewise.
12761
82d37118
JM
127622011-03-18 Jason Merrill <jason@redhat.com>
12763
49a000c3
JM
12764 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12765 * c-common.h: Don't declare it here.
12766 * c-common.c: Or define it here.
12767 * c-opts.c (c_common_handle_option): Or set it here.
12768
82d37118
JM
12769 PR c++/35315
12770 * c-common.c (handle_transparent_union_attribute): Don't
12771 make a duplicate type in C++.
12772
17bc631c
JM
127732011-03-15 Jason Merrill <jason@redhat.com>
12774
12775 * c-common.c (max_constexpr_depth): New.
12776 * c-common.h: Declare it.
12777 * c-opts.c (c_common_handle_option): Set it.
12778 * c.opt (fconstexpr-depth): New option.
12779
1b9b91a6
JM
127802011-03-11 Jason Merrill <jason@redhat.com>
12781
f231b5ff
JM
12782 * c-common.c (attribute_takes_identifier_p): Add missing const.
12783
1b9b91a6
JM
12784 PR c++/46803
12785 * c-common.c (attribute_takes_identifier_p): Assume that an
12786 unknown attribute takes an identifier.
12787
a19e4d44
NF
127882011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12789
12790 PR c/47786
12791 * c-common.c (c_type_hash): Call list_length instead of iterating
12792 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12793
982d62f6
JJ
127942011-02-19 Jakub Jelinek <jakub@redhat.com>
12795
12796 PR c/47809
12797 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12798
0a256240
NP
127992011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12800
12801 * c.opt (fobjc-abi-version=) New.
12802 (fobjc-nilcheck): New.
12803
ba9e6dd5
NF
128042011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12805
12806 PR c++/46890
12807 * c-common.h (keyword_is_decl_specifier): Declare.
12808 * c-common.c (keyword_is_decl_specifier): Define.
12809 (keyword_is_function_specifier): New function.
12810
7273813a
JJ
128112011-01-26 Jakub Jelinek <jakub@redhat.com>
12812
12813 PR c/47473
12814 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12815 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12816 REAL_TYPE.
12817
908ef79b
AC
128182011-01-26 Arnaud Charlet <charlet@adacore.com>
12819
12820 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12821
237e9384
JJ
128222011-01-26 Jakub Jelinek <jakub@redhat.com>
12823
12824 PR pch/47430
12825 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12826 after init_c_lex if pch_file is set.
12827
47ea1edf
DK
128282011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12829
d4dba752 12830 PR c++/43601
47ea1edf
DK
12831 * c.opt (-fkeep-inline-dllexport): New switch.
12832
2aa9c6ae
RG
128332011-01-12 Richard Guenther <rguenther@suse.de>
12834
12835 PR middle-end/32511
12836 * c-common.c (handle_weak_attribute): Warn instead of error
12837 on declaring an inline function weak.
12838
7bd11157
TT
128392011-01-05 Tom Tromey <tromey@redhat.com>
12840
12841 * c-common.h (lvalue_error): Update.
12842 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12843 not error.
12844
0e66e494 128452010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12846
b4f588c4
NP
12847 PR objc/47075
12848 * c-objc.h (objc_finish_message_expr): Added argument to
12849 prototype.
12850
f4da8dce
NF
128512010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12852
12853 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12854 Use prototype_p.
12855
46270f14
NP
128562010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12857
12858 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12859 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12860
4816c593
NF
128612010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12862
12863 * c-common.h (readonly_error): Declare.
12864 * c-common.c (readonly_error): Define.
12865
7a6daeb0
NF
128662010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12867
12868 * c-common.h (invalid_indirection_error): Declare.
12869 * c-common.c (invalid_indirection_error): Define.
12870
892f6119
RG
128712010-12-03 Richard Guenther <rguenther@suse.de>
12872
12873 PR c/46745
12874 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12875 (pp_c_unary_expression): Likewise.
12876 (pp_c_expression): Likewise.
12877
6c39e757
NP
128782010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12879
12880 * c-common.h (objc_finish_function): New.
12881 (objc_non_volatilized_type): Removed.
12882 (objc_type_quals_match): Removed.
12883 * stub-objc.c (objc_finish_function): New.
12884 (objc_non_volatilized_type): Removed.
12885 (objc_type_quals_match): Removed.
9faeb493 12886
7c475d11
JM
128872010-11-30 Joseph Myers <joseph@codesourcery.com>
12888
12889 * c-common.h (parse_optimize_options): Declare.
12890 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12891 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12892
71f3e391
JM
128932010-11-29 Joseph Myers <joseph@codesourcery.com>
12894
12895 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12896 GET_ENVIRONMENT.
12897 * c-pch.c (O_BINARY): Don't define here.
12898 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12899
d5fabb58
JM
129002010-11-25 Joseph Myers <joseph@codesourcery.com>
12901
12902 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12903 targetm.except_unwind_info.
12904
299404a1
JM
129052010-11-23 Joseph Myers <joseph@codesourcery.com>
12906
12907 * c-opts.c (c_common_handle_option): Pass location to
12908 set_struct_debug_option.
12909
c98cd5bf
JM
129102010-11-23 Joseph Myers <joseph@codesourcery.com>
12911
12912 * c-common.c (visibility_options): Move from ../opts.c.
12913 * c-common.h (struct visibility_flags, visibility_options):
12914 Declare here.
12915 * c-opts.c (finish_options): Rename to c_finish_options.
12916 (c_common_init): Update call to finish_options.
12917
a9546771
NP
129182010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12919
12920 PR objc/34033
12921 * c-lex.c (lex_string): Check that each string in an Objective-C
12922 string concat sequence starts with either one or zero '@', and
12923 that there are no spurious '@' signs at the end.
12924
24a57808
JM
129252010-11-20 Joseph Myers <joseph@codesourcery.com>
12926
12927 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12928 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12929 HANDLE_PRAGMA_VISIBILITY.
12930 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12931 HANDLE_PRAGMA_VISIBILITY): Don't define.
12932 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12933
a9aa2c3a
NF
129342010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12935
12936 PR c++/16189
12937 PR c++/36888
12938 PR c++/45331
12939 * c-common.h (keyword_begins_type_specifier): Declare.
12940 (keyword_is_storage_class_specifier): Declare.
12941 (keyword_is_type_qualifier): Declare.
12942 * c-common.c (keyword_begins_type_specifier): New function.
12943 (keyword_is_storage_class_specifier): New function.
12944 (keyword_is_type_qualifier): Declare.
12945
5386338c
JM
129462010-11-19 Joseph Myers <joseph@codesourcery.com>
12947
12948 PR c/46547
12949 * c-common.c (in_late_binary_op): Define.
12950 (c_common_truthvalue_conversion): Check in_late_binary_op before
12951 calling c_save_expr.
12952 * c-common.h (in_late_binary_op): Declare.
12953
69ccdddb
JM
129542010-11-19 Joseph Myers <joseph@codesourcery.com>
12955
12956 * c-opts.c (c_common_handle_option): Update calls to
12957 set_struct_debug_option.
12958
6b192a09
NP
129592010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12960
12961 * c-common.h (objc_declare_protocols): Added additional argument.
12962 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12963
fb52b50a
NF
129642010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12965
12966 PR c/33193
12967 * c-common.h (build_real_imag_expr): Declare.
12968 * c-semantics.c (build_real_imag_expr): Define.
12969
b37421c6
JM
129702010-11-17 Joseph Myers <joseph@codesourcery.com>
12971
12972 * c-opts.c (c_common_parse_file): Take no arguments.
12973 * c-common.h (c_common_parse_file): Update prototype.
12974
07078664
JJ
129752010-11-16 Jakub Jelinek <jakub@redhat.com>
12976
12977 PR c++/46401
12978 * c-common.c (warning_candidate_p): Don't track non-const calls
12979 or STRING_CSTs.
12980
c6a13190
ILT
129812010-11-15 Ian Lance Taylor <iant@google.com>
12982
12983 * c-lex.c (init_c_lex): Set macro debug callbacks if
12984 flag_dump_go_spec is set.
12985
925e8657
NP
129862010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12987
12988 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12989 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12990
bb0a9581
NF
129912010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12992
12993 PR preprocessor/45038
12994 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12995 dialects.
12996
c5fa0890
JM
129972010-11-12 Joseph Myers <joseph@codesourcery.com>
12998
12999 * c-common.h (c_family_lang_mask): Declare.
13000 * c-opts.c (c_family_lang_mask): Make extern.
13001 * c-pragma.c (handle_pragma_diagnostic): Use
13002 control_warning_option.
13003
a4d8c676
JM
130042010-11-12 Joseph Myers <joseph@codesourcery.com>
13005
13006 * c-common.c (parse_optimize_options): Update call to
13007 decode_options.
13008 * c-common.h (c_common_handle_option): Update prototype.
13009 * c-opts.c (c_common_handle_option): Take location_t parameter and
13010 pass it to other functions.
13011
f954bd2c
JM
130122010-11-11 Joseph Myers <joseph@codesourcery.com>
13013
13014 * c-opts.c (warning_as_error_callback): Remove.
13015 (c_common_initialize_diagnostics): Don't call
13016 register_warning_as_error_callback.
13017 (c_common_handle_option): Handle -Werror=normalized= here.
13018
d8a07487
JM
130192010-11-10 Joseph Myers <joseph@codesourcery.com>
13020
13021 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13022 in diagnostic.
13023 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13024 letter.
13025 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13026 Remove trailing '.' from diagnostics.
13027 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13028
d5478783
JM
130292010-11-10 Joseph Myers <joseph@codesourcery.com>
13030
13031 * c-common.c (parse_optimize_options): Pass global_dc to
13032 decode_options.
13033 * c-opts.c (c_common_handle_option): Pass &global_options to
13034 set_Wstrict_aliasing.
13035 * c.opt (v): Don't mark Common or document here.
13036
91ebb981
IS
130372010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13038
13039 PR target/44981
13040 * c-format.c (format_type): New type gcc_objc_string_format_type.
13041 (valid_stringptr_type_p): New.
13042 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13043 (check_format_string): Pass expected type, use
91ebb981
IS
13044 valid_stringptr_type_p (), check that the format string types are
13045 consistent with the format specification.
13046 (decode_format_attr): Warn if NSString is used outside objective-c.
13047 (format_types_orig): Add NSString.
13048 (format_name): New.
13049 (format_flags): New.
13050 (check_format_arg): Handle format strings requiring an external parser.
13051 first_target_format_type: New variable.
13052 (handle_format_attribute): Set up first_target_format_type, pass the
13053 expected format arg string type to check_format_string().
ab20d992 13054 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13055 * stub-objc.c (objc_string_ref_type_p): New.
13056 (objc_check_format_arg): New.
13057
bede2adc
NP
130582010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13059
9faeb493 13060 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13061 * c-common.h (objc_build_class_component_ref): New.
13062 * stub-objc.c (objc_build_class_component_ref): New.
13063
9a179d01
NP
130642010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13065
13066 * c.opt (Wproperty-assign-default): New option.
13067
22d8d616
NP
130682010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13069
13070 Implemented -fobjc-std=objc1 flag.
13071 * c.opt (fobjc-std=objc1): New option.
13072
2debdb4f
NP
130732010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13074
13075 Implemented format and noreturn attributes for Objective-C methods.
13076 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13077 attribute for Objective-C methods.
13078
ec52b111
JM
130792010-10-31 Jason Merrill <jason@redhat.com>
13080
13081 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13082 EXPR_LOC_OR_HERE.
13083
46a88c12
NP
130842010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13085
13086 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13087 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13088 (objc_add_property_declaration): Removed arguments for copies and
13089 ivar.
13090 (objc_build_getter_call): Renamed to
13091 objc_maybe_build_component_ref.
13092 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13093 (objc_is_property_ref): New.
13094 * c-common.c (c_common_reswords): Removed copies and ivar.
13095 * stub-objc.c (objc_add_property_declaration): Removed arguments
13096 for copies and ivar.
13097 (objc_build_getter_call): Renamed to
13098 objc_maybe_build_component_ref.
13099 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13100 (objc_is_property_ref): New.
9faeb493 13101
1e4bf85b
AC
131022010-10-29 Arnaud Charlet <charlet@adacore.com>
13103 Matthew Gingell <gingell@adacore.com>
13104
13105 * c-ada-spec.c (separate_class_package): New function.
13106 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13107 name of their enclosing package.
13108 (print_ada_declaration): Use separate_class_package.
13109
81f0bab2
JM
131102010-10-27 Jason Merrill <jason@redhat.com>
13111
2b08f2c5
JM
13112 * c-common.c (c_common_reswords): Add __is_literal_type.
13113 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13114
81f0bab2
JM
13115 * c-common.c (check_case_value): Remove special C++ code.
13116
200290f2
NP
131172010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13118
13119 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13120 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13121 and RID_LAST_PATTR.
13122 (objc_add_property_declaration): Added additional arguments.
13123 (objc_property_attribute_kind): Removed.
13124 (objc_set_property_attr): Removed.
13125 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13126 copy and nonatomic.
13127 * stub-objc.c (objc_add_property_declaration): Added additional
13128 arguments.
13129 (objc_set_property_attr): Removed.
9faeb493 13130
f614132b
NP
131312010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13132
13133 * c-common.h (objc_add_property_variable): Renamed to
13134 objc_add_property_declaration. Added location argument.
13135 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13136
b8a18805
NP
131372010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13138
13139 * c-common.h (objc_maybe_printable_name): New.
13140 * stub-objc.c (objc_maybe_printable_name): New.
13141
3f8257db
JJ
131422010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13143 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13144
13145 * c-common.h (c_common_mark_addressable_vec): Declare.
13146 * c-common.c (c_common_mark_addressable_vec): New function.
13147
249a82c4
NP
131482010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13149
13150 * c-common.h (objc_set_method_type): Removed.
13151 (objc_add_method_declaration): Added boolean argument.
13152 (objc_start_method_definition): Same change.
13153 (objc_build_method_signature): Same change.
13154 * stub-objc.c (objc_set_method_type): Removed.
13155 (objc_add_method_declaration): Added boolean argument.
13156 (objc_start_method_definition): Same change.
13157 (objc_build_method_signature): Same change.
13158
977e30bc
NP
131592010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13160
13161 * c-common.h (finish_file): Removed.
13162 (objc_write_global_declarations): New.
13163 * c-opts.c (c_common_parse_file): Do not call finish_file.
13164 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13165
da57d1b9
NP
131662010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13167
13168 Implemented parsing @synthesize and @dynamic for
13169 Objective-C/Objective-C++.
13170 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13171 (objc_add_synthesize_declaration): New.
13172 (objc_add_dynamic_declaration): New.
13173 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13174 * stub-objc.c (objc_add_synthesize_declaration): New.
13175 (objc_add_dynamic_declaration): New.
9faeb493 13176
0069111f
MM
131772010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13178
13179 PR target/46041
13180 * c-cppbuiltin.c (mode_has_fma): Move function here from
13181 builtins.c. Don't use the fma optab, instead just use the
13182 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13183 using -save-temps.
13184
e426b47b
NP
131852010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13186
13187 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13188
3f8257db 13189 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13190
9faeb493 13191 Radar 4330422
e426b47b
NP
13192 * c-common.h (objc_non_volatilized_type): New declaration
13193 * stub-objc.c (objc_non_volatilized_type): New stub.
13194
90fbfdc3
NP
131952010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13196
e426b47b 13197 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13198
ab20d992 13199 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13200
9faeb493 13201 Radar 4133425
90fbfdc3 13202 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13203 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13204
c37d8c30
IS
132052010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13206
13207 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13208 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13209 (objc_ivar_visibility_kind): New enum.
13210 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13211 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13212 visibility enum.
13213
1b1562a5
MM
132142010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13215
13216 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13217 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13218 has the appropriate fma builtins.
13219 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13220
668ea4b1
IS
132212010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13222
1b1562a5 13223 merge from FSF apple 'trunk' branch.
3f8257db 13224 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13225
668ea4b1
IS
13226 Radars 4436866, 4505126, 4506903, 4517826
13227 * c-common.c (c_common_resword): Define @property and its attributes.
13228 * c-common.h: Define property attribute enum entries.
13229 (OBJC_IS_PATTR_KEYWORD): New.
13230 (objc_property_attribute_kind): New enum.
13231 Declare objc_set_property_attr (), objc_add_property_variable (),
13232 objc_build_getter_call () and objc_build_setter_call ().
13233 * stub-objc.c (objc_set_property_attr): New stub.
13234 (objc_add_property_variable): Likewise.
13235 (objc_build_getter_call): Likewise.
13236 (objc_build_setter_call) Likewise.
1b1562a5 13237
a1178b30
IS
132382010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13239
1b1562a5 13240 merge from FSF apple 'trunk' branch.
ab20d992 13241 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13242
13243 Radar 3803157 (method attributes)
13244 * c-common.c (handle_deprecated_attribute): Recognize
13245 objc methods as valid declarations.
13246 * c-common.h: Declare objc_method_decl ().
1b1562a5 13247 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13248
a75bfaa6
JM
132492010-10-08 Joseph Myers <joseph@codesourcery.com>
13250
13251 * c-common.c (parse_optimize_options): Call
13252 decode_cmdline_options_to_array_default_mask before
13253 decode_options. Update arguments to decode_options.
13254 * c-common.h (c_common_init_options_struct): Declare.
13255 * c-opts.c (c_common_init_options_struct): New. Split out from
13256 c_common_init_options.
13257
f05b9d93
NP
132582010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13259
13260 Implemented fast enumeration for Objective-C.
13261 * c-common.h (objc_finish_foreach_loop): New.
13262 * stub-objc.c (objc_finish_foreach_loop): New.
13263
1ebe4b4f
JM
132642010-10-05 Joseph Myers <joseph@codesourcery.com>
13265
13266 * c-common.h (struct diagnostic_context): Don't declare here.
13267 (c_common_initialize_diagnostics): Declare using
13268 diagnostic_context typedef.
13269 * c-opts.c (c_common_handle_option): Pass global_dc to
13270 handle_generated_option.
13271
d4d24ba4
JM
132722010-10-04 Joseph Myers <joseph@codesourcery.com>
13273
13274 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13275 handle_generated_option.
13276
478a1c5b
ILT
132772010-10-03 Ian Lance Taylor <iant@google.com>
13278
13279 * c.opt (-fplan9-extensions): New option.
13280
82a1c2fe
FXC
132812010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13282
13283 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13284 Remove.
13285 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13286 of duplicating code.
13287
92902b1b
IS
132882010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13289
13290 * c-common.c: Add two new entries for @optional
13291 and @required keywords.
13292
13293 merge from FSF 'apple/trunk' branch.
3f8257db 13294 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13295
13296 Radar 4386773
13297 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13298 objective-c keywords.
13299 (objc_set_method_opt): New declaration.
13300 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13301
46625112
JM
133022010-09-30 Joseph Myers <joseph@codesourcery.com>
13303
13304 * c-common.c (handle_optimize_attribute): Pass &global_options to
13305 cl_optimization_save and cl_optimization_restore.
13306 * c-opts.c (c_common_handle_option): Pass &global_options to
13307 handle_generated_option.
13308 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13309 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13310 &global_options to cl_optimization_restore.
13311
49b91f05
NP
133122010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13313
13314 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13315 Objective-C/Objective-C++ keywords.
13316
13ed556f 133172010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13318
9faeb493
UB
13319 Merge from 'apple/trunk' branch on FSF servers.
13320
3f8257db 13321 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13322
13323 Radar 4281748
13324 * c-common.h (objc_check_global_decl): New declaration.
13325 * stub-objc.c (objc_check_global_decl): New stub.
13326
f0036cca
JM
133272010-09-29 Joseph Myers <joseph@codesourcery.com>
13328
13329 * c.opt: Don't use VarExists.
13330
e3339d0f
JM
133312010-09-29 Joseph Myers <joseph@codesourcery.com>
13332
13333 * c-common.c (c_cpp_error): Update names of diagnostic_context
13334 members.
13335 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13336 cl_optimization members.
13337 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13338 sanitize_cpp_opts, finish_options): Update names of cpp_options
13339 members.
13340
1973201f
NP
133412010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13342
13343 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13344 (objc_is_reserved_word): Removed.
13345 * c-common.c: Updated comments.
13346 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13347 objc_is_reserved_word.
13348 * stub-objc.c (objc_is_reserved_word): Removed.
13349
f7e71da5
IS
133502010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13351
9faeb493 13352 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13353 include attributes.
13354 (objc_start_method_definition): Likewise.
13355 (objc_build_keyword_decl): Likewise.
13356 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13357 (objc_start_method_definition): Likewise.
13358 (objc_build_keyword_decl): Likewise.
13359
c165dca7
IS
133602010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13361
13362 * c-common.h (objc_start_class_interface): Adjust prototype.
13363 (objc_start_category_interface): Likewise.
13364 (objc_start_protocol): Likewise.
13365 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13366 (objc_start_class_interface): Likewise.
13367 (objc_start_category_interface): Likewise.
13368
7458026b
ILT
133692010-09-27 Ian Lance Taylor <iant@google.com>
13370
13371 * c-common.c (c_common_attribute_table): Add no_split_stack.
13372 (handle_no_split_stack_attribute): New static function.
13373
b581b85b
NP
133742010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13375
9faeb493 13376 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13377
3f8257db 13378 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13379
9faeb493 13380 Radar 4229905
b581b85b
NP
13381 * c-common.h (objc_have_common_type): New declaration.
13382 * stub-objc.c (objc_have_common_type): New stub.
13383
13384 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13385
13386 Radar 4154928
13387 * c-common.h (objc_common_type): New prototype.
9faeb493 13388 * stub-objc.c (objc_common_type): New stub.
b581b85b 13389
46a4da10
JH
133902010-09-24 Jan Hubicka <jh@suse.cz>
13391
13392 * c-common.c (handle_leaf_attribute): New function.
13393 (struct attribute_spec c_common_att): Add leaf.
13394
e200444e
JM
133952010-09-22 Joseph Myers <joseph@codesourcery.com>
13396
13397 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13398 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13399 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13400 -include-barrier, -include-directory, -include-directory=,
13401 -include-directory-after, -include-directory-after=,
13402 -include-prefix, -include-prefix=, -include-with-prefix,
13403 -include-with-prefix=, -include-with-prefix-after,
13404 -include-with-prefix-after=, -include-with-prefix-before,
13405 -include-with-prefix-before=, -no-integrated-cpp,
13406 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13407 -output=, -pedantic, -pedantic-errors, -preprocess,
13408 -print-missing-file-dependencies, -trace-includes, -traditional,
13409 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13410 -user-dependencies, -verbose, -write-dependencies,
13411 -write-user-dependencies, no-integrated-cpp, traditional): New.
13412
29a80ea6
NP
134132010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13414
13415 PR objc/23710
ac1fc2fc
NP
13416 * c-common.h (objc_start_method_definition): Return bool instead
13417 of void.
13418 * stub-objc.c (objc_start_method_definition): Return bool instead
13419 of void.
13420
134212010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13422
13423 PR objc/25965
13424 * c-common.h (objc_get_interface_ivars): New declaration.
13425 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13426
de621752
ILT
134272010-09-15 Ian Lance Taylor <iant@google.com>
13428
13429 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13430 messages. Remove period at end of warning message.
de621752 13431
ba885ec5
NS
134322010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13433
13434 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13435 (handle_alias_attribute): ... here.
13436 (handle_ifunc_attribute): New.
13437
c5ee1358
MM
134382010-09-06 Mark Mitchell <mark@codesourcery.com>
13439
13440 * c-common.h (do_warn_double_promotion): Declare.
13441 * c-common.c (do_warn_double_promotion): Define.
13442
0a0b3574
MM
134432010-09-05 Mark Mitchell <mark@codesourcery.com>
13444
13445 * c.opt (Wdouble-promotion): New.
13446
d1779886
JM
134472010-09-02 Joseph Myers <joseph@codesourcery.com>
13448
13449 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13450 fvtable-thunks, fxref): Mark no longer supported in help text.
13451
2d2bd949
JM
134522010-09-02 Joseph Myers <joseph@codesourcery.com>
13453
13454 * c.opt (Wimport, fall-virtual, falt-external-templates,
13455 fdefault-inline, fenum-int-equiv, fexternal-templates,
13456 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13457 fname-mangling-version-, fnew-abi, fnonnull-objects,
13458 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13459 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13460 applicable.
13461 (fhandle-exceptions): Mark with Alias and Warn.
13462 * c-opts.c (c_common_handle_option): Don't handle options marked
13463 as ignored.
13464
5de8299c
JM
134652010-09-02 Joseph Myers <joseph@codesourcery.com>
13466
13467 * c.opt (Wcomments, Werror-implicit-function-declaration,
13468 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13469 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13470 aliases.
13471 * c-common.c (option_codes): Use OPT_Wcomment instead of
13472 OPT_Wcomments.
13473 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13474 Don't handle options marked as aliases.
13475
0ceb0201
RG
134762010-08-25 Richard Guenther <rguenther@suse.de>
13477
13478 * c-common.c (c_common_get_alias_set): Remove special
13479 handling for pointers.
13480
ac47786e
NF
134812010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13482
13483 * c-common.c: Use FOR_EACH_VEC_ELT.
13484 * c-gimplify.c: Likewise.
13485 * c-pragma.c: Likewise.
13486
c878765b
JM
134872010-08-16 Joseph Myers <joseph@codesourcery.com>
13488
13489 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13490 RejectDriver.
13491 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13492 RejectDriver.
13493 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13494 instead of OPT_MDX and OPT_MMDX.
13495
603349bf
JM
134962010-08-16 Joseph Myers <joseph@codesourcery.com>
13497
13498 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13499
644fa7ac
JM
135002010-08-12 Joseph Myers <joseph@codesourcery.com>
13501
13502 * c.opt (MD, MMD): Change to MDX and MMDX.
13503 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13504
481e1176
JM
135052010-08-11 Joseph Myers <joseph@codesourcery.com>
13506
13507 * c-opts.c (c_common_handle_option): Call handle_generated_option
13508 instead of handle_option.
13509
ac8dc9f7
NF
135102010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13511
13512 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13513 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13514
4f8c876d
NF
135152010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13516
13517 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13518 (pending_redefine_extname): Change type to a VEC.
13519 (add_to_renaming_pragma_list): Update for new type of
13520 pending_redefine_extname.
ac8dc9f7 13521 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13522
3b0c690e
AC
135232010-08-04 Arnaud Charlet <charlet@adacore.com>
13524
13525 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13526 visited.
13527 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13528 decide whether a type has already been declared/seen.
13529 Do not go to the original type.
13530 (dump_nested_types): New parameter forward.
13531 Generate forward declaration if needed and mark type as visited.
13532 (print_ada_declaration): Call dump_nested_types if not already done.
13533 Mark types as visited.
13534
1890bccc
JM
135352010-08-03 Joseph Myers <joseph@codesourcery.com>
13536
13537 * c.opt (-print-pch-checksum): Remove option.
13538 * c-opts.c (c_common_handle_option): Don't handle
13539 OPT_print_pch_checksum.
13540
5f20c657
JM
135412010-07-27 Joseph Myers <joseph@codesourcery.com>
13542
13543 * c-common.h (c_common_handle_option): Update prototype and return
13544 value type.
13545 * c-opts.c (c_common_handle_option): Update prototype and return
13546 value type. Update calls to handle_option and
13547 enable_warning_as_error.
13548
f551f80c
JJ
135492010-07-27 Jakub Jelinek <jakub@redhat.com>
13550
13551 PR c/45079
13552 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13553
61ff2bdc
JM
135542010-07-27 Joseph Myers <joseph@codesourcery.com>
13555
13556 * c-common.h (c_common_missing_argument): Remove.
13557 * c-opts.c (c_common_missing_argument): Remove.
13558 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13559 idirafter, imacros, include, isysroot, isystem, iquote): Add
13560 MissingArgError.
13561 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13562
7a9bf9a4
JM
135632010-07-27 Joseph Myers <joseph@codesourcery.com>
13564
13565 * c-common.h (c_common_option_lang_mask,
13566 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13567 New.
13568 (c_common_init_options): Update prototype.
13569 * c-opts.c (c_common_option_lang_mask): New.
13570 (c_common_initialize_diagnostics): Split out of
13571 c_common_init_options.
13572 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13573 New.
13574 (c_common_init_options): Update prototype. Use decoded options in
13575 search for -lang-asm.
13576
910ad8de
NF
135772010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13578
13579 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13580 * c-format.c: Likewise.
13581
718f9c0f
MLI
135822010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13583
13584 * c-common.h: Include diagnostic-core.h. Error if already
13585 included.
13586 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13587
4d451982
MLI
135882010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13589
adfac8df 13590 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13591 Do not include expr.h
13592 (vector_mode_valid_p): Move here.
13593
119fe915
SB
135942010-06-21 DJ Delorie <dj@redhat.com>
13595
13596 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13597 allow these pragmas anywhere.
13598
135992010-06-14 Jakub Jelinek <jakub@redhat.com>
13600
13601 PR bootstrap/44509
13602 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13603 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13604 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13605 ggc_strdup instead of xstrdup.
13606
136072010-06-10 Jakub Jelinek <jakub@redhat.com>
13608
13609 * c-cppbuiltin.c: Include cpp-id-data.h.
13610 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13611 (lazy_hex_fp_value): New function.
13612 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13613
6662d794
MLI
136142010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13615
13616 * c-gimplify.c: Do not include tree-flow.h
13617
38f8b050
JR
136182010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13619
13620 PR other/44034
13621 * c-common.c: Rename targetm member:
13622 targetm.enum_va_list -> targetm.enum_va_list_p
13623
9589f23e
AS
136242010-06-28 Anatoly Sokolov <aesok@post.ru>
13625
13626 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13627
3b06d379
SB
136282010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13629
13630 * c-cppbuiltin.c: Do not include except.h.
13631
d166d4c3
AK
136322010-06-24 Andi Kleen <ak@linux.intel.com>
13633
9faeb493
UB
13634 * c-common.c (warn_for_omitted_condop): New.
13635 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13636
70cb8be6
JM
136372010-06-21 Joseph Myers <joseph@codesourcery.com>
13638
13639 * c.opt (lang-objc): Remove.
13640 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13641
a4c97feb
JR
136422010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13643
13644 * c-opts.c: Include "tm_p.h".
13645
6e2f1956
JM
136462010-06-20 Joseph Myers <joseph@codesourcery.com>
13647
13648 * c-common.c (parse_optimize_options): Update call to
13649 decode_options.
13650
bc87224e
NF
136512010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13652
13653 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13654 new type of types_used_by_cur_var_decl.
13655
b49cf425
JR
136562010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13657
13658 PR bootstrap/44512
13659 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13660 for C++ standard compliance.
13661
59f9c2ed
JM
136622010-06-16 Jason Merrill <jason@redhat.com>
13663
13664 * c.opt: Add -Wnoexcept.
13665
33766b66
RG
136662010-06-16 Richard Guenther <rguenther@suse.de>
13667
13668 PR c/44555
13669 * c-common.c (c_common_truthvalue_conversion): Remove
13670 premature and wrong optimization concering ADDR_EXPRs.
13671
eff7e30c
AC
136722010-06-15 Arnaud Charlet <charlet@adacore.com>
13673
13674 * c-ada-spec.c (dump_sloc): Remove column info.
13675 (is_simple_enum): New function.
13676 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13677 enum types when relevant.
13678
6312e84d
MLI
136792010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13680
9faeb493 13681 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13682 location.
13683
1cb42611
JM
136842010-06-10 Joseph Myers <joseph@codesourcery.com>
13685
13686 * c-opts.c (c_common_handle_option): Don't handle
13687 OPT_fshow_column.
13688
a9429e29
LB
136892010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13690
13691 * c-pragma.c (push_alignment): Use typed GC allocation.
13692 (handle_pragma_push_options): Likewise.
13693
13694 * c-common.c (parse_optimize_options): Likewise.
13695
13696 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13697 option.
13698
5498f011
JM
136992010-06-07 Joseph Myers <joseph@codesourcery.com>
13700
13701 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13702 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13703 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13704 flag_signed_bitfields, warn_strict_null_sentinel,
13705 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13706 flag_gen_declaration, flag_no_gnu_keywords,
13707 flag_implement_inlines, flag_implicit_templates,
13708 flag_implicit_inline_templates, flag_optional_diags,
13709 flag_elide_constructors, flag_default_inline, flag_rtti,
13710 flag_conserve_space, flag_access_control, flag_check_new,
13711 flag_new_for_scope, flag_weak, flag_working_directory,
13712 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13713 flag_enforce_eh_specs, flag_threadsafe_statics,
13714 flag_pretty_templates): Remove.
13715 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13716 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13717 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13718 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13719 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13720 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13721 flag_no_gnu_keywords, flag_implement_inlines,
13722 flag_implicit_templates, flag_implicit_inline_templates,
13723 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13724 flag_rtti, flag_conserve_space, flag_access_control,
13725 flag_check_new, flag_new_for_scope, flag_weak,
13726 flag_working_directory, flag_use_cxa_atexit,
13727 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13728 flag_threadsafe_statics, flag_pretty_templates,
13729 warn_strict_null_sentinel): Remove.
13730 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13731 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13732 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13733 fimplicit-inline-templates, fimplicit-templates,
13734 flax-vector-conversions, fms-extensions, fnil-receivers,
13735 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13736 frtti, fshort-double, fshort-enums, fshort-wchar,
13737 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13738 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13739 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13740 gen-decls, undef): Use Var.
13741 (fdefault-inline, foptional-diags): Document as doing nothing.
13742 * c-opts.c (c_common_handle_option): Remove cases for options now
13743 using Var. Mark ignored options as such.
13744
39dabefd
SB
137452010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13746
9faeb493 13747 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13748 * c-common.def: Likewise.
13749 * c-common.h: Likewise.
13750 * c-cppbuiltin.c: Likewise.
13751 * c-dump.c: Likewise.
13752 * c-format.c: Likewise.
13753 * c-format.h : Likewise.
13754 * c-gimplify.c: Likewise.
13755 * c-lex.c: Likewise.
13756 * c-omp.c: Likewise.
13757 * c.opt: Likewise.
13758 * c-opts.c: Likewise.
13759 * c-pch.c: Likewise.
13760 * c-ppoutput.c: Likewise.
13761 * c-pragma.c: Likewise.
13762 * c-pragma.h: Likewise.
13763 * c-pretty-print.c: Likewise.
13764 * c-pretty-print.h: Likewise.
13765 * c-semantics.c: Likewise.
13766 * stub-objc.c: Likewise.
13767
13768 * c-common.c: Include gt-c-family-c-common.h.
13769 * c-pragma.c: Include gt-c-family-c-pragma.h.
13770\f
877e3c2a 13771Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
13772
13773Copying and distribution of this file, with or without modification,
13774are permitted in any medium without royalty provided the copyright
13775notice and this notice are preserved.