]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Fix profile count comparison.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
220c4d8e
GA
12022-09-26 Marek Polacek <polacek@redhat.com>
2
3 PR c++/106656
4 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
5 for C++20.
6
4afaeaab
GA
72022-09-23 Marek Polacek <polacek@redhat.com>
8
9 PR c++/106784
10 * c-common.cc (c_common_reswords): Add __is_convertible and
11 __is_nothrow_convertible.
12 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
13 RID_IS_NOTHROW_CONVERTIBLE.
14
279c6715
GA
152022-09-22 David Malcolm <dmalcolm@redhat.com>
16
17 PR c/106830
18 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
19 values that don't fit in uhwi.
20
d0fc05e8
GA
212022-09-15 Richard Biener <rguenther@suse.de>
22
23 * c-common.h (build_void_list_node): Remove.
24 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
25 void_list_node.
26
861d1a11
GA
272022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
28
29 * c-format.cc (convert_format_name_to_system_name): Fix warning.
30
fe2a8ce9
GA
312022-09-07 Joseph Myers <joseph@codesourcery.com>
32
33 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
34 for alignas, alignof, bool, false, static_assert, thread_local and
35 true.
36
372022-09-07 Jakub Jelinek <jakub@redhat.com>
38
39 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
40 " in comments" from description.
41 (Wunicode): New option.
42
25aeb922
GA
432022-09-06 Jakub Jelinek <jakub@redhat.com>
44
45 PR c/106836
46 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
47
83f2f228
GA
482022-09-03 Jakub Jelinek <jakub@redhat.com>
49
50 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
51 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
52 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
53 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
54
c64b0947
GA
552022-09-02 David Malcolm <dmalcolm@redhat.com>
56
57 PR c/90885
58 * c-common.h (check_for_xor_used_as_pow): New decl.
59 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
60 * c-warn.cc (check_for_xor_used_as_pow): New.
61 * c.opt (Wxor-used-as-pow): New.
62
bb0a1556
GA
632022-09-01 Jason Merrill <jason@redhat.com>
64
65 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
66 char8_t.
67 (braced_list_to_string): Check for char-sized elements.
68
692022-09-01 Jakub Jelinek <jakub@redhat.com>
70
71 PR c++/106655
72 * c.opt (-Winvalid-utf8): New warning.
73 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
74 Set cpp_opts->cpp_input_charset_explicit.
75 (c_common_post_options): If -finput-charset=UTF-8 is explicit
76 in C++23, enable -Winvalid-utf8 by default and if -pedantic
77 or -pedantic-errors, make it a pedwarn.
78
542c60c4
GA
792022-08-31 Joseph Myers <joseph@codesourcery.com>
80
81 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
82 for LABEL_DECL.
83 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
84 decl_attributes.
85 * c-common.h (do_case, c_add_case_label): Update declarations.
86 * c-lex.cc (c_common_has_attribute): For C, produce a result of
87 201910 for fallthrough and 202106 for maybe_unused.
88
16f542d6
GA
892022-08-26 Marek Polacek <polacek@redhat.com>
90
91 PR c++/81159
92 * c.opt (Wself-move): New option.
93
942022-08-26 Jakub Jelinek <jakub@redhat.com>
95
96 * c-common.cc (check_builtin_function_arguments): Handle
97 BUILT_IN_ISSIGNALING.
98
992022-08-26 Jakub Jelinek <jakub@redhat.com>
100
101 PR c++/106648
102 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
103 __cpp_named_character_escapes to 202207L.
104
5d4389dc
GA
1052022-08-25 Marek Polacek <polacek@redhat.com>
106
107 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
108 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
109 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
110 (struct c_common_resword): Resize the disable member.
111 (D_C2X): Add.
112 (nullptr_node): Define.
113 (nullptr_type_node): Define.
114 (NULLPTR_TYPE_P): Define.
115 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
116 NULLPTR_TYPE.
117 (c_pretty_printer::direct_abstract_declarator): Likewise.
118 (c_pretty_printer::constant): Likewise.
119
47a61e65
GA
1202022-08-16 Tom Honermann <tom@honermann.net>
121
122 PR c++/106423
123 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
124 diagnostics in C++20 and later.
125 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
126
5cd525f0
GA
1272022-08-11 Marek Polacek <polacek@redhat.com>
128
129 PR middle-end/102633
130 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
131 suppress_warning here.
132
5f17badb
GA
1332022-08-08 Tom Honermann <tom@honermann.net>
134
135 PR preprocessor/106426
136 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
137 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
138
1392022-08-08 Tom Honermann <tom@honermann.net>
140
141 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
142 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
143 enabled.
144 * c-opts.cc (c_common_post_options): Set flag_char8_t if
145 targeting C2x.
146
4a7274dd
GA
1472022-07-31 Lewis Hyatt <lhyatt@gmail.com>
148
149 PR c++/66290
150 * c-common.h: Rename global done_lexing to
151 override_libcpp_locations.
152 * c-common.cc (c_cpp_diagnostic): Likewise.
153 * c-opts.cc (c_common_finish): Set override_libcpp_locations
154 (formerly done_lexing) immediately prior to calling cpp_finish ().
155
1e2c5f4c
GA
1562022-07-27 Lewis Hyatt <lhyatt@gmail.com>
157
158 * c-ppoutput.cc (token_streamer::stream): Update input_location
159 prior to streaming each token.
160
0e6fa997
GA
1612022-07-23 Immad Mir <mirimmad@outlook.com>
162
163 * c-attribs.cc: (c_common_attribute_table): add three new attributes
164 namely: fd_arg, fd_arg_read and fd_arg_write.
165 (handle_fd_arg_attribute): New.
166
bdc7b765
GA
1672022-07-15 Marek Polacek <polacek@redhat.com>
168
169 PR c++/104477
170 * c-common.cc (c_common_reswords): Add
171 __reference_constructs_from_temporary and
172 __reference_converts_from_temporary.
173 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
174 RID_REF_CONVERTS_FROM_TEMPORARY.
175
1762022-07-15 Jonathan Wakely <jwakely@redhat.com>
177
178 * c-format.cc (class range_label_for_format_type_mismatch):
179 Adjust to new label_text API.
180
c72d4714
GA
1812022-07-11 Lewis Hyatt <lhyatt@gmail.com>
182
183 PR preprocessor/106252
184 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
185 option argument prior to verifying the option was found.
186
6345c414
GA
1872022-07-07 David Malcolm <dmalcolm@redhat.com>
188
189 * c-format.cc (range_label_for_format_type_mismatch::get_text):
190 Update for removal of label_text::maybe_free in favor of automatic
191 memory management.
192
4bc92c3b
GA
1932022-07-06 Lewis Hyatt <lhyatt@gmail.com>
194
195 PR preprocessor/53920
196 PR c++/53431
197 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
198 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
199 (c_pp_stream_token): Declare.
200 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
201 pragmas to...
202 (should_output_pragmas): ...here. New function.
203 (token_streamer::stream): Support handling early pragmas.
204 (do_line_change): Likewise.
205 (c_pp_stream_token): New function.
206 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
207 (pragma_diagnostic_lex_normal): New function. Moved logic for
208 interpreting GCC diagnostic pragmas here.
209 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
210 directly from libcpp.
211 (handle_pragma_diagnostic): Refactor into helper function...
212 (handle_pragma_diagnostic_impl): ...here. New function.
213 (handle_pragma_diagnostic_early): New function.
214 (handle_pragma_diagnostic_early_pp): New function.
215 (struct pragma_ns_name): Renamed to...
216 (struct pragma_pp_data): ...this. Add new "early_handler" member.
217 (c_register_pragma_1): Support early pragmas in the preprocessor.
218 (c_register_pragma_with_early_handler): New function.
219 (c_register_pragma): Support the new early handlers in struct
220 internal_pragma_handler.
221 (c_register_pragma_with_data): Likewise.
222 (c_register_pragma_with_expansion): Likewise.
223 (c_register_pragma_with_expansion_and_data): Likewise.
224 (c_invoke_early_pragma_handler): New function.
225 (c_pp_invoke_early_pragma_handler): New function.
226 (init_pragma): Add early pragma support for diagnostic pragmas.
227 * c-pragma.h (struct internal_pragma_handler): Add new early handler
228 members.
229 (c_register_pragma_with_early_handler): Declare.
230 (c_invoke_early_pragma_handler): Declare.
231 (c_pp_invoke_early_pragma_handler): Declare.
232
d1f3a3ff
GA
2332022-07-05 Marek Polacek <polacek@redhat.com>
234
235 PR c++/105626
236 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
237 u8 strings.
238
ed974488
GA
2392022-07-01 Marek Polacek <polacek@redhat.com>
240
241 PR c++/106111
242 * c-common.h (enum rid): Update RID_LAST_CXX20.
243
976196b3
GA
2442022-06-30 Jonathan Wakely <jwakely@redhat.com>
245
246 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
247 names.
248
84c2131d
GA
2492022-06-24 Jason Merrill <jason@redhat.com>
250
251 PR c++/87729
252 PR c++/20423
253 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
254
4390e7bf
GA
2552022-06-18 Jakub Jelinek <jakub@redhat.com>
256
257 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
258 Use flag_sanitize_trap & SANITIZE_??? instead of
259 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
260 and flag_sanitize_trap differs for them, emit __builtin_trap only
261 for the comparison where trap is requested.
262 (ubsan_instrument_vla, ubsan_instrument_return): Use
263 lag_sanitize_trap & SANITIZE_??? instead of
264 flag_sanitize_undefined_trap_on_error.
265
c3642271
GA
2662022-06-13 Jason Merrill <jason@redhat.com>
267
268 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
269
d9176e64
GA
2702022-05-27 Marek Polacek <polacek@redhat.com>
271
272 PR c/90658
273 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
274
2752022-05-27 Jakub Jelinek <jakub@redhat.com>
276
277 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
278
57f2ce6a
GA
2792022-05-20 David Malcolm <dmalcolm@redhat.com>
280
281 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
282 and "override".
283 * c-pretty-print.h: Likewise.
284
1cda629f
GA
2852022-05-18 Marek Polacek <polacek@redhat.com>
286
287 PR c/105131
288 * c.opt (Wenum-int-mismatch): New.
289
2902022-05-18 Marek Polacek <polacek@redhat.com>
291
292 PR c++/105497
293 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
294 enumerator when it was marked with attribute unused.
295
2962022-05-18 Eric Botcazou <ebotcazou@adacore.com>
297
298 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
299 floating-point complex types.
300 <POINTER_TYPE>: Do not use limited_with clause if the designated
301 type is a scalar type.
302
3d9439b1
GA
3032022-05-17 Jakub Jelinek <jakub@redhat.com>
304
305 * c-omp.cc (c_finish_omp_depobj): Handle
306 OMP_CLAUSE_DEPEND_INOUTSET.
307
702bd11f
GA
3082022-05-16 Jason Merrill <jason@redhat.com>
309
310 PR c/105492
311 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
312 here.
313
3142022-05-16 Martin Liska <mliska@suse.cz>
315
316 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
317 (c_common_nodes_and_builtins): Likewise.
318 * c-format.cc (check_tokens): Likewise.
319 (check_plain): Likewise.
320 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
321 (init_pragma): Likewise.
322 * known-headers.cc (get_string_macro_hint): Likewise.
323 (get_stdlib_header_for_name): Likewise.
324 * c-attribs.cc: Likewise.
325
9df4ffe4
GA
3262022-05-13 Richard Biener <rguenther@suse.de>
327
328 * c-omp.cc: Remove gimple-fold.h include.
329
49ace834
GA
3302022-05-12 Jakub Jelinek <jakub@redhat.com>
331
332 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
333 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
334 if null_pointer_node.
335
d0d513b5
GA
3362022-05-11 Martin Liska <mliska@suse.cz>
337
338 PR target/105355
339 * c-opts.cc (c_common_handle_option): Change option name.
340 * c.opt: Remove Joined and use Separate option.
341
bd022ff9
GA
3422022-05-09 Alex Coplan <alex.coplan@arm.com>
343
344 * c-common.h (get_dump_info): Delete.
345 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
346 from the global dump_manager instead of the (now obsolete)
347 get_dump_info.
348 * c-opts.cc (original_dump_file): Delete.
349 (original_dump_flags): Delete.
350 (c_common_parse_file): Switch to using global dump_manager to
351 manage the original dump file; fix leak of dump file.
352 (get_dump_info): Delete.
353
a1947c92
GA
3542022-05-07 Marek Polacek <polacek@redhat.com>
355
356 PR c++/101833
357 PR c++/47634
358 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
359 with FN being either a function declaration or function type. Use
360 maybe_adjust_arg_pos_for_attribute.
361 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
362 check_function_format.
363 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
364 (positional_argument): Adjust.
365 * c-format.cc (get_constant): Rename to ...
366 (validate_constant): ... this. Take EXPR by reference. Return bool
367 instead of tree.
368 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
369 return value of validate_constant.
370 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
371 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
372 (check_function_format): Adjust a parameter name.
373 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
374
3e7db517
GA
3752022-05-04 Marek Polacek <polacek@redhat.com>
376
377 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
378 char to int.
379
95874f95
GA
3802022-04-30 Jason Merrill <jason@redhat.com>
381
382 PR c/100545
383 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
384 and typedef.
385 * c-common.cc (set_underlying_type): Add assert.
386
01ad093b
GA
3872022-04-26 Patrick Palka <ppalka@redhat.com>
388
389 PR c++/105304
390 * c-common.cc (verify_tree) [restart]: Move up to before the
391 NULL test.
392
da066c42
GA
3932022-04-11 Jakub Jelinek <jakub@redhat.com>
394
395 PR c++/105186
396 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
397 and __int%d__ builtin types, initialize corresponding ridpointers
398 entry.
399
150ab50f
GA
4002022-03-30 Marek Polacek <polacek@redhat.com>
401
402 PR c++/101030
403 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
404 conversion_warning when OP1 is null.
405
4062022-03-30 Thomas Schwinge <thomas@codesourcery.com>
407
408 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
409 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
410 option properties.
411
4122022-03-30 Thomas Schwinge <thomas@codesourcery.com>
413
414 * c.opt (Wuse-after-free): Remove.
415
4162022-03-30 Thomas Schwinge <thomas@codesourcery.com>
417
418 * c.opt (Warray-bounds): Remove.
419
d2906412
GA
4202022-03-26 Thomas Schwinge <thomas@codesourcery.com>
421
422 * c.opt: Properly quote comment.
423
31e989a2
GA
4242022-03-25 Eric Botcazou <ebotcazou@adacore.com>
425
426 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
427 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
428 the referenced type instead. Deal with the anonymous original type
429 of a typedef'ed type. In the actual access case, follow the chain
430 of external subtypes.
431 <TYPE_DECL>: Tidy up control flow.
432
d156bb87
GA
4332022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
434
435 * c-ada-spec.cc: Change array length
436
d7f00da1
GA
4372022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
438
439 * c-common.cc (c_family_tests): Call the new tests.
440 * c-common.h (c_diagnostic_tests): Declare.
441 (c_opt_problem_cc_tests): Likewise.
442
4432022-03-19 Jakub Jelinek <jakub@redhat.com>
444
445 PR c++/101515
446 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
447 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
448 be printed.
449
9fc8f278
GA
4502022-03-16 Christophe Lyon <christophe.lyon@arm.com>
451 Roger Sayle <roger@nextmovesoftware.com>
452
453 PR c/98198
454 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
455
4562022-03-16 Patrick Palka <ppalka@redhat.com>
457
458 PR c++/96780
459 * c.opt: Add -ffold-simple-inlines.
460
b9756c08
GA
4612022-03-13 Tobias Burnus <tobias@codesourcery.com>
462
463 * c-target.def (check_string_object_format_arg): Fix description typo.
464
57eeedda
GA
4652022-03-12 Thomas Schwinge <thomas@codesourcery.com>
466
467 PR other/65095
468 * c-common.h (c_omp_map_clause_name): Remove.
469 * c-omp.cc (c_omp_map_clause_name): Remove.
470
8cc4f9cd
GA
4712022-03-09 Jakub Jelinek <jakub@redhat.com>
472
473 PR c/104711
474 * c-opts.cc (c_common_post_options): Don't enable
475 -Wshift-negative-value from -Wextra for C++20 or later.
476 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
477 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
478 instead of TYPE_UNSIGNED.
479
e6533e2e
GA
4802022-03-07 Jakub Jelinek <jakub@redhat.com>
481
482 * c-attribs.cc: Fix up duplicated word issue in a comment.
483
12d4552e
GA
4842022-03-01 Martin Liska <mliska@suse.cz>
485
486 PR ipa/104533
487 * c-attribs.cc (handle_target_clones_attribute): Use
488 get_target_clone_attr_len and report warning soon.
489
0bdb0498
GA
4902022-02-17 Jonathan Wakely <jwakely@redhat.com>
491
492 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
493 (handle_pragma_weak): Likewise.
494 (handle_pragma_scalar_storage_order): Likewise.
495 (handle_pragma_redefine_extname): Likewise.
496 (handle_pragma_visibility): Likewise.
497 (handle_pragma_diagnostic): Likewise.
498 (handle_pragma_target): Likewise.
499 (handle_pragma_optimize): Likewise.
500 (handle_pragma_push_options): Likewise.
501 (handle_pragma_pop_options): Likewise.
502 (handle_pragma_reset_options): Likewise.
503 (handle_pragma_message): Likewise.
504 (handle_pragma_float_const_decimal64): Likewise.
505
cb3afcd2
GA
5062022-02-16 Jakub Jelinek <jakub@redhat.com>
507
508 PR c/104531
509 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
510 build_binary_op with LT_EXPR and only if that doesn't return
511 error_mark_node call build_modify_expr.
512
5132022-02-16 Jakub Jelinek <jakub@redhat.com>
514
515 PR c/104510
516 * c-common.cc (shorten_compare): Convert original arguments to
517 the original *restype_ptr when mixing binary and decimal float.
518
1f8a09d2
GA
5192022-02-14 Richard Biener <rguenther@suse.de>
520
521 PR c/104505
522 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
523 internal function calls.
524
e8d68f0a
GA
5252022-02-11 Richard Biener <rguenther@suse.de>
526
527 * c-attribs.cc (c_common_attribute_table): Add entry for
528 vector_mask.
529 (handle_vector_mask_attribute): New.
530
a645583d
GA
5312022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
532
533 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
534 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
535 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
536
3adf509f
GA
5372022-02-09 Jason Merrill <jason@redhat.com>
538
539 * c-cppbuiltin.cc (c_cpp_builtins): Update values
540 of __cpp_constexpr and __cpp_concepts for C++20.
541
bb99171b
GA
5422022-01-24 Marek Polacek <polacek@redhat.com>
543
544 PR preprocessor/104030
545 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
546
9dd44357
GA
5472022-01-21 Jakub Jelinek <jakub@redhat.com>
548
549 PR c++/104148
550 * c-common.h (check_function_arguments_recurse): Add for_format
551 arg.
552 * c-common.cc (check_function_nonnull): Pass false to
553 check_function_arguments_recurse's last argument.
554 (check_function_arguments_recurse): Add for_format argument,
555 if true, don't stop on warning_suppressed_p.
556 * c-format.cc (check_format_info): Pass true to
557 check_function_arguments_recurse's last argument.
558
fe1ad141
GA
5592022-01-19 David Malcolm <dmalcolm@redhat.com>
560
561 * c-common.cc (c_common_c_tests): Rename to...
562 (c_common_cc_tests): ...this.
563 (c_family_tests): Update calls for .c to .cc renaming.
564 * c-common.h (c_format_c_tests): Rename to...
565 (c_format_cc_tests): ...this.
566 (c_indentation_c_tests): Rename to...
567 (c_indentation_cc_tests): ...this.
568 (c_pretty_print_c_tests): Rename to...
569 (c_pretty_print_cc_tests): ...this.
570 * c-format.cc (c_format_c_tests): Rename to...
571 (c_format_cc_tests): ...this.
572 * c-indentation.cc (c_indentation_c_tests): Rename to...
573 (c_indentation_cc_tests): ...this.
574 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
575 (c_pretty_print_cc_tests): ...this.
576
fc829782
GA
5772022-01-17 Martin Liska <mliska@suse.cz>
578
579 * c-ada-spec.cc: Rename .c names to .cc.
580 * c-ada-spec.h: Likewise.
581 * c-common.cc (c_build_vec_convert): Likewise.
582 (warning_candidate_p): Likewise.
583 * c-common.h (enum rid): Likewise.
584 (build_real_imag_expr): Likewise.
585 (finish_label_address_expr): Likewise.
586 (c_get_substring_location): Likewise.
587 (c_build_bind_expr): Likewise.
588 (conflict_marker_get_final_tok_kind): Likewise.
589 (c_parse_error): Likewise.
590 (check_missing_format_attribute): Likewise.
591 (invalid_array_size_error): Likewise.
592 (warn_for_multistatement_macros): Likewise.
593 (build_attr_access_from_parms): Likewise.
594 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
595 * c-format.cc: Likewise.
596 * c-gimplify.cc (c_gimplify_expr): Likewise.
597 * c-indentation.h: Likewise.
598 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
599 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
600 * c-opts.cc (c_common_post_options): Likewise.
601 (set_std_cxx23): Likewise.
602 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
603 * c-pretty-print.h: Likewise.
604
6052022-01-17 Martin Liska <mliska@suse.cz>
606
607 * c-ada-spec.c: Moved to...
608 * c-ada-spec.cc: ...here.
609 * c-attribs.c: Moved to...
610 * c-attribs.cc: ...here.
611 * c-common.c: Moved to...
612 * c-common.cc: ...here.
613 * c-cppbuiltin.c: Moved to...
614 * c-cppbuiltin.cc: ...here.
615 * c-dump.c: Moved to...
616 * c-dump.cc: ...here.
617 * c-format.c: Moved to...
618 * c-format.cc: ...here.
619 * c-gimplify.c: Moved to...
620 * c-gimplify.cc: ...here.
621 * c-indentation.c: Moved to...
622 * c-indentation.cc: ...here.
623 * c-lex.c: Moved to...
624 * c-lex.cc: ...here.
625 * c-omp.c: Moved to...
626 * c-omp.cc: ...here.
627 * c-opts.c: Moved to...
628 * c-opts.cc: ...here.
629 * c-pch.c: Moved to...
630 * c-pch.cc: ...here.
631 * c-ppoutput.c: Moved to...
632 * c-ppoutput.cc: ...here.
633 * c-pragma.c: Moved to...
634 * c-pragma.cc: ...here.
635 * c-pretty-print.c: Moved to...
636 * c-pretty-print.cc: ...here.
637 * c-semantics.c: Moved to...
638 * c-semantics.cc: ...here.
639 * c-ubsan.c: Moved to...
640 * c-ubsan.cc: ...here.
641 * c-warn.c: Moved to...
642 * c-warn.cc: ...here.
643 * cppspec.c: Moved to...
644 * cppspec.cc: ...here.
645 * stub-objc.c: Moved to...
646 * stub-objc.cc: ...here.
647
9248ee41
GA
6482022-01-15 Martin Sebor <msebor@redhat.com>
649
650 PR c/63272
651 * c.opt (-Wdangling-pointer): New option.
652
6532022-01-15 Martin Sebor <msebor@redhat.com>
654
655 PR tree-optimization/80532
656 * c.opt (-Wuse-after-free): New options.
657
617db51d
GA
6582022-01-14 David Malcolm <dmalcolm@redhat.com>
659
660 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
661 (handle_tainted_args_attribute): New.
662
ad3f0d08
GA
6632022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
664 Jason Merrill <jason@redhat.com>
665
666 PR c++/70417
667 * c.opt: Added -Wmissing-template-keyword.
668
6692022-01-13 Richard Biener <rguenther@suse.de>
670
671 PR c/104002
672 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
673
02a8a01b
GA
6742022-01-12 Martin Liska <mliska@suse.cz>
675
676 PR target/103804
677 * c-attribs.c (handle_optimize_attribute): Do not call
678 cl_optimization_compare if we seen an error.
679
01a254e3
GA
6802022-01-11 Jakub Jelinek <jakub@redhat.com>
681
682 PR c/101537
683 PR c/103881
684 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
685 and BIT_XOR_EXPR.
686
d9450aa0
GA
6872022-01-10 Richard Biener <rguenther@suse.de>
688
689 PR middle-end/101530
690 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
691 in a TARGET_EXPR to force a temporary.
692
11ce8d04
GA
6932022-01-06 Marek Polacek <polacek@redhat.com>
694
695 PR c++/103758
696 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
697 diagnostic messages.
698 (handle_pragma_diagnostic): Likewise.
699
a4ae8c37
GA
7002022-01-03 Marek Polacek <polacek@redhat.com>
701
702 PR c++/103758
703 * c-format.c (check_tokens): Accept "decl-specifier*".
704
7052022-01-03 Jakub Jelinek <jakub@redhat.com>
706
707 PR c++/103600
708 * c-attribs.c (handle_non_overlapping_attribute): New function.
709 (c_common_attribute_table): Add "non overlapping" attribute.
710
84790a9d
GA
7112021-12-30 Jakub Jelinek <jakub@redhat.com>
712
713 PR c++/103012
714 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
715 cpp_define_unused/cpp_undef calls with forced token locations
716 BUILTINS_LOCATION.
717
d1e111da
GA
7182021-12-27 Patrick Palka <ppalka@redhat.com>
719
720 PR c++/103700
721 * c-common.c (pointer_int_sum): When quiet, return
722 error_mark_node for an incomplete pointed-to type and don't
723 call size_in_bytes_loc.
724
2554e2da
GA
7252021-12-17 Jason Merrill <jason@redhat.com>
726
727 PR c++/103681
728 * c-opts.c (c_common_post_options): Update defaults.
729
774269aa
GA
7302021-12-16 Martin Liska <mliska@suse.cz>
731
732 PR target/103709
733 * c-pragma.c (handle_pragma_pop_options): Do not check
734 global options modification when an error is seen in parsing
735 of options (pragmas or attributes).
736
c8dcf64b
GA
7372021-12-12 Jonathan Wakely <jwakely@redhat.com>
738
739 * known-headers.cc: Define INCLUDE_MEMORY instead of
740 INCLUDE_UNIQUE_PTR.
741 * name-hint.h: Likewise.
742 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
743
4b4839e3
GA
7442021-12-09 Jakub Jelinek <jakub@redhat.com>
745
746 PR pch/71934
747 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
748 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
749
03a9bd05
GA
7502021-12-03 Jakub Jelinek <jakub@redhat.com>
751
752 PR pch/71934
753 * c-pch.c (struct c_pch_validity): Remove pch_init member.
754 (pch_init): Don't initialize v.pch_init.
755 (c_common_valid_pch): Don't warn and punt if .text addresses change.
756
40fa651e
GA
7572021-12-01 Jason Merrill <jason@redhat.com>
758
759 PR c++/103310
760 * c.opt: Add -fconstexpr-fp-except.
761
87cd82c8
GA
7622021-11-29 Richard Biener <rguenther@suse.de>
763
764 * c-format.c (check_format_string): Remove spurious
765 gcc_unreachable.
766
7672021-11-29 Richard Biener <rguenther@suse.de>
768
769 * c-opts.c (c_common_post_options): Remove unreachable return.
770 * c-pragma.c (handle_pragma_target): Likewise.
771 (handle_pragma_optimize): Likewise.
772
091ccc06
GA
7732021-11-25 Jakub Jelinek <jakub@redhat.com>
774
775 PR c++/102611
776 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
777 default for C++23 regardless of warn_deprecated.
778 * c-cppbuiltin.c (c_cpp_builtins): Predefine
779 __cpp_multidimensional_subscript=202110L for C++23.
780
e1d43592
GA
7812021-11-23 Martin Sebor <msebor@redhat.com>
782
783 PR middle-end/88232
784 * c.opt: Add -Winfinite-recursion.
785
9c077398
GA
7862021-11-19 Martin Sebor <msebor@redhat.com>
787
788 PR c++/33925
789 PR c/102867
790 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
791 and improve handling tof defined symbols.
792
7932021-11-19 Martin Liska <mliska@suse.cz>
794
795 Revert:
796 2021-11-18 Martin Liska <mliska@suse.cz>
797
798 * c-gimplify.c (genericize_c_loop): Use option directly.
799
483092d3
GA
8002021-11-18 Matthias Kretz <m.kretz@gsi.de>
801
802 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
803 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
804
8052021-11-18 Martin Liska <mliska@suse.cz>
806
807 * c-gimplify.c (genericize_c_loop): Use option directly.
808
280d2838
GA
8092021-11-17 Martin Uecker <uecker@gcc.gnu.org>
810
811 PR c/91038
812 PR c/29970
813 * c-common.c (pointer_int_sum): Make sure pointer expressions
814 are evaluated first when the size expression depends on for
815 variably-modified types.
816
8172021-11-17 Marek Polacek <polacek@redhat.com>
818
819 PR preprocessor/103026
820 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
821
6b1695f4
GA
8222021-11-16 Jason Merrill <jason@redhat.com>
823
824 * c-common.c (release_tree_vector): Only cache vecs smaller than
825 16 elements.
826
e2b57363
GA
8272021-11-15 Jason Merrill <jason@redhat.com>
828
829 * c.opt: Add -fimplicit-constexpr.
830 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
831 * c-opts.c (c_common_post_options): Disable below C++14.
832
8332021-11-15 Jakub Jelinek <jakub@redhat.com>
834
835 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
836 Duplicate to both OMP_TARGET and OMP_TEAMS.
837
8d36a0d2
GA
8382021-11-10 Marek Polacek <polacek@redhat.com>
839
840 PR c++/101940
841 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
842 ignored_attributes.
843
c9b1334e
GA
8442021-11-09 David Malcolm <dmalcolm@redhat.com>
845
846 * c-pragma.c (GCC_BAD_AT): New macro.
847 (GCC_BAD2_AT): New macro.
848 (handle_pragma_pack): Use the location of the pertinent token when
849 issuing diagnostics about invalid constants/actions, and trailing
850 junk.
851 (handle_pragma_target): Likewise for non-string "GCC option".
852 (handle_pragma_message): Likewise for trailing junk.
853
18ae471f
GA
8542021-11-03 Joseph Myers <joseph@codesourcery.com>
855
856 PR c/103031
857 * c-common.c (convert_and_check): Add argument init_const. Call
858 convert_init if init_const.
859 * c-common.h (convert_and_check): Update prototype.
860 (convert_init): New prototype.
861
cf82e8d9
GA
8622021-11-01 David Malcolm <dmalcolm@redhat.com>
863
864 * c-lex.c (c_lex_with_flags): When complaining about non-printable
865 CPP_OTHER tokens, set the "escape on output" flag.
866
04a2cf3f
GA
8672021-10-27 Jakub Jelinek <jakub@redhat.com>
868
869 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
870 POINTER_PLUS_EXPR.
871 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
872 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
873
8742021-10-27 Jakub Jelinek <jakub@redhat.com>
875
876 PR c++/102854
877 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
878 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
879 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
880 conversions temporarily clear the 3rd bit from d->kind while walking
881 subtrees.
882 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
883 if possibly non-rectangular.
884
ae5c5406
GA
8852021-10-21 Jakub Jelinek <jakub@redhat.com>
886
887 PR middle-end/64888
888 * c-omp.c (c_omp_predefined_variable): Return true also for
889 ubsan_create_data created artificial variables.
890
5d5885c9
GA
8912021-10-14 Joseph Myers <joseph@codesourcery.com>
892
893 * c-format.c (printf_length_specs, scanf_length_specs)
894 (print_char_table, scan_char_table): Support DFP formats for C2X.
895 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
896 (T2X_D32, T2X_D64, T2X_D128): New macros.
897
8982021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
899
900 * c-omp.c (c_omp_check_context_selector): Rename to
901 omp_check_context_selector and move to omp-general.c.
902 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
903 move to omp-general.c.
904
52055987
GA
9052021-10-12 Joseph Myers <joseph@codesourcery.com>
906
907 * c-format.c (print_char_table): Add %b and %B formats.
908 (scan_char_table): Add %b format.
909 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
910 (T2X_UPD, T2X_UIM): New macros.
911
9122021-10-12 Jakub Jelinek <jakub@redhat.com>
913
914 * c-omp.c (c_finish_omp_atomic): Use
915 clear_padding_type_may_have_padding_p.
916
ce6eec39
GA
9172021-10-08 Martin Liska <mliska@suse.cz>
918
919 * c-opts.c (c_common_post_options): Use new macro
920 OPTION_SET_P.
921
50e20ee6
GA
9222021-10-07 Martin Liska <mliska@suse.cz>
923
924 * c-common.c (parse_optimize_options): Make
925 save_opt_decoded_options a pointer type.
926
57c7ec62
GA
9272021-10-06 Jakub Jelinek <jakub@redhat.com>
928
929 PR tree-optimization/102571
930 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
931 padding, but the non-padding bits are contiguous set of bytes
932 by adjusting the memcmp call arguments instead of emitting
933 __builtin_clear_padding and then comparing all the type's bytes.
934
9352021-10-06 Jakub Jelinek <jakub@redhat.com>
936
937 PR c++/102612
938 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
939 __cpp_constexpr to 202110L rather than 201907L.
940
da9c5f78
GA
9412021-10-04 Marek Polacek <polacek@redhat.com>
942
943 PR c++/97573
944 * c-common.h (do_warn_array_compare): Declare.
945 * c-warn.c (do_warn_array_compare): New.
946 * c.opt (Warray-compare): New option.
947
e3e07b89
GA
9482021-10-02 Iain Sandoe <iain@sandoe.co.uk>
949
950 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
951 NULL, this is not needed.
952
9d116bcc
GA
9532021-10-01 Martin Sebor <msebor@redhat.com>
954
955 PR c/102103
956 * c-common.c (decl_with_nonnull_addr_p): Handle members.
957 Check and perform warning suppression.
958 (c_common_truthvalue_conversion): Enhance warning suppression.
959
9602021-10-01 Martin Liska <mliska@suse.cz>
961
962 PR target/102552
963 * c-common.c (parse_optimize_options): decoded_options[0] is
964 used for program name, so merged_decoded_options should also
965 respect that.
966
9672021-10-01 Jakub Jelinek <jakub@redhat.com>
968 Richard Biener <rguenther@suse.de>
969
970 PR sanitizer/102515
971 * c-ubsan.c (ubsan_instrument_division): Check the right
972 flag_sanitize_recover bit, depending on which sanitization
973 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
974 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
975 and SANITIZE_DIVIDE is enabled, neither check is known
976 to be false and flag_sanitize_recover bits for those two
977 aren't the same, emit both __ubsan_handle_divrem_overflow
978 and __ubsan_handle_divrem_overflow_abort calls.
979
9802021-10-01 Martin Liska <mliska@suse.cz>
981
982 * c-common.c (parse_optimize_options): Combine optimize
983 options with what was provided on the command line.
984
9852021-10-01 Jakub Jelinek <jakub@redhat.com>
986
987 * c-omp.c (c_omp_split_clauses): Also copy
988 OMP_CLAUSE_ORDER_REPRODUCIBLE.
989
cf966403
GA
9902021-09-27 Martin Liska <mliska@suse.cz>
991
992 * c-opts.c (c_common_init_options_struct): Set also
993 x_flag_default_complex_method.
994
e4777439
GA
9952021-09-22 Jakub Jelinek <jakub@redhat.com>
996
997 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
998
62498024
GA
9992021-09-20 Matthias Kretz <m.kretz@gsi.de>
1000
1001 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1002 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1003 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1004 __ROUNDING_MATH__ according to the new optimization flags.
1005
cf74e7b5
GA
10062021-09-18 Jakub Jelinek <jakub@redhat.com>
1007
1008 * c-omp.c (c_omp_split_clauses): Split order clause also to
1009 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1010
0a4cb439
GA
10112021-09-17 Jakub Jelinek <jakub@redhat.com>
1012
1013 * c-omp.c (c_finish_omp_atomic): Avoid creating
1014 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1015 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1016 had NULL initializer. When omitting operands after v = x,
1017 use type of v rather than type of x. Fix type of vtmp
1018 TARGET_EXPR.
1019
07985c47
GA
10202021-09-13 Jason Merrill <jason@redhat.com>
1021
1022 * c.opt: Add -Winterference-size.
1023 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1024 and __GCC_CONSTRUCTIVE_SIZE.
1025
a26206ec
GA
10262021-09-10 Jakub Jelinek <jakub@redhat.com>
1027
1028 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1029 * c-omp.c: Include gimple-fold.h.
1030 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1031 OpenMP 5.1 atomics.
1032
f84e2f0b
GA
10332021-09-09 qing zhao <qing.zhao@oracle.com>
1034
1035 * c-attribs.c (handle_uninitialized_attribute): New function.
1036 (c_common_attribute_table): Add "uninitialized" attribute.
1037
b6db7cd4
GA
10382021-09-08 liuhongt <hongtao.liu@intel.com>
1039
1040 * c-common.c (excess_precision_mode_join): Update below comments.
1041 (c_ts18661_flt_eval_method): Set excess_precision_type to
1042 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1043 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1044 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1045 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1046
b2748138
GA
10472021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1048
1049 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1050
7b739540
GA
10512021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1052
1053 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1054 and -gnatwu warning for the package specification.
1055
e11c6046
GA
10562021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1057
1058 * c-attribs.c (handle_unavailable_attribute): New.
1059
1e2f030b
GA
10602021-08-30 Jason Merrill <jason@redhat.com>
1061
1062 * c.opt: Add -Wmissing-requires.
1063
85d77ac4
GA
10642021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1065
1066 PR other/93067
1067 * c-opts.c (c_common_input_charset_cb): New function.
1068 (c_common_post_options): Call new function
1069 diagnostic_initialize_input_context().
1070
7c9e1645
GA
10712021-08-20 Tobias Burnus <tobias@codesourcery.com>
1072
1073 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1074 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1075 "di" and "u", respecitively; fill with BADLEN to match
1076 size of 'types'.
1077 (get_init_dynamic_hwi): Split off from ...
1078 (init_dynamic_diag_info): ... here. Call it.
1079 (init_dynamic_gfc_info): Call it.
1080
10812021-08-20 Jakub Jelinek <jakub@redhat.com>
1082
1083 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1084 * c-pragma.c (omp_pragmas): Add error directive.
1085 * c-omp.c (omp_directives): Uncomment error directive entry.
1086
6e529985
GA
10872021-08-18 Jakub Jelinek <jakub@redhat.com>
1088
1089 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1090 * c-pragma.c (omp_pragmas): Add nothing directive.
1091 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1092
2d14d64b
GA
10932021-08-17 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR c++/101539
1096 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1097 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1098
10992021-08-17 Matt Jacobson <mhjacobson@me.com>
1100
1101 * c-opts.c (c_common_post_options): Default to
1102 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1103
11042021-08-17 Jakub Jelinek <jakub@redhat.com>
1105
1106 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1107 * c-pragma.c (omp_pragmas): Add scope construct.
1108 * c-omp.c (omp_directives): Uncomment scope directive entry.
1109
9d1d9fc8
GA
11102021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1111
1112 * c-cppbuiltin.c (c_cpp_builtins): Define
1113 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1114
72be20e2
GA
11152021-08-12 Jakub Jelinek <jakub@redhat.com>
1116
1117 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1118 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1119 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1120 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1121 enumerator.
1122 (c_finish_omp_masked): Declare.
1123 * c-omp.c (c_finish_omp_masked): New function.
1124 (c_omp_split_clauses): Handle combined masked constructs.
1125
4d17ca1b
GA
11262021-07-30 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c++/101539
1129 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1130 * c-common.c (c_common_reswords): Add
1131 __is_pointer_interconvertible_base_of.
1132
11332021-07-29 Richard Biener <rguenther@suse.de>
1134
1135 PR c/101512
1136 * c-common.c (c_common_mark_addressable_vec): Look through
1137 C_MAYBE_CONST_EXPR even if not at the toplevel.
1138
af3f12e6
GA
11392021-07-27 Martin Sebor <msebor@redhat.com>
1140
1141 PR c/101585
1142 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1143
ead235f6
GA
11442021-07-23 Jakub Jelinek <jakub@redhat.com>
1145
1146 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1147 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1148 and later.
1149
11502021-07-23 Jakub Jelinek <jakub@redhat.com>
1151
1152 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1153 PRAGMA_OMP__LAST_ enumerators.
1154
419c6c68
GA
11552021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1156 Joseph Myers <joseph@codesourcery.com>
1157 Cesar Philippidis <cesar@codesourcery.com>
1158
1159 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1160
92d45509
GA
11612021-07-20 Martin Sebor <msebor@redhat.com>
1162
1163 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1164 by-const-reference.
1165 * c-common.h (c_build_shufflevector): Same.
1166
87277b6a
GA
11672021-07-16 Andrew Pinski <apinski@marvell.com>
1168
1169 PR c/101453
1170 * c-common.c (parse_optimize_options): Use the correct
1171 size for buffer.
1172
d97d71a1
GA
11732021-07-15 Martin Sebor <msebor@redhat.com>
1174
1175 PR c/101289
1176 PR c/97548
1177 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1178
c4fee1c6
GA
11792021-07-14 Jason Merrill <jason@redhat.com>
1180
1181 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1182
6fba0eea
GA
11832021-07-06 Martin Sebor <msebor@redhat.com>
1184
1185 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1186 (gcc_cdiag_char_table): Same.
1187 (gcc_cxxdiag_char_table): Same.
1188
7a60a6e8
GA
11892021-07-02 Jakub Jelinek <jakub@redhat.com>
1190
1191 * c-common.h (enum c_omp_directive_kind): New enum.
1192 (struct c_omp_directive): New type.
1193 (c_omp_categorize_directive): Declare.
1194 * c-omp.c (omp_directives): New variable.
1195 (c_omp_categorize_directive): New function.
1196
bea7c16a
GA
11972021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1198
1199 * c-ada-spec.c (packed_layout): New global variable.
1200 (dump_ada_declaration): Set it upon seeing a packed record type.
1201 Do not put the "aliased" keyword if it is set.
1202 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1203
12042021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1205
1206 * c-ada-spec.c (check_name): Rename into...
1207 (check_type_name_conflict): ...this. Minor tweak.
1208 (dump_ada_function_declaration): Adjust to above renaming.
1209 (dump_ada_array_domains): Fix oversight.
1210 (dump_ada_declaration): Call check_type_name_conflict for variables.
1211
90708f87
GA
12122021-06-25 Martin Sebor <msebor@redhat.com>
1213
1214 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1215 (c_common_truthvalue_conversion): Replace direct uses of
1216 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1217 copy_no_warning.
1218 (check_function_arguments_recurse): Same.
1219 * c-gimplify.c (c_gimplify_expr): Same.
1220 * c-warn.c (overflow_warning): Same.
1221 (warn_logical_operator): Same.
1222 (warn_if_unused_value): Same.
1223 (do_warn_unused_parameter): Same.
1224
9aa8327e
GA
12252021-06-24 Jakub Jelinek <jakub@redhat.com>
1226
1227 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1228 C_ORT_OMP_TARGET.
1229 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1230 combined target constructs also add map (always, tofrom:) clause.
1231
ede6c356
GA
12322021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1233
1234 * c-attribs.c (common_handle_aligned_attribute): Remove short
1235 circuit and dead code.
1236
8dc48181
GA
12372021-06-14 Jonathan Wakely <jwakely@redhat.com>
1238
1239 PR c++/101052
1240 * known-headers.cc (get_stdlib_header_for_name): Add known
1241 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1242 exit, and getenv.
1243
8b8c3912
GA
12442021-06-12 Jason Merrill <jason@redhat.com>
1245
1246 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1247
f16f65f8
GA
12482021-06-11 Jakub Jelinek <jakub@redhat.com>
1249
1250 PR c++/100974
1251 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1252 -std=c++2b for P1938R3 consteval if support.
1253
4f625f47
GA
12542021-06-09 Jason Merrill <jason@redhat.com>
1255
1256 PR c++/100879
1257 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1258 warning.
1259
438aac59
GA
12602021-06-07 Martin Liska <mliska@suse.cz>
1261
1262 * c-target.def: Split long lines and replace them
1263 with '\n\'.
1264
600f90cb
GA
12652021-06-04 Martin Sebor <msebor@redhat.com>
1266
1267 PR c/100783
1268 * c-attribs.c (positional_argument): Bail on erroneous types.
1269
12702021-06-04 Martin Sebor <msebor@redhat.com>
1271
1272 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1273 for element presence.
1274
440c8a0a
GA
12752021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1276
1277 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1278 (dump_ada_decl_name): Likewise.
1279 (dump_anonymous_type_name): Remove parent parameter and adjust.
1280 (dump_sloc): Minor tweak.
1281 (dump_ada_array_type): Remove type parameter and adjust.
1282 (dump_ada_enum_type): Remove parent parameter and adjust.
1283 (dump_ada_node): Adjust calls to above functions.
1284 (dumped_anonymous_types): New global variable.
1285 (dump_nested_types_1): Rename into...
1286 (dump_nested_types): ...this.
1287 (dump_nested_type): Remove parent and dumped_types parameters.
1288 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1289 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1290 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1291
12922021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1293
1294 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1295 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1296
12972021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1298
1299 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1300 (htable_t): New typedef.
1301 (overloaded_names): Use it.
1302 (add_name): New function.
1303 (init_overloaded_names): Use add_name to populate the table and add
1304 special cases for sigaction and stat.
1305 (overloaded_name_p): Rename into...
1306 (overloading_index): ...this. Do not initialize overloaded_names table
1307 here. Return the index or zero.
1308 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1309 but add an overloading suffix instead.
1310 (dump_ada_specs): Initialize overloaded_names tables here.
1311
b75978d1
GA
13122021-06-01 Martin Liska <mliska@suse.cz>
1313
1314 PR other/100759
1315 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1316 to a situation where we are not in processing of an optimize
1317 pragma.
1318 * c-pragma.c (handle_pragma_pop_options): Restore target
1319 options.
1320
ee682192
GA
13212021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1322
1323 PR testsuite/100749
1324 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1325
13262021-05-31 Richard Biener <rguenther@suse.de>
1327
1328 PR c++/88601
1329 * c-common.c: Include tree-vector-builder.h and
1330 vec-perm-indices.h.
1331 (c_common_reswords): Add __builtin_shufflevector.
1332 (c_build_shufflevector): New funtion.
1333 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1334 (c_build_shufflevector): Declare.
1335
48166757
GA
13362021-05-28 Jakub Jelinek <jakub@redhat.com>
1337
1338 PR middle-end/99928
1339 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1340 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1341
13422021-05-28 Tobias Burnus <tobias@codesourcery.com>
1343
1344 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1345
2bc6dace
GA
13462021-05-25 Martin Liska <mliska@suse.cz>
1347
1348 PR tree-optimization/92860
1349 PR target/99592
1350 * c-attribs.c (handle_optimize_attribute): Save target node
1351 before calling parse_optimize_options and save it in case
1352 it changes.
1353 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1354 (handle_pragma_pop_options): Likewise here.
1355
13562021-05-25 Martin Liska <mliska@suse.cz>
1357
1358 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1359
13602021-05-25 Jakub Jelinek <jakub@redhat.com>
1361
1362 PR middle-end/99928
1363 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1364 combined with simd and not with taskloop or for.
1365
2832d51b
GA
13662021-05-21 Jakub Jelinek <jakub@redhat.com>
1367
1368 PR middle-end/99928
1369 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1370 on firstprivate clause copy going to target construct, and for
1371 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1372
ea34e2ed
GA
13732021-05-20 Jonathan Wakely <jwakely@redhat.com>
1374
1375 * c.opt (Wc++11-extensions, Wc++14-extensions)
1376 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1377 options.
1378
13792021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1380
1381 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1382
13832021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1384
1385 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1386 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1387 (pch_init): Renamed member.
1388 (c_common_valid_pch): Adjust access to debug_type_names.
1389
65f32e5d
GA
13902021-05-19 Martin Sebor <msebor@redhat.com>
1391
1392 PR c/100619
1393 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1394 bounds.
1395
a8daf9a1
GA
13962021-05-18 Richard Biener <rguenther@suse.de>
1397
1398 PR c/100547
1399 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1400 Reword existing nunit diagnostic.
1401
a7ffc1ef
GA
14022021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1403
1404 * c-common.c (braced_list_to_string): Return CTOR unchanged
1405 if host and target character sizes don't match.
1406
87a7d10c
GA
14072021-05-14 Martin Liska <mliska@suse.cz>
1408
1409 * c.opt: Add Warning keyword for 2 options.
1410
f9af11c7
GA
14112021-05-13 Martin Liska <mliska@suse.cz>
1412
1413 PR middle-end/100504
1414 * c-attribs.c (handle_target_clones_attribute): Expect a string
1415 argument to target_clone argument.
1416
037e3661
GA
14172021-05-11 Joseph Myers <joseph@codesourcery.com>
1418
1419 * c-lex.c (interpret_float): Handle digit separators for C2X.
1420
aa891c56
GA
14212021-05-10 Martin Liska <mliska@suse.cz>
1422
1423 * c-ada-spec.c (print_destructor): Use startswith
1424 function instead of strncmp.
1425 (dump_ada_declaration): Likewise.
1426 * c-common.c (disable_builtin_function): Likewise.
1427 (def_builtin_1): Likewise.
1428 * c-format.c (check_tokens): Likewise.
1429 (check_plain): Likewise.
1430 (convert_format_name_to_system_name): Likewise.
1431
e4ff4ffb
GA
14322021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1433
1434 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1435 complex divide
1436
c0fa3f2f
GA
14372021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1438 Nathan Sidwell <nathan@codesourcery.com>
1439 Tom de Vries <vries@codesourcery.com>
1440 Julian Brown <julian@codesourcery.com>
1441 Kwok Cheung Yeung <kcy@codesourcery.com>
1442
1443 * c.opt (Wopenacc-parallelism): New.
1444
6e81e015
GA
14452021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1446
1447 * c.opt (fopenacc-kernels=): Remove.
1448
019a9220
GA
14492021-04-08 Jakub Jelinek <jakub@redhat.com>
1450
1451 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1452 occured -> occurred.
1453 (check_alignment_of_packed_member): Fix a comment typo,
1454 memeber -> member.
1455 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1456 and onless -> unless.
1457 (warn_parm_array_mismatch): Fix comment typos, declaratation
1458 -> declaration and woud -> would. Fix up comment indentation.
1459
14602021-04-08 Martin Sebor <msebor@redhat.com>
1461
1462 PR middle-end/99883
1463 * c.opt (Wmismatched-new-delete): Correct spelling.
1464
b1da9916
GA
14652021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1466
1467 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1468 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1469 enumeral types use again the type name for the enumeration constants.
1470 (dump_ada_node): Adjust call to dump_ada_enum_type.
1471 (dump_nested_type): Likewise.
1472
f1607029
GA
14732021-04-01 Jason Merrill <jason@redhat.com>
1474
1475 PR c++/98481
1476 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1477
4493b1c1
GA
14782021-03-25 Jakub Jelinek <jakub@redhat.com>
1479
1480 PR c++/99565
1481 * c-warn.c (do_warn_duplicated_branches): Pass also
1482 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1483
6af7b307
GA
14842021-03-20 Jakub Jelinek <jakub@redhat.com>
1485
1486 PR debug/99230
1487 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1488
ceae9533
GA
14892021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1490
1491 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1492 after entering the separate class package, if any.
1493
67f10d28
GA
14942021-03-04 Richard Biener <rguenther@suse.de>
1495
1496 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1497 Handle ERROR_MARK.
1498
14992021-03-04 Jakub Jelinek <jakub@redhat.com>
1500
1501 PR c/99325
1502 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1503 (token_streamer::stream) Likewise.
1504 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1505 UNKNOWN_LOCATION.
1506
f3641ac7
GA
15072021-03-03 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/99324
1510 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1511 instead of mark_addressable. Fix a comment typo -
1512 neutrallly -> neutrally.
1513
2c83c3fb
GA
15142021-02-28 Jakub Jelinek <jakub@redhat.com>
1515
1516 PR c/99304
1517 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1518 message - refernced -> referenced. Remove superfluous space before
1519 closing paren of function calls.
1520
daa68844
GA
15212021-02-25 Nathan Sidwell <nathan@acm.org>
1522
1523 PR c++/99166
1524 * c.opt (-flang-info-module-cmi): Renamed option.
1525
50352c6c
GA
15262021-02-19 Nathan Sidwell <nathan@acm.org>
1527
1528 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1529
bf81237e
GA
15302021-02-18 H.J. Lu <hjl.tools@gmail.com>
1531
1532 PR target/99113
1533 * c-attribs.c (c_common_attribute_table): Add the "retain"
1534 attribute.
1535 (handle_retain_attribute): New function.
1536
0e804ce3
GA
15372021-02-16 Marek Polacek <polacek@redhat.com>
1538
1539 PR c++/99062
1540 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1541 alignment argument is non-negative. Tweak a warning message.
1542
fab095da
GA
15432021-02-12 Martin Sebor <msebor@redhat.com>
1544
1545 PR c/99055
1546 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1547 print_generic_expr_to_str.
1548
4b37c3ea
GA
15492021-02-10 Richard Biener <rguenther@suse.de>
1550
1551 * c-common.c (parse_optimize_options): Free decoded_options.
1552
a19dd5e6
GA
15532021-02-04 emsr <3dw4rd@verizon.net>
1554
1555 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1556
9faaa807
GA
15572021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1558
1559 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1560 * c-lex.c (interpret_integer): Set node type for size literal.
1561
85d04a2e
GA
15622021-01-28 Jakub Jelinek <jakub@redhat.com>
1563
1564 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1565 draft from description.
1566 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1567
e62bb7f0
GA
15682021-01-26 Paul Fee <paul.f.fee@gmail.com>
1569
1570 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1571 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1572 and -std=gnu++2b
1573 * c-opts.c (set_std_cxx23): New.
1574 (c_common_handle_option): Set options when -std=c++23 is enabled.
1575 (c_common_post_options): Adjust comments.
1576 (set_std_cxx20): Likewise.
1577
161e4c08
GA
15782021-01-25 Martin Sebor <msebor@redhat.com>
1579
1580 PR c++/98646
1581 * c-common.c (check_nonnull_arg): Adjust warning text.
1582
4c9bcd5c
GA
15832021-01-17 Martin Sebor <msebor@redhat.com>
1584
1585 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1586 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1587
59cf67d1
GA
15882021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1589
1590 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1591 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1592
2f7f0d32
GA
15932021-01-15 Jakub Jelinek <jakub@redhat.com>
1594
1595 PR tree-optimization/98597
1596 * c-pretty-print.c: Include options.h.
1597 (c_fold_indirect_ref_for_warn): New function.
1598 (print_mem_ref): Use it. If it returns something that has compatible
1599 type and is TBAA compatible with zero offset, print it and return,
1600 otherwise print it using offsetof syntax or array ref syntax. Fix up
1601 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1602 argument has pointer to array type. Print pointers using the standard
1603 formatting.
1604
6851dda2
GA
16052021-01-12 Martin Sebor <msebor@redhat.com>
1606
1607 PR c/98597
1608 PR c/98592
1609 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1610 has pointer type. Remove redundant code. Avoid calling
1611 gimple_canonical_types_compatible_p.
1612
7d187e4f
GA
16132021-01-07 Martin Sebor <msebor@redhat.com>
1614
1615 PR middle-end/98578
1616 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1617 Avoid assuming acces type's size is constant. Correct condition
1618 guarding the printing of a parenthesis.
1619
942ae5be
GA
16202021-01-06 Martin Sebor <msebor@redhat.com>
1621
1622 PR c++/95768
1623 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1624 SSA_NAMEs print VLA names and GIMPLE defining statements.
1625 (print_mem_ref): New function.
1626 (c_pretty_printer::unary_expression): Call it.
1627
16282021-01-06 Richard Biener <rguenther@suse.de>
1629
1630 PR tree-optimization/95582
1631 * c-attribs.c (c_common_attribute_table): Add entry for
1632 signed_bool_precision.
1633 (handle_signed_bool_precision_attribute): New.
1634
8daa719b
GA
16352020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1636
1637 * c.opt: Add -stdlib= option and enumerations for
1638 libstdc++ and libc++.
1639
eefe499f
GA
16402020-12-16 Martin Liska <mliska@suse.cz>
1641
1642 * c.opt: Remove usage of Report.
1643
d52945ce
GA
16442020-12-14 Martin Sebor <msebor@redhat.com>
1645
1646 PR middle-end/98166
1647 PR c++/57111
1648 PR middle-end/98160
1649 * c-attribs.c (maybe_add_noinline): New function.
1650 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1651 Implicitly add attribute noinline to functions not declared inline
1652 and warn on those.
1653
ca2bd949
GA
16542020-12-09 Tobias Burnus <tobias@codesourcery.com>
1655
1656 * c-pragma.c (omp_pragmas): Add 'allocate'.
1657 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1658
f6e8e279
GA
16592020-12-08 Jakub Jelinek <jakub@redhat.com>
1660
1661 PR c++/98187
1662 * c-pragma.c (omp_pragmas): Remove "master".
1663 (omp_pragmas_simd): Add "master".
1664
bc8a7013
GA
16652020-12-07 Marek Polacek <polacek@redhat.com>
1666
1667 PR c++/98126
1668 * c-common.c (verify_tree_lim_r): New function.
1669 (verify_sequence_points): Use it. Use nullptr instead of 0.
1670
b8dd0ef7
GA
16712020-12-03 Martin Sebor <msebor@redhat.com>
1672
1673 PR c++/90629
1674 PR middle-end/94527
1675 * c-attribs.c (handle_dealloc_attribute): New function.
1676 (handle_malloc_attribute): Handle argument forms of attribute.
1677 * c.opt (-Wmismatched-dealloc): New option.
1678 (-Wmismatched-new-delete): New option.
1679
16802020-12-03 Jakub Jelinek <jakub@redhat.com>
1681
1682 PR libstdc++/93121
1683 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1684 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1685
e0f5e792
GA
16862020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1687
1688 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1689 {__GNUC_EXECUTION_CHARSET_NAME} and
1690 _WIDE_EXECUTION_CHARSET_NAME} macros.
1691
16922020-12-01 Nathan Sidwell <nathan@acm.org>
1693
1694 * c-common.c (module, import, export): New internal tokens (with
1695 trailing space).
1696 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1697 them.
1698 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1699 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1700
17012020-12-01 Nathan Sidwell <nathan@acm.org>
1702
1703 * c-opts.c (c_common_init_options): Ask for module dependencies.
1704 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1705 * c-pch.c (c_common_valid_pch): ... does not play with C++
1706 modules.
1707 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1708 options.
1709 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1710 (fmodule-only, fmodule-mapper, fmodule-lazy)
1711 (fmodule-version-ignore, Winvalid-imported-macros)
1712 (flang-info-include-translate, flang-info-include-translate-not):
1713 New options
1714
5fbf0ecb
GA
17152020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1716
1717 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1718 (dump_ada_structure): Also deal with convention, unchecked union and
1719 bit-field for nested types. In the latter case, print an Alignment
1720 aspect along with the Pack aspect.
1721
360258da
GA
17222020-11-25 Martin Sebor <msebor@redhat.com>
1723
1724 PR bootstrap/94982
1725 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1726 -Wformat-diag.
1727
1e2c9a27
GA
17282020-11-24 Martin Sebor <msebor@redhat.com>
1729
1730 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1731
8e6198d0
GA
17322020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1733
1734 * c-attribs.c (handle_special_var_sec_attribute): New.
1735 (handle_noinit_attribute): Remove.
1736 (attr_noinit_exclusions): Rename to...
1737 (attr_section_exclusions): ...this, and add "persistent" attribute
1738 exclusion.
1739 (c_common_attribute_table): Add "persistent" attribute.
1740
7a97e2fc
GA
17412020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1742
1743 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1744 Treat opaque types like other types.
1745 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1746 supported types.
1747
82e5048e
GA
17482020-11-20 Martin Sebor <msebor@redhat.com>
1749
1750 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1751 with fewer arguments.
1752
17532020-11-20 Martin Sebor <msebor@redhat.com>
1754
1755 PR middle-end/97879
1756 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1757 Error out on invalid modes.
1758
17592020-11-20 Jakub Jelinek <jakub@redhat.com>
1760
1761 PR libstdc++/88101
1762 * c-common.c (check_builtin_function_arguments): Handle
1763 BUILT_IN_CLEAR_PADDING.
1764
25bb75f8
GA
17652020-11-18 Nathan Sidwell <nathan@acm.org>
1766
1767 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1768
4dabb037
GA
17692020-11-17 Nathan Sidwell <nathan@acm.org>
1770
1771 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1772 after newly-added CTI_MODULE_HWM.
1773
17742020-11-17 Joseph Myers <joseph@codesourcery.com>
1775
1776 * c-cppbuiltin.c (builtin_define_float_constants): Define
1777 "*_IS_IEC_60559__" macros.
1778
17792020-11-17 Nathan Sidwell <nathan@acm.org>
1780
1781 * c-lex.c: #include "langhooks.h".
1782 (cb_undef): Maybe call preprocess_undef lang hook.
1783 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1784 lang hook.
1785 (push_command_line_include): Maybe call preprocess_main_file lang
1786 hook.
1787 (cb_file_change): Likewise.
1788 * c-ppoutput.c: #include "langhooks.h.
1789 (scan_translation_unit): Maybe call preprocess_token lang hook.
1790 (class do_streamer): New, derive from token_streamer.
1791 (directives_only_cb): Data pointer is do_streamer, call
1792 preprocess_token lang hook.
1793 (scan_translation_unit_directives_only): Use do_streamer.
1794 (print_line_1): Move src_line recording to after string output.
1795 (cb_undef): Maybe call preprocess_undef lang hook.
1796
17972020-11-17 Nathan Sidwell <nathan@acm.org>
1798
1799 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1800 code duplicating that functionality.
1801
18022020-11-17 Jakub Jelinek <jakub@redhat.com>
1803
1804 PR c/90628
1805 * c-common.c (check_builtin_function_arguments)
1806 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1807 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1808 for more builtins and argument positions.
1809
29c5d9ce
GA
18102020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1811
1812 PR objc/97854
1813 * stub-objc.c: Include c-common.h to declare enum rid.
1814
77f67db2
GA
18152020-11-13 Jakub Jelinek <jakub@redhat.com>
1816
1817 PR c++/63287
1818 * c-cppbuiltin.c: Include configargs.h.
1819 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1820 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1821 "single".
1822
18232020-11-13 Gergö Barany <gergo@codesourcery.com>
1824 Thomas Schwinge <thomas@codesourcery.com>
1825
1826 * c.opt (fopenacc-kernels): Add.
1827
18282020-11-13 Jason Merrill <jason@redhat.com>
1829
1830 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1831
18322020-11-13 Piotr H. Dabrowski <phd@phd.re>
1833
1834 PR c++/91318
1835 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1836
18372020-11-13 Martin Liska <mliska@suse.cz>
1838
1839 * c-attribs.c (build_attr_access_from_parms): Format properly.
1840
18412020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1842
1843 PR objc/90707
1844 * c-common.c (c_common_reswords): null_unspecified, nullable,
1845 nonnull, null_resettable: New keywords.
1846 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1847 RID_NONNULL, RID_NULL_RESETTABLE: New.
1848 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1849 ranges accepted for property attributes.
1850 * c-attribs.c (handle_objc_nullability_attribute): New.
1851 * c-objc.h (enum objc_property_attribute_group): Add
1852 OBJC_PROPATTR_GROUP_NULLABLE.
1853 (enum objc_property_attribute_kind):Add
1854 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1855 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1856
18572020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1858
1859 PR objc/77404
1860 * c-attribs.c (handle_objc_root_class_attribute): New
1861 * c-objc.h (objc_start_class_interface): Add a location
1862 value for the position of the class name.
1863 * c.opt: Add Wobjc-root-class.
1864 * stub-objc.c (objc_start_class_interface): Add a location
1865 value for the position of the class name.
1866
a5a11525
GA
18672020-11-12 Joseph Myers <joseph@codesourcery.com>
1868
1869 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1870 Allow scope for C. Handle standard attributes for C. Do not
1871 accept unscoped attributes if std_syntax and not handled as
1872 standard attributes.
1873 * c-common.h (c_common_has_attribute): Update prototype.
1874
18752020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1876
1877 PR pch/86674
1878 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1879 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1880
0f5f9ed5
GA
18812020-11-11 Patrick Palka <ppalka@redhat.com>
1882
1883 PR c++/88115
1884 * c-opts.c (c_common_post_options): Update latest_abi_version.
1885
bb622641
GA
18862020-11-10 Jakub Jelinek <jakub@redhat.com>
1887
1888 PR c/97748
1889 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1890 to false.
1891 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1892 recursively and just return true instead of warning if it is true.
1893 Handle COMPLEX_EXPR.
1894
18952020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1896
1897 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1898 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1899 (c_omp_adjust_map_clauses): New function.
1900
2bee28dd
GA
19012020-11-09 Marek Polacek <polacek@redhat.com>
1902
1903 DR 1914
1904 * c-common.c (attribute_fallthrough_p): Tweak the warning
1905 message.
1906
19072020-11-09 Patrick Palka <ppalka@redhat.com>
1908
1909 * c-pragma.c (handle_pragma_diagnostic): Split the
1910 unknown-option -Wpragmas diagnostic into a warning and a
1911 subsequent note containing a spelling suggestion. Avoid
1912 computing the suggestion if -Wpragmas warnings are being
1913 suppressed.
1914
19152020-11-09 Patrick Palka <ppalka@redhat.com>
1916
1917 PR testsuite/97117
1918 * c-indentation.c (get_visual_column): Remove location_t
1919 parameter. Move the column-tracking diagnostic code from here
1920 to ...
1921 (should_warn_for_misleading_indentation): ... here, before the
1922 early exit for when the loci are not all distinct. Don't pass a
1923 location_t argument to get_visual_column.
1924 (assert_get_visual_column_succeeds): Don't pass a location_t
1925 argument to get_visual_column.
1926 (assert_get_visual_column_fails): Likewise.
1927
fb95de7a
GA
19282020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1929
1930 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1931 of keywords accepted in @property attribute contexts.
1932 * c-objc.h (enum objc_property_attribute_group): Add
1933 OBJC_PROPATTR_GROUP_CLASS.
1934 (enum objc_property_attribute_kind): Add
1935 OBJC_PROPERTY_ATTR_CLASS.
1936
2da7ee05
GA
19372020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1938
1939 * c-common.c (c_common_reswords): Add 'atomic' property
1940 attribute.
1941 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1942 property attributes.
1943
19442020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1945
1946 * c-attribs.c (handle_nsobject_attribute): New.
1947 * c.opt: Add WNSObject-attribute.
1948
44cab2d8
GA
19492020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1950
1951 * c-objc.h (enum objc_property_attribute_group): New
1952 (enum objc_property_attribute_kind): New.
1953 (OBJC_PROPATTR_GROUP_MASK): New.
1954 (struct property_attribute_info): Small class encapsulating
1955 parser output from property attributes.
1956 (objc_prop_attr_kind_for_rid): New
1957 (objc_add_property_declaration): Simplify interface.
1958 * stub-objc.c (enum rid): Dummy type.
1959 (objc_add_property_declaration): Simplify interface.
1960 (objc_prop_attr_kind_for_rid): New.
1961
19622020-11-06 Nathan Sidwell <nathan@acm.org>
1963
1964 * c-ada-spec.c (collect_ada_nodes): Rename
1965 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1966 (collect_ada_node): Likewise.
1967 (dump_forward_type): Likewise.
1968 * c-common.c (set_underlying_type): Rename
1969 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1970 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1971
19722020-11-06 Jakub Jelinek <jakub@redhat.com>
1973
1974 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1975
0cfd9109
GA
19762020-11-05 Marek Polacek <polacek@redhat.com>
1977
1978 PR c++/97675
1979 * c.opt (Wexceptions): New option.
1980
19812020-11-05 Marek Polacek <polacek@redhat.com>
1982
1983 PR c++/25814
1984 * c.opt (Wvexing-parse): New option.
1985
35c125cb
GA
19862020-11-04 Jakub Jelinek <jakub@redhat.com>
1987
1988 PR c++/97670
1989 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1990 underlying decl to clear in the allocate_head bitmap.
1991
19922020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1993
1994 * c-objc.h (objc_non_constant_expr_p): New.
1995 * stub-objc.c (objc_non_constant_expr_p): New.
1996
fd2325ea
GA
19972020-11-03 Nathan Sidwell <nathan@acm.org>
1998
1999 * c.opt (MQ,MT): Reword description to be make-agnostic.
2000
88ce3d5f
GA
20012020-11-02 Nathan Sidwell <nathan@acm.org>
2002
2003 * c-opts.c (c_common_post_options): Move var decl to its
2004 initialization point.
2005
20062020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2007
2008 * c-lex.c (c_lex_with_flags): When combining '@' with a
2009 keyword for Objective-C, combine the location ranges too.
2010
20112020-10-30 Qing Zhao <qing.zhao@oracle.com>
2012 H.J.Lu <hjl.tools@gmail.com>
2013
2014 * c-attribs.c (c_common_attribute_table): Add new attribute
2015 zero_call_used_regs.
2016 (handle_zero_call_used_regs_attribute): New function.
2017
e93aae4a
GA
20182020-10-28 Marek Polacek <polacek@redhat.com>
2019
2020 PR c++/97573
2021 * c-opts.c (c_common_post_options): In C++20, turn on
2022 -Wdeprecated-enum-enum-conversion and
2023 -Wdeprecated-enum-float-conversion.
2024 * c.opt (Wdeprecated-enum-enum-conversion,
2025 Wdeprecated-enum-float-conversion): New options.
2026 (Wenum-conversion): Allow for C++ too.
2027
20282020-10-28 Jakub Jelinek <jakub@redhat.com>
2029
2030 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2031 * c-omp.c: Include bitmap.h.
2032 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2033
f19e7c8d
GA
20342020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2035
2036 * c-common.c (__is_nothrow_assignable): New.
2037 (__is_nothrow_constructible): Likewise.
2038 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2039 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2040
efe71fcc
GA
20412020-10-23 Jan Hubicka <hubicka@ucw.cz>
2042
2043 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2044
20452020-10-23 Marek Polacek <polacek@redhat.com>
2046
2047 PR c++/91741
2048 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2049 (c_common_init_ts): Likewise.
2050 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2051 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2052 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2053 (maybe_warn_sizeof_array_div): New function.
2054 * c.opt (Wsizeof-array-div): New option.
2055
20562020-10-23 Martin Sebor <msebor@redhat.com>
2057
2058 PR c/97463
2059 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2060
56ddd5e2
GA
20612020-10-22 Martin Liska <mliska@suse.cz>
2062
2063 PR c/94722
2064 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2065 (handle_stack_protect_attribute): Add error message for a
2066 no_stack_protector function.
2067
20682020-10-22 Martin Liska <mliska@suse.cz>
2069
2070 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2071
20722020-10-22 Jan Hubicka <hubicka@ucw.cz>
2073
2074 * c-gimplify.c: Include tree-nested.h
2075 (c_genericize): Update for new nested function info.
2076
b2698c21
GA
20772020-10-14 Martin Sebor <msebor@redhat.com>
2078
2079 PR c/97413
2080 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2081 bounds in an extra list.
2082
7e9282ae
GA
20832020-10-05 Richard Biener <rguenther@suse.de>
2084 Jakub Jelinek <jakub@redhat.com>
2085
2086 PR c++/97197
2087 * c-pretty-print.c: Include langhooks.h.
2088 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2089 expression.
2090 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2091 unary_expression.
2092 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2093
660bfe61
GA
20942020-09-30 Martin Sebor <msebor@redhat.com>
2095
2096 PR middle-end/97189
2097 * c-attribs.c (append_access_attr): Use the function declaration
2098 location for a warning about an attribute access argument.
2099
93bca37c
GA
21002020-09-29 Marek Polacek <polacek@redhat.com>
2101
2102 PR c++/94695
2103 * c.opt (Wrange-loop-construct): New option.
2104
82b77dee
GA
21052020-09-23 Martin Sebor <msebor@redhat.com>
2106
2107 PR c/97131
2108 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2109
21102020-09-23 Marek Polacek <polacek@redhat.com>
2111
2112 PR c/97125
2113 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2114 after loops and other structured control constructs have been lowered.
2115
521d2711
GA
21162020-09-22 Jakub Jelinek <jakub@redhat.com>
2117
2118 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2119 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2120
44135373
GA
21212020-09-21 Marek Polacek <polacek@redhat.com>
2122
2123 * c.opt (Wctad-maybe-unsupported): New option.
2124
2fe5b7d1
GA
21252020-09-19 Martin Sebor <msebor@redhat.com>
2126
2127 PR c/50584
2128 * c-common.h (warn_parm_array_mismatch): Declare new function.
2129 (has_attribute): Move declaration of an existing function.
2130 (build_attr_access_from_parms): Declare new function.
2131 * c-warn.c (parm_array_as_string): Define new function.
2132 (plus_one): Define new function.
2133 (warn_parm_ptrarray_mismatch): Define new function.
2134 (warn_parm_array_mismatch): Define new function.
2135 (vla_bound_parm_decl): New function.
2136 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2137 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2138 qualifiers here...
2139 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2140 them in brackets here. Also print [static]. Strip extraneous
2141 expressions from VLA bounds.
2142
21432020-09-19 Martin Sebor <msebor@redhat.com>
2144
2145 PR c/50584
2146 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2147 (handle_argspec_attribute): New function.
2148 (get_argument, get_argument_type): New functions.
2149 (append_access_attrs): Add overload. Handle internal attribute
2150 representation in addition to external.
2151 (handle_access_attribute): Handle internal attribute representation
2152 in addition to external.
2153 (build_attr_access_from_parms): New function.
2154
21552020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2156
2157 * c-gimplify.c (genericize_c_loop): Rewrite to match
2158 c_finish_loop in c-typeck.c.
2159
21602020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2161
2162 * c-common.c (c_block_may_fallthrough): New, split from
2163 cxx_block_may_fallthrough in the cp front end.
2164 (c_common_init_ts): Move handling of loop and switch-related
2165 statements here from the cp front end.
2166 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2167 cp front end.
2168 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2169 * c-common.h (c_block_may_fallthru): Declare.
2170 (bc_state_t): Move here from cp front end.
2171 (save_bc_state, restore_bc_state): Declare.
2172 (c_genericize_control_stmt): Declare.
2173 (WHILE_COND, WHILE_BODY): Likewise.
2174 (DO_COND, DO_BODY): Likewise.
2175 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2176 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2177 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2178 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2179 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2180 * c-dump.c (dump_stmt): Copy from cp front end.
2181 (c_dump_tree): Move code to handle structured loop and switch
2182 tree nodes here from cp front end.
2183 * c-gimplify.c: Adjust includes.
2184 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2185 cp front end.
2186 (save_bc_state, restore_bc_state): New functions using old code
2187 from cp front end.
2188 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2189 (genericize_c_loop): Move from cp front end.
2190 (genericize_for_stmt, genericize_while_stmt): Likewise.
2191 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2192 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2193 (genericize_omp_for_stmt): Likewise.
2194 (c_genericize_control_stmt): New function using code split from
2195 cp front end.
2196 (c_genericize_control_r): New.
2197 (c_genericize): Call walk_tree with c_genericize_control_r.
2198 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2199 structured loop and switch tree nodes here from cp front end.
2200
2aad20c0
GA
22012020-09-17 Patrick Palka <ppalka@redhat.com>
2202
2203 PR c/80076
2204 * c-indentation.c (should_warn_for_misleading_indentation): Move
2205 declarations of local variables closer to their first use.
2206 Handle virtual token locations by resolving them to their
2207 respective macro expansion points. If all three tokens are
2208 produced from the same macro expansion, then instead use their
2209 loci within the macro definition.
2210
ecde1b0a
GA
22112020-09-16 Martin Sebor <msebor@redhat.com>
2212
2213 PR c/78666
2214 PR c/96126
2215 * c-attribs.c (validate_attr_args): New function.
2216 (validate_attr_arg): Same.
2217 (handle_section_attribute): Call it. Introduce a local variable.
2218 (handle_alloc_size_attribute): Same.
2219 (handle_alloc_align_attribute): Same.
2220
50a71cd0
GA
22212020-09-14 Jakub Jelinek <jakub@redhat.com>
2222
2223 * c-attribs.c (handle_optimize_attribute): Adjust
2224 cl_optimization_save, cl_optimization_restore and
2225 build_optimization_node callers.
2226 * c-pragma.c (handle_pragma_optimize): Adjust
2227 build_optimization_node caller.
2228 (handle_pragma_push_options): Adjust
2229 build_optimization_node and build_target_option_node callers.
2230 (handle_pragma_pop_options, handle_pragma_reset_options):
2231 Adjust cl_optimization_restore callers.
2232
8f7ea26a
GA
22332020-08-28 Martin Sebor <msebor@redhat.com>
2234
2235 * c.opt (Wstringop-overread): New option.
2236
a6493809
GA
22372020-08-11 Jakub Jelinek <jakub@redhat.com>
2238
2239 PR c/96545
2240 * c-common.c (get_atomic_generic_size): Require that first argument's
2241 type points to a complete type and use tree_fits_uhwi_p instead of
2242 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2243
48cc2e46
GA
22442020-07-31 Martin Sebor <msebor@redhat.com>
2245
2246 PR c++/96003
2247 * c-common.c (check_function_arguments_recurse): Return early when
2248 no-warning bit is set.
2249
22502020-07-31 Richard Biener <rguenther@suse.de>
2251
2252 PR debug/96383
2253 * c-common.h (c_common_finalize_early_debug): Declare.
2254 * c-common.c: Include debug.h.
2255 (c_common_finalize_early_debug): finalize_early_debug langhook
2256 implementation generating debug for extern declarations.
2257
e71dab87
GA
22582020-07-27 Nathan Sidwell <nathan@acm.org>
2259
2260 * c-common.c (try_to_locate_new_include_insertion_point): Use
2261 strcmp, not pointer equality.
2262
ae2e0bc1
GA
22632020-07-25 Martin Sebor <msebor@redhat.com>
2264
2265 PR c++/96310
2266 * c-common.c (check_nonnull_arg): Print note only when warning was
2267 issued.
2268
3ea9abca
GA
22692020-07-22 Tobias Burnus <tobias@codesourcery.com>
2270
2271 * c-omp.c (c_finish_omp_critical): Check for no name but
2272 nonzero hint provided.
2273
0933f508
GA
22742020-07-20 Jason Merrill <jason@redhat.com>
2275
2276 * c-cppbuiltin.c (c_cpp_builtins): Update
2277 __cpp_nontype_template_args for C++20.
2278
22792020-07-20 Martin Sebor <msebor@redhat.com>
2280
2281 PR c/96249
2282 * c.opt: Remove stray text.
2283
8ca07a30
GA
22842020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2285
2286 PR other/86904
2287 * c-indentation.c (should_warn_for_misleading_indentation): Get
2288 global tabstop from the new source.
2289 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2290 is now a common option.
2291 * c.opt: Likewise.
2292
a82c4c4c 22932020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2294
2295 * c.opt (Wscalar-storage-order): Add explicit variable.
2296
f60ee68d
GA
22972020-07-07 Nathan Sidwell <nathan@acm.org>
2298
2299 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2300 cpp_read_main_file.
2301 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2302 maps. Force token position to line_table's highest line.
2303 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2304 (cb_define): Always increment source line.
2305
4077d74c
GA
23062020-07-06 Martin Sebor <msebor@redhat.com>
2307
2308 PR c++/95984
2309 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2310 to stub lambda objects with null this pointer.
2311 (check_nonnull_arg): Handle C++ nullptr.
2312
b5f24739
GA
23132020-07-02 Jason Merrill <jason@redhat.com>
2314 Jakub Jelinek <jakub@redhat.com>
2315
2316 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2317
46fbb6c6
GA
23182020-06-30 Jakub Jelinek <jakub@redhat.com>
2319
2320 PR c++/95963
2321 * c-common.c (check_function_arguments_recurse): Don't crash on
2322 calls to internal functions.
2323
69273534
GA
23242020-06-28 Martin Sebor <msebor@redhat.com>
2325
2326 PR c++/86568
2327 * c-common.c (struct nonnull_arg_ctx): Add members.
2328 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2329 C++ member functions specially. Consider the this pointer implicitly
2330 nonnull.
2331 (check_nonnull_arg): Use location of argument when available.
2332 (check_function_arguments): Use nonnull_arg_ctx as argument.
2333
9a33c41f
GA
23342020-06-27 Jakub Jelinek <jakub@redhat.com>
2335
2336 PR middle-end/95903
2337 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2338 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2339 smaller precision intop operands separately.
2340
c9c05f73
GA
23412020-06-26 Marek Polacek <polacek@redhat.com>
2342
2343 * c-opts.c (c_common_init_options): Default to gnu++17.
2344
aff95ee7
GA
23452020-06-17 Jonathan Wakely <jwakely@redhat.com>
2346
bd0a89dc 2347 PR c/95378
aff95ee7
GA
2348 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2349 pointer arguments.
2350
56638b9b
GA
23512020-06-16 Jakub Jelinek <jakub@redhat.com>
2352
2353 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2354 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2355 idx members.
2356 (c_omp_is_loop_iterator): New function.
2357 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2358 if outer loop iterator is present. Perform duplicate checking through
2359 hash_set in the function rather than expecting caller to do that.
2360 Pass NULL instead of d->ppset to walk_tree_1.
2361 (c_omp_check_nonrect_loop_iv): New function.
2362 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2363 non-rectangular loop forms, diagnose multiple associated loops with
2364 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2365 (c_omp_check_loop_iv_exprs): Likewise.
2366
ec6ffbb9
GA
23672020-06-10 Martin Liska <mliska@suse.cz>
2368
2369 PR tree-optimization/92860
2370 * c-attribs.c (handle_optimize_attribute):
2371 Save global options and compare it after parsing of function
2372 attribute.
2373 * c-pragma.c (opt_stack::saved_global_options): New field.
2374 (handle_pragma_push_options): Save global_options.
2375 (handle_pragma_pop_options): Compare them after pop.
2376
b952c2cf
GA
23772020-06-09 Jakub Jelinek <jakub@redhat.com>
2378
2379 PR c/95580
2380 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2381 case when MEM_REF's first argument has type pointer to incomplete type.
2382
1a59f3db
GA
23832020-06-05 Jason Merrill <jason@redhat.com>
2384
2385 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2386 operand to POINTER_PLUS_EXPR.
2387
3add3425
GA
23882020-06-04 Martin Sebor <msebor@redhat.com>
2389
2390 PR middle-end/10138
2391 PR middle-end/95136
2392 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2393 (handle_access_attribute): Same.
2394
9a5b7438
GA
23952020-06-03 Mark Wielaard <mark@klomp.org>
2396
2397 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2398 New function.
2399 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2400 New function declaration.
2401
24022020-06-03 Mark Wielaard <mark@klomp.org>
2403
2404 * known-headers.cc (get_string_macro_hint): New function.
2405 (get_stdlib_header_for_name): Use get_string_macro_hint.
2406 (get_c_stdlib_header_for_string_macro_name): New function.
2407 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2408 New function declaration.
2409
24102020-06-03 Tobias Burnus <tobias@codesourcery.com>
2411
2412 * c-common.h (c_omp_predetermined_mapping): Declare.
2413 * c-omp.c (c_omp_predetermined_mapping): New.
2414
af114c38
MW
24152020-05-22 Mark Wielaard <mark@klomp.org>
2416
2417 * known-headers.cc (get_stdlib_header_for_name): Add a new
2418 stdlib_hint array for stdbool and stdint.
2419
45c50b6a
MW
24202020-05-22 Mark Wielaard <mark@klomp.org>
2421
2422 * known-headers.cc (get_stdlib_header_for_name): Return
2423 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2424 flag_isoc99.
2425
c22027a0
NS
24262020-05-20 Nathan Sidwell <nathan@acm.org>
2427
38a4db21
NS
2428 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2429
c22027a0
NS
2430 * c-common.c (try_to_locate_new_include_insertion_point): Use
2431 strcmp to compare filenames.
2432 * c-lex.c (init_c_lex): Move declaration to initialization.
2433 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2434 deferred count loop.
2435
29f0e90d
JM
24362020-05-15 Jason Merrill <jason@redhat.com>
2437
2438 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2439
b04445d4
JM
24402020-05-13 Jason Merrill <jason@redhat.com>
2441
2442 * c.opt (std=c++20): Make c++2a the alias.
2443 (std=gnu++20): Likewise.
2444 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2445 * c-opts.c: Adjust.
2446 * c-cppbuiltin.c: Adjust.
2447 * c-ubsan.c: Adjust.
2448 * c-warn.c: Adjust.
2449
11dd3be5
EB
24502020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2451
2452 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2453
b224c376
NS
24542020-05-08 Nathan Sidwell <nathan@acm.org>
2455
2456 Reimplement directives only processing.
2457 * c-ppoutput.c (token_streamer): Ne.
2458 (directives_only_cb): New. Swallow ...
2459 (print_lines_directives_only): ... this.
2460 (scan_translation_unit_directives_only): Reimplment using the
2461 published interface.
2462
f1d94677
MP
24632020-05-07 Marek Polacek <polacek@redhat.com>
2464
2465 * c-format.c (badwords): Add "nonstatic".
2466
9b95bb52
JJ
2467202-05-07 Jakub Jelinek <jakub@redhat.com>
2468
2469 PR c/94968
2470 * c-common.c (speculation_safe_value_resolve_params): Return false if
2471 error_operand_p (val2).
2472 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2473 Remove extraneous semicolon.
2474
530b4409 24752020-05-06 qing zhao <qing.zhao@oracle.com>
2476
2477 PR c/94230
2478 * c-indentation.c (get_visual_column): Add a hint to use the new
2479 -flarge-source-files option.
2480
b776bdca
SSF
24812020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2482
2483 * c-attribs.c (handle_vector_size_attribute): Add attribute
2484 nonnull for argument args in order to silence warning of
2485 uninitialized variable usage. Since this is local to the
2486 compilation unit and thus cannot be checked at call sides by the
2487 compiler, added an assert statement in order to verify this.
2488
6607bdd9
L
24892020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2490
2491 PR target/93492
2492 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2493 value to USHRT_MAX (65535).
2494
691eeb65
JJ
24952020-04-29 Jakub Jelinek <jakub@redhat.com>
2496
2497 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2498
26d76be7
JJ
24992020-04-27 Jakub Jelinek <jakub@redhat.com>
2500
2501 PR c/94755
2502 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2503 fncode == BUILT_IN_NONE before initialization of first_param.
2504
7291b2ed
MP
25052020-04-23 Marek Polacek <polacek@redhat.com>
2506
2507 PR c++/94733
2508 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2509 TREE_PURPOSE.
2510
58a29af8
PP
25112020-04-14 Patrick Palka <ppalka@redhat.com>
2512
2513 PR c++/85278
2514 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2515 ampersand if it's an rvalue reference type.
2516
09f04139
MS
25172020-04-13 Martin Sebor <msebor@redhat.com>
2518
2519 PR c/92326
2520 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2521 printing array bound for flexible array members.
2522
ee26baf4
IS
25232020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2524
2525 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2526 define, per n4861.
2527
75efe9cb
RB
25282020-04-02 Richard Biener <rguenther@suse.de>
2529
2530 PR c/94392
2531 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2532 for -O2 and C++11 or newer.
2533
75defde9
PP
25342020-03-28 Patrick Palka <ppalka@redhat.com>
2535
2536 * c.opt: Add -fconcepts-diagnostics-depth.
2537
52f24a9e
MS
25382020-03-27 Martin Sebor <msebor@redhat.com>
2539
2540 PR c++/94346
2541 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2542 to decl_attributes. Make handling of different kinds of entities
2543 more robust.
2544
ccacf77b
MS
25452020-03-27 Martin Sebor <msebor@redhat.com>
2546
2547 PR c++/94098
2548 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2549 here.
2550
ca6c7225
JJ
25512020-03-23 Jakub Jelinek <jakub@redhat.com>
2552
2553 PR c++/91993
2554 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2555 result being COMPOUND_EXPRs, skip to ultimate rhs.
2556
1aa22b19
RS
25572020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2558
2559 PR middle-end/94072
2560 * c-common.c (c_common_type_for_mode): Before using a registered
2561 built-in type, check that the vectorness of the type matches
2562 the vectorness of the mode.
2563
700d4cb0
JJ
25642020-03-17 Jakub Jelinek <jakub@redhat.com>
2565
2566 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2567 issue in a diagnostic message.
2568
b408e010
LH
25692020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2570
2571 * c.opt: Avoid redundancy in the help text.
2572
e78e50d5
MP
25732020-03-02 Marek Polacek <polacek@redhat.com>
2574
2575 PR c++/93958 - add missing -std=gnu++20.
2576 * c.opt: Add -std=gnu++20.
2577
649e1741
MS
25782020-03-01 Martin Sebor <msebor@redhat.com>
2579
2580 PR c++/92721
2581 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2582 (handle_access_attribute): Same.
2583
7b60f3ba
JJ
25842020-02-25 Jakub Jelinek <jakub@redhat.com>
2585
2586 PR c/93858
2587 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2588 "did you mean" hint in diagnostics.
2589
fb260504
JM
25902020-02-15 Jason Merrill <jason@redhat.com>
2591
2592 * c.opt: Add -std=c++20.
2593
1d757b09
EB
25942020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2595
2596 * c-ada-spec.c: Include bitmap.h.
2597 (dump_ada_double_name): Rename into...
2598 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2599 (dump_ada_array_type): Adjust to above renaming. Robustify.
2600 (dump_nested_types_1): New function copied from... Add dumped_types
2601 parameter and pass it down to dump_nested_type.
2602 (dump_nested_types): ...this. Remove parent parameter. Just call
2603 dump_nested_types_1 on an automatic bitmap.
2604 (dump_nested_type): Add dumped_types parameter.
2605 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2606 Adjust recursive calls and adjust to above renaming.
2607 (dump_ada_declaration): Adjust call to dump_nested_types.
2608 Tidy up and adjust to above renaming.
2609 (dump_ada_specs): Initialize and release bitmap obstack.
2610
0cc575e4
MS
26112020-02-10 Martin Sebor <msebor@redhat.com>
2612
2613 PR c/93640
2614 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2615
a59aa302
JJ
26162020-02-10 Jakub Jelinek <jakub@redhat.com>
2617
2618 PR other/93641
2619 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2620 Remove useless extra test.
2621
e464fc90
TB
26222020-02-03 Julian Brown <julian@codesourcery.com>
2623 Tobias Burnus <tobias@codesourcery.com>
2624
2625 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2626
e3b6c052
JM
26272020-01-29 Jason Merrill <jason@redhat.com>
2628
2629 PR c++/89357
2630 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2631
6d00f052
JM
26322020-01-23 Jason Merrill <jason@redhat.com>
2633
2634 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2635
8a990ffa
MS
26362020-01-23 Martin Sebor <msebor@redhat.com>
2637
2638 PR c/84919
2639 * c-common.c (check_function_arguments): Avoid overlap checking
2640 of sprintf functions.
2641
55b7df8b
JM
26422020-01-22 Jason Merrill <jason@redhat.com>
2643
2644 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2645 PR c++/40752
2646 * c-warn.c (conversion_warning): Check operands only after checking
2647 the whole expression. Don't check second operand of + for sign.
2648
c77074d0
JM
26492020-01-21 Jason Merrill <jason@redhat.com>
2650 Manuel López-Ibáñez <manu@gcc.gnu.org>
2651
2652 PR c++/40752 - useless -Wconversion with short +=.
2653 * c.opt (-Warith-conversion): New.
2654 * c-warn.c (conversion_warning): Recurse for operands of
2655 operators. Only warn about the whole expression with
2656 -Warith-conversion.
2657
731dbfc3
JM
26582020-01-21 Jason Merrill <jason@redhat.com>
2659
2660 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2661 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2662
ad1a3914
NS
26632020-01-20 Nathan Sidwell <nathan@acm.org>
2664
2665 PR preprocessor/80005
2666 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2667
49789fd0
IS
26682020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2669
2670 * c-common.c (co_await, co_yield, co_return): New.
2671 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2672 RID_CO_RETURN): New enumeration values.
2673 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2674 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2675 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2676 * c.opt (fcoroutines): New command-line switch.
2677
4bc1899b
DM
26782020-01-10 David Malcolm <dmalcolm@redhat.com>
2679
2680 * c-format.c (local_event_ptr_node): New.
2681 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2682 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2683 * c-format.h (T_EVENT_PTR): New define.
2684
f25e33fa
MS
26852020-01-10 Martin Sebor <msebor@redhat.com>
2686
2687 PR c/93132
2688 * c-attribs.c (append_access_attrs): Validate against the translated
2689 access string rather than the human-readable representation.
2690
8d9254fc
JJ
26912020-01-01 Jakub Jelinek <jakub@redhat.com>
2692
2693 Update copyright years.
2694
39292e25
EB
26952019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2696
2697 * c-ada-spec.h (decl_sloc): Delete.
2698 * c-ada-spec.c (decl_sloc): Make static.
2699
519d7496
JB
27002019-12-19 Julian Brown <julian@codesourcery.com>
2701
2702 * c-common.h (c_omp_map_clause_name): Add prototype.
2703 * c-omp.c (c_omp_map_clause_name): New function.
2704 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2705 PRAGMA_OACC_CLAUSE_DETACH.
2706
a6163563
JB
27072019-12-19 Julian Brown <julian@codesourcery.com>
2708 Maciej W. Rozycki <macro@codesourcery.com>
2709 Tobias Burnus <tobias@codesourcery.com>
2710 Thomas Schwinge <thomas@codesourcery.com>
2711
2712 * c-pragma.h (pragma_omp_clause): Add
2713 PRAGMA_OACC_CLAUSE_NO_CREATE.
2714
e8f1ade2
MS
27152019-12-17 Martin Sebor <msebor@redhat.com>
2716
2717 PR c++/61339
2718 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2719
368877a1
DM
27202019-12-11 David Malcolm <dmalcolm@redhat.com>
2721
2722 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2723 implementation.
2724 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2725
d68f5d45
DM
27262019-12-09 David Malcolm <dmalcolm@redhat.com>
2727
2728 * c-format.c (range_label_for_format_type_mismatch::get_text):
2729 Replace label_text ctor called with true with label_text::take.
2730
d3e28653
DM
27312019-12-09 David Malcolm <dmalcolm@redhat.com>
2732
2733 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2734 initial newline from expected outputs.
2735 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2736 call to diagnostic_show_locus.
2737
abd6d8cc
JJ
27382019-12-06 Jakub Jelinek <jakub@redhat.com>
2739
2740 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2741 now.
2742
7906797e
MP
27432019-12-05 Marek Polacek <polacek@redhat.com>
2744 Jakub Jelinek <jakub@redhat.com>
2745
2746 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2747 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2748
5c04da88
MP
27492019-12-05 Marek Polacek <polacek@redhat.com>
2750
2751 PR c++/92271 - make __is_same alias for __is_same_as.
2752 * c-common.c: Add __is_same, an alias for __is_same_as.
2753
43aae289
MP
27542019-12-03 Marek Polacek <polacek@redhat.com>
2755
2756 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2757 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2758 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2759
d7ddfbcb
JH
27602019-11-30 Jan Hubicka <hubicka@ucw.cz>
2761
2762 * c-attribs.c (handle_symver_attribute): New function
2763 (c_common_attributes): Add symver.
2764
65ef05d0
RS
27652019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2766
2767 * c-common.c (pointer_int_sum): Use verify_type_context to check
2768 whether the target allows pointer arithmetic for the types involved.
2769 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2770 to check whether the target allows sizeof and alignof operations
2771 for the types involved.
2772
1a291106
JM
27732019-11-27 Jason Merrill <jason@redhat.com>
2774
2775 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2776
05d6cb1a
JJ
27772019-11-26 Jakub Jelinek <jakub@redhat.com>
2778
2779 PR c++/61414
2780 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2781 ENUMERAL_TYPEs.
2782
5b8d9367
JM
27832019-11-25 Joseph Myers <joseph@codesourcery.com>
2784
2785 PR c/91985
2786 * c-common.c (c_common_type_for_mode): Handle decimal
2787 floating-point types being NULL_TREE.
2788 * c-format.c (get_format_for_type_1): Handle specified types being
2789 NULL_TREE.
2790 * c-lex.c (interpret_float): Give an error for decimal
2791 floating-point constants when decimal floating-point not
2792 supported.
2793
1fbf51cb
JJ
27942019-11-23 Jakub Jelinek <jakub@redhat.com>
2795
2796 PR middle-end/83859
2797 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2798 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2799 group warning with inform together.
2800 (handle_access_attribute): Formatting fix.
2801
761df906
JJ
28022019-11-22 Jakub Jelinek <jakub@redhat.com>
2803
bdaf8be1
JJ
2804 PR c/90677
2805 * c-common.h (identifier_global_tag): Declare.
2806 * c-format.c (get_pointer_to_named_type): Renamed to ...
2807 (get_named_type): ... this. Use identifier_global_tag instead of
2808 identifier_global_value, handle the return value being a TYPE_P.
2809 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2810 to call get_named_type instead. Formatting fixes.
2811
c2ecce6d 2812 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2813 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2814 and __cpp_generic_lambdas for -std=c++2a. Define
2815 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2816 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2817 __cpp_concepts for -std=c++2a.
2818
54aa6b58
MS
28192019-11-22 Martin Sebor <msebor@redhat.com>
2820
2821 PR middle-end/83859
2822 * c-attribs.c (handle_access_attribute): New function.
2823 (c_common_attribute_table): Add new attribute.
2824 (get_argument_type): New function.
2825 (append_access_attrs): New function.
2826 (get_nonnull_operand): Rename...
2827 (get_attribute_operand): ...to this.
2828 * c-common.c (get_nonnull_operand): Rename...
2829 (get_attribute_operand): ...to this.
2830
6c80b1b5
JM
28312019-11-21 Joseph Myers <joseph@codesourcery.com>
2832
2833 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2834 of warning.
2835
192961ff
JM
28362019-11-19 Joseph Myers <joseph@codesourcery.com>
2837
2838 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2839 warning for standard attributes mixed with fallthrough attributes.
2840
f8aea5e3
JM
28412019-11-15 Joseph Myers <joseph@codesourcery.com>
2842
2843 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2844 * c-common.h (handle_fallthrough_attribute): Declare.
2845
2cc94aa8
JM
28462019-11-15 Joseph Myers <joseph@codesourcery.com>
2847
2848 * c-attribs.c (handle_deprecated_attribute): Remove static.
2849 * c-common.h (handle_deprecated_attribute): Declare.
2850
7c5890cc
JM
28512019-11-14 Joseph Myers <joseph@codesourcery.com>
2852
2853 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2854 char for C.
2855
b2417b59
JJ
28562019-11-14 Jakub Jelinek <jakub@redhat.com>
2857
d0ec7c93
JJ
2858 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2859 valid vendors.
2860
b2417b59
JJ
2861 * c-omp.c (c_omp_check_context_selector): Handle name lists
2862 containing string literals. Don't diagnose atomic_default_mem_order
2863 with multiple props.
2864
00be2a5f
JM
28652019-11-13 Joseph Myers <joseph@codesourcery.com>
2866
2867 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2868 NORM_MAX constants. Update call to get_max_float.
2869 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2870 constants.
2871
2dbad62d
EB
28722019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2873
2874 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2875 (dump_forward_type): Do not generate a declaration for function types.
2876 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2877 of the component type if it is declared in another file.
2878
6ed76044
ML
28792019-11-12 Martin Liska <mliska@suse.cz>
2880
2881 * c-opts.c (c_common_post_options):
2882 Use SET_OPTION_IF_UNSET.
2883
62aee289
MR
28842019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2885 Frederik Harwath <frederik@codesourcery.com>
2886
2887 gcc/c-family/
2888 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2889 constant.
2890 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2891
f486280c
RS
28922019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2893
2894 * c-common.h (gnu_vector_type_p): New function.
2895 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2896 vectors to satisfy gnu_vector_type_p.
2897 (c_build_vec_convert): Likewise __builtin_convertvector.
2898 (convert_vector_to_array_for_subscript): Likewise when applying
2899 implicit vector to array conversion.
2900 (scalar_to_vector): Likewise when converting vector-scalar
2901 operations to vector-vector operations.
2902
017c6491
JM
29032019-11-08 Joseph Myers <joseph@codesourcery.com>
2904
2905 * c.opt (Wold-style-definition): Initialize to -1.
2906 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2907 to flag_isoc2x if not set explicitly.
2908
c01bd174
JM
29092019-11-07 Joseph Myers <joseph@codesourcery.com>
2910
2911 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2912
0df65305
JM
29132019-11-05 Jason Merrill <jason@redhat.com>
2914
2915 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2916 -fconcepts.
2917
e0c866dd
KK
29182019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2919
2920 * c-opts.c (c_common_post_options): Update
2921 latest_abi_version.
2922
f968ef9b
JJ
29232019-11-02 Jakub Jelinek <jakub@redhat.com>
2924
d0c464d2
JJ
2925 * c-common.h (c_omp_get_context_selector): Remove.
2926 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2927 and renamed to omp_get_context_selector.
2928
917dd789
JJ
2929 * c-omp.c (c_omp_mark_declare_variant): Use
2930 omp_context_selector_set_compare.
2931
f968ef9b
JJ
2932 PR c++/88335 - Implement P1073R3: Immediate functions
2933 * c-common.h (enum rid): Add RID_CONSTEVAL.
2934 * c-common.c (c_common_reswords): Add consteval.
2935
5f6705b7
JJ
29362019-11-01 Martin Sebor <msebor@redhat.com>
2937
2938 PR middle-end/91679
2939 PR middle-end/91647
2940 PR middle-end/91463
2941 PR middle-end/92312
2942 * c-pretty-print.c (direct_abstract_declarator): Print
2943 bound in zero-length arrays.
2944 * c.opt (-Wzero-length-bounds): New option.
2945
43f1814c
NS
29462019-10-30 Nathan Sidwell <nathan@acm.org>
2947
2948 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2949 macros.
2950
ad1539d5
MS
29512019-10-28 Martin Sebor <msebor@redhat.com>
2952
2953 PR c/66970
2954 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2955 even when only preprocessing.
2956 * c-common.h (names_builtin_p): Declare new function.
2957 * c-lex.c (init_c_lex): Set has_builtin.
2958 (c_common_has_builtin): Define a new function.
2959 * c-ppoutput.c (init_pp_output): Set has_builtin.
2960
135df52c
JJ
29612019-10-24 Jakub Jelinek <jakub@redhat.com>
2962
2963 * c-common.h (c_omp_context_selector_matches): Remove.
2964 * c-omp.c (c_omp_context_selector_matches): Remove.
2965 * c-attribs.c (c_common_attribute_table): Add
2966 "omp declare target {host,nohost,block}" attributes.
2967
8ad0c477
JM
29682019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2969
2970 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2971
56898e43
RS
29722019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2973
2974 * c-common.h (user_facing_original_type_p): Declare.
2975 * c-common.c: Include c-spellcheck.h.
2976 (user_facing_original_type_p): New function.
2977
20de9568
JJ
29782019-10-12 Jakub Jelinek <jakub@redhat.com>
2979
2980 * c-common.h (c_omp_mark_declare_variant,
2981 c_omp_context_selector_matches): Declare.
2982 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2983 and hsa-common.h.
2984 (c_omp_get_context_selector): Support second argument NULL.
2985 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2986 functions.
2987 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2988 attribute, add "omp declare variant base" and
2989 "omp declare variant variant" attributes.
2990
175a85b2
JM
29912019-10-11 Joseph Myers <joseph@codesourcery.com>
2992
2993 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2994 CppReason(CPP_W_C11_C2X_COMPAT).
2995
fe2bc27c
JM
29962019-10-11 Joseph Myers <joseph@codesourcery.com>
2997
2998 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2999 _Decimal64 and _Decimal128.
3000
27dfdc0f
JM
30012019-10-10 Joseph Myers <joseph@codesourcery.com>
3002
3003 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3004 types if DFP not supported.
3005
94e7f906
JJ
30062019-10-10 Jakub Jelinek <jakub@redhat.com>
3007
3008 * c-common.h (c_omp_check_context_selector,
3009 c_omp_get_context_selector): Declare.
3010 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3011 in diagnostic message.
3012 (c_omp_check_context_selector, c_omp_get_context_selector): New
3013 functions.
3014 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3015 attribute.
3016 (handle_omp_declare_variant_attribute): New function.
3017
a7160771
MS
30182019-10-09 Martin Sebor <msebor@redhat.com>
3019
3020 PR tree-optimization/90879
3021 * c.opt (-Wstring-compare): New option.
3022
cb57504a
JM
30232019-10-08 Andrew Sutton <asutton@lock3software.com>
3024 Jason Merrill <jason@redhat.com>
3025
3026 Update the concepts implementation to conform to the C++20
3027 specification, improve compile times, and generally clean up
3028 the implementation.
3029
3030 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3031 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3032 * c.opt: Add -Wconcepts-ts.
3033 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3034 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3035 (set_std_cxx2a): Enable concepts by default.
3036
fbb2a6dc
JM
30372019-10-08 Joseph Myers <joseph@codesourcery.com>
3038
3039 * c-opts.c (c_common_post_options): Set
3040 -fno-fp-int-builtin-inexact for C2X.
3041
8e007055
JJ
30422019-10-05 Jakub Jelinek <jakub@redhat.com>
3043
3044 PR c++/91369 - Implement P0784R7: constexpr new
3045 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3046 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3047
843f104d
JM
30482019-10-04 Joseph Myers <joseph@codesourcery.com>
3049
3050 PR c/82752
3051 * c-format.c (C_STD_VER): Handle C2x.
3052 (C_STD_NAME): Likewise.
3053 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3054 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3055 modifier allowed and 'p' flag.
3056 * c-format.h (enum format_std_version): Add STD_C2X.
3057 (struct format_char_info): Mention 'p' in comment on flags2.
3058
e9c9a142
DM
30592019-10-01 David Malcolm <dmalcolm@redhat.com>
3060
3061 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3062 calling diagnostic_show_locus, rather than destroying it afterwards.
3063
7552c36a
JJ
30642019-10-01 Jakub Jelinek <jakub@redhat.com>
3065
3066 PR c++/91925
3067 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3068 with NULL DECL_FIELD_OFFSET.
3069
8209db25
RS
30702019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3071
3072 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3073 has a type name, use it in preference to the __vector syntax.
3074
9343bf99
RS
30752019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3076
3077 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3078 two spaces between a comma and "...".
3079
59bc434a
JJ
30802019-09-27 Jakub Jelinek <jakub@redhat.com>
3081
3082 PR c++/88203
3083 * c-common.h (c_omp_predefined_variable): Declare.
3084 * c-omp.c (c_omp_predefined_variable): New function.
3085 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3086 for predefined variables.
3087
c6447c20
RS
30882019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3089
3090 * c-common.h (build_function_call_vec): Take the original
3091 function decl as an optional final parameter.
3092 (check_builtin_function_arguments): Take the original function decl.
3093 * c-common.c (check_builtin_function_arguments): Likewise.
3094 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3095 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3096
c4438114
JM
30972019-09-15 Jason Merrill <jason@redhat.com>
3098
3099 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3100 fold_for_warn in "|| mask" warning.
3101
68a57628
ML
31022019-09-10 Martin Liska <mliska@suse.cz>
3103
3104 * c.opt: Use newly added WarnRemoved.
3105
f48ef52e
ML
31062019-09-09 Martin Liska <mliska@suse.cz>
3107
3108 * c.opt: Update comment of removed
3109 options that are preserved only for backward
3110 compatibility.
3111
67f6e649
ML
31122019-09-06 Martin Liska <mliska@suse.cz>
3113
3114 PR c++/91125
3115 * c-common.c: Remove definition of flag_use_repository.
3116 * c-common.h: Likewise.
3117 * c-opts.c (c_common_handle_option):
3118 Do not handle OPT_frepo option.
3119 * c.opt: Mark the option with Deprecated.
3120
db9d2274
MP
31212019-09-04 Marek Polacek <polacek@redhat.com>
3122
3123 * c.opt (fdeduce-init-list): Ignored.
3124
68e2c199
PK
31252019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3126
3127 PR c/78736
3128 * c.opt (Wenum-conversion): New option.
3129
7a4418a5
JL
31302019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3131
3132 * c-attribs.c (handle_section_attribute): Call the
3133 handle_generic_attribute target hook after performing target
3134 independent processing.
3135 (handle_noinit_attribute): Likewise.
3136
5f76ab15
ILT
31372019-09-03 Ian Lance Taylor <iant@golang.org>
3138
3139 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3140 when using -fgo-dump-spec.
3141
ae0d3f6a
ML
31422019-09-02 Martin Liska <mliska@suse.cz>
3143
3144 PR c++/91155
3145 * c-common.c (fname_as_string): Use cxx_printable_name for
3146 __PRETTY_FUNCTION__ same as was used before r265711.
3147
8a902edb
MP
31482019-08-28 Marek Polacek <polacek@redhat.com>
3149
3150 Implement P1152R4: Deprecating some uses of volatile.
3151 PR c++/91361
3152 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3153 default for C++2a, unless -Wno-deprecated.
3154 * c.opt (Wvolatile): New warning.
3155
4742dbe7
MP
31562019-08-28 Marek Polacek <polacek@redhat.com>
3157
3158 PR c++/91360 - Implement C++20 P1143R2: constinit.
3159 * c-common.c (c_common_reswords): Add constinit and __constinit.
3160 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3161 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3162 RID_LAST_CXX20.
3163 (D_CXX20): Define.
3164 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3165 * c-format.c (cxx_keywords): Add "constinit".
3166 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3167
6a074892
JJ
31682019-08-27 Jakub Jelinek <jakub@redhat.com>
3169
3170 PR c++/91415
3171 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3172 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3173 like COMPOUND_EXPR rather than normal expression.
3174
22f8849d
IS
31752019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3176
3177 PR pch/61250
3178 * c-lex.c (c_lex_with_flags): Don't call
3179 c_common_no_more_pch () from here.
3180
df375b03
JJ
31812019-08-23 Jakub Jelinek <jakub@redhat.com>
3182
3183 PR middle-end/91283
3184 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3185 instead of flag_excess_precision_cmdline.
3186 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3187 * c-opts.c (c_common_post_options): Likewise.
3188
14b7950f
MS
31892019-08-22 Martin Sebor <msebor@redhat.com>
3190
3191 PR middle-end/91490
3192 * c-common.c (braced_list_to_string): Add argument and overload.
3193 Handle flexible length arrays and unions.
3194
8bb2ee59
EB
31952019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3196
3197 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3198 function declarations where arguments are missing. Rename variables.
3199
21c1e205
RB
32002019-08-15 Richard Biener <rguenther@suse.de>
3201
3202 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3203 enabled, define __SIZETYPE__.
3204
f0033821
CL
32052019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3206
3207 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3208 exclusion with "section" attribute.
3209 (attr_noinit_exclusions): New table.
3210 (handle_noinit_attribute): New function.
3211
4d732405
RS
32122019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3213
3214 PR middle-end/91421
3215 * c-common.c (resolve_overloaded_builtin): Use
3216 copy_decl_built_in_function.
3217
51ad8481
MS
32182019-08-13 Martin Sebor <msebor@redhat.com>
3219
3220 PR c/80619
3221 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3222 (asm_fprintf_length_spec): Same.
3223 * c-format.h (format_lengths): Add FMT_LEN_w.
3224
77eb117f
JJ
32252019-08-10 Jakub Jelinek <jakub@redhat.com>
3226
3227 * c-pragma.h (enum pragma_omp_clause): Add
3228 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3229
398e3feb
JJ
32302019-08-07 Jakub Jelinek <jakub@redhat.com>
3231
3232 * c-pragma.h (enum pragma_omp_clause): Add
3233 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3234 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3235 enumeration value.
3236
ab574db6
MP
32372019-08-05 Marek Polacek <polacek@redhat.com>
3238
3239 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3240 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3241 default for C++2a, unless -Wno-deprecated.
3242 * c.opt (Wcomma-subscript): New warning.
3243
554a530f
JJ
32442019-07-20 Jakub Jelinek <jakub@redhat.com>
3245
3246 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3247 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3248 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3249 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3250 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3251 constructs with the loop construct.
3252
1a888209
JJ
32532019-07-13 Jakub Jelinek <jakub@redhat.com>
3254
3255 PR c/91149
3256 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3257 OMP_CLAUSE_REDUCTION_TASK handling.
3258
1fdd6f04
JJ
32592019-07-12 Jakub Jelinek <jakub@redhat.com>
3260
3261 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3262 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3263
99b1c316
MS
32642019-07-09 Martin Sebor <msebor@redhat.com>
3265
3266 PR c++/61339
1fdd6f04 3267 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3268 and others to class.
3269 * c-pretty-print.h: Same.
3270
6c1dae73
MS
32712019-07-09 Martin Sebor <msebor@redhat.com>
3272
3273 PR c++/61339
3274 * c-format.c (check_argument_type): Change class-key from class to
3275 struct and vice versa to match convention and avoid -Wclass-is-pod
3276 and -Wstruct-no-pod.
3277 * c-pretty-print.h: Same.
3278
8ba6ea87
ML
32792019-07-03 Martin Liska <mliska@suse.cz>
3280
3281 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3282 dead assignemts.
3283
83eb9522
JJ
32842019-07-03 Jakub Jelinek <jakub@redhat.com>
3285
3286 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3287 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3288 with OMP_PARALLEL.
3289
1c6ffbab
QZ
32902019-07-02 qing zhao <qing.zhao@oracle.com>
3291
3292 PR preprocessor/90581
3293 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3294 * c.opt: Add new option -fmax-include-depth.
3295
7ffc7de5
JM
32962019-06-26 Jason Merrill <jason@redhat.com>
3297
3298 PR c++/55442 - memory-hog with highly recursive constexpr.
3299 * c.opt (fconstexpr-loop-limit): New.
3300
361af3e4
JJ
33012019-06-25 Jakub Jelinek <jakub@redhat.com>
3302
3303 PR sanitizer/90954
3304 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3305 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3306
ab20d992
JJ
33072019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3308
3309 * c-common.c (c_common_nodes_and_builtins): Define
3310 alternate "__intN__" name for "__intN" types.
3311
f4af4019
JH
33122019-06-24 Jan Hubicka <jh@suse.cz>
3313
3314 * c-common.c (braced_lists_to_strings): Check that
3315 type is array or integer prior checking string flag.
3316
da9e9b57
MB
33172019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3318
3319 PR c++/90875 - added -Wswitch-outside-range option
3320 * c.opt (Wswitch-outside-range): Added new option.
3321 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3322
3f3d6a6f
MP
33232019-06-21 Marek Polacek <polacek@redhat.com>
3324
3325 PR c++/90953 - ICE with -Wmissing-format-attribute.
3326 * c-common.c (check_function_arguments_recurse): Use
3327 get_attribute_name.
3328 (check_missing_format_attribute): Likewise.
3329
1bf32c11
MP
33302019-06-19 Marek Polacek <polacek@redhat.com>
3331
3332 PR c++/60364 - noreturn after first decl not diagnosed.
3333 * c-attribs.c (handle_noreturn_attribute): No longer static.
3334 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3335 Declare.
3336 * c-format.c (check_function_format): Use get_attribute_name.
3337
a04c0734
MS
33382019-06-19 Martin Sebor <msebor@redhat.com>
3339
3340 PR translation/90156
3341 * c-format.c (function_format_info::format_type): Adjust type.
3342 (function_format_info::is_raw): New member.
3343 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3344 (decode_format_attr): Adjust call to decode_format_type.
3345 Avoid a redundant call to convert_format_name_to_system_name.
3346 Avoid abbreviating the word "arguments" in a diagnostic.
3347 (format_warning_substr): New function.
3348 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3349 (finish_dollar_format_checking): Same.
3350 (check_format_info): Same.
3351 (struct baltoks_t): New.
3352 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3353 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3354 functions.
3355 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3356 maybe_diag_unbalanced_tokens.
3357 (handle_format_attribute): Spell out the word "arguments" in
3358 a diagnostic.
3359
d3786ebb
MB
33602019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3361
3362 PR c++/90449 - add -Winaccessible-base option.
3363 * c.opt (Winaccessible-base): New option.
3364
bf38f7e9
JJ
33652019-06-10 Jakub Jelinek <jakub@redhat.com>
3366
3367 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3368 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3369 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3370 combined/composite constructs where it is not allowed. Copy over
3371 OMP_CLAUSE_REDUCTION_INSCAN.
3372
0ecf545c
MS
33732019-06-05 Martin Sebor <msebor@redhat.com>
3374
3375 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3376 (handle_alias_ifunc_attribute): Same.
3377 (handle_copy_attribute): Same.
3378 (handle_weakref_attribute): Same.
3379 (handle_nonnull_attribute): Same.
3380 * c-warn.c (warn_for_sign_compare): Same.
3381 (warn_for_restrict): Same.
3382 * c.opt: Same.
3383
36b34127
MS
33842019-06-05 Martin Sebor <msebor@redhat.com>
3385
3386 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3387 * c.opt (-Wformat-diag): Remove a spurious period.
3388
357a352f
JJ
33892019-05-29 Jakub Jelinek <jakub@redhat.com>
3390
3391 PR c/90628
3392 * c-common.c (check_builtin_function_arguments)
3393 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3394 as last argument.
3395
2b8235ea
EB
33962019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3397
3398 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3399
6d86ddc4
ML
34002019-05-22 Martin Liska <mliska@suse.cz>
3401
3402 PR lto/90500
3403 * c-attribs.c (handle_copy_attribute): Do not copy
3404 target_clones attribute.
3405
419ba5b9
EB
34062019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3407
3408 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3409 * c-ada-spec.c (print_assignment_operator): New function.
3410 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3411 assignment operators declared as methods and filter out the others.
3412
e03436e7
TS
34132019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3414
3415 PR c/89433
3416 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3417 "omp declare target".
3418
a9c697b8
MS
34192019-05-16 Martin Sebor <msebor@redhat.com>
3420
ab20d992
JJ
3421 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3422 keywords, operators, and types in diagnostics.
3423 (handle_scalar_storage_order_attribute): Same.
3424 (handle_mode_attribute): Same.
3425 (handle_visibility_attribute): Same.
3426 (handle_assume_aligned_attribute): Same.
3427 (handle_no_split_stack_attribute): Same.
3428 * c-common.c (shorten_compare): Same.
3429 (c_common_truthvalue_conversion): Same.
3430 (cb_get_source_date_epoch): Same.
3431 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3432 in diagnostics.
3433 (interpret_float): Same.
3434 * c-omp.c (c_finish_omp_for): Same.
3435 * c-opts.c (c_common_post_options): Same.
3436 * c-pch.c (c_common_pch_pragma): Same.
3437 * c-pragma.c (pop_alignment): Same.
3438 (handle_pragma_pack): Same.
3439 (apply_pragma_weak): Same.
3440 (handle_pragma_weak): Same.
3441 (handle_pragma_scalar_storage_order): Same.
3442 (handle_pragma_redefine_extname): Same.
3443 (add_to_renaming_pragma_list): Same.
3444 (maybe_apply_renaming_pragma): Same.
3445 (push_visibility): Same.
3446 (handle_pragma_visibility): Same.
3447 (handle_pragma_optimize): Same.
3448 (handle_pragma_message): Same.
3449 * c-warn.c (warn_for_omitted_condop): Same.
3450 (lvalue_error): Same.
a9c697b8 3451
6b943512
RB
34522019-05-15 Richard Biener <rguenther@suse.de>
3453
3454 PR c/90474
3455 * c-common.c (c_common_mark_addressable_vec): Also mark
3456 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3457 c_mark_addressable.
ab20d992 3458
b744fc85
NS
34592019-05-06 Nathan Sidwell <nathan@acm.org>
3460
3461 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3462
598f50d7
NS
34632019-04-30 Nathan Sidwell <nathan@acm.org>
3464
3465 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3466
5bcc5a3b
ML
34672019-04-30 Martin Liska <mliska@suse.cz>
3468
3469 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3470 for unknown options.
3471
e78a87f7
RS
34722019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3473
3474 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3475 the pointer target rather than the pointer itself.
3476
c280b7ee
JJ
34772019-04-19 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR c/89888
3480 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3481 arguments.
3482 (c_do_switch_warnings): Remove outside_range_p argument.
3483 * c-common.c (check_case_bounds): Removed.
3484 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3485 Don't call check_case_bounds. Fold low_value as well as high_value.
3486 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3487 Check for case labels outside of range of original type here and
3488 adjust them.
3489
8e8225e6
JJ
34902019-04-12 Jakub Jelinek <jakub@redhat.com>
3491
63b8a166
JJ
3492 PR translation/90041
3493 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3494 in the Warn diagnostics.
3495
8e8225e6
JJ
3496 PR c/89946
3497 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3498 function comment. Warn if arguments of the attribute are not positive
3499 integer constants.
3500
53a3f614
EB
35012019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3502
3503 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3504 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3505
22be5873
EB
35062019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3507
3508 * c-ada-spec.c (is_float128): New predicate extracted from...
3509 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3510 <REAL_TYPE>: ...here. Call it.
3511
34facf20
DM
35122019-04-05 David Malcolm <dmalcolm@redhat.com>
3513
3514 PR c/89985
3515 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3516 auto_diagnostic_group. Guard inform calls by result of
3517 warning_at call.
3518
05564120
MP
35192019-04-05 Marek Polacek <polacek@redhat.com>
3520
ab20d992 3521 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3522 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3523 of RHS.
3524
7a506c3c
JM
35252019-04-03 Jason Merrill <jason@redhat.com>
3526
3527 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3528 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3529
ddeae8c8
MS
35302019-04-01 Martin Sebor <msebor@redhat.com>
3531
3532 PR c/89685
3533 * c-attribs.c (handle_copy_attribute): Handle references and
3534 non-constant expressions.
3535
a15ffa22
JJ
35362019-03-22 Jakub Jelinek <jakub@redhat.com>
3537
3538 PR c++/87481
3539 * c.opt (-fconstexpr-ops-limit=): New option.
3540
36a3a7a3
JJ
35412019-03-21 Jakub Jelinek <jakub@redhat.com>
3542
3543 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3544 template param.
3545
bec1da64
MS
35462019-03-19 Martin Sebor <msebor@redhat.com>
3547
3548 PR tree-optimization/89688
3549 * c-common.c (braced_list_to_string): Make static.
3550 (braced_lists_to_strings): Define new function.
3551 * c-common.h (braced_list_to_string): Remove.
3552 (braced_lists_to_strings): Declare.
3553
1fe61adf
ML
35542019-03-12 Martin Liska <mliska@suse.cz>
3555
3556 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3557
93964ebd
ML
35582019-03-11 Martin Liska <mliska@suse.cz>
3559
3560 * c-opts.c (c_common_post_options): Wrap apostrophes
3561 in gcc internal format with %'.
3562
a3f9f006
ML
35632019-03-11 Martin Liska <mliska@suse.cz>
3564
3565 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3566 in a string format message and fix GNU coding style.
3567 * c-common.c (vector_types_convertible_p): Likewise.
3568 (c_build_vec_perm_expr): Likewise.
3569 * c-indentation.c (get_visual_column): Likewise.
3570 * c-opts.c (c_common_handle_option): Likewise.
3571 (c_common_post_options): Likewise.
3572 (sanitize_cpp_opts): Likewise.
3573 * c-pch.c (c_common_pch_pragma): Likewise.
3574 * c-pragma.c (handle_pragma_pack): Likewise.
3575
1db01ff9
JJ
35762019-03-08 Jakub Jelinek <jakub@redhat.com>
3577
3578 PR tree-optimization/89550
3579 * c-common.c (c_common_truthvalue_conversion): Only set
3580 TREE_NO_WARNING if warning_at returned true.
3581 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3582
ba790e6f
JJ
35832019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3584 Martin Sebor <msebor@gmail.com>
3585
3586 * c.opt (Wmissing-attributes): Clean up doc string.
3587
7da73ba7
JJ
35882019-02-25 Jakub Jelinek <jakub@redhat.com>
3589
3590 PR c/89495
3591 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3592 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3593 checking.
3594
921bb9d1
RB
35952019-02-22 Richard Biener <rguenther@suse.de>
3596
3597 * c-pch.c (no_checksum): Remove.
3598 (pch_init): Remove assertion that executable_checksum is not
3599 all zero.
3600 (c_common_valid_pch): Likewise.
3601
e2ebb05c
MS
36022019-02-18 Martin Sebor <msebor@redhat.com>
3603
3604 PR middle-end/89294
3605 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3606
3fe53000
DM
36072019-02-16 David Malcolm <dmalcolm@redhat.com>
3608
3609 PR c++/88680
3610 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3611 implementing -Wtype-limits.
3612
28a8cef1
MS
36132019-02-11 Martin Sebor <msebor@redhat.com>
3614
3615 PR c++/87996
3616 * c-common.c (invalid_array_size_error): New function.
3617 (valid_array_size_p): Call it. Handle size as well as type.
3618 * c-common.h (valid_constant_size_p): New function.
3619 (enum cst_size_error): New type.
3620
ec2be203
DM
36212019-01-31 David Malcolm <dmalcolm@redhat.com>
3622
3623 PR c/89122
3624 * known-headers.cc (get_stdlib_header_for_name): Add
3625 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3626
8936f047
JJ
36272019-01-31 Jakub Jelinek <jakub@redhat.com>
3628
3629 PR libstdc++/88170
3630 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3631 a C cast in pp_c_flag_gnu_v3 mode.
3632
6a335b96
JJ
36332019-01-29 Jakub Jelinek <jakub@redhat.com>
3634
3635 PR c/86125
3636 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3637 builtin_structptr_types types even for C.
3638
2a06eba5
BE
36392019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3640
3641 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3642 when rhs is of array type correctly. Fix handling of nested structures.
3643 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3644 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3645 type casts within nested compound expressions.
3646
18a23298
JJ
36472019-01-22 Jakub Jelinek <jakub@redhat.com>
3648
3649 PR middle-end/88968
3650 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3651 variable after using BIT_FIELD_REF.
3652
420183d9
L
36532019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3654
3655 PR c/51628
3656 PR c/88664
3657 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3658 Remove the boolean argument.
3659 * c-warn.c (check_address_of_packed_member): Renamed to ...
3660 (check_address_or_pointer_of_packed_member): This. Also
3661 warn pointer conversion.
3662 (check_and_warn_address_of_packed_member): Renamed to ...
3663 (check_and_warn_address_or_pointer_of_packed_member): This.
3664 Also warn pointer conversion.
3665 (warn_for_address_or_pointer_of_packed_member): Remove the
3666 boolean argument. Don't check pointer conversion here.
3667
99063eee
RS
36682019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3669
3670 PR inline-asm/52813
3671 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3672
a30d0196
JJ
36732019-01-14 Jakub Jelinek <jakub@redhat.com>
3674
3675 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3676 and __cpp_nontype_template_parameter_auto. Add a comment that
3677 __cpp_template_auto is deprecated.
3678
2d91f79d
TH
36792019-01-14 Tom Honermann <tom@honermann.net>
3680
3681 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3682 * c-common.c (c_common_reswords): Add char8_t.
3683 (fix_string_type): Use char8_t for the type of u8 string literals.
3684 (c_common_get_alias_set): char8_t doesn't alias.
3685 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3686 C++.
3687 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3688 (keyword_begins_type_specifier): Add RID_CHAR8.
3689 * c-common.h (rid): Add RID_CHAR8.
3690 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3691 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3692 Define char8_type_node and char8_array_type_node.
3693 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3694 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3695 (c_cpp_builtins): Predefine __cpp_char8_t.
3696 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3697 CPP_UTF8STRING.
3698 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3699 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3700 targeting C++2a.
3701 * c.opt: Add the -fchar8_t command line option.
3702
23db6ced
MS
37032019-01-14 Martin Sebor <msebor@redhat.com>
3704
3705 PR target/88638
3706 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3707 and issue errors if it fails.
3708 * c-common.h (valid_format_string_type_p): Declare.
3709 * c-format.c (valid_stringptr_type_p): Rename...
3710 (valid_format_string_type_p): ...to this and make extern.
3711 (handle_format_arg_attribute): Adjust to new name.
3712 (check_format_string): Same.
3713
234c3818
L
37142019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3715
3716 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3717 Replace "may may" with "may" in warning message.
3718
d8fcab68
JJ
37192019-01-07 Jakub Jelinek <jakub@redhat.com>
3720
3721 PR c++/85052
3722 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3723 (c_build_vec_convert): Declare.
3724 * c-common.c (c_build_vec_convert): New function.
3725
29d24852
MS
37262019-01-04 Martin Sebor <msebor@redhat.com>
3727
3728 PR c/88546
3729 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3730 Handle C++ empty throw specification and C11 _Noreturn.
3731 (has_attribute): Also handle C11 _Noreturn.
3732
9069a4c9
MS
37332019-01-04 Martin Sebor <msebor@redhat.com>
3734
3735 PR c/88363
3736 * c-attribs.c (positional_argument): Also accept enumerated types.
3737
a5544970
JJ
37382019-01-01 Jakub Jelinek <jakub@redhat.com>
3739
3740 Update copyright years.
3741
da77eace
L
37422018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3743
3744 PR c/51628
3745 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3746 * c-warn.c (check_alignment_of_packed_member): New function.
3747 (check_address_of_packed_member): Likewise.
3748 (check_and_warn_address_of_packed_member): Likewise.
3749 (warn_for_address_or_pointer_of_packed_member): Likewise.
3750 * c.opt: Add -Wno-address-of-packed-member.
3751
573767d4
DM
37522018-12-20 David Malcolm <dmalcolm@redhat.com>
3753
3754 PR c++/87504
3755 * c-warn.c (get_outermost_macro_expansion): New function.
3756 (spelled_the_same_p): Use it to unwind the macro expansions, and
3757 compare the outermost macro in each nested expansion, rather than
3758 the innermost.
3759
a14feb3c
DM
37602018-12-19 David Malcolm <dmalcolm@redhat.com>
3761
3762 PR c++/87504
3763 * c-common.h (warn_tautological_cmp): Convert 1st param from
3764 location_t to const op_location_t &.
3765 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3766 when testing for INTEGER_CST.
3767 (warn_tautological_bitwise_comparison): Convert 1st param from
3768 location_t to const op_location_t &; use it to build a
3769 binary_op_rich_location, and use this.
3770 (spelled_the_same_p): New function.
3771 (warn_tautological_cmp): Convert 1st param from location_t to
3772 const op_location_t &. Warn for macro expansions if
3773 spelled_the_same_p. Use binary_op_rich_location.
3774
dfd7fdca
DM
37752018-12-19 David Malcolm <dmalcolm@redhat.com>
3776
3777 PR c++/43064
3778 PR c++/43486
3779 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3780 (verify_tree): Handle location wrappers.
3781 (c_common_truthvalue_conversion): Strip any location wrapper.
3782 Handle CONST_DECL.
3783 (fold_offsetof): Strip any location wrapper.
3784 (complete_array_type): Likewise for initial_value.
3785 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3786 index before checking for INTEGER_CST.
3787 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3788 print parentheses around location wrappers.
3789 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3790 before checking for INTEGER_CST.
3791 (warn_tautological_bitwise_comparison): Call
3792 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3793 before checking for INTEGER_CST.
3794 (readonly_error): Strip any location wrapper.
3795 (warn_array_subscript_with_type_char): Strip location wrappers
3796 before checking for INTEGER_CST. Use the location of the index if
3797 available.
3798
5c8b3702
JM
37992018-12-06 Jason Merrill <jason@redhat.com>
3800
3801 PR c++/88136 - -Wdeprecated-copy false positives
3802 * c.opt (Wdeprecated-copy-dtor): New.
3803 (Wdeprecated-copy): Move to -Wextra.
3804
673670da
MS
38052018-11-29 Martin Sebor <msebor@redhat.com>
3806
3807 PR c/88172
3808 PR testsuite/88208
3809 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3810 alignments to values less than the target requires.
3811 (has_attribute): For attribute aligned consider both the attribute
3812 and the alignment bits.
3813 * c-common.c (c_init_attributes): Optionally issue a warning for
3814 zero alignment.
3815
04864ec8
MS
38162018-11-28 Martin Sebor <msebor@redhat.com>
3817
3818 PR c/88065
3819 PR c/87297
3820 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3821 or destination is an error.
3822
ace83db0
JJ
38232018-11-28 Jakub Jelinek <jakub@redhat.com>
3824
3825 PR c++/88215
3826 * c-ubsan.c: Include langhooks.h.
3827 (ubsan_instrument_division): Change gcc_assert that main variants
3828 of op0 and op1 types are equal to gcc_checking_assert that the
3829 main variants are compatible types.
3830
da193a27
EB
38312018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3832
3833 * c-ada-spec.c: Include stringpool.h.
3834 (has_static_fields): Return false for incomplete types.
3835 (is_tagged_type): Likewise.
3836 (has_nontrivial_methods): Likewise.
3837 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3838 (struct overloaded_name_hash): New structure.
3839 (struct overloaded_name_hasher): Likewise.
3840 (overloaded_names): New global variable.
3841 (init_overloaded_names): New static function.
3842 (overloaded_name_p): New predicate.
3843 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3844 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3845 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3846 Remove always-true condition and dump forward types.
3847 (dump_ada_specs): Delete overloaded_names.
3848
98f08eb8
MS
38492018-11-20 Martin Sebor <msebor@redhat.com>
3850
3851 * c-attribs.c (type_for_vector_size): New function.
3852 (type_valid_for_vector_size): Same.
3853 (handle_vector_size_attribute): Move code to the functions above
3854 and call them.
3855 (validate_attribute, has_attribute): New functions.
3856 * c-common.h (has_attribute): Declare.
3857 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3858 * c-common.c (c_common_resword): Same.
3859
2674fa47
JM
38602018-11-16 Jason Merrill <jason@redhat.com>
3861
3862 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3863 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3864
258b3854
JJ
38652018-11-16 Jakub Jelinek <jakub@redhat.com>
3866
3867 PR middle-end/87854
3868 * c-common.c (fix_string_type): Reject string literals larger than
3869 TYPE_MAX_VALUE (ssizetype) bytes.
3870
1d249509
MS
38712018-11-15 Martin Sebor <msebor@redhat.com>
3872
3873 PR c++/87541
3874 PR c++/87542
3875 * c-attribs.c (positional_argument): New function.
3876 (handle_alloc_size_attribute): Use it and simplify.
3877 (handle_alloc_align_attribute): Same.
3878 (handle_assume_aligned_attribute): Same.
3879 (handle_nonnull_attribute): Same.
3880 * c-common.c (check_function_arguments): Pass fntype to
3881 check_function_format.
3882 * c-common.h (check_function_format): Add an argument.
3883 (PosArgFlags, positional_argument): Declare new type and function.
3884 * c-format.c (decode_format_attr): Add arguments.
3885 (check_format_string, get_constant): Same.
3886 (convert_format_name_to_system_name): Adjust.
3887
478dd60d
DM
38882018-11-15 David Malcolm <dmalcolm@redhat.com>
3889
3890 PR other/19165
3891 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3892
8cca0163
JJ
38932018-11-14 Jakub Jelinek <jakub@redhat.com>
3894
8ee09943
JJ
3895 P1236R1 - Signed integers are two's complement
3896 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3897 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3898 with in-range second operand well defined for -std=c++2a.
3899
8cca0163
JJ
3900 PR other/88007
3901 * c-common.c (parse_optimize_options): Allocate option string from
3902 opts_obstack rather than as GC memory. Move the allocation after
3903 warning for invalid option.
3904
620e594b
DM
39052018-11-13 David Malcolm <dmalcolm@redhat.com>
3906
3907 * c-common.c (c_get_substring_location): Update for renaming of
3908 get_source_location_for_substring to get_location_within_string.
3909 * c-lex.c: Replace "source_location" with "location_t".
3910 * c-opts.c: Likewise.
3911 * c-ppoutput.c: Likewise.
3912
f9731de3
MS
39132018-11-13 Martin Sebor <msebor@redhat.com>
3914
3915 PR middle-end/81824
3916 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3917 (handle_tls_model_attribute): Improve diagnostics.
3918
e4bd6d5e
JM
39192018-11-12 Jason Merrill <jason@redhat.com>
3920
a6bb6b07
JM
3921 * c-cppbuiltin.c (c_cpp_builtins): Define
3922 __cpp_impl_destroying_delete.
3923
e4bd6d5e
JM
3924 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3925 __cpp_conditional_explicit.
3926
79a2c428
MS
39272018-11-09 Martin Sebor <msebor@redhat.com>
3928
3929 PR middle-end/81824
3930 * c-attribs.c (handle_copy_attribute): New function.
3931
4c7bd361
MS
39322018-11-09 Martin Sebor <msebor@redhat.com>
3933
3934 PR c/87795
3935 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3936
28567c40
JJ
39372018-11-08 Jakub Jelinek <jakub@redhat.com>
3938
3939 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3940 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3941 enum omp_memory_order MEMORY_ORDER.
3942 (c_finish_omp_flush): Add MO argument.
3943 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3944 (c_finish_omp_for): Add FINAL_P argument.
3945 * c-omp.c: Include memmodel.h.
3946 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3947 OMP_TASKGROUP_CLAUSES to it.
3948 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3949 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3950 instead of OMP_ATOMIC_SEQ_CST.
3951 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3952 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3953 __atomic_thread_fence call with the given value.
3954 (check_omp_for_incr_expr): Formatting fixes.
3955 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3956 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3957 is not constant expression 1 or -1. Transform NE_EXPR loops
3958 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3959 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3960 loops too.
3961 (c_omp_split_clauses): Add support for combined
3962 #pragma omp parallel master and
3963 #pragma omp {,parallel }master taskloop{, simd} constructs.
3964 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3965 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3966 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3967 (c_omp_predetermined_sharing): Don't return
3968 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3969 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3970 PRAGMA_OMP_REQUIRES.
3971 * c-pragma.h (enum pragma_kind): Likewise.
3972 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3973 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3974
204839e7
DM
39752018-11-08 David Malcolm <dmalcolm@redhat.com>
3976
3977 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3978
d8010ee4
DM
39792018-11-08 David Malcolm <dmalcolm@redhat.com>
3980
3981 * c-format.c (local_cgraph_node_ptr_node): New variable.
3982 (gcc_dump_printf_char_table): Add entry for %C.
3983 (get_pointer_to_named_type): New function, taken from the handling
3984 code for "gimple *" from...
3985 (init_dynamic_diag_info): ...here. Add handling for
3986 "cgraph_node *".
3987 * c-format.h (T_CGRAPH_NODE): New.
3988
4be5c72c
JM
39892018-10-19 Jason Merrill <jason@redhat.com>
3990
3991 * c-cppbuiltin.c (c_cpp_builtins): Add
3992 __cpp_nontype_template_parameter_class.
3993
f3f6029d
NS
39942018-10-31 Nathan Sidwell <nathan@acm.org>
3995
ab5324fb
NS
3996 * c-opts.c (c_finish_options): Force command line macro
3997 location. Refactor to avoid repeating main debug hook.
3998 (push_command_line_include): Clarify comment.
3999
f3f6029d
NS
4000 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4001
91e3ec29
MS
40022018-10-30 Martin Sebor <msebor@redhat.com>
4003
4004 PR middle-end/87041
4005 * c-format.c (check_format_types): Avoid diagnosing null pointer
4006 arguments to printf-family of functions.
4007
b5ff4f5c
MP
40082018-10-30 Marek Polacek <polacek@redhat.com>
4009
4010 Implement P0892R2, explicit(bool).
4011 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4012
7e2de6df
DM
40132018-10-29 David Malcolm <dmalcolm@redhat.com>
4014
4015 * name-hint.h (name_hint::take_deferred): New member function.
4016
b2bf438c
DM
40172018-10-29 David Malcolm <dmalcolm@redhat.com>
4018
4019 PR c++/56856
4020 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4021 argument.
4022 (check_function_restrict): Rename param "argarray" to
4023 "unfolded_argarray", and make a copy named "argarray", calling
4024 fold_for_warn on each argument.
4025 (check_function_arguments): Add note about responsibility for
4026 folding the arguments.
4027
9f936c86
JM
40282018-10-17 Joseph Myers <joseph@codesourcery.com>
4029
4030 * c-common.c (flag_isoc2x): New variable.
4031 * c-common.h (clk_c): Update comment to reference C2X.
4032 (flag_isoc99, flag_isoc11): Update comments to reference future
4033 standard versions in general.
4034 (flag_isoc2x): Declare.
4035 * c-opts.c (set_std_c2x): New function.
4036 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4037 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4038 flag_isoc2x to 0.
4039 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4040
7a8a92c4
JM
40412018-10-17 Joseph Myers <joseph@codesourcery.com>
4042
4043 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4044 (std=iso9899:2018): Document C17 as published in 2018.
4045
4dc003ff
CL
40462018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4047
4048 PR c++/87364
4049 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4050
79371671
WW
40512018-10-11 Will Wray <wjwray@gmail.com>
4052
4053 PR c++/87364
4054 * c-pretty-print.h (pp_c_type_cast): Prototype.
4055 (pp_c_integer_constant): Likewise.
4056 * c-pretty-print.c (pp_c_type_cast): No longer static.
4057 (pp_c_integer_constant): Likewise.
4058 (pp_c_enumeration_constant): Fix loop termination when finding
4059 name of constant. No longer returns a value. Call
4060 pp_c_integer_constant.
4061 (c_pretty_printer::constant): Update for changes to
4062 pp_c_enumeration_constant.
4063
46c62690
JJ
40642018-10-11 Jakub Jelinek <jakub@redhat.com>
4065
4066 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4067 for no_unique_address.
4068
c24300ba
DM
40692018-10-09 David Malcolm <dmalcolm@redhat.com>
4070
4071 * c-common.c (c_option_controlling_cpp_error): Rename to...
4072 (c_option_controlling_cpp_diagnostic): ...this, and convert
4073 "reason" from int to enum.
4074 (c_cpp_error): Rename to...
4075 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4076 * c-common.h (c_cpp_error): Rename to...
4077 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4078 * c-opts.c (c_common_init_options): Update for renaming.
4079
8656dafa
RS
40802018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4081
4082 PR c/87286
4083 * c-common.c (vector_types_compatible_elements_p): Use
4084 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4085
8cff0652
VK
40862018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4087
4088 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4089 to generate constructor destructor priority warning.
4090 * c.opt (-Wprio-ctor-dtor): New option.
4091
bedf03a2
JM
40922018-10-01 Jason Merrill <jason@redhat.com>
4093
4094 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4095
6cc430c1
EB
40962018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4097
4098 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4099 (dump_ada_node): Add const keyword.
4100
87677ac7
ML
41012018-09-25 Martin Liska <mliska@suse.cz>
4102
4103 * c-common.c (c_common_truthvalue_conversion):
4104 Remove Pascal from documentation.
4105
518196cb
EB
41062018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4107
4108 * c-ada-spec.c: Include diagnostic.h.
4109 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4110
a599af84
MP
41112018-09-19 Marek Polacek <polacek@redhat.com>
4112
4113 * c.opt (Wclass-conversion): New.
4114
9c4a4b3c
DM
41152018-09-17 David Malcolm <dmalcolm@redhat.com>
4116
4117 * c-format.c (range_label_for_format_type_mismatch::get_text):
4118 Update for new param.
4119
c896ecfe
DM
41202018-09-17 David Malcolm <dmalcolm@redhat.com>
4121
4122 * c-format.c (format_warning_at_char): Update for introduction of
4123 format_string_diagnostic_t.
4124 (format_type_warning): Likewise.
4125
80c6d1f4
MJ
41262018-09-17 Martin Jambor <mjambor@suse.cz>
4127
4128 PR c/63886
4129 * c.opt (Wabsolute-value): New.
4130
6d900107
BE
41312018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4132
4133 * c-common.c (complete_flexible_array_elts): New helper function.
4134 * c-common.h (complete_flexible_array_elts): Declare.
4135
b5764229
BE
41362018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4137
4138 * c-common.c (braced_list_to_string): Remove eval parameter.
4139 Add some more checks. Always create zero-terminated STRING_CST.
4140 * c-common.h (braced_list_to_string): Adjust prototype.
4141
85204e23
DM
41422018-08-27 David Malcolm <dmalcolm@redhat.com>
4143
4144 PR 87091
4145 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4146 to a tri-state.
4147 (maybe_suggest_missing_token_insertion): Likewise.
4148 (maybe_add_include_fixit): Add param "override_location". If set,
4149 and source-printing is enabled, then override the rich_location's
4150 primary location with that of the insertion point for the fix-it
4151 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4152 * c-common.h (extern void maybe_add_include_fixit): Add bool
4153 param.
4154 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4155 for conversion of show_caret_p to a tri-state.
4156 * c-warn.c (warn_for_restrict): Likewise.
4157 * known-headers.cc
4158 (suggest_missing_header::~suggest_missing_header): Update call to
4159 maybe_add_include_fixit to suggest overriding the location, as it
4160 is for a note.
4161
3d78e008
ML
41622018-08-27 Martin Liska <mliska@suse.cz>
4163
4164 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4165 fndecl_built_in_p and remove check for FUNCTION_DECL if
4166 possible.
3d78e008
ML
4167 (check_builtin_function_arguments): Likewise.
4168 (reject_gcc_builtin): Likewise.
4169 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4170
b5be6d0c
MP
41712018-08-26 Marek Polacek <polacek@redhat.com>
4172
4173 PR c++/87029, Implement -Wredundant-move.
4174 * c.opt (Wredundant-move): New option.
4175
79ca9c35
MP
41762018-08-21 Marek Polacek <polacek@redhat.com>
4177
4178 PR c++/86981, Implement -Wpessimizing-move.
4179 * c.opt (Wpessimizing-move): New option.
4180
097f82ec
DM
41812018-08-20 David Malcolm <dmalcolm@redhat.com>
4182
4183 PR other/84889
4184 * c-attribs.c (common_handle_aligned_attribute): Add
4185 auto_diagnostic_group instance.
4186 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4187 * c-opts.c (c_common_post_options): Likewise.
4188 * c-warn.c (warn_logical_not_parentheses): Likewise.
4189 (warn_duplicated_cond_add_or_warn): Likewise.
4190 (warn_for_multistatement_macros): Likewise.
4191
3fb558b1
NS
41922018-08-20 Nathan Sidwell <nathan@acm.org>
4193
4194 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4195 access.
4196
800c0e98
NS
41972018-08-17 Nathan Sidwell <nathan@acm.org>
4198
4199 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4200 field.
4201 (laxy_hex_fp_value_count): Make unsigned.
4202 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4203 manipulate the macro.
4204 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4205 cpp_define_lazily.
4206
6f795a92
DM
42072018-08-17 David Malcolm <dmalcolm@redhat.com>
4208
4209 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4210 (gcc_dump_printf_length_specs): New.
4211 (gcc_dump_printf_flag_pairs): New.
4212 (gcc_dump_printf_flag_specs): New.
4213 (gcc_dump_printf_char_table): New.
4214 (format_types_orig): Add entry for "gcc_dump_printf".
4215 (init_dynamic_diag_info): Set up length_char_specs and
4216 conversion_specs for gcc_dump_printf_format_type.
4217 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4218
c5d725c0
NS
42192018-08-17 Nathan Sidwell <nathan@acm.org>
4220
10f04917
NS
4221 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4222
c5d725c0
NS
4223 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4224 * c-cppbuiltin.c: Likewise.
4225
c0c12356
ML
42262018-08-17 Martin Liska <mliska@suse.cz>
4227
4228 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4229 Ignore/Deprecated flag. Warning is done automatically for
4230 Deprecated flags.
c0c12356 4231
10fcc142
DM
42322018-08-16 David Malcolm <dmalcolm@redhat.com>
4233
4234 PR c++/70693
4235 * c-common.c (selftest::c_family_tests): Call
4236 selftest::c_indentation_c_tests.
4237 * c-common.h (selftest::c_indentation_c_tests): New decl.
4238 * c-indentation.c: Include "selftest.h".
4239 (next_tab_stop): Add "tab_width" param, rather than accessing
4240 cpp_opts.
4241 (get_visual_column): Likewise. Clarify comment. Bulletproof
4242 against reading past the end of the line.
4243 (get_first_nws_vis_column): Add "tab_width" param.
4244 (detect_intervening_unindent): Likewise.
4245 (should_warn_for_misleading_indentation): Read tab width from
4246 cpp_opts and pass around.
4247 (selftest::test_next_tab_stop): New test.
4248 (selftest::assert_get_visual_column_succeeds): New function.
4249 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4250 (selftest::assert_get_visual_column_fails): New function.
4251 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4252 (selftest::test_get_visual_column): New test.
4253 (selftest::c_indentation_c_tests): New function.
4254
3f6677f4
NS
42552018-08-16 Nathan Sidwell <nathan@acm.org>
4256
4257 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4258 (store_ada_macro): Likewise.
4259 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4260 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4261
96e6ae57
DM
42622018-08-15 David Malcolm <dmalcolm@redhat.com>
4263
4264 * c-format.c: Include "selftest-diagnostic.h" and
4265 "gcc-rich-location.h".
4266 (format_warning_at_char): Pass NULL for new label params of
4267 format_warning_va.
4268 (class indirection_suffix): New class.
4269 (class range_label_for_format_type_mismatch): New class.
4270 (format_type_warning): Move logic for generating "*" suffix to
4271 class indirection_suffix. Create "fmt_label" and "param_label"
4272 to show their types, and pass them to the
4273 format_warning_at_substring calls.
4274 (selftest::test_type_mismatch_range_labels): New test.
4275 (selftest::c_format_c_tests): Call it.
4276
23aa9f7c
MS
42772018-08-13 Martin Sebor <msebor@redhat.com>
4278
4279 PR tree-optimization/71625
4280 * c-common.c (braced_list_to_string): New function.
4281 * c-common.h (braced_list_to_string): Declare it.
4282
f10a9135
NS
42832018-08-08 Nathan Sidwell <nathan@acm.org>
4284
4285 * c-common.c (try_to_locate_new_include_inertion_point): Use
4286 linemap_included_from_linemap.
4287 * c-lex.c (fe_file_change): Use linemap_included_from.
4288 * c-ppoutput.c (pp_file_change): Likewise.
4289
8a45b051
MS
42902018-08-01 Martin Sebor <msebor@redhat.com>
4291
4292 PR tree-optimization/86650
ab20d992 4293 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4294 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4295 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4296 * c-format.h (T89_G): Update to be "gimple *" rather than
4297 "gcall *".
4298 (local_gcall_ptr_node): Rename...
4299 (local_gimple_ptr_node): ...to this.
4300
e540ccc0
DM
43012018-07-31 David Malcolm <dmalcolm@redhat.com>
4302
4303 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4304 table entries for gcc_diag_char_table, and the 'Z' entry from
4305 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4306 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4307 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4308 adding missing "Z" for this table. Remove erroneous "G" and "K"
4309 entries.
4310 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4311 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4312 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4313
425fc685
RE
43142018-07-31 Richard Earnshaw <rearnsha@arm.com>
4315
4316 * c-common.c (speculation_safe_resolve_call): New function.
4317 (speculation_safe_resolve_params): New function.
4318 (speculation_safe_resolve_return): New function.
4319 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4320 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4321 __HAVE_SPECULATION_SAFE_VALUE.
4322
181463c2
DM
43232018-07-20 David Malcolm <dmalcolm@redhat.com>
4324
4325 * c-common.c (c_cpp_error): Remove redundant "line_table"
4326 parameter from call to rich_location::set_range.
4327 (maybe_suggest_missing_token_insertion): Likewise.
4328
0d7f9065
MS
43292018-07-20 Martin Sebor <msebor@redhat.com>
4330
4331 PR middle-end/82063
ab20d992 4332 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4333
00abf86c
MS
43342018-07-20 Martin Sebor <msebor@redhat.com>
4335
4336 PR middle-end/82063
4337 * c-common.h (c_common_handle_option): Change function argument
4338 to HOST_WIDE_INT.
4339 * c-opts.c (c_common_init_options): Same.
4340 (c_common_handle_option): Same. Remove special handling of
4341 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4342 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4343 options to take a HOST_WIDE_INT argument and accept a byte-size
4344 suffix. Initialize.
4345 (-Wvla-larger-than): Same.
4346 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4347 (-Wno-vla-larger-than): Same.
4348
9b452033
JJ
43492018-07-12 Jakub Jelinek <jakub@redhat.com>
4350
4351 * c-attribs.c (c_common_attribute_table): Add
4352 "omp declare target implicit" attribute.
4353
cd0762f3
RB
43542018-07-12 Richard Biener <rguenther@suse.de>
4355
4356 PR c/86453
4357 * c-attribs.c (handle_packed_attribute): Do not build a variant
4358 type with TYPE_PACKED, instead ignore the attribute if we may
4359 not apply to the original type.
4360
0b27c3ed
JJ
43612018-07-10 Jakub Jelinek <jakub@redhat.com>
4362
4363 PR c++/86443
4364 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4365 to contain TREE_LIST for both the original class iterator and the
4366 "last" helper var.
4367
e730a0ef
EB
43682018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4369
4370 * c-ada-spec.c (to_ada_name): Remove index parameter.
4371 (pp_ada_tree_identifier): Likewise.
4372 (dump_ada_macros): Adjust call to to_ada_name.
4373 (struct overloaded_name_hash): Delete.
4374 (struct overloaded_name_hasher): Likewise.
4375 (overloaded_names): Likewise.
4376 (compute_overloading_index): Likewise.
4377 (dump_ada_decl_name): Do not call compute_overloading_index and
4378 adjust calls to pp_ada_tree_identifier.
4379 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4380 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4381 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4382 (dump_ada_enum_type): Remove type and display_convention parameters.
4383 Adjust calls to pp_ada_tree_identifier.
4384 (dump_ada_node): Likewise and for dump_ada_structure.
4385 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4386 and tidy up.
4387 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4388 syntax.
4389 (print_constructor): Adjust call to pp_ada_tree_identifier.
4390 (print_destructor): Likewise.
4391 (dump_ada_declaration): Switch to aspect syntax.
4392 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4393 parameter with nested parameter.
4394 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4395 (dump_ada_specs): Do not delete overloaded_names table.
4396
8de583fc
PB
43972018-07-06 Peter Bergner <bergner@linux.ibm.com>
4398
4399 PR target/86324
e730a0ef 4400 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4401 target hook.
4402
09cff37b
NS
44032018-07-05 Nathan Sidwell <nathan@acm.org>
4404
4405 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4406 NO_IMPLICIT_EXTERN_C.
4407
98086b2b
ML
44082018-06-28 Martin Liska <mliska@suse.cz>
4409
4410 * cppspec.c: Include opt-suggestions.h.
4411
ab20d992
JJ
44122018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4413 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4414 Cesar Philippidis <cesar@codesourcery.com>
4415
4416 * c-pragma.h (enum pragma_omp_clause): Add
4417 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4418 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4419
f41b7612
JJ
44202018-06-20 Jakub Jelinek <jakub@redhat.com>
4421
4422 PR c++/86210
4423 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4424 comment.
4425
4252ccd7
MS
44262018-06-18 Martin Sebor <msebor@redhat.com>
4427
4428 PR middle-end/85602
4429 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4430 nonstring.
4431
e197e64e
KV
44322018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4433
4434 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4435
34a7a230
JM
44362018-06-13 Jason Merrill <jason@redhat.com>
4437
5cef3733
JM
4438 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4439 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4440 handling.
4441
34a7a230
JM
4442 PR c++/86094 - wrong code with defaulted move ctor.
4443 * c-opts.c (c_common_post_options): Bump the current ABI version to
4444 13. Set warn_abi_version and flag_abi_compat_version to the current
4445 version rather than 0. Fix defaulting flag_abi_compat_version from
4446 warn_abi_version.
4447
bb0f14ae
MS
44482018-06-12 Martin Sebor <msebor@redhat.com>
4449
4450 PR c/85931
4451 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4452 sizeof source and destination yields the same value.
4453
3713f2e2
ML
44542018-06-12 Martin Liska <mliska@suse.cz>
4455
4456 * c.opt: Make MPX-related options as Deprecated.
4457
4af78ef8
DM
44582018-06-08 David Malcolm <dmalcolm@redhat.com>
4459
4460 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4461 rather than 0.
4462
31db0fe0
ML
44632018-06-08 Martin Liska <mliska@suse.cz>
4464
4465 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4466 for MPX (macros, related functions, fields in cgraph_node, ...).
4467 (handle_bnd_legacy): Likewise.
4468 (handle_bnd_instrument): Likewise.
4469 * c.opt: Likewise.
4470
fe16acf2
JJ
44712018-06-06 Jakub Jelinek <jakub@redhat.com>
4472
4473 PR c++/86068
4474 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4475 __cpp_transactional_memory to 201500 instead of 210500.
4476
4dbdb49b
JM
44772018-06-06 Jason Merrill <jason@redhat.com>
4478
4479 PR c++/85710 - ICE with -Wmemset-elt-size.
4480 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4481
f8ad043f
JM
44822018-06-01 Jason Merrill <jason@redhat.com>
4483
4484 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4485 201703.
4486
abc24d93
EB
44872018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4488
4489 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4490 declaration for a typedef independently of whether the declaration of
4491 the subtype is generated.
4492
d258f4aa
MS
44932018-05-31 Martin Sebor <msebor@redhat.com>
4494
4495 PR c/82063
4496 * c.opt (-Wno-alloc-size-larger-than): New option.
4497
b67b9225
DP
44982018-04-22 David Pagan <dave.pagan@oracle.com>
4499
4500 PR c/55976
4501 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4502 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4503 differentiate between default (no option), -Wreturn-type, and
4504 -Wno-return-type.
4505
04eb9c55
JM
45062018-05-29 Jason Merrill <jason@redhat.com>
4507
4508 * c.opt (Winit-list-lifetime): New flag.
4509
b0c31bc6
BE
45102018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4511
4512 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4513 splay_tree_delete_pointers.
4514
44284983
JJ
45152018-05-26 Jakub Jelinek <jakub@redhat.com>
4516
4517 PR bootstrap/85921
4518 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4519 noinline variable to workaround broken kernel headers.
4520
b46b715d
JM
45212018-05-18 Jason Merrill <jason@redhat.com>
4522
4523 * c.opt (Wdeprecated-copy): New flag.
4524
40659769
ML
45252018-05-17 Martin Liska <mliska@suse.cz>
4526
4527 * c-warn.c (overflow_warning): Do not use
4528 space in between 'G_' and '('.
4529
403962ea
JM
45302018-05-09 Jason Merrill <jason@redhat.com>
4531
4532 * c-common.c (valid_array_size_p): Add complain parameter.
4533 * c-common.h: ...which defaults to true.
4534
1c9ee609
JJ
45352018-05-11 Jakub Jelinek <jakub@redhat.com>
4536
4537 PR c/85696
4538 * c-omp.c (c_omp_predetermined_sharing): Return
4539 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4540
19916065
ML
45412018-05-11 Martin Liska <mliska@suse.cz>
4542
92a285c1 4543 PR sanitizer/85556
19916065
ML
4544 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4545 TREE_LIST values.
4546
79e7b1fe
JJ
45472018-05-10 Jakub Jelinek <jakub@redhat.com>
4548
4549 PR c++/85662
4550 * c-common.h (fold_offsetof_1): Removed.
4551 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4552 CTX argument defaulted to ERROR_MARK.
4553 * c-common.c (fold_offsetof_1): Renamed to ...
4554 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4555 argument, convert the pointer constant to TYPE and use size_binop
4556 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4557 a pointer type. Adjust recursive calls.
4558
86c12f76
EB
45592018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4560
4561 PR c++/85400
4562 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4563
ee336e84
NS
45642018-05-07 Nathan Sidwell <nathan@acm.org>
4565
4566 * c.opt (ffor-scope): Remove functionality, issue warning.
4567
6c072e21
NS
45682018-05-03 Nathan Sidwell <nathan@acm.org>
4569
4570 * c.opt (ffriend-injection): Remove functionality, issue warning.
4571
2cc7d3a7
DM
45722018-05-01 David Malcolm <dmalcolm@redhat.com>
4573
4574 PR c/84258
4575 * c-format.c (struct format_check_results): Add field
4576 "number_non_char".
4577 (check_format_info): Initialize it, and warn if encountered.
4578 (check_format_arg): Distinguish between wide char and
4579 everything else when detecting arrays of non-char.
4580
7761dfbe
DM
45812018-04-30 David Malcolm <dmalcolm@redhat.com>
4582
4583 * c-format.c (get_corrected_substring): Update for
4584 location_get_source_line returning a char_span. Use a char_span
4585 when handling the prefix of the correction.
4586 * c-indentation.c (get_visual_column): Update for
4587 location_get_source_line returning a char_span.
4588 (get_first_nws_vis_column): Likewise.
4589
62e98ef1
DM
45902018-03-29 David Malcolm <dmalcolm@redhat.com>
4591
4592 PR c++/84269
4593 * known-headers.cc (get_stdlib_header_for_name): Add various names
4594 from <assert.h>, <string.h>, and <memory.h>; add more names from
4595 <stdio.h>.
4596
a7dea617
JJ
45972018-03-27 Jakub Jelinek <jakub@redhat.com>
4598
4599 PR c++/85061
4600 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4601 get_base_address of the second operand is a VAR_P, rather than the
4602 operand itself, and use gcc_checking_assert instead of gcc_assert.
4603
889a3a30
MP
46042018-03-23 Marek Polacek <polacek@redhat.com>
4605
4606 PR c++/85045
4607 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4608 <case RDIV_EXPR>: Tweak condition.
4609
452154b9
EB
46102018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4611
4612 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4613
63ecb626
JJ
46142018-03-16 Jakub Jelinek <jakub@redhat.com>
4615
ce811fc4
JJ
4616 PR c/84909
4617 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4618 diagnostics.
4619
63ecb626
JJ
4620 PR c/84910
4621 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4622 diagnostics.
4623
a1295eec
RB
46242018-03-16 Richard Biener <rguenther@suse.de>
4625
4626 PR c/84873
4627 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4628 unshare the possibly folded expression.
4629
919674fb
RB
46302018-03-15 Richard Biener <rguenther@suse.de>
4631
4632 PR c/84873
4633 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4634
f99309b2
MS
46352018-03-13 Martin Sebor <msebor@redhat.com>
4636
4637 PR tree-optimization/84725
4638 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4639 with all three narrow character types, including their qualified forms.
4640
e9b9fa4c
MS
46412018-03-12 Martin Sebor <msebor@redhat.com>
4642
4643 PR tree-optimization/83456
ab20d992 4644 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4645 Restore checking of bounded built-in functions.
4646 (check_function_arguments): Also return the result
4647 of warn_for_restrict.
ab20d992
JJ
4648 * c-common.c (check_function_restrict): Return bool.
4649 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4650
0805d020
MP
46512018-03-02 Marek Polacek <polacek@redhat.com>
4652
4653 PR c++/84171
4654 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4655 is erroneous.
4656
ed2a2f08
TS
46572018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4658
4659 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4660 function".
4661
90abdde0
MP
46622018-03-01 Marek Polacek <polacek@redhat.com>
4663
4664 PR c++/84639
4665 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4666 alignment in computation.
4667
c6db43fa
EB
46682018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4669
4670 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4671 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4672
9e25c7ed
EB
46732018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4674
4675 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4676 (is_char_array): Take a type instead of a declaration.
4677 (dump_ada_array_type): Likewise.
4678 (is_simple_enum): Minor tweak.
4679 (dump_ada_enum_type): New function extracted from...
4680 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4681 <INTEGER_TYPE>: Remove unreachable code.
4682 <RECORD_TYPE>: Likewise. Minor tweaks.
4683 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4684 <ENUMERAL_TYPE>: New case.
4685 <RECORD_TYPE>: Factor out common code.
4686 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4687 Minor tweaks. Deal with enumeral types.
4688 (dump_ada_structure): Minor tweaks.
4689
09de3550
EB
46902018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4691
4692 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4693 address for incomplete structures.
4694 (dump_forward_type): Do not bail out for incomplete structures.
4695 (dump_ada_declaration): Do not special-case incomplete structures
4696 for subtypes. Dump them as null records for types.
4697
095d8d4b
EB
46982018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4699
4700 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4701 (is_char_array): Fix formatting.
4702 (dump_template_types): Likewise.
4703 (dump_generic_ada_node): Rename into...
4704 (dump_ada_node): ...this.
4705 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4706 incomplete structures and not for empty structures. Do not use it
4707 when forward declarations are needed.
4708 (dump_forward_type): New function.
4709 (dump_nested_types): Remove FORWARD parameter. Do not consider
4710 TREE_VISITED and do not generate a forward declaration. Only dump
4711 original nested types for nested declaration.
4712 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4713 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4714 <RECORD_TYPE>: Do not consider TREE_VISITED.
4715 (dump_ada_declaration): Use booleans and fix formatting throughout.
4716 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4717 Call dump_forward_type instead of dump_nested_types for a typedef.
4718 Remove superfluous check and adjust call to dump_nested_types.
4719 <POINTER_TYPE>: Call dump_forward_type and fall through.
4720 (dump_ada_struct_decl): Rename into...
4721 (dump_ada_structure): ...this. Do not special-case empty structures.
4722
d4cfd486
MS
47232018-02-27 Martin Sebor <msebor@redhat.com>
4724
4725 PR c++/83871
4726 * c.opt (-Wmissing-attributes): New option.
4727
b22dbd03
ML
47282018-02-21 Martin Liska <mliska@suse.cz>
4729
4730 * c.opt (Wcatch-value=): Add IntegerRange.
4731
883dfe2a
JM
47322018-02-15 Jason Merrill <jason@redhat.com>
4733
4734 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4735
0444aa9c
NS
47362018-02-09 Nathan Sidwell <nathan@acm.org>
4737
4738 PR c/84293
4739 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4740 arg.
4741 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4742 arg. Adjust.
4743
cea71f0a
MS
47442018-02-09 Martin Sebor <msebor@redhat.com>
4745
4746 PR lto/84212
4747 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4748 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4749 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4750 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4751 (-Wuninitialized): Same.
4752
8c8b7be5
EB
47532018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4754
4755 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4756 keyword for components.
4757
7c30b12a
PC
47582018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4759
4760 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4761
eece7fe5
JK
47622018-02-02 Julia Koval <julia.koval@intel.com>
4763
4764 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4765
7d07a93a
MP
47662018-01-29 Marek Polacek <polacek@redhat.com>
4767
4768 PR c/83966
4769 * c-format.c (check_function_format): Check current_function_decl.
4770
53723269
JJ
47712018-01-27 Jakub Jelinek <jakub@redhat.com>
4772
4773 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4774 argument.
4775 (LAZY_HEX_FP_VALUES_CNT): Define.
4776 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4777 values rather than just 12.
4778 (builtin_define_with_hex_fp_value): Likewise.
4779
7365279f
BK
47802018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4781
92a285c1
ML
4782 PR other/70268
4783 * c.opt (-fmacro-prefix-map): New option.
4784 * c-opts.c (c_common_handle_option): Handle it.
4785 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4786 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4787
bb9869d5
DM
47882018-01-17 David Malcolm <dmalcolm@redhat.com>
4789
4790 PR c++/83814
4791 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4792
68dc87c3
EB
47932018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4794
4795 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4796 Skip 'f' and 'F' characters if it is true.
4797 (store_ada_macro): Minor tweak.
4798 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4799 <CPP_WSTRING>: Likewise.
4800 <CPP_STRING>: Output '&' in the buffer if not the first string.
4801 <CPP_NUMBER>: Adjust calls to dump_number.
4802
9a004410
DM
48032018-01-10 David Malcolm <dmalcolm@redhat.com>
4804
4805 PR c++/43486
4806 * c-common.c: Include "selftest.h".
4807 (get_atomic_generic_size): Perform the test for integral type
4808 before the range test for any integer constant, fixing indentation
4809 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4810 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4811 (selftest::test_fold_for_warn): New function.
4812 (selftest::c_common_c_tests): New function.
4813 (selftest::c_family_tests): Call it, and
4814 selftest::c_pretty_print_c_tests.
4815 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4816 * c-format.c (check_format_arg): Convert VAR_P check to a
4817 fold_for_warn.
4818 * c-pretty-print.c: Include "selftest.h".
4819 (pp_c_cast_expression): Don't print casts for location wrappers.
4820 (selftest::assert_c_pretty_printer_output): New function.
4821 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4822 (selftest::test_location_wrappers): New function.
4823 (selftest::c_pretty_print_c_tests): New function.
4824 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4825
5c0caeb3
RS
48262018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4827 Alan Hayward <alan.hayward@arm.com>
4828 David Sherwood <david.sherwood@arm.com>
4829
4830 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4831
73a699ae
RS
48322018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4833 Alan Hayward <alan.hayward@arm.com>
4834 David Sherwood <david.sherwood@arm.com>
4835
4836 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4837 as polynomial.
4838
928686b1
RS
48392018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4840 Alan Hayward <alan.hayward@arm.com>
4841 David Sherwood <david.sherwood@arm.com>
4842
4843 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4844 (convert_vector_to_array_for_subscript): Handle polynomial
4845 TYPE_VECTOR_SUBPARTS.
4846 (c_common_type_for_mode): Check valid_vector_subparts_p.
4847 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4848 VECTOR_CST_NELTS.
4849
85ec4feb
JJ
48502018-01-03 Jakub Jelinek <jakub@redhat.com>
4851
4852 Update copyright years.
4853
170a8bd6 48542017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4855 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4856
4857 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4858 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4859
ab20d992 48602017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4861
4862 PR debug/83527
4863 PR debug/83419
4864 * c-semantics.c (only_debug_stmts_after_p): New.
4865 (pop_stmt_list): Clear side effects in debug-only stmt list.
4866 Check for single nondebug stmt followed by debug stmts only.
4867
c12d20d4
AO
48682017-12-21 Alexandre Oliva <aoliva@redhat.com>
4869
4870 PR debug/83419
4871 * c-semantics.c (pop_stmt_list): Propagate side effects from
4872 single nondebug stmt to container list.
4873
01512446
JJ
48742017-12-19 Jakub Jelinek <jakub@redhat.com>
4875
4876 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4877 conditions with typical order conditions.
4878
82cfbd01
MP
48792017-12-18 Marek Polacek <polacek@redhat.com>
4880
4881 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4882 not in effect.
4883
99da11ec
MS
48842017-12-17 Martin Sebor <msebor@redhat.com>
4885
4886 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4887 an error for attribute warn_if_not_aligned.
4888
cc8bea0a
MS
48892017-12-16 Martin Sebor <msebor@redhat.com>
4890
4891 PR tree-optimization/78918
4892 * c-common.c (check_function_restrict): Avoid checking built-ins.
4893 * c.opt (-Wrestrict): Include in -Wall.
4894
4849deb1
JJ
48952017-12-15 Jakub Jelinek <jakub@redhat.com>
4896
4897 * c-attribs.c (c_common_attribute_table,
4898 c_common_format_attribute_table): Swap affects_type_identity
4899 and handler fields, adjust comments.
4900
c65e18d3
BE
49012017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4902
4903 * c.opt (Wcast-function-type): New warning option.
4904 * c-lex.c (get_fileinfo): Avoid warning.
4905 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4906
2004617a
QZ
49072017-12-14 Qing Zhao <qing.zhao@oracle.com>
4908
7365279f 4909 PR middle_end/79538
2004617a
QZ
4910 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4911 Adjust the size of buf1 and buf2, add a new buf to avoid
4912 format-overflow warning.
4913
ab20d992 49142017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4915
4916 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4917 subsequent statement list.
4918
5d9ae53d
MS
49192017-12-07 Martin Sebor <msebor@redhat.com>
4920
4921 PR c/81544
4922 PR c/81566
4923 * c-attribs.c (attr_aligned_exclusions): New array.
4924 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4925 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4926 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4927 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4928 (attr_warn_unused_result_exclusions): Same.
4929 (handle_hot_attribute, handle_cold_attribute): Simplify.
4930 (handle_const_attribute): Warn on function returning void.
4931 (handle_pure_attribute): Same.
4932 (handle_aligned_attribute): Diagnose conflicting attribute
4933 specifications.
4934 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4935
c79144f8
DM
49362017-12-06 David Malcolm <dmalcolm@redhat.com>
4937
4938 PR c/83236
4939 * c-common.c (selftest::c_family_tests): Call
4940 selftest::c_spellcheck_cc_tests.
4941 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4942 * c-spellcheck.cc: Include "selftest.h".
4943 (name_reserved_for_implementation_p): New function.
4944 (should_suggest_as_macro_p): New function.
4945 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4946 should_suggest_as_macro_p and call it.
4947 (selftest::test_name_reserved_for_implementation_p): New function.
4948 (selftest::c_spellcheck_cc_tests): New function.
4949 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4950
613bc14f
DM
49512017-12-06 David Malcolm <dmalcolm@redhat.com>
4952
4953 * c-spellcheck.cc: New file, taken from macro-handling code in
4954 spellcheck-tree.c.
4955 * c-spellcheck.h: New file, taken from macro-handling code in
4956 spellcheck-tree.h.
4957
e76c7157
JJ
49582017-12-01 Jakub Jelinek <jakub@redhat.com>
4959
4960 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4961 attribute.
4962 (handle_simd_attribute): Don't check for "cilk simd function"
4963 attribute. Reindent, formatting changes.
4964
b0da4034
JK
49652017-11-30 Julia Koval <julia.koval@intel.com>
4966
4967 * c-common.h (inv_list): Remove.
4968
058f0b9e
JJ
49692017-11-28 Jakub Jelinek <jakub@redhat.com>
4970
4971 PR sanitizer/81275
4972 * c-common.c (c_switch_covers_all_cases_p_1,
4973 c_switch_covers_all_cases_p): New functions.
4974 * c-common.h (c_switch_covers_all_cases_p): Declare.
4975
5e9d6aa4 49762017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4977 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4978
4979 * array-notation-common.c: Delete.
4980 * c-cilkplus.c: Ditto.
4981 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4982 * c-common.def (ARRAY_NOTATION_REF): Remove.
4983 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4984 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4985 c_validate_cilk_plus_loop, cilkplus_an_parts,
4986 cilk_ignorable_spawn_rhs_op,
4987 cilk_recognize_spawn): Remove.
4988 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4989 * c-omp.c: Remove CILK_SIMD check.
4990 * c-pragma.c: Ditto.
4991 * c-pragma.h: Remove CILK related pragmas.
4992 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4993 ARRAY_NOTATION_REF condition.
4994 (c_pretty_printer::expression): Ditto.
4995 * c.opt (fcilkplus): Remove.
4996 * cilk.c: Delete.
4997
1af4ebf5
MG
49982017-11-21 Marc Glisse <marc.glisse@inria.fr>
4999
5000 * c-pretty-print.c (pp_c_additive_expression,
5001 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5002
d44ed508
JJ
50032017-11-21 Jakub Jelinek <jakub@redhat.com>
5004
7d2f0f9b
JJ
5005 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5006
d44ed508
JJ
5007 PR c++/83059
5008 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5009 instead of tree_to_uhwi, formatting fix.
5010
26edace6
DM
50112017-11-20 David Malcolm <dmalcolm@redhat.com>
5012
5013 PR c/81404
5014 * known-headers.cc: New file, based on material from c/c-decl.c.
5015 (suggest_missing_header): Copied as-is.
5016 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5017 heavily edited to add C++ support. Add some knowledge about
5018 <limits.h>, <stdint.h>, and <wchar.h>.
5019 * known-headers.h: Likewise.
5020
6c7a259b
DM
50212017-11-20 David Malcolm <dmalcolm@redhat.com>
5022
5023 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5024 (lookup_name_fuzzy): Likewise. Convert return type from
5025 const char * to name_hint. Add location_t param.
5026 * name-hint.h: New header.
5027
f9c59f7e
JJ
50282017-11-19 Jakub Jelinek <jakub@redhat.com>
5029
5030 PR c/66618
5031 PR c/69960
5032 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5033
1e39313a
JM
50342017-11-16 Joseph Myers <joseph@codesourcery.com>
5035
5036 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5037 expected publication date of C17.
5038 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5039
3ca0dc60
JM
50402017-11-15 Joseph Myers <joseph@codesourcery.com>
5041
5042 PR c/81156
5043 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5044 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5045
025d57f0
MS
50462017-11-10 Martin Sebor <msebor@redhat.com>
5047
5048 PR c/81117
5049 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5050 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5051 * c.opt (-Wstringop-truncation): New option.
5052
1b6fa695
ML
50532017-11-06 Martin Liska <mliska@suse.cz>
5054
5055 PR middle-end/82404
5056 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5057 FE.
5058 * c.opt: Set default value of warn_return_type.
5059
64a5912c
DM
50602017-10-31 David Malcolm <dmalcolm@redhat.com>
5061
5062 * c-common.c (binary_op_error): Update for renaming of
5063 error_at_rich_loc.
5064 (c_parse_error): Likewise.
5065 * c-warn.c (warn_logical_not_parentheses): Likewise for
5066 renaming of inform_at_rich_loc.
5067 (warn_for_restrict): Likewise for renaming of
5068 warning_at_rich_loc_n.
5069
c76dc9c3
JM
50702017-10-30 Joseph Myers <joseph@codesourcery.com>
5071
5072 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5073 * c-opts.c (set_std_c17): New function.
5074 (c_common_init_options): Use gnu17 as default C version.
5075 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5076
ee5fd23a
MM
50772017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5078
5079 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5080 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5081 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5082 __FP_FAST_FMA<N>X.
5083
d1047465
MP
50842017-10-23 Marek Polacek <polacek@redhat.com>
5085
5086 PR c/82681
5087 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5088
9e878cf1
EB
50892017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5090
5091 * c-common.c (check_builtin_function_arguments): Also check arguments
5092 of __builtin_alloca_with_align_and_max.
5093
89b6abbb
DM
50942017-10-17 David Malcolm <dmalcolm@redhat.com>
5095
5096 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5097 rather than NULL to format_warning_va.
5098 (check_format_types): Likewise when calling format_type_warning.
5099 Remove code to extract source_ranges and source_range * in favor
5100 of just a location_t.
5101 (format_type_warning): Convert source_range * param to a
5102 location_t.
5103
39382c09
JJ
51042017-10-13 Jakub Jelinek <jakub@redhat.com>
5105
5106 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5107 [LR]SHIFT_EXPR.
5108
62e1c678
DM
51092017-10-12 David Malcolm <dmalcolm@redhat.com>
5110
5111 * c-common.c (enum missing_token_insertion_kind): New enum.
5112 (get_missing_token_insertion_kind): New function.
5113 (maybe_suggest_missing_token_insertion): New function.
5114 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5115
b90c9338
NS
51162017-10-11 Nathan Sidwell <nathan@acm.org>
5117
5118 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5119 (c_common_handle_option): Update incpath_kind names.
5120
3a266bcd
ML
51212017-10-11 Martin Liska <mliska@suse.cz>
5122
5123 PR sanitizer/82490
5124 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5125 Wattributes warning.
5126
8e6cdc90
RS
51272017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5128
5129 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5130 operating on trees as wide_ints.
5131 * c-common.c (pointer_int_sum): Likewise.
5132 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5133 * c-warn.c (match_case_to_enum_1): Likewise.
5134 (c_do_switch_warnings): Likewise.
5135 (maybe_warn_shift_overflow): Likewise.
5136
802b38c9
JJ
51372017-10-10 Jakub Jelinek <jakub@redhat.com>
5138
5139 PR c/82437
5140 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5141 instead of wide_int::from.
5142
4e34b338
JJ
51432017-10-06 Jakub Jelinek <jakub@redhat.com>
5144
5145 PR c/82437
5146 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5147 using to_widest use wide_int with the larger of the two precisions.
5148
4bc4b2b4
BE
51492017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5150
5151 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5152 functions.
5153
a1488398
RS
51542017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5155
5156 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5157 when combining the original unconverted comparison operands.
5158
01c9fb68
JJ
51592017-09-29 Jakub Jelinek <jakub@redhat.com>
5160
5161 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5162 attribute.
5163
6e3e8419
EB
51642017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5165
5166 * c-ada-spec.c (to_ada_name): Add index parameter.
5167 (pp_ada_tree_identifier): Likewise.
5168 (dump_ada_macros): Adjust call to to_ada_name.
5169 (struct overloaded_name_hash): New type.
5170 (struct overloaded_name_hasher): Likewise.
5171 (overloaded_names): New hash table.
5172 (compute_overloading_index): New function.
5173 (dump_ada_decl_name): Call it and pass the result to
5174 pp_ada_tree_identifier.
5175 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5176 (dump_ada_function_declaration): Likewise.
5177 (dump_generic_ada_node): Likewise.
5178 (print_constructor): Likewise.
5179 (print_destructor): Likewise.
5180 (dump_ada_specs): Delete overloaded_names table.
5181
79310774
EB
51822017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5183
5184 * c-ada-spec.c (max_ada_macros): Move around.
5185 (store_ada_macro_index): Likewise.
5186 (source_file): Rename into...
5187 (macro_source_file): ...this.
5188 (count_ada_macro): Move around.
5189 (store_ada_macro): Likewise.
5190 (compare_macro): Likewise.
5191 (print_ada_macros): Merge in...
5192 (dump_ada_macros): ...this.
5193 (source_file_base): Rename into...
5194 (current_source_file): ...this.
5195 (print_comment): Move around.
5196 (dump_ada_nodes): Call dump_ada_declaration directly.
5197 (struct with): Change type of limited field to bool.
5198 (append_withs): Change type of limited_access parameter to bool.
5199 (pp_ada_tree_identifie): Likewise.
5200 (dump_ada_decl_nam): Likewise.
5201 (dump_generic_ada_node): Likewise. Do not print the return type.
5202 (to_ada_name): Change type of space_found parameter to bool.
5203 (dump_ada_function_declaration): Return void and change type of
5204 parameters to bool. Also print the return type for a function.
5205 (print_ada_methods): Rename into...
5206 (dump_ada_methods): ...this.
5207 (print_ada_declaration): Rename into ...
5208 (dump_ada_declaration): ...this. Do not print the return type.
5209 (print_ada_struct_decl): Rename into...
5210 (dump_ada_struct_decl): ...this.
5211
7d386d45
JJ
52122017-09-29 Jakub Jelinek <jakub@redhat.com>
5213
5214 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5215 rather than DECL_INITIAL.
5216 (common_handle_aligned_attribute): Likewise.
5217
ab20d992 52182017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5219
5220 * c.opt (gen-decls): Add RejectNegative.
5221
026a79f7
AS
52222017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5223 Jakub Jelinek <jakub@redhat.com>
5224
5225 Add support for -std=c++2a.
5226 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5227 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5228 * c-opts.c (set_std_cxx2a): New.
5229 (c_common_handle_option): Set options when -std=c++2a is enabled.
5230 (c_common_post_options): Adjust comments.
5231 (set_std_cxx14, set_std_cxx17): Likewise.
5232
4a8ca690
EB
52332017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5234
5235 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5236 message for non-uniform endianness and issue a warning in C++.
5237
7b936140
JJ
52382017-09-15 Jakub Jelinek <jakub@redhat.com>
5239
5240 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5241 (Wc++17-compat): Change from undocumented alias to option.
5242 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5243 change C++1z to C++17 in description.
5244 (std=c++1z, std=gnu++1z): Change from option to undocumented
5245 deprecated alias.
5246 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5247 Adjust description.
5248 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5249 * c-opts.c (set_std_cxx1z): Rename to ...
5250 (set_std_cxx17): ... this.
5251 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5252 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5253 caller.
7b936140
JJ
5254 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5255 comments.
5256
12263f13
L
52572017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5258
5259 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5260 function alignment if warn_if_not_aligned_p is true.
5261
6836632e
NS
52622017-09-12 Nathan Sidwell <nathan@acm.org>
5263
5264 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5265 resort_sorted_fields): Move to c/c-decl.c.
5266 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5267 (struct sorted_fields_type): Move to c/c-lang.h.
5268
019bf9ad
JW
52692017-09-09 Jonathan Wakely <jwakely@redhat.com>
5270
5271 PR c++/81852
5272 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5273
bc7fe952
MP
52742017-09-04 Marek Polacek <polacek@redhat.com>
5275
5276 PR c/81783
5277 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5278 (warn_tautological_cmp): Call it.
5279
ab20d992 52802017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5281
5282 * c-opts.c (c_common_finish): Write dependency information even if
5283 there are errors.
5284
d2e05fcb
JJ
52852017-09-01 Jakub Jelinek <jakub@redhat.com>
5286
5287 PR c/81887
5288 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5289 (omp_pragmas_simd): ... here.
5290 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5291 create new clauses list containing just simd clause.
5292
18e2a8b8
RS
52932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5294 Alan Hayward <alan.hayward@arm.com>
5295 David Sherwood <david.sherwood@arm.com>
5296
5297 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5298 into scalar_mode_supported_p call.
5299 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5300
16d22000
RS
53012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5302 Alan Hayward <alan.hayward@arm.com>
5303 David Sherwood <david.sherwood@arm.com>
5304
5305 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5306 for the mode iterator.
5307
b397965c
RS
53082017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5309 Alan Hayward <alan.hayward@arm.com>
5310 David Sherwood <david.sherwood@arm.com>
5311
5312 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5313 * c-common.c (c_build_vec_perm_expr): Likewise.
5314
357b7604
RS
53152017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5316 Alan Hayward <alan.hayward@arm.com>
5317 David Sherwood <david.sherwood@arm.com>
5318
5319 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5320
e05c94ba
RS
53212017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5322 Alan Hayward <alan.hayward@arm.com>
5323 David Sherwood <david.sherwood@arm.com>
5324
5325 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5326 before calling targetm.addr_space.valid_pointer_mode.
5327
5c20c4af
RS
53282017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5329 Alan Hayward <alan.hayward@arm.com>
5330 David Sherwood <david.sherwood@arm.com>
5331
5332 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5333
c94843d2 53342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5335 Alan Hayward <alan.hayward@arm.com>
5336 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5337
5338 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5339 iterators.
5340 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5341
4e10a5a7
RS
53422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5343 Alan Hayward <alan.hayward@arm.com>
5344 David Sherwood <david.sherwood@arm.com>
5345
5346 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5347 case statements.
5348
130fcab0
ML
53492017-08-29 Martin Liska <mliska@suse.cz>
5350
5351 PR other/39851
5352 * c-common.c (parse_optimize_options): Add argument to function
5353 call.
5354 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5355
14e18d71
DM
53562017-08-24 David Malcolm <dmalcolm@redhat.com>
5357
5358 * c-lex.c (interpret_float): Use token location
5359 when building an EXCESS_PRECISION_EXPR.
5360
2f687306
DM
53612017-08-21 David Malcolm <dmalcolm@redhat.com>
5362
5363 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5364 it to check_function_format.
5365 * c-common.h (check_function_arguments): Add vec<location_t> *
5366 param.
5367 (check_function_format): Likewise.
5368 * c-format.c (struct format_check_context): Add field "arglocs".
5369 (check_function_format): Add param "arglocs"; pass it to
5370 check_format_info.
ab20d992 5371 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5372 new field of format_ctx.
5373 (check_format_arg): Pass format_ctx->arglocs to new param of
5374 check_format_info_main.
5375 (class argument_parser): New field "arglocs".
5376 (argument_parser::argument_parser): Add "arglocs_" param and use
5377 it to initialize new field.
5378 (argument_parser::check_argument_type): Pass new arglocs field to
5379 check_format_types.
5380 (check_format_info_main): Add param "arglocs", and use it when
5381 constructing arg_parser.
5382 (check_format_types): Add param "arglocs"; use it if non-NULL when
5383 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5384
00aa1fa2
L
53852017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5386
5387 PR c/53037
5388 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5389 (c_common_attribute_table): Add warn_if_not_aligned.
5390 (handle_aligned_attribute): Renamed to ...
5391 (common_handle_aligned_attribute): Remove argument, name, and add
5392 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5393 (handle_aligned_attribute): New.
5394 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5395
27be025d
MS
53962017-08-14 Martin Sebor <msebor@redhat.com>
5397
5398 PR c/81117
5399 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5400 (handle_nonstring_attribute): New function.
5401
da67acb9
MS
54022017-08-14 Martin Sebor <msebor@redhat.com>
5403
5404 PR c/81117
5405 * c-format.h (T89_G): New macro.
5406 * c-format.c (local_gcall_ptr_node): New variable.
5407 (init_dynamic_diag_info): Initialize it.
5408
a8b522b4
ML
54092017-08-11 Martin Liska <mliska@suse.cz>
5410
5411 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5412 TARGET_SUPPORTS_ALIASES.
5413
32129a17
DM
54142017-08-10 David Malcolm <dmalcolm@redhat.com>
5415
5416 * c-common.c (c_parse_error): Add rich_location * param, using it
5417 rather implicitly using input_location.
5418 * c-common.h (c_parse_error): Add rich_location * param.
5419
30af3a2b
MP
54202017-08-09 Marek Polacek <polacek@redhat.com>
5421
5422 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5423 (c_common_truthvalue_conversion): Likewise.
5424 * c-omp.c (c_finish_omp_atomic): Likewise.
5425 * c-common.h (build_binary_op): Update declaration.
5426
314e6352
ML
54272017-08-08 Martin Liska <mliska@suse.cz>
5428
5429 * c-ada-spec.c: Include header files.
5430 * c-ubsan.c: Likewise.
5431 * c-warn.c: Likewise.
5432
56b5041c
JJ
54332017-08-07 Jakub Jelinek <jakub@redhat.com>
5434
5435 PR c/69389
5436 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5437
db440138
EB
54382017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5439
5440 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5441 (print_ada_methods): Likewise.
5442 (print_ada_declaration): Likewise.
5443
577eec56
ML
54442017-08-07 Martin Liska <mliska@suse.cz>
5445
5446 * array-notation-common.c: Add new includes.
5447 * c-format.c( handle_format_attribute): Canonicalize a format
5448 function name.
5449 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5450 attribute.
5451 * c-pretty-print.c: Add new include.
5452
b854df3c
EB
54532017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5454
5455 * c-ada-spec.c (has_static_fields): Look only into variables.
5456 (print_constructor): Add TYPE parameter and use it for the name.
5457 (print_destructor): Likewise.
5458 (print_ada_declaration): Adjust to new constructor/destructor names.
5459 Adjust calls to print_constructor and print_destructor.
5460 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5461 Look only into variables in the final loop.
5462
9f2cb25e
EB
54632017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5464
5465 * c-ada-spec.c (has_static_fields): Look only into fields.
5466 (dump_generic_ada_node): Small tweak.
5467 (dump_nested_types): Look only into fields.
5468 (print_ada_declaration): Look only into methods. Small tweak.
5469 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5470
f4bcd9eb
EB
54712017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5472
5473 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5474 (dump_ada_function_declaration): Likewise.
5475 (dump_generic_ada_node): Likewise.
5476 (print_ada_declaration): Add support for const-qualified variables.
5477
f34ebeb2
ML
54782017-07-31 Martin Liska <mliska@suse.cz>
5479
5480 PR sanitize/81530
5481 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5482 Guard condition with flag_sanitize_p also with current_function_decl
5483 non-null equality.
5484 (ubsan_maybe_instrument_reference_or_call): Likewise.
5485
218e5d04
UB
54862017-07-30 Uros Bizjak <ubizjak@gmail.com>
5487
5488 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5489
942047f2
EB
54902017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5491
5492 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5493 for enumeral types.
5494 (print_ada_declaration): Add missing guard for record types.
5495
a40ff0ae
JJ
54962017-07-27 Jakub Jelinek <jakub@redhat.com>
5497
5498 PR c/45784
5499 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5500 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5501 new COMPOUND_EXPRs around the rhs of the comparison.
5502
06bd22f6
MP
55032017-07-27 Marek Polacek <polacek@redhat.com>
5504
5505 PR c/81417
5506 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5507 the types.
5508
036ea399
JJ
55092017-07-27 Jakub Jelinek <jakub@redhat.com>
5510
5511 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5512 (handle_noipa_attribute): New function.
5513
417ca011
TD
55142017-07-07 Torsten Duwe <duwe@suse.de>
5515
5516 * c-attribs.c (c_common_attribute_table): Add entry for
5517 "patchable_function_entry".
5518
5aaa8fb4
NS
55192017-07-20 Nathan Sidwell <nathan@acm.org>
5520
5521 Remove TYPE_METHODS.
5522 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5523 dump_ada_template, print_ada_methods,
5524 print_ada_declaration): Member fns are on TYPE_FIELDS.
5525
ff22eb12
NS
55262017-07-18 Nathan Sidwell <nathan@acm.org>
5527
5528 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5529
eea77d1f
DM
55302017-07-14 David Malcolm <dmalcolm@redhat.com>
5531
5532 * c-common.c (try_to_locate_new_include_insertion_point): New
5533 function.
5534 (per_file_includes_t): New typedef.
5535 (added_includes_t): New typedef.
5536 (added_includes): New variable.
5537 (maybe_add_include_fixit): New function.
5538 * c-common.h (maybe_add_include_fixit): New decl.
5539
281ac396
MS
55402017-07-10 Martin Sebor <msebor@redhat.com>
5541
5542 PR other/81345
5543 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5544
b6f43128
DM
55452017-07-06 David Malcolm <dmalcolm@redhat.com>
5546
5547 * c-common.c (selftest::c_family_tests): New.
5548 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5549 (selftest::c_family_tests): New decl.
5550
efbf55b0
MP
55512017-07-04 Marek Polacek <polacek@redhat.com>
5552
5553 PR c/81231
5554 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5555 types.
5556
6c86bd88
MP
55572017-07-04 Marek Polacek <polacek@redhat.com>
5558
5559 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5560
17a7218b
ML
55612017-06-28 Martin Liska <mliska@suse.cz>
5562
5563 PR ipa/81128
5564 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5565 to a function declaration.
5566
63010089
ML
55672017-06-28 Martin Liska <mliska@suse.cz>
5568
5569 PR driver/79659
5570 * c.opt: Add IntegerRange to various options.
5571
3e2becc4
MP
55722017-06-26 Marek Polacek <polacek@redhat.com>
5573
5574 PR c/80116
5575 * c-common.h (warn_for_multistatement_macros): Declare.
5576 * c-warn.c: Include "c-family/c-indentation.h".
5577 (warn_for_multistatement_macros): New function.
5578 * c.opt (Wmultistatement-macros): New option.
5579 * c-indentation.c (guard_tinfo_to_string): No longer static.
5580 Change the parameter type to "enum rid". Handle RID_SWITCH.
5581 * c-indentation.h (guard_tinfo_to_string): Declare.
5582
2db9b7cd
MG
55832017-06-23 Marc Glisse <marc.glisse@inria.fr>
5584
5585 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5586
c3684b7b
MS
55872017-06-15 Martin Sebor <msebor@redhat.com>
5588
5589 PR c++/80560
5590 * c.opt (-Wclass-memaccess): New option.
5591
e72c4afd
BK
55922017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5593
5594 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5595
8a516588
MP
55962017-06-13 Marek Polacek <polacek@redhat.com>
5597
5598 PR objc/80949
5599 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5600 branches is null.
5601
45b2222a
ML
56022017-06-13 Martin Liska <mliska@suse.cz>
5603
5604 PR sanitize/78204
5605 * c-attribs.c (add_no_sanitize_value): New function.
5606 (handle_no_sanitize_attribute): Likewise.
5607 (handle_no_sanitize_address_attribute): Use the function.
5608 (handle_no_sanitize_thread_attribute): New function.
5609 (handle_no_address_safety_analysis_attribute): Use
5610 add_no_sanitize_value.
5611 (handle_no_sanitize_undefined_attribute): Likewise.
5612 * c-common.h: Declare new functions.
5613 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5614 (ubsan_instrument_shift): Likewise.
5615 (ubsan_instrument_bounds): Likewise.
5616 (ubsan_maybe_instrument_array_ref): Likewise.
5617 (ubsan_maybe_instrument_reference_or_call): Likewise.
5618
a01f151f
JM
56192017-06-11 Jason Merrill <jason@redhat.com>
5620
5621 * c-ada-spec.c, c-pragma.c: Use id_equal.
5622
3de4ac6d
MP
56232017-06-04 Marek Polacek <polacek@redhat.com>
5624
5625 PR c/80919
5626 * c-format.c (matching_type_p): Return false if any of the types
5627 requires structural equality.
5628
2474f48f
MS
56292017-06-02 Martin Sebor <msebor@redhat.com>
5630
5631 PR c/80892
5632 * c-warn.c (conversion_warning): Use -Wconversion for integer
5633 conversion and -Wfloat-conversion for floating one.
5634
40ffd95f
BE
56352017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5636
5637 * c.opt (Wsizeof-pointer-div): New warning option.
5638
3fa4634c
VR
56392017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5640
5641 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5642 (Wcatch-value=1): Enable by -Wall.
5643
f012c8ef
DM
56442017-05-30 David Malcolm <dmalcolm@redhat.com>
5645
5646 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5647 format_chars.
5648 * c.opt (fdiagnostics-show-template-tree): New option.
5649 (felide-type): New option.
5650
63dbcd13
VR
56512017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5652
5653 * c.opt (Wcatch-value=): New C++ warning flag.
5654
be136b5c
NS
56552017-05-24 Nathan Sidwell <nathan@acm.org>
5656
5657 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5658 const casts to avoid warning.
5659
3cd211af
MS
56602017-05-24 Martin Sebor <msebor@redhat.com>
5661
5662 PR c/80731
5663 * c-common.h (unsafe_conversion_p): Add a function argument.
5664 * c-common.c (unsafe_conversion_p): Same.
5665 Add type names and values to diagnostics.
5666 (scalar_to_vector): Adjust.
5667 * c-warn.c (constant_expression_error): Add a function argument.
5668 Add type names and values to diagnostics.
5669 (conversion_warning): Add a function argument.
5670 Add type names and values to diagnostics.
5671 (warnings_for_convert_and_check): Same.
5672
1ff7be5a
JM
56732017-05-19 Jason Merrill <jason@redhat.com>
5674
5675 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5676 enumerators.
5677
ff502317
BE
56782017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5679
5680 * c-format.c (locus): Move out of function scope,
5681 add GTY attribute.
5682
2a8a8d7b
NS
56832017-05-19 Nathan Sidwell <nathan@acm.org>
5684
5685 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5686 (c_common_parse_file): Remove class dump handling.
5687 (get_dump_info): Likewise.
5688
39aac208
RB
56892017-05-19 Richard Biener <rguenther@suse.de>
5690
5691 PR c++/80593
5692 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5693 to alias-set zero memory.
5694
6ecd2339
BE
56952017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5696
5697 * c-format.c (local_tree_type_node): Add GTY attribute.
5698
6574d78e
MP
56992017-05-18 Marek Polacek <polacek@redhat.com>
5700
5701 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5702 (c_common_fixed_point_type_for_size): Likewise.
5703 (c_common_type_for_mode): Likewise.
5704 (shorten_compare): Likewise.
5705 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5706 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5707
e3455240
MP
57082017-05-18 Marek Polacek <polacek@redhat.com>
5709
5710 * c-common.c (self_promoting_args_p): Change the return type to bool.
5711 Use false/true instead of 0/1.
5712 * c-common.h (self_promoting_args_p): Update.
5713
3fa8871b
MP
57142017-05-17 Marek Polacek <polacek@redhat.com>
5715
5716 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5717 * c-warn.c: Likewise.
5718
b42cc3ca
VV
57192017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5720
5721 Implement new C++ intrinsics __is_assignable and __is_constructible.
5722 * c-common.c (__is_assignable, __is_constructible): New.
5723 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5724
1a817418
ML
57252017-05-17 Martin Liska <mliska@suse.cz>
5726
5727 * c-common.h: Introduce dump_flags_t type and
5728 use it instead of int type.
5729 * c-gimplify.c (c_genericize): Likewise.
5730 * c-opts.c: Likewise.
5731
b2fa0a8b
MP
57322017-05-17 Marek Polacek <polacek@redhat.com>
5733
5734 * c-common.c (c_save_expr): Remove.
5735 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5736 * c-common.h (c_save_expr): Remove declaration.
5737
31c2d57d
VR
57382017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5739
5740 PR c/35441
5741 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5742 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5743 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5744 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5745 RDIV_EXPR.
5746 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5747
684f84de
MP
57482017-05-09 Marek Polacek <polacek@redhat.com>
5749
5750 PR c/80525
5751 * c-warn.c (unwrap_c_maybe_const): New.
5752 (warn_logical_operator): Call it.
5753
641da50a
NS
57542017-05-09 Nathan Sidwell <nathan@acm.org>
5755
5756 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5757 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5758
631238ac
MS
57592017-05-08 Martin Sebor <msebor@redhat.com>
5760
5761 PR translation/80280
5762 * c-format.h (struct format_flag_spec): Add new member.
5763 (T89_T): New macro.
5764 * c-format.c (local_tree_type_node): New global.
5765 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5766 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5767 (strfmon_flag_specs): Likewise.
5768 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5769 with distinct quoting properties.
5770 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5771 (flag_chars_t::validate): Add argument and handle bad quoting.
5772 (check_format_info_main): Handle quoting problems.
5773 (init_dynamic_diag_info): Simplify.
5774
49f0c04c
JM
57752017-05-08 Jason Merrill <jason@redhat.com>
5776
5777 * c-opts.c (c_common_post_options): Update defaults for
5778 flag_abi_version and flag_abi_compat_version.
5779
56d35585
DM
57802017-05-05 David Malcolm <dmalcolm@redhat.com>
5781
5782 * c-common.c (c_cpp_error): Replace report_diagnostic
5783 with diagnostic_report_diagnostic.
5784
0f2c4a8f
MS
57852017-05-04 Martin Sebor <msebor@redhat.com>
5786
5787 PR translation/80280
5788 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5789 (handle_weakref_attribute): Same.
5790
6fe63fb4
NS
57912017-05-03 Nathan Sidwell <nathan@acm.org>
5792
5793 Canonicalize canonical type hashing
5794 * c-common.c (complete_array_type): Use type_hash_canon.
5795
815d9cc6
XR
57962017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5797
92a285c1 5798 PR c++/80038
815d9cc6
XR
5799 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5800 prototype.
5801 (cilk_install_body_pedigree_operations): Likewise.
5802 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5803 detatched.
5804 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5805 (cilk_install_body_pedigree_operations): Likewise.
5806 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5807 unwrapping.
5808
f8a36447
JJ
58092017-04-27 Jakub Jelinek <jakub@redhat.com>
5810
5811 PR c++/80534
5812 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5813 flag on non-aggregate element types.
5814
7c145456
BE
58152017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5816
5817 * c-common.c (c_type_hasher, type_hash_table): Remove.
5818 (c_common_get_alias_set): Remove unreachable code.
5819 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5820
c3cbcd45
VR
58212017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5822
5823 * c.opt (Wextra-semi): New C++ warning flag.
5824
8a59d466
JJ
58252017-04-20 Jakub Jelinek <jakub@redhat.com>
5826
5827 PR middle-end/80423
5828 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5829
8487c9a5
JJ
58302017-04-18 Jakub Jelinek <jakub@redhat.com>
5831
5832 PR middle-end/79788
5833 PR middle-end/80375
5834 * c-common.c (c_common_type_for_mode): Don't handle
5835 widest_*_literal_type_node here.
5836 c_common_signed_or_unsigned_type): Likewise.
5837 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5838 to *intTI_type_node or *intDI_type_node depending on whether
5839 TImode is supported by the target or not.
5840
3ee0fb02
ML
58412017-04-10 Martin Liska <mliska@suse.cz>
5842
5843 PR sanitizer/80350
5844 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5845 doing an UBSAN check.
5846
5764ee3c
JW
58472017-04-03 Jonathan Wakely <jwakely@redhat.com>
5848
5849 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5850
6f3af356
JJ
58512017-03-31 Jakub Jelinek <jakub@redhat.com>
5852
5853 PR c++/79572
5854 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5855 tree *.
5856 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5857 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5858 REFERENCE_TYPE.
5859
f6a7a9d5
DM
58602017-03-31 David Malcolm <dmalcolm@redhat.com>
5861
5862 PR documentation/78732
5863 * c.opt (Wendif-labels): Fix description to refer to
5864 #else rather than #elif.
5865
af88f557
JJ
58662017-03-31 Jakub Jelinek <jakub@redhat.com>
5867
5868 PR libstdc++/80251
5869 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5870 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5871
a9e4a1a5
JJ
58722017-03-27 Jakub Jelinek <jakub@redhat.com>
5873
5874 PR middle-end/80162
5875 * c-common.c (c_common_mark_addressable_vec): Don't set
5876 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5877
3f01b620
MS
58782017-03-21 Martin Sebor <msebor@redhat.com>
5879
5880 PR c++/79548
5881 * c-common.c (set_underlying_type): Mark type used only when
5882 original del is declared unused.
5883
2f6f187a
DM
58842017-03-10 David Malcolm <dmalcolm@redhat.com>
5885
5886 PR translation/79848
5887 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5888 "%qs".
5889
a02fa805
DM
58902017-03-10 David Malcolm <dmalcolm@redhat.com>
5891
5892 PR c/79921
5893 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5894 from inform's message, so that xgettext can locate it.
5895
822a132c
MP
58962017-03-09 Marek Polacek <polacek@redhat.com>
5897
5898 PR c++/79962
5899 PR c++/79984
5900 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5901 conversion to the attribute list.
5902
bba81f1c
ML
59032017-03-09 Martin Liska <mliska@suse.cz>
5904
5905 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5906
108154ff
JM
59072017-03-03 Jason Merrill <jason@redhat.com>
5908
5909 * c.opt (Wnoexcept-type): New.
5910
eb0e7c34
RB
59112017-03-02 Richard Biener <rguenther@suse.de>
5912
5913 PR c/79756
5914 * c-common.c (c_common_mark_addressable_vec): Look through
5915 C_MAYBE_CONST_EXPR.
5916
9453ba0a
ML
59172017-02-28 Martin Liska <mliska@suse.cz>
5918
5919 * c.opt: Replace space with tabular for options of <number>
5920 type.
5921
6a825afe
ML
59222017-02-28 Martin Liska <mliska@suse.cz>
5923
5924 * c.opt: Fix --help=option -Q for options which are of
5925 an enum type.
5926
4227c9ad
JJ
59272017-02-24 Jakub Jelinek <jakub@redhat.com>
5928
5929 PR c++/79588
5930 * c-common.c (check_function_restrict): New function.
5931 (check_function_arguments): Add FNDECL argument. Call
5932 check_function_restrict if -Wrestrict.
5933 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5934 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5935 * c-common.h (check_function_arguments): Add FNDECL argument.
5936 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5937
59909673
EB
59382017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5939
5940 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5941 treatment of parameters with pointer-to-tagged type and tidy up.
5942 (print_ada_methods): Remove the special treatment of C++ static member
5943 functions.
5944
54dcd526
ML
59452017-02-22 Martin Liska <mliska@suse.cz>
5946
5947 * c.opt: Replace inequality signs with square brackets
5948 for -Wnornalized.
5949
00bc9de3
JJ
59502017-02-21 Jakub Jelinek <jakub@redhat.com>
5951
5952 PR c++/79641
5953 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5954 preserve quals.
5955
97fcf744
JM
59562017-02-17 Joseph Myers <joseph@codesourcery.com>
5957
5958 * c-cppbuiltin.c (builtin_define_float_constants): Define
5959 __DECIMAL_DIG__ to the value for long double.
5960
c7545f1c
MP
59612017-02-15 Marek Polacek <polacek@redhat.com>
5962
5963 PR c/79515
5964 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5965 conversion has occured.
5966
c2e84327
DM
59672017-01-24 David Malcolm <dmalcolm@redhat.com>
5968
5969 * c-common.c (c_common_reswords): Add "__RTL".
5970 * c-common.h (enum rid): Add RID_RTL.
5971
2ebd93e1
MP
59722017-01-20 Marek Polacek <polacek@redhat.com>
5973
5974 PR c/64279
5975 * c-common.h (do_warn_duplicated_branches_r): Declare.
5976 * c-gimplify.c (c_genericize): Walk the function tree calling
5977 do_warn_duplicated_branches_r.
5978 * c-warn.c (expr_from_macro_expansion_r): New.
5979 (do_warn_duplicated_branches): New.
5980 (do_warn_duplicated_branches_r): New.
5981 * c.opt (Wduplicated-branches): New option.
5982
0d80ab91
DM
59832017-01-17 David Malcolm <dmalcolm@redhat.com>
5984
5985 PR c++/71497
5986 * c-indentation.c (warn_for_misleading_indentation): Use the past
5987 subjunctive in the note.
5988
7f991c36
AH
59892017-01-17 Aldy Hernandez <aldyh@redhat.com>
5990
5991 PR c/79116
5992 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5993 start type to integer_type.
5994
1c70261c
JJ
59952017-01-16 Jakub Jelinek <jakub@redhat.com>
5996
5997 PR driver/49726
5998 * c.opt (gen-decls): Add Driver flag.
5999
1ddca3f3
PC
60002017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6001
6002 Revert:
6003 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6004
6005 PR c++/71737
6006 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6007
7d2f3f1d
PC
60082017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6009
6010 PR c++/71737
6011 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6012
bce6f760
MS
60132017-01-12 Martin Sebor <msebor@redhat.com>
6014
6015 (-Wformat-overflow): ...to this.
6016
bf5fbf46
MS
60172017-01-11 Martin Sebor <msebor@redhat.com>
6018
6019 PR c/78768
6020 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6021 Also enable for LTO.
6022
e363df3f
JM
60232017-01-10 Jason Merrill <jason@redhat.com>
6024
6025 Implement P0195R2, C++17 variadic using.
6026 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6027
bd2c6270
JJ
60282017-01-09 Jakub Jelinek <jakub@redhat.com>
6029
6030 PR translation/79019
6031 PR translation/79020
6032 * c.opt (Wnormalized=): Fix typo in description.
6033
efcc8d38
MS
60342017-01-08 Martin Sebor <msebor@redhat.com>
6035
6036 PR middle-end/77708
6037 * c.opt (-Wformat-truncation): New option.
6038
ab20d992 60392017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6040
6041 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6042 value to unsigned short to fit in 4 hex digits without
6043 warnings.
6044
4e89adf9
EB
60452017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6046
6047 * c.opt (fsso-struct): Add 'native' value.
6048
cd445b54
ML
60492017-01-05 Martin Liska <mliska@suse.cz>
6050
6051 PR pch/78970
6052 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6053 header.
6054
a9342885
MP
60552017-01-04 Marek Polacek <polacek@redhat.com>
6056
6057 PR c++/64767
6058 * c.opt (Wpointer-compare): New option.
6059
fc73e60c
JJ
60602017-01-04 Jakub Jelinek <jakub@redhat.com>
6061
6062 PR driver/78957
6063 * c.opt (fsso-struct=): Add RejectNegative.
6064
cbe34bb5
JJ
60652017-01-01 Jakub Jelinek <jakub@redhat.com>
6066
6067 Update copyright years.
6068
d4a6c0ea
ML
60692016-12-29 Martin Liska <mliska@suse.cz>
6070
6071 PR c/78933
6072 * c.opt (strong-eval-order): Add RejectNegative keyword.
6073
67a5ad7c
JM
60742016-12-22 Jason Merrill <jason@redhat.com>
6075
6076 Implement P0522R0, matching of template template arguments.
6077 * c-cppbuiltin.c (c_cpp_builtins): Define
6078 __cpp_template_template_args.
6079
0dba7960
JJ
60802016-12-21 Jakub Jelinek <jakub@redhat.com>
6081
6082 PR bootstrap/78817
6083 * c-common.c (struct nonnull_arg_ctx): New type.
6084 (check_function_nonnull): Return bool instead of void. Use
6085 nonnull_arg_ctx as context rather than just location_t.
6086 (check_nonnull_arg): Adjust for the new context type, set
6087 warned_p to true if a warning has been diagnosed.
6088 (check_function_arguments): Return bool instead of void.
6089 * c-common.h (check_function_arguments): Adjust prototype.
6090
31bfc9b9
JM
60912016-12-21 Jason Merrill <jason@redhat.com>
6092
6093 * c.opt (-fnew-ttp-matching): New flag.
6094 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6095
629b3d75
MJ
60962016-12-14 Martin Jambor <mjambor@suse.cz>
6097
6098 * c-omp.c: Include omp-general.h instead of omp-low.h.
6099 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6100 name.
6101
474da67e
MS
61022016-12-14 Martin Sebor <msebor@redhat.com>
6103
6104 PR c/17308
6105 * c-common.c (check_nonnull_arg): Disable when optimization
6106 is enabled.
6107
fe366b87
MP
61082016-12-12 Marek Polacek <polacek@redhat.com>
6109
6110 PR c++/78647
6111 * c-common.c (attribute_fallthrough_p): Return false for
6112 error_mark_node.
6113
8bd9f164
MS
61142016-12-08 Martin Sebor <msebor@redhat.com>
6115
6116 PR c/78284
6117 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6118
060162e0
MS
61192016-12-08 Martin Sebor <msebor@redhat.com>
6120
6121 PR c/78165
92a285c1
ML
6122 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6123 suffix.
060162e0 6124
ee92e7ba
MS
61252016-12-07 Martin Sebor <msebor@redhat.com>
6126
6127 PR c/53562
6128 PR middle-end/77784
6129 PR middle-end/78149
6130 PR middle-end/78138
6131 * c.opt (-Wstringop-overflow): New option.
6132
84b0769e
MO
61332016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6134
6135 * c-attribs.c (asan odr indicator): New attribute.
6136 (handle_asan_odr_indicator_attribute): New function.
6137
7fa6a965
PK
61382016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6139
6140 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6141 ptrdiff_type_node;
6142
56d8ffc1
JG
61432016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6144
6145 * c-common.c (excess_precision_mode_join): New.
6146 (c_ts18661_flt_eval_method): New.
6147 (c_c11_flt_eval_method): Likewise.
6148 (c_flt_eval_method): Likewise.
6149 * c-common.h (excess_precision_mode_join): New.
6150 (c_flt_eval_method): Likewise.
6151 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6152 (cpp_iec_559_value): Call it.
6153 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6154 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6155 __FLT_EVAL_METHOD_TS_18661_3__.
6156
04f0fcf7
JG
61572016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6158
6159 * c-opts.c (c_common_post_options): Add logic to handle the default
6160 case for -fpermitted-flt-eval-methods.
6161
fb2675cb
PB
61622016-11-23 Paolo Bonzini <bonzini@gnu.org>
6163
6164 * c.opt (Wexpansion-to-defined): New.
6165
ec1c5694
JJ
61662016-11-23 Jakub Jelinek <jakub@redhat.com>
6167
6168 PR target/78451
6169 * c-pragma.c (handle_pragma_target): Don't replace
6170 current_target_pragma, but chainon the new args to the current one.
6171
730c9e75
NS
61722016-11-22 Nathan Sidwell <nathan@acm.org>
6173
6174 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6175 indentation and formatting.
730c9e75 6176
89990732
MS
61772016-11-21 Martin Sebor <msebor@redhat.com>
6178
6179 * c.opt (-fprintf-return-value): Enable by default.
6180
48330c93
BE
61812016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6182
6183 PR c++/71973
6184 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6185 * c-common.c (c_common_nodes_and_builtins): Initialize
6186 const_tm_ptr_type_node.
6187
0d939c95
MP
61882016-11-16 Marek Polacek <polacek@redhat.com>
6189
6190 PR c/78285
6191 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6192
8e745a17
JJ
61932016-11-14 Jakub Jelinek <jakub@redhat.com>
6194
6195 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6196
1ee62b92 61972016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6198 Richard Biener <rguenther@suse.de>
6199
6200 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6201 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6202 * c.opt (fgimple): New option.
1ee62b92 6203
22b15758
UB
62042016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6205
6206 PR c/35503
6207 * c-common.h (warn_for_restrict): Declare.
6208 * c-warn.c: Include gcc-rich-location.h.
6209 (warn_for_restrict): New function.
6210 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6211 (gcc_cdiag_char_table): Likewise.
6212 (gcc_cxxdiag_char_table): Likewise.
6213 * c.opt (Wrestrict): New option.
6214
4be719cd
EB
62152016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6216
6217 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6218 for nested types only if the type is a record or union and dump SLOC.
6219
4a826ca6
JM
62202016-11-09 Jason Merrill <jason@redhat.com>
6221
6222 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6223
2e955d50
JJ
62242016-11-09 Jakub Jelinek <jakub@redhat.com>
6225
6226 * c-ubsan.c (ubsan_instrument_shift): Handle split
6227 -fsanitize=shift-base and -fsanitize=shift-exponent.
6228
51dc6603
JM
62292016-11-07 Jason Merrill <jason@redhat.com>
6230
6231 * c.opt (Wc++1z-compat): New.
6232 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6233
6dc4a604
ML
62342016-11-07 Martin Liska <mliska@suse.cz>
6235
6236 * c-warn.c (warn_for_unused_label): Save all labels used
6237 in goto or in &label.
6238
b302001e
JM
62392016-11-03 Jason Merrill <jason@redhat.com>
6240
6241 * c-cppbuiltin.c (c_cpp_builtins): Correct
6242 __cpp_inheriting_constructors.
6243
31f7f784
JM
62442016-11-01 Jason Merrill <jason@redhat.com>
6245
2bc78e3c
JM
6246 * c-cppbuiltin.c (c_cpp_builtins): Update
6247 __cpp_inheriting_constructors.
6248
31f7f784
JM
6249 * c.opt (-fnew-inheriting-ctors): New.
6250 * c-opts.c: Default to on for ABI 11+.
6251
dcb466ec
JJ
62522016-10-31 Jakub Jelinek <jakub@redhat.com>
6253
6254 PR c++/77948
6255 * c.opt (fext-numeric-literals): Add Var and Init.
6256 * c-opts.c (c_common_handle_option): Don't clear
6257 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6258 (c_common_post_options): Clear it here if not set
6259 explicitly.
6260
52e1b91e
AH
62612016-10-28 Aldy Hernandez <aldyh@redhat.com>
6262
6263 PR debug/77773
6264 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6265 if NULL.
6266
e16f1cc7
JJ
62672016-10-25 Jakub Jelinek <jakub@redhat.com>
6268
6269 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6270 * c-common.c (c_common_reswords): Add __builtin_launder.
6271
f8348061
BE
62722016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6273
6274 * c-common.c (c_common_truthvalue_conversion): Warn for
6275 multiplications in boolean context. Fix the quoting of '<<' and '<'
6276 in the shift warning.
6277
eff89e01
BE
62782016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6279
6280 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6281
24bc7bf4
JM
62822016-10-20 Jason Merrill <jason@redhat.com>
6283
6284 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6285
4c712374
BE
62862016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6287
6288 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6289 integer shift ops in boolean context.
6290
62912016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6292
6293 * c.opt (Walloca): New.
6294 (Walloca-larger-than=): New.
6295 (Wvla-larger-than=): New.
6296
8fa18c06
MP
62972016-10-17 Marek Polacek <polacek@redhat.com>
6298
6299 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6300 Return immediately when finding a match.
6301 (warn_tautological_cmp): Remove a boolean variable that is no longer
6302 needed.
6303
b12b1915
MP
63042016-10-17 Marek Polacek <polacek@redhat.com>
6305
6306 * c-attribs.c: New file.
6307 * c-common.c: Move attributes handling to c-attribs.c.
6308 (get_nonnull_operand): No longer static.
6309 * c-common.h: Move the declarations from c-attribs.c to its own section.
6310
2045acd9
JM
63112016-10-14 Jason Merrill <jason@redhat.com>
6312
6313 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6314 and __cpp_deduction_guides.
6315
14a2c9aa
JM
63162016-10-13 Jason Merrill <jason@redhat.com>
6317
6318 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6319
4d0cdd0c
TP
63202016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6321
6322 * c-cppbuiltin.c: Include memmodel.h.
6323 * c-opts.c: Likewise.
6324 * c-pragma.c: Likewise.
6325 * c-warn.c: Likewise.
6326
70f6d5e1
JJ
63272016-10-12 Jakub Jelinek <jakub@redhat.com>
6328
6329 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6330 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6331 * c-opts.c (sanitize_cpp_opts): Initialize
6332 cpp_opts->cpp_warn_implicit_fallthrough.
6333
78f61294
MP
63342016-10-11 Marek Polacek <polacek@redhat.com>
6335
6336 * c-common.c (warning_candidate_p): Change the return type to bool
6337 and return true/false instead of 1/0.
6338 (vector_mode_valid_p): Likewise.
6339
038b5cc0
MP
63402016-10-11 Marek Polacek <polacek@redhat.com>
6341
6342 * c-common.c (fold_for_warn): No longer static.
6343 (bool_promoted_to_int_p): Likewise.
6344 (c_common_get_narrower): Likewise.
6345 (constant_expression_warning): Move to c-warn.c.
6346 (constant_expression_error): Likewise.
6347 (overflow_warning): Likewise.
6348 (warn_logical_operator): Likewise.
6349 (find_array_ref_with_const_idx_r): Likewise.
6350 (warn_tautological_cmp): Likewise.
6351 (expr_has_boolean_operands_p): Likewise.
6352 (warn_logical_not_parentheses): Likewise.
6353 (warn_if_unused_value): Likewise.
6354 (strict_aliasing_warning): Likewise.
6355 (sizeof_pointer_memaccess_warning): Likewise.
6356 (check_main_parameter_types): Likewise.
6357 (conversion_warning): Likewise.
6358 (warnings_for_convert_and_check): Likewise.
6359 (match_case_to_enum_1): Likewise.
6360 (match_case_to_enum): Likewise.
6361 (c_do_switch_warnings): Likewise.
6362 (warn_for_omitted_condop): Likewise.
6363 (readonly_error): Likewise.
6364 (lvalue_error): Likewise.
6365 (invalid_indirection_error): Likewise.
6366 (warn_array_subscript_with_type_char): Likewise.
6367 (warn_about_parentheses): Likewise.
6368 (warn_for_unused_label): Likewise.
6369 (warn_for_div_by_zero): Likewise.
6370 (warn_for_memset): Likewise.
6371 (warn_for_sign_compare): Likewise.
6372 (do_warn_double_promotion): Likewise.
6373 (do_warn_unused_parameter): Likewise.
6374 (record_locally_defined_typedef): Likewise.
6375 (maybe_record_typedef_use): Likewise.
6376 (maybe_warn_unused_local_typedefs): Likewise.
6377 (maybe_warn_bool_compare): Likewise.
6378 (maybe_warn_shift_overflow): Likewise.
6379 (warn_duplicated_cond_add_or_warn): Likewise.
6380 (diagnose_mismatched_attributes): Likewise.
6381 * c-common.h: Move the declarations from c-warn.c to its own section.
6382 * c-warn.c: New file.
6383
627be19f
JM
63842016-10-08 Jason Merrill <jason@redhat.com>
6385
6386 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6387 into COND_EXPR in C++.
6388
7bad794a
JJ
63892016-10-08 Jakub Jelinek <jakub@redhat.com>
6390
6391 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6392 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6393 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6394
be845b04
JJ
63952016-10-07 Jakub Jelinek <jakub@redhat.com>
6396
6397 Implement LWG2296 helper intrinsic
6398 * c-common.h (enum rid): Add RID_ADDRESSOF.
6399 * c-common.c (c_common_reswords): Add __builtin_addressof.
6400
c09c4992
BE
64012016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6402
6403 PR c++/77700
6404 * c-common.c (c_common_truthvalue_conversion): Warn also for
6405 suspicious enum values in boolean context.
6406
342cfb3e
JJ
64072016-10-06 Jakub Jelinek <jakub@redhat.com>
6408
6409 Implement P0258R2 - helper for C++17
6410 std::has_unique_object_representations trait
6411 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6412 * c-common.c (c_common_reswords): Add
6413 __has_unique_object_representations.
6414
2e69f143
JJ
64152016-10-05 Jakub Jelinek <jakub@redhat.com>
6416
6417 PR sanitizer/66343
6418 * c-ubsan.c (ubsan_instrument_return): Don't call
6419 initialize_sanitizer_builtins here.
6420
700fff34
BE
64212016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6422
6423 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6424 conditional expression in boolean context when only one arm is
6425 non-boolean.
6426
9563bfcd
JJ
64272016-10-05 Jakub Jelinek <jakub@redhat.com>
6428
04a32443
JJ
6429 PR sanitizer/77823
6430 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6431 is not integral.
6432
9563bfcd
JJ
6433 * c-common.c (c_common_reswords): Update comment for C++11.
6434
f1644724
JM
64352016-10-04 Jason Merrill <jason@redhat.com>
6436
6437 * c-common.c (make_tree_vector_from_ctor): New.
6438 * c-common.h: Declare it.
6439
5a79befb
JJ
64402016-10-04 Jakub Jelinek <jakub@redhat.com>
6441
6442 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6443 __LIBGCC_JCR_SECTION_NAME__.
6444
1633d3b9
BE
64452016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6446
6447 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6448 left shift in boolean context.
6449
a2c6e7f2
JJ
64502016-09-29 Jakub Jelinek <jakub@redhat.com>
6451
6452 Implement P0001R1 - C++17 removal of register storage class specifier
6453 * c.opt (Wregister): New warning.
6454 * c-opts.c (c_common_post_options): Enable -Wregister by
6455 default for C++17.
6456
75304c87
JG
64572016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6458
6459 * c-opts.c (c_common_post_options): Remove special case for
6460 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6461 in C++.
6462
bbfac6da
JJ
64632016-09-27 Jakub Jelinek <jakub@redhat.com>
6464
6e39060a
JJ
6465 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6466 -std=c++1z.
6467
bbfac6da
JJ
6468 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6469
e73cf9a2
TP
64702016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6471
6472 * c-common.c: Include memmodel.h.
6473
c6147dc4
MP
64742016-09-26 Marek Polacek <polacek@redhat.com>
6475
6476 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6477
81fea426
MP
64782016-09-26 Marek Polacek <polacek@redhat.com>
6479
6480 PR c/7652
6481 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6482 (handle_fallthrough_attribute): New function.
6483 (attribute_fallthrough_p): New function.
6484 * c-common.h (attribute_fallthrough_p): Declare.
6485
9a2300e9
MP
64862016-09-24 Marek Polacek <polacek@redhat.com>
6487
6488 PR c/77490
6489 * c.opt (Wbool-operation): New.
6490
a09e9e35
BE
64912016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6492
6493 * c-common.c (c_common_truthvalue_conversion): Inhibit
6494 Wint-in-bool-context warning with from_macro_definition_at.
6495 Mention the expression will always evaluate to true.
6496
d43b4ccc
MS
64972016-09-21 Martin Sebor <msebor@redhat.com>
6498
6499 PR bootstrap/77676
6500 * c.opt (fprintf-return-value): Temporarily initialize to zero
6501 to unblock bootstrap failures.
6502
2e1c20b1
JJ
65032016-09-21 Jakub Jelinek <jakub@redhat.com>
6504
6505 PR c++/77651
6506 * c.opt (Waligned-new=): Add RejectNegative.
6507 (faligned-new=): Likewise. Spelling fix - change
6508 aligned_new_threshhold to aligned_new_threshold.
6509 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6510 to aligned_new_threshold.
6511
88d0c3f0
MS
65122016-09-20 Martin Sebor <msebor@redhat.com>
6513
6514 PR middle-end/49905
6515 * c.opt: Add -Wformat-length and -fprintf-return-value.
6516
144a96e4
BE
65172016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6518
6519 PR c++/77434
6520 * c.opt (Wint-in-bool-context): New warning.
6521 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6522 constants in boolean context.
6523
63012d9a
JM
65242016-09-19 Joseph Myers <joseph@codesourcery.com>
6525
6526 * c-common.c (max_align_t_align): Also consider alignment of
6527 float128_type_node.
6528
931388ce
JM
65292016-09-15 Jason Merrill <jason@redhat.com>
6530
6531 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6532 DECL_EXTERNAL.
6533
38711381
JM
65342016-09-14 Jason Merrill <jason@redhat.com>
6535
6536 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6537 limit FIELD_DECL, either.
6538
e51fbec3
MP
65392016-09-14 Marek Polacek <polacek@redhat.com>
6540
6541 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6542 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6543 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6544
254830ba
DM
65452016-09-13 David Malcolm <dmalcolm@redhat.com>
6546
6547 * c-common.c (warn_logical_not_parentheses): Replace
6548 rich_location::add_fixit_insert calls with add_fixit_insert_before
6549 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6550
42763690
JM
65512016-09-13 Jason Merrill <jason@redhat.com>
6552 Tom de Vries <tom@codesourcery.com>
6553
6554 PR c++/77427
6555 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6556
9453eee9
JM
65572016-09-13 Jason Merrill <jason@redhat.com>
6558
6559 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6560 limit types at all.
6561
e96809e3
JM
65622016-09-12 Jason Merrill <jason@redhat.com>
6563
6564 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6565 bit/byte confusion, allow large alignment for types.
6566
54dcdb88
BE
65672016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6568
6569 PR c++/77496
6570 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6571
d1463eb9
DM
65722016-09-12 David Malcolm <dmalcolm@redhat.com>
6573
6574 PR c/72858
6575 * c-format.c (argument_parser::check_argument_type): Add params
6576 "type_start" and "conversion_char". Use the former to generate
6577 offset_to_type_start and pass it and conversion_char to
6578 check_format_types.
6579 (check_format_info_main): Capture the start of the type
6580 information as "type_start", and pass it an format_char
6581 to arg_parser.check_argument_type.
6582 (check_format_types): Provide an example in the leading comment.
6583 Add params "offset_to_type_start" and "conversion_char"; pass
6584 them to format_type_warning calls.
6585 (test_get_modifier_for_format_len): Likewise.
6586 (matching_type_p): New function.
6587 (get_format_for_type): Add param "conversion_char" and move
6588 implementation into...
6589 (get_format_for_type_1): ...new function, called twice.
6590 Use new function matching_type_p rather than checking for
6591 TYPE_CANONICAL equality.
6592 (get_corrected_substring): New function.
6593 (format_type_warning): Provide an example in the leading comment.
6594 Add params "offset_to_type_start" and "conversion_char". Replace
6595 call to get_format_for_type with call to get_corrected_substring
6596 and move rejection of hints for widths/precisions there.
6597 (assert_format_for_type_streq): Add param "conversion_char".
6598 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6599 (test_get_format_for_type_printf): Add conversion chars to the
6600 tests, adding coverage for various combinations of integer
6601 vs double conversions, and for preserving octal and hexadecimal
6602 conversions.
6603 (test_get_format_for_type_scanf): Add conversion chars to the
6604 tests.
6605
5b28efbb
TV
66062016-09-10 Tom de Vries <tom@codesourcery.com>
6607
6608 PR C/71602
6609 * c-common.c (build_va_arg): Handle more strict
6610 targetm.canonical_va_list_type. Replace first argument type error with
6611 assert.
6612
3f0177e7
MS
66132016-09-09 Martin Sebor <msebor@redhat.com>
6614
6615 PR c/77520
6616 PR c/77521
6617 * c-format.c (argument_parser::find_format_char_info): Use %qc
6618 format directive unconditionally.
6619
af63ba4b
JM
66202016-09-09 Jason Merrill <jason@redhat.com>
6621
6622 Implement C++17 new of over-aligned types.
6623 * c.opt: Add -faligned-new and -Waligned-new.
6624 * c-common.c (max_align_t_align): Split out from...
6625 (cxx_fundamental_alignment_p): ...here.
6626 * c-common.h: Declare it.
6627 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6628
c65248cb
JM
66292016-09-09 Joseph Myers <joseph@codesourcery.com>
6630
6631 * c-cppbuiltin.c (builtin_define_type_width): New function.
6632 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6633 macros.
6634
e5106e27
DM
66352016-09-07 David Malcolm <dmalcolm@redhat.com>
6636
6637 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6638 a POINTER_TYPE.
6639 (substring_loc::get_location): Move to substring-locations.c,
6640 keeping implementation as...
6641 (c_get_substring_location): New function, from the above, reworked
6642 to use accessors rather than member lookup.
6643 * c-common.h (class substring_loc): Move to substring-locations.h,
6644 replacing with a forward decl.
6645 (c_get_substring_location): New decl.
6646 * c-format.c: Include "substring-locations.h".
6647 (format_warning_va): Move to substring-locations.c.
6648 (format_warning_at_substring): Likewise.
6649
ab20d992 66502016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6651
6652 PR c/77336
6653 * c-format.c (check_function_format): Avoid issuing warnings for
6654 functions unless they call format functions with non-constant
6655 format strings.
6656
b772a565
RB
66572016-09-06 Richard Biener <rguenther@suse.de>
6658
6659 PR c/77450
6660 * c-common.c (c_common_mark_addressable_vec): Handle
6661 COMPOUND_LITERAL_EXPR.
6662
25ff5dd3
MP
66632016-09-05 Marek Polacek <polacek@redhat.com>
6664
6665 PR c/77423
6666 * c-common.c (bool_promoted_to_int_p): New function.
6667 (expr_has_boolean_operands_p): New function.
6668 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6669 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6670
21234eb5
TV
66712016-09-04 Tom de Vries <tom@codesourcery.com>
6672
6673 revert:
6674 2016-08-29 Tom de Vries <tom@codesourcery.com>
6675
6676 * c-common.c (build_va_arg): Replace first argument type error
6677 with assert.
6678
9dc5773f
JJ
66792016-09-02 Jakub Jelinek <jakub@redhat.com>
6680
6681 PR c/65467
6682 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6683 (c_finish_omp_for): Reject _Atomic qualified iterators.
6684
66852016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6686
6687 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6688 size to guarantee it fits the output of the formatted function
6689 regardless of its arguments.
6690
295844f6
MP
66912016-09-01 Marek Polacek <polacek@redhat.com>
6692
6693 PR c/7652
6694 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6695 FALLTHRU comments.
6696
3d06b6f2
MP
66972016-08-29 Marek Polacek <polacek@redhat.com>
6698
6699 PR c/77292
6700 * c-common.c (warn_logical_not_parentheses): Don't warn for
6701 a comparison or a logical operator.
6702
34cedad5
TV
67032016-08-29 Tom de Vries <tom@codesourcery.com>
6704
6705 * c-common.c (build_va_arg): Fix type comparison assert.
6706
f162d717
TV
67072016-08-29 Tom de Vries <tom@codesourcery.com>
6708
6709 * c-common.c (build_va_arg): Replace first argument type error
6710 with assert.
6711
ba9bbd6f
TV
67122016-08-29 Tom de Vries <tom@codesourcery.com>
6713
6714 PR c/77398
6715 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6716 with error_mark_node as va_list instead of with illegal va_list.
6717
ebef225f
MP
67182016-08-25 Marek Polacek <polacek@redhat.com>
6719 David Malcolm <dmalcolm@redhat.com>
6720
6721 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6722 * c-common.h (warn_logical_not_parentheses): Update declaration.
6723
b00e6e75
MP
67242016-08-22 Marek Polacek <polacek@redhat.com>
6725
6726 PR c++/77321
6727 * c-common.c (warn_for_memset): Check type for null.
6728
6dc198e3
JM
67292016-08-22 Joseph Myers <joseph@codesourcery.com>
6730
14ec014e 6731 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6732 _FloatNx types for suffixes for built-in functions.
6733
c65699ef
JM
67342016-08-19 Joseph Myers <joseph@codesourcery.com>
6735
6736 PR c/32187
6737 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6738 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6739 (RID_FLOAT128X): New enum rid values.
6740 (CASE_RID_FLOATN_NX): New macro.
6741 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6742 keywords.
6743 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6744 corresponding complex types.
6745 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6746 _FloatNx and corresponding complex types.
6747 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6748 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6749 and _FloatNx types for the widest type for determining
6750 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6751 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6752 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6753 and _FloatNx types.
6754 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6755 constants.
6756 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6757 _FloatNx types.
6758
cc015f3a
DM
67592016-08-18 David Malcolm <dmalcolm@redhat.com>
6760
6761 * c-opts.c (c_diagnostic_finalizer): Update for change to
6762 diagnostic_show_locus.
6763
cb18fd07
DM
67642016-08-18 David Malcolm <dmalcolm@redhat.com>
6765
6766 * c-common.c: Include "spellcheck.h".
6767 (cb_get_suggestion): New function.
6768 * c-common.h (cb_get_suggestion): New decl.
6769 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6770 cb_get_suggestion.
6771
a76989dc
MP
67722016-08-18 Marek Polacek <polacek@redhat.com>
6773
6774 PR c/71514
6775 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6776 and pointer-to-VLA.
6777
65e736c0
DM
67782016-08-16 David Malcolm <dmalcolm@redhat.com>
6779
6780 PR c/72857
6781 * c-common.c (substring_loc::get_range): Rename to...
6782 (substring_loc::get_location): ...this, converting param from a
6783 source_range * to a location_t *. Call
6784 get_source_location_for_substring rather than
6785 get_source_range_for_substring, and pass in m_caret_idx.
6786 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6787 (substring_loc::get_range): Replace with...
6788 (substring_loc::get_location): ...this.
6789 (substring_loc::set_caret_index): New method.
6790 (substring_loc): Add field m_caret_idx.
6791 * c-format.c (format_warning_va): Update for above changes.
6792 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6793 clashing with type name.
6794 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6795 (check_argument_type): Likewise.
6796 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6797 Use a copy when emitting warnings, setting the caret index from TYPE.
6798
7e1dde14 67992016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6800 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6801
6802 * c-ada-spec.c (dump_number): New function.
6803 (handle_escape_character): Likewise.
6804 (print_ada_macros): Add handling of constant integers and strings.
6805
191816a3
MP
68062016-08-12 Marek Polacek <polacek@redhat.com>
6807
6808 PR c/7652
6809 * c-common.c (scalar_to_vector): Adjust fall through comment.
6810 * c-opts.c (c_common_handle_option): Likewise.
6811 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6812 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6813 fall through comment.
6814 * cilk.c (extract_free_variables): Add FALLTHRU.
6815
452df4a4
JM
68162016-08-10 Jason Merrill <jason@redhat.com>
6817
6818 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6819
f3365c12
JM
68202016-08-09 Jason Merrill <jason@redhat.com>
6821
6822 * c-common.c (c_common_attribute_table): vector_size affects type
6823 identity.
6824
f0bc3323
MP
68252016-08-09 Marek Polacek <polacek@redhat.com>
6826
6827 PR c/7652
6828 * c-ada-spec.c (dump_generic_ada_node): Add return.
6829
98e5a19a
JM
68302016-08-09 Jason Merrill <jason@redhat.com>
6831
6832 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6833 C++17 constexpr lambdas.
6834
895aa8e1
DM
68352016-08-08 David Malcolm <dmalcolm@redhat.com>
6836
6837 PR c/64955
6838 * c-common.h (selftest::c_format_c_tests): New declaration.
6839 (selftest::run_c_tests): New declaration.
6840 * c-format.c: Include "selftest.h.
6841 (format_warning_va): Add param "corrected_substring" and use
6842 it to add a replacement fix-it hint.
6843 (format_warning_at_substring): Likewise.
6844 (format_warning_at_char): Update for new param of
6845 format_warning_va.
6846 (argument_parser::check_argument_type): Pass "fki" to
6847 check_format_types.
6848 (check_format_types): Add param "fki" and pass it to
6849 format_type_warning.
6850 (deref_n_times): New function.
6851 (get_modifier_for_format_len): New function.
6852 (selftest::test_get_modifier_for_format_len): New function.
6853 (get_format_for_type): New function.
6854 (format_type_warning): Add param "fki" and use it to attempt
6855 to provide hints for argument types when calling
6856 format_warning_at_substring.
6857 (selftest::get_info): New function.
6858 (selftest::assert_format_for_type_streq): New function.
6859 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6860 (selftest::test_get_format_for_type_printf): New function.
6861 (selftest::test_get_format_for_type_scanf): New function.
6862 (selftest::c_format_c_tests): New function.
6863
e52ed3fe
DM
68642016-08-08 David Malcolm <dmalcolm@redhat.com>
6865
6866 PR c/52952
6867 * c-format.c: Include "diagnostic.h".
6868 (location_column_from_byte_offset): Delete.
6869 (location_from_offset): Delete.
6870 (format_warning_va): New function.
6871 (format_warning_at_substring): New function.
6872 (format_warning_at_char): New function.
6873 (check_format_arg): Capture location of format_tree and pass to
6874 check_format_info_main.
6875 (argument_parser): Add fields "start_of_this_format" and
6876 "format_string_cst".
6877 (flag_chars_t::validate): Add param "format_string_cst". Convert
6878 warning_at call using location_from_offset to call to
6879 format_warning_at_char.
6880 (argument_parser::argument_parser): Add param "format_string_cst_"
6881 and use use it to initialize field "format_string_cst".
6882 Initialize new field "start_of_this_format".
6883 (argument_parser::read_format_flags): Convert warning_at call
6884 using location_from_offset to a call to format_warning_at_char.
6885 (argument_parser::read_any_format_left_precision): Likewise.
6886 (argument_parser::read_any_format_precision): Likewise.
6887 (argument_parser::read_any_other_modifier): Likewise.
6888 (argument_parser::find_format_char_info): Likewise, in three places.
6889 (argument_parser::parse_any_scan_set): Likewise, in one place.
6890 (argument_parser::handle_conversions): Likewise, in two places.
6891 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6892 and use it to make a substring_loc. Pass the latter to
6893 check_format_types.
6894 (check_format_info_main): Add params "fmt_param_loc" and
6895 "format_string_cst". Convert warning_at calls using
6896 location_from_offset to calls to format_warning_at_char. Pass the
6897 new params to the arg_parser ctor. Pass "format_string_cst" to
6898 flag_chars.validate. Pass "fmt_param_loc" to
6899 arg_parser.check_argument_type.
6900 (check_format_types): Convert first param from a location_t
6901 to a const substring_loc & and rename to "fmt_loc". Attempt
6902 to extract the range of the relevant parameter and pass it
6903 to format_type_warning.
6904 (format_type_warning): Convert first param from a location_t
6905 to a const substring_loc & and rename to "fmt_loc". Add
6906 params "param_range" and "type". Replace calls to warning_at
6907 with calls to format_warning_at_substring.
6908
1c4d457e
DM
69092016-08-08 David Malcolm <dmalcolm@redhat.com>
6910
6911 * c-format.c (class flag_chars_t): New class.
6912 (struct length_modifier): New struct.
6913 (class argument_parser): New class.
6914 (flag_chars_t::flag_chars_t): New ctor.
6915 (flag_chars_t::has_char_p): New method.
6916 (flag_chars_t::add_char): New method.
6917 (flag_chars_t::validate): New method.
6918 (flag_chars_t::get_alloc_flag): New method.
6919 (flag_chars_t::assignment_suppression_p): New method.
6920 (argument_parser::argument_parser): New ctor.
6921 (argument_parser::read_any_dollar): New method.
6922 (argument_parser::read_format_flags): New method.
6923 (argument_parser::read_any_format_width): New method.
6924 (argument_parser::read_any_format_left_precision): New method.
6925 (argument_parser::read_any_format_precision): New method.
6926 (argument_parser::handle_alloc_chars): New method.
6927 (argument_parser::read_any_length_modifier): New method.
6928 (argument_parser::read_any_other_modifier): New method.
6929 (argument_parser::find_format_char_info): New method.
6930 (argument_parser::validate_flag_pairs): New method.
6931 (argument_parser::give_y2k_warnings): New method.
6932 (argument_parser::parse_any_scan_set): New method.
6933 (argument_parser::handle_conversions): New method.
6934 (argument_parser::check_argument_type): New method.
6935 (check_format_info_main): Introduce classes argument_parser
6936 and flag_chars_t, moving the code within the loop into methods
6937 of these classes. Make various locals "const".
6938
88fa5555
DM
69392016-08-05 David Malcolm <dmalcolm@redhat.com>
6940
6941 * c-common.c: Include "substring-locations.h".
6942 (get_cpp_ttype_from_string_type): New function.
6943 (g_string_concat_db): New global.
6944 (substring_loc::get_range): New method.
6945 * c-common.h (g_string_concat_db): New declaration.
6946 (class substring_loc): New class.
6947 * c-lex.c (lex_string): When concatenating strings, capture the
6948 locations of all tokens using a new obstack, and record the
6949 concatenation locations within g_string_concat_db.
6950 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6951 on the ggc-heap.
6952
78169471
MP
69532016-07-29 Marek Polacek <polacek@redhat.com>
6954
638fc14f
MP
6955 PR c/71926
6956 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6957 parentheses warning.
6958
78169471
MP
6959 PR c/71574
6960 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6961
1225d6b1
ML
69622016-07-28 Martin Liska <mliska@suse.cz>
6963
6964 PR gcov-profile/68025
6965 * c-common.c (handle_no_profile_instrument_function_attribute):
6966
ec1e2a40
BE
69672016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6968
6969 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6970 BITS_PER_UNIT_LOG.
6971
5ec2cd9f
JM
69722016-07-25 Jason Merrill <jason@redhat.com>
6973
6974 PR c++/65970
6975 * c.opt (fconstexpr-loop-limit): New.
6976
9dc5773f 69772016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6978
6979 PR c++/71675
6980 * c-common.c (resolve_overloaded_builtin): Avoid converting
6981 __atomic_compare_exchange_n return type to that of what its
6982 first argument points to.
6983
e3fe09c1
UB
69842016-07-22 Uros Bizjak <ubizjak@gmail.com>
6985
6986 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6987 ~(unsigned HOST_WIDE_INT) 0.
6988
bc91c436
ML
69892016-07-22 Martin Liska <mliska@suse.cz>
6990
6991 PR gcov-profile/69028
6992 PR gcov-profile/62047
6993 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6994 to the current_function_decl.
6995
451dcc66
JM
69962016-07-21 Jason Merrill <jason@redhat.com>
6997
6998 PR c++/65168
6999 * c-common.c (c_common_truthvalue_conversion): Check
7000 c_inhibit_evaluation_warnings for warning about address of
7001 reference.
7002
de6a69ee
DM
70032016-07-20 David Malcolm <dmalcolm@redhat.com>
7004
7005 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7006 const char *.
7007
d022c55a
JM
70082016-07-15 Jason Merrill <jason@redhat.com>
7009
7010 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7011
ddbbcb19
JJ
70122016-07-15 Jakub Jelinek <jakub@redhat.com>
7013
7014 PR c/71858
7015 * c-common.h (enum lookup_name_fuzzy_kind): Add
7016 FUZZY_LOOKUP_FUNCTION_NAME.
7017
d0cf395a
JM
70182016-07-08 Jason Merrill <jason@redhat.com>
7019
7020 P0145: Refining Expression Order for C++.
7021 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7022 * c-opts.c: Adjust.
7023
98d44e93
MT
70242016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7025
7026 PR c++/71214
7027 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7028
f9d8d994
TS
70292016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7030
7031 * c-pragma.h (enum pragma_kind): Rename
7032 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7033 users.
7034
4aa83879
RB
70352016-06-29 Richard Biener <rguenther@suse.de>
7036
7037 PR middle-end/71002
7038 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7039
a25bd9e6
JM
70402016-06-24 Jason Merrill <jason@redhat.com>
7041
7042 P0145R2: Refining Expression Order for C++.
7043 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7044 MODIFY_EXPR.
7045
a86451b9
JJ
70462016-06-24 Jakub Jelinek <jakub@redhat.com>
7047
7048 * c-common.c (check_builtin_function_arguments): Require last
7049 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7050 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7051 if the last argument is pointer to enumerated or boolean type.
7052
1a4f11c8
DM
70532016-06-22 David Malcolm <dmalcolm@redhat.com>
7054
7055 PR c/70339
7056 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7057 (lookup_name_fuzzy): New prototype.
7058
fe55692c
JDA
70592016-06-21 John David Anglin <danglin@gcc.gnu.org>
7060
7061 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7062
4eb24e01
JM
70632016-06-14 Jason Merrill <jason@redhat.com>
7064
7065 P0145R2: Refining Expression Order for C++.
7066 * c.opt (fargs-in-order): New.
7067 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7068
ef7cf206
JJ
70692016-06-13 Jakub Jelinek <jakub@redhat.com>
7070
0dda258b
JJ
7071 PR sanitizer/71498
7072 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7073 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7074
ef7cf206
JJ
7075 PR preprocessor/71183
7076 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7077 to cb_get_source_date_epoch.
7078
50b15873
JJ
70792016-06-10 Jakub Jelinek <jakub@redhat.com>
7080
7081 PR c/68657
7082 * c.opt (Wpsabi): Add Warning flag.
7083
4d926e34
MS
70842016-06-10 Martin Sebor <msebor@redhat.com>
7085
7086 PR c/71392
14ec014e 7087 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7088 the nonnull attribute in type-generic builtins.
7089
e01b4e16
MS
70902016-06-09 Martin Sebor <msebor@redhat.com>
7091
7092 PR c/70883
7093 * c-common.c (builtin_function_validate_nargs): Make text of error
7094 message consistent with others like it.
7095
44a845ca
MS
70962016-06-08 Martin Sebor <msebor@redhat.com>
7097 Jakub Jelinek <jakub@redhat.com>
7098
7099 PR c++/70507
7100 PR c/68120
7101 * c-common.c (check_builtin_function_arguments): Handle
7102 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7103
a80a7051
RB
71042016-06-08 Richard Biener <rguenther@suse.de>
7105
7106 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7107
bfd67b47
RB
71082016-06-07 Richard Biener <rguenther@suse.de>
7109
7110 PR c/61564
7111 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7112 options and warn about others.
7113
15c98b2e
ES
71142016-06-01 Eduard Sanou <dhole@openmailbox.org>
7115
7116 * c-common.c (get_source_date_epoch): Rename to
7117 cb_get_source_date_epoch.
7118 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7119 message when the parsing fails. Use error_at instead of fatal_error.
7120 * c-common.h (get_source_date_epoch): Rename to
7121 cb_get_source_date_epoch.
7122 * c-common.h (cb_get_source_date_epoch): Prototype.
7123 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7124 * c-common.h (c_omp_region_type): Remove trailing comma.
7125 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7126 * c-lex.c (c_lex_with_flags): Remove initialization of
7127 pfile->source_date_epoch.
7128
00631022
JJ
71292016-05-30 Jakub Jelinek <jakub@redhat.com>
7130
7131 PR c++/71349
7132 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7133 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7134 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7135 instead of C_OMP_CLAUSE_SPLIT_FOR.
7136
f17a223d
RB
71372016-05-24 Richard Biener <rguenther@suse.de>
7138
7139 PR middle-end/70434
7140 PR c/69504
7141 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7142 (convert_vector_to_array_for_subscript): ... this.
7143 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7144 VIEW_CONVERT_EXPR to an array type. Rename to ...
7145 (convert_vector_to_array_for_subscript): ... this.
7146
4f2e1536
MP
71472016-05-12 Marek Polacek <polacek@redhat.com>
7148
7149 PR c/70756
7150 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7151 size_in_bytes and pass LOC to it.
7152
d6e83a8d
MM
71532016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7154
7155 PR c/43651
7156 * c.opt (Wduplicate-decl-specifier): New option.
7157
5c3a10fb
MP
71582016-05-11 Marek Polacek <polacek@redhat.com>
7159
7160 PR c++/71024
7161 * c-common.c (diagnose_mismatched_attributes): New function.
7162 * c-common.h (diagnose_mismatched_attributes): Declare.
7163
deef7113
MP
71642016-05-04 Marek Polacek <polacek@redhat.com>
7165
7166 * c.opt (Wdangling-else): New option.
7167
79ce98bc
MP
71682016-05-03 Marek Polacek <polacek@redhat.com>
7169
7170 PR c/70859
7171 * c-common.c (builtin_function_validate_nargs): Add location
7172 parameter. Use it.
7173 (check_builtin_function_arguments): Add location and arguments
7174 parameters. Use them.
7175 * c-common.h (check_builtin_function_arguments): Update declaration.
7176
381cdae4
RB
71772016-05-03 Richard Biener <rguenther@suse.de>
7178
7179 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7180 allow call args to gimplify to SSA names.
7181
1d793c34
MP
71822016-05-03 Marek Polacek <polacek@redhat.com>
7183
7184 * c-common.h (enum c_omp_region_type): Remove stray comma.
7185
77886428
CP
71862016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7187
7188 * c-common.h (enum c_omp_region_type): Define.
7189
697e0b28
RS
71902016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7191
7192 * c-common.c (shorten_compare): Use wi::to_wide.
7193
e7ff0319
CP
71942016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7195
7196 PR middle-end/70626
7197 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7198 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7199 reduction clauses in acc parallel loops.
7200
2fff3db8
MP
72012016-04-29 Marek Polacek <polacek@redhat.com>
7202
7203 PR c/70852
7204 * c-common.c (warn_for_memset): Check domain before accessing it.
7205
509063eb
DV
72062016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7207
7208 PR/69089
7209 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7210 "aligned" attribute.
7211
b632761d
JM
72122016-04-28 Jason Merrill <jason@redhat.com>
7213
7214 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7215
174f6622
ES
72162016-04-28 Eduard Sanou <dhole@openmailbox.org>
7217 Matthias Klose <doko@debian.org>
7218
7219 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7220 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7221 handling.
7222 * c-common.h (get_source_date_epoch): Prototype.
7223 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7224
6bc2bb18
RB
72252015-04-27 Ryan Burn <contact@rnburn.com>
7226
7227 PR c++/69024
7228 PR c++/68997
7229 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7230 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7231 external linkage.
7232 (cilk_detect_and_unwrap): Corresponding changes.
7233 (extract_free_variables): Don't extract free variables from
7234 AGGR_INIT_EXPR slot.
7235 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7236 (cilk_recognize_spawn): Likewise.
7237
c1e1f433
BS
72382016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7239
7240 * c.opt (Wmemset-elt-size): New option.
7241 * c-common.c (warn_for_memset): New function.
7242 * c-common.h (warn_for_memset): Declare.
7243
d067e05f
JM
72442016-04-25 Jason Merrill <jason@redhat.com>
7245
7246 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7247 No longer static.
7248 * c-common.h: Declare it.
7249 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7250
9aa36ae5
JM
72512016-04-22 Jason Merrill <jason@redhat.com>
7252
7253 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7254
477d4906
IV
72552016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7256
7257 PR c++/69363
7258 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7259 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7260
fe37c7af
MM
72612016-04-18 Michael Matz <matz@suse.de>
7262
7263 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7264 and SET_DECL_ALIGN.
7265
23f2660f
EB
72662016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7267
7268 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7269 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7270 to incomplete types.
7271 (dump_nested_type): Remove redundant tests and tidy up.
7272 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7273 a type which is the typedef of an original type.
7274
1e77281b
MP
72752016-04-15 Marek Polacek <polacek@redhat.com>
7276
7277 PR c/70651
7278 * c-common.c (build_va_arg): Change two asserts into errors and return
7279 error_mark_node.
7280
b3a77f21
MP
72812016-04-13 Marek Polacek <polacek@redhat.com>
7282
7283 PR c++/70639
7284 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7285 for switch statements, too.
7286
322b8466
JM
72872016-03-28 Jason Merrill <jason@redhat.com>
7288
7289 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7290
fbdb6baf
MP
72912016-03-23 Marek Polacek <polacek@redhat.com>
7292
7293 PR c++/69884
7294 * c.opt (Wignored-attributes): New option.
7295
5c240f4d
DM
72962016-03-22 David Malcolm <dmalcolm@redhat.com>
7297
7298 PR c/69993
7299 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7300 diagnostic text, reversing the order of the warning and note so
7301 that they appear in source order.
7302
14ba7b28
MP
73032016-03-17 Marek Polacek <polacek@redhat.com>
7304
7305 PR c/69407
7306 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7307 operations.
7308
08a1cadc
JM
73092016-03-14 Jason Merrill <jason@redhat.com>
7310
2aaeea19
JM
7311 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7312
08a1cadc
JM
7313 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7314
c06d25bb
RB
73152016-03-09 Richard Biener <rguenther@suse.de>
7316
7317 PR c/70143
7318 * c-common.c (strict_aliasing_warning): Add back
7319 alias_sets_conflict_p check.
7320
80aac5c8
JM
73212016-03-08 Jason Merrill <jason@redhat.com>
7322
7323 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7324
64b23c13
DM
73252016-03-04 David Malcolm <dmalcolm@redhat.com>
7326
7327 PR c/68187
7328 * c-indentation.c (get_visual_column): Move code to determine next
7329 tab stop to...
7330 (next_tab_stop): ...this new function.
7331 (line_contains_hash_if): Delete function.
7332 (detect_preprocessor_logic): Delete function.
7333 (get_first_nws_vis_column): New function.
7334 (detect_intervening_unindent): New function.
7335 (should_warn_for_misleading_indentation): Replace call to
7336 detect_preprocessor_logic with a call to
7337 detect_intervening_unindent.
7338
729526f5
DM
73392016-03-04 David Malcolm <dmalcolm@redhat.com>
7340
7341 PR c/68187
7342 * c-indentation.c (should_warn_for_misleading_indentation): When
7343 suppressing warnings about cases where the guard and body are on
7344 the same column, only use the first non-whitespace column in place
7345 of the guard token column when dealing with "else" clauses.
7346 When rejecting aligned BODY and NEXT, loosen the requirement
7347 from equality with the first non-whitespace of guard to simply
7348 that they not be indented relative to it.
7349
e9a35493
RB
73502016-03-04 Richard Biener <rguenther@suse.de>
7351
7352 PR c++/70054
7353 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7354 instead of alias_sets_conflict_p.
7355
1be56bc5
MP
73562016-03-01 Marek Polacek <polacek@redhat.com>
7357
7358 PR c++/69795
7359 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7360 any DECL.
7361
35886f0b
MS
73622016-02-22 Martin Sebor <msebor@redhat.com>
7363
7364 PR middle-end/69780
7365 * c-common.c (check_builtin_function_arguments): Validate and
7366 reject invalid arguments to __builtin_alloca_with_align.
7367
4246c8da
MW
73682016-02-20 Mark Wielaard <mjw@redhat.com>
7369
7370 PR c/28901
7371 * c.opt (Wunused-const-variable): Turn into Alias for...
7372 (Wunused-const-variable=): New option.
7373
268be88c
BE
73742016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7375
7376 PR c++/69865
7377 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7378 here...
7379 (c_common_init_options): ...to here.
7380 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7381
871b3f47
JJ
73822016-02-19 Jakub Jelinek <jakub@redhat.com>
7383
7384 PR c++/69826
7385 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7386 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7387 flag_preprocess_only.
7388
bf14eba2
JJ
73892016-02-16 Jakub Jelinek <jakub@redhat.com>
7390
7391 PR c/69835
7392 * c.opt (Wnonnull-compare): Enable for -Wall.
7393
ba6b3795
JJ
73942016-02-15 Jakub Jelinek <jakub@redhat.com>
7395
7396 PR c++/69797
7397 * c-common.c (sync_resolve_size): Diagnose too few arguments
7398 even when params is non-NULL empty vector.
7399
a011cd92
BS
74002016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7401
7402 PR target/60410
7403 * c.opt (fshort-double): Remove.
7404
46cb9332
MS
74052016-02-05 Martin Sebor <msebor@redhat.com>
7406
7407 PR c++/69662
7408 * c.opt (Warning options): Update -Wplacement-new to take
7409 an optional argument.
7410
e1b81f2b
JJ
74112016-02-01 Jakub Jelinek <jakub@redhat.com>
7412
7413 PR preprocessor/69543
7414 PR c/69558
7415 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7416 instead of loc to control_warning_option.
7417
b6adbb9f
NS
74182016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7419
7420 * c.opt (fopenacc-dim=): New option.
7421
5d70666e
RB
74222016-01-27 Ryan Burn <contact@rnburn.com>
7423
7424 PR cilkplus/69267
7425 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7426 gimplify_arg. Removed superfluous post_p argument.
7427 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7428 superfluous post_p argument.
7429 * c-gimplify.c (c_gimplify_expr): Likewise.
7430
01e1dea3
DM
74312016-01-26 David Malcolm <dmalcolm@redhat.com>
7432
7433 PR other/69006
7434 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7435 pp_newline_and_flush with pp_flush.
7436
9f04a53e
MS
74372016-01-20 Martin Sebor <msebor@redhat.com>
7438
7439 PR c/69405
7440 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7441 an incompatible argument when the argument isn't a valid tree node.
7442
7f26f7df
JM
74432016-01-18 Jason Merrill <jason@redhat.com>
7444
7445 PR c++/68767
7446 * c-common.c (check_function_arguments_recurse): Fold the whole
7447 COND_EXPR, not just the condition.
7448
f62bf092
TV
74492016-01-18 Tom de Vries <tom@codesourcery.com>
7450
7451 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7452 classify as loop clause.
7453
e0a575ff
JJ
74542016-01-15 Jakub Jelinek <jakub@redhat.com>
7455
7456 PR bootstrap/68271
7457 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7458 C++ FE no longer has limit on number of pragmas.
7459
74602015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7461
7462 PR c++/69048
7463 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7464 to add missing cleanup point.
b6e3db06 7465
c7df95d8
DM
74662016-01-14 David Malcolm <dmalcolm@redhat.com>
7467
7468 PR c++/68819
7469 * c-indentation.c (get_visual_column): Add location_t param.
7470 Handle the column number being zero by effectively disabling the
7471 warning, with an "inform".
7472 (should_warn_for_misleading_indentation): Add location_t argument
7473 for all uses of get_visual_column.
7474
21efdd80
PP
74752016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7476
7477 PR c++/69029
7478 * c-indentation.c (should_warn_for_misleading_indentation):
7479 Don't warn about do-while statements.
7480
7a127fa7
MS
74812016-01-07 Martin Sebor <msebor@redhat.com>
7482
7483 PR c/68966
7484 * c-common.c (sync_resolve_size): Reject first argument when it's
7485 a pointer to _Bool.
7486
c589e975
DM
74872016-01-05 David Malcolm <dmalcolm@redhat.com>
7488
7489 PR c/69122
7490 * c-indentation.c (get_visual_column): Remove default argument.
7491 (should_warn_for_misleading_indentation): For the multiline case,
7492 update call to get_visual_column for next_stmt_exploc so that it
7493 captures the location of the first non-whitespace character in the
7494 relevant line. Don't issue warnings if there is non-whitespace
7495 before the next statement.
7496
818ab71a
JJ
74972016-01-04 Jakub Jelinek <jakub@redhat.com>
7498
7499 Update copyright years.
7500
745e411d
DM
75012015-12-21 David Malcolm <dmalcolm@redhat.com>
7502
7503 * c-common.c (binary_op_error): Convert first param from
7504 location_t to rich_location * and use it when emitting an error.
7505 * c-common.h (binary_op_error): Convert first param from
7506 location_t to rich_location *.
7507
de67c4c3
DM
75082015-12-16 David Malcolm <dmalcolm@redhat.com>
7509
7510 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7511 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7512
4a38b02b
IV
75132015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7514
7515 * c-common.c (c_common_attribute_table): Handle "omp declare target
7516 link" attribute.
7517
54d62f51
JJ
75182015-12-14 Jakub Jelinek <jakub@redhat.com>
7519
7520 PR c/68833
7521 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7522
8d4227c8
TB
75232014-12-12 Tobias Burnus <burnus@net-b.de>
7524
7525 PR fortran/68815
7526 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7527 specifiers (%d, %i,%u and %c).
7528
f6069ccc
DM
75292015-12-10 David Malcolm <dmalcolm@redhat.com>
7530
7531 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7532
63bbf46d
JJ
75332015-12-08 Jakub Jelinek <jakub@redhat.com>
7534
7535 PR c/48088
7536 PR c/68657
7537 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7538 * c-pragma.c (handle_pragma_diagnostic): Adjust
7539 control_warning_option caller.
7540
f79520bb
DM
75412015-12-07 David Malcolm <dmalcolm@redhat.com>
7542
7543 * c-common.c (c_cpp_error): Update for change to
7544 rich_location::set_range.
7545
b3d5bc62
JJ
75462015-12-04 Paolo Bonzini <bonzini@gnu.org>
7547
7548 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7549 shifting 1 out of the sign bit.
7550
75512015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7552
7553 * c-common.c (c_common_attribute_table[]): Update max arguments
7554 count for "simd" attribute.
7555 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7556
6eb4a537
JJ
75572015-12-03 Jakub Jelinek <jakub@redhat.com>
7558
7559 PR preprocessor/57580
7560 * c-ppoutput.c (print): Change printed field to bool.
7561 Move src_file last for smaller padding.
7562 (init_pp_output): Set print.printed to false instead of 0.
7563 (scan_translation_unit): Fix up formatting. Set print.printed
7564 to true after printing something other than newline.
7565 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7566 (maybe_print_line_1): Set print.printed to false instead of 0.
7567 (print_line_1): Likewise.
7568 (do_line_change): Set print.printed to true instead of 1.
7569 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7570 dump_macro): Set print.printed to false after printing newline.
7571
4250754e
JM
75722015-12-02 Jason Merrill <jason@redhat.com>
7573
f479b43d
JM
7574 * c-common.c (fold_for_warn): New.
7575 (warn_logical_operator, warn_tautological_cmp)
7576 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7577
4250754e
JM
7578 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7579 (c_fully_fold_internal, decl_constant_value_for_optimization):
7580 Move to c/c-fold.c.
7581 * c-common.h: Don't declare decl_constant_value_for_optimization.
7582
e9e32ee6
JM
75832015-12-02 Joseph Myers <joseph@codesourcery.com>
7584
7585 PR c/68162
7586 * c-common.h (c_build_qualified_type): Add extra default
7587 arguments.
7588
37d5ad46
JB
75892015-12-01 Julian Brown <julian@codesourcery.com>
7590 Cesar Philippidis <cesar@codesourcery.com>
7591 James Norris <James_Norris@mentor.com>
7592
7593 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7594 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7595 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7596
f07862c7
EB
75972015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7598
7599 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7600 (decl_sloc_common): Delete and move bulk of processing to...
7601 (decl_sloc): ...here.
7602 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7603 (dump_ada_double_name): Remove S parameter and compute the suffix.
7604 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7605 element type and deal with an anonymous one.
7606 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7607 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7608 and remove reference to QUAL_UNION_TYPE.
7609 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7610 (dump_nested_type): ...here. New function extracted from above.
7611 Generate a full declaration for anonymous element type of arrays.
7612 (print_ada_declaration): Really skip anonymous declarations. Remove
7613 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7614 Clean up processing of declarations of array types and objects.
7615 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7616 Remove obsolete code and tidy up.
7617
75c8aac3
JH
76182015-11-29 Jan Hubicka <hubicka@ucw.cz>
7619
7620 PR c/67581
7621 * c-common.c (handle_transparent_union_attribute): Update
7622 also type variants.
7623
b58d3df2
ML
76242015-11-27 Martin Liska <mliska@suse.cz>
7625
7626 PR c++/68312
7627 * array-notation-common.c (cilkplus_extract_an_triplets):
7628 Release vector of vectors.
7629 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7630
89a01fcf
EB
76312015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7632
7633 PR c++/68527
7634 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7635 (print_ada_struct_decl): Likewise.
7636
cc5c5226
IZ
76372015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7638
7639 PR c++/68001
7640 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7641 * cilk.c (recognize_spawn): Determine location in a more precise
7642 way.
7643
269adb9d
JM
76442015-11-19 Jason Merrill <jason@redhat.com>
7645
7646 * c-common.c (shorten_compare): But look through macros from
7647 system headers.
7648
d0eccfcd
JM
76492015-11-18 Jason Merrill <jason@redhat.com>
7650
7651 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7652 non-constant operand comes from a macro.
7653
3e44547c
JM
76542015-11-17 Jason Merrill <jason@redhat.com>
7655
7656 PR bootstrap/68346
7657 * c-common.c (warn_tautological_cmp): Fold before checking for
7658 constants.
7659
0f62c7a0
MP
76602015-11-16 Marek Polacek <polacek@redhat.com>
7661
7662 PR c++/68362
7663 * c-common.c (check_case_bounds): Fold low and high cases.
7664
a868811e
MP
76652015-11-16 Marek Polacek <polacek@redhat.com>
7666
7667 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7668 * c-common.c (c_common_get_alias_set): Likewise.
7669 (handle_visibility_attribute): Likewise.
7670
fff77217
KY
76712015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7672
7673 * c-common.c (handle_simd_attribute): New.
7674 (struct attribute_spec): Add entry for "simd".
7675 (handle_simd_attribute): New.
7676
269e63b7
KT
76772015-11-13 Kai Tietz <ktietz70@googlemail.com>
7678
7679 * c-lex.c (interpret_float): Use fold_convert.
7680
ebedc9a3
DM
76812015-11-13 David Malcolm <dmalcolm@redhat.com>
7682
7683 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7684 and store it on the result.
7685 * c-opts.c (c_common_init_options): Set
7686 global_dc->colorize_source_p.
7687
6e232ba4
JN
76882015-11-12 James Norris <jnorris@codesourcery.com>
7689 Joseph Myers <joseph@codesourcery.com>
7690
7365279f 7691 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7692 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7693 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7694 PRAGMA_OACC_CLAUSE_LINK.
7695
e78bede6
MP
76962015-11-11 Marek Polacek <polacek@redhat.com>
7697
7698 PR c/68107
7699 PR c++/68266
7700 * c-common.c (valid_array_size_p): New function.
7701 * c-common.h (valid_array_size_p): Declare.
7702
3f8257db 77032015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7704
7705 PR bootstrap/68271
7706 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7707
69f293c9
AM
77082015-11-11 Andrew MacLeod <amacleod@redhat.com>
7709
7710 * array-notation-common.c: Remove unused header files.
7711 * c-ada-spec.c: Likewise.
7712 * c-cilkplus.c: Likewise.
7713 * c-common.c: Likewise.
7714 * c-cppbuiltin.c: Likewise.
7715 * c-dump.c: Likewise.
7716 * c-format.c: Likewise.
7717 * c-gimplify.c: Likewise.
7718 * c-indentation.c: Likewise.
7719 * c-lex.c: Likewise.
7720 * c-omp.c: Likewise.
7721 * c-opts.c: Likewise.
7722 * c-pch.c: Likewise.
7723 * c-ppoutput.c: Likewise.
7724 * c-pragma.c: Likewise.
7725 * c-pretty-print.c: Likewise.
7726 * c-semantics.c: Likewise.
7727 * c-ubsan.c: Likewise.
7728 * cilk.c: Likewise.
7729 * stub-objc.c: Likewise.
7730
3a40d81d
NS
77312015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7732 Cesar Philippidis <cesar@codesourcery.com>
7733 James Norris <jnorris@codesourcery.com>
7734 Julian Brown <julian@codesourcery.com>
7735 Nathan Sidwell <nathan@codesourcery.com>
7736
7737 * c-pragma.c (oacc_pragmas): Add "routine".
7738 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7739
ee45a32d
EB
77402015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7741
7742 * c-common.c (c_common_attributes): Add scalar_storage_order.
7743 (handle_scalar_storage_order_attribute): New function.
7744 * c-pragma.c (global_sso): New variable.
7745 (maybe_apply_pragma_scalar_storage_order): New function.
7746 (handle_pragma_scalar_storage_order): Likewise.
7747 (init_pragma): Register scalar_storage_order.
7748 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7749 * c.opt (Wscalar-storage-order): New warning.
7750 (fsso-struct=): New option.
7751
eb11eb15
MS
77522015-11-08 Martin Sebor <msebor@redhat.com>
7753
7754 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7755
0aad0198
RS
77562015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7757
7758 * c-common.c: Don't undef DEF_BUILTIN.
7759
8a645150
DM
77602015-11-06 David Malcolm <dmalcolm@redhat.com>
7761
7762 * c-common.c (c_cpp_error): Convert parameter from location_t to
7763 rich_location *. Eliminate the "column_override" parameter and
7764 the call to diagnostic_override_column.
7765 Update the "done_lexing" clause to set range 0
7766 on the rich_location, rather than overwriting a location_t.
7767 * c-common.h (c_cpp_error): Convert parameter from location_t to
7768 rich_location *. Eliminate the "column_override" parameter.
7769
7a5e4956
CP
77702015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7771 Thomas Schwinge <thomas@codesourcery.com>
7772 James Norris <jnorris@codesourcery.com>
7773
7774 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7775 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7776 clauses with parallel and kernels and loops.
7777 * c-pragma.h (enum pragma_omp_clause): Add entries for
7778 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7779 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7780 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7781 INDEPENDENT,SEQ}.
7782 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7783
e2f5cc96
MS
77842015-11-05 Martin Sebor <msebor@redhat.com>
7785
7786 PR c++/67942
7787 * c.opt (-Wplacement-new): New option.
7788
e01d41e5
JJ
77892015-11-05 Jakub Jelinek <jakub@redhat.com>
7790
7791 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7792 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7793 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7794 save_expr or create_tmp_var* if TEST is true.
7795 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7796 Don't call add_stmt here.
7797 (struct c_omp_check_loop_iv_data): New type.
7798 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7799 c_omp_check_loop_iv_exprs): New functions.
7800 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7801 distribute.
7802 (c_omp_declare_simd_clauses_to_numbers): Change
7803 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7804 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7805 from numbers to PARM_DECLs.
7806
595278be
MM
78072015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7808
7809 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7810 flag_checking.
7811
3f8257db 78122015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7813
7814 PR c++-common/67882
b3d5bc62
JJ
7815 * c-common.h (fold_offsetof_1): Add argument.
7816 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7817 offsetof expressions that reference elements past the end of
7818 an array.
7819
4bf9e5a8
TS
78202015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7821 Chung-Lin Tang <cltang@codesourcery.com>
7822
7823 * c-pragma.c (oacc_pragmas): Add "atomic".
7824 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7825
3b1661a9
ES
78262015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7827
7828 * c-common.c (handle_target_clones_attribute): New.
7829 (c_common_attribute_table): Add handle_target_clones_attribute.
7830 (handle_always_inline_attribute): Add check on target_clones attribute.
7831 (handle_target_attribute): Ditto.
7832
2adfab87
AM
78332015-10-29 Andrew MacLeod <amacleod@redhat.com>
7834
7835 * array-notation-common.c: Reorder #include's and remove duplicates.
7836 * c-ada-spec.c: Likewise.
7837 * c-cilkplus.c: Likewise.
7838 * c-common.c: Likewise.
7839 * c-cppbuiltin.c: Likewise.
7840 * c-dump.c: Likewise.
7841 * c-format.c: Likewise.
7842 * c-gimplify.c: Likewise.
7843 * c-indentation.c: Likewise.
7844 * c-lex.c: Likewise.
7845 * c-omp.c: Likewise.
7846 * c-opts.c: Likewise.
7847 * c-pch.c: Likewise.
7848 * c-ppoutput.c: Likewise.
7849 * c-pragma.c: Likewise.
7850 * c-pretty-print.c: Likewise.
7851 * c-semantics.c: Likewise.
7852 * c-ubsan.c: Likewise.
7853 * cilk.c: Likewise.
7854 * stub-objc.c: Likewise.
7855
d90ec4f2
JM
78562015-10-28 Jason Merrill <jason@redhat.com>
7857
7858 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7859
88bae6f4
TS
78602015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7861 James Norris <jnorris@codesourcery.com>
7862 Cesar Philippidis <cesar@codesourcery.com>
7863
7864 PR c/64765
7865 PR c/64880
7866 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7867 * c-omp.c (c_oacc_split_loop_clauses): New function.
7868
b1726d6c
MS
78692015-10-21 Martin Sebor <msebor@redhat.com>
7870
7871 PR driver/68043
7872 * c.opt: End each sentence that describes an option with a period.
7873
fa60eeb9
MP
78742015-10-20 Marek Polacek <polacek@redhat.com>
7875
7876 * array-notation-common.c (is_cilkplus_vector_p): Define.
7877 * c-common.h (is_cilkplus_vector_p): Declare.
7878
95979049
MP
78792015-10-20 Marek Polacek <polacek@redhat.com>
7880
7881 * c.opt (std=gnu++11): Do not describe as experimental.
7882 (std=gnu++14): Likewise.
7883
2a9fb712
JM
78842015-10-19 Jason Merrill <jason@redhat.com>
7885
7886 * c-cppbuiltin.c (c_cpp_builtins): Define
7887 __cpp_nontype_template_args.
7888
13b380a3
JM
78892015-10-19 Jason Merrill <jason@redhat.com>
7890
7891 * c-cppbuiltin.c (c_cpp_builtins): Define
7892 __cpp_enumerator_attributes, __cpp_fold_expressions,
7893 __cpp_unicode_characters.
7894
d9a6bd32
JJ
78952015-10-13 Jakub Jelinek <jakub@redhat.com>
7896 Aldy Hernandez <aldyh@redhat.com>
7897
7898 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7899 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7900 (c_define_builtins): Likewise.
7901 * c-common.h (enum c_omp_clause_split): Add
7902 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7903 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7904 (c_finish_omp_for): Add ORIG_DECLV argument.
7905 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7906 201511 instead of 201307.
7907 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7908 OMP_CRITICAL_CLAUSES to it.
7909 (c_finish_omp_ordered): Add CLAUSES argument, set
7910 OMP_ORDERED_CLAUSES to it.
7911 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7912 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7913 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7914 constructs and new OpenMP 4.5 clauses. Clear
7915 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7916 verification code.
7917 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7918 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7919 (enum pragma_omp_clause): Add
7920 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7921 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7922
624d31fe
RS
79232015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7924
7925 * c-lex.c (interpret_float): Use real_equal instead of
7926 REAL_VALUES_EQUAL.
7927
b8fd7909
JM
79282015-10-04 Jason Merrill <jason@redhat.com>
7929
7930 Implement N4514, C++ Extensions for Transactional Memory.
7931 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7932 (c_common_attribute_table): Add transaction_safe_dynamic.
7933 transaction_safe now affects type identity.
7934 (handle_tm_attribute): Handle transaction_safe_dynamic.
7935 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7936 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7937 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7938 (D_TRANSMEM): New.
7939 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7940 * c-pretty-print.c (pp_c_attributes_display): Don't print
7941 transaction_safe in C++.
7942
12651878
MP
79432015-10-02 Marek Polacek <polacek@redhat.com>
7944
7945 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7946
3e3b8d63
MP
79472015-10-02 Marek Polacek <polacek@redhat.com>
7948
7949 PR c/64249
7950 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7951 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7952 * c.opt (Wduplicated-cond): New option.
7953
0d1a8f75
JM
79542015-10-01 Joseph Myers <joseph@codesourcery.com>
7955
7956 * c.opt (std=c11): Do not describe as experimental.
7957 (std=gnu11): Likewise.
7958 (std=iso9899:2011): Likewise.
7959
3e32ee19
NS
79602015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7961
7962 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7963 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7964
974348ee
MP
79652015-09-25 Marek Polacek <polacek@redhat.com>
7966
7967 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7968 (ubsan_instrument_shift): Likewise.
7969
15dbc1a6
MP
79702015-09-25 Marek Polacek <polacek@redhat.com>
7971
7972 PR sanitizer/64906
7973 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7974
6b95d7cc
PP
79752015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7976
7977 * c-indentation.c (should_warn_for_misleading_indentation):
7978 Compare next_stmt_vis_column with guard_line_first_nws instead
7979 of with guard_line_vis_column.
7980
c1822f9c
MLI
79812015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7982
7983 PR c/49654
7984 PR c/49655
7985 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7986 options and options not valid for the current language.
7987
d5398058
PP
79882015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7989
7990 * c-indentation.c (should_warn_for_misleading_indentation):
7991 Float out and consolidate the calls to get_visual_column that
7992 are passed guard_exploc as an argument. Compare
7993 next_stmt_vis_column with guard_line_first_nws instead of with
7994 body_line_first_nws.
7995
6b333269
NS
79962015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7997
7998 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7999 Wnamespaces): New C++ warnings.
8000
a75f1574
JM
80012015-09-22 Jason Merrill <jason@redhat.com>
8002
8003 * c-common.h (abi_compat_version_crosses): New.
8004 (warn_abi_version): Declare.
8005 * c-common.c: Define it.
8006 * c-opts.c (c_common_post_options): Handle it.
8007 flag_abi_compat_version defaults to 8.
8008
bdaaa8b7
VV
80092015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8010
8011 Complete the implementation of N4230, Nested namespace definition.
8012 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8013 __cpp_nested_namespace_definitions.
8014
eaa797e8
MLI
80152015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8016
8017 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8018
c4914de6
MLI
80192015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8020
8021 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8022 when warning.
8023 * c-pragma.h (pragma_lex): Add optional loc argument.
8024
fcb87c50
MM
80252015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8026
8027 * c-format.c (check_format_arg): Adjust to use common block size in all
8028 object pools.
8029
31bdd08a
DM
80302015-09-15 David Malcolm <dmalcolm@redhat.com>
8031
8032 * c-format.c (location_from_offset): Update for change in
8033 signature of location_get_source_line.
8034 * c-indentation.c (get_visual_column): Likewise.
8035 (line_contains_hash_if): Likewise.
8036
aa9f4b4c
MP
80372015-09-14 Marek Polacek <polacek@redhat.com>
8038
8039 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8040 setting various warnings.
8041
aa256c4a
MP
80422015-09-14 Marek Polacek <polacek@redhat.com>
8043
8044 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8045 a negative value.
8046
0f876f22
MW
80472015-09-11 Mark Wielaard <mjw@redhat.com>
8048
8049 PR c/28901
8050 * c.opt (Wunused-variable): Option from common.opt.
8051 (Wunused-const-variable): New option.
8052
273aa49e
PC
80532015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8054
8055 PR c++/53184
8056 * c.opt ([Wsubobject-linkage]): Add.
8057
1807ffc1
MS
80582015-09-03 Martin Sebor <msebor@redhat.com>
8059
8060 PR c/66516
8061 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8062 functions.
8063 * c-common.c (reject_gcc_builtin): Define.
8064
38942840
BI
80652015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8066
8067 PR middle-end/60586
8068 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8069 prototype.
8070 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8071 cilk_gimplify_call_params_in_spawned_fn.
8072 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8073 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8074 unwrapping.
8075
c316b5e4
MP
80762015-08-25 Marek Polacek <polacek@redhat.com>
8077
8078 PR middle-end/67330
8079 * c-common.c (handle_weak_attribute): Don't check whether the
8080 visibility can be changed here.
8081
584a7c46
MLI
80822015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8083
8084 * c-lex.c (c_lex_with_flags): Use explicit locations.
8085
a79683d5
TS
80862015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8087
8088 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8089 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8090
61717a45
FXC
80912015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8092
8093 PR middle-end/36757
8094 * c-common.c (check_builtin_function_arguments): Add check
8095 for BUILT_IN_SIGNBIT argument.
8096
329524f5
PC
80972015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8098
8099 PR c++/67160
8100 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8101 in c++1z mode.
8102
4ee55665
MP
81032015-08-17 Marek Polacek <polacek@redhat.com>
8104
8105 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8106 with whitespaces before qualifier names.
8107
b893e375
MP
81082015-08-12 Marek Polacek <polacek@redhat.com>
8109
8110 PR c++/55095
8111 * c-common.c (maybe_warn_shift_overflow): Properly handle
8112 left-shifting 1 into the sign bit.
8113
c2d89095
MLI
81142015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8115
8116 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8117
971e17ff
AS
81182015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8119 Braden Obrzut <admin@maniacsvault.net>
8120 Jason Merrill <jason@redhat.com>
8121
8122 Add C++ Concepts TS support.
8123 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8124 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8125 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8126 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8127 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8128 * c.opt (fconcepts): New.
8129
b3d5bc62
JJ
81302015-08-02 Martin Sebor <msebor@redhat.com>
8131
8132 * c.opt (-Wframe-address): New warning option.
8133
8ebca419
PP
81342015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8135
8136 * c-indentation.c (should_warn_for_misleading_indentation):
8137 Improve heuristics.
8138
1a1e101f
PP
81392015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8140
8141 * c-indentation.c (get_visual_column): Add parameter first_nws,
8142 use it. Update comment documenting the function.
8143 (is_first_nonwhitespace_on_line): Remove.
8144 (should_warn_for_misleading_indentation): Replace usage of
8145 of is_first_nonwhitespace_on_line with get_visual_column.
8146
992118a1
PP
81472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8148
8149 * c-indentation.h (struct token_indent_info): Define.
8150 (get_token_indent_info): Define.
8151 (warn_for_misleading_information): Declare.
8152 * c-common.h (warn_for_misleading_information): Remove.
8153 * c-identation.c (warn_for_misleading_indentation):
8154 Change declaration to take three token_indent_infos. Adjust
8155 accordingly.
8156 * c-identation.c (should_warn_for_misleading_indentation):
8157 Likewise. Bail out early if the body is a compound statement.
8158 (guard_tinfo_to_string): Define.
8159
e8fa3817
JM
81602015-07-30 Jason Merrill <jason@redhat.com>
8161
8162 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8163 '*' for reference decay.
8164
173864e8
MP
81652015-07-30 Marek Polacek <polacek@redhat.com>
8166
8167 * c-common.c (warn_tautological_cmp): Bail for float types.
8168
f2afe6dd
MP
81692015-07-27 Marek Polacek <polacek@redhat.com>
8170
8171 PR bootstrap/67030
8172 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8173
05b28fd6
MP
81742015-07-27 Marek Polacek <polacek@redhat.com>
8175
8176 PR c++/66555
8177 PR c/54979
8178 * c-common.c (find_array_ref_with_const_idx_r): New function.
8179 (warn_tautological_cmp): New function.
8180 * c-common.h (warn_tautological_cmp): Declare.
8181 * c.opt (Wtautological-compare): New option.
8182
5a5062b8
MP
81832015-07-23 Marek Polacek <polacek@redhat.com>
8184
8185 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8186 (ubsan_instrument_shift): Likewise.
8187
dc891fe7
MP
81882015-07-23 Marek Polacek <polacek@redhat.com>
8189
8190 PR sanitizer/66908
8191 * c-ubsan.c: Include gimplify.h.
8192 (ubsan_instrument_division): Unshare OP0 and OP1.
8193 (ubsan_instrument_shift): Likewise.
8194
451b5e48
MP
81952015-07-20 Marek Polacek <polacek@redhat.com>
8196 Richard Sandiford <richard.sandiford@arm.com>
8197
8198 PR c++/55095
8199 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8200 Use EXPR_LOC_OR_LOC.
8201 (maybe_warn_shift_overflow): New function.
8202 * c-common.h (maybe_warn_shift_overflow): Declare.
8203 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8204 * c.opt (Wshift-overflow): New option.
8205
fb0b2914
ML
82062015-07-16 Martin Liska <mliska@suse.cz>
8207
8208 * c-format.c (static void check_format_info_main): Use
8209 object_allocator instead of pool_allocator.
8210 (check_format_arg): Likewise.
8211 (check_format_info_main): Likewise.
8212
903f5c23
AM
82132015-07-15 Andrew MacLeod <amacleod@redhat.com>
8214
8215 * c-opts.c: Remove multiline #include comment.
8216
026c3cfd
AH
82172015-07-12 Aldy Hernandez <aldyh@redhat.com>
8218
8219 * c-common.c: Fix double word typos.
8220
bb49ee66
EB
82212015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8222
8223 * c-ada-spec.h (cpp_operation): Revert latest change.
8224 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8225 constructors and destructors.
8226
1916bcb5
AM
82272015-07-09 Andrew MacLeod <amacleod@redhat.com>
8228
8229 * c-common.h: Adjust includes for flags.h changes.
8230 * stub-objc.c: Likewise.
026c3cfd 8231
a9dcd529
EB
82322015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8233
8234 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8235 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8236
b03b462f
JJ
82372015-07-08 Jakub Jelinek <jakub@redhat.com>
8238
8239 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8240 are to be removed, return NULL rather than original clauses list.
8241
c7131fb2
AM
82422015-07-07 Andrew MacLeod <amacleod@redhat.com>
8243
8244 * array-notation-common.c: Adjust includes.
8245 * c-ada-spec.c: Likewise.
8246 * c-cilkplus.c: Likewise.
8247 * c-common.h: Likewise.
8248 * c-cppbuiltin.c: Likewise.
8249 * c-dump.c: Likewise.
8250 * c-format.c: Likewise.
8251 * c-gimplify.c: Likewise.
8252 * c-indentation.c: Likewise.
8253 * c-lex.c: Likewise.
8254 * c-omp.c: Likewise.
8255 * c-opts.c: Likewise.
8256 * c-pch.c: Likewise.
8257 * c-ppoutput.c: Likewise.
8258 * c-pragma.c: Likewise.
8259 * c-pretty-print.c: Likewise.
8260 * c-semantics.c: Likewise.
8261 * c-ubsan.c: Likewise.
8262 * cilk.c: Likewise.
8263 * stub-objc.c: Likewise.
8264
2a7fb83f
EB
82652015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8266
8267 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8268 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8269
a03c9bf1
JM
82702015-07-01 Jason Merrill <jason@redhat.com>
8271
36a85135
JM
8272 * c-common.h (D_CXX11): Rename from D_CXX0X.
8273 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8274 * c-common.c: Adjust.
8275
e7fa68d5
JM
8276 * c-opts.c (c_common_post_options): Default to C++14.
8277
a03c9bf1
JM
8278 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8279
fe95b036
ESR
82802015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8281
8282 Implement N4197 - Adding u8 character literals
b3d5bc62 8283 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8284 CPP_CHAR.
b3d5bc62 8285 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8286 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8287 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8288 and CPP_UTF8CHAR tokens.
8289 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8290
da2e71c9
MLI
82912015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8292
8293 PR fortran/66605
8294 * c-common.c (do_warn_unused_parameter): Move here.
8295 * c-common.h (do_warn_unused_parameter): Declare.
8296
b155cfd9
MP
82972015-06-29 Marek Polacek <polacek@redhat.com>
8298
8299 PR c/66322
8300 * c-common.c (check_case_bounds): Add bool * parameter. Set
8301 OUTSIDE_RANGE_P.
8302 (c_add_case_label): Add bool * parameter. Pass it down to
8303 check_case_bounds.
8304 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8305 warning here.
8306 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8307 declarations.
8308
31521951
MP
83092015-06-27 Marek Polacek <polacek@redhat.com>
8310
8311 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8312 or VECTOR_INTEGER_TYPE_P throughout.
8313 * c-gimplify.c: Likewise.
8314
22d03525
MP
83152015-06-26 Marek Polacek <polacek@redhat.com>
8316
8317 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8318 * c-common.c (c_fully_fold_internal): Likewise.
8319 (c_alignof_expr): Likewise.
8320 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8321 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8322 * cilk.c (create_parm_list): Likewise.
22d03525 8323
af05e6e5
MP
83242015-06-26 Marek Polacek <polacek@redhat.com>
8325
8326 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8327
f0889939
AM
83282015-06-25 Andrew MacLeod <amacleod@redhat.com>
8329
8330 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8331 * c-gimplify.c: Likewise.
8332 * c-pragma.c: Likewise.
8333 * c-ubsan.c: Likewise.
8334 * cilk.c: Likewise.
8335
ca752f39
RS
83362015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8337
8338 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8339 ggc_hasher.
8340
16a16ec7
AM
83412015-06-25 Andrew MacLeod <amacleod@redhat.com>
8342
8343 * cilk.c: Move calls.h after tm.h in the include chain.
8344
0ae9bd27
MP
83452015-06-25 Marek Polacek <polacek@redhat.com>
8346
8347 * array-notation-common.c: Use VAR_P throughout.
8348 * c-ada-spec.c: Likewise.
8349 * c-common.c: Likewise.
8350 * c-format.c: Likewise.
8351 * c-gimplify.c: Likewise.
8352 * c-omp.c: Likewise.
8353 * c-pragma.c: Likewise.
8354 * c-pretty-print.c: Likewise.
8355 * cilk.c: Likewise.
8356
62f9079a
MP
83572015-06-25 Marek Polacek <polacek@redhat.com>
8358
8359 * cilk.c (extract_free_variables): Use is_global_var.
8360
0fa16060
RS
83612015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8362
8363 * c-common.c: Don't include target-def.h.
8364
a68ae2e1
MP
83652015-06-23 Marek Polacek <polacek@redhat.com>
8366
8367 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8368 when comparing INTEGER_CSTs.
8369
c6a2f2d9
PMR
83702015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8371
8372 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8373 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8374 (dump_ada_template): Skip partially specialized types.
8375
6b4db501
MM
83762015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8377
8378 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8379 swapping.
8380
abb226c9
AM
83812015-06-17 Andrew MacLeod <amacleod@redhat.com>
8382
8383 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8384 * c-ada-spec.c: Likewise.
8385 * c-cilkplus.c: Likewise.
8386 * c-common.c: Likewise.
8387 * c-common.h: Likewise.
8388 * c-cppbuiltin.c: Likewise.
8389 * c-dump.c: Likewise.
8390 * c-format.c: Likewise.
8391 * c-gimplify.c: Likewise.
8392 * c-indentation.c: Likewise.
8393 * c-lex.c: Likewise.
8394 * c-omp.c: Likewise.
8395 * c-opts.c: Likewise.
8396 * c-pch.c: Likewise.
8397 * c-ppoutput.c: Likewise.
8398 * c-pragma.c: Likewise.
8399 * c-pretty-print.c: Likewise.
8400 * c-semantics.c: Likewise.
8401 * c-ubsan.c: Likewise.
8402 * cilk.c: Likewise.
8403 * stub-objc.c: Likewise.
8404
076fecad
PP
84052015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8406
8407 PR c++/65168
8408 * c-common.c (c_common_truthvalue_conversion): Warn when
8409 converting an address of a reference to a truth value.
8410
13fdf2e2
AM
84112015-06-08 Andrew MacLeod <amacleod@redhat.com>
8412
8413 * array-notation-common.c : Adjust include files.
8414 * c-ada-spec.c : Likewise.
8415 * c-cilkplus.c : Likewise.
8416 * c-common.c : Likewise.
8417 * c-common.h : Likewise.
8418 * c-cppbuiltin.c : Likewise.
8419 * c-dump.c : Likewise.
8420 * c-format.c : Likewise.
8421 * c-gimplify.c : Likewise.
8422 * c-indentation.c : Likewise.
8423 * c-lex.c : Likewise.
8424 * c-omp.c : Likewise.
8425 * c-opts.c : Likewise.
8426 * c-pch.c : Likewise.
8427 * c-ppoutput.c : Likewise.
8428 * c-pragma.c : Likewise.
8429 * c-pretty-print.c : Likewise.
8430 * c-semantics.c : Likewise.
8431 * c-ubsan.c : Likewise.
8432 * cilk.c : Likewise.
8433 * stub-objc.c : Likewise.
8434
a1661b90
MP
84352015-06-08 Marek Polacek <polacek@redhat.com>
8436
8437 PR c/66415
8438 * c-format.c (location_from_offset): Return LOC if LINE is null.
8439
d7438551
AH
84402015-06-05 Aldy Hernandez <aldyh@redhat.com>
8441
8442 * c-common.h (c_parse_final_cleanups): New prototype.
8443 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8444
b3d5bc62
JJ
84452015-06-04 Sriraman Tallam <tmsriram@google.com>
8446
8447 * c-common.c (noplt): New attribute.
8448 (handle_noplt_attribute): New handler.
8449
ecb9f223
AM
84502015-06-04 Andrew MacLeod <amacleod@redhat.com>
8451
8452 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8453 * c-ada-spec.c: Likewise.
8454 * c-cilkplus.c: Likewise.
8455 * c-common.c: Likewise.
8456 * c-common.h: Likewise.
8457 * c-cppbuiltin.c: Likewise.
8458 * c-dump.c: Likewise.
8459 * c-format.c: Likewise.
8460 * c-gimplify.c: Likewise.
8461 * c-indentation.c: Likewise.
8462 * c-lex.c: Likewise.
8463 * c-omp.c: Likewise.
8464 * c-opts.c: Likewise.
8465 * c-pch.c: Likewise.
8466 * c-ppoutput.c: Likewise.
8467 * c-pragma.c: Likewise.
8468 * c-pretty-print.c: Likewise.
8469 * c-semantics.c: Likewise.
8470 * c-ubsan.c: Likewise.
8471 * cilk.c: Likewise.
8472 * stub-objc.c: Likewise.
8473
6ac48155
DM
84742015-06-02 David Malcolm <dmalcolm@redhat.com>
8475
8476 PR c/66220:
8477 * c-indentation.c (should_warn_for_misleading_indentation): Use
8478 expand_location rather than expand_location_to_spelling_point.
8479 Don't warn if the guarding statement is more indented than the
8480 next/body stmts.
8481
773ce42e
DM
84822015-06-02 David Malcolm <dmalcolm@redhat.com>
8483
8484 * c-indentation.c (warn_for_misleading_indentation): Bail out
8485 immediately if -Wmisleading-indentation isn't enabled.
8486
4fef8379
ML
84872015-06-01 Martin Liska <mliska@suse.cz>
8488
8489 * c-format.c (check_format_arg):Use new type-based pool allocator.
8490 (check_format_info_main) Likewise.
8491
1edfb384
EB
84922015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8493
8494 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8495 (has_nontrivial_methods): Likewise.
8496
9677ef52
MP
84972015-05-25 Marek Polacek <polacek@redhat.com>
8498
8499 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8500
fd5c817a
MP
85012015-05-22 Marek Polacek <polacek@redhat.com>
8502
8503 PR c/47043
8504 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8505
a2f45fe6 85062015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8507
8508 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8509 STACK_GROWS_DOWNWARD.
8510
a2f45fe6 85112015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8512
8513 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8514 STACK_GROWS_DOWNWARD rather than if it is defined.
8515
0fee2ac2 85162015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8517
0fee2ac2
MLI
8518 PR c/52952
8519 * c-format.c (location_column_from_byte_offset): New.
8520 (location_from_offset): New.
8521 (struct format_wanted_type): Add offset_loc field.
8522 (check_format_info): Move handling of location for extra arguments
8523 closer to the point of warning.
8524 (check_format_info_main): Pass the result of location_from_offset
8525 to warning_at.
8526 (format_type_warning): Pass the result of location_from_offset
8527 to warning_at.
8528
cf4ef6f7
MP
85292015-05-20 Marek Polacek <polacek@redhat.com>
8530
8531 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8532
3a65ee74
MP
85332015-05-20 Marek Polacek <polacek@redhat.com>
8534
8535 * c-ada-spec.c (dump_sloc): Use DECL_P.
8536
21b634ae
MP
85372015-05-20 Marek Polacek <polacek@redhat.com>
8538
8539 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8540 * c-common.c: Likewise.
8541
0e50b624
DM
85422015-05-19 David Malcolm <dmalcolm@redhat.com>
8543
8544 * c-common.h (fe_file_change): Strengthen param from
8545 const line_map * to const line_map_ordinary *.
8546 (pp_file_change): Likewise.
8547 * c-lex.c (fe_file_change): Likewise.
8548 (cb_define): Use linemap_check_ordinary when invoking
8549 SOURCE_LINE.
8550 (cb_undef): Likewise.
8551 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8552 invoking cb_file_change.
8553 (c_finish_options): Likewise.
8554 (push_command_line_include): Likewise.
8555 (cb_file_change): Strengthen param "new_map" from
8556 const line_map * to const line_map_ordinary *.
8557 * c-ppoutput.c (cb_define): Likewise for local "map".
8558 (pp_file_change): Likewise for param "map" and local "from".
8559
fab27f52
MM
85602015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8561
8562 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8563
2fe1d762
TV
85642015-05-18 Tom de Vries <tom@codesourcery.com>
8565
8566 * c-common.c (build_va_arg_1): New function.
8567 (build_va_arg): Add address operator to va_list operand if necessary.
8568
7a37fa90
MM
85692015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8570
8571 PR c/48956
8572 * c-common.c (int_safely_convertible_to_real_p): Define.
8573 (unsafe_conversion_p): Check conversions involving complex types.
8574 (conversion_warning): Add new warning message for conversions which
8575 discard imaginary component.
8576 * c-common.h: (enum conversion_safety): Add new enumerator for such
8577 conversions.
8578
3aa3c9fc
MP
85792015-05-14 Marek Polacek <polacek@redhat.com>
8580
8581 PR c/66066
8582 PR c/66127
8583 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8584 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8585 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8586 use it. If FOR_INT_CONST, require that all evaluated operands be
8587 INTEGER_CSTs.
8588
c3388e62
DM
85892015-05-12 David Malcolm <dmalcolm@redhat.com>
8590
8591 * c-common.h (warn_for_misleading_indentation): New prototype.
8592 * c-indentation.c: New file.
8593 * c.opt (Wmisleading-indentation): New option.
8594
c7b38fd5
TV
85952015-05-12 Tom de Vries <tom@codesourcery.com>
8596
8597 PR tree-optimization/66010
8598 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8599
381bf11e
JM
86002015-05-09 Jason Merrill <jason@redhat.com>
8601
edff0c06
JM
8602 * c-opts.c (c_common_post_options): Also clear
8603 cpp_opts->cpp_warn_cxx11_compat.
8604
129211bc
JM
8605 * c-common.h (enum cxx_dialect): Add cxx_unset.
8606 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8607 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8608
381bf11e
JM
8609 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8610 (std=gnu++0x): Mark as Undocumented.
8611 (std=gnu++1y): Add deprecated message.
8612
fe191308
JM
86132015-05-08 Jason Merrill <jason@redhat.com>
8614
765189ff
JM
8615 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8616 * c-opts.c: Adjust.
8617
fe191308
JM
8618 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8619
755e528f
MP
86202015-05-08 Marek Polacek <polacek@redhat.com>
8621
8622 PR c/64918
8623 * c.opt (Woverride-init-side-effects): New option.
8624
0173bd2a
MP
86252015-05-07 Marek Polacek <polacek@redhat.com>
8626
8627 PR c/65179
8628 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8629 negative value.
8630 * c.opt (Wshift-negative-value): New option.
8631 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8632 when -Wextra and C99/C++11 mode.
8633
e0f0d3b9
MP
86342015-05-07 Marek Polacek <polacek@redhat.com>
8635 Martin Uecker <uecker@eecs.berkeley.edu>
8636
8637 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8638 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8639
8243e2a9
JM
86402015-05-05 Jason Merrill <jason@redhat.com>
8641
8642 * c.opt (Wterminate): New.
8643
577cd070
MP
86442015-04-30 Marek Polacek <polacek@redhat.com>
8645
8646 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8647 require that the non-constant be of a boolean type.
8648
0373796b
JT
86492015-04-29 Josh Triplett <josh@joshtriplett.org>
8650
e0f0d3b9
MP
8651 * c-common.c (handle_section_attribute): Refactor to reduce
8652 nesting and distinguish between error cases.
0373796b 8653
716c0ba6
MP
86542015-04-29 Marek Polacek <polacek@redhat.com>
8655
8656 PR c/64610
8657 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8658 with 0/1.
8659
8848828b
JJ
86602015-04-29 Jakub Jelinek <jakub@redhat.com>
8661
8662 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8663 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8664 HOST_BITS_PER_WIDE_INT.
8665
ecd0e562
TV
86662015-04-28 Tom de Vries <tom@codesourcery.com>
8667
8668 PR tree-optimization/65887
8669 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8670
2a877204 86712015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8672 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8673
8674 * c-ada-spec.c (in_function): Delete.
8675 (dump_generic_ada_node): Do not change in_function and remove the
8676 redundant code dealing with it.
8677 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8678 (print_ada_methods): Output the static member functions in a nested
8679 package after the regular methods as well as associated renamings.
8680
4853031e
MP
86812015-04-24 Marek Polacek <polacek@redhat.com>
8682
8683 PR c/65830
8684 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8685 and OPT_Wshift_count_overflow.
8686
8c2b7f79
MP
8687 PR c/63357
8688 * c-common.c (warn_logical_operator): Warn if the operands have the
8689 same expressions.
8690
b8787813
MP
86912015-04-24 Marek Polacek <polacek@redhat.com>
8692
8693 PR c/61534
8694 * c-common.c (warn_logical_operator): Bail if either operand comes
8695 from a macro expansion.
8696
8fba1830
BRF
86972015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8698
8699 PR target/55143
8700 * c-common.c (c_default_pointer_mode): Add definition.
8701 * c-common.h (c_default_pointer_mode): Add declaration.
8702
17958621
JJ
87032015-03-11 Jakub Jelinek <jakub@redhat.com>
8704
8705 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8706 on record_builtin_type argument.
8707
7ccb1a11
JJ
87082015-03-10 Jakub Jelinek <jakub@redhat.com>
8709
8710 PR c/65120
8711 * c-common.c (warn_logical_not_parentheses): Don't warn for
8712 !x == 0 or !x != 0.
8713
04fd785e
MP
87142015-03-07 Marek Polacek <polacek@redhat.com>
8715
8716 PR sanitizer/65280
8717 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8718 before trying to figure out whether we have a flexible array member.
8719
a4e26206 87202015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8721 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8722
8723 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8724
0d2489f4
EB
87252015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8726
8727 PR ada/65319
8728 * c-ada-spec.c (print_destructor): Remove obsolete code.
8729
83ed54d7
EB
87302015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8731
8732 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8733 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8734 DECL_TEMPLATE_RESULT emulations.
8735 (dump_ada_template)): Add guard for TYPE_METHODS.
8736
7631f0e2
MP
87372015-02-27 Marek Polacek <polacek@redhat.com>
8738
8739 PR c/65040
8740 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8741
d1783ae5
KT
87422015-02-27 Kai Tietz <ktietz@redhat.com>
8743
8744 PR c/35330
8745 * c-pragma.c (handle_pragma_weak): Do not try to create
8746 weak/alias of declarations not being function, or variable
8747 declarations.
8748
56a9f6bc
TS
87492015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8750
8751 PR libgomp/64625
8752 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8753 Remove macros.
8754 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8755
3d5cb23d
MP
87562015-02-16 Marek Polacek <polacek@redhat.com>
8757
8758 PR c/65066
8759 * c-format.c (check_format_types): Handle null param.
8760
fa008882
MP
87612015-02-13 Marek Polacek <polacek@redhat.com>
8762
8763 PR c/65040
8764 * c-format.c (check_format_types): Don't warn about different
8765 signedness if the original value is in the range of WANTED_TYPE.
8766
785f21af
JM
87672015-02-12 Jason Merrill <jason@redhat.com>
8768
8769 PR c++/64956
8770 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8771 to the current highest version.
8772 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8773
4886ec8e
JJ
87742015-02-04 Jakub Jelinek <jakub@redhat.com>
8775
8776 PR c/64824
8777 PR c/64868
8778 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8779 instead of RDIV_EXPR. Use build_binary_op instead of
8780 build2_loc.
8781
40fecdd6
JM
87822015-01-30 Joseph Myers <joseph@codesourcery.com>
8783
8784 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8785 to pass input_location as first argument.
8786
a0c88d06
TV
87872015-01-23 Tom de Vries <tom@codesourcery.com>
8788
8789 PR libgomp/64672
8790 * c.opt (fopenacc): Mark as LTO option.
8791
1506ae0e
TV
87922015-01-23 Tom de Vries <tom@codesourcery.com>
8793
8794 PR libgomp/64707
8795 * c.opt (fopenmp): Mark as LTO option.
8796
31be63ab
JJ
87972015-01-21 Jakub Jelinek <jakub@redhat.com>
8798
8799 PR c/63307
b1726d6c 8800 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8801 (compare_decls): Fix up formatting.
8802
88032015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8804
8805 PR c/63307
8806 * cilk.c: Include vec.h.
8807 (struct cilk_decls): New structure.
8808 (wrapper_parm_cb): Split this function to...
8809 (fill_decls_vec): ...this...
8810 (create_parm_list): ...and this.
8811 (compare_decls): New function.
8812 (for_local_cb): Remove.
8813 (wrapper_local_cb): Ditto.
8814 (build_wrapper_type): For now first traverse and fill vector of
8815 declarations then sort it and then deal with sorted vector.
8816 (cilk_outline): Ditto.
8817 (declare_one_free_variable): Ditto.
8818
6875457f
JM
88192015-01-21 Jason Merrill <jason@redhat.com>
8820
8821 PR c++/64629
8822 * c-format.c (check_format_arg): Call decl_constant_value.
8823
185c9e56
ML
88242015-01-19 Martin Liska <mliska@suse.cz>
8825
8826 * c-common.c (handle_noicf_attribute): New function.
8827
41dbbb37
TS
88282015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8829 Bernd Schmidt <bernds@codesourcery.com>
8830 James Norris <jnorris@codesourcery.com>
8831 Cesar Philippidis <cesar@codesourcery.com>
8832 Ilmir Usmanov <i.usmanov@samsung.com>
8833 Jakub Jelinek <jakub@redhat.com>
8834
8835 * c.opt (fopenacc): New option.
8836 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8837 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8838 New macros.
8839 * c-common.h (c_finish_oacc_wait): New prototype.
8840 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8841 (c_finish_oacc_wait): New function.
8842 * c-pragma.c (oacc_pragmas): New variable.
8843 (c_pp_lookup_pragma, init_pragma): Handle it.
8844 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8845 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8846 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8847 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8848 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8849 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8850 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8851 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8852 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8853 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8854 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8855 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8856 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8857 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8858 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8859 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8860 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8861 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8862 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8863 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8864 PRAGMA_OACC_CLAUSE_WORKER.
8865
3f8257db 88662015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8867
8868 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8869 for the new option fstack-protector_explicit.
8870 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8871 (handle_stack_protect_attribute): New function.
8872
3f8257db 88732015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8874
8875 * c.opt: New option -Warray-bounds=.
8876
adfac8df
JJ
88772015-01-09 Michael Collison <michael.collison@linaro.org>
8878
8879 * array-notation-common.c: Include hash-set.h, machmode.h,
8880 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8881 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8882 * c-ada-spec.c: Ditto.
8883 * c-cilkplus.c: Ditto.
8884 * c-common.c: Include input.h due to flattening of tree.h.
8885 Define macro GCC_C_COMMON_C.
8886 * c-common.h: Flatten tree.h header files into c-common.h.
8887 Remove include of tree-core.h.
8888 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8889 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8890 fold-const.h, wide-int.h, and inchash.h due to
8891 flattening of tree.h.
8892 * c-dump.c: Ditto.
8893 * c-format.c: Flatten tree.h header files into c-common.h.
8894 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8895 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8896 fold-const.h, wide-int.h, and inchash.h due to
8897 flattening of tree.h.
8898 * c-dump.c: Include hash-set.h, machmode.h,
8899 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8900 fold-const.h, wide-int.h, and inchash.h due to
8901 flattening of tree.h.
8902 * c-format.c: Include hash-set.h, machmode.h,
8903 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8904 fold-const.h, wide-int.h, inchash.h and real.h due to
8905 flattening of tree.h.
8906 * c-gimplify.c: Include hash-set.h, machmode.h,
8907 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8908 fold-const.h, wide-int.h, and inchash.h due to
8909 flattening of tree.h.
8910 * cilk.c: Ditto.
8911 * c-lex.c: Ditto.
8912 * c-omp.c: Ditto.
8913 * c-opts.c: Ditto.
8914 * c-pch.c: Ditto.
8915 * c-ppoutput.c: Ditto.
8916 * c-pragma.c: Ditto.
8917 * c-pretty-print.c: Ditto.
8918 * c-semantics.c: Ditto.
8919 * c-ubsan.c: Ditto.
8920 * stub-objc.c: Ditto.
8921
f5481fc4
JM
89222015-01-08 Jason Merrill <jason@redhat.com>
8923
8924 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8925 do_ubsan_in_current_function.
8926 (ubsan_maybe_instrument_reference_or_call): Likewise.
8927 * c-ubsan.h: Declare it.
8928
de35aa66
MS
89292015-01-08 Mike Stump <mikestump@comcast.net>
8930
8931 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8932
4a9a42ab
MP
89332015-01-07 Marek Polacek <polacek@redhat.com>
8934
8935 PR c/64440
8936 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8937 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8938
2f42e5de
TS
89392015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8940
8941 PR c++/31397
8942 * c.opt (Wsuggest-override): New option.
8943
5624e564
JJ
89442015-01-05 Jakub Jelinek <jakub@redhat.com>
8945
8946 Update copyright years.
8947
5bd012f8
MP
89482015-01-05 Marek Polacek <polacek@redhat.com>
8949
8950 PR c/64423
8951 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8952 parameter. Use it.
8953 * c-common.h (warn_array_subscript_with_type_char): Update
8954 declaration.
8955
a7fa8d18
ESR
89562014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8957
8958 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8959 Control macro with flag_sized_deallocation.
8960
3f8257db 89612014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8962
8963 * c.opt (Wdiscarded-array-qualifiers): New option.
8964
1f8d3e84
JJ
89652014-12-19 Jakub Jelinek <jakub@redhat.com>
8966
8967 PR preprocessor/63831
8968 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8969 and __has_cpp_attribute here.
8970 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8971 c_common_has_attribute.
8972 * c-common.h (c_common_has_attribute): New prototype.
8973 * c-lex.c (init_c_lex): Set cb->has_attribute to
8974 c_common_has_attribute instead of cb_has_attribute.
8975 (get_token_no_padding): New function.
8976 (cb_has_attribute): Renamed to ...
8977 (c_common_has_attribute): ... this. No longer static. Use
8978 get_token_no_padding, require ()s, don't build TREE_LIST
8979 unnecessarily, fix up formatting, adjust diagnostics, call
8980 init_attributes.
8981
20b06add
JM
89822014-12-15 Jason Merrill <jason@redhat.com>
8983
8984 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8985 (-Wsized-deallocation): New.
8986 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8987 to on in C++14 and up.
8988
94a073b2
JM
89892014-12-11 Jason Merrill <jason@redhat.com>
8990
acaa5911
JM
8991 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8992
94a073b2
JM
8993 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8994 we aren't complaining about VLAs.
8995
7fb66c15
MP
89962014-12-06 Marek Polacek <polacek@redhat.com>
8997
8998 PR tree-optimization/64183
8999 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9000 shift-expression if it is integer_type_node. Use types_compatible_p.
9001
b731b390
JJ
90022014-11-29 Jakub Jelinek <jakub@redhat.com>
9003
9004 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9005 last argument from create_tmp_var_raw and create_tmp_var calls.
9006 * cilk.c (gimplify_cilk_spawn): Likewise.
9007 * c-omp.c (c_finish_omp_atomic): Likewise.
9008
6a4da643
MP
90092014-11-28 Marek Polacek <polacek@redhat.com>
9010
9011 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9012 instead of unsigned_type_node.
9013
541e35a6
MP
90142014-11-28 Marek Polacek <polacek@redhat.com>
9015
9016 PR c/63862
9017 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9018 to op1_utype.
9019 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9020 expression to unsigned_type_node.
9021
dcc97066
MW
90222014-11-20 Mark Wielaard <mjw@redhat.com>
9023
9024 PR debug/38757
9025 * c-opts.c (set_std_c89): Set lang_hooks.name.
9026 (set_std_c99): Likewise.
9027 (set_std_c11): Likewise.
9028 (set_std_cxx98): Likewise.
9029 (set_std_cxx11): Likewise.
9030 (set_std_cxx14): Likewise.
9031 (set_std_cxx1z): Likewise.
9032
aa7da51a
JJ
90332014-11-21 Jakub Jelinek <jakub@redhat.com>
9034
9035 PR target/63764
9036 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9037 return type to bool.
009a3480 9038 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9039 (convert_vector_to_pointer_for_subscript): Change return type to
9040 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9041 and copy it into a TARGET_EXPR and use that instead of *vecp
9042 directly.
9043
538dd0b7
DM
90442014-11-19 David Malcolm <dmalcolm@redhat.com>
9045
9046 Merger of git branch "gimple-classes-v2-option-3".
9047 * ChangeLog.gimple-classes: New.
9048 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9049 from being just a vec<gimple> to a vec<gbind *>.
9050
c39a5e99
JJ
90512014-11-18 Jakub Jelinek <jakub@redhat.com>
9052
9053 PR sanitizer/63813
9054 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9055 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9056 get_pointer_alignment for non-pointers. Use ptype, or if it is
9057 reference type, corresponding pointer type, as type of kind
9058 argument.
9059 (ubsan_maybe_instrument_reference,
9060 ubsan_maybe_instrument_member_call): Adjust callers.
9061
8537a4a9
MP
90622014-11-15 Marek Polacek <polacek@redhat.com>
9063
9064 PR middle-end/63884
9065 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9066 for NULL fndecl.
9067 (extract_array_notation_exprs): Return for NULL node.
9068
2079956a
JM
90692014-11-12 Joseph Myers <joseph@codesourcery.com>
9070
9071 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9072 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9073
1304953e
JJ
90742014-11-12 Jakub Jelinek <jakub@redhat.com>
9075
9076 PR c/59708
9077 * c-common.c (check_builtin_function_arguments): Handle
9078 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9079
e5e44252
AK
90802014-11-10 Andi Kleen <ak@linux.intel.com>
9081
9082 PR c/60804
9083 * c-common.h (check_no_cilk): Declare.
9084 * cilk.c (get_error_location): New function.
9085 (check_no_cilk): Dito.
9086
e64b984d
AK
90872014-11-10 Andi Kleen <ak@linux.intel.com>
9088
9089 * cilk.c (recognize_spawn): Use expression location
9090 for error message.
9091
13c21655
PC
90922014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9093
9094 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9095
42fd12b1
ESR
90962014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9097
9098 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9099 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9100 (__cpp_range_based_for, __cpp_initializer_lists,
9101 __cpp_delegating_constructors, __cpp_nsdmi,
9102 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9103 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9104 __has_cpp_attribute.
9105 * c-lex.c (cb_has_attribute): New callback CPP function;
9106 (init_c_lex): Set has_attribute callback.
9107
6f450181
RB
91082014-11-04 Richard Biener <rguenther@suse.de>
9109
9110 * c-common.c (shorten_compare): Do not shorten mixed
9111 DFP and non-DFP compares.
9112
26f0e1d6
ESR
91132014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9114
9115 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9116 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9117 Commentary and rearrangement of tests.
9118 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9119 Commentary and rearrangement of tests.
ab20d992 9120 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9121 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9122
ef4bddc2
RS
91232014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9124
9125 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9126 enum from machine_mode.
9127
c582198b
AM
91282014-10-28 Andrew MacLeod <amacleod@redhat.com>
9129
adfac8df
JJ
9130 * c-common.c: Adjust include files.
9131 * c-gimplify.c: Ditto.
9132 * cilk.c: Ditto.
9133 * c-pragma.c: Ditto.
9134 * c-ubsan.c: Ditto.
c582198b 9135
60393bbc
AM
91362014-10-27 Andrew MacLeod <amacleod@redhat.com>
9137
9138 * c-gimplify.c: Adjust include files.
9139
d723bb7c
MLI
91402014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9141
9142 PR c++/53061
9143 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9144 c_common_initialize_diagnostics.
9145 * c-common.h: Likewise.
9146
90f3520e
MP
91472014-10-24 Marek Polacek <polacek@redhat.com>
9148
9149 PR c/56980
9150 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9151 print "struct"/"union"/"enum" for typedefed names.
9152
59d7607a
MP
91532014-10-23 Marek Polacek <polacek@redhat.com>
9154
9155 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9156 in unsigned type.
9157
d95a2703
JJ
91582014-10-22 Jakub Jelinek <jakub@redhat.com>
9159 Yury Gribov <y.gribov@samsung.com>
9160
9161 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9162 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9163 instead of flag_sanitize_recover as bool flag.
9164
8e6ef852
KY
91652014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9166
9167 * cilk.c: Revert previous change.
9168
948cf550
IZ
91692014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9170
9171 PR c/63307
9172 * cilk.c: Include vec.h.
9173 (struct cilk_decls): New structure.
9174 (wrapper_parm_cb): Split this function to...
9175 (fill_decls_vec): ...this...
9176 (create_parm_list): ...and this.
9177 (compare_decls): New function.
9178 (for_local_cb): Remove.
9179 (wrapper_local_cb): Ditto.
9180 (build_wrapper_type): For now first traverse and fill vector of
9181 declarations then sort it and then deal with sorted vector.
9182 (cilk_outline): Ditto.
9183 (declare_one_free_variable): Ditto.
9184
92574c7c
MP
91852014-10-17 Marek Polacek <polacek@redhat.com>
9186
9187 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9188 * c.opt (Wimplicit-int): Initialize to -1.
9189
83685514
AM
91902014-10-16 Andrew MacLeod <amacleod@redhat.com>
9191
9192 * c-pragma.c: Adjust include files.
9193 * c-semantics.c: Likewise.
9194
5b8300ea
DD
91952014-10-16 DJ Delorie <dj@redhat.com>
9196
9197 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9198 multiples of bytes.
9199
5f83e90b
JM
92002014-10-14 Jason Merrill <jason@redhat.com>
9201
9202 PR c++/63455
9203 * c-common.h (CPP_PREPARSED_EXPR): New.
9204 (N_CP_TTYPES): Adjust.
9205
d73326ca
MP
92062014-10-15 Marek Polacek <polacek@redhat.com>
9207
9208 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9209
78a7c317
DD
92102014-10-14 DJ Delorie <dj@redhat.com>
9211
9212 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9213 types, not just __int128.
9214 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9215 types, not just __int128.
9216 (cpp_atomic_builtins): Round pointer sizes up.
9217 (type_suffix): Use type precision, not specific types.
9218 * c-common.c (c_common_reswords): Remove __int128 special case.
9219 (c_common_type_for_size): Check for all __intN types, not just
9220 __int128.
9221 (c_common_type_for_mode): Likewise.
9222 (c_common_signed_or_unsigned_type): Likewise.
9223 (c_build_bitfield_integer_type): Likewise.
9224 (c_common_nodes_and_builtins): Likewise.
9225 (keyword_begins_type_specifier): Likewise.
9226 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9227 __intN variants.
9228
2a22f99c
TS
92292014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9230
9231 * c-common.c: Use hash_table instead of hashtab.
9232
2a8ef767
ESR
92332014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9234
adfac8df 9235 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9236 C++11 section.
9237
3c9aabbd
MG
92382014-10-03 Marc Glisse <marc.glisse@inria.fr>
9239
9240 PR c++/54427
9241 PR c++/57198
9242 PR c++/58845
9243 * c-common.c (warn_logical_operator): Punt for vectors.
9244
a15f7cb8
ESR
92452014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9246
9247 Implement SD-6: SG10 Feature Test Recommendations
9248 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9249 macros and the __has_header macro.
9250
8d0cf15e
JM
92512014-09-30 Jason Merrill <jason@redhat.com>
9252
dd5d5481
JM
9253 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9254 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9255 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9256
b752325e
JM
9257 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9258 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9259
8d0cf15e
JM
9260 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9261 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9262
083e891e
MP
92632014-09-24 Marek Polacek <polacek@redhat.com>
9264
9265 PR c/61405
9266 PR c/53874
9267 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9268
7861b648
AK
92692014-09-23 Andi Kleen <ak@linux.intel.com>
9270
9271 * c-common.c (handle_no_reorder_attribute): New function.
9272 (c_common_attribute_table): Add no_reorder attribute.
9273
9a79452d
JM
92742014-09-22 Joseph Myers <joseph@codesourcery.com>
9275
9276 * c-cppbuiltin.c (c_cpp_builtins): Define
9277 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9278 modes.
9279
dd69f047
JM
92802014-09-18 Joseph Myers <joseph@codesourcery.com>
9281
9282 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9283 for supported floating-point modes.
9284
737a4826
MLI
92852014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9286
9287 * c.opt (Wpsabi): Use LangEnabledBy.
9288 * c-opts.c (c_common_handle_option): Do not handle here.
9289
8cc4b7a2
JM
92902014-09-12 Joseph Myers <joseph@codesourcery.com>
9291
9292 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9293 macros for floating-point modes.
9294
179b5a55
MG
92952014-09-11 Marc Glisse <marc.glisse@inria.fr>
9296
9297 PR target/58757
9298 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9299 __*_DENORM_MIN__ without denormals.
9300
570a11fe
JJ
93012014-09-10 Jakub Jelinek <jakub@redhat.com>
9302
9303 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9304 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9305 ubsan_create_data callers.
9306 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9307 index is constant or BIT_AND_EXPR with constant mask and is
9308 small enough for the bound.
9309 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9310 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9311
b559c810
MLI
93122014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9313
9314 * c.opt: Add CppReason to various flags.
9315 (Wdate-time): Re-sort.
9316 * c-common.c: Include c-common.h earlier.
9317 (struct reason_option_codes_t): Delete.
9318 (c_option_controlling_cpp_error): Prefix global type and struct
9319 with cpp_.
9320
1ef33fd4
MLI
93212014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9322
9323 * c.opt (Wnormalized): New.
9324 (Wnormalized=): Use Enum and Reject Negative.
9325 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9326
66bb34c0
JM
93272014-09-08 Joseph Myers <joseph@codesourcery.com>
9328
9329 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9330 digits of floating-point modes if -fbuilding-libgcc.
9331
53d68b9f
JM
93322014-09-05 Joseph Myers <joseph@codesourcery.com>
9333
9334 * c-cppbuiltin.c (c_cpp_builtins): Also define
9335 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9336 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9337 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9338 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9339 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9340 __LIBGCC_STACK_GROWS_DOWNWARD__,
9341 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9342 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9343 __LIBGCC_DWARF_FRAME_REGISTERS__,
9344 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9345 __LIBGCC_STACK_POINTER_REGNUM__ and
9346 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9347 (builtin_define_with_value): Handle backslash-escaping in string
9348 macro values.
9349
f65586dc
RB
93502014-09-05 Richard Biener <rguenther@suse.de>
9351
9352 PR middle-end/63148
9353 * c-format.c (check_format_arg): Properly handle
9354 effectively signed POINTER_PLUS_EXPR offset.
9355
2b71f4a4
MLI
93562014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9357
9358 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9359 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9360 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9361 and Init.
9362 * c-opts.c (c_common_handle_option): Do not handle here.
9363 (sanitize_cpp_opts): Likewise.
9364 * c-common.c (struct reason_option_codes_t): Handle
9365 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9366
d2e4feca
MP
93672014-09-03 Marek Polacek <polacek@redhat.com>
9368
9369 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9370
9a771876
JJ
93712014-09-02 Jakub Jelinek <jakub@redhat.com>
9372 Balaji V. Iyer <balaji.v.iyer@intel.com>
9373 Igor Zamyatin <igor.zamyatin@intel.com>
9374
9375 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9376 * c-common.c (c_common_reswords): Added _Cilk_for.
9377 * c-common.h (enum rid): Added RID_CILK_FOR.
9378 (cilk_for_number_of_iterations): Add declaration.
9379 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9380 CILK_FOR.
9381 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9382 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9383
81b5d104
MLI
93842014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9385
9386 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9387 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9388 Wundef): Use CPP, Var and Init.
9389 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9390
b753b37b
MLI
93912014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9392
9393 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9394 * c-opts.c (c_common_handle_option): Do not handle here.
9395
028aee17
JM
93962014-08-25 Jason Merrill <jason@redhat.com>
9397
9398 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9399 -std=c++14 and -std=gnu++14, rather than the reverse.
9400 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9401 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9402 * c-common.h (cxx_dialect): Remove cxx1y.
9403
e4276ba5
ESR
94042014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9405
9406 * c-common.h (enum cxx_dialect): Add cxx14.
9407 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9408 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9409 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9410
a545cacd
JM
94112014-08-22 Jason Merrill <jason@redhat.com>
9412
9413 * c.opt (std=gnu++17): Fix alias.
9414
59ea0364
MP
94152014-08-22 Marek Polacek <polacek@redhat.com>
9416
9417 PR c++/62199
9418 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9419 check for vector types. Drop LHS argument.
9420 * c-common.h (warn_logical_not_parentheses): Adjust.
9421
596e808c
MLI
94222014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9423
9424 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9425 (Wmultichar): Likewise.
9426 (Wdate-time): Use C-family languages instead of Common. Use CPP
9427 and Var.
9428 * c-opts.c (c_common_handle_option): Do not handle the above
9429 options here.
9430 (sanitize_cpp_opts): Likewise.
9431
18767f65
MLI
94322014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9433
9434 PR fortran/44054
9435 * c-opts.c: Include tree-diagnostics.h.
9436 (c_diagnostic_finalizer): New.
9437 (c_common_initialize_diagnostics): Use it.
9438
b4413594
MLI
94392014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9440
9441 PR preprocessor/51303
9442 * c-common.c (struct reason_option_codes_t option_codes):
9443 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9444
43f9a13c
MLI
94452014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9446
9447 PR c/60975
9448 PR c/53063
9449 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9450 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9451 (c_common_post_options): Call init_global_opts_from_cpp.
9452 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9453
04159acf
MP
94542014-08-19 Marek Polacek <polacek@redhat.com>
9455
9456 PR c++/62153
9457 * c-common.c (maybe_warn_bool_compare): New function.
9458 * c-common.h (maybe_warn_bool_compare): Declare.
9459 * c.opt (Wbool-compare): New option.
9460
35aff4fb
MP
94612014-08-19 Marek Polacek <polacek@redhat.com>
9462
9463 * c.opt (Wc99-c11-compat): New option.
9464
177cce46
MP
94652014-08-19 Marek Polacek <polacek@redhat.com>
9466
9467 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9468 to warn_c90_c99_compat.
9469 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9470 to -1.
9471
6ae9194f
MLI
94722014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9473 Steven Bosscher <steven@gcc.gnu.org>
9474
9475 PR c/52952
9476 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9477 format_check_results.
9478 (check_function_format): Use true and add comment for boolean
9479 argument.
9480 (finish_dollar_format_checking): Use explicit location when warning.
9481 (check_format_info): Likewise.
9482 (check_format_arg): Set extra_arg_loc and format_string_loc.
9483 (check_format_info_main): Use explicit location when warning.
9484 (check_format_types): Pass explicit location.
9485 (format_type_warning): Likewise.
9486
8e54f6d3
MLI
94872014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9488
9489 PR fortran/44054
9490 * c-format.c: Handle Fortran flags.
9491
cd4e76fc
IZ
94922014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9493
9494 PR other/61962
9495 * array-notation-common.c (find_rank): Added handling for other
9496 types of references.
9497
f3bede71
MP
94982014-08-10 Marek Polacek <polacek@redhat.com>
9499
9500 PR c/51849
9501 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9502 * c.opt (Wc90-c99-compat): Add option.
9503
9f25a338
TS
95042014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9505
9506 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9507
62e4eb35
MP
95082014-08-03 Marek Polacek <polacek@redhat.com>
9509
ab20d992 9510 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9511 (c_add_case_label): Pass loc to check_case_value.
9512
b787e7a2
TS
95132014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9514
9515 * cilk.c: Use hash_map instead of pointer_map.
9516
6e2830c3
TS
95172014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9518
9519 * c-gimplify.c: Use hash_set instead of pointer_set.
9520
a7ee52fb
IZ
95212014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9522
9523 PR middle-end/61455
9524 * array-notation-common.c (extract_array_notation_exprs): Handling
9525 of DECL_EXPR added.
9526
944fa280
JJ
95272014-08-01 Jakub Jelinek <jakub@redhat.com>
9528
9529 * c-common.h (min_align_of_type): Removed prototype.
9530 * c-common.c (min_align_of_type): Removed.
9531 * c-ubsan.h (ubsan_maybe_instrument_reference,
9532 ubsan_maybe_instrument_member_call): New prototypes.
9533 * c-ubsan.c: Include stor-layout.h and builtins.h.
9534 (ubsan_maybe_instrument_reference_or_call,
9535 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9536 functions.
9537
b4dfdc11
MG
95382014-07-31 Marc Glisse <marc.glisse@inria.fr>
9539
9540 PR c++/60517
9541 * c.opt (-Wreturn-local-addr): Move to common.opt.
9542
a41844e5
JM
95432014-07-30 Jason Merrill <jason@redhat.com>
9544
9545 PR c++/61659
9546 PR c++/61687
9547 Revert:
9548 * c.opt (-fuse-all-virtuals): New.
9549
976d5a22
TT
95502014-07-30 Tom Tromey <tromey@redhat.com>
9551
9552 PR c/59855
9553 * c.opt (Wdesignated-init): New option.
9554 * c-common.c (c_common_attribute_table): Add "designated_init".
9555 (handle_designated_init): New function.
9556
cdc94aca
MP
95572014-07-24 Marek Polacek <polacek@redhat.com>
9558
9559 PR c/57653
9560 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9561
f41373b6
DS
95622014-07-16 Dodji Seketeli <dodji@redhat.com>
9563
9564 PR preprocessor/60723 - missing system-ness marks for macro tokens
9565 * c-ppoutput.c (struct print::prev_was_system_token): New data
9566 member.
9567 (init_pp_output): Initialize it.
9568 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9569 (do_line_change): Return a flag saying if a line marker was
9570 emitted or not.
9571 (scan_translation_unit): Detect if the system-ness of the token we
9572 are about to emit is different from the one of the previously
9573 emitted token. If so, emit a line marker. Avoid emitting useless
9574 adjacent line markers. Avoid emitting line markers for tokens
9575 originating from the expansion of built-in macros.
9576 (scan_translation_unit_directives_only): Adjust.
9577
4d661eaa
MP
95782014-07-15 Marek Polacek <polacek@redhat.com>
9579
9580 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9581 TYPE_MAX_VALUE is NULL.
9582
b108f48f
JJ
95832014-07-14 Jakub Jelinek <jakub@redhat.com>
9584
9585 PR middle-end/61294
9586 * c.opt (Wmemset-transposed-args): New warning.
9587
c0221884
JM
95882014-07-10 Jason Merrill <jason@redhat.com>
9589
9590 PR c++/61659
9591 PR c++/61687
9592 * c.opt (-fuse-all-virtuals): New.
9593
63dfbb95
RB
95942014-07-09 Richard Biener <rguenther@suse.de>
9595
9596 PR c-family/61741
9597 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9598 using unsigned arithmetic if overflow does not wrap instead of
9599 if overflow is undefined.
9600
773ec47f
MP
96012014-07-06 Marek Polacek <polacek@redhat.com>
9602
9603 PR c/6940
9604 * c.opt (Wsizeof-array-argument): New option.
9605
00a7ba58
JJ
96062014-07-03 Jakub Jelinek <jakub@redhat.com>
9607
b1726d6c 9608 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9609 comments->count <= 1, as comments->entries might be NULL.
9610
52ec0ea3
MP
96112014-07-01 Marek Polacek <polacek@redhat.com>
9612
9613 * c.opt (Wint-conversion): New option.
9614
d5c3d343
MP
96152014-07-01 Marek Polacek <polacek@redhat.com>
9616
9617 PR c/58286
9618 * c.opt (Wincompatible-pointer-types): New option.
9619
6e7ceb17
PC
96202014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9621
9622 PR c++/51400
9623 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9624 Do not discard TYPE_QUALS of type.
9625
da73100b
JM
96262014-06-26 Jason Merrill <jason@redhat.com>
9627
9628 * c-common.h (enum cxx_dialect): Add cxx1z.
9629 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9630 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9631
08eedf75
TJ
96322014-06-26 Teresa Johnson <tejohnson@google.com>
9633
9634 * c-common.h (get_dump_info): Declare.
9635 * c-gimplify.c (c_genericize): Use saved dump files.
9636 * c-opts.c (c_common_parse_file): Begin and end dumps
9637 once around parsing invocation.
9638 (get_dump_info): New function.
9639
7b56b2f8
MP
96402014-06-23 Marek Polacek <polacek@redhat.com>
9641 Andrew MacLeod <amacleod@redhat.com>
9642
9643 PR c/61553
9644 * c-common.c (get_atomic_generic_size): Don't segfault if the
9645 type doesn't have a size.
9646
0e37a2f3
MP
96472014-06-20 Marek Polacek <polacek@redhat.com>
9648
9649 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9650 (ubsan_walk_array_refs_r): New function.
9651 (c_genericize): Instrument array bounds.
9652 * c-ubsan.c: Include "internal-fn.h".
9653 (ubsan_instrument_division): Mark instrumented arrays as having
9654 side effects. Adjust ubsan_type_descriptor call.
9655 (ubsan_instrument_shift): Likewise.
9656 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9657 (ubsan_instrument_bounds): New function.
9658 (ubsan_array_ref_instrumented_p): New function.
9659 (ubsan_maybe_instrument_array_ref): New function.
9660 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9661 (ubsan_array_ref_instrumented_p): Declare.
9662 (ubsan_maybe_instrument_array_ref): Declare.
9663
96642014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9665
9666 PR lto/61123
9667 * c.opt (fshort-enums): Add to LTO.
9668 * c.opt (fshort-wchar): Likewise.
9669
5c3d09f7
MP
96702014-06-16 Marek Polacek <polacek@redhat.com>
9671
9672 PR c/60439
9673 * c.opt (Wswitch-bool): Add Var.
9674
9cf32741
JJ
96752014-06-12 Jakub Jelinek <jakub@redhat.com>
9676
9677 PR middle-end/61486
9678 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9679 #pragma omp target teams or
9680 #pragma omp {,target }teams distribute simd.
9681
62984918
JM
96822014-06-12 Jason Merrill <jason@redhat.com>
9683
9684 * c.opt (Wabi=, fabi-compat-version): New.
9685 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9686 (c_common_post_options): Handle flag_abi_compat_version default.
9687 Disallow -fabi-compat-version=1.
9688 * c-common.h (abi_version_crosses): New.
9689
f961457f
JH
96902014-06-11 Jan Hubicka <hubicka@ucw.cz>
9691
adfac8df 9692 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9693 section names that are no longer trees.
9694
92d28cbb
JJ
96952014-06-10 Jakub Jelinek <jakub@redhat.com>
9696
9697 PR fortran/60928
9698 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9699 (omp_pragmas): ... back here.
9700
742938c9
MP
97012014-06-05 Marek Polacek <polacek@redhat.com>
9702
9703 PR c/49706
9704 * c-common.c (warn_logical_not_parentheses): New function.
9705 * c-common.h (warn_logical_not_parentheses): Declare.
9706 * c.opt (Wlogical-not-parentheses): New option.
9707
9d548dfb
MP
97082014-06-04 Marek Polacek <polacek@redhat.com>
9709
9710 PR c/30020
9711 * c-common.c (check_case_bounds): Add location parameter.
9712 Use it.
9713 (c_add_case_label): Pass loc to check_case_bounds.
9714
fedfecef
MP
97152014-06-03 Marek Polacek <polacek@redhat.com>
9716
9717 PR c/60439
9718 * c.opt (Wswitch-bool): New option.
9719
f6a7cffc
TS
97202014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9721
040d18b6
TS
9722 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9723 Remove prototypes.
9724 (record_types_used_by_current_var_decl): Move prototype to where
9725 it belongs.
9726
f6a7cffc
TS
9727 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9728 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9729 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9730
632f2871
RS
97312014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9732
9733 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9734 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9735 void_zero_node.
9736 * c-pretty-print.c (pp_c_void_constant): New function.
9737 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9738 (c_pretty_printer::expression): Handle VOID_CST.
9739 * cilk.c (extract_free_variables): Likewise.
9740 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9741 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9742
766090c2
TS
97432014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9744
9745 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9746 * c-pragma.c (push_alignment): Adjust.
9747 (handle_pragma_push_options): Likewise.
9748
661a0813
MP
97492014-05-09 Marek Polacek <polacek@redhat.com>
9750
9751 PR c/50459
9752 * c-common.c (check_user_alignment): Return -1 if alignment is error
9753 node.
9754 (handle_aligned_attribute): Don't call default_conversion on
9755 FUNCTION_DECLs.
9756 (handle_vector_size_attribute): Likewise.
9757 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9758 (handle_sentinel_attribute): Call default_conversion and allow even
9759 integral types as an argument.
9760
2793eeab
MP
97612014-05-08 Marek Polacek <polacek@redhat.com>
9762
9763 PR c/61053
9764 * c-common.c (min_align_of_type): New function factored out from...
9765 (c_sizeof_or_alignof_type): ...here.
9766 * c-common.h (min_align_of_type): Declare.
9767
f827930a
MP
97682014-05-08 Marek Polacek <polacek@redhat.com>
9769
9770 PR c/61077
9771 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9772 parameter type of main.
9773
ca49b74e
DD
97742014-05-07 DJ Delorie <dj@redhat.com>
9775
9776 * c-cppbuiltin.c (print_bits_of_hex): New.
9777 (builtin_define_type_minmax): Print values using hex so as not to
9778 require a pre-computed list of string values.
9779
1d60af08
KZ
97802014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9781 Mike Stump <mikestump@comcast.net>
9782 Richard Sandiford <rdsandiford@googlemail.com>
9783
9784 * c-ada-spec.c: Include wide-int.h.
9785 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9786 (dump_generic_ada_node): Use wide-int interfaces.
9787 * c-common.c: Include wide-int-print.h.
9788 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9789 (pointer_int_sum): Use wide-int interfaces.
9790 (c_common_nodes_and_builtins): Use make_int_cst.
9791 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9792 (handle_alloc_size_attribute): Use wide-int interfaces.
9793 (get_nonnull_operand): Likewise.
9794 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9795 * c-lex.c: Include wide-int.h.
9796 (narrowest_unsigned_type): Take a widest_int rather than two
9797 HOST_WIDE_INTs.
9798 (narrowest_signed_type): Likewise.
9799 (interpret_integer): Update accordingly. Use wide-int interfaces.
9800 (lex_charconst): Use wide-int interfaces.
9801 * c-pretty-print.c: Include wide-int.h.
9802 (pp_c_integer_constant): Use wide-int interfaces.
9803 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9804 INT_CST_LT_UNSIGNED.
9805
b15458be
RB
98062014-05-06 Richard Biener <rguenther@suse.de>
9807
9808 * c-opts.c (c_common_post_options): For -freestanding,
9809 -fno-hosted and -fno-builtin disable pattern recognition
9810 if not enabled explicitely.
9811
6577374e
MP
98122014-05-02 Marek Polacek <polacek@redhat.com>
9813
9814 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9815
d00887e8
MP
98162014-05-01 Marek Polacek <polacek@redhat.com>
9817
9818 PR c/43245
9819 * c.opt (Wdiscarded-qualifiers): Add.
9820
f8ed5150
MP
98212014-04-30 Marek Polacek <polacek@redhat.com>
9822
9823 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9824 INT_MIN / -1 sanitization only for integer types.
9825
45484dcf
MP
98262014-04-25 Marek Polacek <polacek@redhat.com>
9827
9828 PR c/18079
9829 * c-common.c (handle_noinline_attribute): Warn if the attribute
9830 conflicts with always_inline attribute.
9831 (handle_always_inline_attribute): Warn if the attribute conflicts
9832 with noinline attribute.
9833
38e514c0
MP
98342014-04-25 Marek Polacek <polacek@redhat.com>
9835
9836 PR c/60156
9837 * c-common.c (check_main_parameter_types): Warn about variadic main.
9838
44875f92
MS
98392014-04-24 Mike Stump <mikestump@comcast.net>
9840
9841 * c.opt (Wshadow-ivar): Default to on.
9842
dcaaa5a0
DP
98432014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9844
9845 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9846
c07d7c02
MP
98472014-04-23 Marek Polacek <polacek@redhat.com>
9848
9849 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9850
1c33c9b7
JJ
98512014-04-22 Jakub Jelinek <jakub@redhat.com>
9852
9853 PR sanitizer/60275
9854 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9855 if flag_sanitize_undefined_trap_on_error.
9856 (ubsan_instrument_division, ubsan_instrument_shift,
9857 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9858 if !flag_sanitize_recover.
9859
793c625f
MG
98602014-04-22 Marc Glisse <marc.glisse@inria.fr>
9861
9862 PR libstdc++/43622
9863 * c-common.c (registered_builtin_types): Make non-static.
9864 * c-common.h (registered_builtin_types): Declare.
9865
b0f1bf36 98662014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9867 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9868
9869 PR c/60819
9870 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9871 apply may-alias the scalar pointer type when applicable.
9872
3b07fa4a
IZ
98732014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9874
9875 PR middle-end/60467
9876 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9877 as possible argument for Cilk_spawn.
9878
cbbd2b1c
TB
98792014-04-11 Tobias Burnus <burnus@net-b.de>
9880
9881 PR c/60194
9882 * c.opt (Wformat-signedness): Add
9883 * c-format.c(check_format_types): Use it.
9884
6415bd5d
JM
98852014-04-11 Jason Merrill <jason@redhat.com>
9886
9887 PR c++/57926
9888 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9889 default_conversion for an array argument.
9890
6525783a
MP
98912014-04-08 Marek Polacek <polacek@redhat.com>
9892
9893 PR sanitizer/60745
9894 * c-ubsan.c: Include asan.h.
9895 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9896
880a467b
NS
98972014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9898
9899 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9900
7b59ff2d
MP
99012014-04-02 Marek Polacek <polacek@redhat.com>
9902
9903 * c-common.h (c_expand_expr): Remove declaration.
9904
8edbfaa6
JJ
99052014-03-28 Jakub Jelinek <jakub@redhat.com>
9906
9907 PR c++/60689
9908 * c-common.c (add_atomic_size_parameter): When creating new
9909 params vector, push the size argument first.
9910
07d72e1d
JJ
99112014-03-26 Jakub Jelinek <jakub@redhat.com>
9912
9913 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9914 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9915 ubsan_create_data callers.
9916
b35e0fa0
JJ
99172014-03-22 Jakub Jelinek <jakub@redhat.com>
9918
9919 PR debug/60603
9920 * c-opts.c (c_finish_options): Restore cb_file_change call to
9921 <built-in>.
9922
39a1ebb3
JJ
99232014-03-13 Jakub Jelinek <jakub@redhat.com>
9924
9925 PR middle-end/36282
9926 * c-pragma.c (apply_pragma_weak): Only look at
9927 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9928 DECL_ASSEMBLER_NAME_SET_P (decl).
9929 (maybe_apply_pending_pragma_weaks): Exit early if
9930 vec_safe_is_empty (pending_weaks) rather than only when
9931 !pending_weaks.
9932 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9933 set assembler name back to NULL afterwards.
9934
a07f6ed2
JM
99352014-03-11 Jason Merrill <jason@redhat.com>
9936
9937 * c.opt: Add -std=gnu++14.
9938
75b107f5
IB
99392014-03-11 Ian Bolton <ian.bolton@arm.com>
9940
9941 * c-opts.c (c_common_post_options): Don't override
9942 -ffp-contract=fast if unsafe-math-optimizations is on.
9943
f42c637e
PM
99442014-03-08 Paulo Matos <paulo@matos-sorge.com>
9945
22b15758 9946 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9947
70e24808
JM
99482014-03-07 Jason Merrill <jason@redhat.com>
9949
9950 * c.opt: Add -std=c++14.
9951
3af9c5e9
MP
99522014-03-06 Marek Polacek <polacek@redhat.com>
9953
9954 PR c/60197
9955 * cilk.c (contains_cilk_spawn_stmt): New function.
9956 (contains_cilk_spawn_stmt_walker): Likewise.
9957 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9958 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9959
b3bdf019
JJ
99602014-03-03 Jakub Jelinek <jakub@redhat.com>
9961
9962 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9963 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9964 even when flag_preprocess_only.
9965
ca7e759d
JM
99662014-02-26 Jason Merrill <jason@redhat.com>
9967
9968 PR c++/59231
9969 PR c++/11586
9970 * c-common.c (shorten_compare): Don't check
9971 c_inhibit_evaluation_warnings.
9972
28e41874
JJ
99732014-02-19 Jakub Jelinek <jakub@redhat.com>
9974
cca615af
JJ
9975 PR c/37743
9976 * c-common.c (c_common_nodes_and_builtins): When initializing
9977 c_uint{16,32,64}_type_node, also set corresponding
9978 uint{16,32,64}_type_node to the same value.
9979
28e41874
JJ
9980 PR c++/60267
9981 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9982 for PRAGMA_IVDEP if flag_preprocess_only.
9983
c2bf53a1
JJ
99842014-02-12 Jakub Jelinek <jakub@redhat.com>
9985
9986 PR c/60101
9987 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9988 if false, add ADD itself, rather than vice versa.
9989 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9990 copy. For SAVE_EXPR, only call merge_tlist once.
9991
8fcbce72
JJ
99922014-02-08 Jakub Jelinek <jakub@redhat.com>
9993
9994 PR middle-end/60092
9995 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9996 and tree_to_uhwi.
9997 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9998 functions.
9999 (c_common_attribute_table): Add alloc_align and assume_aligned
10000 attributes.
10001
0a756a3f
MP
100022014-02-06 Marek Polacek <polacek@redhat.com>
10003
10004 PR c/60087
10005 * c-common.c (warn_for_sign_compare): Call warning_at with location
10006 instead of warning.
10007
7ec4847a
MP
100082014-02-05 Marek Polacek <polacek@redhat.com>
10009
10010 PR c/53123
10011 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10012 statement.
10013
66f20604
MP
100142014-02-04 Marek Polacek <polacek@redhat.com>
10015
10016 PR c/60036
10017 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10018 SAVE_EXPR.
10019
5d77fb19
MG
100202014-02-03 Marc Glisse <marc.glisse@inria.fr>
10021
10022 PR c++/53017
10023 PR c++/59211
10024 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10025 handle_vector_size_attribute, handle_nonnull_attribute): Call
10026 default_conversion on the attribute argument.
10027 (handle_nonnull_attribute): Increment the argument number.
10028
81e5eca8
MP
100292014-01-31 Marek Polacek <polacek@redhat.com>
10030
10031 PR c/59963
10032 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10033 build_function_call_vec.
10034 (resolve_overloaded_builtin): Likewise.
10035 * c-common.h (build_function_call_vec): Adjust declaration.
10036
68fca595
MP
100372014-01-30 Marek Polacek <polacek@redhat.com>
10038
10039 PR c/59940
10040 * c-common.h (unsafe_conversion_p): Adjust declaration.
10041 (warnings_for_convert_and_check): Likewise.
10042 (convert_and_check): Likewise.
10043 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10044 expansion_point_location_if_in_system_header on it.
10045 (warnings_for_convert_and_check): Add location parameter. Call
10046 expansion_point_location_if_in_system_header on it. Use it.
10047 (convert_and_check): Add location parameter. Use it.
10048 (conversion_warning): Likewise.
10049 (c_add_case_label): Adjust convert_and_check calls.
10050 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10051
b72271b9
BI
100522014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10053
10054 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10055 flag_cilkplus.
10056 * c-pragma.c (init_pragma): Likewise.
10057 * c.opt: Likewise.
10058
393e8e8b
MP
100592014-01-23 Marek Polacek <polacek@redhat.com>
10060
10061 PR c/59846
10062 * c-common.c (shorten_compare): Add location_t parameter.
10063 * c-common.h (shorten_binary_op): Adjust declaration.
10064
f04dda30
MP
100652014-01-23 Marek Polacek <polacek@redhat.com>
10066
10067 PR c/58346
10068 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10069 * c-common.h: Declare it.
10070
621955cb
EB
100712014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10072
10073 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10074 * c-ada-spec.c (dump_ads): Likewise.
10075 (cpp_check): Likewise.
10076 (dump_ada_specs): Likewise.
10077
100782014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10079
10080 PR c++/49718
10081 * c-common.c (handle_no_instrument_function_attribute): Allow
10082 no_instrument_function attribute in class member
10083 definition/declaration.
10084
241f845a
JJ
100852014-01-15 Jakub Jelinek <jakub@redhat.com>
10086
10087 PR c/58943
10088 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10089 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10090 being COMPOUND_EXPR.
10091 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10092 operand a SAVE_EXPR and second MODIFY_EXPR.
10093
e83b8e2e
JJ
100942014-01-09 Jakub Jelinek <jakub@redhat.com>
10095
10096 PR target/58115
10097 * c-pch.c (c_common_write_pch): Call
10098 prepare_target_option_nodes_for_pch.
10099
23a5b65a
RS
101002014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10101
10102 Update copyright years
10103
f9030485
RS
101042014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10105
10106 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10107 the copyright notice.
10108
f2aa696b
EB
101092013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10110
10111 * c-ada-spec.c (print_constructor): New function.
10112 (print_destructor): Retrieve the origin of the destructor.
10113 (print_ada_declaration): Revamp handling of constructors/destructors.
10114
3f8257db 101152013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10116 Bill Maddox <maddox@google.com>
10117 Jason Merrill <jason@redhat.com>
10118
10119 * c.opt: Add -fdeclone-ctor-dtor.
10120 * c-opts.c (c_common_post_options): Default to on iff -Os.
10121
41958c28
BI
101222013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10123
10124 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10125 attribute.
10126 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10127 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10128 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10129 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10130 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10131 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10132 PRAGMA_CILK_CLAUSE_UNIFORM.
10133
b1726d6c 10134
12893402
BI
101352013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10136
10137 * cilk.c (cilk_outline): Made this function non-static.
10138 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10139 (create_cilk_wrapper): Added a new parameter: a function pointer.
10140 (c_install_body_w_frame_cleanup): Remove
10141 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10142 * c-common.h (cilk_outline): New prototype.
10143 (gimplify_cilk_spawn): Removed two parameters.
10144 (cilk_install_body_with_frame_cleanup): New prototype.
10145 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10146 CILK_SPAWN_STMT case.
10147
085b42ed
BS
101482013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10149
2ce064c3
BS
10150 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10151
085b42ed
BS
10152 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10153 (int_array_type_node): Remove.
10154 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10155
9e36c9ed
MP
101562013-12-05 Marek Polacek <polacek@redhat.com>
10157
10158 PR c/52023
10159 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10160 [ADJUST_FIELD_ALIGN].
10161
296674db
JM
101622013-12-04 Joseph Myers <joseph@codesourcery.com>
10163
10164 PR c/52023
10165 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10166 and check field alignment if set.
10167 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10168 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10169
b1726d6c 101702013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10171 Marek Polacek <polacek@redhat.com>
10172
10173 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10174 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10175
d7947e19
L
101762013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10177
10178 PR c/59309
10179 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10180 arguments.
10181
fad7652e
JJ
101822013-11-29 Jakub Jelinek <jakub@redhat.com>
10183
10184 PR c/59280
10185 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10186 goto invalid. If it is error_mark_node, don't issue further
10187 diagnostics.
10188
8b5e1202
SO
101892013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10190
10191 * c.opt (Wopenmp-simd): New.
10192
0a508bb6
JJ
101932013-11-22 Jakub Jelinek <jakub@redhat.com>
10194
10195 * c-ubsan.h (ubsan_instrument_return): New prototype.
10196 * c-ubsan.c (ubsan_instrument_return): New function.
10197
2fb9a547
AM
101982013-11-22 Andrew MacLeod <amacleod@redhat.com>
10199
10200 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10201 * c-gimplify.c: Likewise.
10202 * cilk.c: Likewise.
2fb9a547 10203
8400e75e
DM
102042013-11-22 David Malcolm <dmalcolm@redhat.com>
10205
10206 * c-common.c (unsafe_conversion_p): Remove use of
10207 EXPR_LOC_OR_HERE macro.
10208 (conversion_warning): Likewise.
10209 (warnings_for_convert_and_check): Likewise.
10210 (warn_for_collisions_1): Likewise.
10211 (shorten_compare): Likewise, and remove use of in_system_header
10212 macro, using the location from the former.
10213 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10214 (cb_def_pragma): Remove use of in_system_header macro.
10215 (lex_string): Likewise.
10216 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10217
eb1ce453
KZ
102182013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10219 Mike Stump <mikestump@comcast.net>
10220 Richard Sandiford <rdsandiford@googlemail.com>
10221
10222 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10223 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10224 tree_fits_shwi_p or tree_fits_uhwi_p.
10225 (dump_generic_ada_node): Likewise.
10226 * c-format.c (check_format_arg): Likewise.
10227 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10228
6b3b8c27
KZ
102292013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10230
10231 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10232
49b0aa18
JC
102332013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10234
10235 PR c/53001
10236 * c-common.c (unsafe_conversion_p): Make this function
10237 return an enumeration with more detail.
10238 (conversion_warning): Use the new return type of
10239 unsafe_conversion_p to separately warn either about conversions
10240 that lower floating point number precision or about the other
10241 kinds of conversions.
10242 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10243 (unsafe_conversion_p): switching return type to
10244 conversion_safety enumeration.
49b0aa18
JC
10245 * c.opt: Adding new warning -Wfloat-conversion and
10246 enabling it with -Wconversion.
10247
b826515a
BS
102482013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10249
8e745a17
JJ
10250 * c-opts.c: Include plugin.h.
10251 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10252
b9a55b13
MP
102532013-11-19 Marek Polacek <polacek@redhat.com>
10254
10255 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10256 call.
10257 (ubsan_instrument_shift): Likewise.
10258 (ubsan_instrument_vla): Likewise.
10259
7d362f6c
RS
102602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10261
10262 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10263 cast to unsigned type.
10264
386b1f1f
RS
102652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10266
10267 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10268 tree_low_cst.
10269 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10270 rather than tree_low_cst.
10271
ae7e9ddd
RS
102722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10273
10274 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10275 tree_to_uhwi throughout.
10276
9439e9a1
RS
102772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10278
10279 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10280 tree_low_cst (..., 0) with tree_to_shwi throughout.
10281
cc269bb6
RS
102822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10283
10284 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10285 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10286
9541ffee
RS
102872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10288
10289 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10290 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10291
c02065fc
AH
102922013-11-15 Aldy Hernandez <aldyh@redhat.com>
10293
10294 * c-cilkplus.c: New file.
10295 * c-common.c (readonly_error): Add location argument.
10296 * c-common.h (readonly_error): Same.
10297 (c_finish_cilk_clauses): Protoize.
10298 (c_check_cilk_loop): Same.
10299 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10300 Do not fail on error_mark_node.
10301 Abstract increment canonicalization to here...
10302 (c_omp_for_incr_canonicalize_ptr): New.
10303 c-pragma.c (init_pragma): Register "simd" pragma.
10304 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10305 (enum pragma_cilk_clause): New.
10306
9cc65f15
RS
103072013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10308
10309 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10310 wchar_type and host_integerp checks.
10311
18f429e2
AM
103122013-11-14 Andrew MacLeod <amacleod@redhat.com>
10313
10314 * c-common.c: Likewise.
10315 * c-gimplify.c: Likewise.
10316 * cilk.c: Likewise.
10317
d8a2d370
DN
103182013-11-14 Diego Novillo <dnovillo@google.com>
10319
10320 * c-common.c: Include fold-const.h.
10321 Include stor-layout.h.
10322 Include calls.h.
10323 Include stringpool.h.
10324 Include attribs.h.
10325 Include varasm.h.
10326 Include trans-mem.h.
10327 * c-cppbuiltin.c: Include stor-layout.h.
10328 Include stringpool.h.
10329 * c-format.c: Include stringpool.h.
10330 * c-lex.c: Include stringpool.h.
10331 Include stor-layout.h.
10332 * c-pragma.c: Include stringpool.h.
10333 Include attribs.h.
10334 Include varasm.h.
10335 Include gcc-symtab.h.
10336 * c-pretty-print.c: Include stor-layout.h.
10337 Include attribs.h.
10338 * cilk.c: Include stringpool.h.
10339 Include calls.h.
10340
38b7bc7f
JM
103412013-11-13 Joseph Myers <joseph@codesourcery.com>
10342
10343 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10344 * c-common.c (c_common_reswords): Add __auto_type.
10345 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10346
45b0be94
AM
103472013-11-12 Andrew MacLeod <amacleod@redhat.com>
10348
18f429e2
AM
10349 * c-common.c: Include gimplify.h.
10350 * c-gimplify.c: Likewise.
10351 * cilk.c: Likewise.
10352 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10353 * c-ubsan.c: Don't include gimple.h.
45b0be94 10354
582d9b50
JM
103552013-11-12 Joseph Myers <joseph@codesourcery.com>
10356
10357 * c-common.c (c_common_reswords): Add _Thread_local.
10358
6b28e197
JM
103592013-11-09 Joseph Myers <joseph@codesourcery.com>
10360
10361 * c-common.c (atomic_size_supported_p): New function.
10362 (resolve_overloaded_atomic_exchange)
10363 (resolve_overloaded_atomic_compare_exchange)
10364 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10365 Use it instead of comparing size with a local list of sizes.
10366
267bac10
JM
103672013-11-07 Andrew MacLeod <amacleod@redhat.com>
10368 Joseph Myers <joseph@codesourcery.com>
10369
10370 * c-common.h (enum rid): Add RID_ATOMIC.
10371 * c-common.c (c_common_reswords): Add _Atomic.
10372 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10373 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10374 * c-format.c (check_format_types): Check for extra _Atomic
10375 qualifiers in format argument.
10376 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10377 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10378
5157b91e
TB
103792013-11-06 Tobias Burnus <burnus@net-b.de>
10380
10381 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10382
6dbe0958
JM
103832013-11-06 Joseph Myers <joseph@codesourcery.com>
10384
10385 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10386 standards modes.
10387 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10388 to mean lack of IEEE 754 support.
10389
e8ff5196
TB
103902013-11-05 Tobias Burnus <burnus@net-b.de>
10391
10392 * c.opt (-Wdate-time): New option
10393 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10394
254a0760
JM
103952013-11-05 Joseph Myers <joseph@codesourcery.com>
10396
10397 * c-cppbuiltin.c (cpp_iec_559_value): Test
10398 flag_excess_precision_cmdline not flag_excess_precision.
10399
6d7f7e0a
TB
104002013-11-05 Tobias Burnus <burnus@net-b.de>
10401
10402 * c.opt (fopenmp-simd): New option.
10403 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10404 (omp_pragmas): ... this new struct.
10405 (c_pp_lookup_pragma): Also walk omp_pragmas.
10406 (init_pragma): Init pragmas for -fopenmp-simd.
10407
55a7f02f
MP
104082013-11-04 Marek Polacek <polacek@redhat.com>
10409
10410 PR c++/58979
10411 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10412
9193fb05
JM
104132013-11-04 Joseph Myers <joseph@codesourcery.com>
10414
10415 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10416 New functions.
10417 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10418
94159ecf
EB
104192013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10420
10421 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10422 (dump_ada_specs): Adjust prototype of second callback.
10423 * c-ada-spec.c (cpp_check): New global variable.
10424 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10425 (print_generic_ada_decl): Likewise.
10426 (has_static_fields): Change return type to bool and add guard.
10427 (has_nontrivial_methods): New predicate.
10428 (is_tagged_type): Change return type to bool.
10429 (separate_class_package): Call has_nontrivial_methods.
10430 (pp_ada_tree_identifier): Minor tweaks.
10431 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10432 (dump_ada_array_domains): Likewise.
10433 (dump_ada_array_type): Likewise.
10434 (dump_template_types): Remove cpp_check parameter and do not pass it to
10435 dump_generic_ada_node.
10436 (dump_ada_template): Likewise.
10437 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10438 recursively.
10439 (print_ada_methods): Change return type to integer. Remove cpp_check
10440 parameter and do not pass it down.
10441 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10442 dump_generic_ada_node.
10443 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10444 accessing methods.
10445 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10446 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10447 value of print_ada_methods.
10448 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10449 Set cpp_check to it before invoking dump_ada_nodes.
10450 (dump_ada_specs): Likewise.
10451
b906f4ca
MP
104522013-11-03 Marek Polacek <polacek@redhat.com>
10453
10454 * c-ubsan.c: Don't include hash-table.h.
10455 (ubsan_instrument_vla): New function.
10456 * c-ubsan.h: Declare it.
10457
5e20cdc9
DM
104582013-10-31 David Malcolm <dmalcolm@redhat.com>
10459
10460 Automated part of renaming of symtab_node_base to symtab_node.
10461
10462 Patch autogenerated by rename_symtab.py from
10463 https://github.com/davidmalcolm/gcc-refactoring-scripts
10464 revision 58bb219cc090b2f4516a9297d868c245495ee622
10465
10466 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10467 symtab_node_base to symtab_node.
10468
7057e645
ESR
104692013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10470
8e745a17 10471 Implement C++14 digit separators.
7057e645
ESR
10472 * c-lex.c (interpret_float): Remove digit separators from scratch string
10473 before building real literal.
10474
193ea7bc
JJ
104752013-10-30 Jakub Jelinek <jakub@redhat.com>
10476
10477 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10478
939b37da
BI
104792013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10480
10481 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10482 fields.
10483 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10484 enabled.
10485 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10486 (insert_cilk_frame): New prototype.
10487 (cilk_init_builtins): Likewise.
10488 (gimplify_cilk_spawn): Likewise.
10489 (c_cilk_install_body_w_frame_cleanup): Likewise.
10490 (cilk_detect_spawn_and_unwrap): Likewise.
10491 (cilk_set_spawn_marker): Likewise.
10492 (build_cilk_sync): Likewise.
10493 (build_cilk_spawn): Likewise.
10494 * cilk.c: New file.
10495
67348ccc
DM
104962013-10-29 David Malcolm <dmalcolm@redhat.com>
10497
10498 Patch autogenerated by refactor_symtab.py from
10499 https://github.com/davidmalcolm/gcc-refactoring-scripts
10500 revision 58bb219cc090b2f4516a9297d868c245495ee622
10501
10502 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10503 to a true class hierarchy.
10504 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10505
d570872d
RS
105062013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10507
10508 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10509
98906124
JL
105102013-10-26 Jeff Law <law@redhat.com>
10511
adfac8df
JJ
10512 * c-common.c (c_define_builtins): Remove mudflap support.
10513 * c.opt: Ignore and warn for mudflap options.
98906124 10514
d73749df 105152013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10516
10517 PR other/33426
10518 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10519 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10520
3f04b1bb
JM
105212013-10-23 Jason Merrill <jason@redhat.com>
10522
10523 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10524
acf0174b
JJ
105252013-10-11 Jakub Jelinek <jakub@redhat.com>
10526
acd15a28
JJ
10527 * c-common.h (omp_clause_mask::operator !=): New method.
10528 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10529 instead of if (mask & something) tests everywhere.
10530
acf0174b
JJ
10531 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10532 201307 instead of 201107.
10533 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10534 (c_common_attribute_table): Add "omp declare target" and
10535 "omp declare simd" attributes.
10536 (handle_omp_declare_target_attribute,
10537 handle_omp_declare_simd_attribute): New functions.
10538 * c-omp.c: Include c-pragma.h.
10539 (c_finish_omp_taskgroup): New function.
10540 (c_finish_omp_atomic): Add swapped argument, if true,
10541 build the operation first with rhs, lhs arguments and use NOP_EXPR
10542 build_modify_expr.
10543 (c_finish_omp_for): Add code argument, pass it down to make_code.
10544 (c_omp_split_clauses): New function.
10545 (c_split_parallel_clauses): Removed.
10546 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10547 c_omp_declare_simd_clauses_to_decls): New functions.
10548 * c-common.h (omp_clause_mask): New type.
10549 (OMP_CLAUSE_MASK_1): Define.
10550 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10551 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10552 omp_clause_mask::operator |, omp_clause_mask::operator &,
10553 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10554 omp_clause_mask::operator ==): New methods.
10555 (enum c_omp_clause_split): New.
10556 (c_finish_omp_taskgroup): New prototype.
10557 (c_finish_omp_atomic): Add swapped argument.
10558 (c_finish_omp_for): Add code argument.
10559 (c_omp_split_clauses): New prototype.
10560 (c_split_parallel_clauses): Removed.
10561 (c_omp_declare_simd_clauses_to_numbers,
10562 c_omp_declare_simd_clauses_to_decls): New prototypes.
10563 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10564 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10565 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10566 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10567 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10568 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10569 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10570 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10571 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10572 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10573 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10574 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10575 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10576 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10577 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10578 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10579 PRAGMA_OMP_CLAUSE_UNIFORM.
10580
826cacfe
MG
105812013-10-09 Marc Glisse <marc.glisse@inria.fr>
10582
10583 PR tree-optimization/20318
10584 * c-common.c (handle_returns_nonnull_attribute): New function.
10585 (c_common_attribute_table): Add returns_nonnull.
10586
2284b034
MG
105872013-10-03 Marc Glisse <marc.glisse@inria.fr>
10588
10589 PR c++/19476
10590 * c.opt (fcheck-new): Move to common.opt.
10591
b56e9788
MP
105922013-09-25 Marek Polacek <polacek@redhat.com>
10593 Jakub Jelinek <jakub@redhat.com>
10594
10595 PR sanitizer/58413
10596 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10597 an expression if we can prove it is correct.
10598 (ubsan_instrument_division): Likewise. Remove unnecessary
10599 check.
10600
ce6923c5
MP
106012013-09-18 Marek Polacek <polacek@redhat.com>
10602
10603 PR sanitizer/58411
10604 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10605 Declare it.
10606 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10607
fb5610fb
IS
106082013-09-14 Iain Sandoe <iain@codesourcery.com>
10609
10610 PR target/48094
10611 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10612 fobjc-gc, freplace-objc-classes): Accept for LTO.
10613
88b0e79e
JC
106142013-09-13 Jacek Caban <jacek@codeweavers.com>
10615
10616 * c-target.def: New hook
10617
c9b0866a
PC
106182013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10619
10620 PR c++/43452
10621 * c.opt (Wdelete-incomplete): Add.
10622
0af94e6f
JR
106232013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10624
10625 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10626 (vector_types_compatible_elements_p): New function.
10627 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10628 declaration.
10629 (vector_types_compatible_elements_p): Declare.
10630
7c26172c
GDR
106312013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10632
10633 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10634 a virtual member function.
10635 (pp_simple_type_specifier): Remove.
10636 (pp_c_type_specifier): Likewise.
10637 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10638 Rename from pp_c_type_specifier. Adjust.
10639 (c_pretty_printer::c_pretty_printer): Do not assign to
10640 simple_type_specifier.
10641
20059c8b
GDR
106422013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10643
10644 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10645 member function.
10646 (c_pretty_printer::storage_class_specifier): Likewise.
10647 (c_pretty_printer::initializer): Likewise.
10648 (pp_declaration): Remove.
10649 (pp_declaration_specifiers): Likewise.
10650 (pp_abstract_declarator): Likewise.
10651 (pp_declarator): Likewise.
10652 (pp_type_id): Likewise.
10653 (pp_statement): Likewise.
10654 (pp_constant): Likewise.
10655 (pp_id_expression): Likewise.
10656 (pp_primary_expression): Likewise.
10657 (pp_unary_expression): Likewise.
10658 (pp_multiplicative_expression): Likewise.
10659 (pp_conditional_expression): Likewise.
10660 (pp_assignment_expression): Likewise.
10661 (pp_expression): Likewise.
10662 (pp_c_type_id): Likewise.
10663 (pp_c_storage_class_specifier): Likewise.
10664 * c-pretty-print.c (pp_c_type_cast): Tidy.
10665 (pp_c_pointer): Likewise.
10666 (pp_c_type_specifier): Likewise.
10667 (pp_c_parameter_type_list): Likewise.
10668 (pp_c_function_definition): Likewise.
10669 (pp_c_init_declarator): Likewise.
10670 (pp_c_initializer_list): Likewise.
10671 (pp_c_constructor_elts): Likewise.
10672 (c_pretty_printer::direct_abstract_declarator): Likewise.
10673 (c_pretty_printer::declaration_specifiers): Likewise.
10674 (c_pretty_printer::primary_expression): Likewise.
10675 (c_pretty_printer::postfix_expression): Likewise.
10676 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10677 (c_pretty_printer::storage_class_specifier): Rename from
10678 pp_c_storage_class_specifier.
10679 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10680 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10681 storage_class_specifier, initializer, offset_list, flags.
10682
de5a5fa1
MP
106832013-08-30 Marek Polacek <polacek@redhat.com>
10684
10685 * c-ubsan.c: New file.
10686 * c-ubsan.h: New file.
10687
8f0e4d72
GDR
106882013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10689
10690 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10691 member function.
10692 (c_pretty_printer::declaration_specifiers): Likewise.
10693 (c_pretty_printer::declarator): Likewise.
10694 (c_pretty_printer::abstract_declarator): Likewise.
10695 (c_pretty_printer::direct_abstract_declarator): Likewise.
10696 (c_pretty_printer::direct_declarator): Likewise.
10697 (c_pretty_printer::function_specifier): Likewise.
10698 (pp_declaration): Adjust.
10699 (pp_declaration_specifiers): Likewise.
10700 (pp_abstract_declarator): Likewise.
10701 (pp_direct_declarator): Likewise.
10702 (pp_function_specifier): Likewise.
10703 (pp_direct_abstract_declarator): Remove as unused.
10704 (pp_c_declaration): Remove.
10705 (pp_c_declaration_specifiers): Likewise.
10706 (pp_c_declarator): Likewise.
10707 (pp_c_direct_declarator): Likewise.
10708 (pp_c_function_specifier): Likewise.
10709 (pp_c_direct_abstract_declarator): Likewise.
10710 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10711 from pp_c_abstract_declarator. Adjust.
ab20d992 10712 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10713 pp_c_direct_abstract_declarator. Adjust.
10714 (c_pretty_printer::function_specifier): Rename from
10715 pp_c_function_specifier. Adjust.
10716 (c_pretty_printer::declaration_specifiers): Rename from
10717 pp_c_declaration_specifiers. Adjust.
10718 (c_pretty_printer::direct_declarator): Rename from
10719 pp_c_direct_declarator. Adjust.
10720 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10721 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10722 (c_pretty_printer::c_pretty_printer): Do not assign to
10723 declaration, declaration_specifiers, declarator,
10724 direct_declarator, direct_abstract_declarator, function_specifier.
10725
00d34d3a
GDR
107262013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10727
10728 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10729 virtual member function.
10730 (c_pretty_printer::multiplicative_expression): Likewise.
10731 (c_pretty_printer::conditional_expression): Likewise.
10732 (c_pretty_printer::assignment_expression): Likewise.
10733 (c_pretty_printer::expression): Likewise.
10734 (pp_unary_expression): Adjust.
10735 (pp_multiplicative_expression): Likewise.
10736 (pp_assignment_expression): Likewise.
10737 (pp_conditional_expression): Likewise.
10738 (pp_expression): Likewise.
10739 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10740 from pp_c_unary_expression. Adjust.
10741 (c_pretty_printer::multiplicative_expression): Rename from
10742 pp_c_multiplicative_expression. Adjust.
10743 (c_pretty_printer::conditional_expression): Rename from
10744 pp_c_conditional_expression. Adjust.
10745 (c_pretty_printer::assignment_expression): Rename from
10746 pp_c_assignment_expression. Adjust.
10747 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10748 (c_pretty_printer::c_pretty_printer): Do not assign to
10749 unary_expression, multiplicative_expression,
10750 conditional_expression, expression.
10751
fb22178f
GDR
107522013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10753
10754 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10755 virtual member function.
10756 (pp_postfix_expression): Adjust.
10757 (pp_c_postfix_expression): Remove.
10758 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10759 from pp_c_postfix_expression. Adjust.
10760 (c_pretty_printer::c_pretty_printer): Do not assign to
10761 postfix_expression.
10762
7ecc2600
GDR
107632013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10764
10765 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10766 virtua member function.
10767 (pp_primary_expression): Adjust.
10768 (pp_c_primary_expression): Remove.
10769 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10770 from pp_c_primary_expression. Adjust.
10771 (pp_c_initializer_list): Use pp_primary_expression.
10772 (c_pretty_printer::c_pretty_printer): Do not assign to
10773 primary_expression.
10774
0691175f
GDR
107752013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10776
10777 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10778 * c-pretty-print.c (M_): Remove.
10779 (c_pretty_printer::translate_string): Define.
10780 (pp_c_type_specifier): Use it.
10781 (pp_c_primary_expression): Likewise.
10782 (pp_c_expression): Likewise.
10783
66dfe4c4
GDR
107842013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10785
10786 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10787 virtual function.
10788 (pp_c_id_expression): Remove.
10789 (pp_id_expression): Adjust.
10790 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10791 pp_c_id_expression. Adjust.
10792 (pp_c_postfix_expression): Use pp_id_expression.
10793 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10794
ca43e9d5
GDR
107952013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10796
10797 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10798 member function.
10799 (pp_constant): Adjust.
10800 (pp_c_constant): Remove.
10801 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10802 pp_c_constant. Adjust.
10803 (pp_c_constant)
10804 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10805 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10806
da6ca2b5
GDR
108072013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10808
10809 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10810 (c_pretty_printer::c_pretty_printer): Declare.
10811 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10812 c_pretty_printer_init. Adjust.
10813 (print_c_tree): Do not call c_pretty_printer_init.
10814 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10815
65a372f4
AC
108162013-08-09 Arnaud Charlet <charlet@adacore.com>
10817
10818 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10819
fd9b0f32
PC
108202013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10821
10822 PR c++/58080
10823 * c-common.c (pointer_int_sum): Add bool parameter.
10824 * c-common.h (pointer_int_sum): Adjust declaration.
10825
e0aec1e9
GDR
108262013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10827
10828 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10829 c_pretty_printer variable.
10830
b066401f
GDR
108312013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10832
10833 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10834 (pp_base): Remove.
10835 (pp_c_base): Likewise. Adjust users.
10836 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10837 (pp_c_whitespace): Do not call pp_base.
10838 (pp_c_left_paren): Likewise.
10839 (pp_c_right_paren): Likewise.
10840 (pp_c_left_brace): Likewise.
10841 (pp_c_right_brace): Likewise.
10842 (pp_c_left_bracket): Likewise.
10843 (pp_c_right_bracket): Likewise.
10844 (pp_c_dot): Likewise.
10845 (pp_c_ampersand): Likewise.
10846 (pp_c_star): Likewise.
10847 (pp_c_arrow): Likewise.
10848 (pp_c_semicolon): Likewise.
10849 (pp_c_complement): Likewise.
10850 (pp_c_exclamation): Likewise.
10851 (pp_c_direct_declarator): Likewise.
10852 (pp_c_ws_string): Likewise.
10853 (pp_c_identifier): Likewise.
10854 (pp_c_statement): Likewise.
10855 (print_c_tree): Likewise.
10856
65e5a578
ESR
108572013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10858
10859 PR c++/58072
10860 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10861 provide useful error strings.
10862
137a1a27
GDR
108632013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10864
10865 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10866 printer functions instead of pp_string or operators and punctuators.
10867 (dump_generic_ada_node): Likewise.
10868 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10869 (pp_c_relational_expression): Likewise.
10870 (pp_c_logical_or_expression): Likewise.
10871
07838b13
GDR
108722013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10873
10874 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10875 functions instead of pp_character.
10876 (pp_ada_tree_identifier): Likewise.
10877 (dump_ada_double_name): Likewise.
10878 (dump_ada_function_declaration): Likewise.
10879 (dump_ada_array_domains): Likewise.
10880 (dump_template_types): Likewise.
10881 (dump_generic_ada_node): Likewise.
10882 (print_ada_declaration): Likewise.
10883 (print_ada_struct_decl): Likewise.
10884 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10885
433cc7b0
TT
108862013-07-23 Tom Tromey <tromey@redhat.com>
10887
10888 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10889 * c-common.c (c_common_reswords): Add _Generic.
10890
688010ba
OB
108912013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10892
10893 * c-common.c: Fix typos.
10894 * c-common.h: Likewise.
10895
2a99e5e6
LL
108962013-07-13 Lubos Lunak <l.lunak@suse.cz>
10897
10898 PR c++/55203
10899 * c-common.c (c_common_attribute_table): Add warn_unused.
10900 (handle_warn_unused_attribute): New.
10901
c26302d5
JJ
109022013-07-10 Jakub Jelinek <jakub@redhat.com>
10903
10904 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10905 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10906
dfeadaa0
PC
109072013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10908
10909 PR c++/57869
10910 * c.opt: Add Wconditionally-supported.
10911
6a2fa4b2
GS
109122013-07-08 Graham Stott <graham.stott@btinternet.com>
10913
adfac8df 10914 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10915 unused variables l_length and l_node.
10916
ecdbd01a 109172013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10918
10919 PR c/57821
10920 * c-common.c (complete_array_type): Delay folding first index
10921 like other indices. When folding, check for index overflow.
10922
bedc293e
MG
109232013-06-27 Marc Glisse <marc.glisse@inria.fr>
10924
10925 PR c++/57509
10926 * c-common.h (c_build_vec_perm_expr): New complain argument.
10927 * c-common.c (c_build_vec_perm_expr): Likewise.
10928 Use save_expr also in C++.
10929
604b2bfc
GDR
109302013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10931
10932 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10933 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10934 * c-opts.c (c_common_post_options): Likewise.
10935
dfeadaa0 109362013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10937
10938 * array-notation-common.c (length_mismatch_in_expr): Changed the
10939 parameter type's from a dynamic array to a vec_tree. Also removed
10940 the size parameters.
10941 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10942 the change above.
10943
2ce86d2e
BI
109442013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10945
10946 * c-common.h (struct cilkplus_an_parts): New structure.
10947 (struct cilkplus_an_loop_parts): Likewise.
10948 (cilkplus_extract_an_triplets): New prototype.
10949 (fix_sec_implicit_args): Likewise.
10950 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10951 (fix_sec_implicit_args): Likewise.
604b2bfc 10952
07a6825b
BI
109532013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10954
10955 * array-notation-common.c (find_inv_trees): Removed an unwanted
10956 typecasting.
10957 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10958 enum rid to enum tree_code.
10959
08346abd
JH
109602013-06-11 Jan Hubicka <jh@suse.cz>
10961
10962 * c-common.c (handle_alias_ifunc_attribute): Do not set
10963 DECL_EXTERNAL for weakref variables.
10964 * c-pragma.c (handle_pragma_weak): Make sure aliases
10965 are not declared as external.
10966
d60f1706
BI
109672013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10968
10969 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10970 function from c/c-array-notation.c.
10971 (is_cilkplus_reduce_builtin): Likewise.
10972 (find_rank): Likewise.
10973 (extract_array_notation_exprs): Likewise.
10974 (replace_array_notations): Likewise.
10975 (find_inv_trees): Likewise.
10976 (replace_inv_trees): Likewise.
10977 (contains_array_notation_expr): Likewise.
10978 (find_correct_array_notation_type): Likewise.
10979 * c-common.h (struct inv_list): Moved this struct from the file
10980 c/c-array-notation.c and added a new field called additional tcodes.
10981 (length_mismatch_in_expr_p): New prototype.
10982 (is_cilkplus_reduce_builtin): Likewise.
10983 (find_rank): Likewise.
10984 (extract_array_notation_exprs): Likewise.
10985 (replace_array_notation): Likewise.
10986 (find_inv_trees): Likewise.
10987 (replace_inv_trees): Likewise.
10988 (find_correct_array_notation_type): Likewise.
dfeadaa0 10989
36536d79
BI
109902013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10991
10992 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10993 function array_notation_init_builtins is called.
10994 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10995 * c-common.def (ARRAY_NOTATION_REF): New tree.
10996 * c-common.h (build_array_notation_expr): New function declaration.
10997 (build_array_notation_ref): Likewise.
10998 (extract_sec_implicit_index_arg): New extern declaration.
10999 (is_sec_implicit_index_fn): Likewise.
11000 (ARRAY_NOTATION_CHECK): New define.
11001 (ARRAY_NOTATION_ARRAY): Likewise.
11002 (ARRAY_NOTATION_START): Likewise.
11003 (ARRAY_NOTATION_LENGTH): Likewise.
11004 (ARRAY_NOTATION_STRIDE): Likewise.
11005 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11006 ARRAY_NOTATION_REF.
11007 (pp_c_expression): Likewise.
11008 * c.opt (flag_enable_cilkplus): New flag.
11009 * array-notation-common.c: New file.
11010
f7716d57
JJ
110112013-05-14 Jakub Jelinek <jakub@redhat.com>
11012
11013 PR c++/57274
11014 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11015
a5e0cd1d
MG
110162013-05-10 Marc Glisse <marc.glisse@inria.fr>
11017
11018 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11019 vectors.
11020
f6bc1c4a
HS
110212013-05-07 Han Shen <shenhan@google.com>
11022
11023 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11024
3f12f6e9
SKS
110252013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11026
11027 * c-common.c (check_user_alignment): Emit error for negative values.
11028
61949153
PC
110292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11030
11031 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11032
e93e18e9
PC
110332013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11034
11035 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11036 __GXX_EXPERIMENTAL_CXX1Y__.
11037
44d90fe1 110382013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11039 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11040
11041 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11042 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11043 to simply use OPT_Wpointer_arith.
11044 (c_sizeof_or_alignof_type): Likewise.
11045
13f39b2e
PC
110462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11047
11048 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11049
4b84d650
JJ
110502013-04-12 Jakub Jelinek <jakub@redhat.com>
11051
11052 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11053 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11054 specifiers.
11055
fb037b5d
SB
110562013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11057
11058 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11059
4e856798
PC
110602013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11061
11062 * c-common.c (pointer_int_sum): Remove dead code.
11063
4b1baac8
RS
110642013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11065
11066 PR middle-end/56524
11067 * c-common.c (handle_optimize_attribute): Don't call
11068 save_optabs_if_changed.
11069
0b50e654
JJ
110702013-03-05 Jakub Jelinek <jakub@redhat.com>
11071
11072 PR middle-end/56461
11073 * c-pch.c (pch_init): Free target_validity at the end.
11074
48c41403
JJ
110752013-03-04 Jakub Jelinek <jakub@redhat.com>
11076
11077 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11078
e664c61c
KS
110792013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11080 Jakub Jelinek <jakub@redhat.com>
11081
11082 PR sanitizer/56454
11083 * c-common.c (handle_no_sanitize_address_attribute): New function.
11084 (c_common_attribute_table): Add no_sanitize_address attribute.
11085 (handle_no_address_safety_analysis_attribute): Add
11086 no_sanitize_address attribute, not no_address_safety_analysis
11087 attribute.
11088
a475fd3d 110892013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11090
11091 PR target/52555
11092 * c-common.c (handle_optimize_attribute): Call
11093 save_optabs_if_changed.
11094
f6007d99
JJ
110952013-02-18 Jakub Jelinek <jakub@redhat.com>
11096 Steven Bosscher <steven@gcc.gnu.org>
11097
11098 PR pch/54117
11099 * c-opts.c (c_common_post_options): If debug info is enabled
11100 and non-dwarf*, refuse to load PCH files and when writing PCH
11101 file warn.
11102
cf35e2b1
JJ
111032013-02-05 Jakub Jelinek <jakub@redhat.com>
11104
11105 PR middle-end/56167
11106 * c-common.c (handle_error_attribute): Fix condition.
11107
32887460
JJ
111082013-01-30 Jakub Jelinek <jakub@redhat.com>
11109
11110 PR c++/55742
11111 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11112
5af057d8
JM
111132013-01-18 Jason Merrill <jason@redhat.com>
11114
11115 PR target/54908
11116 * c.opt (-fextern-tls-init): New.
11117 * c-opts.c (c_common_post_options): Handle it.
11118
cc83c823
JJ
111192013-01-09 Jakub Jelinek <jakub@redhat.com>
11120
11121 PR c/48418
11122 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11123 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11124 and is either negative or bigger or equal to type precision
11125 of the first operand.
11126
a859517f
MP
111272012-12-03 Marek Polacek <polacek@redhat.com>
11128
11129 PR c/55570
11130 * c-common.c (check_user_alignment): Swap order of tests,
11131 check TREE_CODE first.
11132
2d7aa578
ESR
111332012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11134
11135 PR c++/52654
11136 * c-common.h (overflow_type): New enum.
11137 (build_userdef_literal): Add overflow_type argument.
11138 (tree_userdef_literal): Add overflow_type.
11139 (USERDEF_LITERAL_OVERFLOW): New access macro.
11140 * c-common.c (build_userdef_literal): Add overflow_type
11141 argument.
11142 * c-lex.c (c_lex_with_flags): Add overflow_type to
11143 build_userdef_literal calls.
11144 (interpret_integer, interpret_float): Add overflow_type argument.
11145
cc3c4f62
RB
111462012-11-28 Richard Biener <rguenther@suse.de>
11147
11148 PR c/35634
11149 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11150 here and use a type with proper overflow behavior for types that would
11151 need to be promoted for the arithmetic.
11152
77bc5132
JJ
111532012-11-23 Jakub Jelinek <jakub@redhat.com>
11154
11155 PR sanitizer/55435
11156 * c-common.c (handle_no_address_safety_analysis_attribute): New
11157 function.
11158 (c_common_attribute_table): Add no_address_safety_analysis.
11159
5dc99c46
SB
111602012-11-16 Simon Baldwin <simonb@google.com>
11161
11162 * c.opt: Add f[no-]canonical-system-headers.
11163 * c-opts.c (c_common_handle_option): Handle
11164 OPT_fcanonical_system_headers.
11165
a4a0016d
ESR
111662012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11167
11168 PR c++/54413
11169 * c-opts.c (c_common_handle_option): Set new flags.
11170 * c.opt: Describe new flags.
11171
7dbb85a7
JM
111722012-11-09 Jason Merrill <jason@redhat.com>
11173
11174 * c.opt (Wabi-tag): New.
11175
ad7bac31
AK
111762012-11-09 Andi Kleen <ak@linux.intel.com>
11177
11178 PR 55139
11179 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11180 MEMMODEL_MASK
ad7bac31 11181
7332899a
MLI
111822012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11183
11184 PR c/53063
11185 * c.opt (Wformat): Make it Alias Wformat=1.
11186 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11187 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11188 LangEnabledBy.
11189 (Wformat=): RejectNegative. Use LangEnabledBy.
11190 (Wnonnull): Use LangEnabledBy.
11191 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11192 * c-format.c (set_Wformat): Delete.
11193 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11194 (maybe_read_dollar_number): Likewise.
11195 (avoid_dollar_number): Likewise.
11196 (finish_dollar_format_checking): Likewise.
11197 (check_format_info): Likewise.
11198 (check_format_info_main): Likewise.
11199 (check_format_types): Likewise.
11200 (format_type_warning): Likewise.
11201 * c-common.c (int): Likewise.
11202 (check_function_sentinel): Likewise.
8e745a17 11203 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11204
34a180a6
MLI
112052012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11206
11207 PR c/53063
11208 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11209 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11210 Use LangEnabledBy.
11211 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11212 common.opt.
11213 (Wvariadic-macros): Init(1).
11214 * c-opts.c (c_common_handle_option): Do not handle them
11215 explicitly.
11216 (c_common_post_options): Likewise.
11217 (sanitize_cpp_opts): warn_unused_macros is now
11218 cpp_warn_unused_macros.
11219 (push_command_line_include): Likewise.
11220 * c-common.c (warn_unknown_pragmas): Do not define.
11221 * c-common.h (warn_unknown_pragmas): Do not declare.
11222
3f46d6a5
MLI
112232012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11224
11225 PR c/51294
11226 * c-common.c (conversion_warning): Handle conditional expressions.
11227
880661a4
JW
112282012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11229
11230 PR c++/54930
11231 * c.opt (Wreturn_local_addr): Define new option.
11232
4514a96b
JM
112332012-10-25 Jason Merrill <jason@redhat.com>
11234
f14edc1a
JM
11235 * c.opt (Wvirtual-move-assign): New.
11236
4514a96b
JM
11237 * c.opt (Winherited-variadic-ctor): New.
11238
93100c6b
MG
112392012-10-25 Marc Glisse <marc.glisse@inria.fr>
11240
11241 PR c++/54427
11242 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11243
1efcb8c6
JM
112442012-10-23 Joseph Myers <joseph@codesourcery.com>
11245
11246 * c-common.h (pch_cpp_save_state): Declare.
11247 * c-target.def (c_preinclude): New hook.
11248 * c-opts.c (done_preinclude): New.
11249 (push_command_line_include): Handle default preincluded header.
11250 (cb_file_change): Call pch_cpp_save_state when calling
11251 push_command_line_include.
11252 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11253 (pch_cpp_save_state): New.
11254 (pch_init): Call pch_cpp_save_state conditionally, instead of
11255 calling cpp_save_state.
11256
4a0ae68e
MLI
112572012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11258
11259 PR c/53063
11260 PR c/40989
11261 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11262 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11263 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11264 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11265 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11266 * c-opts.c (c_common_handle_option): Remove explicit handling from
11267 here.
11268 (c_common_post_options): Likewise.
11269
67e4210b
EB
112702012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11271
11272 * c-ada-spec.c (LOCATION_COL): Delete.
11273 (compare_location): New function.
11274 (compare_node): Use it.
11275 (compare_comment): Likewise.
11276
65d4f2cd
MLI
112772012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11278
11279 PR c/53063
11280 PR c/40989
11281 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11282 * c-opts.c (c_common_handle_option): Do not set them here. Add
11283 comment.
11284 (c_common_post_options): Likewise.
11285
909881cb
EB
112862012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11287
11288 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11289 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11290 Remove POINTER_TYPE handling, add large unsigned handling and use
11291 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11292
3a785c97
JJ
112932012-10-12 Jakub Jelinek <jakub@redhat.com>
11294
11295 PR c/54381
11296 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11297 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11298 locs and array of 3 trees instead of just single loc and single
11299 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11300 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11301 For *cmp* builtins that take two sources strings report warnings
11302 about first and second source, not about destination and source.
11303
5e54f81d
MG
113042012-10-12 Marc Glisse <marc.glisse@inria.fr>
11305
11306 PR c++/53055
11307 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11308
f5b02f1e
EB
113092012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11310
11311 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11312 declaring something coming from another file.
11313
b46dbc6c
AC
113142012-10-10 Arnaud Charlet <charlet@adacore.com>
11315
f5b02f1e 11316 PR ada/54845
b46dbc6c
AC
11317 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11318
5d9de0d0
PC
113192012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11320
11321 PR c++/54194
11322 * c-common.c (warn_about_parentheses): Add location_t parameter;
11323 use EXPR_LOC_OR_LOC.
11324 * c-common.h: Update declaration.
11325
a212e43f
MG
113262012-10-09 Marc Glisse <marc.glisse@inria.fr>
11327
11328 PR c++/54427
11329 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11330 more operations. Make error messages optional.
11331 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11332 (scalar_to_vector): Declare.
11333
b1db7f91
JM
113342012-10-08 Jason Merrill <jason@redhat.com>
11335
11336 * c-common.c (c_common_reswords): Add thread_local.
11337
e28d52cf
DS
113382012-10-08 Dodji Seketeli <dodji@redhat.com>
11339
11340 PR c++/53528 C++11 attribute support
11341 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11342 new functions.
11343 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11344 static function.
11345 (handle_aligned_attribute): In choose strictest alignment
11346 among many. Use new check_cxx_fundamental_alignment_constraints.
11347 (handle_transparent_union_attribute): In c++11 attribute syntax,
11348 don't look through typedefs.
11349
3b78de56
AC
113502012-10-04 Arnaud Charlet <charlet@adacore.com>
11351
11352 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11353 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11354 out of dumpfile.h.
11355
6040bb5f
DC
113562012-09-25 Dehao Chen <dehao@google.com>
11357
11358 PR middle-end/54645
3b78de56 11359 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11360 map when read in the pch.
11361
3f8257db 113622012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11363
11364 * c-ada-spec.c: Style fixes.
11365
3f8257db 113662012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11367
11368 * c.opt (-fada-spec-parent): Define new command line switch.
11369 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11370 is specified, generate binding spec as a child of the specified unit.
11371
0ccb505d
PC
113722012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11373 Manuel López-Ibáñez <manu@gcc.gnu.org>
11374
11375 PR c++/53210
11376 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11377
c583af79
AC
113782012-08-23 Arnaud Charlet <charlet@adacore.com>
11379
11380 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11381 for pointers, and add missing Convention C pragma.
11382 (print_ada_struct_decl): Add missing aliased keyword.
11383 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11384
1a4049e7
JJ
113852012-08-17 Jakub Jelinek <jakub@redhat.com>
11386
11387 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11388 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11389 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11390 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11391 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11392
70b5e7dc
RG
113932012-08-10 Richard Guenther <rguenther@suse.de>
11394
11395 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11396
f8923f7e
SB
113972012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11398
11399 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11400 instead of separate pp_newline and pp_flush.
11401 (print_c_tree): Likewise.
11402
e45abe1f
RH
114032012-07-26 Richard Henderson <rth@redhat.com>
11404
11405 * c-common.c (handle_hot_attribute): Allow labels.
11406 (handle_cold_attribute): Likewise.
11407
332f1d24
JJ
114082012-07-20 Jakub Jelinek <jakub@redhat.com>
11409
11410 PR c++/28656
11411 * c-common.c (check_function_nonnull): Handle multiple nonnull
11412 attributes properly.
11413
7ee2468b
SB
114142012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11415
11416 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11417 * c-ada-spec.c: Likewise.
11418 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11419
ee7b28eb
SB
114202012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11421
11422 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11423 Remove code conditional on it.
11424
6bdf3519
SB
114252012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11426
11427 * c-gimplify.c: Do not include basic-block.h.
11428 * c-common.c: Do not include linfuncs.h.
11429
532aafad
SB
114302012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11431
11432 * c-common.h: Include tree.h.
11433
8d0d1915
JM
114342012-07-02 Jason Merrill <jason@redhat.com>
11435
11436 PR c++/53524
11437 * c-common.c (get_priority): Call default_conversion.
11438
fbc873ad
UB
114392012-07-01 Uros Bizjak <ubizjak@gmail.com>
11440
11441 * c-pch.c (c_common_write_pch): Remove unused variables.
11442
d4a10d0a
SB
114432012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11444
11445 * cppspec.c: Moved from gcc/ to here.
11446
6f3a2e23
KT
114472012-06-27 Kai Tietz <ktietz@redhat.com>
11448
11449 PR preprocessor/37215
11450 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11451
8ca92d04
SB
114522012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11453
11454 * c-common.h (c_common_print_pch_checksum): Remove.
11455 * c-pch.c: Do not include output.h.
11456 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11457 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11458 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11459 (struct c_pch_header): Remove.
11460 (get_ident): Update gpch version.
11461 (pch_init): Do not print executable_checksum to asm_out_file.
11462 Do not fail if there is no asm_out_file to read back from. Set
11463 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11464 (c_common_write_pch): Verify that nothing was written to asm_out_file
11465 since pch_init was called. Do not write a c_pch_header, and do not
11466 copy from asm_out_file to the PCH.
11467 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11468 the content of asm_out_file from the PCH.
11469 (c_common_print_pch_checksum): Remove.
11470 * c-opts.c (c_common_init): Print out executable_checksum directly.
11471
70f42967
SB
114722012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11473
11474 * c-target.def (objc_declare_unresolved_class_reference,
11475 objc_declare_class_definition): Add new hooks.
11476
a8781821
SB
114772012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11478
11479 * c-lex.c: Do not include output.h.
11480 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11481 Remove uses of ASM_OUTPUT_IDENT.
11482
9e1a8dd1
RR
114832012-06-15 Marc Glisse <marc.glisse@inria.fr>
11484
11485 PR c++/51033
11486 * c-common.h (c_build_vec_perm_expr): Move decl here.
11487 * c-common.c (c_build_vec_perm_expr): Move definition
11488 here.
11489
6f07a821
SB
114902012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11491
11492 * c.opt (fconserve-space): Turn into a no-op.
11493
9faeb493 114942012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11495
11496 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11497 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11498 both the start and end of the function.
11499
a4b7d13c
SB
115002012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11501
11502 * c-common.c: Do not include output.h.
11503 * c-pragma.c: Likewise.
11504
c265f413
SA
115052012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11506
11507 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11508 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11509 (lang_decl_name): Handle namespace decls.
11510
be7a421e
SB
115112012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11512
11513 * c-ada-spec.c: Do not include output.h.
11514 * c-semantics.c: Likewise.
11515
65de6659
JM
115162012-05-29 Joseph Myers <joseph@codesourcery.com>
11517
11518 * c-common.c: Fix typo.
11519
ca5f4331
MM
115202012-05-29 Michael Matz <matz@suse.de>
11521
11522 * c-common.h (c_expand_decl): Remove prototype.
11523
4f7f7aca
MLI
115242012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11525
11526 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11527 * c-opts.c (c_common_handle_option): Remove code handling
11528 warn_missing_braces.
11529
4a792f9b
PC
115302012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11531
11532 PR c++/25137
11533 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11534 -Wmissing_braces.
11535
650dc14a
DS
115362012-05-22 Dodji Seketeli <dodji@redhat.com>
11537
11538 PR c++/53322
11539 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11540
9b095bf1
MLI
115412012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11542
11543 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11544 * c-opts.c (c_common_handle_option): Do not handle explicitly
11545 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11546
0b2c4be5
DS
115472012-05-16 Dodji Seketeli <dodji@redhat.com>
11548
11549 PR preprocessor/7263
ab20d992 11550 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11551 to cpp_classify_number. For diagnostics, use the precise location
11552 instead of the global input_location.
11553
a1bde5af
PC
115542012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11555
d02924ef 11556 PR c++/11856
a1bde5af
PC
11557 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11558
d1ede5f4
BS
115592012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11560
a1bde5af 11561 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11562
f2bc201f
MLI
115632012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11564
11565 PR 53063
11566 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11567 Wreorder): Use LangEnabledBy.
11568 * c-opts.c (c_common_handle_option): Do not enable them
11569 explicitly. Call lang-specific generated functions.
11570 (c_common_post_options): Do not set them here.
11571
95744782
MLI
115722012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11573
11574 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11575 Wmissing-field-initializers,Wmissing-parameter-type,
11576 Wold-style-declaration,Woverride-init): Use EnabledBy.
11577 * c-opts.c (c_common_post_options): Do not set here explicitly.
11578
7d5a5747
MLI
115792012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11580
11581 PR 53063
11582 * c-opts.c (c_common_handle_option): Use handle_generated_option
11583 to enable sub-options.
11584
5a3c9cf2
PC
115852012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11586
11587 PR c++/53158
11588 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11589
3ac8781c
RG
115902012-05-10 Richard Guenther <rguenther@suse.de>
11591
11592 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11593 adjust commentary about TYPE_IS_SIZETYPE types.
11594
1e537948
MLI
115952012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11596
11597 PR c++/53261
11598 * c-common.c (warn_logical_operator): Check that argument of
11599 integer_zerop is not NULL.
11600
f2c4a785
MLI
116012012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11602
11603 PR c/43772
11604 * c-common.c (warn_logical_operator): Do not warn if either side
11605 is already true or false.
11606
50f305ca
MLI
116072012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11608
11609 PR c/51712
11610 * c-common.c (expr_original_type): New.
11611 (shorten_compare): Do not warn for enumeration types.
11612
0c3641b0
MLI
116132012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11614
11615 * c.opt (fpermissive): Add Var(flag_permissive).
11616
7edaa4d2
MG
116172012-04-30 Marc Glisse <marc.glisse@inria.fr>
11618
11619 PR c++/51033
11620 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11621 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11622
b9c8da34
DS
116232012-04-30 Dodji Seketeli <dodji@redhat.com>
11624
11625 Add -Wvarargs option
ab20d992 11626 * c.opt (Wvarargs): Define new option.
b9c8da34 11627
e6c69da0
MLI
116282012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11629
11630 * c-common.c (check_function_arguments): Replace
11631 Wmissing-format-attribute with Wsuggest-attribute=format.
11632
90137d8f
MLI
116332012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11634
11635 * c.opt (Wsuggest-attribute=format): New. Alias of
11636 Wmissing-format-attribute.
11637 * c-format.c (decode_format_type): Replace
11638 Wmissing-format-attribute with Wsuggest-attribute=format.
11639 (check_function_format): Likewise.
11640
9faeb493 116412012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11642
11643 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11644 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11645 * c.opt: Add Wliteral-suffix.
11646
c1771a20
MLI
116472012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11648
11649 PR c/44774
11650 * c.opt (Wpedantic): New.
11651 (pedantic): Alias Wpedantic.
11652 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11653 (c_common_post_options): Likewise.
11654 (sanitize_cpp_opts): Likewise.
11655 * c-lex.c (interpret_float): Likewise.
11656 * c-format.c (check_format_types): Likewise.
11657 * c-common.c (pointer_int_sum): Likewise.
11658 (c_sizeof_or_alignof_type): Likewise.
11659 (c_add_case_label): Likewise.
11660 (c_do_switch_warnings): Likewise.
11661 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11662
04b391c1
JM
116632012-04-15 Jason Merrill <jason@redhat.com>
11664
11665 PR c++/52818
11666 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11667 (C_STD_NAME): Distinguish between C++98 and C++11.
11668
ac868f29
EB
116692012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11670
11671 PR target/52624
11672 * c-common.h (uint16_type_node): Rename into...
11673 (c_uint16_type_node): ...this.
11674 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11675 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11676
fd4116f4
MLI
116772012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11678
11679 * c-common.c (warn_if_unused_value): Move definition to here.
11680 * c-common.h (warn_if_unused_value): Move declaration to here.
11681
573ac65e
WB
116822012-03-23 William Bader <williambader@hotmail.com>
11683
11684 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11685
552b8185
JM
116862012-03-20 Jason Merrill <jason@redhat.com>
11687
11688 * c-common.h (enum cxx_dialect): Add cxx1y.
11689 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11690 test.
11691 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11692 * c-opts.c (c_common_post_options): Likewise.
11693 (set_std_cxx1y): New.
11694 (c_common_handle_option): Call it.
11695 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11696
04398fa8
PC
116972012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11698
11699 PR c++/14710
11700 * c.opt ([Wuseless-cast]): Add.
11701
d2a12ae7
RG
117022012-03-16 Richard Guenther <rguenther@suse.de>
11703
11704 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11705
a12bf402
MLI
117062012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11707
11708 PR c++/44783
11709 * c.opt (ftemplate-backtrace-limit) Add.
11710
5c30094f
RO
117112012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11712
11713 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11714 handling.
11715 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11716 (init_pragma): Don't register extern_prefix.
11717
21fa2faf
RG
117182012-03-12 Richard Guenther <rguenther@suse.de>
11719
11720 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11721 (builtin_type_for_size): Likewise.
11722
e3793c6f
JJ
117232012-02-13 Jakub Jelinek <jakub@redhat.com>
11724
11725 PR c++/52215
11726 * c-common.c (sync_resolve_params): Don't decide whether to convert
11727 or not based on TYPE_SIZE comparison, convert whenever arg_type
11728 is unsigned INTEGER_TYPE.
11729
93286335
PC
117302012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11731
11732 PR c/52118
11733 * c.opt ([Wunused-local-typedefs]): Fix description.
11734
7a421706
MS
117352012-01-24 Mike Stump <mikestump@comcast.net>
11736
11737 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11738 exactly.
11739
ba9b1f11
RG
117402012-01-18 Richard Guenther <rguenther@suse.de>
11741
11742 * c-opts.c (c_common_post_options): Reset LTO flags if
11743 we are about to generate a PCH.
11744
465406be
PC
117452012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11746
11747 PR c++/51777
11748 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11749 use pp_unsigned_wide_integer.
11750
aee15221
RG
117512012-01-10 Richard Guenther <rguenther@suse.de>
11752
11753 PR middle-end/51806
11754 * c-opts.c (c_common_handle_option): Move -Werror handling
11755 to language independent code.
11756
5720c0dc
RG
117572012-01-05 Richard Guenther <rguenther@suse.de>
11758
11759 PR middle-end/51764
11760 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11761 from common.opt.
11762
73ac190a
PC
117632011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11764
11765 PR c++/51316
11766 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11767 of array types with an unknown bound.
11768
48b0b196
JM
117692011-12-20 Joseph Myers <joseph@codesourcery.com>
11770
11771 * c-common.c (flag_isoc99): Update comment to refer to C11.
11772 (flag_isoc1x): Change to flag_isoc11.
11773 * c-common.h (flag_isoc99): Update comment to refer to C11.
11774 (flag_isoc1x): Change to flag_isoc11.
11775 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11776 C11.
11777 * c-opts.c (set_std_c1x): Change to set_std_c11.
11778 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11779 Call set_std_c11.
11780 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11781 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11782 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11783 standard.
11784 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11785 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11786 (std=gnu1x): Make alias of std=gnu11.
11787
d58d6eb5
JM
117882011-12-19 Jason Merrill <jason@redhat.com>
11789
11790 PR c++/51228
11791 * c-common.c (handle_transparent_union_attribute): Check the first
11792 field if the type is complete.
11793
b3908fcc
JW
117942011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11795
11796 PR libstdc++/51365
11797 * c-common.c (RID_IS_FINAL): Add.
11798 * c-common.h (RID_IS_FINAL): Add.
11799
fea3ca91
IS
118002011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11801
11802 * c.opt (fgnu-runtime): Provide full description.
11803 (fnext-runtime): Likewise.
11804 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11805
62bad7cd
AM
118062011-11-28 Andrew MacLeod <amacleod@redhat.com>
11807
11808 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11809 predefines in one place. Add LOCK_FREE predefines.
11810 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11811 new func.
11812
c466c4ff
AM
118132011-11-24 Andrew MacLeod <amacleod@redhat.com>
11814
11815 PR c/51256
9faeb493 11816 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11817 conditions
9faeb493
UB
11818 (resolve_overloaded_atomic_exchange,
11819 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11820 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11821 error_mark_node for error conditions.
9faeb493 11822
a5952633
RG
118232011-11-08 Richard Guenther <rguenther@suse.de>
11824
11825 PR middle-end/51010
ab20d992 11826 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11827
0a35513e
AH
118282011-11-07 Richard Henderson <rth@redhat.com>
11829 Aldy Hernandez <aldyh@redhat.com>
11830 Torvald Riegel <triegel@redhat.com>
11831
11832 Merged from transactional-memory.
11833
11834 * c-common.c (handle_tm_wrap_attribute,
11835 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11836 (struct c_common_reswords): Added __transaction* keywords.
11837 (struct c_common_attribute_table): Added transaction* and tm_regparm
11838 attributes.
11839 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11840 masks.
11841 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11842 find_tm_attribute): Declare.
11843
6d87092d
JM
118442011-11-07 Jason Merrill <jason@redhat.com>
11845
11846 PR c++/35688
11847 * c-common.c, c-common.h: Revert yesterday's changes.
11848
8e7860a1
JM
118492011-11-06 Jason Merrill <jason@redhat.com>
11850
11851 PR c++/35688
11852 * c-common.c (decl_has_visibility_attr): Split out from...
11853 (c_determine_visibility): ...here.
11854 * c-common.h: Declare it.
11855
d19fa6b5
JM
118562011-11-06 Joseph Myers <joseph@codesourcery.com>
11857
11858 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11859 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11860 type.
11861 (check_user_alignment): New. Split out of
11862 handle_aligned_attribute. Disallow integer constants with
11863 noninteger types. Conditionally allow zero.
11864 (handle_aligned_attribute): Use check_user_alignment.
11865 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11866
86951993
AM
118672011-11-06 Andrew MacLeod <amacleod@redhat.com>
11868 Richard Henderson <rth@redhat.com>
11869
11870 Merged from cxx-mem-model.
11871
11872 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11873 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11874 parameters that are the same type size.
11875 (get_atomic_generic_size): New. Find size of generic
11876 atomic function parameters and do typechecking.
11877 (add_atomic_size_parameter): New. Insert size into parameter list.
11878 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11879 either __atomic_exchange_n or external library call.
9faeb493 11880 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11881 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11882 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11883 __atomic_load_n or an external library call.
11884 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11885 __atomic_store_n or an external library call.
11886 (resolve_overloaded_builtin): Handle new __atomic builtins.
11887
cf9e9959
EB
118882011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11889
11890 PR c++/50608
11891 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11892 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11893 <INDIRECT_REF>: Return the argument.
11894 <ARRAY_REF>: Remove special code for negative offset.
11895 Call fold_build_pointer_plus instead of size_binop.
11896 (fold_offsetof): Remove STOP_REF argument and adjust.
11897 * c-common.h (fold_offsetof_1): Declare.
11898 (fold_offsetof): Remove STOP_REF argument.
11899
25339f10
JM
119002011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11901
11902 PR c++/50810
11903 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11904 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11905 Wnarrowing for C++0x and C++98.
11906 * c.opt ([Wnarrowing]): Update.
11907
89401152
PC
119082011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11909
11910 PR c++/44277
11911 * c.opt: Add Wzero-as-null-pointer-constant.
11912
97e3ad20
JM
119132011-10-31 Jason Merrill <jason@redhat.com>
11914
15694fdd
JM
11915 * c.opt (-fdeduce-init-list): Off by default.
11916
97e3ad20
JM
11917 PR c++/50920
11918 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11919 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11920 and -Wc++11-compat.
11921 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11922
fb9120e3
RAV
119232011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11924
11925 PR c++/30066
11926 * c.opt (fvisibility-inlines-hidden): Description change.
11927
3ce4f9e4
ESR
119282011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11929
11930 Implement C++11 user-defined literals.
11931 * c-common.c (build_userdef_literal): New.
11932 * c-common.def: New tree code.
11933 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11934 * c-lex.c (interpret_float): Add suffix parm.
11935 (c_lex_with_flags): Build literal tokens.
11936
5f53c243
PC
119372011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11938
11939 PR c++/50841
11940 Revert:
11941 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11942
11943 PR c++/50810
11944 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11945 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11946 Wnarrowing for C++0x and C++98.
11947 * c.opt ([Wnarrowing]): Update.
11948
263734e1
PC
119492011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11950
11951 PR c++/50810
11952 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11953 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11954 Wnarrowing for C++0x and C++98.
11955 * c.opt ([Wnarrowing]): Update.
11956
d2e312d7
PC
119572011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11958
11959 PR c++/45385
11960 * c-common.c (conversion_warning): Remove code looking for
11961 artificial operands.
11962
d17687f6
DS
119632011-10-18 Dodji Seketeli <dodji@redhat.com>
11964
11965 PR bootstrap/50760
11966 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11967 !NO_IMPLICIT_EXTERN_C.
d17687f6 11968
fc8396e9
PC
119692011-10-17 Michael Spertus <mike_spertus@symantec.com>
11970
11971 * c-common.c (c_common_reswords): Add __bases,
11972 __direct_bases.
11973 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11974
119752011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11976
11977 PR c++/50757
11978 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11979
847e697a
TT
119802011-10-15 Tom Tromey <tromey@redhat.com>
11981 Dodji Seketeli <dodji@redhat.com>
11982
11983 * c.opt (fdebug-cpp): New option.
11984 * c-opts.c (c_common_handle_option): Handle the option.
11985 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11986 output stream in parameter. Factorized from ...
11987 (maybe_print_line): ... this. Dump location debug information when
11988 -fdebug-cpp is in effect.
11989 (print_line_1): New static function. Takes an output stream in
11990 parameter. Factorized from ...
11991 (print_line): ... here. Dump location information when -fdebug-cpp
11992 is in effect.
11993 (scan_translation_unit): Dump location information when
11994 -fdebug-cpp is in effect.
11995
92582b75
TT
119962011-10-15 Tom Tromey <tromey@redhat.com>
11997 Dodji Seketeli <dodji@redhat.com>
11998
11999 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12000 without argument.
12001 * c-opts.c (c_common_handle_option)<case
12002 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12003 cases. Handle -ftrack-macro-expansion with and without argument.
12004
46427374
TT
120052011-10-15 Tom Tromey <tromey@redhat.com>
12006 Dodji Seketeli <dodji@redhat.com>
12007
12008 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12009 (print_line, cb_define, do_line_change): Adjust to avoid touching
12010 the internals of struct line_map. Use the public API instead.
12011 * c-pch.c (c_common_read_pch): Likewise.
12012 * c-lex.c (fe_file_change): Likewise.
12013
fc8396e9
PC
120142011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12015
12016 PR c++/17212
12017 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12018
120192011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12020
12021 PR c++/33067
12022 * c-pretty-print.c (pp_c_floating_constant): Output
12023 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12024
e79983f4
MM
120252011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12026
12027 * c-common.c (def_builtin_1): Delete old interface with two
12028 parallel arrays to hold standard builtin declarations, and replace
12029 it with a function based interface that can support creating
12030 builtins on the fly in the future. Change all uses, and poison
12031 the old names. Make sure 0 is not a legitimate builtin index.
12032 * c-omp.c (c_finish_omp_barrier): Ditto.
12033 (c_finish_omp_taskwait): Ditto.
12034 (c_finish_omp_flush): Ditto.
12035
6637388f
TG
120362011-10-11 Tristan Gingold <gingold@adacore.com>
12037
12038 * c.opt: (fallow-parameterless-variadic-functions): New.
12039
3797cb21
DS
120402011-09-08 Dodji Seketeli <dodji@redhat.com>
12041
12042 PR c++/33255 - Support -Wunused-local-typedefs warning
12043 * c-common.h (struct c_language_function::local_typedefs): New
12044 field.
9faeb493
UB
12045 (record_locally_defined_typedef, maybe_record_typedef_use)
12046 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12047 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12048 (maybe_record_typedef_use)
12049 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12050 * c.opt: Declare new -Wunused-local-typedefs flag.
12051
693ddb1b
EB
120522011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12053
12054 PR middle-end/50266
12055 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12056 computations.
12057
830c740f
RG
120582011-09-05 Richard Guenther <rguenther@suse.de>
12059
12060 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12061 of integer_minus_one_node for empty array upper bounds.
12062
892a371f
DS
120632011-08-28 Dodji Seketeli <dodji@redhat.com>
12064
12065 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12066 it's the first time it's being called on this main TU.
12067
0e3fdb48
RB
120682011-08-24 Richard Guenther <rguenther@suse.de>
12069
12070 PR c/49396
12071 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12072
120732011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12074
12075 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12076 defined in cpp_init_builtins and c_cpp_builtins.
12077
d4a83c10
JM
120782011-08-19 Joseph Myers <joseph@codesourcery.com>
12079
12080 * c-common.c (c_common_reswords): Add __builtin_complex.
12081 * c-common.h (RID_BUILTIN_COMPLEX): New.
12082
bbceee64
JM
120832011-08-18 Joseph Myers <joseph@codesourcery.com>
12084
12085 * c-common.c (c_common_reswords): Add _Noreturn.
12086 (keyword_is_function_specifier): Handle RID_NORETURN.
12087 * c-common.h (RID_NORETURN): New.
12088
3f8257db 120892011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12090
12091 * c-common.c (unsafe_conversion_p): New function. Check if it is
12092 unsafe to convert an expression to the type.
12093 (conversion_warning): Adjust, use unsafe_conversion_p.
12094 * c-common.h (unsafe_conversion_p): New function declaration.
12095
20906c66
JJ
120962011-08-02 Jakub Jelinek <jakub@redhat.com>
12097
12098 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12099 (c_finish_omp_taskyield): New prototype.
12100 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12101 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12102 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12103 or RHS1 have side-effects, evaluate those too in the right spot,
12104 if it is a decl and LHS is also a decl, error out if they
12105 aren't the same.
12106 (c_finish_omp_taskyield): New function.
12107 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12108 * c-pragma.c (omp_pragmas): Add taskyield.
12109 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12110 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12111 PRAGMA_OMP_CLAUSE_MERGEABLE.
12112
770e5a2e
DS
121132011-07-25 Dodji Seketeli <dodji@redhat.com>
12114
12115 * c-common.h (set_underlying_type): Remove parm name from
12116 declaration.
12117
1baae426
RG
121182011-07-25 Romain Geissler <romain.geissler@gmail.com>
12119
12120 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12121
fcb21722
JM
121222011-07-22 Jason Merrill <jason@redhat.com>
12123
76f86d00
JM
12124 PR c++/49793
12125 * c.opt (Wnarrowing): New.
12126
3a636414
JM
12127 PR c++/30112
12128 * c-common.h: Declare c_linkage_bindings.
12129 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12130
fcb21722
JM
12131 PR c++/49813
12132 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12133 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12134 as flag_isoc99 for 'restrict'.
12135 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12136
02614448
ILT
121372011-07-21 Ian Lance Taylor <iant@google.com>
12138
12139 PR middle-end/49705
12140 * c-common.c (c_disable_warnings): New static function.
12141 (c_enable_warnings): New static function.
12142 (c_fully_fold_internal): Change local unused_p to bool. Call
12143 c_disable_warnings and c_enable_warnings rather than change
12144 c_inhibit_evaluation_warnings.
12145
34429675
JM
121462011-07-20 Jason Merrill <jason@redhat.com>
12147
12148 PR c++/6709 (DR 743)
12149 PR c++/42603 (DR 950)
12150 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12151 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12152 (CPP_DECLTYPE): New.
12153 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12154
5d49b6a7
RG
121552011-07-19 Richard Guenther <rguenther@suse.de>
12156
12157 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12158 * c-omp.c (c_finish_omp_for): Likewise.
12159
e84a58ff
EB
121602011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12161
12162 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12163 body on the next line.
12164
329af3c7
JM
121652011-07-08 Jason Merrill <jason@redhat.com>
12166
4063e61b
JM
12167 PR c++/45437
12168 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12169
329af3c7
JM
12170 PR c++/49673
12171 * c-common.c (c_apply_type_quals_to_decl): Don't check
12172 TYPE_NEEDS_CONSTRUCTING.
12173
1a072294
RG
121742011-07-06 Richard Guenther <rguenther@suse.de>
12175
12176 * c-common.c (c_common_nodes_and_builtins):
12177 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12178
fce5dddd
RG
121792011-07-05 Richard Guenther <rguenther@suse.de>
12180
12181 * c-common.c (c_common_nodes_and_builtins): Build all common
12182 tree nodes first.
12183
45d439ac
JJ
121842011-06-27 Jakub Jelinek <jakub@redhat.com>
12185
56300785
JJ
12186 * c-common.h (c_tree_chain_next): New static inline function.
12187
45d439ac
JJ
12188 * c-common.c (check_builtin_function_arguments): Handle
12189 BUILT_IN_ASSUME_ALIGNED.
12190
e0a8ecf2
AM
121912011-06-21 Andrew MacLeod <amacleod@redhat.com>
12192
12193 * c-common.c: Add sync_ or SYNC__ to builtin names.
12194 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12195
121962011-06-20 Pierre Vittet <piervit@pvittet.com>
12197
12198 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12199 handler.
12200 (gen_pragma_handler): New union.
12201 (internal_pragma_handler): New type.
12202 (c_register_pragma_with_data)
12203 (c_register_pragma_with_expansion_and_data): New functions.
12204
12205 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12206 (c_register_pragma, c_register_pragma_with_expansion)
12207 (c_invoke_pragma_handler): Changed to work with
12208 internal_pragma_handler.
12209 (c_register_pragma_with_data)
12210 (c_register_pragma_with_expansion_and_data): New functions.
12211
677f3fa8
JM
122122011-06-14 Joseph Myers <joseph@codesourcery.com>
12213
12214 * c-common.c: Include common/common-target.h.
12215 (handle_section_attribute): Use
12216 targetm_common.have_named_sections.
12217 * c-cppbuiltin.c: Include common/common-target.h.
12218 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12219
d7fc8c14
RG
122202011-06-10 Richard Guenther <rguenther@suse.de>
12221
12222 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12223 to print a IDENTIFIER_NODE.
12224
10e48e39
RO
122252011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12226 Joseph Myers <joseph@codesourcery.com>
12227
12228 * c.opt (fbuilding-libgcc): New option.
12229 * c-cppbuiltin.c (c_cpp_builtins): Define
12230 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12231
6976ae51
JM
122322011-06-07 Jason Merrill <jason@redhat.com>
12233
3ff60975
JM
12234 * c-common.c (max_tinst_depth): Lower default to 900.
12235
6976ae51
JM
12236 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12237
009db074
RG
122382011-06-07 Richard Guenther <rguenther@suse.de>
12239
12240 * c-common.c (c_common_nodes_and_builtins): Do not set
12241 size_type_node or call set_sizetype.
12242
b4592b92
DS
122432011-06-07 Dodji Seketeli <dodji@redhat.com>
12244
12245 PR debug/49130
12246 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12247 type when using pointer comparison to compare types.
b4592b92 12248
014ab419
JW
122492011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12250
12251 * c.opt: Add -Wdelete-non-virtual-dtor.
12252 * c-opts.c (c_common_handle_option): Include it in -Wall.
12253
4f60111f
NF
122542011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12255
12256 PR bootstrap/49190
12257
12258 Revert:
12259 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12260
12261 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12262 not tree_common.
12263
4cc4f2f4
JJ
122642011-05-27 Jakub Jelinek <jakub@redhat.com>
12265
12266 PR c++/49165
12267 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12268 C++ don't call c_common_truthvalue_conversion on void type arms.
12269
38e01f9e
NF
122702011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12271
12272 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12273 (stmt_list_stack): Define.
12274 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12275 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12276
92e948a8
NF
122772011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12278
12279 * c-common.c (warning_candidate_p): Check for BLOCKs.
12280
a2fc3e63
NF
122812011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12282
12283 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12284 not tree_common.
12285
0957c029
JJ
122862011-05-25 Jakub Jelinek <jakub@redhat.com>
12287
12288 * c-common.c (def_fn_type): Remove extra va_end.
12289
828fb3ba
JM
122902011-05-23 Jason Merrill <jason@redhat.com>
12291
12292 PR c++/48106
12293 * c-common.c (c_common_get_narrower): New.
12294 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12295
dde05067
NF
122962011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12297
12298 * c-common.h (check_function_arguments): Tweak prototype of
12299 check_function_arguments.
12300 * c-common.c (check_function_arguments): Likewise. Adjust
12301 calls to check_function_nonnull, check_function_format, and
12302 check_function_sentinel.
12303 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12304 separate attributes and typelist arguments. Use
12305 FOREACH_FUNCTION_ARGS to iterate over argument types.
12306
3c0d13bf
PC
123072011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12308
12309 * c-common.c (c_common_reswords): Reorder.
12310 * c-common.h (rid): Likewise.
12311
8242dd04
NF
123122011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12313
12314 * c-common.c (def_fn_type): Don't call build_function_type, call
12315 build_function_type_array or build_varargs_function_type_array
12316 instead.
12317 (c_common_nodes_and_builtins): Likewise.
12318
3d528853
NF
123192011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12320
12321 * c-common.c (c_add_case_label): Omit the loc argument to
12322 build_case_label.
12323 * c-common.h (build_case_label): Remove.
12324 * c-semantics.c (build_case_label): Remove.
12325
a04a722b
JM
123262011-05-05 Joseph Myers <joseph@codesourcery.com>
12327
12328 * c-objc.h (objc_start_method_definition): Update prototype.
12329 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12330
e19a18d4
NF
123312011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12332
12333 * c-common.c (check_main_parameter_types): Reindent. Don't use
12334 TYPE_ARG_TYPES directly.
12335 (handle_nonnull_attribute): Likewise.
12336 (sync_resolve_params): Likewise.
12337 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12338 to check_format_string.
12339 (handle_format_attribute): Likewise.
12340 (check_format_string): Take a function type to examine instead of
12341 a type list. Use a function_arg_iterator to step through argument
12342 types.
12343
c62c040f
RG
123442011-05-04 Richard Guenther <rguenther@suse.de>
12345
12346 * c-common.c (fix_string_type): Use size_int for index type bounds.
12347 (start_fname_decls): Do not pass NULL to build_int_cst.
12348 (c_init_attributes): Likewise.
12349 * c-lex.c (c_lex_with_flags): Likewise.
12350
c12ff9d8
JM
123512011-04-27 Jason Merrill <jason@redhat.com>
12352
12353 * c-common.c (make_tree_vector_from_list): New.
12354 * c-common.h: Declare it.
12355
304dfbe3
RG
123562011-04-26 Richard Guenther <rguenther@suse.de>
12357
12358 PR preprocessor/48248
12359 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12360 for output size with -P.
12361
3c0d13bf
PC
123622011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12363
12364 * c-common.c (struct c_common_resword): Add __underlying_type.
12365 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12366
04695783
JM
123672011-04-20 Jim Meyering <meyering@redhat.com>
12368
12369 * c-format.c (init_dollar_format_checking): Remove useless
12370 if-before-free.
12371
0dc33c3c
NP
123722011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12373
12374 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12375 (objc_detect_field_duplicates): New.
0dc33c3c 12376 * stub-objc.c: Likewise.
3c0d13bf 12377
c59633d9
NP
123782011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12379
12380 * stub-objc.c (objc_declare_protocols): Renamed to
12381 objc_declare_protocol.
12382 * c-objc.h: Likewise.
3c0d13bf 12383
32dabdaf
NP
123842011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12385
12386 * stub-objc.c (objc_declare_class): Updated argument name.
12387
81f653d6
NF
123882011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12389
12390 * c-common.h (c_common_init_ts): Declare.
12391 * c-common.c (c_common_init_ts): Define.
12392
eb345401
NP
123932011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12394
12395 * c-objc.h (objc_build_message_expr): Updated prototype.
12396 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12397
a358e188
MJ
123982011-04-12 Martin Jambor <mjambor@suse.cz>
12399
12400 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12401 of cgraph_node.
12402
e6313a78
RG
124032011-04-11 Richard Guenther <rguenther@suse.de>
12404
12405 * c-common.c (complete_array_type): Build a range type of
12406 proper type.
12407
dcf0c47e
NF
124082011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12409
12410 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12411 (handle_type_generic_attribute): Likewise.
12412
1ee44b26
JM
124132011-04-07 Jason Merrill <jason@redhat.com>
12414
12415 PR c++/48450
12416 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12417 conversion from C++0x scoped enum.
12418
acce4e77
JM
124192011-04-06 Joseph Myers <joseph@codesourcery.com>
12420
12421 * c-target-def.h: New file.
12422 * c-target.def: New file.
12423 * c-target.h: New file.
12424 * c-common.c (targetcm): Don't define here.
12425 * c-common.h (default_handle_c_option): Declare.
12426 * c-format.c: Include c-target.h instead of target.h.
12427 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12428 include tm.h.
12429 (default_handle_c_option): Move from targhooks.c.
12430
e2eefb55
JJ
124312011-03-29 Jakub Jelinek <jakub@redhat.com>
12432
12433 PR preprocessor/48248
12434 * c-ppoutput.c (print): Add src_file field.
12435 (init_pp_output): Initialize it.
12436 (maybe_print_line): Don't optimize by adding up to 8 newlines
12437 if map->to_file and print.src_file are different file.
12438 (print_line): Update print.src_file.
12439
ba78087b
KT
124402011-03-25 Kai Tietz <ktietz@redhat.com>
12441
12442 * c-ada-spec.c (compare_comment): Use filename_cmp
12443 instead of strcmp for filename.
12444
0edf1bb2
JL
124452011-03-25 Jeff Law <law@redhat.com>
12446
adfac8df 12447 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12448
c7dc8804
JM
124492011-03-25 Jason Merrill <jason@redhat.com>
12450
12451 * c.opt: Add -std=c++03.
12452
d1d879b1
EB
124532011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12454
12455 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12456
3f8257db 124572011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12458
12459 PR target/12171
5050afdf
KT
12460 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12461 Display allowed attributes for function pointer types.
12462 (pp_c_attributes_display): New function to display
12463 attributes having affects_type_identity flag set to true.
12464 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12465
62d784f7
KT
12466 * c-common.c (c_common_attribute_table):
12467 Add new element.
12468 (c_common_format_attribute_table): Likewise.
12469
82d37118
JM
124702011-03-18 Jason Merrill <jason@redhat.com>
12471
49a000c3
JM
12472 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12473 * c-common.h: Don't declare it here.
12474 * c-common.c: Or define it here.
12475 * c-opts.c (c_common_handle_option): Or set it here.
12476
82d37118
JM
12477 PR c++/35315
12478 * c-common.c (handle_transparent_union_attribute): Don't
12479 make a duplicate type in C++.
12480
17bc631c
JM
124812011-03-15 Jason Merrill <jason@redhat.com>
12482
12483 * c-common.c (max_constexpr_depth): New.
12484 * c-common.h: Declare it.
12485 * c-opts.c (c_common_handle_option): Set it.
12486 * c.opt (fconstexpr-depth): New option.
12487
1b9b91a6
JM
124882011-03-11 Jason Merrill <jason@redhat.com>
12489
f231b5ff
JM
12490 * c-common.c (attribute_takes_identifier_p): Add missing const.
12491
1b9b91a6
JM
12492 PR c++/46803
12493 * c-common.c (attribute_takes_identifier_p): Assume that an
12494 unknown attribute takes an identifier.
12495
a19e4d44
NF
124962011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12497
12498 PR c/47786
12499 * c-common.c (c_type_hash): Call list_length instead of iterating
12500 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12501
982d62f6
JJ
125022011-02-19 Jakub Jelinek <jakub@redhat.com>
12503
12504 PR c/47809
12505 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12506
0a256240
NP
125072011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12508
12509 * c.opt (fobjc-abi-version=) New.
12510 (fobjc-nilcheck): New.
12511
ba9e6dd5
NF
125122011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12513
12514 PR c++/46890
12515 * c-common.h (keyword_is_decl_specifier): Declare.
12516 * c-common.c (keyword_is_decl_specifier): Define.
12517 (keyword_is_function_specifier): New function.
12518
7273813a
JJ
125192011-01-26 Jakub Jelinek <jakub@redhat.com>
12520
12521 PR c/47473
12522 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12523 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12524 REAL_TYPE.
12525
908ef79b
AC
125262011-01-26 Arnaud Charlet <charlet@adacore.com>
12527
12528 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12529
237e9384
JJ
125302011-01-26 Jakub Jelinek <jakub@redhat.com>
12531
12532 PR pch/47430
12533 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12534 after init_c_lex if pch_file is set.
12535
47ea1edf
DK
125362011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12537
d4dba752 12538 PR c++/43601
47ea1edf
DK
12539 * c.opt (-fkeep-inline-dllexport): New switch.
12540
2aa9c6ae
RG
125412011-01-12 Richard Guenther <rguenther@suse.de>
12542
12543 PR middle-end/32511
12544 * c-common.c (handle_weak_attribute): Warn instead of error
12545 on declaring an inline function weak.
12546
7bd11157
TT
125472011-01-05 Tom Tromey <tromey@redhat.com>
12548
12549 * c-common.h (lvalue_error): Update.
12550 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12551 not error.
12552
0e66e494 125532010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12554
b4f588c4
NP
12555 PR objc/47075
12556 * c-objc.h (objc_finish_message_expr): Added argument to
12557 prototype.
12558
f4da8dce
NF
125592010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12560
12561 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12562 Use prototype_p.
12563
46270f14
NP
125642010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12565
12566 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12567 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12568
4816c593
NF
125692010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12570
12571 * c-common.h (readonly_error): Declare.
12572 * c-common.c (readonly_error): Define.
12573
7a6daeb0
NF
125742010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12575
12576 * c-common.h (invalid_indirection_error): Declare.
12577 * c-common.c (invalid_indirection_error): Define.
12578
892f6119
RG
125792010-12-03 Richard Guenther <rguenther@suse.de>
12580
12581 PR c/46745
12582 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12583 (pp_c_unary_expression): Likewise.
12584 (pp_c_expression): Likewise.
12585
6c39e757
NP
125862010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12587
12588 * c-common.h (objc_finish_function): New.
12589 (objc_non_volatilized_type): Removed.
12590 (objc_type_quals_match): Removed.
12591 * stub-objc.c (objc_finish_function): New.
12592 (objc_non_volatilized_type): Removed.
12593 (objc_type_quals_match): Removed.
9faeb493 12594
7c475d11
JM
125952010-11-30 Joseph Myers <joseph@codesourcery.com>
12596
12597 * c-common.h (parse_optimize_options): Declare.
12598 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12599 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12600
71f3e391
JM
126012010-11-29 Joseph Myers <joseph@codesourcery.com>
12602
12603 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12604 GET_ENVIRONMENT.
12605 * c-pch.c (O_BINARY): Don't define here.
12606 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12607
d5fabb58
JM
126082010-11-25 Joseph Myers <joseph@codesourcery.com>
12609
12610 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12611 targetm.except_unwind_info.
12612
299404a1
JM
126132010-11-23 Joseph Myers <joseph@codesourcery.com>
12614
12615 * c-opts.c (c_common_handle_option): Pass location to
12616 set_struct_debug_option.
12617
c98cd5bf
JM
126182010-11-23 Joseph Myers <joseph@codesourcery.com>
12619
12620 * c-common.c (visibility_options): Move from ../opts.c.
12621 * c-common.h (struct visibility_flags, visibility_options):
12622 Declare here.
12623 * c-opts.c (finish_options): Rename to c_finish_options.
12624 (c_common_init): Update call to finish_options.
12625
a9546771
NP
126262010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12627
12628 PR objc/34033
12629 * c-lex.c (lex_string): Check that each string in an Objective-C
12630 string concat sequence starts with either one or zero '@', and
12631 that there are no spurious '@' signs at the end.
12632
24a57808
JM
126332010-11-20 Joseph Myers <joseph@codesourcery.com>
12634
12635 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12636 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12637 HANDLE_PRAGMA_VISIBILITY.
12638 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12639 HANDLE_PRAGMA_VISIBILITY): Don't define.
12640 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12641
a9aa2c3a
NF
126422010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12643
12644 PR c++/16189
12645 PR c++/36888
12646 PR c++/45331
12647 * c-common.h (keyword_begins_type_specifier): Declare.
12648 (keyword_is_storage_class_specifier): Declare.
12649 (keyword_is_type_qualifier): Declare.
12650 * c-common.c (keyword_begins_type_specifier): New function.
12651 (keyword_is_storage_class_specifier): New function.
12652 (keyword_is_type_qualifier): Declare.
12653
5386338c
JM
126542010-11-19 Joseph Myers <joseph@codesourcery.com>
12655
12656 PR c/46547
12657 * c-common.c (in_late_binary_op): Define.
12658 (c_common_truthvalue_conversion): Check in_late_binary_op before
12659 calling c_save_expr.
12660 * c-common.h (in_late_binary_op): Declare.
12661
69ccdddb
JM
126622010-11-19 Joseph Myers <joseph@codesourcery.com>
12663
12664 * c-opts.c (c_common_handle_option): Update calls to
12665 set_struct_debug_option.
12666
6b192a09
NP
126672010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12668
12669 * c-common.h (objc_declare_protocols): Added additional argument.
12670 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12671
fb52b50a
NF
126722010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12673
12674 PR c/33193
12675 * c-common.h (build_real_imag_expr): Declare.
12676 * c-semantics.c (build_real_imag_expr): Define.
12677
b37421c6
JM
126782010-11-17 Joseph Myers <joseph@codesourcery.com>
12679
12680 * c-opts.c (c_common_parse_file): Take no arguments.
12681 * c-common.h (c_common_parse_file): Update prototype.
12682
07078664
JJ
126832010-11-16 Jakub Jelinek <jakub@redhat.com>
12684
12685 PR c++/46401
12686 * c-common.c (warning_candidate_p): Don't track non-const calls
12687 or STRING_CSTs.
12688
c6a13190
ILT
126892010-11-15 Ian Lance Taylor <iant@google.com>
12690
12691 * c-lex.c (init_c_lex): Set macro debug callbacks if
12692 flag_dump_go_spec is set.
12693
925e8657
NP
126942010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12695
12696 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12697 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12698
bb0a9581
NF
126992010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12700
12701 PR preprocessor/45038
12702 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12703 dialects.
12704
c5fa0890
JM
127052010-11-12 Joseph Myers <joseph@codesourcery.com>
12706
12707 * c-common.h (c_family_lang_mask): Declare.
12708 * c-opts.c (c_family_lang_mask): Make extern.
12709 * c-pragma.c (handle_pragma_diagnostic): Use
12710 control_warning_option.
12711
a4d8c676
JM
127122010-11-12 Joseph Myers <joseph@codesourcery.com>
12713
12714 * c-common.c (parse_optimize_options): Update call to
12715 decode_options.
12716 * c-common.h (c_common_handle_option): Update prototype.
12717 * c-opts.c (c_common_handle_option): Take location_t parameter and
12718 pass it to other functions.
12719
f954bd2c
JM
127202010-11-11 Joseph Myers <joseph@codesourcery.com>
12721
12722 * c-opts.c (warning_as_error_callback): Remove.
12723 (c_common_initialize_diagnostics): Don't call
12724 register_warning_as_error_callback.
12725 (c_common_handle_option): Handle -Werror=normalized= here.
12726
d8a07487
JM
127272010-11-10 Joseph Myers <joseph@codesourcery.com>
12728
12729 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12730 in diagnostic.
12731 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12732 letter.
12733 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12734 Remove trailing '.' from diagnostics.
12735 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12736
d5478783
JM
127372010-11-10 Joseph Myers <joseph@codesourcery.com>
12738
12739 * c-common.c (parse_optimize_options): Pass global_dc to
12740 decode_options.
12741 * c-opts.c (c_common_handle_option): Pass &global_options to
12742 set_Wstrict_aliasing.
12743 * c.opt (v): Don't mark Common or document here.
12744
91ebb981
IS
127452010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12746
12747 PR target/44981
12748 * c-format.c (format_type): New type gcc_objc_string_format_type.
12749 (valid_stringptr_type_p): New.
12750 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12751 (check_format_string): Pass expected type, use
91ebb981
IS
12752 valid_stringptr_type_p (), check that the format string types are
12753 consistent with the format specification.
12754 (decode_format_attr): Warn if NSString is used outside objective-c.
12755 (format_types_orig): Add NSString.
12756 (format_name): New.
12757 (format_flags): New.
12758 (check_format_arg): Handle format strings requiring an external parser.
12759 first_target_format_type: New variable.
12760 (handle_format_attribute): Set up first_target_format_type, pass the
12761 expected format arg string type to check_format_string().
ab20d992 12762 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12763 * stub-objc.c (objc_string_ref_type_p): New.
12764 (objc_check_format_arg): New.
12765
bede2adc
NP
127662010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12767
9faeb493 12768 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12769 * c-common.h (objc_build_class_component_ref): New.
12770 * stub-objc.c (objc_build_class_component_ref): New.
12771
9a179d01
NP
127722010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12773
12774 * c.opt (Wproperty-assign-default): New option.
12775
22d8d616
NP
127762010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12777
12778 Implemented -fobjc-std=objc1 flag.
12779 * c.opt (fobjc-std=objc1): New option.
12780
2debdb4f
NP
127812010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12782
12783 Implemented format and noreturn attributes for Objective-C methods.
12784 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12785 attribute for Objective-C methods.
12786
ec52b111
JM
127872010-10-31 Jason Merrill <jason@redhat.com>
12788
12789 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12790 EXPR_LOC_OR_HERE.
12791
46a88c12
NP
127922010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12793
12794 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12795 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12796 (objc_add_property_declaration): Removed arguments for copies and
12797 ivar.
12798 (objc_build_getter_call): Renamed to
12799 objc_maybe_build_component_ref.
12800 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12801 (objc_is_property_ref): New.
12802 * c-common.c (c_common_reswords): Removed copies and ivar.
12803 * stub-objc.c (objc_add_property_declaration): Removed arguments
12804 for copies and ivar.
12805 (objc_build_getter_call): Renamed to
12806 objc_maybe_build_component_ref.
12807 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12808 (objc_is_property_ref): New.
9faeb493 12809
1e4bf85b
AC
128102010-10-29 Arnaud Charlet <charlet@adacore.com>
12811 Matthew Gingell <gingell@adacore.com>
12812
12813 * c-ada-spec.c (separate_class_package): New function.
12814 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12815 name of their enclosing package.
12816 (print_ada_declaration): Use separate_class_package.
12817
81f0bab2
JM
128182010-10-27 Jason Merrill <jason@redhat.com>
12819
2b08f2c5
JM
12820 * c-common.c (c_common_reswords): Add __is_literal_type.
12821 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12822
81f0bab2
JM
12823 * c-common.c (check_case_value): Remove special C++ code.
12824
200290f2
NP
128252010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12826
12827 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12828 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12829 and RID_LAST_PATTR.
12830 (objc_add_property_declaration): Added additional arguments.
12831 (objc_property_attribute_kind): Removed.
12832 (objc_set_property_attr): Removed.
12833 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12834 copy and nonatomic.
12835 * stub-objc.c (objc_add_property_declaration): Added additional
12836 arguments.
12837 (objc_set_property_attr): Removed.
9faeb493 12838
f614132b
NP
128392010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12840
12841 * c-common.h (objc_add_property_variable): Renamed to
12842 objc_add_property_declaration. Added location argument.
12843 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12844
b8a18805
NP
128452010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12846
12847 * c-common.h (objc_maybe_printable_name): New.
12848 * stub-objc.c (objc_maybe_printable_name): New.
12849
3f8257db
JJ
128502010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12851 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12852
12853 * c-common.h (c_common_mark_addressable_vec): Declare.
12854 * c-common.c (c_common_mark_addressable_vec): New function.
12855
249a82c4
NP
128562010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12857
12858 * c-common.h (objc_set_method_type): Removed.
12859 (objc_add_method_declaration): Added boolean argument.
12860 (objc_start_method_definition): Same change.
12861 (objc_build_method_signature): Same change.
12862 * stub-objc.c (objc_set_method_type): Removed.
12863 (objc_add_method_declaration): Added boolean argument.
12864 (objc_start_method_definition): Same change.
12865 (objc_build_method_signature): Same change.
12866
977e30bc
NP
128672010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12868
12869 * c-common.h (finish_file): Removed.
12870 (objc_write_global_declarations): New.
12871 * c-opts.c (c_common_parse_file): Do not call finish_file.
12872 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12873
da57d1b9
NP
128742010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12875
12876 Implemented parsing @synthesize and @dynamic for
12877 Objective-C/Objective-C++.
12878 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12879 (objc_add_synthesize_declaration): New.
12880 (objc_add_dynamic_declaration): New.
12881 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12882 * stub-objc.c (objc_add_synthesize_declaration): New.
12883 (objc_add_dynamic_declaration): New.
9faeb493 12884
0069111f
MM
128852010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12886
12887 PR target/46041
12888 * c-cppbuiltin.c (mode_has_fma): Move function here from
12889 builtins.c. Don't use the fma optab, instead just use the
12890 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12891 using -save-temps.
12892
e426b47b
NP
128932010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12894
12895 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12896
3f8257db 12897 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12898
9faeb493 12899 Radar 4330422
e426b47b
NP
12900 * c-common.h (objc_non_volatilized_type): New declaration
12901 * stub-objc.c (objc_non_volatilized_type): New stub.
12902
90fbfdc3
NP
129032010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12904
e426b47b 12905 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12906
ab20d992 12907 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12908
9faeb493 12909 Radar 4133425
90fbfdc3 12910 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12911 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12912
c37d8c30
IS
129132010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12914
12915 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12916 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12917 (objc_ivar_visibility_kind): New enum.
12918 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12919 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12920 visibility enum.
12921
1b1562a5
MM
129222010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12923
12924 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12925 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12926 has the appropriate fma builtins.
12927 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12928
668ea4b1
IS
129292010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12930
1b1562a5 12931 merge from FSF apple 'trunk' branch.
3f8257db 12932 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12933
668ea4b1
IS
12934 Radars 4436866, 4505126, 4506903, 4517826
12935 * c-common.c (c_common_resword): Define @property and its attributes.
12936 * c-common.h: Define property attribute enum entries.
12937 (OBJC_IS_PATTR_KEYWORD): New.
12938 (objc_property_attribute_kind): New enum.
12939 Declare objc_set_property_attr (), objc_add_property_variable (),
12940 objc_build_getter_call () and objc_build_setter_call ().
12941 * stub-objc.c (objc_set_property_attr): New stub.
12942 (objc_add_property_variable): Likewise.
12943 (objc_build_getter_call): Likewise.
12944 (objc_build_setter_call) Likewise.
1b1562a5 12945
a1178b30
IS
129462010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12947
1b1562a5 12948 merge from FSF apple 'trunk' branch.
ab20d992 12949 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12950
12951 Radar 3803157 (method attributes)
12952 * c-common.c (handle_deprecated_attribute): Recognize
12953 objc methods as valid declarations.
12954 * c-common.h: Declare objc_method_decl ().
1b1562a5 12955 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12956
a75bfaa6
JM
129572010-10-08 Joseph Myers <joseph@codesourcery.com>
12958
12959 * c-common.c (parse_optimize_options): Call
12960 decode_cmdline_options_to_array_default_mask before
12961 decode_options. Update arguments to decode_options.
12962 * c-common.h (c_common_init_options_struct): Declare.
12963 * c-opts.c (c_common_init_options_struct): New. Split out from
12964 c_common_init_options.
12965
f05b9d93
NP
129662010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12967
12968 Implemented fast enumeration for Objective-C.
12969 * c-common.h (objc_finish_foreach_loop): New.
12970 * stub-objc.c (objc_finish_foreach_loop): New.
12971
1ebe4b4f
JM
129722010-10-05 Joseph Myers <joseph@codesourcery.com>
12973
12974 * c-common.h (struct diagnostic_context): Don't declare here.
12975 (c_common_initialize_diagnostics): Declare using
12976 diagnostic_context typedef.
12977 * c-opts.c (c_common_handle_option): Pass global_dc to
12978 handle_generated_option.
12979
d4d24ba4
JM
129802010-10-04 Joseph Myers <joseph@codesourcery.com>
12981
12982 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12983 handle_generated_option.
12984
478a1c5b
ILT
129852010-10-03 Ian Lance Taylor <iant@google.com>
12986
12987 * c.opt (-fplan9-extensions): New option.
12988
82a1c2fe
FXC
129892010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12990
12991 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12992 Remove.
12993 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12994 of duplicating code.
12995
92902b1b
IS
129962010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12997
12998 * c-common.c: Add two new entries for @optional
12999 and @required keywords.
13000
13001 merge from FSF 'apple/trunk' branch.
3f8257db 13002 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13003
13004 Radar 4386773
13005 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13006 objective-c keywords.
13007 (objc_set_method_opt): New declaration.
13008 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13009
46625112
JM
130102010-09-30 Joseph Myers <joseph@codesourcery.com>
13011
13012 * c-common.c (handle_optimize_attribute): Pass &global_options to
13013 cl_optimization_save and cl_optimization_restore.
13014 * c-opts.c (c_common_handle_option): Pass &global_options to
13015 handle_generated_option.
13016 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13017 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13018 &global_options to cl_optimization_restore.
13019
49b91f05
NP
130202010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13021
13022 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13023 Objective-C/Objective-C++ keywords.
13024
13ed556f 130252010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13026
9faeb493
UB
13027 Merge from 'apple/trunk' branch on FSF servers.
13028
3f8257db 13029 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13030
13031 Radar 4281748
13032 * c-common.h (objc_check_global_decl): New declaration.
13033 * stub-objc.c (objc_check_global_decl): New stub.
13034
f0036cca
JM
130352010-09-29 Joseph Myers <joseph@codesourcery.com>
13036
13037 * c.opt: Don't use VarExists.
13038
e3339d0f
JM
130392010-09-29 Joseph Myers <joseph@codesourcery.com>
13040
13041 * c-common.c (c_cpp_error): Update names of diagnostic_context
13042 members.
13043 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13044 cl_optimization members.
13045 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13046 sanitize_cpp_opts, finish_options): Update names of cpp_options
13047 members.
13048
1973201f
NP
130492010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13050
13051 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13052 (objc_is_reserved_word): Removed.
13053 * c-common.c: Updated comments.
13054 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13055 objc_is_reserved_word.
13056 * stub-objc.c (objc_is_reserved_word): Removed.
13057
f7e71da5
IS
130582010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13059
9faeb493 13060 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13061 include attributes.
13062 (objc_start_method_definition): Likewise.
13063 (objc_build_keyword_decl): Likewise.
13064 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13065 (objc_start_method_definition): Likewise.
13066 (objc_build_keyword_decl): Likewise.
13067
c165dca7
IS
130682010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13069
13070 * c-common.h (objc_start_class_interface): Adjust prototype.
13071 (objc_start_category_interface): Likewise.
13072 (objc_start_protocol): Likewise.
13073 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13074 (objc_start_class_interface): Likewise.
13075 (objc_start_category_interface): Likewise.
13076
7458026b
ILT
130772010-09-27 Ian Lance Taylor <iant@google.com>
13078
13079 * c-common.c (c_common_attribute_table): Add no_split_stack.
13080 (handle_no_split_stack_attribute): New static function.
13081
b581b85b
NP
130822010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13083
9faeb493 13084 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13085
3f8257db 13086 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13087
9faeb493 13088 Radar 4229905
b581b85b
NP
13089 * c-common.h (objc_have_common_type): New declaration.
13090 * stub-objc.c (objc_have_common_type): New stub.
13091
13092 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13093
13094 Radar 4154928
13095 * c-common.h (objc_common_type): New prototype.
9faeb493 13096 * stub-objc.c (objc_common_type): New stub.
b581b85b 13097
46a4da10
JH
130982010-09-24 Jan Hubicka <jh@suse.cz>
13099
13100 * c-common.c (handle_leaf_attribute): New function.
13101 (struct attribute_spec c_common_att): Add leaf.
13102
e200444e
JM
131032010-09-22 Joseph Myers <joseph@codesourcery.com>
13104
13105 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13106 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13107 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13108 -include-barrier, -include-directory, -include-directory=,
13109 -include-directory-after, -include-directory-after=,
13110 -include-prefix, -include-prefix=, -include-with-prefix,
13111 -include-with-prefix=, -include-with-prefix-after,
13112 -include-with-prefix-after=, -include-with-prefix-before,
13113 -include-with-prefix-before=, -no-integrated-cpp,
13114 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13115 -output=, -pedantic, -pedantic-errors, -preprocess,
13116 -print-missing-file-dependencies, -trace-includes, -traditional,
13117 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13118 -user-dependencies, -verbose, -write-dependencies,
13119 -write-user-dependencies, no-integrated-cpp, traditional): New.
13120
29a80ea6
NP
131212010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13122
13123 PR objc/23710
ac1fc2fc
NP
13124 * c-common.h (objc_start_method_definition): Return bool instead
13125 of void.
13126 * stub-objc.c (objc_start_method_definition): Return bool instead
13127 of void.
13128
131292010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13130
13131 PR objc/25965
13132 * c-common.h (objc_get_interface_ivars): New declaration.
13133 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13134
de621752
ILT
131352010-09-15 Ian Lance Taylor <iant@google.com>
13136
13137 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13138 messages. Remove period at end of warning message.
de621752 13139
ba885ec5
NS
131402010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13141
13142 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13143 (handle_alias_attribute): ... here.
13144 (handle_ifunc_attribute): New.
13145
c5ee1358
MM
131462010-09-06 Mark Mitchell <mark@codesourcery.com>
13147
13148 * c-common.h (do_warn_double_promotion): Declare.
13149 * c-common.c (do_warn_double_promotion): Define.
13150
0a0b3574
MM
131512010-09-05 Mark Mitchell <mark@codesourcery.com>
13152
13153 * c.opt (Wdouble-promotion): New.
13154
d1779886
JM
131552010-09-02 Joseph Myers <joseph@codesourcery.com>
13156
13157 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13158 fvtable-thunks, fxref): Mark no longer supported in help text.
13159
2d2bd949
JM
131602010-09-02 Joseph Myers <joseph@codesourcery.com>
13161
13162 * c.opt (Wimport, fall-virtual, falt-external-templates,
13163 fdefault-inline, fenum-int-equiv, fexternal-templates,
13164 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13165 fname-mangling-version-, fnew-abi, fnonnull-objects,
13166 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13167 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13168 applicable.
13169 (fhandle-exceptions): Mark with Alias and Warn.
13170 * c-opts.c (c_common_handle_option): Don't handle options marked
13171 as ignored.
13172
5de8299c
JM
131732010-09-02 Joseph Myers <joseph@codesourcery.com>
13174
13175 * c.opt (Wcomments, Werror-implicit-function-declaration,
13176 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13177 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13178 aliases.
13179 * c-common.c (option_codes): Use OPT_Wcomment instead of
13180 OPT_Wcomments.
13181 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13182 Don't handle options marked as aliases.
13183
0ceb0201
RG
131842010-08-25 Richard Guenther <rguenther@suse.de>
13185
13186 * c-common.c (c_common_get_alias_set): Remove special
13187 handling for pointers.
13188
ac47786e
NF
131892010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13190
13191 * c-common.c: Use FOR_EACH_VEC_ELT.
13192 * c-gimplify.c: Likewise.
13193 * c-pragma.c: Likewise.
13194
c878765b
JM
131952010-08-16 Joseph Myers <joseph@codesourcery.com>
13196
13197 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13198 RejectDriver.
13199 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13200 RejectDriver.
13201 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13202 instead of OPT_MDX and OPT_MMDX.
13203
603349bf
JM
132042010-08-16 Joseph Myers <joseph@codesourcery.com>
13205
13206 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13207
644fa7ac
JM
132082010-08-12 Joseph Myers <joseph@codesourcery.com>
13209
13210 * c.opt (MD, MMD): Change to MDX and MMDX.
13211 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13212
481e1176
JM
132132010-08-11 Joseph Myers <joseph@codesourcery.com>
13214
13215 * c-opts.c (c_common_handle_option): Call handle_generated_option
13216 instead of handle_option.
13217
ac8dc9f7
NF
132182010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13219
13220 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13221 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13222
4f8c876d
NF
132232010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13224
13225 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13226 (pending_redefine_extname): Change type to a VEC.
13227 (add_to_renaming_pragma_list): Update for new type of
13228 pending_redefine_extname.
ac8dc9f7 13229 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13230
3b0c690e
AC
132312010-08-04 Arnaud Charlet <charlet@adacore.com>
13232
13233 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13234 visited.
13235 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13236 decide whether a type has already been declared/seen.
13237 Do not go to the original type.
13238 (dump_nested_types): New parameter forward.
13239 Generate forward declaration if needed and mark type as visited.
13240 (print_ada_declaration): Call dump_nested_types if not already done.
13241 Mark types as visited.
13242
1890bccc
JM
132432010-08-03 Joseph Myers <joseph@codesourcery.com>
13244
13245 * c.opt (-print-pch-checksum): Remove option.
13246 * c-opts.c (c_common_handle_option): Don't handle
13247 OPT_print_pch_checksum.
13248
5f20c657
JM
132492010-07-27 Joseph Myers <joseph@codesourcery.com>
13250
13251 * c-common.h (c_common_handle_option): Update prototype and return
13252 value type.
13253 * c-opts.c (c_common_handle_option): Update prototype and return
13254 value type. Update calls to handle_option and
13255 enable_warning_as_error.
13256
f551f80c
JJ
132572010-07-27 Jakub Jelinek <jakub@redhat.com>
13258
13259 PR c/45079
13260 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13261
61ff2bdc
JM
132622010-07-27 Joseph Myers <joseph@codesourcery.com>
13263
13264 * c-common.h (c_common_missing_argument): Remove.
13265 * c-opts.c (c_common_missing_argument): Remove.
13266 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13267 idirafter, imacros, include, isysroot, isystem, iquote): Add
13268 MissingArgError.
13269 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13270
7a9bf9a4
JM
132712010-07-27 Joseph Myers <joseph@codesourcery.com>
13272
13273 * c-common.h (c_common_option_lang_mask,
13274 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13275 New.
13276 (c_common_init_options): Update prototype.
13277 * c-opts.c (c_common_option_lang_mask): New.
13278 (c_common_initialize_diagnostics): Split out of
13279 c_common_init_options.
13280 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13281 New.
13282 (c_common_init_options): Update prototype. Use decoded options in
13283 search for -lang-asm.
13284
910ad8de
NF
132852010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13286
13287 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13288 * c-format.c: Likewise.
13289
718f9c0f
MLI
132902010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13291
13292 * c-common.h: Include diagnostic-core.h. Error if already
13293 included.
13294 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13295
4d451982
MLI
132962010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13297
adfac8df 13298 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13299 Do not include expr.h
13300 (vector_mode_valid_p): Move here.
13301
119fe915
SB
133022010-06-21 DJ Delorie <dj@redhat.com>
13303
13304 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13305 allow these pragmas anywhere.
13306
133072010-06-14 Jakub Jelinek <jakub@redhat.com>
13308
13309 PR bootstrap/44509
13310 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13311 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13312 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13313 ggc_strdup instead of xstrdup.
13314
133152010-06-10 Jakub Jelinek <jakub@redhat.com>
13316
13317 * c-cppbuiltin.c: Include cpp-id-data.h.
13318 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13319 (lazy_hex_fp_value): New function.
13320 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13321
6662d794
MLI
133222010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13323
13324 * c-gimplify.c: Do not include tree-flow.h
13325
38f8b050
JR
133262010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13327
13328 PR other/44034
13329 * c-common.c: Rename targetm member:
13330 targetm.enum_va_list -> targetm.enum_va_list_p
13331
9589f23e
AS
133322010-06-28 Anatoly Sokolov <aesok@post.ru>
13333
13334 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13335
3b06d379
SB
133362010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13337
13338 * c-cppbuiltin.c: Do not include except.h.
13339
d166d4c3
AK
133402010-06-24 Andi Kleen <ak@linux.intel.com>
13341
9faeb493
UB
13342 * c-common.c (warn_for_omitted_condop): New.
13343 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13344
70cb8be6
JM
133452010-06-21 Joseph Myers <joseph@codesourcery.com>
13346
13347 * c.opt (lang-objc): Remove.
13348 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13349
a4c97feb
JR
133502010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13351
13352 * c-opts.c: Include "tm_p.h".
13353
6e2f1956
JM
133542010-06-20 Joseph Myers <joseph@codesourcery.com>
13355
13356 * c-common.c (parse_optimize_options): Update call to
13357 decode_options.
13358
bc87224e
NF
133592010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13360
13361 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13362 new type of types_used_by_cur_var_decl.
13363
b49cf425
JR
133642010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13365
13366 PR bootstrap/44512
13367 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13368 for C++ standard compliance.
13369
59f9c2ed
JM
133702010-06-16 Jason Merrill <jason@redhat.com>
13371
13372 * c.opt: Add -Wnoexcept.
13373
33766b66
RG
133742010-06-16 Richard Guenther <rguenther@suse.de>
13375
13376 PR c/44555
13377 * c-common.c (c_common_truthvalue_conversion): Remove
13378 premature and wrong optimization concering ADDR_EXPRs.
13379
eff7e30c
AC
133802010-06-15 Arnaud Charlet <charlet@adacore.com>
13381
13382 * c-ada-spec.c (dump_sloc): Remove column info.
13383 (is_simple_enum): New function.
13384 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13385 enum types when relevant.
13386
6312e84d
MLI
133872010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13388
9faeb493 13389 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13390 location.
13391
1cb42611
JM
133922010-06-10 Joseph Myers <joseph@codesourcery.com>
13393
13394 * c-opts.c (c_common_handle_option): Don't handle
13395 OPT_fshow_column.
13396
a9429e29
LB
133972010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13398
13399 * c-pragma.c (push_alignment): Use typed GC allocation.
13400 (handle_pragma_push_options): Likewise.
13401
13402 * c-common.c (parse_optimize_options): Likewise.
13403
13404 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13405 option.
13406
5498f011
JM
134072010-06-07 Joseph Myers <joseph@codesourcery.com>
13408
13409 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13410 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13411 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13412 flag_signed_bitfields, warn_strict_null_sentinel,
13413 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13414 flag_gen_declaration, flag_no_gnu_keywords,
13415 flag_implement_inlines, flag_implicit_templates,
13416 flag_implicit_inline_templates, flag_optional_diags,
13417 flag_elide_constructors, flag_default_inline, flag_rtti,
13418 flag_conserve_space, flag_access_control, flag_check_new,
13419 flag_new_for_scope, flag_weak, flag_working_directory,
13420 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13421 flag_enforce_eh_specs, flag_threadsafe_statics,
13422 flag_pretty_templates): Remove.
13423 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13424 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13425 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13426 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13427 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13428 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13429 flag_no_gnu_keywords, flag_implement_inlines,
13430 flag_implicit_templates, flag_implicit_inline_templates,
13431 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13432 flag_rtti, flag_conserve_space, flag_access_control,
13433 flag_check_new, flag_new_for_scope, flag_weak,
13434 flag_working_directory, flag_use_cxa_atexit,
13435 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13436 flag_threadsafe_statics, flag_pretty_templates,
13437 warn_strict_null_sentinel): Remove.
13438 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13439 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13440 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13441 fimplicit-inline-templates, fimplicit-templates,
13442 flax-vector-conversions, fms-extensions, fnil-receivers,
13443 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13444 frtti, fshort-double, fshort-enums, fshort-wchar,
13445 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13446 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13447 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13448 gen-decls, undef): Use Var.
13449 (fdefault-inline, foptional-diags): Document as doing nothing.
13450 * c-opts.c (c_common_handle_option): Remove cases for options now
13451 using Var. Mark ignored options as such.
13452
39dabefd
SB
134532010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13454
9faeb493 13455 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13456 * c-common.def: Likewise.
13457 * c-common.h: Likewise.
13458 * c-cppbuiltin.c: Likewise.
13459 * c-dump.c: Likewise.
13460 * c-format.c: Likewise.
13461 * c-format.h : Likewise.
13462 * c-gimplify.c: Likewise.
13463 * c-lex.c: Likewise.
13464 * c-omp.c: Likewise.
13465 * c.opt: Likewise.
13466 * c-opts.c: Likewise.
13467 * c-pch.c: Likewise.
13468 * c-ppoutput.c: Likewise.
13469 * c-pragma.c: Likewise.
13470 * c-pragma.h: Likewise.
13471 * c-pretty-print.c: Likewise.
13472 * c-pretty-print.h: Likewise.
13473 * c-semantics.c: Likewise.
13474 * stub-objc.c: Likewise.
13475
13476 * c-common.c: Include gt-c-family-c-common.h.
13477 * c-pragma.c: Include gt-c-family-c-pragma.h.
13478\f
877e3c2a 13479Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
13480
13481Copying and distribution of this file, with or without modification,
13482are permitted in any medium without royalty provided the copyright
13483notice and this notice are preserved.