]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
More gimple const/copy propagation opportunities
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
bbdcdf5c
GA
12022-09-29 Joseph Myers <joseph@codesourcery.com>
2
3 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
4 C.
5
62022-09-29 Patrick Palka <ppalka@redhat.com>
7
8 * c-common.cc (c_common_reswords): Add __remove_cv,
9 __remove_reference and __remove_cvref.
10 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
11 and RID_REMOVE_CVREF.
12
1f16a020
GA
132022-09-27 Marek Polacek <polacek@redhat.com>
14
15 PR c++/101165
16 PR c++/106882
17 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
18
192022-09-27 Marek Polacek <polacek@redhat.com>
20
21 * c-format.cc (c_keywords): Drop nothrow.
22
232022-09-27 Jakub Jelinek <jakub@redhat.com>
24
25 PR c++/106651
26 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
27 __cpp_static_call_operator=202207L for C++23.
28
292022-09-27 Jakub Jelinek <jakub@redhat.com>
30
31 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
32 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
33 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
34 * c-pragma.cc (omp_pragmas): Add assumes and begin.
35 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
36 (omp_pragmas_simd): Add assume.
37 * c-common.h (c_omp_directives): Declare.
38 * c-omp.cc (omp_directives): Rename to ...
39 (c_omp_directives): ... this. No longer static. Uncomment
40 assume, assumes, begin assumes and end assumes entries.
41 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
42 to PRAGMA_OMP_END.
43 (c_omp_categorize_directive): Adjust for omp_directives to
44 c_omp_directives renaming.
45
462022-09-27 Jakub Jelinek <jakub@redhat.com>
47
48 PR c++/106652
49 PR c++/85518
50 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
51 _Float{32,64,128}x flags from D_CONLY to 0.
52 (shorten_binary_op): Punt if common_type returns error_mark_node.
53 (shorten_compare): Likewise.
54 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
55 and _Float{32,64,128}x builtin types if available. For C++
56 clear float128t_type_node.
57 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
58 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
59 * c-lex.cc (interpret_float): For q/Q suffixes prefer
60 float128t_type_node over float128_type_node. Allow
61 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
62 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
63 with pedwarn. Don't call excess_precision_type for C++.
64
220c4d8e
GA
652022-09-26 Marek Polacek <polacek@redhat.com>
66
67 PR c++/106656
68 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
69 for C++20.
70
4afaeaab
GA
712022-09-23 Marek Polacek <polacek@redhat.com>
72
73 PR c++/106784
74 * c-common.cc (c_common_reswords): Add __is_convertible and
75 __is_nothrow_convertible.
76 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
77 RID_IS_NOTHROW_CONVERTIBLE.
78
279c6715
GA
792022-09-22 David Malcolm <dmalcolm@redhat.com>
80
81 PR c/106830
82 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
83 values that don't fit in uhwi.
84
d0fc05e8
GA
852022-09-15 Richard Biener <rguenther@suse.de>
86
87 * c-common.h (build_void_list_node): Remove.
88 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
89 void_list_node.
90
861d1a11
GA
912022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
92
93 * c-format.cc (convert_format_name_to_system_name): Fix warning.
94
fe2a8ce9
GA
952022-09-07 Joseph Myers <joseph@codesourcery.com>
96
97 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
98 for alignas, alignof, bool, false, static_assert, thread_local and
99 true.
100
1012022-09-07 Jakub Jelinek <jakub@redhat.com>
102
103 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
104 " in comments" from description.
105 (Wunicode): New option.
106
25aeb922
GA
1072022-09-06 Jakub Jelinek <jakub@redhat.com>
108
109 PR c/106836
110 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
111
83f2f228
GA
1122022-09-03 Jakub Jelinek <jakub@redhat.com>
113
114 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
115 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
116 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
117 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
118
c64b0947
GA
1192022-09-02 David Malcolm <dmalcolm@redhat.com>
120
121 PR c/90885
122 * c-common.h (check_for_xor_used_as_pow): New decl.
123 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
124 * c-warn.cc (check_for_xor_used_as_pow): New.
125 * c.opt (Wxor-used-as-pow): New.
126
bb0a1556
GA
1272022-09-01 Jason Merrill <jason@redhat.com>
128
129 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
130 char8_t.
131 (braced_list_to_string): Check for char-sized elements.
132
1332022-09-01 Jakub Jelinek <jakub@redhat.com>
134
135 PR c++/106655
136 * c.opt (-Winvalid-utf8): New warning.
137 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
138 Set cpp_opts->cpp_input_charset_explicit.
139 (c_common_post_options): If -finput-charset=UTF-8 is explicit
140 in C++23, enable -Winvalid-utf8 by default and if -pedantic
141 or -pedantic-errors, make it a pedwarn.
142
542c60c4
GA
1432022-08-31 Joseph Myers <joseph@codesourcery.com>
144
145 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
146 for LABEL_DECL.
147 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
148 decl_attributes.
149 * c-common.h (do_case, c_add_case_label): Update declarations.
150 * c-lex.cc (c_common_has_attribute): For C, produce a result of
151 201910 for fallthrough and 202106 for maybe_unused.
152
16f542d6
GA
1532022-08-26 Marek Polacek <polacek@redhat.com>
154
155 PR c++/81159
156 * c.opt (Wself-move): New option.
157
1582022-08-26 Jakub Jelinek <jakub@redhat.com>
159
160 * c-common.cc (check_builtin_function_arguments): Handle
161 BUILT_IN_ISSIGNALING.
162
1632022-08-26 Jakub Jelinek <jakub@redhat.com>
164
165 PR c++/106648
166 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
167 __cpp_named_character_escapes to 202207L.
168
5d4389dc
GA
1692022-08-25 Marek Polacek <polacek@redhat.com>
170
171 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
172 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
173 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
174 (struct c_common_resword): Resize the disable member.
175 (D_C2X): Add.
176 (nullptr_node): Define.
177 (nullptr_type_node): Define.
178 (NULLPTR_TYPE_P): Define.
179 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
180 NULLPTR_TYPE.
181 (c_pretty_printer::direct_abstract_declarator): Likewise.
182 (c_pretty_printer::constant): Likewise.
183
47a61e65
GA
1842022-08-16 Tom Honermann <tom@honermann.net>
185
186 PR c++/106423
187 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
188 diagnostics in C++20 and later.
189 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
190
5cd525f0
GA
1912022-08-11 Marek Polacek <polacek@redhat.com>
192
193 PR middle-end/102633
194 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
195 suppress_warning here.
196
5f17badb
GA
1972022-08-08 Tom Honermann <tom@honermann.net>
198
199 PR preprocessor/106426
200 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
201 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
202
2032022-08-08 Tom Honermann <tom@honermann.net>
204
205 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
206 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
207 enabled.
208 * c-opts.cc (c_common_post_options): Set flag_char8_t if
209 targeting C2x.
210
4a7274dd
GA
2112022-07-31 Lewis Hyatt <lhyatt@gmail.com>
212
213 PR c++/66290
214 * c-common.h: Rename global done_lexing to
215 override_libcpp_locations.
216 * c-common.cc (c_cpp_diagnostic): Likewise.
217 * c-opts.cc (c_common_finish): Set override_libcpp_locations
218 (formerly done_lexing) immediately prior to calling cpp_finish ().
219
1e2c5f4c
GA
2202022-07-27 Lewis Hyatt <lhyatt@gmail.com>
221
222 * c-ppoutput.cc (token_streamer::stream): Update input_location
223 prior to streaming each token.
224
0e6fa997
GA
2252022-07-23 Immad Mir <mirimmad@outlook.com>
226
227 * c-attribs.cc: (c_common_attribute_table): add three new attributes
228 namely: fd_arg, fd_arg_read and fd_arg_write.
229 (handle_fd_arg_attribute): New.
230
bdc7b765
GA
2312022-07-15 Marek Polacek <polacek@redhat.com>
232
233 PR c++/104477
234 * c-common.cc (c_common_reswords): Add
235 __reference_constructs_from_temporary and
236 __reference_converts_from_temporary.
237 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
238 RID_REF_CONVERTS_FROM_TEMPORARY.
239
2402022-07-15 Jonathan Wakely <jwakely@redhat.com>
241
242 * c-format.cc (class range_label_for_format_type_mismatch):
243 Adjust to new label_text API.
244
c72d4714
GA
2452022-07-11 Lewis Hyatt <lhyatt@gmail.com>
246
247 PR preprocessor/106252
248 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
249 option argument prior to verifying the option was found.
250
6345c414
GA
2512022-07-07 David Malcolm <dmalcolm@redhat.com>
252
253 * c-format.cc (range_label_for_format_type_mismatch::get_text):
254 Update for removal of label_text::maybe_free in favor of automatic
255 memory management.
256
4bc92c3b
GA
2572022-07-06 Lewis Hyatt <lhyatt@gmail.com>
258
259 PR preprocessor/53920
260 PR c++/53431
261 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
262 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
263 (c_pp_stream_token): Declare.
264 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
265 pragmas to...
266 (should_output_pragmas): ...here. New function.
267 (token_streamer::stream): Support handling early pragmas.
268 (do_line_change): Likewise.
269 (c_pp_stream_token): New function.
270 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
271 (pragma_diagnostic_lex_normal): New function. Moved logic for
272 interpreting GCC diagnostic pragmas here.
273 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
274 directly from libcpp.
275 (handle_pragma_diagnostic): Refactor into helper function...
276 (handle_pragma_diagnostic_impl): ...here. New function.
277 (handle_pragma_diagnostic_early): New function.
278 (handle_pragma_diagnostic_early_pp): New function.
279 (struct pragma_ns_name): Renamed to...
280 (struct pragma_pp_data): ...this. Add new "early_handler" member.
281 (c_register_pragma_1): Support early pragmas in the preprocessor.
282 (c_register_pragma_with_early_handler): New function.
283 (c_register_pragma): Support the new early handlers in struct
284 internal_pragma_handler.
285 (c_register_pragma_with_data): Likewise.
286 (c_register_pragma_with_expansion): Likewise.
287 (c_register_pragma_with_expansion_and_data): Likewise.
288 (c_invoke_early_pragma_handler): New function.
289 (c_pp_invoke_early_pragma_handler): New function.
290 (init_pragma): Add early pragma support for diagnostic pragmas.
291 * c-pragma.h (struct internal_pragma_handler): Add new early handler
292 members.
293 (c_register_pragma_with_early_handler): Declare.
294 (c_invoke_early_pragma_handler): Declare.
295 (c_pp_invoke_early_pragma_handler): Declare.
296
d1f3a3ff
GA
2972022-07-05 Marek Polacek <polacek@redhat.com>
298
299 PR c++/105626
300 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
301 u8 strings.
302
ed974488
GA
3032022-07-01 Marek Polacek <polacek@redhat.com>
304
305 PR c++/106111
306 * c-common.h (enum rid): Update RID_LAST_CXX20.
307
976196b3
GA
3082022-06-30 Jonathan Wakely <jwakely@redhat.com>
309
310 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
311 names.
312
84c2131d
GA
3132022-06-24 Jason Merrill <jason@redhat.com>
314
315 PR c++/87729
316 PR c++/20423
317 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
318
4390e7bf
GA
3192022-06-18 Jakub Jelinek <jakub@redhat.com>
320
321 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
322 Use flag_sanitize_trap & SANITIZE_??? instead of
323 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
324 and flag_sanitize_trap differs for them, emit __builtin_trap only
325 for the comparison where trap is requested.
326 (ubsan_instrument_vla, ubsan_instrument_return): Use
327 lag_sanitize_trap & SANITIZE_??? instead of
328 flag_sanitize_undefined_trap_on_error.
329
c3642271
GA
3302022-06-13 Jason Merrill <jason@redhat.com>
331
332 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
333
d9176e64
GA
3342022-05-27 Marek Polacek <polacek@redhat.com>
335
336 PR c/90658
337 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
338
3392022-05-27 Jakub Jelinek <jakub@redhat.com>
340
341 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
342
57f2ce6a
GA
3432022-05-20 David Malcolm <dmalcolm@redhat.com>
344
345 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
346 and "override".
347 * c-pretty-print.h: Likewise.
348
1cda629f
GA
3492022-05-18 Marek Polacek <polacek@redhat.com>
350
351 PR c/105131
352 * c.opt (Wenum-int-mismatch): New.
353
3542022-05-18 Marek Polacek <polacek@redhat.com>
355
356 PR c++/105497
357 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
358 enumerator when it was marked with attribute unused.
359
3602022-05-18 Eric Botcazou <ebotcazou@adacore.com>
361
362 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
363 floating-point complex types.
364 <POINTER_TYPE>: Do not use limited_with clause if the designated
365 type is a scalar type.
366
3d9439b1
GA
3672022-05-17 Jakub Jelinek <jakub@redhat.com>
368
369 * c-omp.cc (c_finish_omp_depobj): Handle
370 OMP_CLAUSE_DEPEND_INOUTSET.
371
702bd11f
GA
3722022-05-16 Jason Merrill <jason@redhat.com>
373
374 PR c/105492
375 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
376 here.
377
3782022-05-16 Martin Liska <mliska@suse.cz>
379
380 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
381 (c_common_nodes_and_builtins): Likewise.
382 * c-format.cc (check_tokens): Likewise.
383 (check_plain): Likewise.
384 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
385 (init_pragma): Likewise.
386 * known-headers.cc (get_string_macro_hint): Likewise.
387 (get_stdlib_header_for_name): Likewise.
388 * c-attribs.cc: Likewise.
389
9df4ffe4
GA
3902022-05-13 Richard Biener <rguenther@suse.de>
391
392 * c-omp.cc: Remove gimple-fold.h include.
393
49ace834
GA
3942022-05-12 Jakub Jelinek <jakub@redhat.com>
395
396 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
397 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
398 if null_pointer_node.
399
d0d513b5
GA
4002022-05-11 Martin Liska <mliska@suse.cz>
401
402 PR target/105355
403 * c-opts.cc (c_common_handle_option): Change option name.
404 * c.opt: Remove Joined and use Separate option.
405
bd022ff9
GA
4062022-05-09 Alex Coplan <alex.coplan@arm.com>
407
408 * c-common.h (get_dump_info): Delete.
409 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
410 from the global dump_manager instead of the (now obsolete)
411 get_dump_info.
412 * c-opts.cc (original_dump_file): Delete.
413 (original_dump_flags): Delete.
414 (c_common_parse_file): Switch to using global dump_manager to
415 manage the original dump file; fix leak of dump file.
416 (get_dump_info): Delete.
417
a1947c92
GA
4182022-05-07 Marek Polacek <polacek@redhat.com>
419
420 PR c++/101833
421 PR c++/47634
422 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
423 with FN being either a function declaration or function type. Use
424 maybe_adjust_arg_pos_for_attribute.
425 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
426 check_function_format.
427 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
428 (positional_argument): Adjust.
429 * c-format.cc (get_constant): Rename to ...
430 (validate_constant): ... this. Take EXPR by reference. Return bool
431 instead of tree.
432 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
433 return value of validate_constant.
434 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
435 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
436 (check_function_format): Adjust a parameter name.
437 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
438
3e7db517
GA
4392022-05-04 Marek Polacek <polacek@redhat.com>
440
441 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
442 char to int.
443
95874f95
GA
4442022-04-30 Jason Merrill <jason@redhat.com>
445
446 PR c/100545
447 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
448 and typedef.
449 * c-common.cc (set_underlying_type): Add assert.
450
01ad093b
GA
4512022-04-26 Patrick Palka <ppalka@redhat.com>
452
453 PR c++/105304
454 * c-common.cc (verify_tree) [restart]: Move up to before the
455 NULL test.
456
da066c42
GA
4572022-04-11 Jakub Jelinek <jakub@redhat.com>
458
459 PR c++/105186
460 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
461 and __int%d__ builtin types, initialize corresponding ridpointers
462 entry.
463
150ab50f
GA
4642022-03-30 Marek Polacek <polacek@redhat.com>
465
466 PR c++/101030
467 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
468 conversion_warning when OP1 is null.
469
4702022-03-30 Thomas Schwinge <thomas@codesourcery.com>
471
472 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
473 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
474 option properties.
475
4762022-03-30 Thomas Schwinge <thomas@codesourcery.com>
477
478 * c.opt (Wuse-after-free): Remove.
479
4802022-03-30 Thomas Schwinge <thomas@codesourcery.com>
481
482 * c.opt (Warray-bounds): Remove.
483
d2906412
GA
4842022-03-26 Thomas Schwinge <thomas@codesourcery.com>
485
486 * c.opt: Properly quote comment.
487
31e989a2
GA
4882022-03-25 Eric Botcazou <ebotcazou@adacore.com>
489
490 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
491 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
492 the referenced type instead. Deal with the anonymous original type
493 of a typedef'ed type. In the actual access case, follow the chain
494 of external subtypes.
495 <TYPE_DECL>: Tidy up control flow.
496
d156bb87
GA
4972022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
498
499 * c-ada-spec.cc: Change array length
500
d7f00da1
GA
5012022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
502
503 * c-common.cc (c_family_tests): Call the new tests.
504 * c-common.h (c_diagnostic_tests): Declare.
505 (c_opt_problem_cc_tests): Likewise.
506
5072022-03-19 Jakub Jelinek <jakub@redhat.com>
508
509 PR c++/101515
510 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
511 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
512 be printed.
513
9fc8f278
GA
5142022-03-16 Christophe Lyon <christophe.lyon@arm.com>
515 Roger Sayle <roger@nextmovesoftware.com>
516
517 PR c/98198
518 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
519
5202022-03-16 Patrick Palka <ppalka@redhat.com>
521
522 PR c++/96780
523 * c.opt: Add -ffold-simple-inlines.
524
b9756c08
GA
5252022-03-13 Tobias Burnus <tobias@codesourcery.com>
526
527 * c-target.def (check_string_object_format_arg): Fix description typo.
528
57eeedda
GA
5292022-03-12 Thomas Schwinge <thomas@codesourcery.com>
530
531 PR other/65095
532 * c-common.h (c_omp_map_clause_name): Remove.
533 * c-omp.cc (c_omp_map_clause_name): Remove.
534
8cc4f9cd
GA
5352022-03-09 Jakub Jelinek <jakub@redhat.com>
536
537 PR c/104711
538 * c-opts.cc (c_common_post_options): Don't enable
539 -Wshift-negative-value from -Wextra for C++20 or later.
540 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
541 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
542 instead of TYPE_UNSIGNED.
543
e6533e2e
GA
5442022-03-07 Jakub Jelinek <jakub@redhat.com>
545
546 * c-attribs.cc: Fix up duplicated word issue in a comment.
547
12d4552e
GA
5482022-03-01 Martin Liska <mliska@suse.cz>
549
550 PR ipa/104533
551 * c-attribs.cc (handle_target_clones_attribute): Use
552 get_target_clone_attr_len and report warning soon.
553
0bdb0498
GA
5542022-02-17 Jonathan Wakely <jwakely@redhat.com>
555
556 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
557 (handle_pragma_weak): Likewise.
558 (handle_pragma_scalar_storage_order): Likewise.
559 (handle_pragma_redefine_extname): Likewise.
560 (handle_pragma_visibility): Likewise.
561 (handle_pragma_diagnostic): Likewise.
562 (handle_pragma_target): Likewise.
563 (handle_pragma_optimize): Likewise.
564 (handle_pragma_push_options): Likewise.
565 (handle_pragma_pop_options): Likewise.
566 (handle_pragma_reset_options): Likewise.
567 (handle_pragma_message): Likewise.
568 (handle_pragma_float_const_decimal64): Likewise.
569
cb3afcd2
GA
5702022-02-16 Jakub Jelinek <jakub@redhat.com>
571
572 PR c/104531
573 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
574 build_binary_op with LT_EXPR and only if that doesn't return
575 error_mark_node call build_modify_expr.
576
5772022-02-16 Jakub Jelinek <jakub@redhat.com>
578
579 PR c/104510
580 * c-common.cc (shorten_compare): Convert original arguments to
581 the original *restype_ptr when mixing binary and decimal float.
582
1f8a09d2
GA
5832022-02-14 Richard Biener <rguenther@suse.de>
584
585 PR c/104505
586 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
587 internal function calls.
588
e8d68f0a
GA
5892022-02-11 Richard Biener <rguenther@suse.de>
590
591 * c-attribs.cc (c_common_attribute_table): Add entry for
592 vector_mask.
593 (handle_vector_mask_attribute): New.
594
a645583d
GA
5952022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
596
597 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
598 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
599 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
600
3adf509f
GA
6012022-02-09 Jason Merrill <jason@redhat.com>
602
603 * c-cppbuiltin.cc (c_cpp_builtins): Update values
604 of __cpp_constexpr and __cpp_concepts for C++20.
605
bb99171b
GA
6062022-01-24 Marek Polacek <polacek@redhat.com>
607
608 PR preprocessor/104030
609 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
610
9dd44357
GA
6112022-01-21 Jakub Jelinek <jakub@redhat.com>
612
613 PR c++/104148
614 * c-common.h (check_function_arguments_recurse): Add for_format
615 arg.
616 * c-common.cc (check_function_nonnull): Pass false to
617 check_function_arguments_recurse's last argument.
618 (check_function_arguments_recurse): Add for_format argument,
619 if true, don't stop on warning_suppressed_p.
620 * c-format.cc (check_format_info): Pass true to
621 check_function_arguments_recurse's last argument.
622
fe1ad141
GA
6232022-01-19 David Malcolm <dmalcolm@redhat.com>
624
625 * c-common.cc (c_common_c_tests): Rename to...
626 (c_common_cc_tests): ...this.
627 (c_family_tests): Update calls for .c to .cc renaming.
628 * c-common.h (c_format_c_tests): Rename to...
629 (c_format_cc_tests): ...this.
630 (c_indentation_c_tests): Rename to...
631 (c_indentation_cc_tests): ...this.
632 (c_pretty_print_c_tests): Rename to...
633 (c_pretty_print_cc_tests): ...this.
634 * c-format.cc (c_format_c_tests): Rename to...
635 (c_format_cc_tests): ...this.
636 * c-indentation.cc (c_indentation_c_tests): Rename to...
637 (c_indentation_cc_tests): ...this.
638 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
639 (c_pretty_print_cc_tests): ...this.
640
fc829782
GA
6412022-01-17 Martin Liska <mliska@suse.cz>
642
643 * c-ada-spec.cc: Rename .c names to .cc.
644 * c-ada-spec.h: Likewise.
645 * c-common.cc (c_build_vec_convert): Likewise.
646 (warning_candidate_p): Likewise.
647 * c-common.h (enum rid): Likewise.
648 (build_real_imag_expr): Likewise.
649 (finish_label_address_expr): Likewise.
650 (c_get_substring_location): Likewise.
651 (c_build_bind_expr): Likewise.
652 (conflict_marker_get_final_tok_kind): Likewise.
653 (c_parse_error): Likewise.
654 (check_missing_format_attribute): Likewise.
655 (invalid_array_size_error): Likewise.
656 (warn_for_multistatement_macros): Likewise.
657 (build_attr_access_from_parms): Likewise.
658 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
659 * c-format.cc: Likewise.
660 * c-gimplify.cc (c_gimplify_expr): Likewise.
661 * c-indentation.h: Likewise.
662 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
663 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
664 * c-opts.cc (c_common_post_options): Likewise.
665 (set_std_cxx23): Likewise.
666 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
667 * c-pretty-print.h: Likewise.
668
6692022-01-17 Martin Liska <mliska@suse.cz>
670
671 * c-ada-spec.c: Moved to...
672 * c-ada-spec.cc: ...here.
673 * c-attribs.c: Moved to...
674 * c-attribs.cc: ...here.
675 * c-common.c: Moved to...
676 * c-common.cc: ...here.
677 * c-cppbuiltin.c: Moved to...
678 * c-cppbuiltin.cc: ...here.
679 * c-dump.c: Moved to...
680 * c-dump.cc: ...here.
681 * c-format.c: Moved to...
682 * c-format.cc: ...here.
683 * c-gimplify.c: Moved to...
684 * c-gimplify.cc: ...here.
685 * c-indentation.c: Moved to...
686 * c-indentation.cc: ...here.
687 * c-lex.c: Moved to...
688 * c-lex.cc: ...here.
689 * c-omp.c: Moved to...
690 * c-omp.cc: ...here.
691 * c-opts.c: Moved to...
692 * c-opts.cc: ...here.
693 * c-pch.c: Moved to...
694 * c-pch.cc: ...here.
695 * c-ppoutput.c: Moved to...
696 * c-ppoutput.cc: ...here.
697 * c-pragma.c: Moved to...
698 * c-pragma.cc: ...here.
699 * c-pretty-print.c: Moved to...
700 * c-pretty-print.cc: ...here.
701 * c-semantics.c: Moved to...
702 * c-semantics.cc: ...here.
703 * c-ubsan.c: Moved to...
704 * c-ubsan.cc: ...here.
705 * c-warn.c: Moved to...
706 * c-warn.cc: ...here.
707 * cppspec.c: Moved to...
708 * cppspec.cc: ...here.
709 * stub-objc.c: Moved to...
710 * stub-objc.cc: ...here.
711
9248ee41
GA
7122022-01-15 Martin Sebor <msebor@redhat.com>
713
714 PR c/63272
715 * c.opt (-Wdangling-pointer): New option.
716
7172022-01-15 Martin Sebor <msebor@redhat.com>
718
719 PR tree-optimization/80532
720 * c.opt (-Wuse-after-free): New options.
721
617db51d
GA
7222022-01-14 David Malcolm <dmalcolm@redhat.com>
723
724 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
725 (handle_tainted_args_attribute): New.
726
ad3f0d08
GA
7272022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
728 Jason Merrill <jason@redhat.com>
729
730 PR c++/70417
731 * c.opt: Added -Wmissing-template-keyword.
732
7332022-01-13 Richard Biener <rguenther@suse.de>
734
735 PR c/104002
736 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
737
02a8a01b
GA
7382022-01-12 Martin Liska <mliska@suse.cz>
739
740 PR target/103804
741 * c-attribs.c (handle_optimize_attribute): Do not call
742 cl_optimization_compare if we seen an error.
743
01a254e3
GA
7442022-01-11 Jakub Jelinek <jakub@redhat.com>
745
746 PR c/101537
747 PR c/103881
748 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
749 and BIT_XOR_EXPR.
750
d9450aa0
GA
7512022-01-10 Richard Biener <rguenther@suse.de>
752
753 PR middle-end/101530
754 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
755 in a TARGET_EXPR to force a temporary.
756
11ce8d04
GA
7572022-01-06 Marek Polacek <polacek@redhat.com>
758
759 PR c++/103758
760 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
761 diagnostic messages.
762 (handle_pragma_diagnostic): Likewise.
763
a4ae8c37
GA
7642022-01-03 Marek Polacek <polacek@redhat.com>
765
766 PR c++/103758
767 * c-format.c (check_tokens): Accept "decl-specifier*".
768
7692022-01-03 Jakub Jelinek <jakub@redhat.com>
770
771 PR c++/103600
772 * c-attribs.c (handle_non_overlapping_attribute): New function.
773 (c_common_attribute_table): Add "non overlapping" attribute.
774
84790a9d
GA
7752021-12-30 Jakub Jelinek <jakub@redhat.com>
776
777 PR c++/103012
778 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
779 cpp_define_unused/cpp_undef calls with forced token locations
780 BUILTINS_LOCATION.
781
d1e111da
GA
7822021-12-27 Patrick Palka <ppalka@redhat.com>
783
784 PR c++/103700
785 * c-common.c (pointer_int_sum): When quiet, return
786 error_mark_node for an incomplete pointed-to type and don't
787 call size_in_bytes_loc.
788
2554e2da
GA
7892021-12-17 Jason Merrill <jason@redhat.com>
790
791 PR c++/103681
792 * c-opts.c (c_common_post_options): Update defaults.
793
774269aa
GA
7942021-12-16 Martin Liska <mliska@suse.cz>
795
796 PR target/103709
797 * c-pragma.c (handle_pragma_pop_options): Do not check
798 global options modification when an error is seen in parsing
799 of options (pragmas or attributes).
800
c8dcf64b
GA
8012021-12-12 Jonathan Wakely <jwakely@redhat.com>
802
803 * known-headers.cc: Define INCLUDE_MEMORY instead of
804 INCLUDE_UNIQUE_PTR.
805 * name-hint.h: Likewise.
806 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
807
4b4839e3
GA
8082021-12-09 Jakub Jelinek <jakub@redhat.com>
809
810 PR pch/71934
811 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
812 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
813
03a9bd05
GA
8142021-12-03 Jakub Jelinek <jakub@redhat.com>
815
816 PR pch/71934
817 * c-pch.c (struct c_pch_validity): Remove pch_init member.
818 (pch_init): Don't initialize v.pch_init.
819 (c_common_valid_pch): Don't warn and punt if .text addresses change.
820
40fa651e
GA
8212021-12-01 Jason Merrill <jason@redhat.com>
822
823 PR c++/103310
824 * c.opt: Add -fconstexpr-fp-except.
825
87cd82c8
GA
8262021-11-29 Richard Biener <rguenther@suse.de>
827
828 * c-format.c (check_format_string): Remove spurious
829 gcc_unreachable.
830
8312021-11-29 Richard Biener <rguenther@suse.de>
832
833 * c-opts.c (c_common_post_options): Remove unreachable return.
834 * c-pragma.c (handle_pragma_target): Likewise.
835 (handle_pragma_optimize): Likewise.
836
091ccc06
GA
8372021-11-25 Jakub Jelinek <jakub@redhat.com>
838
839 PR c++/102611
840 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
841 default for C++23 regardless of warn_deprecated.
842 * c-cppbuiltin.c (c_cpp_builtins): Predefine
843 __cpp_multidimensional_subscript=202110L for C++23.
844
e1d43592
GA
8452021-11-23 Martin Sebor <msebor@redhat.com>
846
847 PR middle-end/88232
848 * c.opt: Add -Winfinite-recursion.
849
9c077398
GA
8502021-11-19 Martin Sebor <msebor@redhat.com>
851
852 PR c++/33925
853 PR c/102867
854 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
855 and improve handling tof defined symbols.
856
8572021-11-19 Martin Liska <mliska@suse.cz>
858
859 Revert:
860 2021-11-18 Martin Liska <mliska@suse.cz>
861
862 * c-gimplify.c (genericize_c_loop): Use option directly.
863
483092d3
GA
8642021-11-18 Matthias Kretz <m.kretz@gsi.de>
865
866 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
867 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
868
8692021-11-18 Martin Liska <mliska@suse.cz>
870
871 * c-gimplify.c (genericize_c_loop): Use option directly.
872
280d2838
GA
8732021-11-17 Martin Uecker <uecker@gcc.gnu.org>
874
875 PR c/91038
876 PR c/29970
877 * c-common.c (pointer_int_sum): Make sure pointer expressions
878 are evaluated first when the size expression depends on for
879 variably-modified types.
880
8812021-11-17 Marek Polacek <polacek@redhat.com>
882
883 PR preprocessor/103026
884 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
885
6b1695f4
GA
8862021-11-16 Jason Merrill <jason@redhat.com>
887
888 * c-common.c (release_tree_vector): Only cache vecs smaller than
889 16 elements.
890
e2b57363
GA
8912021-11-15 Jason Merrill <jason@redhat.com>
892
893 * c.opt: Add -fimplicit-constexpr.
894 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
895 * c-opts.c (c_common_post_options): Disable below C++14.
896
8972021-11-15 Jakub Jelinek <jakub@redhat.com>
898
899 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
900 Duplicate to both OMP_TARGET and OMP_TEAMS.
901
8d36a0d2
GA
9022021-11-10 Marek Polacek <polacek@redhat.com>
903
904 PR c++/101940
905 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
906 ignored_attributes.
907
c9b1334e
GA
9082021-11-09 David Malcolm <dmalcolm@redhat.com>
909
910 * c-pragma.c (GCC_BAD_AT): New macro.
911 (GCC_BAD2_AT): New macro.
912 (handle_pragma_pack): Use the location of the pertinent token when
913 issuing diagnostics about invalid constants/actions, and trailing
914 junk.
915 (handle_pragma_target): Likewise for non-string "GCC option".
916 (handle_pragma_message): Likewise for trailing junk.
917
18ae471f
GA
9182021-11-03 Joseph Myers <joseph@codesourcery.com>
919
920 PR c/103031
921 * c-common.c (convert_and_check): Add argument init_const. Call
922 convert_init if init_const.
923 * c-common.h (convert_and_check): Update prototype.
924 (convert_init): New prototype.
925
cf82e8d9
GA
9262021-11-01 David Malcolm <dmalcolm@redhat.com>
927
928 * c-lex.c (c_lex_with_flags): When complaining about non-printable
929 CPP_OTHER tokens, set the "escape on output" flag.
930
04a2cf3f
GA
9312021-10-27 Jakub Jelinek <jakub@redhat.com>
932
933 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
934 POINTER_PLUS_EXPR.
935 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
936 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
937
9382021-10-27 Jakub Jelinek <jakub@redhat.com>
939
940 PR c++/102854
941 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
942 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
943 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
944 conversions temporarily clear the 3rd bit from d->kind while walking
945 subtrees.
946 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
947 if possibly non-rectangular.
948
ae5c5406
GA
9492021-10-21 Jakub Jelinek <jakub@redhat.com>
950
951 PR middle-end/64888
952 * c-omp.c (c_omp_predefined_variable): Return true also for
953 ubsan_create_data created artificial variables.
954
5d5885c9
GA
9552021-10-14 Joseph Myers <joseph@codesourcery.com>
956
957 * c-format.c (printf_length_specs, scanf_length_specs)
958 (print_char_table, scan_char_table): Support DFP formats for C2X.
959 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
960 (T2X_D32, T2X_D64, T2X_D128): New macros.
961
9622021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
963
964 * c-omp.c (c_omp_check_context_selector): Rename to
965 omp_check_context_selector and move to omp-general.c.
966 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
967 move to omp-general.c.
968
52055987
GA
9692021-10-12 Joseph Myers <joseph@codesourcery.com>
970
971 * c-format.c (print_char_table): Add %b and %B formats.
972 (scan_char_table): Add %b format.
973 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
974 (T2X_UPD, T2X_UIM): New macros.
975
9762021-10-12 Jakub Jelinek <jakub@redhat.com>
977
978 * c-omp.c (c_finish_omp_atomic): Use
979 clear_padding_type_may_have_padding_p.
980
ce6eec39
GA
9812021-10-08 Martin Liska <mliska@suse.cz>
982
983 * c-opts.c (c_common_post_options): Use new macro
984 OPTION_SET_P.
985
50e20ee6
GA
9862021-10-07 Martin Liska <mliska@suse.cz>
987
988 * c-common.c (parse_optimize_options): Make
989 save_opt_decoded_options a pointer type.
990
57c7ec62
GA
9912021-10-06 Jakub Jelinek <jakub@redhat.com>
992
993 PR tree-optimization/102571
994 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
995 padding, but the non-padding bits are contiguous set of bytes
996 by adjusting the memcmp call arguments instead of emitting
997 __builtin_clear_padding and then comparing all the type's bytes.
998
9992021-10-06 Jakub Jelinek <jakub@redhat.com>
1000
1001 PR c++/102612
1002 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1003 __cpp_constexpr to 202110L rather than 201907L.
1004
da9c5f78
GA
10052021-10-04 Marek Polacek <polacek@redhat.com>
1006
1007 PR c++/97573
1008 * c-common.h (do_warn_array_compare): Declare.
1009 * c-warn.c (do_warn_array_compare): New.
1010 * c.opt (Warray-compare): New option.
1011
e3e07b89
GA
10122021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1013
1014 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1015 NULL, this is not needed.
1016
9d116bcc
GA
10172021-10-01 Martin Sebor <msebor@redhat.com>
1018
1019 PR c/102103
1020 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1021 Check and perform warning suppression.
1022 (c_common_truthvalue_conversion): Enhance warning suppression.
1023
10242021-10-01 Martin Liska <mliska@suse.cz>
1025
1026 PR target/102552
1027 * c-common.c (parse_optimize_options): decoded_options[0] is
1028 used for program name, so merged_decoded_options should also
1029 respect that.
1030
10312021-10-01 Jakub Jelinek <jakub@redhat.com>
1032 Richard Biener <rguenther@suse.de>
1033
1034 PR sanitizer/102515
1035 * c-ubsan.c (ubsan_instrument_division): Check the right
1036 flag_sanitize_recover bit, depending on which sanitization
1037 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1038 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1039 and SANITIZE_DIVIDE is enabled, neither check is known
1040 to be false and flag_sanitize_recover bits for those two
1041 aren't the same, emit both __ubsan_handle_divrem_overflow
1042 and __ubsan_handle_divrem_overflow_abort calls.
1043
10442021-10-01 Martin Liska <mliska@suse.cz>
1045
1046 * c-common.c (parse_optimize_options): Combine optimize
1047 options with what was provided on the command line.
1048
10492021-10-01 Jakub Jelinek <jakub@redhat.com>
1050
1051 * c-omp.c (c_omp_split_clauses): Also copy
1052 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1053
cf966403
GA
10542021-09-27 Martin Liska <mliska@suse.cz>
1055
1056 * c-opts.c (c_common_init_options_struct): Set also
1057 x_flag_default_complex_method.
1058
e4777439
GA
10592021-09-22 Jakub Jelinek <jakub@redhat.com>
1060
1061 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1062
62498024
GA
10632021-09-20 Matthias Kretz <m.kretz@gsi.de>
1064
1065 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1066 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1067 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1068 __ROUNDING_MATH__ according to the new optimization flags.
1069
cf74e7b5
GA
10702021-09-18 Jakub Jelinek <jakub@redhat.com>
1071
1072 * c-omp.c (c_omp_split_clauses): Split order clause also to
1073 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1074
0a4cb439
GA
10752021-09-17 Jakub Jelinek <jakub@redhat.com>
1076
1077 * c-omp.c (c_finish_omp_atomic): Avoid creating
1078 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1079 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1080 had NULL initializer. When omitting operands after v = x,
1081 use type of v rather than type of x. Fix type of vtmp
1082 TARGET_EXPR.
1083
07985c47
GA
10842021-09-13 Jason Merrill <jason@redhat.com>
1085
1086 * c.opt: Add -Winterference-size.
1087 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1088 and __GCC_CONSTRUCTIVE_SIZE.
1089
a26206ec
GA
10902021-09-10 Jakub Jelinek <jakub@redhat.com>
1091
1092 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1093 * c-omp.c: Include gimple-fold.h.
1094 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1095 OpenMP 5.1 atomics.
1096
f84e2f0b
GA
10972021-09-09 qing zhao <qing.zhao@oracle.com>
1098
1099 * c-attribs.c (handle_uninitialized_attribute): New function.
1100 (c_common_attribute_table): Add "uninitialized" attribute.
1101
b6db7cd4
GA
11022021-09-08 liuhongt <hongtao.liu@intel.com>
1103
1104 * c-common.c (excess_precision_mode_join): Update below comments.
1105 (c_ts18661_flt_eval_method): Set excess_precision_type to
1106 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1107 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1108 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1109 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1110
b2748138
GA
11112021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1112
1113 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1114
7b739540
GA
11152021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1116
1117 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1118 and -gnatwu warning for the package specification.
1119
e11c6046
GA
11202021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1121
1122 * c-attribs.c (handle_unavailable_attribute): New.
1123
1e2f030b
GA
11242021-08-30 Jason Merrill <jason@redhat.com>
1125
1126 * c.opt: Add -Wmissing-requires.
1127
85d77ac4
GA
11282021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1129
1130 PR other/93067
1131 * c-opts.c (c_common_input_charset_cb): New function.
1132 (c_common_post_options): Call new function
1133 diagnostic_initialize_input_context().
1134
7c9e1645
GA
11352021-08-20 Tobias Burnus <tobias@codesourcery.com>
1136
1137 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1138 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1139 "di" and "u", respecitively; fill with BADLEN to match
1140 size of 'types'.
1141 (get_init_dynamic_hwi): Split off from ...
1142 (init_dynamic_diag_info): ... here. Call it.
1143 (init_dynamic_gfc_info): Call it.
1144
11452021-08-20 Jakub Jelinek <jakub@redhat.com>
1146
1147 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1148 * c-pragma.c (omp_pragmas): Add error directive.
1149 * c-omp.c (omp_directives): Uncomment error directive entry.
1150
6e529985
GA
11512021-08-18 Jakub Jelinek <jakub@redhat.com>
1152
1153 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1154 * c-pragma.c (omp_pragmas): Add nothing directive.
1155 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1156
2d14d64b
GA
11572021-08-17 Jakub Jelinek <jakub@redhat.com>
1158
1159 PR c++/101539
1160 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1161 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1162
11632021-08-17 Matt Jacobson <mhjacobson@me.com>
1164
1165 * c-opts.c (c_common_post_options): Default to
1166 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1167
11682021-08-17 Jakub Jelinek <jakub@redhat.com>
1169
1170 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1171 * c-pragma.c (omp_pragmas): Add scope construct.
1172 * c-omp.c (omp_directives): Uncomment scope directive entry.
1173
9d1d9fc8
GA
11742021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1175
1176 * c-cppbuiltin.c (c_cpp_builtins): Define
1177 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1178
72be20e2
GA
11792021-08-12 Jakub Jelinek <jakub@redhat.com>
1180
1181 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1182 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1183 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1184 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1185 enumerator.
1186 (c_finish_omp_masked): Declare.
1187 * c-omp.c (c_finish_omp_masked): New function.
1188 (c_omp_split_clauses): Handle combined masked constructs.
1189
4d17ca1b
GA
11902021-07-30 Jakub Jelinek <jakub@redhat.com>
1191
1192 PR c++/101539
1193 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1194 * c-common.c (c_common_reswords): Add
1195 __is_pointer_interconvertible_base_of.
1196
11972021-07-29 Richard Biener <rguenther@suse.de>
1198
1199 PR c/101512
1200 * c-common.c (c_common_mark_addressable_vec): Look through
1201 C_MAYBE_CONST_EXPR even if not at the toplevel.
1202
af3f12e6
GA
12032021-07-27 Martin Sebor <msebor@redhat.com>
1204
1205 PR c/101585
1206 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1207
ead235f6
GA
12082021-07-23 Jakub Jelinek <jakub@redhat.com>
1209
1210 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1211 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1212 and later.
1213
12142021-07-23 Jakub Jelinek <jakub@redhat.com>
1215
1216 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1217 PRAGMA_OMP__LAST_ enumerators.
1218
419c6c68
GA
12192021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1220 Joseph Myers <joseph@codesourcery.com>
1221 Cesar Philippidis <cesar@codesourcery.com>
1222
1223 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1224
92d45509
GA
12252021-07-20 Martin Sebor <msebor@redhat.com>
1226
1227 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1228 by-const-reference.
1229 * c-common.h (c_build_shufflevector): Same.
1230
87277b6a
GA
12312021-07-16 Andrew Pinski <apinski@marvell.com>
1232
1233 PR c/101453
1234 * c-common.c (parse_optimize_options): Use the correct
1235 size for buffer.
1236
d97d71a1
GA
12372021-07-15 Martin Sebor <msebor@redhat.com>
1238
1239 PR c/101289
1240 PR c/97548
1241 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1242
c4fee1c6
GA
12432021-07-14 Jason Merrill <jason@redhat.com>
1244
1245 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1246
6fba0eea
GA
12472021-07-06 Martin Sebor <msebor@redhat.com>
1248
1249 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1250 (gcc_cdiag_char_table): Same.
1251 (gcc_cxxdiag_char_table): Same.
1252
7a60a6e8
GA
12532021-07-02 Jakub Jelinek <jakub@redhat.com>
1254
1255 * c-common.h (enum c_omp_directive_kind): New enum.
1256 (struct c_omp_directive): New type.
1257 (c_omp_categorize_directive): Declare.
1258 * c-omp.c (omp_directives): New variable.
1259 (c_omp_categorize_directive): New function.
1260
bea7c16a
GA
12612021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1262
1263 * c-ada-spec.c (packed_layout): New global variable.
1264 (dump_ada_declaration): Set it upon seeing a packed record type.
1265 Do not put the "aliased" keyword if it is set.
1266 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1267
12682021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1269
1270 * c-ada-spec.c (check_name): Rename into...
1271 (check_type_name_conflict): ...this. Minor tweak.
1272 (dump_ada_function_declaration): Adjust to above renaming.
1273 (dump_ada_array_domains): Fix oversight.
1274 (dump_ada_declaration): Call check_type_name_conflict for variables.
1275
90708f87
GA
12762021-06-25 Martin Sebor <msebor@redhat.com>
1277
1278 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1279 (c_common_truthvalue_conversion): Replace direct uses of
1280 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1281 copy_no_warning.
1282 (check_function_arguments_recurse): Same.
1283 * c-gimplify.c (c_gimplify_expr): Same.
1284 * c-warn.c (overflow_warning): Same.
1285 (warn_logical_operator): Same.
1286 (warn_if_unused_value): Same.
1287 (do_warn_unused_parameter): Same.
1288
9aa8327e
GA
12892021-06-24 Jakub Jelinek <jakub@redhat.com>
1290
1291 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1292 C_ORT_OMP_TARGET.
1293 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1294 combined target constructs also add map (always, tofrom:) clause.
1295
ede6c356
GA
12962021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1297
1298 * c-attribs.c (common_handle_aligned_attribute): Remove short
1299 circuit and dead code.
1300
8dc48181
GA
13012021-06-14 Jonathan Wakely <jwakely@redhat.com>
1302
1303 PR c++/101052
1304 * known-headers.cc (get_stdlib_header_for_name): Add known
1305 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1306 exit, and getenv.
1307
8b8c3912
GA
13082021-06-12 Jason Merrill <jason@redhat.com>
1309
1310 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1311
f16f65f8
GA
13122021-06-11 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR c++/100974
1315 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1316 -std=c++2b for P1938R3 consteval if support.
1317
4f625f47
GA
13182021-06-09 Jason Merrill <jason@redhat.com>
1319
1320 PR c++/100879
1321 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1322 warning.
1323
438aac59
GA
13242021-06-07 Martin Liska <mliska@suse.cz>
1325
1326 * c-target.def: Split long lines and replace them
1327 with '\n\'.
1328
600f90cb
GA
13292021-06-04 Martin Sebor <msebor@redhat.com>
1330
1331 PR c/100783
1332 * c-attribs.c (positional_argument): Bail on erroneous types.
1333
13342021-06-04 Martin Sebor <msebor@redhat.com>
1335
1336 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1337 for element presence.
1338
440c8a0a
GA
13392021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1340
1341 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1342 (dump_ada_decl_name): Likewise.
1343 (dump_anonymous_type_name): Remove parent parameter and adjust.
1344 (dump_sloc): Minor tweak.
1345 (dump_ada_array_type): Remove type parameter and adjust.
1346 (dump_ada_enum_type): Remove parent parameter and adjust.
1347 (dump_ada_node): Adjust calls to above functions.
1348 (dumped_anonymous_types): New global variable.
1349 (dump_nested_types_1): Rename into...
1350 (dump_nested_types): ...this.
1351 (dump_nested_type): Remove parent and dumped_types parameters.
1352 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1353 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1354 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1355
13562021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1357
1358 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1359 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1360
13612021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1362
1363 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1364 (htable_t): New typedef.
1365 (overloaded_names): Use it.
1366 (add_name): New function.
1367 (init_overloaded_names): Use add_name to populate the table and add
1368 special cases for sigaction and stat.
1369 (overloaded_name_p): Rename into...
1370 (overloading_index): ...this. Do not initialize overloaded_names table
1371 here. Return the index or zero.
1372 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1373 but add an overloading suffix instead.
1374 (dump_ada_specs): Initialize overloaded_names tables here.
1375
b75978d1
GA
13762021-06-01 Martin Liska <mliska@suse.cz>
1377
1378 PR other/100759
1379 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1380 to a situation where we are not in processing of an optimize
1381 pragma.
1382 * c-pragma.c (handle_pragma_pop_options): Restore target
1383 options.
1384
ee682192
GA
13852021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1386
1387 PR testsuite/100749
1388 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1389
13902021-05-31 Richard Biener <rguenther@suse.de>
1391
1392 PR c++/88601
1393 * c-common.c: Include tree-vector-builder.h and
1394 vec-perm-indices.h.
1395 (c_common_reswords): Add __builtin_shufflevector.
1396 (c_build_shufflevector): New funtion.
1397 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1398 (c_build_shufflevector): Declare.
1399
48166757
GA
14002021-05-28 Jakub Jelinek <jakub@redhat.com>
1401
1402 PR middle-end/99928
1403 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1404 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1405
14062021-05-28 Tobias Burnus <tobias@codesourcery.com>
1407
1408 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1409
2bc6dace
GA
14102021-05-25 Martin Liska <mliska@suse.cz>
1411
1412 PR tree-optimization/92860
1413 PR target/99592
1414 * c-attribs.c (handle_optimize_attribute): Save target node
1415 before calling parse_optimize_options and save it in case
1416 it changes.
1417 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1418 (handle_pragma_pop_options): Likewise here.
1419
14202021-05-25 Martin Liska <mliska@suse.cz>
1421
1422 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1423
14242021-05-25 Jakub Jelinek <jakub@redhat.com>
1425
1426 PR middle-end/99928
1427 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1428 combined with simd and not with taskloop or for.
1429
2832d51b
GA
14302021-05-21 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR middle-end/99928
1433 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1434 on firstprivate clause copy going to target construct, and for
1435 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1436
ea34e2ed
GA
14372021-05-20 Jonathan Wakely <jwakely@redhat.com>
1438
1439 * c.opt (Wc++11-extensions, Wc++14-extensions)
1440 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1441 options.
1442
14432021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1444
1445 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1446
14472021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1448
1449 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1450 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1451 (pch_init): Renamed member.
1452 (c_common_valid_pch): Adjust access to debug_type_names.
1453
65f32e5d
GA
14542021-05-19 Martin Sebor <msebor@redhat.com>
1455
1456 PR c/100619
1457 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1458 bounds.
1459
a8daf9a1
GA
14602021-05-18 Richard Biener <rguenther@suse.de>
1461
1462 PR c/100547
1463 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1464 Reword existing nunit diagnostic.
1465
a7ffc1ef
GA
14662021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1467
1468 * c-common.c (braced_list_to_string): Return CTOR unchanged
1469 if host and target character sizes don't match.
1470
87a7d10c
GA
14712021-05-14 Martin Liska <mliska@suse.cz>
1472
1473 * c.opt: Add Warning keyword for 2 options.
1474
f9af11c7
GA
14752021-05-13 Martin Liska <mliska@suse.cz>
1476
1477 PR middle-end/100504
1478 * c-attribs.c (handle_target_clones_attribute): Expect a string
1479 argument to target_clone argument.
1480
037e3661
GA
14812021-05-11 Joseph Myers <joseph@codesourcery.com>
1482
1483 * c-lex.c (interpret_float): Handle digit separators for C2X.
1484
aa891c56
GA
14852021-05-10 Martin Liska <mliska@suse.cz>
1486
1487 * c-ada-spec.c (print_destructor): Use startswith
1488 function instead of strncmp.
1489 (dump_ada_declaration): Likewise.
1490 * c-common.c (disable_builtin_function): Likewise.
1491 (def_builtin_1): Likewise.
1492 * c-format.c (check_tokens): Likewise.
1493 (check_plain): Likewise.
1494 (convert_format_name_to_system_name): Likewise.
1495
e4ff4ffb
GA
14962021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1497
1498 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1499 complex divide
1500
c0fa3f2f
GA
15012021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1502 Nathan Sidwell <nathan@codesourcery.com>
1503 Tom de Vries <vries@codesourcery.com>
1504 Julian Brown <julian@codesourcery.com>
1505 Kwok Cheung Yeung <kcy@codesourcery.com>
1506
1507 * c.opt (Wopenacc-parallelism): New.
1508
6e81e015
GA
15092021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1510
1511 * c.opt (fopenacc-kernels=): Remove.
1512
019a9220
GA
15132021-04-08 Jakub Jelinek <jakub@redhat.com>
1514
1515 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1516 occured -> occurred.
1517 (check_alignment_of_packed_member): Fix a comment typo,
1518 memeber -> member.
1519 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1520 and onless -> unless.
1521 (warn_parm_array_mismatch): Fix comment typos, declaratation
1522 -> declaration and woud -> would. Fix up comment indentation.
1523
15242021-04-08 Martin Sebor <msebor@redhat.com>
1525
1526 PR middle-end/99883
1527 * c.opt (Wmismatched-new-delete): Correct spelling.
1528
b1da9916
GA
15292021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1530
1531 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1532 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1533 enumeral types use again the type name for the enumeration constants.
1534 (dump_ada_node): Adjust call to dump_ada_enum_type.
1535 (dump_nested_type): Likewise.
1536
f1607029
GA
15372021-04-01 Jason Merrill <jason@redhat.com>
1538
1539 PR c++/98481
1540 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1541
4493b1c1
GA
15422021-03-25 Jakub Jelinek <jakub@redhat.com>
1543
1544 PR c++/99565
1545 * c-warn.c (do_warn_duplicated_branches): Pass also
1546 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1547
6af7b307
GA
15482021-03-20 Jakub Jelinek <jakub@redhat.com>
1549
1550 PR debug/99230
1551 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1552
ceae9533
GA
15532021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1554
1555 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1556 after entering the separate class package, if any.
1557
67f10d28
GA
15582021-03-04 Richard Biener <rguenther@suse.de>
1559
1560 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1561 Handle ERROR_MARK.
1562
15632021-03-04 Jakub Jelinek <jakub@redhat.com>
1564
1565 PR c/99325
1566 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1567 (token_streamer::stream) Likewise.
1568 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1569 UNKNOWN_LOCATION.
1570
f3641ac7
GA
15712021-03-03 Jakub Jelinek <jakub@redhat.com>
1572
1573 PR c/99324
1574 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1575 instead of mark_addressable. Fix a comment typo -
1576 neutrallly -> neutrally.
1577
2c83c3fb
GA
15782021-02-28 Jakub Jelinek <jakub@redhat.com>
1579
1580 PR c/99304
1581 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1582 message - refernced -> referenced. Remove superfluous space before
1583 closing paren of function calls.
1584
daa68844
GA
15852021-02-25 Nathan Sidwell <nathan@acm.org>
1586
1587 PR c++/99166
1588 * c.opt (-flang-info-module-cmi): Renamed option.
1589
50352c6c
GA
15902021-02-19 Nathan Sidwell <nathan@acm.org>
1591
1592 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1593
bf81237e
GA
15942021-02-18 H.J. Lu <hjl.tools@gmail.com>
1595
1596 PR target/99113
1597 * c-attribs.c (c_common_attribute_table): Add the "retain"
1598 attribute.
1599 (handle_retain_attribute): New function.
1600
0e804ce3
GA
16012021-02-16 Marek Polacek <polacek@redhat.com>
1602
1603 PR c++/99062
1604 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1605 alignment argument is non-negative. Tweak a warning message.
1606
fab095da
GA
16072021-02-12 Martin Sebor <msebor@redhat.com>
1608
1609 PR c/99055
1610 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1611 print_generic_expr_to_str.
1612
4b37c3ea
GA
16132021-02-10 Richard Biener <rguenther@suse.de>
1614
1615 * c-common.c (parse_optimize_options): Free decoded_options.
1616
a19dd5e6
GA
16172021-02-04 emsr <3dw4rd@verizon.net>
1618
1619 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1620
9faaa807
GA
16212021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1622
1623 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1624 * c-lex.c (interpret_integer): Set node type for size literal.
1625
85d04a2e
GA
16262021-01-28 Jakub Jelinek <jakub@redhat.com>
1627
1628 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1629 draft from description.
1630 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1631
e62bb7f0
GA
16322021-01-26 Paul Fee <paul.f.fee@gmail.com>
1633
1634 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1635 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1636 and -std=gnu++2b
1637 * c-opts.c (set_std_cxx23): New.
1638 (c_common_handle_option): Set options when -std=c++23 is enabled.
1639 (c_common_post_options): Adjust comments.
1640 (set_std_cxx20): Likewise.
1641
161e4c08
GA
16422021-01-25 Martin Sebor <msebor@redhat.com>
1643
1644 PR c++/98646
1645 * c-common.c (check_nonnull_arg): Adjust warning text.
1646
4c9bcd5c
GA
16472021-01-17 Martin Sebor <msebor@redhat.com>
1648
1649 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1650 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1651
59cf67d1
GA
16522021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1653
1654 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1655 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1656
2f7f0d32
GA
16572021-01-15 Jakub Jelinek <jakub@redhat.com>
1658
1659 PR tree-optimization/98597
1660 * c-pretty-print.c: Include options.h.
1661 (c_fold_indirect_ref_for_warn): New function.
1662 (print_mem_ref): Use it. If it returns something that has compatible
1663 type and is TBAA compatible with zero offset, print it and return,
1664 otherwise print it using offsetof syntax or array ref syntax. Fix up
1665 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1666 argument has pointer to array type. Print pointers using the standard
1667 formatting.
1668
6851dda2
GA
16692021-01-12 Martin Sebor <msebor@redhat.com>
1670
1671 PR c/98597
1672 PR c/98592
1673 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1674 has pointer type. Remove redundant code. Avoid calling
1675 gimple_canonical_types_compatible_p.
1676
7d187e4f
GA
16772021-01-07 Martin Sebor <msebor@redhat.com>
1678
1679 PR middle-end/98578
1680 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1681 Avoid assuming acces type's size is constant. Correct condition
1682 guarding the printing of a parenthesis.
1683
942ae5be
GA
16842021-01-06 Martin Sebor <msebor@redhat.com>
1685
1686 PR c++/95768
1687 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1688 SSA_NAMEs print VLA names and GIMPLE defining statements.
1689 (print_mem_ref): New function.
1690 (c_pretty_printer::unary_expression): Call it.
1691
16922021-01-06 Richard Biener <rguenther@suse.de>
1693
1694 PR tree-optimization/95582
1695 * c-attribs.c (c_common_attribute_table): Add entry for
1696 signed_bool_precision.
1697 (handle_signed_bool_precision_attribute): New.
1698
8daa719b
GA
16992020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1700
1701 * c.opt: Add -stdlib= option and enumerations for
1702 libstdc++ and libc++.
1703
eefe499f
GA
17042020-12-16 Martin Liska <mliska@suse.cz>
1705
1706 * c.opt: Remove usage of Report.
1707
d52945ce
GA
17082020-12-14 Martin Sebor <msebor@redhat.com>
1709
1710 PR middle-end/98166
1711 PR c++/57111
1712 PR middle-end/98160
1713 * c-attribs.c (maybe_add_noinline): New function.
1714 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1715 Implicitly add attribute noinline to functions not declared inline
1716 and warn on those.
1717
ca2bd949
GA
17182020-12-09 Tobias Burnus <tobias@codesourcery.com>
1719
1720 * c-pragma.c (omp_pragmas): Add 'allocate'.
1721 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1722
f6e8e279
GA
17232020-12-08 Jakub Jelinek <jakub@redhat.com>
1724
1725 PR c++/98187
1726 * c-pragma.c (omp_pragmas): Remove "master".
1727 (omp_pragmas_simd): Add "master".
1728
bc8a7013
GA
17292020-12-07 Marek Polacek <polacek@redhat.com>
1730
1731 PR c++/98126
1732 * c-common.c (verify_tree_lim_r): New function.
1733 (verify_sequence_points): Use it. Use nullptr instead of 0.
1734
b8dd0ef7
GA
17352020-12-03 Martin Sebor <msebor@redhat.com>
1736
1737 PR c++/90629
1738 PR middle-end/94527
1739 * c-attribs.c (handle_dealloc_attribute): New function.
1740 (handle_malloc_attribute): Handle argument forms of attribute.
1741 * c.opt (-Wmismatched-dealloc): New option.
1742 (-Wmismatched-new-delete): New option.
1743
17442020-12-03 Jakub Jelinek <jakub@redhat.com>
1745
1746 PR libstdc++/93121
1747 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1748 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1749
e0f5e792
GA
17502020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1751
1752 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1753 {__GNUC_EXECUTION_CHARSET_NAME} and
1754 _WIDE_EXECUTION_CHARSET_NAME} macros.
1755
17562020-12-01 Nathan Sidwell <nathan@acm.org>
1757
1758 * c-common.c (module, import, export): New internal tokens (with
1759 trailing space).
1760 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1761 them.
1762 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1763 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1764
17652020-12-01 Nathan Sidwell <nathan@acm.org>
1766
1767 * c-opts.c (c_common_init_options): Ask for module dependencies.
1768 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1769 * c-pch.c (c_common_valid_pch): ... does not play with C++
1770 modules.
1771 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1772 options.
1773 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1774 (fmodule-only, fmodule-mapper, fmodule-lazy)
1775 (fmodule-version-ignore, Winvalid-imported-macros)
1776 (flang-info-include-translate, flang-info-include-translate-not):
1777 New options
1778
5fbf0ecb
GA
17792020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1780
1781 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1782 (dump_ada_structure): Also deal with convention, unchecked union and
1783 bit-field for nested types. In the latter case, print an Alignment
1784 aspect along with the Pack aspect.
1785
360258da
GA
17862020-11-25 Martin Sebor <msebor@redhat.com>
1787
1788 PR bootstrap/94982
1789 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1790 -Wformat-diag.
1791
1e2c9a27
GA
17922020-11-24 Martin Sebor <msebor@redhat.com>
1793
1794 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1795
8e6198d0
GA
17962020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1797
1798 * c-attribs.c (handle_special_var_sec_attribute): New.
1799 (handle_noinit_attribute): Remove.
1800 (attr_noinit_exclusions): Rename to...
1801 (attr_section_exclusions): ...this, and add "persistent" attribute
1802 exclusion.
1803 (c_common_attribute_table): Add "persistent" attribute.
1804
7a97e2fc
GA
18052020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1806
1807 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1808 Treat opaque types like other types.
1809 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1810 supported types.
1811
82e5048e
GA
18122020-11-20 Martin Sebor <msebor@redhat.com>
1813
1814 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1815 with fewer arguments.
1816
18172020-11-20 Martin Sebor <msebor@redhat.com>
1818
1819 PR middle-end/97879
1820 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1821 Error out on invalid modes.
1822
18232020-11-20 Jakub Jelinek <jakub@redhat.com>
1824
1825 PR libstdc++/88101
1826 * c-common.c (check_builtin_function_arguments): Handle
1827 BUILT_IN_CLEAR_PADDING.
1828
25bb75f8
GA
18292020-11-18 Nathan Sidwell <nathan@acm.org>
1830
1831 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1832
4dabb037
GA
18332020-11-17 Nathan Sidwell <nathan@acm.org>
1834
1835 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1836 after newly-added CTI_MODULE_HWM.
1837
18382020-11-17 Joseph Myers <joseph@codesourcery.com>
1839
1840 * c-cppbuiltin.c (builtin_define_float_constants): Define
1841 "*_IS_IEC_60559__" macros.
1842
18432020-11-17 Nathan Sidwell <nathan@acm.org>
1844
1845 * c-lex.c: #include "langhooks.h".
1846 (cb_undef): Maybe call preprocess_undef lang hook.
1847 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1848 lang hook.
1849 (push_command_line_include): Maybe call preprocess_main_file lang
1850 hook.
1851 (cb_file_change): Likewise.
1852 * c-ppoutput.c: #include "langhooks.h.
1853 (scan_translation_unit): Maybe call preprocess_token lang hook.
1854 (class do_streamer): New, derive from token_streamer.
1855 (directives_only_cb): Data pointer is do_streamer, call
1856 preprocess_token lang hook.
1857 (scan_translation_unit_directives_only): Use do_streamer.
1858 (print_line_1): Move src_line recording to after string output.
1859 (cb_undef): Maybe call preprocess_undef lang hook.
1860
18612020-11-17 Nathan Sidwell <nathan@acm.org>
1862
1863 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1864 code duplicating that functionality.
1865
18662020-11-17 Jakub Jelinek <jakub@redhat.com>
1867
1868 PR c/90628
1869 * c-common.c (check_builtin_function_arguments)
1870 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1871 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1872 for more builtins and argument positions.
1873
29c5d9ce
GA
18742020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1875
1876 PR objc/97854
1877 * stub-objc.c: Include c-common.h to declare enum rid.
1878
77f67db2
GA
18792020-11-13 Jakub Jelinek <jakub@redhat.com>
1880
1881 PR c++/63287
1882 * c-cppbuiltin.c: Include configargs.h.
1883 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1884 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1885 "single".
1886
18872020-11-13 Gergö Barany <gergo@codesourcery.com>
1888 Thomas Schwinge <thomas@codesourcery.com>
1889
1890 * c.opt (fopenacc-kernels): Add.
1891
18922020-11-13 Jason Merrill <jason@redhat.com>
1893
1894 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1895
18962020-11-13 Piotr H. Dabrowski <phd@phd.re>
1897
1898 PR c++/91318
1899 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1900
19012020-11-13 Martin Liska <mliska@suse.cz>
1902
1903 * c-attribs.c (build_attr_access_from_parms): Format properly.
1904
19052020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1906
1907 PR objc/90707
1908 * c-common.c (c_common_reswords): null_unspecified, nullable,
1909 nonnull, null_resettable: New keywords.
1910 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1911 RID_NONNULL, RID_NULL_RESETTABLE: New.
1912 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1913 ranges accepted for property attributes.
1914 * c-attribs.c (handle_objc_nullability_attribute): New.
1915 * c-objc.h (enum objc_property_attribute_group): Add
1916 OBJC_PROPATTR_GROUP_NULLABLE.
1917 (enum objc_property_attribute_kind):Add
1918 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1919 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1920
19212020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1922
1923 PR objc/77404
1924 * c-attribs.c (handle_objc_root_class_attribute): New
1925 * c-objc.h (objc_start_class_interface): Add a location
1926 value for the position of the class name.
1927 * c.opt: Add Wobjc-root-class.
1928 * stub-objc.c (objc_start_class_interface): Add a location
1929 value for the position of the class name.
1930
a5a11525
GA
19312020-11-12 Joseph Myers <joseph@codesourcery.com>
1932
1933 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1934 Allow scope for C. Handle standard attributes for C. Do not
1935 accept unscoped attributes if std_syntax and not handled as
1936 standard attributes.
1937 * c-common.h (c_common_has_attribute): Update prototype.
1938
19392020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1940
1941 PR pch/86674
1942 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1943 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1944
0f5f9ed5
GA
19452020-11-11 Patrick Palka <ppalka@redhat.com>
1946
1947 PR c++/88115
1948 * c-opts.c (c_common_post_options): Update latest_abi_version.
1949
bb622641
GA
19502020-11-10 Jakub Jelinek <jakub@redhat.com>
1951
1952 PR c/97748
1953 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1954 to false.
1955 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1956 recursively and just return true instead of warning if it is true.
1957 Handle COMPLEX_EXPR.
1958
19592020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1960
1961 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1962 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1963 (c_omp_adjust_map_clauses): New function.
1964
2bee28dd
GA
19652020-11-09 Marek Polacek <polacek@redhat.com>
1966
1967 DR 1914
1968 * c-common.c (attribute_fallthrough_p): Tweak the warning
1969 message.
1970
19712020-11-09 Patrick Palka <ppalka@redhat.com>
1972
1973 * c-pragma.c (handle_pragma_diagnostic): Split the
1974 unknown-option -Wpragmas diagnostic into a warning and a
1975 subsequent note containing a spelling suggestion. Avoid
1976 computing the suggestion if -Wpragmas warnings are being
1977 suppressed.
1978
19792020-11-09 Patrick Palka <ppalka@redhat.com>
1980
1981 PR testsuite/97117
1982 * c-indentation.c (get_visual_column): Remove location_t
1983 parameter. Move the column-tracking diagnostic code from here
1984 to ...
1985 (should_warn_for_misleading_indentation): ... here, before the
1986 early exit for when the loci are not all distinct. Don't pass a
1987 location_t argument to get_visual_column.
1988 (assert_get_visual_column_succeeds): Don't pass a location_t
1989 argument to get_visual_column.
1990 (assert_get_visual_column_fails): Likewise.
1991
fb95de7a
GA
19922020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1993
1994 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1995 of keywords accepted in @property attribute contexts.
1996 * c-objc.h (enum objc_property_attribute_group): Add
1997 OBJC_PROPATTR_GROUP_CLASS.
1998 (enum objc_property_attribute_kind): Add
1999 OBJC_PROPERTY_ATTR_CLASS.
2000
2da7ee05
GA
20012020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2002
2003 * c-common.c (c_common_reswords): Add 'atomic' property
2004 attribute.
2005 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2006 property attributes.
2007
20082020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2009
2010 * c-attribs.c (handle_nsobject_attribute): New.
2011 * c.opt: Add WNSObject-attribute.
2012
44cab2d8
GA
20132020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2014
2015 * c-objc.h (enum objc_property_attribute_group): New
2016 (enum objc_property_attribute_kind): New.
2017 (OBJC_PROPATTR_GROUP_MASK): New.
2018 (struct property_attribute_info): Small class encapsulating
2019 parser output from property attributes.
2020 (objc_prop_attr_kind_for_rid): New
2021 (objc_add_property_declaration): Simplify interface.
2022 * stub-objc.c (enum rid): Dummy type.
2023 (objc_add_property_declaration): Simplify interface.
2024 (objc_prop_attr_kind_for_rid): New.
2025
20262020-11-06 Nathan Sidwell <nathan@acm.org>
2027
2028 * c-ada-spec.c (collect_ada_nodes): Rename
2029 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2030 (collect_ada_node): Likewise.
2031 (dump_forward_type): Likewise.
2032 * c-common.c (set_underlying_type): Rename
2033 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2034 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2035
20362020-11-06 Jakub Jelinek <jakub@redhat.com>
2037
2038 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2039
0cfd9109
GA
20402020-11-05 Marek Polacek <polacek@redhat.com>
2041
2042 PR c++/97675
2043 * c.opt (Wexceptions): New option.
2044
20452020-11-05 Marek Polacek <polacek@redhat.com>
2046
2047 PR c++/25814
2048 * c.opt (Wvexing-parse): New option.
2049
35c125cb
GA
20502020-11-04 Jakub Jelinek <jakub@redhat.com>
2051
2052 PR c++/97670
2053 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2054 underlying decl to clear in the allocate_head bitmap.
2055
20562020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2057
2058 * c-objc.h (objc_non_constant_expr_p): New.
2059 * stub-objc.c (objc_non_constant_expr_p): New.
2060
fd2325ea
GA
20612020-11-03 Nathan Sidwell <nathan@acm.org>
2062
2063 * c.opt (MQ,MT): Reword description to be make-agnostic.
2064
88ce3d5f
GA
20652020-11-02 Nathan Sidwell <nathan@acm.org>
2066
2067 * c-opts.c (c_common_post_options): Move var decl to its
2068 initialization point.
2069
20702020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2071
2072 * c-lex.c (c_lex_with_flags): When combining '@' with a
2073 keyword for Objective-C, combine the location ranges too.
2074
20752020-10-30 Qing Zhao <qing.zhao@oracle.com>
2076 H.J.Lu <hjl.tools@gmail.com>
2077
2078 * c-attribs.c (c_common_attribute_table): Add new attribute
2079 zero_call_used_regs.
2080 (handle_zero_call_used_regs_attribute): New function.
2081
e93aae4a
GA
20822020-10-28 Marek Polacek <polacek@redhat.com>
2083
2084 PR c++/97573
2085 * c-opts.c (c_common_post_options): In C++20, turn on
2086 -Wdeprecated-enum-enum-conversion and
2087 -Wdeprecated-enum-float-conversion.
2088 * c.opt (Wdeprecated-enum-enum-conversion,
2089 Wdeprecated-enum-float-conversion): New options.
2090 (Wenum-conversion): Allow for C++ too.
2091
20922020-10-28 Jakub Jelinek <jakub@redhat.com>
2093
2094 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2095 * c-omp.c: Include bitmap.h.
2096 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2097
f19e7c8d
GA
20982020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2099
2100 * c-common.c (__is_nothrow_assignable): New.
2101 (__is_nothrow_constructible): Likewise.
2102 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2103 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2104
efe71fcc
GA
21052020-10-23 Jan Hubicka <hubicka@ucw.cz>
2106
2107 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2108
21092020-10-23 Marek Polacek <polacek@redhat.com>
2110
2111 PR c++/91741
2112 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2113 (c_common_init_ts): Likewise.
2114 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2115 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2116 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2117 (maybe_warn_sizeof_array_div): New function.
2118 * c.opt (Wsizeof-array-div): New option.
2119
21202020-10-23 Martin Sebor <msebor@redhat.com>
2121
2122 PR c/97463
2123 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2124
56ddd5e2
GA
21252020-10-22 Martin Liska <mliska@suse.cz>
2126
2127 PR c/94722
2128 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2129 (handle_stack_protect_attribute): Add error message for a
2130 no_stack_protector function.
2131
21322020-10-22 Martin Liska <mliska@suse.cz>
2133
2134 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2135
21362020-10-22 Jan Hubicka <hubicka@ucw.cz>
2137
2138 * c-gimplify.c: Include tree-nested.h
2139 (c_genericize): Update for new nested function info.
2140
b2698c21
GA
21412020-10-14 Martin Sebor <msebor@redhat.com>
2142
2143 PR c/97413
2144 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2145 bounds in an extra list.
2146
7e9282ae
GA
21472020-10-05 Richard Biener <rguenther@suse.de>
2148 Jakub Jelinek <jakub@redhat.com>
2149
2150 PR c++/97197
2151 * c-pretty-print.c: Include langhooks.h.
2152 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2153 expression.
2154 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2155 unary_expression.
2156 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2157
660bfe61
GA
21582020-09-30 Martin Sebor <msebor@redhat.com>
2159
2160 PR middle-end/97189
2161 * c-attribs.c (append_access_attr): Use the function declaration
2162 location for a warning about an attribute access argument.
2163
93bca37c
GA
21642020-09-29 Marek Polacek <polacek@redhat.com>
2165
2166 PR c++/94695
2167 * c.opt (Wrange-loop-construct): New option.
2168
82b77dee
GA
21692020-09-23 Martin Sebor <msebor@redhat.com>
2170
2171 PR c/97131
2172 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2173
21742020-09-23 Marek Polacek <polacek@redhat.com>
2175
2176 PR c/97125
2177 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2178 after loops and other structured control constructs have been lowered.
2179
521d2711
GA
21802020-09-22 Jakub Jelinek <jakub@redhat.com>
2181
2182 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2183 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2184
44135373
GA
21852020-09-21 Marek Polacek <polacek@redhat.com>
2186
2187 * c.opt (Wctad-maybe-unsupported): New option.
2188
2fe5b7d1
GA
21892020-09-19 Martin Sebor <msebor@redhat.com>
2190
2191 PR c/50584
2192 * c-common.h (warn_parm_array_mismatch): Declare new function.
2193 (has_attribute): Move declaration of an existing function.
2194 (build_attr_access_from_parms): Declare new function.
2195 * c-warn.c (parm_array_as_string): Define new function.
2196 (plus_one): Define new function.
2197 (warn_parm_ptrarray_mismatch): Define new function.
2198 (warn_parm_array_mismatch): Define new function.
2199 (vla_bound_parm_decl): New function.
2200 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2201 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2202 qualifiers here...
2203 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2204 them in brackets here. Also print [static]. Strip extraneous
2205 expressions from VLA bounds.
2206
22072020-09-19 Martin Sebor <msebor@redhat.com>
2208
2209 PR c/50584
2210 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2211 (handle_argspec_attribute): New function.
2212 (get_argument, get_argument_type): New functions.
2213 (append_access_attrs): Add overload. Handle internal attribute
2214 representation in addition to external.
2215 (handle_access_attribute): Handle internal attribute representation
2216 in addition to external.
2217 (build_attr_access_from_parms): New function.
2218
22192020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2220
2221 * c-gimplify.c (genericize_c_loop): Rewrite to match
2222 c_finish_loop in c-typeck.c.
2223
22242020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2225
2226 * c-common.c (c_block_may_fallthrough): New, split from
2227 cxx_block_may_fallthrough in the cp front end.
2228 (c_common_init_ts): Move handling of loop and switch-related
2229 statements here from the cp front end.
2230 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2231 cp front end.
2232 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2233 * c-common.h (c_block_may_fallthru): Declare.
2234 (bc_state_t): Move here from cp front end.
2235 (save_bc_state, restore_bc_state): Declare.
2236 (c_genericize_control_stmt): Declare.
2237 (WHILE_COND, WHILE_BODY): Likewise.
2238 (DO_COND, DO_BODY): Likewise.
2239 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2240 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2241 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2242 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2243 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2244 * c-dump.c (dump_stmt): Copy from cp front end.
2245 (c_dump_tree): Move code to handle structured loop and switch
2246 tree nodes here from cp front end.
2247 * c-gimplify.c: Adjust includes.
2248 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2249 cp front end.
2250 (save_bc_state, restore_bc_state): New functions using old code
2251 from cp front end.
2252 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2253 (genericize_c_loop): Move from cp front end.
2254 (genericize_for_stmt, genericize_while_stmt): Likewise.
2255 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2256 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2257 (genericize_omp_for_stmt): Likewise.
2258 (c_genericize_control_stmt): New function using code split from
2259 cp front end.
2260 (c_genericize_control_r): New.
2261 (c_genericize): Call walk_tree with c_genericize_control_r.
2262 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2263 structured loop and switch tree nodes here from cp front end.
2264
2aad20c0
GA
22652020-09-17 Patrick Palka <ppalka@redhat.com>
2266
2267 PR c/80076
2268 * c-indentation.c (should_warn_for_misleading_indentation): Move
2269 declarations of local variables closer to their first use.
2270 Handle virtual token locations by resolving them to their
2271 respective macro expansion points. If all three tokens are
2272 produced from the same macro expansion, then instead use their
2273 loci within the macro definition.
2274
ecde1b0a
GA
22752020-09-16 Martin Sebor <msebor@redhat.com>
2276
2277 PR c/78666
2278 PR c/96126
2279 * c-attribs.c (validate_attr_args): New function.
2280 (validate_attr_arg): Same.
2281 (handle_section_attribute): Call it. Introduce a local variable.
2282 (handle_alloc_size_attribute): Same.
2283 (handle_alloc_align_attribute): Same.
2284
50a71cd0
GA
22852020-09-14 Jakub Jelinek <jakub@redhat.com>
2286
2287 * c-attribs.c (handle_optimize_attribute): Adjust
2288 cl_optimization_save, cl_optimization_restore and
2289 build_optimization_node callers.
2290 * c-pragma.c (handle_pragma_optimize): Adjust
2291 build_optimization_node caller.
2292 (handle_pragma_push_options): Adjust
2293 build_optimization_node and build_target_option_node callers.
2294 (handle_pragma_pop_options, handle_pragma_reset_options):
2295 Adjust cl_optimization_restore callers.
2296
8f7ea26a
GA
22972020-08-28 Martin Sebor <msebor@redhat.com>
2298
2299 * c.opt (Wstringop-overread): New option.
2300
a6493809
GA
23012020-08-11 Jakub Jelinek <jakub@redhat.com>
2302
2303 PR c/96545
2304 * c-common.c (get_atomic_generic_size): Require that first argument's
2305 type points to a complete type and use tree_fits_uhwi_p instead of
2306 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2307
48cc2e46
GA
23082020-07-31 Martin Sebor <msebor@redhat.com>
2309
2310 PR c++/96003
2311 * c-common.c (check_function_arguments_recurse): Return early when
2312 no-warning bit is set.
2313
23142020-07-31 Richard Biener <rguenther@suse.de>
2315
2316 PR debug/96383
2317 * c-common.h (c_common_finalize_early_debug): Declare.
2318 * c-common.c: Include debug.h.
2319 (c_common_finalize_early_debug): finalize_early_debug langhook
2320 implementation generating debug for extern declarations.
2321
e71dab87
GA
23222020-07-27 Nathan Sidwell <nathan@acm.org>
2323
2324 * c-common.c (try_to_locate_new_include_insertion_point): Use
2325 strcmp, not pointer equality.
2326
ae2e0bc1
GA
23272020-07-25 Martin Sebor <msebor@redhat.com>
2328
2329 PR c++/96310
2330 * c-common.c (check_nonnull_arg): Print note only when warning was
2331 issued.
2332
3ea9abca
GA
23332020-07-22 Tobias Burnus <tobias@codesourcery.com>
2334
2335 * c-omp.c (c_finish_omp_critical): Check for no name but
2336 nonzero hint provided.
2337
0933f508
GA
23382020-07-20 Jason Merrill <jason@redhat.com>
2339
2340 * c-cppbuiltin.c (c_cpp_builtins): Update
2341 __cpp_nontype_template_args for C++20.
2342
23432020-07-20 Martin Sebor <msebor@redhat.com>
2344
2345 PR c/96249
2346 * c.opt: Remove stray text.
2347
8ca07a30
GA
23482020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2349
2350 PR other/86904
2351 * c-indentation.c (should_warn_for_misleading_indentation): Get
2352 global tabstop from the new source.
2353 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2354 is now a common option.
2355 * c.opt: Likewise.
2356
a82c4c4c 23572020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2358
2359 * c.opt (Wscalar-storage-order): Add explicit variable.
2360
f60ee68d
GA
23612020-07-07 Nathan Sidwell <nathan@acm.org>
2362
2363 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2364 cpp_read_main_file.
2365 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2366 maps. Force token position to line_table's highest line.
2367 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2368 (cb_define): Always increment source line.
2369
4077d74c
GA
23702020-07-06 Martin Sebor <msebor@redhat.com>
2371
2372 PR c++/95984
2373 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2374 to stub lambda objects with null this pointer.
2375 (check_nonnull_arg): Handle C++ nullptr.
2376
b5f24739
GA
23772020-07-02 Jason Merrill <jason@redhat.com>
2378 Jakub Jelinek <jakub@redhat.com>
2379
2380 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2381
46fbb6c6
GA
23822020-06-30 Jakub Jelinek <jakub@redhat.com>
2383
2384 PR c++/95963
2385 * c-common.c (check_function_arguments_recurse): Don't crash on
2386 calls to internal functions.
2387
69273534
GA
23882020-06-28 Martin Sebor <msebor@redhat.com>
2389
2390 PR c++/86568
2391 * c-common.c (struct nonnull_arg_ctx): Add members.
2392 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2393 C++ member functions specially. Consider the this pointer implicitly
2394 nonnull.
2395 (check_nonnull_arg): Use location of argument when available.
2396 (check_function_arguments): Use nonnull_arg_ctx as argument.
2397
9a33c41f
GA
23982020-06-27 Jakub Jelinek <jakub@redhat.com>
2399
2400 PR middle-end/95903
2401 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2402 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2403 smaller precision intop operands separately.
2404
c9c05f73
GA
24052020-06-26 Marek Polacek <polacek@redhat.com>
2406
2407 * c-opts.c (c_common_init_options): Default to gnu++17.
2408
aff95ee7
GA
24092020-06-17 Jonathan Wakely <jwakely@redhat.com>
2410
bd0a89dc 2411 PR c/95378
aff95ee7
GA
2412 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2413 pointer arguments.
2414
56638b9b
GA
24152020-06-16 Jakub Jelinek <jakub@redhat.com>
2416
2417 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2418 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2419 idx members.
2420 (c_omp_is_loop_iterator): New function.
2421 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2422 if outer loop iterator is present. Perform duplicate checking through
2423 hash_set in the function rather than expecting caller to do that.
2424 Pass NULL instead of d->ppset to walk_tree_1.
2425 (c_omp_check_nonrect_loop_iv): New function.
2426 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2427 non-rectangular loop forms, diagnose multiple associated loops with
2428 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2429 (c_omp_check_loop_iv_exprs): Likewise.
2430
ec6ffbb9
GA
24312020-06-10 Martin Liska <mliska@suse.cz>
2432
2433 PR tree-optimization/92860
2434 * c-attribs.c (handle_optimize_attribute):
2435 Save global options and compare it after parsing of function
2436 attribute.
2437 * c-pragma.c (opt_stack::saved_global_options): New field.
2438 (handle_pragma_push_options): Save global_options.
2439 (handle_pragma_pop_options): Compare them after pop.
2440
b952c2cf
GA
24412020-06-09 Jakub Jelinek <jakub@redhat.com>
2442
2443 PR c/95580
2444 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2445 case when MEM_REF's first argument has type pointer to incomplete type.
2446
1a59f3db
GA
24472020-06-05 Jason Merrill <jason@redhat.com>
2448
2449 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2450 operand to POINTER_PLUS_EXPR.
2451
3add3425
GA
24522020-06-04 Martin Sebor <msebor@redhat.com>
2453
2454 PR middle-end/10138
2455 PR middle-end/95136
2456 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2457 (handle_access_attribute): Same.
2458
9a5b7438
GA
24592020-06-03 Mark Wielaard <mark@klomp.org>
2460
2461 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2462 New function.
2463 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2464 New function declaration.
2465
24662020-06-03 Mark Wielaard <mark@klomp.org>
2467
2468 * known-headers.cc (get_string_macro_hint): New function.
2469 (get_stdlib_header_for_name): Use get_string_macro_hint.
2470 (get_c_stdlib_header_for_string_macro_name): New function.
2471 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2472 New function declaration.
2473
24742020-06-03 Tobias Burnus <tobias@codesourcery.com>
2475
2476 * c-common.h (c_omp_predetermined_mapping): Declare.
2477 * c-omp.c (c_omp_predetermined_mapping): New.
2478
af114c38
MW
24792020-05-22 Mark Wielaard <mark@klomp.org>
2480
2481 * known-headers.cc (get_stdlib_header_for_name): Add a new
2482 stdlib_hint array for stdbool and stdint.
2483
45c50b6a
MW
24842020-05-22 Mark Wielaard <mark@klomp.org>
2485
2486 * known-headers.cc (get_stdlib_header_for_name): Return
2487 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2488 flag_isoc99.
2489
c22027a0
NS
24902020-05-20 Nathan Sidwell <nathan@acm.org>
2491
38a4db21
NS
2492 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2493
c22027a0
NS
2494 * c-common.c (try_to_locate_new_include_insertion_point): Use
2495 strcmp to compare filenames.
2496 * c-lex.c (init_c_lex): Move declaration to initialization.
2497 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2498 deferred count loop.
2499
29f0e90d
JM
25002020-05-15 Jason Merrill <jason@redhat.com>
2501
2502 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2503
b04445d4
JM
25042020-05-13 Jason Merrill <jason@redhat.com>
2505
2506 * c.opt (std=c++20): Make c++2a the alias.
2507 (std=gnu++20): Likewise.
2508 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2509 * c-opts.c: Adjust.
2510 * c-cppbuiltin.c: Adjust.
2511 * c-ubsan.c: Adjust.
2512 * c-warn.c: Adjust.
2513
11dd3be5
EB
25142020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2515
2516 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2517
b224c376
NS
25182020-05-08 Nathan Sidwell <nathan@acm.org>
2519
2520 Reimplement directives only processing.
2521 * c-ppoutput.c (token_streamer): Ne.
2522 (directives_only_cb): New. Swallow ...
2523 (print_lines_directives_only): ... this.
2524 (scan_translation_unit_directives_only): Reimplment using the
2525 published interface.
2526
f1d94677
MP
25272020-05-07 Marek Polacek <polacek@redhat.com>
2528
2529 * c-format.c (badwords): Add "nonstatic".
2530
9b95bb52
JJ
2531202-05-07 Jakub Jelinek <jakub@redhat.com>
2532
2533 PR c/94968
2534 * c-common.c (speculation_safe_value_resolve_params): Return false if
2535 error_operand_p (val2).
2536 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2537 Remove extraneous semicolon.
2538
530b4409 25392020-05-06 qing zhao <qing.zhao@oracle.com>
2540
2541 PR c/94230
2542 * c-indentation.c (get_visual_column): Add a hint to use the new
2543 -flarge-source-files option.
2544
b776bdca
SSF
25452020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2546
2547 * c-attribs.c (handle_vector_size_attribute): Add attribute
2548 nonnull for argument args in order to silence warning of
2549 uninitialized variable usage. Since this is local to the
2550 compilation unit and thus cannot be checked at call sides by the
2551 compiler, added an assert statement in order to verify this.
2552
6607bdd9
L
25532020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2554
2555 PR target/93492
2556 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2557 value to USHRT_MAX (65535).
2558
691eeb65
JJ
25592020-04-29 Jakub Jelinek <jakub@redhat.com>
2560
2561 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2562
26d76be7
JJ
25632020-04-27 Jakub Jelinek <jakub@redhat.com>
2564
2565 PR c/94755
2566 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2567 fncode == BUILT_IN_NONE before initialization of first_param.
2568
7291b2ed
MP
25692020-04-23 Marek Polacek <polacek@redhat.com>
2570
2571 PR c++/94733
2572 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2573 TREE_PURPOSE.
2574
58a29af8
PP
25752020-04-14 Patrick Palka <ppalka@redhat.com>
2576
2577 PR c++/85278
2578 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2579 ampersand if it's an rvalue reference type.
2580
09f04139
MS
25812020-04-13 Martin Sebor <msebor@redhat.com>
2582
2583 PR c/92326
2584 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2585 printing array bound for flexible array members.
2586
ee26baf4
IS
25872020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2588
2589 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2590 define, per n4861.
2591
75efe9cb
RB
25922020-04-02 Richard Biener <rguenther@suse.de>
2593
2594 PR c/94392
2595 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2596 for -O2 and C++11 or newer.
2597
75defde9
PP
25982020-03-28 Patrick Palka <ppalka@redhat.com>
2599
2600 * c.opt: Add -fconcepts-diagnostics-depth.
2601
52f24a9e
MS
26022020-03-27 Martin Sebor <msebor@redhat.com>
2603
2604 PR c++/94346
2605 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2606 to decl_attributes. Make handling of different kinds of entities
2607 more robust.
2608
ccacf77b
MS
26092020-03-27 Martin Sebor <msebor@redhat.com>
2610
2611 PR c++/94098
2612 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2613 here.
2614
ca6c7225
JJ
26152020-03-23 Jakub Jelinek <jakub@redhat.com>
2616
2617 PR c++/91993
2618 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2619 result being COMPOUND_EXPRs, skip to ultimate rhs.
2620
1aa22b19
RS
26212020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2622
2623 PR middle-end/94072
2624 * c-common.c (c_common_type_for_mode): Before using a registered
2625 built-in type, check that the vectorness of the type matches
2626 the vectorness of the mode.
2627
700d4cb0
JJ
26282020-03-17 Jakub Jelinek <jakub@redhat.com>
2629
2630 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2631 issue in a diagnostic message.
2632
b408e010
LH
26332020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2634
2635 * c.opt: Avoid redundancy in the help text.
2636
e78e50d5
MP
26372020-03-02 Marek Polacek <polacek@redhat.com>
2638
2639 PR c++/93958 - add missing -std=gnu++20.
2640 * c.opt: Add -std=gnu++20.
2641
649e1741
MS
26422020-03-01 Martin Sebor <msebor@redhat.com>
2643
2644 PR c++/92721
2645 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2646 (handle_access_attribute): Same.
2647
7b60f3ba
JJ
26482020-02-25 Jakub Jelinek <jakub@redhat.com>
2649
2650 PR c/93858
2651 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2652 "did you mean" hint in diagnostics.
2653
fb260504
JM
26542020-02-15 Jason Merrill <jason@redhat.com>
2655
2656 * c.opt: Add -std=c++20.
2657
1d757b09
EB
26582020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2659
2660 * c-ada-spec.c: Include bitmap.h.
2661 (dump_ada_double_name): Rename into...
2662 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2663 (dump_ada_array_type): Adjust to above renaming. Robustify.
2664 (dump_nested_types_1): New function copied from... Add dumped_types
2665 parameter and pass it down to dump_nested_type.
2666 (dump_nested_types): ...this. Remove parent parameter. Just call
2667 dump_nested_types_1 on an automatic bitmap.
2668 (dump_nested_type): Add dumped_types parameter.
2669 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2670 Adjust recursive calls and adjust to above renaming.
2671 (dump_ada_declaration): Adjust call to dump_nested_types.
2672 Tidy up and adjust to above renaming.
2673 (dump_ada_specs): Initialize and release bitmap obstack.
2674
0cc575e4
MS
26752020-02-10 Martin Sebor <msebor@redhat.com>
2676
2677 PR c/93640
2678 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2679
a59aa302
JJ
26802020-02-10 Jakub Jelinek <jakub@redhat.com>
2681
2682 PR other/93641
2683 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2684 Remove useless extra test.
2685
e464fc90
TB
26862020-02-03 Julian Brown <julian@codesourcery.com>
2687 Tobias Burnus <tobias@codesourcery.com>
2688
2689 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2690
e3b6c052
JM
26912020-01-29 Jason Merrill <jason@redhat.com>
2692
2693 PR c++/89357
2694 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2695
6d00f052
JM
26962020-01-23 Jason Merrill <jason@redhat.com>
2697
2698 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2699
8a990ffa
MS
27002020-01-23 Martin Sebor <msebor@redhat.com>
2701
2702 PR c/84919
2703 * c-common.c (check_function_arguments): Avoid overlap checking
2704 of sprintf functions.
2705
55b7df8b
JM
27062020-01-22 Jason Merrill <jason@redhat.com>
2707
2708 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2709 PR c++/40752
2710 * c-warn.c (conversion_warning): Check operands only after checking
2711 the whole expression. Don't check second operand of + for sign.
2712
c77074d0
JM
27132020-01-21 Jason Merrill <jason@redhat.com>
2714 Manuel López-Ibáñez <manu@gcc.gnu.org>
2715
2716 PR c++/40752 - useless -Wconversion with short +=.
2717 * c.opt (-Warith-conversion): New.
2718 * c-warn.c (conversion_warning): Recurse for operands of
2719 operators. Only warn about the whole expression with
2720 -Warith-conversion.
2721
731dbfc3
JM
27222020-01-21 Jason Merrill <jason@redhat.com>
2723
2724 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2725 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2726
ad1a3914
NS
27272020-01-20 Nathan Sidwell <nathan@acm.org>
2728
2729 PR preprocessor/80005
2730 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2731
49789fd0
IS
27322020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2733
2734 * c-common.c (co_await, co_yield, co_return): New.
2735 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2736 RID_CO_RETURN): New enumeration values.
2737 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2738 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2739 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2740 * c.opt (fcoroutines): New command-line switch.
2741
4bc1899b
DM
27422020-01-10 David Malcolm <dmalcolm@redhat.com>
2743
2744 * c-format.c (local_event_ptr_node): New.
2745 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2746 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2747 * c-format.h (T_EVENT_PTR): New define.
2748
f25e33fa
MS
27492020-01-10 Martin Sebor <msebor@redhat.com>
2750
2751 PR c/93132
2752 * c-attribs.c (append_access_attrs): Validate against the translated
2753 access string rather than the human-readable representation.
2754
8d9254fc
JJ
27552020-01-01 Jakub Jelinek <jakub@redhat.com>
2756
2757 Update copyright years.
2758
39292e25
EB
27592019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2760
2761 * c-ada-spec.h (decl_sloc): Delete.
2762 * c-ada-spec.c (decl_sloc): Make static.
2763
519d7496
JB
27642019-12-19 Julian Brown <julian@codesourcery.com>
2765
2766 * c-common.h (c_omp_map_clause_name): Add prototype.
2767 * c-omp.c (c_omp_map_clause_name): New function.
2768 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2769 PRAGMA_OACC_CLAUSE_DETACH.
2770
a6163563
JB
27712019-12-19 Julian Brown <julian@codesourcery.com>
2772 Maciej W. Rozycki <macro@codesourcery.com>
2773 Tobias Burnus <tobias@codesourcery.com>
2774 Thomas Schwinge <thomas@codesourcery.com>
2775
2776 * c-pragma.h (pragma_omp_clause): Add
2777 PRAGMA_OACC_CLAUSE_NO_CREATE.
2778
e8f1ade2
MS
27792019-12-17 Martin Sebor <msebor@redhat.com>
2780
2781 PR c++/61339
2782 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2783
368877a1
DM
27842019-12-11 David Malcolm <dmalcolm@redhat.com>
2785
2786 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2787 implementation.
2788 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2789
d68f5d45
DM
27902019-12-09 David Malcolm <dmalcolm@redhat.com>
2791
2792 * c-format.c (range_label_for_format_type_mismatch::get_text):
2793 Replace label_text ctor called with true with label_text::take.
2794
d3e28653
DM
27952019-12-09 David Malcolm <dmalcolm@redhat.com>
2796
2797 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2798 initial newline from expected outputs.
2799 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2800 call to diagnostic_show_locus.
2801
abd6d8cc
JJ
28022019-12-06 Jakub Jelinek <jakub@redhat.com>
2803
2804 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2805 now.
2806
7906797e
MP
28072019-12-05 Marek Polacek <polacek@redhat.com>
2808 Jakub Jelinek <jakub@redhat.com>
2809
2810 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2811 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2812
5c04da88
MP
28132019-12-05 Marek Polacek <polacek@redhat.com>
2814
2815 PR c++/92271 - make __is_same alias for __is_same_as.
2816 * c-common.c: Add __is_same, an alias for __is_same_as.
2817
43aae289
MP
28182019-12-03 Marek Polacek <polacek@redhat.com>
2819
2820 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2821 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2822 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2823
d7ddfbcb
JH
28242019-11-30 Jan Hubicka <hubicka@ucw.cz>
2825
2826 * c-attribs.c (handle_symver_attribute): New function
2827 (c_common_attributes): Add symver.
2828
65ef05d0
RS
28292019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2830
2831 * c-common.c (pointer_int_sum): Use verify_type_context to check
2832 whether the target allows pointer arithmetic for the types involved.
2833 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2834 to check whether the target allows sizeof and alignof operations
2835 for the types involved.
2836
1a291106
JM
28372019-11-27 Jason Merrill <jason@redhat.com>
2838
2839 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2840
05d6cb1a
JJ
28412019-11-26 Jakub Jelinek <jakub@redhat.com>
2842
2843 PR c++/61414
2844 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2845 ENUMERAL_TYPEs.
2846
5b8d9367
JM
28472019-11-25 Joseph Myers <joseph@codesourcery.com>
2848
2849 PR c/91985
2850 * c-common.c (c_common_type_for_mode): Handle decimal
2851 floating-point types being NULL_TREE.
2852 * c-format.c (get_format_for_type_1): Handle specified types being
2853 NULL_TREE.
2854 * c-lex.c (interpret_float): Give an error for decimal
2855 floating-point constants when decimal floating-point not
2856 supported.
2857
1fbf51cb
JJ
28582019-11-23 Jakub Jelinek <jakub@redhat.com>
2859
2860 PR middle-end/83859
2861 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2862 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2863 group warning with inform together.
2864 (handle_access_attribute): Formatting fix.
2865
761df906
JJ
28662019-11-22 Jakub Jelinek <jakub@redhat.com>
2867
bdaf8be1
JJ
2868 PR c/90677
2869 * c-common.h (identifier_global_tag): Declare.
2870 * c-format.c (get_pointer_to_named_type): Renamed to ...
2871 (get_named_type): ... this. Use identifier_global_tag instead of
2872 identifier_global_value, handle the return value being a TYPE_P.
2873 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2874 to call get_named_type instead. Formatting fixes.
2875
c2ecce6d 2876 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2877 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2878 and __cpp_generic_lambdas for -std=c++2a. Define
2879 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2880 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2881 __cpp_concepts for -std=c++2a.
2882
54aa6b58
MS
28832019-11-22 Martin Sebor <msebor@redhat.com>
2884
2885 PR middle-end/83859
2886 * c-attribs.c (handle_access_attribute): New function.
2887 (c_common_attribute_table): Add new attribute.
2888 (get_argument_type): New function.
2889 (append_access_attrs): New function.
2890 (get_nonnull_operand): Rename...
2891 (get_attribute_operand): ...to this.
2892 * c-common.c (get_nonnull_operand): Rename...
2893 (get_attribute_operand): ...to this.
2894
6c80b1b5
JM
28952019-11-21 Joseph Myers <joseph@codesourcery.com>
2896
2897 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2898 of warning.
2899
192961ff
JM
29002019-11-19 Joseph Myers <joseph@codesourcery.com>
2901
2902 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2903 warning for standard attributes mixed with fallthrough attributes.
2904
f8aea5e3
JM
29052019-11-15 Joseph Myers <joseph@codesourcery.com>
2906
2907 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2908 * c-common.h (handle_fallthrough_attribute): Declare.
2909
2cc94aa8
JM
29102019-11-15 Joseph Myers <joseph@codesourcery.com>
2911
2912 * c-attribs.c (handle_deprecated_attribute): Remove static.
2913 * c-common.h (handle_deprecated_attribute): Declare.
2914
7c5890cc
JM
29152019-11-14 Joseph Myers <joseph@codesourcery.com>
2916
2917 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2918 char for C.
2919
b2417b59
JJ
29202019-11-14 Jakub Jelinek <jakub@redhat.com>
2921
d0ec7c93
JJ
2922 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2923 valid vendors.
2924
b2417b59
JJ
2925 * c-omp.c (c_omp_check_context_selector): Handle name lists
2926 containing string literals. Don't diagnose atomic_default_mem_order
2927 with multiple props.
2928
00be2a5f
JM
29292019-11-13 Joseph Myers <joseph@codesourcery.com>
2930
2931 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2932 NORM_MAX constants. Update call to get_max_float.
2933 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2934 constants.
2935
2dbad62d
EB
29362019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2937
2938 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2939 (dump_forward_type): Do not generate a declaration for function types.
2940 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2941 of the component type if it is declared in another file.
2942
6ed76044
ML
29432019-11-12 Martin Liska <mliska@suse.cz>
2944
2945 * c-opts.c (c_common_post_options):
2946 Use SET_OPTION_IF_UNSET.
2947
62aee289
MR
29482019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2949 Frederik Harwath <frederik@codesourcery.com>
2950
2951 gcc/c-family/
2952 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2953 constant.
2954 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2955
f486280c
RS
29562019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2957
2958 * c-common.h (gnu_vector_type_p): New function.
2959 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2960 vectors to satisfy gnu_vector_type_p.
2961 (c_build_vec_convert): Likewise __builtin_convertvector.
2962 (convert_vector_to_array_for_subscript): Likewise when applying
2963 implicit vector to array conversion.
2964 (scalar_to_vector): Likewise when converting vector-scalar
2965 operations to vector-vector operations.
2966
017c6491
JM
29672019-11-08 Joseph Myers <joseph@codesourcery.com>
2968
2969 * c.opt (Wold-style-definition): Initialize to -1.
2970 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2971 to flag_isoc2x if not set explicitly.
2972
c01bd174
JM
29732019-11-07 Joseph Myers <joseph@codesourcery.com>
2974
2975 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2976
0df65305
JM
29772019-11-05 Jason Merrill <jason@redhat.com>
2978
2979 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2980 -fconcepts.
2981
e0c866dd
KK
29822019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2983
2984 * c-opts.c (c_common_post_options): Update
2985 latest_abi_version.
2986
f968ef9b
JJ
29872019-11-02 Jakub Jelinek <jakub@redhat.com>
2988
d0c464d2
JJ
2989 * c-common.h (c_omp_get_context_selector): Remove.
2990 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2991 and renamed to omp_get_context_selector.
2992
917dd789
JJ
2993 * c-omp.c (c_omp_mark_declare_variant): Use
2994 omp_context_selector_set_compare.
2995
f968ef9b
JJ
2996 PR c++/88335 - Implement P1073R3: Immediate functions
2997 * c-common.h (enum rid): Add RID_CONSTEVAL.
2998 * c-common.c (c_common_reswords): Add consteval.
2999
5f6705b7
JJ
30002019-11-01 Martin Sebor <msebor@redhat.com>
3001
3002 PR middle-end/91679
3003 PR middle-end/91647
3004 PR middle-end/91463
3005 PR middle-end/92312
3006 * c-pretty-print.c (direct_abstract_declarator): Print
3007 bound in zero-length arrays.
3008 * c.opt (-Wzero-length-bounds): New option.
3009
43f1814c
NS
30102019-10-30 Nathan Sidwell <nathan@acm.org>
3011
3012 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3013 macros.
3014
ad1539d5
MS
30152019-10-28 Martin Sebor <msebor@redhat.com>
3016
3017 PR c/66970
3018 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3019 even when only preprocessing.
3020 * c-common.h (names_builtin_p): Declare new function.
3021 * c-lex.c (init_c_lex): Set has_builtin.
3022 (c_common_has_builtin): Define a new function.
3023 * c-ppoutput.c (init_pp_output): Set has_builtin.
3024
135df52c
JJ
30252019-10-24 Jakub Jelinek <jakub@redhat.com>
3026
3027 * c-common.h (c_omp_context_selector_matches): Remove.
3028 * c-omp.c (c_omp_context_selector_matches): Remove.
3029 * c-attribs.c (c_common_attribute_table): Add
3030 "omp declare target {host,nohost,block}" attributes.
3031
8ad0c477
JM
30322019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3033
3034 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3035
56898e43
RS
30362019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3037
3038 * c-common.h (user_facing_original_type_p): Declare.
3039 * c-common.c: Include c-spellcheck.h.
3040 (user_facing_original_type_p): New function.
3041
20de9568
JJ
30422019-10-12 Jakub Jelinek <jakub@redhat.com>
3043
3044 * c-common.h (c_omp_mark_declare_variant,
3045 c_omp_context_selector_matches): Declare.
3046 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3047 and hsa-common.h.
3048 (c_omp_get_context_selector): Support second argument NULL.
3049 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3050 functions.
3051 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3052 attribute, add "omp declare variant base" and
3053 "omp declare variant variant" attributes.
3054
175a85b2
JM
30552019-10-11 Joseph Myers <joseph@codesourcery.com>
3056
3057 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3058 CppReason(CPP_W_C11_C2X_COMPAT).
3059
fe2bc27c
JM
30602019-10-11 Joseph Myers <joseph@codesourcery.com>
3061
3062 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3063 _Decimal64 and _Decimal128.
3064
27dfdc0f
JM
30652019-10-10 Joseph Myers <joseph@codesourcery.com>
3066
3067 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3068 types if DFP not supported.
3069
94e7f906
JJ
30702019-10-10 Jakub Jelinek <jakub@redhat.com>
3071
3072 * c-common.h (c_omp_check_context_selector,
3073 c_omp_get_context_selector): Declare.
3074 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3075 in diagnostic message.
3076 (c_omp_check_context_selector, c_omp_get_context_selector): New
3077 functions.
3078 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3079 attribute.
3080 (handle_omp_declare_variant_attribute): New function.
3081
a7160771
MS
30822019-10-09 Martin Sebor <msebor@redhat.com>
3083
3084 PR tree-optimization/90879
3085 * c.opt (-Wstring-compare): New option.
3086
cb57504a
JM
30872019-10-08 Andrew Sutton <asutton@lock3software.com>
3088 Jason Merrill <jason@redhat.com>
3089
3090 Update the concepts implementation to conform to the C++20
3091 specification, improve compile times, and generally clean up
3092 the implementation.
3093
3094 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3095 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3096 * c.opt: Add -Wconcepts-ts.
3097 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3098 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3099 (set_std_cxx2a): Enable concepts by default.
3100
fbb2a6dc
JM
31012019-10-08 Joseph Myers <joseph@codesourcery.com>
3102
3103 * c-opts.c (c_common_post_options): Set
3104 -fno-fp-int-builtin-inexact for C2X.
3105
8e007055
JJ
31062019-10-05 Jakub Jelinek <jakub@redhat.com>
3107
3108 PR c++/91369 - Implement P0784R7: constexpr new
3109 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3110 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3111
843f104d
JM
31122019-10-04 Joseph Myers <joseph@codesourcery.com>
3113
3114 PR c/82752
3115 * c-format.c (C_STD_VER): Handle C2x.
3116 (C_STD_NAME): Likewise.
3117 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3118 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3119 modifier allowed and 'p' flag.
3120 * c-format.h (enum format_std_version): Add STD_C2X.
3121 (struct format_char_info): Mention 'p' in comment on flags2.
3122
e9c9a142
DM
31232019-10-01 David Malcolm <dmalcolm@redhat.com>
3124
3125 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3126 calling diagnostic_show_locus, rather than destroying it afterwards.
3127
7552c36a
JJ
31282019-10-01 Jakub Jelinek <jakub@redhat.com>
3129
3130 PR c++/91925
3131 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3132 with NULL DECL_FIELD_OFFSET.
3133
8209db25
RS
31342019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3135
3136 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3137 has a type name, use it in preference to the __vector syntax.
3138
9343bf99
RS
31392019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3140
3141 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3142 two spaces between a comma and "...".
3143
59bc434a
JJ
31442019-09-27 Jakub Jelinek <jakub@redhat.com>
3145
3146 PR c++/88203
3147 * c-common.h (c_omp_predefined_variable): Declare.
3148 * c-omp.c (c_omp_predefined_variable): New function.
3149 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3150 for predefined variables.
3151
c6447c20
RS
31522019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3153
3154 * c-common.h (build_function_call_vec): Take the original
3155 function decl as an optional final parameter.
3156 (check_builtin_function_arguments): Take the original function decl.
3157 * c-common.c (check_builtin_function_arguments): Likewise.
3158 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3159 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3160
c4438114
JM
31612019-09-15 Jason Merrill <jason@redhat.com>
3162
3163 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3164 fold_for_warn in "|| mask" warning.
3165
68a57628
ML
31662019-09-10 Martin Liska <mliska@suse.cz>
3167
3168 * c.opt: Use newly added WarnRemoved.
3169
f48ef52e
ML
31702019-09-09 Martin Liska <mliska@suse.cz>
3171
3172 * c.opt: Update comment of removed
3173 options that are preserved only for backward
3174 compatibility.
3175
67f6e649
ML
31762019-09-06 Martin Liska <mliska@suse.cz>
3177
3178 PR c++/91125
3179 * c-common.c: Remove definition of flag_use_repository.
3180 * c-common.h: Likewise.
3181 * c-opts.c (c_common_handle_option):
3182 Do not handle OPT_frepo option.
3183 * c.opt: Mark the option with Deprecated.
3184
db9d2274
MP
31852019-09-04 Marek Polacek <polacek@redhat.com>
3186
3187 * c.opt (fdeduce-init-list): Ignored.
3188
68e2c199
PK
31892019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3190
3191 PR c/78736
3192 * c.opt (Wenum-conversion): New option.
3193
7a4418a5
JL
31942019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3195
3196 * c-attribs.c (handle_section_attribute): Call the
3197 handle_generic_attribute target hook after performing target
3198 independent processing.
3199 (handle_noinit_attribute): Likewise.
3200
5f76ab15
ILT
32012019-09-03 Ian Lance Taylor <iant@golang.org>
3202
3203 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3204 when using -fgo-dump-spec.
3205
ae0d3f6a
ML
32062019-09-02 Martin Liska <mliska@suse.cz>
3207
3208 PR c++/91155
3209 * c-common.c (fname_as_string): Use cxx_printable_name for
3210 __PRETTY_FUNCTION__ same as was used before r265711.
3211
8a902edb
MP
32122019-08-28 Marek Polacek <polacek@redhat.com>
3213
3214 Implement P1152R4: Deprecating some uses of volatile.
3215 PR c++/91361
3216 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3217 default for C++2a, unless -Wno-deprecated.
3218 * c.opt (Wvolatile): New warning.
3219
4742dbe7
MP
32202019-08-28 Marek Polacek <polacek@redhat.com>
3221
3222 PR c++/91360 - Implement C++20 P1143R2: constinit.
3223 * c-common.c (c_common_reswords): Add constinit and __constinit.
3224 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3225 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3226 RID_LAST_CXX20.
3227 (D_CXX20): Define.
3228 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3229 * c-format.c (cxx_keywords): Add "constinit".
3230 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3231
6a074892
JJ
32322019-08-27 Jakub Jelinek <jakub@redhat.com>
3233
3234 PR c++/91415
3235 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3236 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3237 like COMPOUND_EXPR rather than normal expression.
3238
22f8849d
IS
32392019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3240
3241 PR pch/61250
3242 * c-lex.c (c_lex_with_flags): Don't call
3243 c_common_no_more_pch () from here.
3244
df375b03
JJ
32452019-08-23 Jakub Jelinek <jakub@redhat.com>
3246
3247 PR middle-end/91283
3248 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3249 instead of flag_excess_precision_cmdline.
3250 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3251 * c-opts.c (c_common_post_options): Likewise.
3252
14b7950f
MS
32532019-08-22 Martin Sebor <msebor@redhat.com>
3254
3255 PR middle-end/91490
3256 * c-common.c (braced_list_to_string): Add argument and overload.
3257 Handle flexible length arrays and unions.
3258
8bb2ee59
EB
32592019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3260
3261 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3262 function declarations where arguments are missing. Rename variables.
3263
21c1e205
RB
32642019-08-15 Richard Biener <rguenther@suse.de>
3265
3266 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3267 enabled, define __SIZETYPE__.
3268
f0033821
CL
32692019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3270
3271 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3272 exclusion with "section" attribute.
3273 (attr_noinit_exclusions): New table.
3274 (handle_noinit_attribute): New function.
3275
4d732405
RS
32762019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3277
3278 PR middle-end/91421
3279 * c-common.c (resolve_overloaded_builtin): Use
3280 copy_decl_built_in_function.
3281
51ad8481
MS
32822019-08-13 Martin Sebor <msebor@redhat.com>
3283
3284 PR c/80619
3285 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3286 (asm_fprintf_length_spec): Same.
3287 * c-format.h (format_lengths): Add FMT_LEN_w.
3288
77eb117f
JJ
32892019-08-10 Jakub Jelinek <jakub@redhat.com>
3290
3291 * c-pragma.h (enum pragma_omp_clause): Add
3292 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3293
398e3feb
JJ
32942019-08-07 Jakub Jelinek <jakub@redhat.com>
3295
3296 * c-pragma.h (enum pragma_omp_clause): Add
3297 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3298 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3299 enumeration value.
3300
ab574db6
MP
33012019-08-05 Marek Polacek <polacek@redhat.com>
3302
3303 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3304 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3305 default for C++2a, unless -Wno-deprecated.
3306 * c.opt (Wcomma-subscript): New warning.
3307
554a530f
JJ
33082019-07-20 Jakub Jelinek <jakub@redhat.com>
3309
3310 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3311 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3312 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3313 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3314 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3315 constructs with the loop construct.
3316
1a888209
JJ
33172019-07-13 Jakub Jelinek <jakub@redhat.com>
3318
3319 PR c/91149
3320 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3321 OMP_CLAUSE_REDUCTION_TASK handling.
3322
1fdd6f04
JJ
33232019-07-12 Jakub Jelinek <jakub@redhat.com>
3324
3325 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3326 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3327
99b1c316
MS
33282019-07-09 Martin Sebor <msebor@redhat.com>
3329
3330 PR c++/61339
1fdd6f04 3331 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3332 and others to class.
3333 * c-pretty-print.h: Same.
3334
6c1dae73
MS
33352019-07-09 Martin Sebor <msebor@redhat.com>
3336
3337 PR c++/61339
3338 * c-format.c (check_argument_type): Change class-key from class to
3339 struct and vice versa to match convention and avoid -Wclass-is-pod
3340 and -Wstruct-no-pod.
3341 * c-pretty-print.h: Same.
3342
8ba6ea87
ML
33432019-07-03 Martin Liska <mliska@suse.cz>
3344
3345 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3346 dead assignemts.
3347
83eb9522
JJ
33482019-07-03 Jakub Jelinek <jakub@redhat.com>
3349
3350 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3351 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3352 with OMP_PARALLEL.
3353
1c6ffbab
QZ
33542019-07-02 qing zhao <qing.zhao@oracle.com>
3355
3356 PR preprocessor/90581
3357 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3358 * c.opt: Add new option -fmax-include-depth.
3359
7ffc7de5
JM
33602019-06-26 Jason Merrill <jason@redhat.com>
3361
3362 PR c++/55442 - memory-hog with highly recursive constexpr.
3363 * c.opt (fconstexpr-loop-limit): New.
3364
361af3e4
JJ
33652019-06-25 Jakub Jelinek <jakub@redhat.com>
3366
3367 PR sanitizer/90954
3368 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3369 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3370
ab20d992
JJ
33712019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3372
3373 * c-common.c (c_common_nodes_and_builtins): Define
3374 alternate "__intN__" name for "__intN" types.
3375
f4af4019
JH
33762019-06-24 Jan Hubicka <jh@suse.cz>
3377
3378 * c-common.c (braced_lists_to_strings): Check that
3379 type is array or integer prior checking string flag.
3380
da9e9b57
MB
33812019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3382
3383 PR c++/90875 - added -Wswitch-outside-range option
3384 * c.opt (Wswitch-outside-range): Added new option.
3385 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3386
3f3d6a6f
MP
33872019-06-21 Marek Polacek <polacek@redhat.com>
3388
3389 PR c++/90953 - ICE with -Wmissing-format-attribute.
3390 * c-common.c (check_function_arguments_recurse): Use
3391 get_attribute_name.
3392 (check_missing_format_attribute): Likewise.
3393
1bf32c11
MP
33942019-06-19 Marek Polacek <polacek@redhat.com>
3395
3396 PR c++/60364 - noreturn after first decl not diagnosed.
3397 * c-attribs.c (handle_noreturn_attribute): No longer static.
3398 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3399 Declare.
3400 * c-format.c (check_function_format): Use get_attribute_name.
3401
a04c0734
MS
34022019-06-19 Martin Sebor <msebor@redhat.com>
3403
3404 PR translation/90156
3405 * c-format.c (function_format_info::format_type): Adjust type.
3406 (function_format_info::is_raw): New member.
3407 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3408 (decode_format_attr): Adjust call to decode_format_type.
3409 Avoid a redundant call to convert_format_name_to_system_name.
3410 Avoid abbreviating the word "arguments" in a diagnostic.
3411 (format_warning_substr): New function.
3412 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3413 (finish_dollar_format_checking): Same.
3414 (check_format_info): Same.
3415 (struct baltoks_t): New.
3416 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3417 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3418 functions.
3419 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3420 maybe_diag_unbalanced_tokens.
3421 (handle_format_attribute): Spell out the word "arguments" in
3422 a diagnostic.
3423
d3786ebb
MB
34242019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3425
3426 PR c++/90449 - add -Winaccessible-base option.
3427 * c.opt (Winaccessible-base): New option.
3428
bf38f7e9
JJ
34292019-06-10 Jakub Jelinek <jakub@redhat.com>
3430
3431 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3432 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3433 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3434 combined/composite constructs where it is not allowed. Copy over
3435 OMP_CLAUSE_REDUCTION_INSCAN.
3436
0ecf545c
MS
34372019-06-05 Martin Sebor <msebor@redhat.com>
3438
3439 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3440 (handle_alias_ifunc_attribute): Same.
3441 (handle_copy_attribute): Same.
3442 (handle_weakref_attribute): Same.
3443 (handle_nonnull_attribute): Same.
3444 * c-warn.c (warn_for_sign_compare): Same.
3445 (warn_for_restrict): Same.
3446 * c.opt: Same.
3447
36b34127
MS
34482019-06-05 Martin Sebor <msebor@redhat.com>
3449
3450 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3451 * c.opt (-Wformat-diag): Remove a spurious period.
3452
357a352f
JJ
34532019-05-29 Jakub Jelinek <jakub@redhat.com>
3454
3455 PR c/90628
3456 * c-common.c (check_builtin_function_arguments)
3457 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3458 as last argument.
3459
2b8235ea
EB
34602019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3461
3462 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3463
6d86ddc4
ML
34642019-05-22 Martin Liska <mliska@suse.cz>
3465
3466 PR lto/90500
3467 * c-attribs.c (handle_copy_attribute): Do not copy
3468 target_clones attribute.
3469
419ba5b9
EB
34702019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3471
3472 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3473 * c-ada-spec.c (print_assignment_operator): New function.
3474 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3475 assignment operators declared as methods and filter out the others.
3476
e03436e7
TS
34772019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3478
3479 PR c/89433
3480 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3481 "omp declare target".
3482
a9c697b8
MS
34832019-05-16 Martin Sebor <msebor@redhat.com>
3484
ab20d992
JJ
3485 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3486 keywords, operators, and types in diagnostics.
3487 (handle_scalar_storage_order_attribute): Same.
3488 (handle_mode_attribute): Same.
3489 (handle_visibility_attribute): Same.
3490 (handle_assume_aligned_attribute): Same.
3491 (handle_no_split_stack_attribute): Same.
3492 * c-common.c (shorten_compare): Same.
3493 (c_common_truthvalue_conversion): Same.
3494 (cb_get_source_date_epoch): Same.
3495 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3496 in diagnostics.
3497 (interpret_float): Same.
3498 * c-omp.c (c_finish_omp_for): Same.
3499 * c-opts.c (c_common_post_options): Same.
3500 * c-pch.c (c_common_pch_pragma): Same.
3501 * c-pragma.c (pop_alignment): Same.
3502 (handle_pragma_pack): Same.
3503 (apply_pragma_weak): Same.
3504 (handle_pragma_weak): Same.
3505 (handle_pragma_scalar_storage_order): Same.
3506 (handle_pragma_redefine_extname): Same.
3507 (add_to_renaming_pragma_list): Same.
3508 (maybe_apply_renaming_pragma): Same.
3509 (push_visibility): Same.
3510 (handle_pragma_visibility): Same.
3511 (handle_pragma_optimize): Same.
3512 (handle_pragma_message): Same.
3513 * c-warn.c (warn_for_omitted_condop): Same.
3514 (lvalue_error): Same.
a9c697b8 3515
6b943512
RB
35162019-05-15 Richard Biener <rguenther@suse.de>
3517
3518 PR c/90474
3519 * c-common.c (c_common_mark_addressable_vec): Also mark
3520 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3521 c_mark_addressable.
ab20d992 3522
b744fc85
NS
35232019-05-06 Nathan Sidwell <nathan@acm.org>
3524
3525 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3526
598f50d7
NS
35272019-04-30 Nathan Sidwell <nathan@acm.org>
3528
3529 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3530
5bcc5a3b
ML
35312019-04-30 Martin Liska <mliska@suse.cz>
3532
3533 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3534 for unknown options.
3535
e78a87f7
RS
35362019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3537
3538 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3539 the pointer target rather than the pointer itself.
3540
c280b7ee
JJ
35412019-04-19 Jakub Jelinek <jakub@redhat.com>
3542
3543 PR c/89888
3544 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3545 arguments.
3546 (c_do_switch_warnings): Remove outside_range_p argument.
3547 * c-common.c (check_case_bounds): Removed.
3548 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3549 Don't call check_case_bounds. Fold low_value as well as high_value.
3550 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3551 Check for case labels outside of range of original type here and
3552 adjust them.
3553
8e8225e6
JJ
35542019-04-12 Jakub Jelinek <jakub@redhat.com>
3555
63b8a166
JJ
3556 PR translation/90041
3557 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3558 in the Warn diagnostics.
3559
8e8225e6
JJ
3560 PR c/89946
3561 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3562 function comment. Warn if arguments of the attribute are not positive
3563 integer constants.
3564
53a3f614
EB
35652019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3566
3567 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3568 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3569
22be5873
EB
35702019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3571
3572 * c-ada-spec.c (is_float128): New predicate extracted from...
3573 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3574 <REAL_TYPE>: ...here. Call it.
3575
34facf20
DM
35762019-04-05 David Malcolm <dmalcolm@redhat.com>
3577
3578 PR c/89985
3579 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3580 auto_diagnostic_group. Guard inform calls by result of
3581 warning_at call.
3582
05564120
MP
35832019-04-05 Marek Polacek <polacek@redhat.com>
3584
ab20d992 3585 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3586 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3587 of RHS.
3588
7a506c3c
JM
35892019-04-03 Jason Merrill <jason@redhat.com>
3590
3591 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3592 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3593
ddeae8c8
MS
35942019-04-01 Martin Sebor <msebor@redhat.com>
3595
3596 PR c/89685
3597 * c-attribs.c (handle_copy_attribute): Handle references and
3598 non-constant expressions.
3599
a15ffa22
JJ
36002019-03-22 Jakub Jelinek <jakub@redhat.com>
3601
3602 PR c++/87481
3603 * c.opt (-fconstexpr-ops-limit=): New option.
3604
36a3a7a3
JJ
36052019-03-21 Jakub Jelinek <jakub@redhat.com>
3606
3607 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3608 template param.
3609
bec1da64
MS
36102019-03-19 Martin Sebor <msebor@redhat.com>
3611
3612 PR tree-optimization/89688
3613 * c-common.c (braced_list_to_string): Make static.
3614 (braced_lists_to_strings): Define new function.
3615 * c-common.h (braced_list_to_string): Remove.
3616 (braced_lists_to_strings): Declare.
3617
1fe61adf
ML
36182019-03-12 Martin Liska <mliska@suse.cz>
3619
3620 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3621
93964ebd
ML
36222019-03-11 Martin Liska <mliska@suse.cz>
3623
3624 * c-opts.c (c_common_post_options): Wrap apostrophes
3625 in gcc internal format with %'.
3626
a3f9f006
ML
36272019-03-11 Martin Liska <mliska@suse.cz>
3628
3629 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3630 in a string format message and fix GNU coding style.
3631 * c-common.c (vector_types_convertible_p): Likewise.
3632 (c_build_vec_perm_expr): Likewise.
3633 * c-indentation.c (get_visual_column): Likewise.
3634 * c-opts.c (c_common_handle_option): Likewise.
3635 (c_common_post_options): Likewise.
3636 (sanitize_cpp_opts): Likewise.
3637 * c-pch.c (c_common_pch_pragma): Likewise.
3638 * c-pragma.c (handle_pragma_pack): Likewise.
3639
1db01ff9
JJ
36402019-03-08 Jakub Jelinek <jakub@redhat.com>
3641
3642 PR tree-optimization/89550
3643 * c-common.c (c_common_truthvalue_conversion): Only set
3644 TREE_NO_WARNING if warning_at returned true.
3645 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3646
ba790e6f
JJ
36472019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3648 Martin Sebor <msebor@gmail.com>
3649
3650 * c.opt (Wmissing-attributes): Clean up doc string.
3651
7da73ba7
JJ
36522019-02-25 Jakub Jelinek <jakub@redhat.com>
3653
3654 PR c/89495
3655 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3656 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3657 checking.
3658
921bb9d1
RB
36592019-02-22 Richard Biener <rguenther@suse.de>
3660
3661 * c-pch.c (no_checksum): Remove.
3662 (pch_init): Remove assertion that executable_checksum is not
3663 all zero.
3664 (c_common_valid_pch): Likewise.
3665
e2ebb05c
MS
36662019-02-18 Martin Sebor <msebor@redhat.com>
3667
3668 PR middle-end/89294
3669 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3670
3fe53000
DM
36712019-02-16 David Malcolm <dmalcolm@redhat.com>
3672
3673 PR c++/88680
3674 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3675 implementing -Wtype-limits.
3676
28a8cef1
MS
36772019-02-11 Martin Sebor <msebor@redhat.com>
3678
3679 PR c++/87996
3680 * c-common.c (invalid_array_size_error): New function.
3681 (valid_array_size_p): Call it. Handle size as well as type.
3682 * c-common.h (valid_constant_size_p): New function.
3683 (enum cst_size_error): New type.
3684
ec2be203
DM
36852019-01-31 David Malcolm <dmalcolm@redhat.com>
3686
3687 PR c/89122
3688 * known-headers.cc (get_stdlib_header_for_name): Add
3689 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3690
8936f047
JJ
36912019-01-31 Jakub Jelinek <jakub@redhat.com>
3692
3693 PR libstdc++/88170
3694 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3695 a C cast in pp_c_flag_gnu_v3 mode.
3696
6a335b96
JJ
36972019-01-29 Jakub Jelinek <jakub@redhat.com>
3698
3699 PR c/86125
3700 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3701 builtin_structptr_types types even for C.
3702
2a06eba5
BE
37032019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3704
3705 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3706 when rhs is of array type correctly. Fix handling of nested structures.
3707 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3708 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3709 type casts within nested compound expressions.
3710
18a23298
JJ
37112019-01-22 Jakub Jelinek <jakub@redhat.com>
3712
3713 PR middle-end/88968
3714 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3715 variable after using BIT_FIELD_REF.
3716
420183d9
L
37172019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3718
3719 PR c/51628
3720 PR c/88664
3721 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3722 Remove the boolean argument.
3723 * c-warn.c (check_address_of_packed_member): Renamed to ...
3724 (check_address_or_pointer_of_packed_member): This. Also
3725 warn pointer conversion.
3726 (check_and_warn_address_of_packed_member): Renamed to ...
3727 (check_and_warn_address_or_pointer_of_packed_member): This.
3728 Also warn pointer conversion.
3729 (warn_for_address_or_pointer_of_packed_member): Remove the
3730 boolean argument. Don't check pointer conversion here.
3731
99063eee
RS
37322019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3733
3734 PR inline-asm/52813
3735 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3736
a30d0196
JJ
37372019-01-14 Jakub Jelinek <jakub@redhat.com>
3738
3739 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3740 and __cpp_nontype_template_parameter_auto. Add a comment that
3741 __cpp_template_auto is deprecated.
3742
2d91f79d
TH
37432019-01-14 Tom Honermann <tom@honermann.net>
3744
3745 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3746 * c-common.c (c_common_reswords): Add char8_t.
3747 (fix_string_type): Use char8_t for the type of u8 string literals.
3748 (c_common_get_alias_set): char8_t doesn't alias.
3749 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3750 C++.
3751 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3752 (keyword_begins_type_specifier): Add RID_CHAR8.
3753 * c-common.h (rid): Add RID_CHAR8.
3754 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3755 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3756 Define char8_type_node and char8_array_type_node.
3757 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3758 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3759 (c_cpp_builtins): Predefine __cpp_char8_t.
3760 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3761 CPP_UTF8STRING.
3762 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3763 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3764 targeting C++2a.
3765 * c.opt: Add the -fchar8_t command line option.
3766
23db6ced
MS
37672019-01-14 Martin Sebor <msebor@redhat.com>
3768
3769 PR target/88638
3770 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3771 and issue errors if it fails.
3772 * c-common.h (valid_format_string_type_p): Declare.
3773 * c-format.c (valid_stringptr_type_p): Rename...
3774 (valid_format_string_type_p): ...to this and make extern.
3775 (handle_format_arg_attribute): Adjust to new name.
3776 (check_format_string): Same.
3777
234c3818
L
37782019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3779
3780 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3781 Replace "may may" with "may" in warning message.
3782
d8fcab68
JJ
37832019-01-07 Jakub Jelinek <jakub@redhat.com>
3784
3785 PR c++/85052
3786 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3787 (c_build_vec_convert): Declare.
3788 * c-common.c (c_build_vec_convert): New function.
3789
29d24852
MS
37902019-01-04 Martin Sebor <msebor@redhat.com>
3791
3792 PR c/88546
3793 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3794 Handle C++ empty throw specification and C11 _Noreturn.
3795 (has_attribute): Also handle C11 _Noreturn.
3796
9069a4c9
MS
37972019-01-04 Martin Sebor <msebor@redhat.com>
3798
3799 PR c/88363
3800 * c-attribs.c (positional_argument): Also accept enumerated types.
3801
a5544970
JJ
38022019-01-01 Jakub Jelinek <jakub@redhat.com>
3803
3804 Update copyright years.
3805
da77eace
L
38062018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3807
3808 PR c/51628
3809 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3810 * c-warn.c (check_alignment_of_packed_member): New function.
3811 (check_address_of_packed_member): Likewise.
3812 (check_and_warn_address_of_packed_member): Likewise.
3813 (warn_for_address_or_pointer_of_packed_member): Likewise.
3814 * c.opt: Add -Wno-address-of-packed-member.
3815
573767d4
DM
38162018-12-20 David Malcolm <dmalcolm@redhat.com>
3817
3818 PR c++/87504
3819 * c-warn.c (get_outermost_macro_expansion): New function.
3820 (spelled_the_same_p): Use it to unwind the macro expansions, and
3821 compare the outermost macro in each nested expansion, rather than
3822 the innermost.
3823
a14feb3c
DM
38242018-12-19 David Malcolm <dmalcolm@redhat.com>
3825
3826 PR c++/87504
3827 * c-common.h (warn_tautological_cmp): Convert 1st param from
3828 location_t to const op_location_t &.
3829 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3830 when testing for INTEGER_CST.
3831 (warn_tautological_bitwise_comparison): Convert 1st param from
3832 location_t to const op_location_t &; use it to build a
3833 binary_op_rich_location, and use this.
3834 (spelled_the_same_p): New function.
3835 (warn_tautological_cmp): Convert 1st param from location_t to
3836 const op_location_t &. Warn for macro expansions if
3837 spelled_the_same_p. Use binary_op_rich_location.
3838
dfd7fdca
DM
38392018-12-19 David Malcolm <dmalcolm@redhat.com>
3840
3841 PR c++/43064
3842 PR c++/43486
3843 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3844 (verify_tree): Handle location wrappers.
3845 (c_common_truthvalue_conversion): Strip any location wrapper.
3846 Handle CONST_DECL.
3847 (fold_offsetof): Strip any location wrapper.
3848 (complete_array_type): Likewise for initial_value.
3849 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3850 index before checking for INTEGER_CST.
3851 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3852 print parentheses around location wrappers.
3853 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3854 before checking for INTEGER_CST.
3855 (warn_tautological_bitwise_comparison): Call
3856 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3857 before checking for INTEGER_CST.
3858 (readonly_error): Strip any location wrapper.
3859 (warn_array_subscript_with_type_char): Strip location wrappers
3860 before checking for INTEGER_CST. Use the location of the index if
3861 available.
3862
5c8b3702
JM
38632018-12-06 Jason Merrill <jason@redhat.com>
3864
3865 PR c++/88136 - -Wdeprecated-copy false positives
3866 * c.opt (Wdeprecated-copy-dtor): New.
3867 (Wdeprecated-copy): Move to -Wextra.
3868
673670da
MS
38692018-11-29 Martin Sebor <msebor@redhat.com>
3870
3871 PR c/88172
3872 PR testsuite/88208
3873 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3874 alignments to values less than the target requires.
3875 (has_attribute): For attribute aligned consider both the attribute
3876 and the alignment bits.
3877 * c-common.c (c_init_attributes): Optionally issue a warning for
3878 zero alignment.
3879
04864ec8
MS
38802018-11-28 Martin Sebor <msebor@redhat.com>
3881
3882 PR c/88065
3883 PR c/87297
3884 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3885 or destination is an error.
3886
ace83db0
JJ
38872018-11-28 Jakub Jelinek <jakub@redhat.com>
3888
3889 PR c++/88215
3890 * c-ubsan.c: Include langhooks.h.
3891 (ubsan_instrument_division): Change gcc_assert that main variants
3892 of op0 and op1 types are equal to gcc_checking_assert that the
3893 main variants are compatible types.
3894
da193a27
EB
38952018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3896
3897 * c-ada-spec.c: Include stringpool.h.
3898 (has_static_fields): Return false for incomplete types.
3899 (is_tagged_type): Likewise.
3900 (has_nontrivial_methods): Likewise.
3901 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3902 (struct overloaded_name_hash): New structure.
3903 (struct overloaded_name_hasher): Likewise.
3904 (overloaded_names): New global variable.
3905 (init_overloaded_names): New static function.
3906 (overloaded_name_p): New predicate.
3907 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3908 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3909 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3910 Remove always-true condition and dump forward types.
3911 (dump_ada_specs): Delete overloaded_names.
3912
98f08eb8
MS
39132018-11-20 Martin Sebor <msebor@redhat.com>
3914
3915 * c-attribs.c (type_for_vector_size): New function.
3916 (type_valid_for_vector_size): Same.
3917 (handle_vector_size_attribute): Move code to the functions above
3918 and call them.
3919 (validate_attribute, has_attribute): New functions.
3920 * c-common.h (has_attribute): Declare.
3921 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3922 * c-common.c (c_common_resword): Same.
3923
2674fa47
JM
39242018-11-16 Jason Merrill <jason@redhat.com>
3925
3926 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3927 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3928
258b3854
JJ
39292018-11-16 Jakub Jelinek <jakub@redhat.com>
3930
3931 PR middle-end/87854
3932 * c-common.c (fix_string_type): Reject string literals larger than
3933 TYPE_MAX_VALUE (ssizetype) bytes.
3934
1d249509
MS
39352018-11-15 Martin Sebor <msebor@redhat.com>
3936
3937 PR c++/87541
3938 PR c++/87542
3939 * c-attribs.c (positional_argument): New function.
3940 (handle_alloc_size_attribute): Use it and simplify.
3941 (handle_alloc_align_attribute): Same.
3942 (handle_assume_aligned_attribute): Same.
3943 (handle_nonnull_attribute): Same.
3944 * c-common.c (check_function_arguments): Pass fntype to
3945 check_function_format.
3946 * c-common.h (check_function_format): Add an argument.
3947 (PosArgFlags, positional_argument): Declare new type and function.
3948 * c-format.c (decode_format_attr): Add arguments.
3949 (check_format_string, get_constant): Same.
3950 (convert_format_name_to_system_name): Adjust.
3951
478dd60d
DM
39522018-11-15 David Malcolm <dmalcolm@redhat.com>
3953
3954 PR other/19165
3955 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3956
8cca0163
JJ
39572018-11-14 Jakub Jelinek <jakub@redhat.com>
3958
8ee09943
JJ
3959 P1236R1 - Signed integers are two's complement
3960 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3961 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3962 with in-range second operand well defined for -std=c++2a.
3963
8cca0163
JJ
3964 PR other/88007
3965 * c-common.c (parse_optimize_options): Allocate option string from
3966 opts_obstack rather than as GC memory. Move the allocation after
3967 warning for invalid option.
3968
620e594b
DM
39692018-11-13 David Malcolm <dmalcolm@redhat.com>
3970
3971 * c-common.c (c_get_substring_location): Update for renaming of
3972 get_source_location_for_substring to get_location_within_string.
3973 * c-lex.c: Replace "source_location" with "location_t".
3974 * c-opts.c: Likewise.
3975 * c-ppoutput.c: Likewise.
3976
f9731de3
MS
39772018-11-13 Martin Sebor <msebor@redhat.com>
3978
3979 PR middle-end/81824
3980 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3981 (handle_tls_model_attribute): Improve diagnostics.
3982
e4bd6d5e
JM
39832018-11-12 Jason Merrill <jason@redhat.com>
3984
a6bb6b07
JM
3985 * c-cppbuiltin.c (c_cpp_builtins): Define
3986 __cpp_impl_destroying_delete.
3987
e4bd6d5e
JM
3988 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3989 __cpp_conditional_explicit.
3990
79a2c428
MS
39912018-11-09 Martin Sebor <msebor@redhat.com>
3992
3993 PR middle-end/81824
3994 * c-attribs.c (handle_copy_attribute): New function.
3995
4c7bd361
MS
39962018-11-09 Martin Sebor <msebor@redhat.com>
3997
3998 PR c/87795
3999 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4000
28567c40
JJ
40012018-11-08 Jakub Jelinek <jakub@redhat.com>
4002
4003 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4004 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4005 enum omp_memory_order MEMORY_ORDER.
4006 (c_finish_omp_flush): Add MO argument.
4007 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4008 (c_finish_omp_for): Add FINAL_P argument.
4009 * c-omp.c: Include memmodel.h.
4010 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4011 OMP_TASKGROUP_CLAUSES to it.
4012 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4013 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4014 instead of OMP_ATOMIC_SEQ_CST.
4015 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4016 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4017 __atomic_thread_fence call with the given value.
4018 (check_omp_for_incr_expr): Formatting fixes.
4019 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4020 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4021 is not constant expression 1 or -1. Transform NE_EXPR loops
4022 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4023 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4024 loops too.
4025 (c_omp_split_clauses): Add support for combined
4026 #pragma omp parallel master and
4027 #pragma omp {,parallel }master taskloop{, simd} constructs.
4028 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4029 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4030 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4031 (c_omp_predetermined_sharing): Don't return
4032 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4033 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4034 PRAGMA_OMP_REQUIRES.
4035 * c-pragma.h (enum pragma_kind): Likewise.
4036 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4037 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4038
204839e7
DM
40392018-11-08 David Malcolm <dmalcolm@redhat.com>
4040
4041 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4042
d8010ee4
DM
40432018-11-08 David Malcolm <dmalcolm@redhat.com>
4044
4045 * c-format.c (local_cgraph_node_ptr_node): New variable.
4046 (gcc_dump_printf_char_table): Add entry for %C.
4047 (get_pointer_to_named_type): New function, taken from the handling
4048 code for "gimple *" from...
4049 (init_dynamic_diag_info): ...here. Add handling for
4050 "cgraph_node *".
4051 * c-format.h (T_CGRAPH_NODE): New.
4052
4be5c72c
JM
40532018-10-19 Jason Merrill <jason@redhat.com>
4054
4055 * c-cppbuiltin.c (c_cpp_builtins): Add
4056 __cpp_nontype_template_parameter_class.
4057
f3f6029d
NS
40582018-10-31 Nathan Sidwell <nathan@acm.org>
4059
ab5324fb
NS
4060 * c-opts.c (c_finish_options): Force command line macro
4061 location. Refactor to avoid repeating main debug hook.
4062 (push_command_line_include): Clarify comment.
4063
f3f6029d
NS
4064 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4065
91e3ec29
MS
40662018-10-30 Martin Sebor <msebor@redhat.com>
4067
4068 PR middle-end/87041
4069 * c-format.c (check_format_types): Avoid diagnosing null pointer
4070 arguments to printf-family of functions.
4071
b5ff4f5c
MP
40722018-10-30 Marek Polacek <polacek@redhat.com>
4073
4074 Implement P0892R2, explicit(bool).
4075 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4076
7e2de6df
DM
40772018-10-29 David Malcolm <dmalcolm@redhat.com>
4078
4079 * name-hint.h (name_hint::take_deferred): New member function.
4080
b2bf438c
DM
40812018-10-29 David Malcolm <dmalcolm@redhat.com>
4082
4083 PR c++/56856
4084 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4085 argument.
4086 (check_function_restrict): Rename param "argarray" to
4087 "unfolded_argarray", and make a copy named "argarray", calling
4088 fold_for_warn on each argument.
4089 (check_function_arguments): Add note about responsibility for
4090 folding the arguments.
4091
9f936c86
JM
40922018-10-17 Joseph Myers <joseph@codesourcery.com>
4093
4094 * c-common.c (flag_isoc2x): New variable.
4095 * c-common.h (clk_c): Update comment to reference C2X.
4096 (flag_isoc99, flag_isoc11): Update comments to reference future
4097 standard versions in general.
4098 (flag_isoc2x): Declare.
4099 * c-opts.c (set_std_c2x): New function.
4100 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4101 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4102 flag_isoc2x to 0.
4103 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4104
7a8a92c4
JM
41052018-10-17 Joseph Myers <joseph@codesourcery.com>
4106
4107 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4108 (std=iso9899:2018): Document C17 as published in 2018.
4109
4dc003ff
CL
41102018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4111
4112 PR c++/87364
4113 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4114
79371671
WW
41152018-10-11 Will Wray <wjwray@gmail.com>
4116
4117 PR c++/87364
4118 * c-pretty-print.h (pp_c_type_cast): Prototype.
4119 (pp_c_integer_constant): Likewise.
4120 * c-pretty-print.c (pp_c_type_cast): No longer static.
4121 (pp_c_integer_constant): Likewise.
4122 (pp_c_enumeration_constant): Fix loop termination when finding
4123 name of constant. No longer returns a value. Call
4124 pp_c_integer_constant.
4125 (c_pretty_printer::constant): Update for changes to
4126 pp_c_enumeration_constant.
4127
46c62690
JJ
41282018-10-11 Jakub Jelinek <jakub@redhat.com>
4129
4130 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4131 for no_unique_address.
4132
c24300ba
DM
41332018-10-09 David Malcolm <dmalcolm@redhat.com>
4134
4135 * c-common.c (c_option_controlling_cpp_error): Rename to...
4136 (c_option_controlling_cpp_diagnostic): ...this, and convert
4137 "reason" from int to enum.
4138 (c_cpp_error): Rename to...
4139 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4140 * c-common.h (c_cpp_error): Rename to...
4141 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4142 * c-opts.c (c_common_init_options): Update for renaming.
4143
8656dafa
RS
41442018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4145
4146 PR c/87286
4147 * c-common.c (vector_types_compatible_elements_p): Use
4148 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4149
8cff0652
VK
41502018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4151
4152 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4153 to generate constructor destructor priority warning.
4154 * c.opt (-Wprio-ctor-dtor): New option.
4155
bedf03a2
JM
41562018-10-01 Jason Merrill <jason@redhat.com>
4157
4158 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4159
6cc430c1
EB
41602018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4161
4162 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4163 (dump_ada_node): Add const keyword.
4164
87677ac7
ML
41652018-09-25 Martin Liska <mliska@suse.cz>
4166
4167 * c-common.c (c_common_truthvalue_conversion):
4168 Remove Pascal from documentation.
4169
518196cb
EB
41702018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4171
4172 * c-ada-spec.c: Include diagnostic.h.
4173 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4174
a599af84
MP
41752018-09-19 Marek Polacek <polacek@redhat.com>
4176
4177 * c.opt (Wclass-conversion): New.
4178
9c4a4b3c
DM
41792018-09-17 David Malcolm <dmalcolm@redhat.com>
4180
4181 * c-format.c (range_label_for_format_type_mismatch::get_text):
4182 Update for new param.
4183
c896ecfe
DM
41842018-09-17 David Malcolm <dmalcolm@redhat.com>
4185
4186 * c-format.c (format_warning_at_char): Update for introduction of
4187 format_string_diagnostic_t.
4188 (format_type_warning): Likewise.
4189
80c6d1f4
MJ
41902018-09-17 Martin Jambor <mjambor@suse.cz>
4191
4192 PR c/63886
4193 * c.opt (Wabsolute-value): New.
4194
6d900107
BE
41952018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4196
4197 * c-common.c (complete_flexible_array_elts): New helper function.
4198 * c-common.h (complete_flexible_array_elts): Declare.
4199
b5764229
BE
42002018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4201
4202 * c-common.c (braced_list_to_string): Remove eval parameter.
4203 Add some more checks. Always create zero-terminated STRING_CST.
4204 * c-common.h (braced_list_to_string): Adjust prototype.
4205
85204e23
DM
42062018-08-27 David Malcolm <dmalcolm@redhat.com>
4207
4208 PR 87091
4209 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4210 to a tri-state.
4211 (maybe_suggest_missing_token_insertion): Likewise.
4212 (maybe_add_include_fixit): Add param "override_location". If set,
4213 and source-printing is enabled, then override the rich_location's
4214 primary location with that of the insertion point for the fix-it
4215 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4216 * c-common.h (extern void maybe_add_include_fixit): Add bool
4217 param.
4218 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4219 for conversion of show_caret_p to a tri-state.
4220 * c-warn.c (warn_for_restrict): Likewise.
4221 * known-headers.cc
4222 (suggest_missing_header::~suggest_missing_header): Update call to
4223 maybe_add_include_fixit to suggest overriding the location, as it
4224 is for a note.
4225
3d78e008
ML
42262018-08-27 Martin Liska <mliska@suse.cz>
4227
4228 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4229 fndecl_built_in_p and remove check for FUNCTION_DECL if
4230 possible.
3d78e008
ML
4231 (check_builtin_function_arguments): Likewise.
4232 (reject_gcc_builtin): Likewise.
4233 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4234
b5be6d0c
MP
42352018-08-26 Marek Polacek <polacek@redhat.com>
4236
4237 PR c++/87029, Implement -Wredundant-move.
4238 * c.opt (Wredundant-move): New option.
4239
79ca9c35
MP
42402018-08-21 Marek Polacek <polacek@redhat.com>
4241
4242 PR c++/86981, Implement -Wpessimizing-move.
4243 * c.opt (Wpessimizing-move): New option.
4244
097f82ec
DM
42452018-08-20 David Malcolm <dmalcolm@redhat.com>
4246
4247 PR other/84889
4248 * c-attribs.c (common_handle_aligned_attribute): Add
4249 auto_diagnostic_group instance.
4250 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4251 * c-opts.c (c_common_post_options): Likewise.
4252 * c-warn.c (warn_logical_not_parentheses): Likewise.
4253 (warn_duplicated_cond_add_or_warn): Likewise.
4254 (warn_for_multistatement_macros): Likewise.
4255
3fb558b1
NS
42562018-08-20 Nathan Sidwell <nathan@acm.org>
4257
4258 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4259 access.
4260
800c0e98
NS
42612018-08-17 Nathan Sidwell <nathan@acm.org>
4262
4263 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4264 field.
4265 (laxy_hex_fp_value_count): Make unsigned.
4266 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4267 manipulate the macro.
4268 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4269 cpp_define_lazily.
4270
6f795a92
DM
42712018-08-17 David Malcolm <dmalcolm@redhat.com>
4272
4273 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4274 (gcc_dump_printf_length_specs): New.
4275 (gcc_dump_printf_flag_pairs): New.
4276 (gcc_dump_printf_flag_specs): New.
4277 (gcc_dump_printf_char_table): New.
4278 (format_types_orig): Add entry for "gcc_dump_printf".
4279 (init_dynamic_diag_info): Set up length_char_specs and
4280 conversion_specs for gcc_dump_printf_format_type.
4281 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4282
c5d725c0
NS
42832018-08-17 Nathan Sidwell <nathan@acm.org>
4284
10f04917
NS
4285 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4286
c5d725c0
NS
4287 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4288 * c-cppbuiltin.c: Likewise.
4289
c0c12356
ML
42902018-08-17 Martin Liska <mliska@suse.cz>
4291
4292 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4293 Ignore/Deprecated flag. Warning is done automatically for
4294 Deprecated flags.
c0c12356 4295
10fcc142
DM
42962018-08-16 David Malcolm <dmalcolm@redhat.com>
4297
4298 PR c++/70693
4299 * c-common.c (selftest::c_family_tests): Call
4300 selftest::c_indentation_c_tests.
4301 * c-common.h (selftest::c_indentation_c_tests): New decl.
4302 * c-indentation.c: Include "selftest.h".
4303 (next_tab_stop): Add "tab_width" param, rather than accessing
4304 cpp_opts.
4305 (get_visual_column): Likewise. Clarify comment. Bulletproof
4306 against reading past the end of the line.
4307 (get_first_nws_vis_column): Add "tab_width" param.
4308 (detect_intervening_unindent): Likewise.
4309 (should_warn_for_misleading_indentation): Read tab width from
4310 cpp_opts and pass around.
4311 (selftest::test_next_tab_stop): New test.
4312 (selftest::assert_get_visual_column_succeeds): New function.
4313 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4314 (selftest::assert_get_visual_column_fails): New function.
4315 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4316 (selftest::test_get_visual_column): New test.
4317 (selftest::c_indentation_c_tests): New function.
4318
3f6677f4
NS
43192018-08-16 Nathan Sidwell <nathan@acm.org>
4320
4321 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4322 (store_ada_macro): Likewise.
4323 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4324 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4325
96e6ae57
DM
43262018-08-15 David Malcolm <dmalcolm@redhat.com>
4327
4328 * c-format.c: Include "selftest-diagnostic.h" and
4329 "gcc-rich-location.h".
4330 (format_warning_at_char): Pass NULL for new label params of
4331 format_warning_va.
4332 (class indirection_suffix): New class.
4333 (class range_label_for_format_type_mismatch): New class.
4334 (format_type_warning): Move logic for generating "*" suffix to
4335 class indirection_suffix. Create "fmt_label" and "param_label"
4336 to show their types, and pass them to the
4337 format_warning_at_substring calls.
4338 (selftest::test_type_mismatch_range_labels): New test.
4339 (selftest::c_format_c_tests): Call it.
4340
23aa9f7c
MS
43412018-08-13 Martin Sebor <msebor@redhat.com>
4342
4343 PR tree-optimization/71625
4344 * c-common.c (braced_list_to_string): New function.
4345 * c-common.h (braced_list_to_string): Declare it.
4346
f10a9135
NS
43472018-08-08 Nathan Sidwell <nathan@acm.org>
4348
4349 * c-common.c (try_to_locate_new_include_inertion_point): Use
4350 linemap_included_from_linemap.
4351 * c-lex.c (fe_file_change): Use linemap_included_from.
4352 * c-ppoutput.c (pp_file_change): Likewise.
4353
8a45b051
MS
43542018-08-01 Martin Sebor <msebor@redhat.com>
4355
4356 PR tree-optimization/86650
ab20d992 4357 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4358 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4359 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4360 * c-format.h (T89_G): Update to be "gimple *" rather than
4361 "gcall *".
4362 (local_gcall_ptr_node): Rename...
4363 (local_gimple_ptr_node): ...to this.
4364
e540ccc0
DM
43652018-07-31 David Malcolm <dmalcolm@redhat.com>
4366
4367 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4368 table entries for gcc_diag_char_table, and the 'Z' entry from
4369 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4370 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4371 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4372 adding missing "Z" for this table. Remove erroneous "G" and "K"
4373 entries.
4374 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4375 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4376 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4377
425fc685
RE
43782018-07-31 Richard Earnshaw <rearnsha@arm.com>
4379
4380 * c-common.c (speculation_safe_resolve_call): New function.
4381 (speculation_safe_resolve_params): New function.
4382 (speculation_safe_resolve_return): New function.
4383 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4384 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4385 __HAVE_SPECULATION_SAFE_VALUE.
4386
181463c2
DM
43872018-07-20 David Malcolm <dmalcolm@redhat.com>
4388
4389 * c-common.c (c_cpp_error): Remove redundant "line_table"
4390 parameter from call to rich_location::set_range.
4391 (maybe_suggest_missing_token_insertion): Likewise.
4392
0d7f9065
MS
43932018-07-20 Martin Sebor <msebor@redhat.com>
4394
4395 PR middle-end/82063
ab20d992 4396 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4397
00abf86c
MS
43982018-07-20 Martin Sebor <msebor@redhat.com>
4399
4400 PR middle-end/82063
4401 * c-common.h (c_common_handle_option): Change function argument
4402 to HOST_WIDE_INT.
4403 * c-opts.c (c_common_init_options): Same.
4404 (c_common_handle_option): Same. Remove special handling of
4405 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4406 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4407 options to take a HOST_WIDE_INT argument and accept a byte-size
4408 suffix. Initialize.
4409 (-Wvla-larger-than): Same.
4410 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4411 (-Wno-vla-larger-than): Same.
4412
9b452033
JJ
44132018-07-12 Jakub Jelinek <jakub@redhat.com>
4414
4415 * c-attribs.c (c_common_attribute_table): Add
4416 "omp declare target implicit" attribute.
4417
cd0762f3
RB
44182018-07-12 Richard Biener <rguenther@suse.de>
4419
4420 PR c/86453
4421 * c-attribs.c (handle_packed_attribute): Do not build a variant
4422 type with TYPE_PACKED, instead ignore the attribute if we may
4423 not apply to the original type.
4424
0b27c3ed
JJ
44252018-07-10 Jakub Jelinek <jakub@redhat.com>
4426
4427 PR c++/86443
4428 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4429 to contain TREE_LIST for both the original class iterator and the
4430 "last" helper var.
4431
e730a0ef
EB
44322018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4433
4434 * c-ada-spec.c (to_ada_name): Remove index parameter.
4435 (pp_ada_tree_identifier): Likewise.
4436 (dump_ada_macros): Adjust call to to_ada_name.
4437 (struct overloaded_name_hash): Delete.
4438 (struct overloaded_name_hasher): Likewise.
4439 (overloaded_names): Likewise.
4440 (compute_overloading_index): Likewise.
4441 (dump_ada_decl_name): Do not call compute_overloading_index and
4442 adjust calls to pp_ada_tree_identifier.
4443 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4444 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4445 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4446 (dump_ada_enum_type): Remove type and display_convention parameters.
4447 Adjust calls to pp_ada_tree_identifier.
4448 (dump_ada_node): Likewise and for dump_ada_structure.
4449 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4450 and tidy up.
4451 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4452 syntax.
4453 (print_constructor): Adjust call to pp_ada_tree_identifier.
4454 (print_destructor): Likewise.
4455 (dump_ada_declaration): Switch to aspect syntax.
4456 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4457 parameter with nested parameter.
4458 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4459 (dump_ada_specs): Do not delete overloaded_names table.
4460
8de583fc
PB
44612018-07-06 Peter Bergner <bergner@linux.ibm.com>
4462
4463 PR target/86324
e730a0ef 4464 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4465 target hook.
4466
09cff37b
NS
44672018-07-05 Nathan Sidwell <nathan@acm.org>
4468
4469 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4470 NO_IMPLICIT_EXTERN_C.
4471
98086b2b
ML
44722018-06-28 Martin Liska <mliska@suse.cz>
4473
4474 * cppspec.c: Include opt-suggestions.h.
4475
ab20d992
JJ
44762018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4477 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4478 Cesar Philippidis <cesar@codesourcery.com>
4479
4480 * c-pragma.h (enum pragma_omp_clause): Add
4481 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4482 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4483
f41b7612
JJ
44842018-06-20 Jakub Jelinek <jakub@redhat.com>
4485
4486 PR c++/86210
4487 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4488 comment.
4489
4252ccd7
MS
44902018-06-18 Martin Sebor <msebor@redhat.com>
4491
4492 PR middle-end/85602
4493 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4494 nonstring.
4495
e197e64e
KV
44962018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4497
4498 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4499
34a7a230
JM
45002018-06-13 Jason Merrill <jason@redhat.com>
4501
5cef3733
JM
4502 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4503 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4504 handling.
4505
34a7a230
JM
4506 PR c++/86094 - wrong code with defaulted move ctor.
4507 * c-opts.c (c_common_post_options): Bump the current ABI version to
4508 13. Set warn_abi_version and flag_abi_compat_version to the current
4509 version rather than 0. Fix defaulting flag_abi_compat_version from
4510 warn_abi_version.
4511
bb0f14ae
MS
45122018-06-12 Martin Sebor <msebor@redhat.com>
4513
4514 PR c/85931
4515 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4516 sizeof source and destination yields the same value.
4517
3713f2e2
ML
45182018-06-12 Martin Liska <mliska@suse.cz>
4519
4520 * c.opt: Make MPX-related options as Deprecated.
4521
4af78ef8
DM
45222018-06-08 David Malcolm <dmalcolm@redhat.com>
4523
4524 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4525 rather than 0.
4526
31db0fe0
ML
45272018-06-08 Martin Liska <mliska@suse.cz>
4528
4529 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4530 for MPX (macros, related functions, fields in cgraph_node, ...).
4531 (handle_bnd_legacy): Likewise.
4532 (handle_bnd_instrument): Likewise.
4533 * c.opt: Likewise.
4534
fe16acf2
JJ
45352018-06-06 Jakub Jelinek <jakub@redhat.com>
4536
4537 PR c++/86068
4538 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4539 __cpp_transactional_memory to 201500 instead of 210500.
4540
4dbdb49b
JM
45412018-06-06 Jason Merrill <jason@redhat.com>
4542
4543 PR c++/85710 - ICE with -Wmemset-elt-size.
4544 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4545
f8ad043f
JM
45462018-06-01 Jason Merrill <jason@redhat.com>
4547
4548 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4549 201703.
4550
abc24d93
EB
45512018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4552
4553 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4554 declaration for a typedef independently of whether the declaration of
4555 the subtype is generated.
4556
d258f4aa
MS
45572018-05-31 Martin Sebor <msebor@redhat.com>
4558
4559 PR c/82063
4560 * c.opt (-Wno-alloc-size-larger-than): New option.
4561
b67b9225
DP
45622018-04-22 David Pagan <dave.pagan@oracle.com>
4563
4564 PR c/55976
4565 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4566 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4567 differentiate between default (no option), -Wreturn-type, and
4568 -Wno-return-type.
4569
04eb9c55
JM
45702018-05-29 Jason Merrill <jason@redhat.com>
4571
4572 * c.opt (Winit-list-lifetime): New flag.
4573
b0c31bc6
BE
45742018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4575
4576 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4577 splay_tree_delete_pointers.
4578
44284983
JJ
45792018-05-26 Jakub Jelinek <jakub@redhat.com>
4580
4581 PR bootstrap/85921
4582 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4583 noinline variable to workaround broken kernel headers.
4584
b46b715d
JM
45852018-05-18 Jason Merrill <jason@redhat.com>
4586
4587 * c.opt (Wdeprecated-copy): New flag.
4588
40659769
ML
45892018-05-17 Martin Liska <mliska@suse.cz>
4590
4591 * c-warn.c (overflow_warning): Do not use
4592 space in between 'G_' and '('.
4593
403962ea
JM
45942018-05-09 Jason Merrill <jason@redhat.com>
4595
4596 * c-common.c (valid_array_size_p): Add complain parameter.
4597 * c-common.h: ...which defaults to true.
4598
1c9ee609
JJ
45992018-05-11 Jakub Jelinek <jakub@redhat.com>
4600
4601 PR c/85696
4602 * c-omp.c (c_omp_predetermined_sharing): Return
4603 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4604
19916065
ML
46052018-05-11 Martin Liska <mliska@suse.cz>
4606
92a285c1 4607 PR sanitizer/85556
19916065
ML
4608 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4609 TREE_LIST values.
4610
79e7b1fe
JJ
46112018-05-10 Jakub Jelinek <jakub@redhat.com>
4612
4613 PR c++/85662
4614 * c-common.h (fold_offsetof_1): Removed.
4615 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4616 CTX argument defaulted to ERROR_MARK.
4617 * c-common.c (fold_offsetof_1): Renamed to ...
4618 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4619 argument, convert the pointer constant to TYPE and use size_binop
4620 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4621 a pointer type. Adjust recursive calls.
4622
86c12f76
EB
46232018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4624
4625 PR c++/85400
4626 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4627
ee336e84
NS
46282018-05-07 Nathan Sidwell <nathan@acm.org>
4629
4630 * c.opt (ffor-scope): Remove functionality, issue warning.
4631
6c072e21
NS
46322018-05-03 Nathan Sidwell <nathan@acm.org>
4633
4634 * c.opt (ffriend-injection): Remove functionality, issue warning.
4635
2cc7d3a7
DM
46362018-05-01 David Malcolm <dmalcolm@redhat.com>
4637
4638 PR c/84258
4639 * c-format.c (struct format_check_results): Add field
4640 "number_non_char".
4641 (check_format_info): Initialize it, and warn if encountered.
4642 (check_format_arg): Distinguish between wide char and
4643 everything else when detecting arrays of non-char.
4644
7761dfbe
DM
46452018-04-30 David Malcolm <dmalcolm@redhat.com>
4646
4647 * c-format.c (get_corrected_substring): Update for
4648 location_get_source_line returning a char_span. Use a char_span
4649 when handling the prefix of the correction.
4650 * c-indentation.c (get_visual_column): Update for
4651 location_get_source_line returning a char_span.
4652 (get_first_nws_vis_column): Likewise.
4653
62e98ef1
DM
46542018-03-29 David Malcolm <dmalcolm@redhat.com>
4655
4656 PR c++/84269
4657 * known-headers.cc (get_stdlib_header_for_name): Add various names
4658 from <assert.h>, <string.h>, and <memory.h>; add more names from
4659 <stdio.h>.
4660
a7dea617
JJ
46612018-03-27 Jakub Jelinek <jakub@redhat.com>
4662
4663 PR c++/85061
4664 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4665 get_base_address of the second operand is a VAR_P, rather than the
4666 operand itself, and use gcc_checking_assert instead of gcc_assert.
4667
889a3a30
MP
46682018-03-23 Marek Polacek <polacek@redhat.com>
4669
4670 PR c++/85045
4671 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4672 <case RDIV_EXPR>: Tweak condition.
4673
452154b9
EB
46742018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4675
4676 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4677
63ecb626
JJ
46782018-03-16 Jakub Jelinek <jakub@redhat.com>
4679
ce811fc4
JJ
4680 PR c/84909
4681 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4682 diagnostics.
4683
63ecb626
JJ
4684 PR c/84910
4685 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4686 diagnostics.
4687
a1295eec
RB
46882018-03-16 Richard Biener <rguenther@suse.de>
4689
4690 PR c/84873
4691 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4692 unshare the possibly folded expression.
4693
919674fb
RB
46942018-03-15 Richard Biener <rguenther@suse.de>
4695
4696 PR c/84873
4697 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4698
f99309b2
MS
46992018-03-13 Martin Sebor <msebor@redhat.com>
4700
4701 PR tree-optimization/84725
4702 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4703 with all three narrow character types, including their qualified forms.
4704
e9b9fa4c
MS
47052018-03-12 Martin Sebor <msebor@redhat.com>
4706
4707 PR tree-optimization/83456
ab20d992 4708 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4709 Restore checking of bounded built-in functions.
4710 (check_function_arguments): Also return the result
4711 of warn_for_restrict.
ab20d992
JJ
4712 * c-common.c (check_function_restrict): Return bool.
4713 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4714
0805d020
MP
47152018-03-02 Marek Polacek <polacek@redhat.com>
4716
4717 PR c++/84171
4718 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4719 is erroneous.
4720
ed2a2f08
TS
47212018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4722
4723 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4724 function".
4725
90abdde0
MP
47262018-03-01 Marek Polacek <polacek@redhat.com>
4727
4728 PR c++/84639
4729 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4730 alignment in computation.
4731
c6db43fa
EB
47322018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4733
4734 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4735 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4736
9e25c7ed
EB
47372018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4738
4739 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4740 (is_char_array): Take a type instead of a declaration.
4741 (dump_ada_array_type): Likewise.
4742 (is_simple_enum): Minor tweak.
4743 (dump_ada_enum_type): New function extracted from...
4744 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4745 <INTEGER_TYPE>: Remove unreachable code.
4746 <RECORD_TYPE>: Likewise. Minor tweaks.
4747 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4748 <ENUMERAL_TYPE>: New case.
4749 <RECORD_TYPE>: Factor out common code.
4750 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4751 Minor tweaks. Deal with enumeral types.
4752 (dump_ada_structure): Minor tweaks.
4753
09de3550
EB
47542018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4755
4756 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4757 address for incomplete structures.
4758 (dump_forward_type): Do not bail out for incomplete structures.
4759 (dump_ada_declaration): Do not special-case incomplete structures
4760 for subtypes. Dump them as null records for types.
4761
095d8d4b
EB
47622018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4763
4764 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4765 (is_char_array): Fix formatting.
4766 (dump_template_types): Likewise.
4767 (dump_generic_ada_node): Rename into...
4768 (dump_ada_node): ...this.
4769 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4770 incomplete structures and not for empty structures. Do not use it
4771 when forward declarations are needed.
4772 (dump_forward_type): New function.
4773 (dump_nested_types): Remove FORWARD parameter. Do not consider
4774 TREE_VISITED and do not generate a forward declaration. Only dump
4775 original nested types for nested declaration.
4776 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4777 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4778 <RECORD_TYPE>: Do not consider TREE_VISITED.
4779 (dump_ada_declaration): Use booleans and fix formatting throughout.
4780 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4781 Call dump_forward_type instead of dump_nested_types for a typedef.
4782 Remove superfluous check and adjust call to dump_nested_types.
4783 <POINTER_TYPE>: Call dump_forward_type and fall through.
4784 (dump_ada_struct_decl): Rename into...
4785 (dump_ada_structure): ...this. Do not special-case empty structures.
4786
d4cfd486
MS
47872018-02-27 Martin Sebor <msebor@redhat.com>
4788
4789 PR c++/83871
4790 * c.opt (-Wmissing-attributes): New option.
4791
b22dbd03
ML
47922018-02-21 Martin Liska <mliska@suse.cz>
4793
4794 * c.opt (Wcatch-value=): Add IntegerRange.
4795
883dfe2a
JM
47962018-02-15 Jason Merrill <jason@redhat.com>
4797
4798 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4799
0444aa9c
NS
48002018-02-09 Nathan Sidwell <nathan@acm.org>
4801
4802 PR c/84293
4803 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4804 arg.
4805 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4806 arg. Adjust.
4807
cea71f0a
MS
48082018-02-09 Martin Sebor <msebor@redhat.com>
4809
4810 PR lto/84212
4811 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4812 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4813 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4814 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4815 (-Wuninitialized): Same.
4816
8c8b7be5
EB
48172018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4818
4819 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4820 keyword for components.
4821
7c30b12a
PC
48222018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4823
4824 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4825
eece7fe5
JK
48262018-02-02 Julia Koval <julia.koval@intel.com>
4827
4828 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4829
7d07a93a
MP
48302018-01-29 Marek Polacek <polacek@redhat.com>
4831
4832 PR c/83966
4833 * c-format.c (check_function_format): Check current_function_decl.
4834
53723269
JJ
48352018-01-27 Jakub Jelinek <jakub@redhat.com>
4836
4837 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4838 argument.
4839 (LAZY_HEX_FP_VALUES_CNT): Define.
4840 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4841 values rather than just 12.
4842 (builtin_define_with_hex_fp_value): Likewise.
4843
7365279f
BK
48442018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4845
92a285c1
ML
4846 PR other/70268
4847 * c.opt (-fmacro-prefix-map): New option.
4848 * c-opts.c (c_common_handle_option): Handle it.
4849 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4850 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4851
bb9869d5
DM
48522018-01-17 David Malcolm <dmalcolm@redhat.com>
4853
4854 PR c++/83814
4855 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4856
68dc87c3
EB
48572018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4858
4859 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4860 Skip 'f' and 'F' characters if it is true.
4861 (store_ada_macro): Minor tweak.
4862 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4863 <CPP_WSTRING>: Likewise.
4864 <CPP_STRING>: Output '&' in the buffer if not the first string.
4865 <CPP_NUMBER>: Adjust calls to dump_number.
4866
9a004410
DM
48672018-01-10 David Malcolm <dmalcolm@redhat.com>
4868
4869 PR c++/43486
4870 * c-common.c: Include "selftest.h".
4871 (get_atomic_generic_size): Perform the test for integral type
4872 before the range test for any integer constant, fixing indentation
4873 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4874 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4875 (selftest::test_fold_for_warn): New function.
4876 (selftest::c_common_c_tests): New function.
4877 (selftest::c_family_tests): Call it, and
4878 selftest::c_pretty_print_c_tests.
4879 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4880 * c-format.c (check_format_arg): Convert VAR_P check to a
4881 fold_for_warn.
4882 * c-pretty-print.c: Include "selftest.h".
4883 (pp_c_cast_expression): Don't print casts for location wrappers.
4884 (selftest::assert_c_pretty_printer_output): New function.
4885 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4886 (selftest::test_location_wrappers): New function.
4887 (selftest::c_pretty_print_c_tests): New function.
4888 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4889
5c0caeb3
RS
48902018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4891 Alan Hayward <alan.hayward@arm.com>
4892 David Sherwood <david.sherwood@arm.com>
4893
4894 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4895
73a699ae
RS
48962018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4897 Alan Hayward <alan.hayward@arm.com>
4898 David Sherwood <david.sherwood@arm.com>
4899
4900 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4901 as polynomial.
4902
928686b1
RS
49032018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4904 Alan Hayward <alan.hayward@arm.com>
4905 David Sherwood <david.sherwood@arm.com>
4906
4907 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4908 (convert_vector_to_array_for_subscript): Handle polynomial
4909 TYPE_VECTOR_SUBPARTS.
4910 (c_common_type_for_mode): Check valid_vector_subparts_p.
4911 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4912 VECTOR_CST_NELTS.
4913
85ec4feb
JJ
49142018-01-03 Jakub Jelinek <jakub@redhat.com>
4915
4916 Update copyright years.
4917
170a8bd6 49182017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4919 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4920
4921 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4922 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4923
ab20d992 49242017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4925
4926 PR debug/83527
4927 PR debug/83419
4928 * c-semantics.c (only_debug_stmts_after_p): New.
4929 (pop_stmt_list): Clear side effects in debug-only stmt list.
4930 Check for single nondebug stmt followed by debug stmts only.
4931
c12d20d4
AO
49322017-12-21 Alexandre Oliva <aoliva@redhat.com>
4933
4934 PR debug/83419
4935 * c-semantics.c (pop_stmt_list): Propagate side effects from
4936 single nondebug stmt to container list.
4937
01512446
JJ
49382017-12-19 Jakub Jelinek <jakub@redhat.com>
4939
4940 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4941 conditions with typical order conditions.
4942
82cfbd01
MP
49432017-12-18 Marek Polacek <polacek@redhat.com>
4944
4945 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4946 not in effect.
4947
99da11ec
MS
49482017-12-17 Martin Sebor <msebor@redhat.com>
4949
4950 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4951 an error for attribute warn_if_not_aligned.
4952
cc8bea0a
MS
49532017-12-16 Martin Sebor <msebor@redhat.com>
4954
4955 PR tree-optimization/78918
4956 * c-common.c (check_function_restrict): Avoid checking built-ins.
4957 * c.opt (-Wrestrict): Include in -Wall.
4958
4849deb1
JJ
49592017-12-15 Jakub Jelinek <jakub@redhat.com>
4960
4961 * c-attribs.c (c_common_attribute_table,
4962 c_common_format_attribute_table): Swap affects_type_identity
4963 and handler fields, adjust comments.
4964
c65e18d3
BE
49652017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4966
4967 * c.opt (Wcast-function-type): New warning option.
4968 * c-lex.c (get_fileinfo): Avoid warning.
4969 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4970
2004617a
QZ
49712017-12-14 Qing Zhao <qing.zhao@oracle.com>
4972
7365279f 4973 PR middle_end/79538
2004617a
QZ
4974 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4975 Adjust the size of buf1 and buf2, add a new buf to avoid
4976 format-overflow warning.
4977
ab20d992 49782017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4979
4980 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4981 subsequent statement list.
4982
5d9ae53d
MS
49832017-12-07 Martin Sebor <msebor@redhat.com>
4984
4985 PR c/81544
4986 PR c/81566
4987 * c-attribs.c (attr_aligned_exclusions): New array.
4988 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4989 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4990 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4991 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4992 (attr_warn_unused_result_exclusions): Same.
4993 (handle_hot_attribute, handle_cold_attribute): Simplify.
4994 (handle_const_attribute): Warn on function returning void.
4995 (handle_pure_attribute): Same.
4996 (handle_aligned_attribute): Diagnose conflicting attribute
4997 specifications.
4998 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4999
c79144f8
DM
50002017-12-06 David Malcolm <dmalcolm@redhat.com>
5001
5002 PR c/83236
5003 * c-common.c (selftest::c_family_tests): Call
5004 selftest::c_spellcheck_cc_tests.
5005 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5006 * c-spellcheck.cc: Include "selftest.h".
5007 (name_reserved_for_implementation_p): New function.
5008 (should_suggest_as_macro_p): New function.
5009 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5010 should_suggest_as_macro_p and call it.
5011 (selftest::test_name_reserved_for_implementation_p): New function.
5012 (selftest::c_spellcheck_cc_tests): New function.
5013 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5014
613bc14f
DM
50152017-12-06 David Malcolm <dmalcolm@redhat.com>
5016
5017 * c-spellcheck.cc: New file, taken from macro-handling code in
5018 spellcheck-tree.c.
5019 * c-spellcheck.h: New file, taken from macro-handling code in
5020 spellcheck-tree.h.
5021
e76c7157
JJ
50222017-12-01 Jakub Jelinek <jakub@redhat.com>
5023
5024 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5025 attribute.
5026 (handle_simd_attribute): Don't check for "cilk simd function"
5027 attribute. Reindent, formatting changes.
5028
b0da4034
JK
50292017-11-30 Julia Koval <julia.koval@intel.com>
5030
5031 * c-common.h (inv_list): Remove.
5032
058f0b9e
JJ
50332017-11-28 Jakub Jelinek <jakub@redhat.com>
5034
5035 PR sanitizer/81275
5036 * c-common.c (c_switch_covers_all_cases_p_1,
5037 c_switch_covers_all_cases_p): New functions.
5038 * c-common.h (c_switch_covers_all_cases_p): Declare.
5039
5e9d6aa4 50402017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5041 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5042
5043 * array-notation-common.c: Delete.
5044 * c-cilkplus.c: Ditto.
5045 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5046 * c-common.def (ARRAY_NOTATION_REF): Remove.
5047 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5048 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5049 c_validate_cilk_plus_loop, cilkplus_an_parts,
5050 cilk_ignorable_spawn_rhs_op,
5051 cilk_recognize_spawn): Remove.
5052 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5053 * c-omp.c: Remove CILK_SIMD check.
5054 * c-pragma.c: Ditto.
5055 * c-pragma.h: Remove CILK related pragmas.
5056 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5057 ARRAY_NOTATION_REF condition.
5058 (c_pretty_printer::expression): Ditto.
5059 * c.opt (fcilkplus): Remove.
5060 * cilk.c: Delete.
5061
1af4ebf5
MG
50622017-11-21 Marc Glisse <marc.glisse@inria.fr>
5063
5064 * c-pretty-print.c (pp_c_additive_expression,
5065 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5066
d44ed508
JJ
50672017-11-21 Jakub Jelinek <jakub@redhat.com>
5068
7d2f0f9b
JJ
5069 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5070
d44ed508
JJ
5071 PR c++/83059
5072 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5073 instead of tree_to_uhwi, formatting fix.
5074
26edace6
DM
50752017-11-20 David Malcolm <dmalcolm@redhat.com>
5076
5077 PR c/81404
5078 * known-headers.cc: New file, based on material from c/c-decl.c.
5079 (suggest_missing_header): Copied as-is.
5080 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5081 heavily edited to add C++ support. Add some knowledge about
5082 <limits.h>, <stdint.h>, and <wchar.h>.
5083 * known-headers.h: Likewise.
5084
6c7a259b
DM
50852017-11-20 David Malcolm <dmalcolm@redhat.com>
5086
5087 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5088 (lookup_name_fuzzy): Likewise. Convert return type from
5089 const char * to name_hint. Add location_t param.
5090 * name-hint.h: New header.
5091
f9c59f7e
JJ
50922017-11-19 Jakub Jelinek <jakub@redhat.com>
5093
5094 PR c/66618
5095 PR c/69960
5096 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5097
1e39313a
JM
50982017-11-16 Joseph Myers <joseph@codesourcery.com>
5099
5100 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5101 expected publication date of C17.
5102 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5103
3ca0dc60
JM
51042017-11-15 Joseph Myers <joseph@codesourcery.com>
5105
5106 PR c/81156
5107 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5108 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5109
025d57f0
MS
51102017-11-10 Martin Sebor <msebor@redhat.com>
5111
5112 PR c/81117
5113 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5114 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5115 * c.opt (-Wstringop-truncation): New option.
5116
1b6fa695
ML
51172017-11-06 Martin Liska <mliska@suse.cz>
5118
5119 PR middle-end/82404
5120 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5121 FE.
5122 * c.opt: Set default value of warn_return_type.
5123
64a5912c
DM
51242017-10-31 David Malcolm <dmalcolm@redhat.com>
5125
5126 * c-common.c (binary_op_error): Update for renaming of
5127 error_at_rich_loc.
5128 (c_parse_error): Likewise.
5129 * c-warn.c (warn_logical_not_parentheses): Likewise for
5130 renaming of inform_at_rich_loc.
5131 (warn_for_restrict): Likewise for renaming of
5132 warning_at_rich_loc_n.
5133
c76dc9c3
JM
51342017-10-30 Joseph Myers <joseph@codesourcery.com>
5135
5136 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5137 * c-opts.c (set_std_c17): New function.
5138 (c_common_init_options): Use gnu17 as default C version.
5139 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5140
ee5fd23a
MM
51412017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5142
5143 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5144 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5145 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5146 __FP_FAST_FMA<N>X.
5147
d1047465
MP
51482017-10-23 Marek Polacek <polacek@redhat.com>
5149
5150 PR c/82681
5151 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5152
9e878cf1
EB
51532017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5154
5155 * c-common.c (check_builtin_function_arguments): Also check arguments
5156 of __builtin_alloca_with_align_and_max.
5157
89b6abbb
DM
51582017-10-17 David Malcolm <dmalcolm@redhat.com>
5159
5160 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5161 rather than NULL to format_warning_va.
5162 (check_format_types): Likewise when calling format_type_warning.
5163 Remove code to extract source_ranges and source_range * in favor
5164 of just a location_t.
5165 (format_type_warning): Convert source_range * param to a
5166 location_t.
5167
39382c09
JJ
51682017-10-13 Jakub Jelinek <jakub@redhat.com>
5169
5170 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5171 [LR]SHIFT_EXPR.
5172
62e1c678
DM
51732017-10-12 David Malcolm <dmalcolm@redhat.com>
5174
5175 * c-common.c (enum missing_token_insertion_kind): New enum.
5176 (get_missing_token_insertion_kind): New function.
5177 (maybe_suggest_missing_token_insertion): New function.
5178 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5179
b90c9338
NS
51802017-10-11 Nathan Sidwell <nathan@acm.org>
5181
5182 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5183 (c_common_handle_option): Update incpath_kind names.
5184
3a266bcd
ML
51852017-10-11 Martin Liska <mliska@suse.cz>
5186
5187 PR sanitizer/82490
5188 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5189 Wattributes warning.
5190
8e6cdc90
RS
51912017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5192
5193 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5194 operating on trees as wide_ints.
5195 * c-common.c (pointer_int_sum): Likewise.
5196 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5197 * c-warn.c (match_case_to_enum_1): Likewise.
5198 (c_do_switch_warnings): Likewise.
5199 (maybe_warn_shift_overflow): Likewise.
5200
802b38c9
JJ
52012017-10-10 Jakub Jelinek <jakub@redhat.com>
5202
5203 PR c/82437
5204 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5205 instead of wide_int::from.
5206
4e34b338
JJ
52072017-10-06 Jakub Jelinek <jakub@redhat.com>
5208
5209 PR c/82437
5210 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5211 using to_widest use wide_int with the larger of the two precisions.
5212
4bc4b2b4
BE
52132017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5214
5215 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5216 functions.
5217
a1488398
RS
52182017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5219
5220 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5221 when combining the original unconverted comparison operands.
5222
01c9fb68
JJ
52232017-09-29 Jakub Jelinek <jakub@redhat.com>
5224
5225 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5226 attribute.
5227
6e3e8419
EB
52282017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5229
5230 * c-ada-spec.c (to_ada_name): Add index parameter.
5231 (pp_ada_tree_identifier): Likewise.
5232 (dump_ada_macros): Adjust call to to_ada_name.
5233 (struct overloaded_name_hash): New type.
5234 (struct overloaded_name_hasher): Likewise.
5235 (overloaded_names): New hash table.
5236 (compute_overloading_index): New function.
5237 (dump_ada_decl_name): Call it and pass the result to
5238 pp_ada_tree_identifier.
5239 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5240 (dump_ada_function_declaration): Likewise.
5241 (dump_generic_ada_node): Likewise.
5242 (print_constructor): Likewise.
5243 (print_destructor): Likewise.
5244 (dump_ada_specs): Delete overloaded_names table.
5245
79310774
EB
52462017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5247
5248 * c-ada-spec.c (max_ada_macros): Move around.
5249 (store_ada_macro_index): Likewise.
5250 (source_file): Rename into...
5251 (macro_source_file): ...this.
5252 (count_ada_macro): Move around.
5253 (store_ada_macro): Likewise.
5254 (compare_macro): Likewise.
5255 (print_ada_macros): Merge in...
5256 (dump_ada_macros): ...this.
5257 (source_file_base): Rename into...
5258 (current_source_file): ...this.
5259 (print_comment): Move around.
5260 (dump_ada_nodes): Call dump_ada_declaration directly.
5261 (struct with): Change type of limited field to bool.
5262 (append_withs): Change type of limited_access parameter to bool.
5263 (pp_ada_tree_identifie): Likewise.
5264 (dump_ada_decl_nam): Likewise.
5265 (dump_generic_ada_node): Likewise. Do not print the return type.
5266 (to_ada_name): Change type of space_found parameter to bool.
5267 (dump_ada_function_declaration): Return void and change type of
5268 parameters to bool. Also print the return type for a function.
5269 (print_ada_methods): Rename into...
5270 (dump_ada_methods): ...this.
5271 (print_ada_declaration): Rename into ...
5272 (dump_ada_declaration): ...this. Do not print the return type.
5273 (print_ada_struct_decl): Rename into...
5274 (dump_ada_struct_decl): ...this.
5275
7d386d45
JJ
52762017-09-29 Jakub Jelinek <jakub@redhat.com>
5277
5278 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5279 rather than DECL_INITIAL.
5280 (common_handle_aligned_attribute): Likewise.
5281
ab20d992 52822017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5283
5284 * c.opt (gen-decls): Add RejectNegative.
5285
026a79f7
AS
52862017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5287 Jakub Jelinek <jakub@redhat.com>
5288
5289 Add support for -std=c++2a.
5290 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5291 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5292 * c-opts.c (set_std_cxx2a): New.
5293 (c_common_handle_option): Set options when -std=c++2a is enabled.
5294 (c_common_post_options): Adjust comments.
5295 (set_std_cxx14, set_std_cxx17): Likewise.
5296
4a8ca690
EB
52972017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5298
5299 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5300 message for non-uniform endianness and issue a warning in C++.
5301
7b936140
JJ
53022017-09-15 Jakub Jelinek <jakub@redhat.com>
5303
5304 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5305 (Wc++17-compat): Change from undocumented alias to option.
5306 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5307 change C++1z to C++17 in description.
5308 (std=c++1z, std=gnu++1z): Change from option to undocumented
5309 deprecated alias.
5310 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5311 Adjust description.
5312 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5313 * c-opts.c (set_std_cxx1z): Rename to ...
5314 (set_std_cxx17): ... this.
5315 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5316 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5317 caller.
7b936140
JJ
5318 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5319 comments.
5320
12263f13
L
53212017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5322
5323 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5324 function alignment if warn_if_not_aligned_p is true.
5325
6836632e
NS
53262017-09-12 Nathan Sidwell <nathan@acm.org>
5327
5328 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5329 resort_sorted_fields): Move to c/c-decl.c.
5330 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5331 (struct sorted_fields_type): Move to c/c-lang.h.
5332
019bf9ad
JW
53332017-09-09 Jonathan Wakely <jwakely@redhat.com>
5334
5335 PR c++/81852
5336 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5337
bc7fe952
MP
53382017-09-04 Marek Polacek <polacek@redhat.com>
5339
5340 PR c/81783
5341 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5342 (warn_tautological_cmp): Call it.
5343
ab20d992 53442017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5345
5346 * c-opts.c (c_common_finish): Write dependency information even if
5347 there are errors.
5348
d2e05fcb
JJ
53492017-09-01 Jakub Jelinek <jakub@redhat.com>
5350
5351 PR c/81887
5352 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5353 (omp_pragmas_simd): ... here.
5354 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5355 create new clauses list containing just simd clause.
5356
18e2a8b8
RS
53572017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5358 Alan Hayward <alan.hayward@arm.com>
5359 David Sherwood <david.sherwood@arm.com>
5360
5361 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5362 into scalar_mode_supported_p call.
5363 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5364
16d22000
RS
53652017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5366 Alan Hayward <alan.hayward@arm.com>
5367 David Sherwood <david.sherwood@arm.com>
5368
5369 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5370 for the mode iterator.
5371
b397965c
RS
53722017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5373 Alan Hayward <alan.hayward@arm.com>
5374 David Sherwood <david.sherwood@arm.com>
5375
5376 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5377 * c-common.c (c_build_vec_perm_expr): Likewise.
5378
357b7604
RS
53792017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5380 Alan Hayward <alan.hayward@arm.com>
5381 David Sherwood <david.sherwood@arm.com>
5382
5383 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5384
e05c94ba
RS
53852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5386 Alan Hayward <alan.hayward@arm.com>
5387 David Sherwood <david.sherwood@arm.com>
5388
5389 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5390 before calling targetm.addr_space.valid_pointer_mode.
5391
5c20c4af
RS
53922017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5393 Alan Hayward <alan.hayward@arm.com>
5394 David Sherwood <david.sherwood@arm.com>
5395
5396 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5397
c94843d2 53982017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5399 Alan Hayward <alan.hayward@arm.com>
5400 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5401
5402 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5403 iterators.
5404 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5405
4e10a5a7
RS
54062017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5407 Alan Hayward <alan.hayward@arm.com>
5408 David Sherwood <david.sherwood@arm.com>
5409
5410 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5411 case statements.
5412
130fcab0
ML
54132017-08-29 Martin Liska <mliska@suse.cz>
5414
5415 PR other/39851
5416 * c-common.c (parse_optimize_options): Add argument to function
5417 call.
5418 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5419
14e18d71
DM
54202017-08-24 David Malcolm <dmalcolm@redhat.com>
5421
5422 * c-lex.c (interpret_float): Use token location
5423 when building an EXCESS_PRECISION_EXPR.
5424
2f687306
DM
54252017-08-21 David Malcolm <dmalcolm@redhat.com>
5426
5427 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5428 it to check_function_format.
5429 * c-common.h (check_function_arguments): Add vec<location_t> *
5430 param.
5431 (check_function_format): Likewise.
5432 * c-format.c (struct format_check_context): Add field "arglocs".
5433 (check_function_format): Add param "arglocs"; pass it to
5434 check_format_info.
ab20d992 5435 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5436 new field of format_ctx.
5437 (check_format_arg): Pass format_ctx->arglocs to new param of
5438 check_format_info_main.
5439 (class argument_parser): New field "arglocs".
5440 (argument_parser::argument_parser): Add "arglocs_" param and use
5441 it to initialize new field.
5442 (argument_parser::check_argument_type): Pass new arglocs field to
5443 check_format_types.
5444 (check_format_info_main): Add param "arglocs", and use it when
5445 constructing arg_parser.
5446 (check_format_types): Add param "arglocs"; use it if non-NULL when
5447 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5448
00aa1fa2
L
54492017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5450
5451 PR c/53037
5452 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5453 (c_common_attribute_table): Add warn_if_not_aligned.
5454 (handle_aligned_attribute): Renamed to ...
5455 (common_handle_aligned_attribute): Remove argument, name, and add
5456 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5457 (handle_aligned_attribute): New.
5458 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5459
27be025d
MS
54602017-08-14 Martin Sebor <msebor@redhat.com>
5461
5462 PR c/81117
5463 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5464 (handle_nonstring_attribute): New function.
5465
da67acb9
MS
54662017-08-14 Martin Sebor <msebor@redhat.com>
5467
5468 PR c/81117
5469 * c-format.h (T89_G): New macro.
5470 * c-format.c (local_gcall_ptr_node): New variable.
5471 (init_dynamic_diag_info): Initialize it.
5472
a8b522b4
ML
54732017-08-11 Martin Liska <mliska@suse.cz>
5474
5475 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5476 TARGET_SUPPORTS_ALIASES.
5477
32129a17
DM
54782017-08-10 David Malcolm <dmalcolm@redhat.com>
5479
5480 * c-common.c (c_parse_error): Add rich_location * param, using it
5481 rather implicitly using input_location.
5482 * c-common.h (c_parse_error): Add rich_location * param.
5483
30af3a2b
MP
54842017-08-09 Marek Polacek <polacek@redhat.com>
5485
5486 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5487 (c_common_truthvalue_conversion): Likewise.
5488 * c-omp.c (c_finish_omp_atomic): Likewise.
5489 * c-common.h (build_binary_op): Update declaration.
5490
314e6352
ML
54912017-08-08 Martin Liska <mliska@suse.cz>
5492
5493 * c-ada-spec.c: Include header files.
5494 * c-ubsan.c: Likewise.
5495 * c-warn.c: Likewise.
5496
56b5041c
JJ
54972017-08-07 Jakub Jelinek <jakub@redhat.com>
5498
5499 PR c/69389
5500 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5501
db440138
EB
55022017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5503
5504 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5505 (print_ada_methods): Likewise.
5506 (print_ada_declaration): Likewise.
5507
577eec56
ML
55082017-08-07 Martin Liska <mliska@suse.cz>
5509
5510 * array-notation-common.c: Add new includes.
5511 * c-format.c( handle_format_attribute): Canonicalize a format
5512 function name.
5513 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5514 attribute.
5515 * c-pretty-print.c: Add new include.
5516
b854df3c
EB
55172017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5518
5519 * c-ada-spec.c (has_static_fields): Look only into variables.
5520 (print_constructor): Add TYPE parameter and use it for the name.
5521 (print_destructor): Likewise.
5522 (print_ada_declaration): Adjust to new constructor/destructor names.
5523 Adjust calls to print_constructor and print_destructor.
5524 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5525 Look only into variables in the final loop.
5526
9f2cb25e
EB
55272017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5528
5529 * c-ada-spec.c (has_static_fields): Look only into fields.
5530 (dump_generic_ada_node): Small tweak.
5531 (dump_nested_types): Look only into fields.
5532 (print_ada_declaration): Look only into methods. Small tweak.
5533 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5534
f4bcd9eb
EB
55352017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5536
5537 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5538 (dump_ada_function_declaration): Likewise.
5539 (dump_generic_ada_node): Likewise.
5540 (print_ada_declaration): Add support for const-qualified variables.
5541
f34ebeb2
ML
55422017-07-31 Martin Liska <mliska@suse.cz>
5543
5544 PR sanitize/81530
5545 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5546 Guard condition with flag_sanitize_p also with current_function_decl
5547 non-null equality.
5548 (ubsan_maybe_instrument_reference_or_call): Likewise.
5549
218e5d04
UB
55502017-07-30 Uros Bizjak <ubizjak@gmail.com>
5551
5552 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5553
942047f2
EB
55542017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5555
5556 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5557 for enumeral types.
5558 (print_ada_declaration): Add missing guard for record types.
5559
a40ff0ae
JJ
55602017-07-27 Jakub Jelinek <jakub@redhat.com>
5561
5562 PR c/45784
5563 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5564 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5565 new COMPOUND_EXPRs around the rhs of the comparison.
5566
06bd22f6
MP
55672017-07-27 Marek Polacek <polacek@redhat.com>
5568
5569 PR c/81417
5570 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5571 the types.
5572
036ea399
JJ
55732017-07-27 Jakub Jelinek <jakub@redhat.com>
5574
5575 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5576 (handle_noipa_attribute): New function.
5577
417ca011
TD
55782017-07-07 Torsten Duwe <duwe@suse.de>
5579
5580 * c-attribs.c (c_common_attribute_table): Add entry for
5581 "patchable_function_entry".
5582
5aaa8fb4
NS
55832017-07-20 Nathan Sidwell <nathan@acm.org>
5584
5585 Remove TYPE_METHODS.
5586 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5587 dump_ada_template, print_ada_methods,
5588 print_ada_declaration): Member fns are on TYPE_FIELDS.
5589
ff22eb12
NS
55902017-07-18 Nathan Sidwell <nathan@acm.org>
5591
5592 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5593
eea77d1f
DM
55942017-07-14 David Malcolm <dmalcolm@redhat.com>
5595
5596 * c-common.c (try_to_locate_new_include_insertion_point): New
5597 function.
5598 (per_file_includes_t): New typedef.
5599 (added_includes_t): New typedef.
5600 (added_includes): New variable.
5601 (maybe_add_include_fixit): New function.
5602 * c-common.h (maybe_add_include_fixit): New decl.
5603
281ac396
MS
56042017-07-10 Martin Sebor <msebor@redhat.com>
5605
5606 PR other/81345
5607 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5608
b6f43128
DM
56092017-07-06 David Malcolm <dmalcolm@redhat.com>
5610
5611 * c-common.c (selftest::c_family_tests): New.
5612 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5613 (selftest::c_family_tests): New decl.
5614
efbf55b0
MP
56152017-07-04 Marek Polacek <polacek@redhat.com>
5616
5617 PR c/81231
5618 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5619 types.
5620
6c86bd88
MP
56212017-07-04 Marek Polacek <polacek@redhat.com>
5622
5623 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5624
17a7218b
ML
56252017-06-28 Martin Liska <mliska@suse.cz>
5626
5627 PR ipa/81128
5628 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5629 to a function declaration.
5630
63010089
ML
56312017-06-28 Martin Liska <mliska@suse.cz>
5632
5633 PR driver/79659
5634 * c.opt: Add IntegerRange to various options.
5635
3e2becc4
MP
56362017-06-26 Marek Polacek <polacek@redhat.com>
5637
5638 PR c/80116
5639 * c-common.h (warn_for_multistatement_macros): Declare.
5640 * c-warn.c: Include "c-family/c-indentation.h".
5641 (warn_for_multistatement_macros): New function.
5642 * c.opt (Wmultistatement-macros): New option.
5643 * c-indentation.c (guard_tinfo_to_string): No longer static.
5644 Change the parameter type to "enum rid". Handle RID_SWITCH.
5645 * c-indentation.h (guard_tinfo_to_string): Declare.
5646
2db9b7cd
MG
56472017-06-23 Marc Glisse <marc.glisse@inria.fr>
5648
5649 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5650
c3684b7b
MS
56512017-06-15 Martin Sebor <msebor@redhat.com>
5652
5653 PR c++/80560
5654 * c.opt (-Wclass-memaccess): New option.
5655
e72c4afd
BK
56562017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5657
5658 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5659
8a516588
MP
56602017-06-13 Marek Polacek <polacek@redhat.com>
5661
5662 PR objc/80949
5663 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5664 branches is null.
5665
45b2222a
ML
56662017-06-13 Martin Liska <mliska@suse.cz>
5667
5668 PR sanitize/78204
5669 * c-attribs.c (add_no_sanitize_value): New function.
5670 (handle_no_sanitize_attribute): Likewise.
5671 (handle_no_sanitize_address_attribute): Use the function.
5672 (handle_no_sanitize_thread_attribute): New function.
5673 (handle_no_address_safety_analysis_attribute): Use
5674 add_no_sanitize_value.
5675 (handle_no_sanitize_undefined_attribute): Likewise.
5676 * c-common.h: Declare new functions.
5677 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5678 (ubsan_instrument_shift): Likewise.
5679 (ubsan_instrument_bounds): Likewise.
5680 (ubsan_maybe_instrument_array_ref): Likewise.
5681 (ubsan_maybe_instrument_reference_or_call): Likewise.
5682
a01f151f
JM
56832017-06-11 Jason Merrill <jason@redhat.com>
5684
5685 * c-ada-spec.c, c-pragma.c: Use id_equal.
5686
3de4ac6d
MP
56872017-06-04 Marek Polacek <polacek@redhat.com>
5688
5689 PR c/80919
5690 * c-format.c (matching_type_p): Return false if any of the types
5691 requires structural equality.
5692
2474f48f
MS
56932017-06-02 Martin Sebor <msebor@redhat.com>
5694
5695 PR c/80892
5696 * c-warn.c (conversion_warning): Use -Wconversion for integer
5697 conversion and -Wfloat-conversion for floating one.
5698
40ffd95f
BE
56992017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5700
5701 * c.opt (Wsizeof-pointer-div): New warning option.
5702
3fa4634c
VR
57032017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5704
5705 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5706 (Wcatch-value=1): Enable by -Wall.
5707
f012c8ef
DM
57082017-05-30 David Malcolm <dmalcolm@redhat.com>
5709
5710 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5711 format_chars.
5712 * c.opt (fdiagnostics-show-template-tree): New option.
5713 (felide-type): New option.
5714
63dbcd13
VR
57152017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5716
5717 * c.opt (Wcatch-value=): New C++ warning flag.
5718
be136b5c
NS
57192017-05-24 Nathan Sidwell <nathan@acm.org>
5720
5721 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5722 const casts to avoid warning.
5723
3cd211af
MS
57242017-05-24 Martin Sebor <msebor@redhat.com>
5725
5726 PR c/80731
5727 * c-common.h (unsafe_conversion_p): Add a function argument.
5728 * c-common.c (unsafe_conversion_p): Same.
5729 Add type names and values to diagnostics.
5730 (scalar_to_vector): Adjust.
5731 * c-warn.c (constant_expression_error): Add a function argument.
5732 Add type names and values to diagnostics.
5733 (conversion_warning): Add a function argument.
5734 Add type names and values to diagnostics.
5735 (warnings_for_convert_and_check): Same.
5736
1ff7be5a
JM
57372017-05-19 Jason Merrill <jason@redhat.com>
5738
5739 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5740 enumerators.
5741
ff502317
BE
57422017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5743
5744 * c-format.c (locus): Move out of function scope,
5745 add GTY attribute.
5746
2a8a8d7b
NS
57472017-05-19 Nathan Sidwell <nathan@acm.org>
5748
5749 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5750 (c_common_parse_file): Remove class dump handling.
5751 (get_dump_info): Likewise.
5752
39aac208
RB
57532017-05-19 Richard Biener <rguenther@suse.de>
5754
5755 PR c++/80593
5756 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5757 to alias-set zero memory.
5758
6ecd2339
BE
57592017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5760
5761 * c-format.c (local_tree_type_node): Add GTY attribute.
5762
6574d78e
MP
57632017-05-18 Marek Polacek <polacek@redhat.com>
5764
5765 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5766 (c_common_fixed_point_type_for_size): Likewise.
5767 (c_common_type_for_mode): Likewise.
5768 (shorten_compare): Likewise.
5769 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5770 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5771
e3455240
MP
57722017-05-18 Marek Polacek <polacek@redhat.com>
5773
5774 * c-common.c (self_promoting_args_p): Change the return type to bool.
5775 Use false/true instead of 0/1.
5776 * c-common.h (self_promoting_args_p): Update.
5777
3fa8871b
MP
57782017-05-17 Marek Polacek <polacek@redhat.com>
5779
5780 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5781 * c-warn.c: Likewise.
5782
b42cc3ca
VV
57832017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5784
5785 Implement new C++ intrinsics __is_assignable and __is_constructible.
5786 * c-common.c (__is_assignable, __is_constructible): New.
5787 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5788
1a817418
ML
57892017-05-17 Martin Liska <mliska@suse.cz>
5790
5791 * c-common.h: Introduce dump_flags_t type and
5792 use it instead of int type.
5793 * c-gimplify.c (c_genericize): Likewise.
5794 * c-opts.c: Likewise.
5795
b2fa0a8b
MP
57962017-05-17 Marek Polacek <polacek@redhat.com>
5797
5798 * c-common.c (c_save_expr): Remove.
5799 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5800 * c-common.h (c_save_expr): Remove declaration.
5801
31c2d57d
VR
58022017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5803
5804 PR c/35441
5805 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5806 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5807 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5808 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5809 RDIV_EXPR.
5810 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5811
684f84de
MP
58122017-05-09 Marek Polacek <polacek@redhat.com>
5813
5814 PR c/80525
5815 * c-warn.c (unwrap_c_maybe_const): New.
5816 (warn_logical_operator): Call it.
5817
641da50a
NS
58182017-05-09 Nathan Sidwell <nathan@acm.org>
5819
5820 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5821 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5822
631238ac
MS
58232017-05-08 Martin Sebor <msebor@redhat.com>
5824
5825 PR translation/80280
5826 * c-format.h (struct format_flag_spec): Add new member.
5827 (T89_T): New macro.
5828 * c-format.c (local_tree_type_node): New global.
5829 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5830 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5831 (strfmon_flag_specs): Likewise.
5832 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5833 with distinct quoting properties.
5834 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5835 (flag_chars_t::validate): Add argument and handle bad quoting.
5836 (check_format_info_main): Handle quoting problems.
5837 (init_dynamic_diag_info): Simplify.
5838
49f0c04c
JM
58392017-05-08 Jason Merrill <jason@redhat.com>
5840
5841 * c-opts.c (c_common_post_options): Update defaults for
5842 flag_abi_version and flag_abi_compat_version.
5843
56d35585
DM
58442017-05-05 David Malcolm <dmalcolm@redhat.com>
5845
5846 * c-common.c (c_cpp_error): Replace report_diagnostic
5847 with diagnostic_report_diagnostic.
5848
0f2c4a8f
MS
58492017-05-04 Martin Sebor <msebor@redhat.com>
5850
5851 PR translation/80280
5852 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5853 (handle_weakref_attribute): Same.
5854
6fe63fb4
NS
58552017-05-03 Nathan Sidwell <nathan@acm.org>
5856
5857 Canonicalize canonical type hashing
5858 * c-common.c (complete_array_type): Use type_hash_canon.
5859
815d9cc6
XR
58602017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5861
92a285c1 5862 PR c++/80038
815d9cc6
XR
5863 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5864 prototype.
5865 (cilk_install_body_pedigree_operations): Likewise.
5866 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5867 detatched.
5868 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5869 (cilk_install_body_pedigree_operations): Likewise.
5870 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5871 unwrapping.
5872
f8a36447
JJ
58732017-04-27 Jakub Jelinek <jakub@redhat.com>
5874
5875 PR c++/80534
5876 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5877 flag on non-aggregate element types.
5878
7c145456
BE
58792017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5880
5881 * c-common.c (c_type_hasher, type_hash_table): Remove.
5882 (c_common_get_alias_set): Remove unreachable code.
5883 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5884
c3cbcd45
VR
58852017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5886
5887 * c.opt (Wextra-semi): New C++ warning flag.
5888
8a59d466
JJ
58892017-04-20 Jakub Jelinek <jakub@redhat.com>
5890
5891 PR middle-end/80423
5892 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5893
8487c9a5
JJ
58942017-04-18 Jakub Jelinek <jakub@redhat.com>
5895
5896 PR middle-end/79788
5897 PR middle-end/80375
5898 * c-common.c (c_common_type_for_mode): Don't handle
5899 widest_*_literal_type_node here.
5900 c_common_signed_or_unsigned_type): Likewise.
5901 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5902 to *intTI_type_node or *intDI_type_node depending on whether
5903 TImode is supported by the target or not.
5904
3ee0fb02
ML
59052017-04-10 Martin Liska <mliska@suse.cz>
5906
5907 PR sanitizer/80350
5908 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5909 doing an UBSAN check.
5910
5764ee3c
JW
59112017-04-03 Jonathan Wakely <jwakely@redhat.com>
5912
5913 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5914
6f3af356
JJ
59152017-03-31 Jakub Jelinek <jakub@redhat.com>
5916
5917 PR c++/79572
5918 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5919 tree *.
5920 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5921 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5922 REFERENCE_TYPE.
5923
f6a7a9d5
DM
59242017-03-31 David Malcolm <dmalcolm@redhat.com>
5925
5926 PR documentation/78732
5927 * c.opt (Wendif-labels): Fix description to refer to
5928 #else rather than #elif.
5929
af88f557
JJ
59302017-03-31 Jakub Jelinek <jakub@redhat.com>
5931
5932 PR libstdc++/80251
5933 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5934 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5935
a9e4a1a5
JJ
59362017-03-27 Jakub Jelinek <jakub@redhat.com>
5937
5938 PR middle-end/80162
5939 * c-common.c (c_common_mark_addressable_vec): Don't set
5940 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5941
3f01b620
MS
59422017-03-21 Martin Sebor <msebor@redhat.com>
5943
5944 PR c++/79548
5945 * c-common.c (set_underlying_type): Mark type used only when
5946 original del is declared unused.
5947
2f6f187a
DM
59482017-03-10 David Malcolm <dmalcolm@redhat.com>
5949
5950 PR translation/79848
5951 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5952 "%qs".
5953
a02fa805
DM
59542017-03-10 David Malcolm <dmalcolm@redhat.com>
5955
5956 PR c/79921
5957 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5958 from inform's message, so that xgettext can locate it.
5959
822a132c
MP
59602017-03-09 Marek Polacek <polacek@redhat.com>
5961
5962 PR c++/79962
5963 PR c++/79984
5964 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5965 conversion to the attribute list.
5966
bba81f1c
ML
59672017-03-09 Martin Liska <mliska@suse.cz>
5968
5969 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5970
108154ff
JM
59712017-03-03 Jason Merrill <jason@redhat.com>
5972
5973 * c.opt (Wnoexcept-type): New.
5974
eb0e7c34
RB
59752017-03-02 Richard Biener <rguenther@suse.de>
5976
5977 PR c/79756
5978 * c-common.c (c_common_mark_addressable_vec): Look through
5979 C_MAYBE_CONST_EXPR.
5980
9453ba0a
ML
59812017-02-28 Martin Liska <mliska@suse.cz>
5982
5983 * c.opt: Replace space with tabular for options of <number>
5984 type.
5985
6a825afe
ML
59862017-02-28 Martin Liska <mliska@suse.cz>
5987
5988 * c.opt: Fix --help=option -Q for options which are of
5989 an enum type.
5990
4227c9ad
JJ
59912017-02-24 Jakub Jelinek <jakub@redhat.com>
5992
5993 PR c++/79588
5994 * c-common.c (check_function_restrict): New function.
5995 (check_function_arguments): Add FNDECL argument. Call
5996 check_function_restrict if -Wrestrict.
5997 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5998 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5999 * c-common.h (check_function_arguments): Add FNDECL argument.
6000 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6001
59909673
EB
60022017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6003
6004 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6005 treatment of parameters with pointer-to-tagged type and tidy up.
6006 (print_ada_methods): Remove the special treatment of C++ static member
6007 functions.
6008
54dcd526
ML
60092017-02-22 Martin Liska <mliska@suse.cz>
6010
6011 * c.opt: Replace inequality signs with square brackets
6012 for -Wnornalized.
6013
00bc9de3
JJ
60142017-02-21 Jakub Jelinek <jakub@redhat.com>
6015
6016 PR c++/79641
6017 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6018 preserve quals.
6019
97fcf744
JM
60202017-02-17 Joseph Myers <joseph@codesourcery.com>
6021
6022 * c-cppbuiltin.c (builtin_define_float_constants): Define
6023 __DECIMAL_DIG__ to the value for long double.
6024
c7545f1c
MP
60252017-02-15 Marek Polacek <polacek@redhat.com>
6026
6027 PR c/79515
6028 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6029 conversion has occured.
6030
c2e84327
DM
60312017-01-24 David Malcolm <dmalcolm@redhat.com>
6032
6033 * c-common.c (c_common_reswords): Add "__RTL".
6034 * c-common.h (enum rid): Add RID_RTL.
6035
2ebd93e1
MP
60362017-01-20 Marek Polacek <polacek@redhat.com>
6037
6038 PR c/64279
6039 * c-common.h (do_warn_duplicated_branches_r): Declare.
6040 * c-gimplify.c (c_genericize): Walk the function tree calling
6041 do_warn_duplicated_branches_r.
6042 * c-warn.c (expr_from_macro_expansion_r): New.
6043 (do_warn_duplicated_branches): New.
6044 (do_warn_duplicated_branches_r): New.
6045 * c.opt (Wduplicated-branches): New option.
6046
0d80ab91
DM
60472017-01-17 David Malcolm <dmalcolm@redhat.com>
6048
6049 PR c++/71497
6050 * c-indentation.c (warn_for_misleading_indentation): Use the past
6051 subjunctive in the note.
6052
7f991c36
AH
60532017-01-17 Aldy Hernandez <aldyh@redhat.com>
6054
6055 PR c/79116
6056 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6057 start type to integer_type.
6058
1c70261c
JJ
60592017-01-16 Jakub Jelinek <jakub@redhat.com>
6060
6061 PR driver/49726
6062 * c.opt (gen-decls): Add Driver flag.
6063
1ddca3f3
PC
60642017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6065
6066 Revert:
6067 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6068
6069 PR c++/71737
6070 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6071
7d2f3f1d
PC
60722017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6073
6074 PR c++/71737
6075 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6076
bce6f760
MS
60772017-01-12 Martin Sebor <msebor@redhat.com>
6078
6079 (-Wformat-overflow): ...to this.
6080
bf5fbf46
MS
60812017-01-11 Martin Sebor <msebor@redhat.com>
6082
6083 PR c/78768
6084 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6085 Also enable for LTO.
6086
e363df3f
JM
60872017-01-10 Jason Merrill <jason@redhat.com>
6088
6089 Implement P0195R2, C++17 variadic using.
6090 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6091
bd2c6270
JJ
60922017-01-09 Jakub Jelinek <jakub@redhat.com>
6093
6094 PR translation/79019
6095 PR translation/79020
6096 * c.opt (Wnormalized=): Fix typo in description.
6097
efcc8d38
MS
60982017-01-08 Martin Sebor <msebor@redhat.com>
6099
6100 PR middle-end/77708
6101 * c.opt (-Wformat-truncation): New option.
6102
ab20d992 61032017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6104
6105 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6106 value to unsigned short to fit in 4 hex digits without
6107 warnings.
6108
4e89adf9
EB
61092017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6110
6111 * c.opt (fsso-struct): Add 'native' value.
6112
cd445b54
ML
61132017-01-05 Martin Liska <mliska@suse.cz>
6114
6115 PR pch/78970
6116 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6117 header.
6118
a9342885
MP
61192017-01-04 Marek Polacek <polacek@redhat.com>
6120
6121 PR c++/64767
6122 * c.opt (Wpointer-compare): New option.
6123
fc73e60c
JJ
61242017-01-04 Jakub Jelinek <jakub@redhat.com>
6125
6126 PR driver/78957
6127 * c.opt (fsso-struct=): Add RejectNegative.
6128
cbe34bb5
JJ
61292017-01-01 Jakub Jelinek <jakub@redhat.com>
6130
6131 Update copyright years.
6132
d4a6c0ea
ML
61332016-12-29 Martin Liska <mliska@suse.cz>
6134
6135 PR c/78933
6136 * c.opt (strong-eval-order): Add RejectNegative keyword.
6137
67a5ad7c
JM
61382016-12-22 Jason Merrill <jason@redhat.com>
6139
6140 Implement P0522R0, matching of template template arguments.
6141 * c-cppbuiltin.c (c_cpp_builtins): Define
6142 __cpp_template_template_args.
6143
0dba7960
JJ
61442016-12-21 Jakub Jelinek <jakub@redhat.com>
6145
6146 PR bootstrap/78817
6147 * c-common.c (struct nonnull_arg_ctx): New type.
6148 (check_function_nonnull): Return bool instead of void. Use
6149 nonnull_arg_ctx as context rather than just location_t.
6150 (check_nonnull_arg): Adjust for the new context type, set
6151 warned_p to true if a warning has been diagnosed.
6152 (check_function_arguments): Return bool instead of void.
6153 * c-common.h (check_function_arguments): Adjust prototype.
6154
31bfc9b9
JM
61552016-12-21 Jason Merrill <jason@redhat.com>
6156
6157 * c.opt (-fnew-ttp-matching): New flag.
6158 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6159
629b3d75
MJ
61602016-12-14 Martin Jambor <mjambor@suse.cz>
6161
6162 * c-omp.c: Include omp-general.h instead of omp-low.h.
6163 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6164 name.
6165
474da67e
MS
61662016-12-14 Martin Sebor <msebor@redhat.com>
6167
6168 PR c/17308
6169 * c-common.c (check_nonnull_arg): Disable when optimization
6170 is enabled.
6171
fe366b87
MP
61722016-12-12 Marek Polacek <polacek@redhat.com>
6173
6174 PR c++/78647
6175 * c-common.c (attribute_fallthrough_p): Return false for
6176 error_mark_node.
6177
8bd9f164
MS
61782016-12-08 Martin Sebor <msebor@redhat.com>
6179
6180 PR c/78284
6181 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6182
060162e0
MS
61832016-12-08 Martin Sebor <msebor@redhat.com>
6184
6185 PR c/78165
92a285c1
ML
6186 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6187 suffix.
060162e0 6188
ee92e7ba
MS
61892016-12-07 Martin Sebor <msebor@redhat.com>
6190
6191 PR c/53562
6192 PR middle-end/77784
6193 PR middle-end/78149
6194 PR middle-end/78138
6195 * c.opt (-Wstringop-overflow): New option.
6196
84b0769e
MO
61972016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6198
6199 * c-attribs.c (asan odr indicator): New attribute.
6200 (handle_asan_odr_indicator_attribute): New function.
6201
7fa6a965
PK
62022016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6203
6204 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6205 ptrdiff_type_node;
6206
56d8ffc1
JG
62072016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6208
6209 * c-common.c (excess_precision_mode_join): New.
6210 (c_ts18661_flt_eval_method): New.
6211 (c_c11_flt_eval_method): Likewise.
6212 (c_flt_eval_method): Likewise.
6213 * c-common.h (excess_precision_mode_join): New.
6214 (c_flt_eval_method): Likewise.
6215 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6216 (cpp_iec_559_value): Call it.
6217 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6218 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6219 __FLT_EVAL_METHOD_TS_18661_3__.
6220
04f0fcf7
JG
62212016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6222
6223 * c-opts.c (c_common_post_options): Add logic to handle the default
6224 case for -fpermitted-flt-eval-methods.
6225
fb2675cb
PB
62262016-11-23 Paolo Bonzini <bonzini@gnu.org>
6227
6228 * c.opt (Wexpansion-to-defined): New.
6229
ec1c5694
JJ
62302016-11-23 Jakub Jelinek <jakub@redhat.com>
6231
6232 PR target/78451
6233 * c-pragma.c (handle_pragma_target): Don't replace
6234 current_target_pragma, but chainon the new args to the current one.
6235
730c9e75
NS
62362016-11-22 Nathan Sidwell <nathan@acm.org>
6237
6238 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6239 indentation and formatting.
730c9e75 6240
89990732
MS
62412016-11-21 Martin Sebor <msebor@redhat.com>
6242
6243 * c.opt (-fprintf-return-value): Enable by default.
6244
48330c93
BE
62452016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6246
6247 PR c++/71973
6248 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6249 * c-common.c (c_common_nodes_and_builtins): Initialize
6250 const_tm_ptr_type_node.
6251
0d939c95
MP
62522016-11-16 Marek Polacek <polacek@redhat.com>
6253
6254 PR c/78285
6255 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6256
8e745a17
JJ
62572016-11-14 Jakub Jelinek <jakub@redhat.com>
6258
6259 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6260
1ee62b92 62612016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6262 Richard Biener <rguenther@suse.de>
6263
6264 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6265 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6266 * c.opt (fgimple): New option.
1ee62b92 6267
22b15758
UB
62682016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6269
6270 PR c/35503
6271 * c-common.h (warn_for_restrict): Declare.
6272 * c-warn.c: Include gcc-rich-location.h.
6273 (warn_for_restrict): New function.
6274 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6275 (gcc_cdiag_char_table): Likewise.
6276 (gcc_cxxdiag_char_table): Likewise.
6277 * c.opt (Wrestrict): New option.
6278
4be719cd
EB
62792016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6280
6281 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6282 for nested types only if the type is a record or union and dump SLOC.
6283
4a826ca6
JM
62842016-11-09 Jason Merrill <jason@redhat.com>
6285
6286 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6287
2e955d50
JJ
62882016-11-09 Jakub Jelinek <jakub@redhat.com>
6289
6290 * c-ubsan.c (ubsan_instrument_shift): Handle split
6291 -fsanitize=shift-base and -fsanitize=shift-exponent.
6292
51dc6603
JM
62932016-11-07 Jason Merrill <jason@redhat.com>
6294
6295 * c.opt (Wc++1z-compat): New.
6296 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6297
6dc4a604
ML
62982016-11-07 Martin Liska <mliska@suse.cz>
6299
6300 * c-warn.c (warn_for_unused_label): Save all labels used
6301 in goto or in &label.
6302
b302001e
JM
63032016-11-03 Jason Merrill <jason@redhat.com>
6304
6305 * c-cppbuiltin.c (c_cpp_builtins): Correct
6306 __cpp_inheriting_constructors.
6307
31f7f784
JM
63082016-11-01 Jason Merrill <jason@redhat.com>
6309
2bc78e3c
JM
6310 * c-cppbuiltin.c (c_cpp_builtins): Update
6311 __cpp_inheriting_constructors.
6312
31f7f784
JM
6313 * c.opt (-fnew-inheriting-ctors): New.
6314 * c-opts.c: Default to on for ABI 11+.
6315
dcb466ec
JJ
63162016-10-31 Jakub Jelinek <jakub@redhat.com>
6317
6318 PR c++/77948
6319 * c.opt (fext-numeric-literals): Add Var and Init.
6320 * c-opts.c (c_common_handle_option): Don't clear
6321 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6322 (c_common_post_options): Clear it here if not set
6323 explicitly.
6324
52e1b91e
AH
63252016-10-28 Aldy Hernandez <aldyh@redhat.com>
6326
6327 PR debug/77773
6328 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6329 if NULL.
6330
e16f1cc7
JJ
63312016-10-25 Jakub Jelinek <jakub@redhat.com>
6332
6333 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6334 * c-common.c (c_common_reswords): Add __builtin_launder.
6335
f8348061
BE
63362016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6337
6338 * c-common.c (c_common_truthvalue_conversion): Warn for
6339 multiplications in boolean context. Fix the quoting of '<<' and '<'
6340 in the shift warning.
6341
eff89e01
BE
63422016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6343
6344 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6345
24bc7bf4
JM
63462016-10-20 Jason Merrill <jason@redhat.com>
6347
6348 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6349
4c712374
BE
63502016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6351
6352 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6353 integer shift ops in boolean context.
6354
63552016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6356
6357 * c.opt (Walloca): New.
6358 (Walloca-larger-than=): New.
6359 (Wvla-larger-than=): New.
6360
8fa18c06
MP
63612016-10-17 Marek Polacek <polacek@redhat.com>
6362
6363 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6364 Return immediately when finding a match.
6365 (warn_tautological_cmp): Remove a boolean variable that is no longer
6366 needed.
6367
b12b1915
MP
63682016-10-17 Marek Polacek <polacek@redhat.com>
6369
6370 * c-attribs.c: New file.
6371 * c-common.c: Move attributes handling to c-attribs.c.
6372 (get_nonnull_operand): No longer static.
6373 * c-common.h: Move the declarations from c-attribs.c to its own section.
6374
2045acd9
JM
63752016-10-14 Jason Merrill <jason@redhat.com>
6376
6377 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6378 and __cpp_deduction_guides.
6379
14a2c9aa
JM
63802016-10-13 Jason Merrill <jason@redhat.com>
6381
6382 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6383
4d0cdd0c
TP
63842016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6385
6386 * c-cppbuiltin.c: Include memmodel.h.
6387 * c-opts.c: Likewise.
6388 * c-pragma.c: Likewise.
6389 * c-warn.c: Likewise.
6390
70f6d5e1
JJ
63912016-10-12 Jakub Jelinek <jakub@redhat.com>
6392
6393 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6394 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6395 * c-opts.c (sanitize_cpp_opts): Initialize
6396 cpp_opts->cpp_warn_implicit_fallthrough.
6397
78f61294
MP
63982016-10-11 Marek Polacek <polacek@redhat.com>
6399
6400 * c-common.c (warning_candidate_p): Change the return type to bool
6401 and return true/false instead of 1/0.
6402 (vector_mode_valid_p): Likewise.
6403
038b5cc0
MP
64042016-10-11 Marek Polacek <polacek@redhat.com>
6405
6406 * c-common.c (fold_for_warn): No longer static.
6407 (bool_promoted_to_int_p): Likewise.
6408 (c_common_get_narrower): Likewise.
6409 (constant_expression_warning): Move to c-warn.c.
6410 (constant_expression_error): Likewise.
6411 (overflow_warning): Likewise.
6412 (warn_logical_operator): Likewise.
6413 (find_array_ref_with_const_idx_r): Likewise.
6414 (warn_tautological_cmp): Likewise.
6415 (expr_has_boolean_operands_p): Likewise.
6416 (warn_logical_not_parentheses): Likewise.
6417 (warn_if_unused_value): Likewise.
6418 (strict_aliasing_warning): Likewise.
6419 (sizeof_pointer_memaccess_warning): Likewise.
6420 (check_main_parameter_types): Likewise.
6421 (conversion_warning): Likewise.
6422 (warnings_for_convert_and_check): Likewise.
6423 (match_case_to_enum_1): Likewise.
6424 (match_case_to_enum): Likewise.
6425 (c_do_switch_warnings): Likewise.
6426 (warn_for_omitted_condop): Likewise.
6427 (readonly_error): Likewise.
6428 (lvalue_error): Likewise.
6429 (invalid_indirection_error): Likewise.
6430 (warn_array_subscript_with_type_char): Likewise.
6431 (warn_about_parentheses): Likewise.
6432 (warn_for_unused_label): Likewise.
6433 (warn_for_div_by_zero): Likewise.
6434 (warn_for_memset): Likewise.
6435 (warn_for_sign_compare): Likewise.
6436 (do_warn_double_promotion): Likewise.
6437 (do_warn_unused_parameter): Likewise.
6438 (record_locally_defined_typedef): Likewise.
6439 (maybe_record_typedef_use): Likewise.
6440 (maybe_warn_unused_local_typedefs): Likewise.
6441 (maybe_warn_bool_compare): Likewise.
6442 (maybe_warn_shift_overflow): Likewise.
6443 (warn_duplicated_cond_add_or_warn): Likewise.
6444 (diagnose_mismatched_attributes): Likewise.
6445 * c-common.h: Move the declarations from c-warn.c to its own section.
6446 * c-warn.c: New file.
6447
627be19f
JM
64482016-10-08 Jason Merrill <jason@redhat.com>
6449
6450 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6451 into COND_EXPR in C++.
6452
7bad794a
JJ
64532016-10-08 Jakub Jelinek <jakub@redhat.com>
6454
6455 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6456 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6457 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6458
be845b04
JJ
64592016-10-07 Jakub Jelinek <jakub@redhat.com>
6460
6461 Implement LWG2296 helper intrinsic
6462 * c-common.h (enum rid): Add RID_ADDRESSOF.
6463 * c-common.c (c_common_reswords): Add __builtin_addressof.
6464
c09c4992
BE
64652016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6466
6467 PR c++/77700
6468 * c-common.c (c_common_truthvalue_conversion): Warn also for
6469 suspicious enum values in boolean context.
6470
342cfb3e
JJ
64712016-10-06 Jakub Jelinek <jakub@redhat.com>
6472
6473 Implement P0258R2 - helper for C++17
6474 std::has_unique_object_representations trait
6475 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6476 * c-common.c (c_common_reswords): Add
6477 __has_unique_object_representations.
6478
2e69f143
JJ
64792016-10-05 Jakub Jelinek <jakub@redhat.com>
6480
6481 PR sanitizer/66343
6482 * c-ubsan.c (ubsan_instrument_return): Don't call
6483 initialize_sanitizer_builtins here.
6484
700fff34
BE
64852016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6486
6487 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6488 conditional expression in boolean context when only one arm is
6489 non-boolean.
6490
9563bfcd
JJ
64912016-10-05 Jakub Jelinek <jakub@redhat.com>
6492
04a32443
JJ
6493 PR sanitizer/77823
6494 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6495 is not integral.
6496
9563bfcd
JJ
6497 * c-common.c (c_common_reswords): Update comment for C++11.
6498
f1644724
JM
64992016-10-04 Jason Merrill <jason@redhat.com>
6500
6501 * c-common.c (make_tree_vector_from_ctor): New.
6502 * c-common.h: Declare it.
6503
5a79befb
JJ
65042016-10-04 Jakub Jelinek <jakub@redhat.com>
6505
6506 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6507 __LIBGCC_JCR_SECTION_NAME__.
6508
1633d3b9
BE
65092016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6510
6511 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6512 left shift in boolean context.
6513
a2c6e7f2
JJ
65142016-09-29 Jakub Jelinek <jakub@redhat.com>
6515
6516 Implement P0001R1 - C++17 removal of register storage class specifier
6517 * c.opt (Wregister): New warning.
6518 * c-opts.c (c_common_post_options): Enable -Wregister by
6519 default for C++17.
6520
75304c87
JG
65212016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6522
6523 * c-opts.c (c_common_post_options): Remove special case for
6524 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6525 in C++.
6526
bbfac6da
JJ
65272016-09-27 Jakub Jelinek <jakub@redhat.com>
6528
6e39060a
JJ
6529 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6530 -std=c++1z.
6531
bbfac6da
JJ
6532 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6533
e73cf9a2
TP
65342016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6535
6536 * c-common.c: Include memmodel.h.
6537
c6147dc4
MP
65382016-09-26 Marek Polacek <polacek@redhat.com>
6539
6540 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6541
81fea426
MP
65422016-09-26 Marek Polacek <polacek@redhat.com>
6543
6544 PR c/7652
6545 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6546 (handle_fallthrough_attribute): New function.
6547 (attribute_fallthrough_p): New function.
6548 * c-common.h (attribute_fallthrough_p): Declare.
6549
9a2300e9
MP
65502016-09-24 Marek Polacek <polacek@redhat.com>
6551
6552 PR c/77490
6553 * c.opt (Wbool-operation): New.
6554
a09e9e35
BE
65552016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6556
6557 * c-common.c (c_common_truthvalue_conversion): Inhibit
6558 Wint-in-bool-context warning with from_macro_definition_at.
6559 Mention the expression will always evaluate to true.
6560
d43b4ccc
MS
65612016-09-21 Martin Sebor <msebor@redhat.com>
6562
6563 PR bootstrap/77676
6564 * c.opt (fprintf-return-value): Temporarily initialize to zero
6565 to unblock bootstrap failures.
6566
2e1c20b1
JJ
65672016-09-21 Jakub Jelinek <jakub@redhat.com>
6568
6569 PR c++/77651
6570 * c.opt (Waligned-new=): Add RejectNegative.
6571 (faligned-new=): Likewise. Spelling fix - change
6572 aligned_new_threshhold to aligned_new_threshold.
6573 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6574 to aligned_new_threshold.
6575
88d0c3f0
MS
65762016-09-20 Martin Sebor <msebor@redhat.com>
6577
6578 PR middle-end/49905
6579 * c.opt: Add -Wformat-length and -fprintf-return-value.
6580
144a96e4
BE
65812016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6582
6583 PR c++/77434
6584 * c.opt (Wint-in-bool-context): New warning.
6585 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6586 constants in boolean context.
6587
63012d9a
JM
65882016-09-19 Joseph Myers <joseph@codesourcery.com>
6589
6590 * c-common.c (max_align_t_align): Also consider alignment of
6591 float128_type_node.
6592
931388ce
JM
65932016-09-15 Jason Merrill <jason@redhat.com>
6594
6595 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6596 DECL_EXTERNAL.
6597
38711381
JM
65982016-09-14 Jason Merrill <jason@redhat.com>
6599
6600 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6601 limit FIELD_DECL, either.
6602
e51fbec3
MP
66032016-09-14 Marek Polacek <polacek@redhat.com>
6604
6605 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6606 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6607 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6608
254830ba
DM
66092016-09-13 David Malcolm <dmalcolm@redhat.com>
6610
6611 * c-common.c (warn_logical_not_parentheses): Replace
6612 rich_location::add_fixit_insert calls with add_fixit_insert_before
6613 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6614
42763690
JM
66152016-09-13 Jason Merrill <jason@redhat.com>
6616 Tom de Vries <tom@codesourcery.com>
6617
6618 PR c++/77427
6619 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6620
9453eee9
JM
66212016-09-13 Jason Merrill <jason@redhat.com>
6622
6623 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6624 limit types at all.
6625
e96809e3
JM
66262016-09-12 Jason Merrill <jason@redhat.com>
6627
6628 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6629 bit/byte confusion, allow large alignment for types.
6630
54dcdb88
BE
66312016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6632
6633 PR c++/77496
6634 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6635
d1463eb9
DM
66362016-09-12 David Malcolm <dmalcolm@redhat.com>
6637
6638 PR c/72858
6639 * c-format.c (argument_parser::check_argument_type): Add params
6640 "type_start" and "conversion_char". Use the former to generate
6641 offset_to_type_start and pass it and conversion_char to
6642 check_format_types.
6643 (check_format_info_main): Capture the start of the type
6644 information as "type_start", and pass it an format_char
6645 to arg_parser.check_argument_type.
6646 (check_format_types): Provide an example in the leading comment.
6647 Add params "offset_to_type_start" and "conversion_char"; pass
6648 them to format_type_warning calls.
6649 (test_get_modifier_for_format_len): Likewise.
6650 (matching_type_p): New function.
6651 (get_format_for_type): Add param "conversion_char" and move
6652 implementation into...
6653 (get_format_for_type_1): ...new function, called twice.
6654 Use new function matching_type_p rather than checking for
6655 TYPE_CANONICAL equality.
6656 (get_corrected_substring): New function.
6657 (format_type_warning): Provide an example in the leading comment.
6658 Add params "offset_to_type_start" and "conversion_char". Replace
6659 call to get_format_for_type with call to get_corrected_substring
6660 and move rejection of hints for widths/precisions there.
6661 (assert_format_for_type_streq): Add param "conversion_char".
6662 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6663 (test_get_format_for_type_printf): Add conversion chars to the
6664 tests, adding coverage for various combinations of integer
6665 vs double conversions, and for preserving octal and hexadecimal
6666 conversions.
6667 (test_get_format_for_type_scanf): Add conversion chars to the
6668 tests.
6669
5b28efbb
TV
66702016-09-10 Tom de Vries <tom@codesourcery.com>
6671
6672 PR C/71602
6673 * c-common.c (build_va_arg): Handle more strict
6674 targetm.canonical_va_list_type. Replace first argument type error with
6675 assert.
6676
3f0177e7
MS
66772016-09-09 Martin Sebor <msebor@redhat.com>
6678
6679 PR c/77520
6680 PR c/77521
6681 * c-format.c (argument_parser::find_format_char_info): Use %qc
6682 format directive unconditionally.
6683
af63ba4b
JM
66842016-09-09 Jason Merrill <jason@redhat.com>
6685
6686 Implement C++17 new of over-aligned types.
6687 * c.opt: Add -faligned-new and -Waligned-new.
6688 * c-common.c (max_align_t_align): Split out from...
6689 (cxx_fundamental_alignment_p): ...here.
6690 * c-common.h: Declare it.
6691 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6692
c65248cb
JM
66932016-09-09 Joseph Myers <joseph@codesourcery.com>
6694
6695 * c-cppbuiltin.c (builtin_define_type_width): New function.
6696 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6697 macros.
6698
e5106e27
DM
66992016-09-07 David Malcolm <dmalcolm@redhat.com>
6700
6701 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6702 a POINTER_TYPE.
6703 (substring_loc::get_location): Move to substring-locations.c,
6704 keeping implementation as...
6705 (c_get_substring_location): New function, from the above, reworked
6706 to use accessors rather than member lookup.
6707 * c-common.h (class substring_loc): Move to substring-locations.h,
6708 replacing with a forward decl.
6709 (c_get_substring_location): New decl.
6710 * c-format.c: Include "substring-locations.h".
6711 (format_warning_va): Move to substring-locations.c.
6712 (format_warning_at_substring): Likewise.
6713
ab20d992 67142016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6715
6716 PR c/77336
6717 * c-format.c (check_function_format): Avoid issuing warnings for
6718 functions unless they call format functions with non-constant
6719 format strings.
6720
b772a565
RB
67212016-09-06 Richard Biener <rguenther@suse.de>
6722
6723 PR c/77450
6724 * c-common.c (c_common_mark_addressable_vec): Handle
6725 COMPOUND_LITERAL_EXPR.
6726
25ff5dd3
MP
67272016-09-05 Marek Polacek <polacek@redhat.com>
6728
6729 PR c/77423
6730 * c-common.c (bool_promoted_to_int_p): New function.
6731 (expr_has_boolean_operands_p): New function.
6732 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6733 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6734
21234eb5
TV
67352016-09-04 Tom de Vries <tom@codesourcery.com>
6736
6737 revert:
6738 2016-08-29 Tom de Vries <tom@codesourcery.com>
6739
6740 * c-common.c (build_va_arg): Replace first argument type error
6741 with assert.
6742
9dc5773f
JJ
67432016-09-02 Jakub Jelinek <jakub@redhat.com>
6744
6745 PR c/65467
6746 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6747 (c_finish_omp_for): Reject _Atomic qualified iterators.
6748
67492016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6750
6751 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6752 size to guarantee it fits the output of the formatted function
6753 regardless of its arguments.
6754
295844f6
MP
67552016-09-01 Marek Polacek <polacek@redhat.com>
6756
6757 PR c/7652
6758 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6759 FALLTHRU comments.
6760
3d06b6f2
MP
67612016-08-29 Marek Polacek <polacek@redhat.com>
6762
6763 PR c/77292
6764 * c-common.c (warn_logical_not_parentheses): Don't warn for
6765 a comparison or a logical operator.
6766
34cedad5
TV
67672016-08-29 Tom de Vries <tom@codesourcery.com>
6768
6769 * c-common.c (build_va_arg): Fix type comparison assert.
6770
f162d717
TV
67712016-08-29 Tom de Vries <tom@codesourcery.com>
6772
6773 * c-common.c (build_va_arg): Replace first argument type error
6774 with assert.
6775
ba9bbd6f
TV
67762016-08-29 Tom de Vries <tom@codesourcery.com>
6777
6778 PR c/77398
6779 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6780 with error_mark_node as va_list instead of with illegal va_list.
6781
ebef225f
MP
67822016-08-25 Marek Polacek <polacek@redhat.com>
6783 David Malcolm <dmalcolm@redhat.com>
6784
6785 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6786 * c-common.h (warn_logical_not_parentheses): Update declaration.
6787
b00e6e75
MP
67882016-08-22 Marek Polacek <polacek@redhat.com>
6789
6790 PR c++/77321
6791 * c-common.c (warn_for_memset): Check type for null.
6792
6dc198e3
JM
67932016-08-22 Joseph Myers <joseph@codesourcery.com>
6794
14ec014e 6795 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6796 _FloatNx types for suffixes for built-in functions.
6797
c65699ef
JM
67982016-08-19 Joseph Myers <joseph@codesourcery.com>
6799
6800 PR c/32187
6801 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6802 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6803 (RID_FLOAT128X): New enum rid values.
6804 (CASE_RID_FLOATN_NX): New macro.
6805 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6806 keywords.
6807 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6808 corresponding complex types.
6809 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6810 _FloatNx and corresponding complex types.
6811 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6812 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6813 and _FloatNx types for the widest type for determining
6814 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6815 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6816 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6817 and _FloatNx types.
6818 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6819 constants.
6820 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6821 _FloatNx types.
6822
cc015f3a
DM
68232016-08-18 David Malcolm <dmalcolm@redhat.com>
6824
6825 * c-opts.c (c_diagnostic_finalizer): Update for change to
6826 diagnostic_show_locus.
6827
cb18fd07
DM
68282016-08-18 David Malcolm <dmalcolm@redhat.com>
6829
6830 * c-common.c: Include "spellcheck.h".
6831 (cb_get_suggestion): New function.
6832 * c-common.h (cb_get_suggestion): New decl.
6833 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6834 cb_get_suggestion.
6835
a76989dc
MP
68362016-08-18 Marek Polacek <polacek@redhat.com>
6837
6838 PR c/71514
6839 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6840 and pointer-to-VLA.
6841
65e736c0
DM
68422016-08-16 David Malcolm <dmalcolm@redhat.com>
6843
6844 PR c/72857
6845 * c-common.c (substring_loc::get_range): Rename to...
6846 (substring_loc::get_location): ...this, converting param from a
6847 source_range * to a location_t *. Call
6848 get_source_location_for_substring rather than
6849 get_source_range_for_substring, and pass in m_caret_idx.
6850 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6851 (substring_loc::get_range): Replace with...
6852 (substring_loc::get_location): ...this.
6853 (substring_loc::set_caret_index): New method.
6854 (substring_loc): Add field m_caret_idx.
6855 * c-format.c (format_warning_va): Update for above changes.
6856 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6857 clashing with type name.
6858 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6859 (check_argument_type): Likewise.
6860 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6861 Use a copy when emitting warnings, setting the caret index from TYPE.
6862
7e1dde14 68632016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6864 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6865
6866 * c-ada-spec.c (dump_number): New function.
6867 (handle_escape_character): Likewise.
6868 (print_ada_macros): Add handling of constant integers and strings.
6869
191816a3
MP
68702016-08-12 Marek Polacek <polacek@redhat.com>
6871
6872 PR c/7652
6873 * c-common.c (scalar_to_vector): Adjust fall through comment.
6874 * c-opts.c (c_common_handle_option): Likewise.
6875 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6876 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6877 fall through comment.
6878 * cilk.c (extract_free_variables): Add FALLTHRU.
6879
452df4a4
JM
68802016-08-10 Jason Merrill <jason@redhat.com>
6881
6882 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6883
f3365c12
JM
68842016-08-09 Jason Merrill <jason@redhat.com>
6885
6886 * c-common.c (c_common_attribute_table): vector_size affects type
6887 identity.
6888
f0bc3323
MP
68892016-08-09 Marek Polacek <polacek@redhat.com>
6890
6891 PR c/7652
6892 * c-ada-spec.c (dump_generic_ada_node): Add return.
6893
98e5a19a
JM
68942016-08-09 Jason Merrill <jason@redhat.com>
6895
6896 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6897 C++17 constexpr lambdas.
6898
895aa8e1
DM
68992016-08-08 David Malcolm <dmalcolm@redhat.com>
6900
6901 PR c/64955
6902 * c-common.h (selftest::c_format_c_tests): New declaration.
6903 (selftest::run_c_tests): New declaration.
6904 * c-format.c: Include "selftest.h.
6905 (format_warning_va): Add param "corrected_substring" and use
6906 it to add a replacement fix-it hint.
6907 (format_warning_at_substring): Likewise.
6908 (format_warning_at_char): Update for new param of
6909 format_warning_va.
6910 (argument_parser::check_argument_type): Pass "fki" to
6911 check_format_types.
6912 (check_format_types): Add param "fki" and pass it to
6913 format_type_warning.
6914 (deref_n_times): New function.
6915 (get_modifier_for_format_len): New function.
6916 (selftest::test_get_modifier_for_format_len): New function.
6917 (get_format_for_type): New function.
6918 (format_type_warning): Add param "fki" and use it to attempt
6919 to provide hints for argument types when calling
6920 format_warning_at_substring.
6921 (selftest::get_info): New function.
6922 (selftest::assert_format_for_type_streq): New function.
6923 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6924 (selftest::test_get_format_for_type_printf): New function.
6925 (selftest::test_get_format_for_type_scanf): New function.
6926 (selftest::c_format_c_tests): New function.
6927
e52ed3fe
DM
69282016-08-08 David Malcolm <dmalcolm@redhat.com>
6929
6930 PR c/52952
6931 * c-format.c: Include "diagnostic.h".
6932 (location_column_from_byte_offset): Delete.
6933 (location_from_offset): Delete.
6934 (format_warning_va): New function.
6935 (format_warning_at_substring): New function.
6936 (format_warning_at_char): New function.
6937 (check_format_arg): Capture location of format_tree and pass to
6938 check_format_info_main.
6939 (argument_parser): Add fields "start_of_this_format" and
6940 "format_string_cst".
6941 (flag_chars_t::validate): Add param "format_string_cst". Convert
6942 warning_at call using location_from_offset to call to
6943 format_warning_at_char.
6944 (argument_parser::argument_parser): Add param "format_string_cst_"
6945 and use use it to initialize field "format_string_cst".
6946 Initialize new field "start_of_this_format".
6947 (argument_parser::read_format_flags): Convert warning_at call
6948 using location_from_offset to a call to format_warning_at_char.
6949 (argument_parser::read_any_format_left_precision): Likewise.
6950 (argument_parser::read_any_format_precision): Likewise.
6951 (argument_parser::read_any_other_modifier): Likewise.
6952 (argument_parser::find_format_char_info): Likewise, in three places.
6953 (argument_parser::parse_any_scan_set): Likewise, in one place.
6954 (argument_parser::handle_conversions): Likewise, in two places.
6955 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6956 and use it to make a substring_loc. Pass the latter to
6957 check_format_types.
6958 (check_format_info_main): Add params "fmt_param_loc" and
6959 "format_string_cst". Convert warning_at calls using
6960 location_from_offset to calls to format_warning_at_char. Pass the
6961 new params to the arg_parser ctor. Pass "format_string_cst" to
6962 flag_chars.validate. Pass "fmt_param_loc" to
6963 arg_parser.check_argument_type.
6964 (check_format_types): Convert first param from a location_t
6965 to a const substring_loc & and rename to "fmt_loc". Attempt
6966 to extract the range of the relevant parameter and pass it
6967 to format_type_warning.
6968 (format_type_warning): Convert first param from a location_t
6969 to a const substring_loc & and rename to "fmt_loc". Add
6970 params "param_range" and "type". Replace calls to warning_at
6971 with calls to format_warning_at_substring.
6972
1c4d457e
DM
69732016-08-08 David Malcolm <dmalcolm@redhat.com>
6974
6975 * c-format.c (class flag_chars_t): New class.
6976 (struct length_modifier): New struct.
6977 (class argument_parser): New class.
6978 (flag_chars_t::flag_chars_t): New ctor.
6979 (flag_chars_t::has_char_p): New method.
6980 (flag_chars_t::add_char): New method.
6981 (flag_chars_t::validate): New method.
6982 (flag_chars_t::get_alloc_flag): New method.
6983 (flag_chars_t::assignment_suppression_p): New method.
6984 (argument_parser::argument_parser): New ctor.
6985 (argument_parser::read_any_dollar): New method.
6986 (argument_parser::read_format_flags): New method.
6987 (argument_parser::read_any_format_width): New method.
6988 (argument_parser::read_any_format_left_precision): New method.
6989 (argument_parser::read_any_format_precision): New method.
6990 (argument_parser::handle_alloc_chars): New method.
6991 (argument_parser::read_any_length_modifier): New method.
6992 (argument_parser::read_any_other_modifier): New method.
6993 (argument_parser::find_format_char_info): New method.
6994 (argument_parser::validate_flag_pairs): New method.
6995 (argument_parser::give_y2k_warnings): New method.
6996 (argument_parser::parse_any_scan_set): New method.
6997 (argument_parser::handle_conversions): New method.
6998 (argument_parser::check_argument_type): New method.
6999 (check_format_info_main): Introduce classes argument_parser
7000 and flag_chars_t, moving the code within the loop into methods
7001 of these classes. Make various locals "const".
7002
88fa5555
DM
70032016-08-05 David Malcolm <dmalcolm@redhat.com>
7004
7005 * c-common.c: Include "substring-locations.h".
7006 (get_cpp_ttype_from_string_type): New function.
7007 (g_string_concat_db): New global.
7008 (substring_loc::get_range): New method.
7009 * c-common.h (g_string_concat_db): New declaration.
7010 (class substring_loc): New class.
7011 * c-lex.c (lex_string): When concatenating strings, capture the
7012 locations of all tokens using a new obstack, and record the
7013 concatenation locations within g_string_concat_db.
7014 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7015 on the ggc-heap.
7016
78169471
MP
70172016-07-29 Marek Polacek <polacek@redhat.com>
7018
638fc14f
MP
7019 PR c/71926
7020 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7021 parentheses warning.
7022
78169471
MP
7023 PR c/71574
7024 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7025
1225d6b1
ML
70262016-07-28 Martin Liska <mliska@suse.cz>
7027
7028 PR gcov-profile/68025
7029 * c-common.c (handle_no_profile_instrument_function_attribute):
7030
ec1e2a40
BE
70312016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7032
7033 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7034 BITS_PER_UNIT_LOG.
7035
5ec2cd9f
JM
70362016-07-25 Jason Merrill <jason@redhat.com>
7037
7038 PR c++/65970
7039 * c.opt (fconstexpr-loop-limit): New.
7040
9dc5773f 70412016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7042
7043 PR c++/71675
7044 * c-common.c (resolve_overloaded_builtin): Avoid converting
7045 __atomic_compare_exchange_n return type to that of what its
7046 first argument points to.
7047
e3fe09c1
UB
70482016-07-22 Uros Bizjak <ubizjak@gmail.com>
7049
7050 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7051 ~(unsigned HOST_WIDE_INT) 0.
7052
bc91c436
ML
70532016-07-22 Martin Liska <mliska@suse.cz>
7054
7055 PR gcov-profile/69028
7056 PR gcov-profile/62047
7057 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7058 to the current_function_decl.
7059
451dcc66
JM
70602016-07-21 Jason Merrill <jason@redhat.com>
7061
7062 PR c++/65168
7063 * c-common.c (c_common_truthvalue_conversion): Check
7064 c_inhibit_evaluation_warnings for warning about address of
7065 reference.
7066
de6a69ee
DM
70672016-07-20 David Malcolm <dmalcolm@redhat.com>
7068
7069 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7070 const char *.
7071
d022c55a
JM
70722016-07-15 Jason Merrill <jason@redhat.com>
7073
7074 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7075
ddbbcb19
JJ
70762016-07-15 Jakub Jelinek <jakub@redhat.com>
7077
7078 PR c/71858
7079 * c-common.h (enum lookup_name_fuzzy_kind): Add
7080 FUZZY_LOOKUP_FUNCTION_NAME.
7081
d0cf395a
JM
70822016-07-08 Jason Merrill <jason@redhat.com>
7083
7084 P0145: Refining Expression Order for C++.
7085 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7086 * c-opts.c: Adjust.
7087
98d44e93
MT
70882016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7089
7090 PR c++/71214
7091 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7092
f9d8d994
TS
70932016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7094
7095 * c-pragma.h (enum pragma_kind): Rename
7096 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7097 users.
7098
4aa83879
RB
70992016-06-29 Richard Biener <rguenther@suse.de>
7100
7101 PR middle-end/71002
7102 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7103
a25bd9e6
JM
71042016-06-24 Jason Merrill <jason@redhat.com>
7105
7106 P0145R2: Refining Expression Order for C++.
7107 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7108 MODIFY_EXPR.
7109
a86451b9
JJ
71102016-06-24 Jakub Jelinek <jakub@redhat.com>
7111
7112 * c-common.c (check_builtin_function_arguments): Require last
7113 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7114 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7115 if the last argument is pointer to enumerated or boolean type.
7116
1a4f11c8
DM
71172016-06-22 David Malcolm <dmalcolm@redhat.com>
7118
7119 PR c/70339
7120 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7121 (lookup_name_fuzzy): New prototype.
7122
fe55692c
JDA
71232016-06-21 John David Anglin <danglin@gcc.gnu.org>
7124
7125 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7126
4eb24e01
JM
71272016-06-14 Jason Merrill <jason@redhat.com>
7128
7129 P0145R2: Refining Expression Order for C++.
7130 * c.opt (fargs-in-order): New.
7131 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7132
ef7cf206
JJ
71332016-06-13 Jakub Jelinek <jakub@redhat.com>
7134
0dda258b
JJ
7135 PR sanitizer/71498
7136 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7137 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7138
ef7cf206
JJ
7139 PR preprocessor/71183
7140 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7141 to cb_get_source_date_epoch.
7142
50b15873
JJ
71432016-06-10 Jakub Jelinek <jakub@redhat.com>
7144
7145 PR c/68657
7146 * c.opt (Wpsabi): Add Warning flag.
7147
4d926e34
MS
71482016-06-10 Martin Sebor <msebor@redhat.com>
7149
7150 PR c/71392
14ec014e 7151 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7152 the nonnull attribute in type-generic builtins.
7153
e01b4e16
MS
71542016-06-09 Martin Sebor <msebor@redhat.com>
7155
7156 PR c/70883
7157 * c-common.c (builtin_function_validate_nargs): Make text of error
7158 message consistent with others like it.
7159
44a845ca
MS
71602016-06-08 Martin Sebor <msebor@redhat.com>
7161 Jakub Jelinek <jakub@redhat.com>
7162
7163 PR c++/70507
7164 PR c/68120
7165 * c-common.c (check_builtin_function_arguments): Handle
7166 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7167
a80a7051
RB
71682016-06-08 Richard Biener <rguenther@suse.de>
7169
7170 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7171
bfd67b47
RB
71722016-06-07 Richard Biener <rguenther@suse.de>
7173
7174 PR c/61564
7175 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7176 options and warn about others.
7177
15c98b2e
ES
71782016-06-01 Eduard Sanou <dhole@openmailbox.org>
7179
7180 * c-common.c (get_source_date_epoch): Rename to
7181 cb_get_source_date_epoch.
7182 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7183 message when the parsing fails. Use error_at instead of fatal_error.
7184 * c-common.h (get_source_date_epoch): Rename to
7185 cb_get_source_date_epoch.
7186 * c-common.h (cb_get_source_date_epoch): Prototype.
7187 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7188 * c-common.h (c_omp_region_type): Remove trailing comma.
7189 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7190 * c-lex.c (c_lex_with_flags): Remove initialization of
7191 pfile->source_date_epoch.
7192
00631022
JJ
71932016-05-30 Jakub Jelinek <jakub@redhat.com>
7194
7195 PR c++/71349
7196 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7197 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7198 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7199 instead of C_OMP_CLAUSE_SPLIT_FOR.
7200
f17a223d
RB
72012016-05-24 Richard Biener <rguenther@suse.de>
7202
7203 PR middle-end/70434
7204 PR c/69504
7205 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7206 (convert_vector_to_array_for_subscript): ... this.
7207 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7208 VIEW_CONVERT_EXPR to an array type. Rename to ...
7209 (convert_vector_to_array_for_subscript): ... this.
7210
4f2e1536
MP
72112016-05-12 Marek Polacek <polacek@redhat.com>
7212
7213 PR c/70756
7214 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7215 size_in_bytes and pass LOC to it.
7216
d6e83a8d
MM
72172016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7218
7219 PR c/43651
7220 * c.opt (Wduplicate-decl-specifier): New option.
7221
5c3a10fb
MP
72222016-05-11 Marek Polacek <polacek@redhat.com>
7223
7224 PR c++/71024
7225 * c-common.c (diagnose_mismatched_attributes): New function.
7226 * c-common.h (diagnose_mismatched_attributes): Declare.
7227
deef7113
MP
72282016-05-04 Marek Polacek <polacek@redhat.com>
7229
7230 * c.opt (Wdangling-else): New option.
7231
79ce98bc
MP
72322016-05-03 Marek Polacek <polacek@redhat.com>
7233
7234 PR c/70859
7235 * c-common.c (builtin_function_validate_nargs): Add location
7236 parameter. Use it.
7237 (check_builtin_function_arguments): Add location and arguments
7238 parameters. Use them.
7239 * c-common.h (check_builtin_function_arguments): Update declaration.
7240
381cdae4
RB
72412016-05-03 Richard Biener <rguenther@suse.de>
7242
7243 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7244 allow call args to gimplify to SSA names.
7245
1d793c34
MP
72462016-05-03 Marek Polacek <polacek@redhat.com>
7247
7248 * c-common.h (enum c_omp_region_type): Remove stray comma.
7249
77886428
CP
72502016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7251
7252 * c-common.h (enum c_omp_region_type): Define.
7253
697e0b28
RS
72542016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7255
7256 * c-common.c (shorten_compare): Use wi::to_wide.
7257
e7ff0319
CP
72582016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7259
7260 PR middle-end/70626
7261 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7262 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7263 reduction clauses in acc parallel loops.
7264
2fff3db8
MP
72652016-04-29 Marek Polacek <polacek@redhat.com>
7266
7267 PR c/70852
7268 * c-common.c (warn_for_memset): Check domain before accessing it.
7269
509063eb
DV
72702016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7271
7272 PR/69089
7273 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7274 "aligned" attribute.
7275
b632761d
JM
72762016-04-28 Jason Merrill <jason@redhat.com>
7277
7278 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7279
174f6622
ES
72802016-04-28 Eduard Sanou <dhole@openmailbox.org>
7281 Matthias Klose <doko@debian.org>
7282
7283 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7284 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7285 handling.
7286 * c-common.h (get_source_date_epoch): Prototype.
7287 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7288
6bc2bb18
RB
72892015-04-27 Ryan Burn <contact@rnburn.com>
7290
7291 PR c++/69024
7292 PR c++/68997
7293 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7294 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7295 external linkage.
7296 (cilk_detect_and_unwrap): Corresponding changes.
7297 (extract_free_variables): Don't extract free variables from
7298 AGGR_INIT_EXPR slot.
7299 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7300 (cilk_recognize_spawn): Likewise.
7301
c1e1f433
BS
73022016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7303
7304 * c.opt (Wmemset-elt-size): New option.
7305 * c-common.c (warn_for_memset): New function.
7306 * c-common.h (warn_for_memset): Declare.
7307
d067e05f
JM
73082016-04-25 Jason Merrill <jason@redhat.com>
7309
7310 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7311 No longer static.
7312 * c-common.h: Declare it.
7313 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7314
9aa36ae5
JM
73152016-04-22 Jason Merrill <jason@redhat.com>
7316
7317 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7318
477d4906
IV
73192016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7320
7321 PR c++/69363
7322 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7323 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7324
fe37c7af
MM
73252016-04-18 Michael Matz <matz@suse.de>
7326
7327 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7328 and SET_DECL_ALIGN.
7329
23f2660f
EB
73302016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7331
7332 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7333 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7334 to incomplete types.
7335 (dump_nested_type): Remove redundant tests and tidy up.
7336 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7337 a type which is the typedef of an original type.
7338
1e77281b
MP
73392016-04-15 Marek Polacek <polacek@redhat.com>
7340
7341 PR c/70651
7342 * c-common.c (build_va_arg): Change two asserts into errors and return
7343 error_mark_node.
7344
b3a77f21
MP
73452016-04-13 Marek Polacek <polacek@redhat.com>
7346
7347 PR c++/70639
7348 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7349 for switch statements, too.
7350
322b8466
JM
73512016-03-28 Jason Merrill <jason@redhat.com>
7352
7353 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7354
fbdb6baf
MP
73552016-03-23 Marek Polacek <polacek@redhat.com>
7356
7357 PR c++/69884
7358 * c.opt (Wignored-attributes): New option.
7359
5c240f4d
DM
73602016-03-22 David Malcolm <dmalcolm@redhat.com>
7361
7362 PR c/69993
7363 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7364 diagnostic text, reversing the order of the warning and note so
7365 that they appear in source order.
7366
14ba7b28
MP
73672016-03-17 Marek Polacek <polacek@redhat.com>
7368
7369 PR c/69407
7370 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7371 operations.
7372
08a1cadc
JM
73732016-03-14 Jason Merrill <jason@redhat.com>
7374
2aaeea19
JM
7375 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7376
08a1cadc
JM
7377 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7378
c06d25bb
RB
73792016-03-09 Richard Biener <rguenther@suse.de>
7380
7381 PR c/70143
7382 * c-common.c (strict_aliasing_warning): Add back
7383 alias_sets_conflict_p check.
7384
80aac5c8
JM
73852016-03-08 Jason Merrill <jason@redhat.com>
7386
7387 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7388
64b23c13
DM
73892016-03-04 David Malcolm <dmalcolm@redhat.com>
7390
7391 PR c/68187
7392 * c-indentation.c (get_visual_column): Move code to determine next
7393 tab stop to...
7394 (next_tab_stop): ...this new function.
7395 (line_contains_hash_if): Delete function.
7396 (detect_preprocessor_logic): Delete function.
7397 (get_first_nws_vis_column): New function.
7398 (detect_intervening_unindent): New function.
7399 (should_warn_for_misleading_indentation): Replace call to
7400 detect_preprocessor_logic with a call to
7401 detect_intervening_unindent.
7402
729526f5
DM
74032016-03-04 David Malcolm <dmalcolm@redhat.com>
7404
7405 PR c/68187
7406 * c-indentation.c (should_warn_for_misleading_indentation): When
7407 suppressing warnings about cases where the guard and body are on
7408 the same column, only use the first non-whitespace column in place
7409 of the guard token column when dealing with "else" clauses.
7410 When rejecting aligned BODY and NEXT, loosen the requirement
7411 from equality with the first non-whitespace of guard to simply
7412 that they not be indented relative to it.
7413
e9a35493
RB
74142016-03-04 Richard Biener <rguenther@suse.de>
7415
7416 PR c++/70054
7417 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7418 instead of alias_sets_conflict_p.
7419
1be56bc5
MP
74202016-03-01 Marek Polacek <polacek@redhat.com>
7421
7422 PR c++/69795
7423 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7424 any DECL.
7425
35886f0b
MS
74262016-02-22 Martin Sebor <msebor@redhat.com>
7427
7428 PR middle-end/69780
7429 * c-common.c (check_builtin_function_arguments): Validate and
7430 reject invalid arguments to __builtin_alloca_with_align.
7431
4246c8da
MW
74322016-02-20 Mark Wielaard <mjw@redhat.com>
7433
7434 PR c/28901
7435 * c.opt (Wunused-const-variable): Turn into Alias for...
7436 (Wunused-const-variable=): New option.
7437
268be88c
BE
74382016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7439
7440 PR c++/69865
7441 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7442 here...
7443 (c_common_init_options): ...to here.
7444 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7445
871b3f47
JJ
74462016-02-19 Jakub Jelinek <jakub@redhat.com>
7447
7448 PR c++/69826
7449 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7450 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7451 flag_preprocess_only.
7452
bf14eba2
JJ
74532016-02-16 Jakub Jelinek <jakub@redhat.com>
7454
7455 PR c/69835
7456 * c.opt (Wnonnull-compare): Enable for -Wall.
7457
ba6b3795
JJ
74582016-02-15 Jakub Jelinek <jakub@redhat.com>
7459
7460 PR c++/69797
7461 * c-common.c (sync_resolve_size): Diagnose too few arguments
7462 even when params is non-NULL empty vector.
7463
a011cd92
BS
74642016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7465
7466 PR target/60410
7467 * c.opt (fshort-double): Remove.
7468
46cb9332
MS
74692016-02-05 Martin Sebor <msebor@redhat.com>
7470
7471 PR c++/69662
7472 * c.opt (Warning options): Update -Wplacement-new to take
7473 an optional argument.
7474
e1b81f2b
JJ
74752016-02-01 Jakub Jelinek <jakub@redhat.com>
7476
7477 PR preprocessor/69543
7478 PR c/69558
7479 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7480 instead of loc to control_warning_option.
7481
b6adbb9f
NS
74822016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7483
7484 * c.opt (fopenacc-dim=): New option.
7485
5d70666e
RB
74862016-01-27 Ryan Burn <contact@rnburn.com>
7487
7488 PR cilkplus/69267
7489 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7490 gimplify_arg. Removed superfluous post_p argument.
7491 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7492 superfluous post_p argument.
7493 * c-gimplify.c (c_gimplify_expr): Likewise.
7494
01e1dea3
DM
74952016-01-26 David Malcolm <dmalcolm@redhat.com>
7496
7497 PR other/69006
7498 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7499 pp_newline_and_flush with pp_flush.
7500
9f04a53e
MS
75012016-01-20 Martin Sebor <msebor@redhat.com>
7502
7503 PR c/69405
7504 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7505 an incompatible argument when the argument isn't a valid tree node.
7506
7f26f7df
JM
75072016-01-18 Jason Merrill <jason@redhat.com>
7508
7509 PR c++/68767
7510 * c-common.c (check_function_arguments_recurse): Fold the whole
7511 COND_EXPR, not just the condition.
7512
f62bf092
TV
75132016-01-18 Tom de Vries <tom@codesourcery.com>
7514
7515 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7516 classify as loop clause.
7517
e0a575ff
JJ
75182016-01-15 Jakub Jelinek <jakub@redhat.com>
7519
7520 PR bootstrap/68271
7521 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7522 C++ FE no longer has limit on number of pragmas.
7523
75242015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7525
7526 PR c++/69048
7527 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7528 to add missing cleanup point.
b6e3db06 7529
c7df95d8
DM
75302016-01-14 David Malcolm <dmalcolm@redhat.com>
7531
7532 PR c++/68819
7533 * c-indentation.c (get_visual_column): Add location_t param.
7534 Handle the column number being zero by effectively disabling the
7535 warning, with an "inform".
7536 (should_warn_for_misleading_indentation): Add location_t argument
7537 for all uses of get_visual_column.
7538
21efdd80
PP
75392016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7540
7541 PR c++/69029
7542 * c-indentation.c (should_warn_for_misleading_indentation):
7543 Don't warn about do-while statements.
7544
7a127fa7
MS
75452016-01-07 Martin Sebor <msebor@redhat.com>
7546
7547 PR c/68966
7548 * c-common.c (sync_resolve_size): Reject first argument when it's
7549 a pointer to _Bool.
7550
c589e975
DM
75512016-01-05 David Malcolm <dmalcolm@redhat.com>
7552
7553 PR c/69122
7554 * c-indentation.c (get_visual_column): Remove default argument.
7555 (should_warn_for_misleading_indentation): For the multiline case,
7556 update call to get_visual_column for next_stmt_exploc so that it
7557 captures the location of the first non-whitespace character in the
7558 relevant line. Don't issue warnings if there is non-whitespace
7559 before the next statement.
7560
818ab71a
JJ
75612016-01-04 Jakub Jelinek <jakub@redhat.com>
7562
7563 Update copyright years.
7564
745e411d
DM
75652015-12-21 David Malcolm <dmalcolm@redhat.com>
7566
7567 * c-common.c (binary_op_error): Convert first param from
7568 location_t to rich_location * and use it when emitting an error.
7569 * c-common.h (binary_op_error): Convert first param from
7570 location_t to rich_location *.
7571
de67c4c3
DM
75722015-12-16 David Malcolm <dmalcolm@redhat.com>
7573
7574 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7575 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7576
4a38b02b
IV
75772015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7578
7579 * c-common.c (c_common_attribute_table): Handle "omp declare target
7580 link" attribute.
7581
54d62f51
JJ
75822015-12-14 Jakub Jelinek <jakub@redhat.com>
7583
7584 PR c/68833
7585 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7586
8d4227c8
TB
75872014-12-12 Tobias Burnus <burnus@net-b.de>
7588
7589 PR fortran/68815
7590 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7591 specifiers (%d, %i,%u and %c).
7592
f6069ccc
DM
75932015-12-10 David Malcolm <dmalcolm@redhat.com>
7594
7595 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7596
63bbf46d
JJ
75972015-12-08 Jakub Jelinek <jakub@redhat.com>
7598
7599 PR c/48088
7600 PR c/68657
7601 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7602 * c-pragma.c (handle_pragma_diagnostic): Adjust
7603 control_warning_option caller.
7604
f79520bb
DM
76052015-12-07 David Malcolm <dmalcolm@redhat.com>
7606
7607 * c-common.c (c_cpp_error): Update for change to
7608 rich_location::set_range.
7609
b3d5bc62
JJ
76102015-12-04 Paolo Bonzini <bonzini@gnu.org>
7611
7612 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7613 shifting 1 out of the sign bit.
7614
76152015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7616
7617 * c-common.c (c_common_attribute_table[]): Update max arguments
7618 count for "simd" attribute.
7619 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7620
6eb4a537
JJ
76212015-12-03 Jakub Jelinek <jakub@redhat.com>
7622
7623 PR preprocessor/57580
7624 * c-ppoutput.c (print): Change printed field to bool.
7625 Move src_file last for smaller padding.
7626 (init_pp_output): Set print.printed to false instead of 0.
7627 (scan_translation_unit): Fix up formatting. Set print.printed
7628 to true after printing something other than newline.
7629 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7630 (maybe_print_line_1): Set print.printed to false instead of 0.
7631 (print_line_1): Likewise.
7632 (do_line_change): Set print.printed to true instead of 1.
7633 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7634 dump_macro): Set print.printed to false after printing newline.
7635
4250754e
JM
76362015-12-02 Jason Merrill <jason@redhat.com>
7637
f479b43d
JM
7638 * c-common.c (fold_for_warn): New.
7639 (warn_logical_operator, warn_tautological_cmp)
7640 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7641
4250754e
JM
7642 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7643 (c_fully_fold_internal, decl_constant_value_for_optimization):
7644 Move to c/c-fold.c.
7645 * c-common.h: Don't declare decl_constant_value_for_optimization.
7646
e9e32ee6
JM
76472015-12-02 Joseph Myers <joseph@codesourcery.com>
7648
7649 PR c/68162
7650 * c-common.h (c_build_qualified_type): Add extra default
7651 arguments.
7652
37d5ad46
JB
76532015-12-01 Julian Brown <julian@codesourcery.com>
7654 Cesar Philippidis <cesar@codesourcery.com>
7655 James Norris <James_Norris@mentor.com>
7656
7657 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7658 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7659 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7660
f07862c7
EB
76612015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7662
7663 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7664 (decl_sloc_common): Delete and move bulk of processing to...
7665 (decl_sloc): ...here.
7666 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7667 (dump_ada_double_name): Remove S parameter and compute the suffix.
7668 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7669 element type and deal with an anonymous one.
7670 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7671 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7672 and remove reference to QUAL_UNION_TYPE.
7673 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7674 (dump_nested_type): ...here. New function extracted from above.
7675 Generate a full declaration for anonymous element type of arrays.
7676 (print_ada_declaration): Really skip anonymous declarations. Remove
7677 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7678 Clean up processing of declarations of array types and objects.
7679 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7680 Remove obsolete code and tidy up.
7681
75c8aac3
JH
76822015-11-29 Jan Hubicka <hubicka@ucw.cz>
7683
7684 PR c/67581
7685 * c-common.c (handle_transparent_union_attribute): Update
7686 also type variants.
7687
b58d3df2
ML
76882015-11-27 Martin Liska <mliska@suse.cz>
7689
7690 PR c++/68312
7691 * array-notation-common.c (cilkplus_extract_an_triplets):
7692 Release vector of vectors.
7693 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7694
89a01fcf
EB
76952015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7696
7697 PR c++/68527
7698 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7699 (print_ada_struct_decl): Likewise.
7700
cc5c5226
IZ
77012015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7702
7703 PR c++/68001
7704 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7705 * cilk.c (recognize_spawn): Determine location in a more precise
7706 way.
7707
269adb9d
JM
77082015-11-19 Jason Merrill <jason@redhat.com>
7709
7710 * c-common.c (shorten_compare): But look through macros from
7711 system headers.
7712
d0eccfcd
JM
77132015-11-18 Jason Merrill <jason@redhat.com>
7714
7715 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7716 non-constant operand comes from a macro.
7717
3e44547c
JM
77182015-11-17 Jason Merrill <jason@redhat.com>
7719
7720 PR bootstrap/68346
7721 * c-common.c (warn_tautological_cmp): Fold before checking for
7722 constants.
7723
0f62c7a0
MP
77242015-11-16 Marek Polacek <polacek@redhat.com>
7725
7726 PR c++/68362
7727 * c-common.c (check_case_bounds): Fold low and high cases.
7728
a868811e
MP
77292015-11-16 Marek Polacek <polacek@redhat.com>
7730
7731 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7732 * c-common.c (c_common_get_alias_set): Likewise.
7733 (handle_visibility_attribute): Likewise.
7734
fff77217
KY
77352015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7736
7737 * c-common.c (handle_simd_attribute): New.
7738 (struct attribute_spec): Add entry for "simd".
7739 (handle_simd_attribute): New.
7740
269e63b7
KT
77412015-11-13 Kai Tietz <ktietz70@googlemail.com>
7742
7743 * c-lex.c (interpret_float): Use fold_convert.
7744
ebedc9a3
DM
77452015-11-13 David Malcolm <dmalcolm@redhat.com>
7746
7747 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7748 and store it on the result.
7749 * c-opts.c (c_common_init_options): Set
7750 global_dc->colorize_source_p.
7751
6e232ba4
JN
77522015-11-12 James Norris <jnorris@codesourcery.com>
7753 Joseph Myers <joseph@codesourcery.com>
7754
7365279f 7755 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7756 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7757 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7758 PRAGMA_OACC_CLAUSE_LINK.
7759
e78bede6
MP
77602015-11-11 Marek Polacek <polacek@redhat.com>
7761
7762 PR c/68107
7763 PR c++/68266
7764 * c-common.c (valid_array_size_p): New function.
7765 * c-common.h (valid_array_size_p): Declare.
7766
3f8257db 77672015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7768
7769 PR bootstrap/68271
7770 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7771
69f293c9
AM
77722015-11-11 Andrew MacLeod <amacleod@redhat.com>
7773
7774 * array-notation-common.c: Remove unused header files.
7775 * c-ada-spec.c: Likewise.
7776 * c-cilkplus.c: Likewise.
7777 * c-common.c: Likewise.
7778 * c-cppbuiltin.c: Likewise.
7779 * c-dump.c: Likewise.
7780 * c-format.c: Likewise.
7781 * c-gimplify.c: Likewise.
7782 * c-indentation.c: Likewise.
7783 * c-lex.c: Likewise.
7784 * c-omp.c: Likewise.
7785 * c-opts.c: Likewise.
7786 * c-pch.c: Likewise.
7787 * c-ppoutput.c: Likewise.
7788 * c-pragma.c: Likewise.
7789 * c-pretty-print.c: Likewise.
7790 * c-semantics.c: Likewise.
7791 * c-ubsan.c: Likewise.
7792 * cilk.c: Likewise.
7793 * stub-objc.c: Likewise.
7794
3a40d81d
NS
77952015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7796 Cesar Philippidis <cesar@codesourcery.com>
7797 James Norris <jnorris@codesourcery.com>
7798 Julian Brown <julian@codesourcery.com>
7799 Nathan Sidwell <nathan@codesourcery.com>
7800
7801 * c-pragma.c (oacc_pragmas): Add "routine".
7802 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7803
ee45a32d
EB
78042015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7805
7806 * c-common.c (c_common_attributes): Add scalar_storage_order.
7807 (handle_scalar_storage_order_attribute): New function.
7808 * c-pragma.c (global_sso): New variable.
7809 (maybe_apply_pragma_scalar_storage_order): New function.
7810 (handle_pragma_scalar_storage_order): Likewise.
7811 (init_pragma): Register scalar_storage_order.
7812 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7813 * c.opt (Wscalar-storage-order): New warning.
7814 (fsso-struct=): New option.
7815
eb11eb15
MS
78162015-11-08 Martin Sebor <msebor@redhat.com>
7817
7818 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7819
0aad0198
RS
78202015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7821
7822 * c-common.c: Don't undef DEF_BUILTIN.
7823
8a645150
DM
78242015-11-06 David Malcolm <dmalcolm@redhat.com>
7825
7826 * c-common.c (c_cpp_error): Convert parameter from location_t to
7827 rich_location *. Eliminate the "column_override" parameter and
7828 the call to diagnostic_override_column.
7829 Update the "done_lexing" clause to set range 0
7830 on the rich_location, rather than overwriting a location_t.
7831 * c-common.h (c_cpp_error): Convert parameter from location_t to
7832 rich_location *. Eliminate the "column_override" parameter.
7833
7a5e4956
CP
78342015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7835 Thomas Schwinge <thomas@codesourcery.com>
7836 James Norris <jnorris@codesourcery.com>
7837
7838 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7839 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7840 clauses with parallel and kernels and loops.
7841 * c-pragma.h (enum pragma_omp_clause): Add entries for
7842 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7843 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7844 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7845 INDEPENDENT,SEQ}.
7846 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7847
e2f5cc96
MS
78482015-11-05 Martin Sebor <msebor@redhat.com>
7849
7850 PR c++/67942
7851 * c.opt (-Wplacement-new): New option.
7852
e01d41e5
JJ
78532015-11-05 Jakub Jelinek <jakub@redhat.com>
7854
7855 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7856 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7857 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7858 save_expr or create_tmp_var* if TEST is true.
7859 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7860 Don't call add_stmt here.
7861 (struct c_omp_check_loop_iv_data): New type.
7862 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7863 c_omp_check_loop_iv_exprs): New functions.
7864 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7865 distribute.
7866 (c_omp_declare_simd_clauses_to_numbers): Change
7867 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7868 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7869 from numbers to PARM_DECLs.
7870
595278be
MM
78712015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7872
7873 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7874 flag_checking.
7875
3f8257db 78762015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7877
7878 PR c++-common/67882
b3d5bc62
JJ
7879 * c-common.h (fold_offsetof_1): Add argument.
7880 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7881 offsetof expressions that reference elements past the end of
7882 an array.
7883
4bf9e5a8
TS
78842015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7885 Chung-Lin Tang <cltang@codesourcery.com>
7886
7887 * c-pragma.c (oacc_pragmas): Add "atomic".
7888 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7889
3b1661a9
ES
78902015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7891
7892 * c-common.c (handle_target_clones_attribute): New.
7893 (c_common_attribute_table): Add handle_target_clones_attribute.
7894 (handle_always_inline_attribute): Add check on target_clones attribute.
7895 (handle_target_attribute): Ditto.
7896
2adfab87
AM
78972015-10-29 Andrew MacLeod <amacleod@redhat.com>
7898
7899 * array-notation-common.c: Reorder #include's and remove duplicates.
7900 * c-ada-spec.c: Likewise.
7901 * c-cilkplus.c: Likewise.
7902 * c-common.c: Likewise.
7903 * c-cppbuiltin.c: Likewise.
7904 * c-dump.c: Likewise.
7905 * c-format.c: Likewise.
7906 * c-gimplify.c: Likewise.
7907 * c-indentation.c: Likewise.
7908 * c-lex.c: Likewise.
7909 * c-omp.c: Likewise.
7910 * c-opts.c: Likewise.
7911 * c-pch.c: Likewise.
7912 * c-ppoutput.c: Likewise.
7913 * c-pragma.c: Likewise.
7914 * c-pretty-print.c: Likewise.
7915 * c-semantics.c: Likewise.
7916 * c-ubsan.c: Likewise.
7917 * cilk.c: Likewise.
7918 * stub-objc.c: Likewise.
7919
d90ec4f2
JM
79202015-10-28 Jason Merrill <jason@redhat.com>
7921
7922 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7923
88bae6f4
TS
79242015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7925 James Norris <jnorris@codesourcery.com>
7926 Cesar Philippidis <cesar@codesourcery.com>
7927
7928 PR c/64765
7929 PR c/64880
7930 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7931 * c-omp.c (c_oacc_split_loop_clauses): New function.
7932
b1726d6c
MS
79332015-10-21 Martin Sebor <msebor@redhat.com>
7934
7935 PR driver/68043
7936 * c.opt: End each sentence that describes an option with a period.
7937
fa60eeb9
MP
79382015-10-20 Marek Polacek <polacek@redhat.com>
7939
7940 * array-notation-common.c (is_cilkplus_vector_p): Define.
7941 * c-common.h (is_cilkplus_vector_p): Declare.
7942
95979049
MP
79432015-10-20 Marek Polacek <polacek@redhat.com>
7944
7945 * c.opt (std=gnu++11): Do not describe as experimental.
7946 (std=gnu++14): Likewise.
7947
2a9fb712
JM
79482015-10-19 Jason Merrill <jason@redhat.com>
7949
7950 * c-cppbuiltin.c (c_cpp_builtins): Define
7951 __cpp_nontype_template_args.
7952
13b380a3
JM
79532015-10-19 Jason Merrill <jason@redhat.com>
7954
7955 * c-cppbuiltin.c (c_cpp_builtins): Define
7956 __cpp_enumerator_attributes, __cpp_fold_expressions,
7957 __cpp_unicode_characters.
7958
d9a6bd32
JJ
79592015-10-13 Jakub Jelinek <jakub@redhat.com>
7960 Aldy Hernandez <aldyh@redhat.com>
7961
7962 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7963 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7964 (c_define_builtins): Likewise.
7965 * c-common.h (enum c_omp_clause_split): Add
7966 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7967 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7968 (c_finish_omp_for): Add ORIG_DECLV argument.
7969 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7970 201511 instead of 201307.
7971 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7972 OMP_CRITICAL_CLAUSES to it.
7973 (c_finish_omp_ordered): Add CLAUSES argument, set
7974 OMP_ORDERED_CLAUSES to it.
7975 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7976 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7977 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7978 constructs and new OpenMP 4.5 clauses. Clear
7979 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7980 verification code.
7981 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7982 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7983 (enum pragma_omp_clause): Add
7984 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7985 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7986
624d31fe
RS
79872015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7988
7989 * c-lex.c (interpret_float): Use real_equal instead of
7990 REAL_VALUES_EQUAL.
7991
b8fd7909
JM
79922015-10-04 Jason Merrill <jason@redhat.com>
7993
7994 Implement N4514, C++ Extensions for Transactional Memory.
7995 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7996 (c_common_attribute_table): Add transaction_safe_dynamic.
7997 transaction_safe now affects type identity.
7998 (handle_tm_attribute): Handle transaction_safe_dynamic.
7999 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8000 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8001 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8002 (D_TRANSMEM): New.
8003 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8004 * c-pretty-print.c (pp_c_attributes_display): Don't print
8005 transaction_safe in C++.
8006
12651878
MP
80072015-10-02 Marek Polacek <polacek@redhat.com>
8008
8009 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8010
3e3b8d63
MP
80112015-10-02 Marek Polacek <polacek@redhat.com>
8012
8013 PR c/64249
8014 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8015 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8016 * c.opt (Wduplicated-cond): New option.
8017
0d1a8f75
JM
80182015-10-01 Joseph Myers <joseph@codesourcery.com>
8019
8020 * c.opt (std=c11): Do not describe as experimental.
8021 (std=gnu11): Likewise.
8022 (std=iso9899:2011): Likewise.
8023
3e32ee19
NS
80242015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8025
8026 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8027 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8028
974348ee
MP
80292015-09-25 Marek Polacek <polacek@redhat.com>
8030
8031 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8032 (ubsan_instrument_shift): Likewise.
8033
15dbc1a6
MP
80342015-09-25 Marek Polacek <polacek@redhat.com>
8035
8036 PR sanitizer/64906
8037 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8038
6b95d7cc
PP
80392015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8040
8041 * c-indentation.c (should_warn_for_misleading_indentation):
8042 Compare next_stmt_vis_column with guard_line_first_nws instead
8043 of with guard_line_vis_column.
8044
c1822f9c
MLI
80452015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8046
8047 PR c/49654
8048 PR c/49655
8049 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8050 options and options not valid for the current language.
8051
d5398058
PP
80522015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8053
8054 * c-indentation.c (should_warn_for_misleading_indentation):
8055 Float out and consolidate the calls to get_visual_column that
8056 are passed guard_exploc as an argument. Compare
8057 next_stmt_vis_column with guard_line_first_nws instead of with
8058 body_line_first_nws.
8059
6b333269
NS
80602015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8061
8062 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8063 Wnamespaces): New C++ warnings.
8064
a75f1574
JM
80652015-09-22 Jason Merrill <jason@redhat.com>
8066
8067 * c-common.h (abi_compat_version_crosses): New.
8068 (warn_abi_version): Declare.
8069 * c-common.c: Define it.
8070 * c-opts.c (c_common_post_options): Handle it.
8071 flag_abi_compat_version defaults to 8.
8072
bdaaa8b7
VV
80732015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8074
8075 Complete the implementation of N4230, Nested namespace definition.
8076 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8077 __cpp_nested_namespace_definitions.
8078
eaa797e8
MLI
80792015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8080
8081 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8082
c4914de6
MLI
80832015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8084
8085 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8086 when warning.
8087 * c-pragma.h (pragma_lex): Add optional loc argument.
8088
fcb87c50
MM
80892015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8090
8091 * c-format.c (check_format_arg): Adjust to use common block size in all
8092 object pools.
8093
31bdd08a
DM
80942015-09-15 David Malcolm <dmalcolm@redhat.com>
8095
8096 * c-format.c (location_from_offset): Update for change in
8097 signature of location_get_source_line.
8098 * c-indentation.c (get_visual_column): Likewise.
8099 (line_contains_hash_if): Likewise.
8100
aa9f4b4c
MP
81012015-09-14 Marek Polacek <polacek@redhat.com>
8102
8103 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8104 setting various warnings.
8105
aa256c4a
MP
81062015-09-14 Marek Polacek <polacek@redhat.com>
8107
8108 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8109 a negative value.
8110
0f876f22
MW
81112015-09-11 Mark Wielaard <mjw@redhat.com>
8112
8113 PR c/28901
8114 * c.opt (Wunused-variable): Option from common.opt.
8115 (Wunused-const-variable): New option.
8116
273aa49e
PC
81172015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8118
8119 PR c++/53184
8120 * c.opt ([Wsubobject-linkage]): Add.
8121
1807ffc1
MS
81222015-09-03 Martin Sebor <msebor@redhat.com>
8123
8124 PR c/66516
8125 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8126 functions.
8127 * c-common.c (reject_gcc_builtin): Define.
8128
38942840
BI
81292015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8130
8131 PR middle-end/60586
8132 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8133 prototype.
8134 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8135 cilk_gimplify_call_params_in_spawned_fn.
8136 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8137 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8138 unwrapping.
8139
c316b5e4
MP
81402015-08-25 Marek Polacek <polacek@redhat.com>
8141
8142 PR middle-end/67330
8143 * c-common.c (handle_weak_attribute): Don't check whether the
8144 visibility can be changed here.
8145
584a7c46
MLI
81462015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8147
8148 * c-lex.c (c_lex_with_flags): Use explicit locations.
8149
a79683d5
TS
81502015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8151
8152 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8153 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8154
61717a45
FXC
81552015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8156
8157 PR middle-end/36757
8158 * c-common.c (check_builtin_function_arguments): Add check
8159 for BUILT_IN_SIGNBIT argument.
8160
329524f5
PC
81612015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8162
8163 PR c++/67160
8164 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8165 in c++1z mode.
8166
4ee55665
MP
81672015-08-17 Marek Polacek <polacek@redhat.com>
8168
8169 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8170 with whitespaces before qualifier names.
8171
b893e375
MP
81722015-08-12 Marek Polacek <polacek@redhat.com>
8173
8174 PR c++/55095
8175 * c-common.c (maybe_warn_shift_overflow): Properly handle
8176 left-shifting 1 into the sign bit.
8177
c2d89095
MLI
81782015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8179
8180 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8181
971e17ff
AS
81822015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8183 Braden Obrzut <admin@maniacsvault.net>
8184 Jason Merrill <jason@redhat.com>
8185
8186 Add C++ Concepts TS support.
8187 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8188 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8189 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8190 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8191 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8192 * c.opt (fconcepts): New.
8193
b3d5bc62
JJ
81942015-08-02 Martin Sebor <msebor@redhat.com>
8195
8196 * c.opt (-Wframe-address): New warning option.
8197
8ebca419
PP
81982015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8199
8200 * c-indentation.c (should_warn_for_misleading_indentation):
8201 Improve heuristics.
8202
1a1e101f
PP
82032015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8204
8205 * c-indentation.c (get_visual_column): Add parameter first_nws,
8206 use it. Update comment documenting the function.
8207 (is_first_nonwhitespace_on_line): Remove.
8208 (should_warn_for_misleading_indentation): Replace usage of
8209 of is_first_nonwhitespace_on_line with get_visual_column.
8210
992118a1
PP
82112015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8212
8213 * c-indentation.h (struct token_indent_info): Define.
8214 (get_token_indent_info): Define.
8215 (warn_for_misleading_information): Declare.
8216 * c-common.h (warn_for_misleading_information): Remove.
8217 * c-identation.c (warn_for_misleading_indentation):
8218 Change declaration to take three token_indent_infos. Adjust
8219 accordingly.
8220 * c-identation.c (should_warn_for_misleading_indentation):
8221 Likewise. Bail out early if the body is a compound statement.
8222 (guard_tinfo_to_string): Define.
8223
e8fa3817
JM
82242015-07-30 Jason Merrill <jason@redhat.com>
8225
8226 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8227 '*' for reference decay.
8228
173864e8
MP
82292015-07-30 Marek Polacek <polacek@redhat.com>
8230
8231 * c-common.c (warn_tautological_cmp): Bail for float types.
8232
f2afe6dd
MP
82332015-07-27 Marek Polacek <polacek@redhat.com>
8234
8235 PR bootstrap/67030
8236 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8237
05b28fd6
MP
82382015-07-27 Marek Polacek <polacek@redhat.com>
8239
8240 PR c++/66555
8241 PR c/54979
8242 * c-common.c (find_array_ref_with_const_idx_r): New function.
8243 (warn_tautological_cmp): New function.
8244 * c-common.h (warn_tautological_cmp): Declare.
8245 * c.opt (Wtautological-compare): New option.
8246
5a5062b8
MP
82472015-07-23 Marek Polacek <polacek@redhat.com>
8248
8249 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8250 (ubsan_instrument_shift): Likewise.
8251
dc891fe7
MP
82522015-07-23 Marek Polacek <polacek@redhat.com>
8253
8254 PR sanitizer/66908
8255 * c-ubsan.c: Include gimplify.h.
8256 (ubsan_instrument_division): Unshare OP0 and OP1.
8257 (ubsan_instrument_shift): Likewise.
8258
451b5e48
MP
82592015-07-20 Marek Polacek <polacek@redhat.com>
8260 Richard Sandiford <richard.sandiford@arm.com>
8261
8262 PR c++/55095
8263 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8264 Use EXPR_LOC_OR_LOC.
8265 (maybe_warn_shift_overflow): New function.
8266 * c-common.h (maybe_warn_shift_overflow): Declare.
8267 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8268 * c.opt (Wshift-overflow): New option.
8269
fb0b2914
ML
82702015-07-16 Martin Liska <mliska@suse.cz>
8271
8272 * c-format.c (static void check_format_info_main): Use
8273 object_allocator instead of pool_allocator.
8274 (check_format_arg): Likewise.
8275 (check_format_info_main): Likewise.
8276
903f5c23
AM
82772015-07-15 Andrew MacLeod <amacleod@redhat.com>
8278
8279 * c-opts.c: Remove multiline #include comment.
8280
026c3cfd
AH
82812015-07-12 Aldy Hernandez <aldyh@redhat.com>
8282
8283 * c-common.c: Fix double word typos.
8284
bb49ee66
EB
82852015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8286
8287 * c-ada-spec.h (cpp_operation): Revert latest change.
8288 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8289 constructors and destructors.
8290
1916bcb5
AM
82912015-07-09 Andrew MacLeod <amacleod@redhat.com>
8292
8293 * c-common.h: Adjust includes for flags.h changes.
8294 * stub-objc.c: Likewise.
026c3cfd 8295
a9dcd529
EB
82962015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8297
8298 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8299 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8300
b03b462f
JJ
83012015-07-08 Jakub Jelinek <jakub@redhat.com>
8302
8303 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8304 are to be removed, return NULL rather than original clauses list.
8305
c7131fb2
AM
83062015-07-07 Andrew MacLeod <amacleod@redhat.com>
8307
8308 * array-notation-common.c: Adjust includes.
8309 * c-ada-spec.c: Likewise.
8310 * c-cilkplus.c: Likewise.
8311 * c-common.h: Likewise.
8312 * c-cppbuiltin.c: Likewise.
8313 * c-dump.c: Likewise.
8314 * c-format.c: Likewise.
8315 * c-gimplify.c: Likewise.
8316 * c-indentation.c: Likewise.
8317 * c-lex.c: Likewise.
8318 * c-omp.c: Likewise.
8319 * c-opts.c: Likewise.
8320 * c-pch.c: Likewise.
8321 * c-ppoutput.c: Likewise.
8322 * c-pragma.c: Likewise.
8323 * c-pretty-print.c: Likewise.
8324 * c-semantics.c: Likewise.
8325 * c-ubsan.c: Likewise.
8326 * cilk.c: Likewise.
8327 * stub-objc.c: Likewise.
8328
2a7fb83f
EB
83292015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8330
8331 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8332 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8333
a03c9bf1
JM
83342015-07-01 Jason Merrill <jason@redhat.com>
8335
36a85135
JM
8336 * c-common.h (D_CXX11): Rename from D_CXX0X.
8337 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8338 * c-common.c: Adjust.
8339
e7fa68d5
JM
8340 * c-opts.c (c_common_post_options): Default to C++14.
8341
a03c9bf1
JM
8342 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8343
fe95b036
ESR
83442015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8345
8346 Implement N4197 - Adding u8 character literals
b3d5bc62 8347 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8348 CPP_CHAR.
b3d5bc62 8349 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8350 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8351 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8352 and CPP_UTF8CHAR tokens.
8353 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8354
da2e71c9
MLI
83552015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8356
8357 PR fortran/66605
8358 * c-common.c (do_warn_unused_parameter): Move here.
8359 * c-common.h (do_warn_unused_parameter): Declare.
8360
b155cfd9
MP
83612015-06-29 Marek Polacek <polacek@redhat.com>
8362
8363 PR c/66322
8364 * c-common.c (check_case_bounds): Add bool * parameter. Set
8365 OUTSIDE_RANGE_P.
8366 (c_add_case_label): Add bool * parameter. Pass it down to
8367 check_case_bounds.
8368 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8369 warning here.
8370 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8371 declarations.
8372
31521951
MP
83732015-06-27 Marek Polacek <polacek@redhat.com>
8374
8375 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8376 or VECTOR_INTEGER_TYPE_P throughout.
8377 * c-gimplify.c: Likewise.
8378
22d03525
MP
83792015-06-26 Marek Polacek <polacek@redhat.com>
8380
8381 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8382 * c-common.c (c_fully_fold_internal): Likewise.
8383 (c_alignof_expr): Likewise.
8384 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8385 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8386 * cilk.c (create_parm_list): Likewise.
22d03525 8387
af05e6e5
MP
83882015-06-26 Marek Polacek <polacek@redhat.com>
8389
8390 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8391
f0889939
AM
83922015-06-25 Andrew MacLeod <amacleod@redhat.com>
8393
8394 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8395 * c-gimplify.c: Likewise.
8396 * c-pragma.c: Likewise.
8397 * c-ubsan.c: Likewise.
8398 * cilk.c: Likewise.
8399
ca752f39
RS
84002015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8401
8402 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8403 ggc_hasher.
8404
16a16ec7
AM
84052015-06-25 Andrew MacLeod <amacleod@redhat.com>
8406
8407 * cilk.c: Move calls.h after tm.h in the include chain.
8408
0ae9bd27
MP
84092015-06-25 Marek Polacek <polacek@redhat.com>
8410
8411 * array-notation-common.c: Use VAR_P throughout.
8412 * c-ada-spec.c: Likewise.
8413 * c-common.c: Likewise.
8414 * c-format.c: Likewise.
8415 * c-gimplify.c: Likewise.
8416 * c-omp.c: Likewise.
8417 * c-pragma.c: Likewise.
8418 * c-pretty-print.c: Likewise.
8419 * cilk.c: Likewise.
8420
62f9079a
MP
84212015-06-25 Marek Polacek <polacek@redhat.com>
8422
8423 * cilk.c (extract_free_variables): Use is_global_var.
8424
0fa16060
RS
84252015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8426
8427 * c-common.c: Don't include target-def.h.
8428
a68ae2e1
MP
84292015-06-23 Marek Polacek <polacek@redhat.com>
8430
8431 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8432 when comparing INTEGER_CSTs.
8433
c6a2f2d9
PMR
84342015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8435
8436 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8437 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8438 (dump_ada_template): Skip partially specialized types.
8439
6b4db501
MM
84402015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8441
8442 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8443 swapping.
8444
abb226c9
AM
84452015-06-17 Andrew MacLeod <amacleod@redhat.com>
8446
8447 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8448 * c-ada-spec.c: Likewise.
8449 * c-cilkplus.c: Likewise.
8450 * c-common.c: Likewise.
8451 * c-common.h: Likewise.
8452 * c-cppbuiltin.c: Likewise.
8453 * c-dump.c: Likewise.
8454 * c-format.c: Likewise.
8455 * c-gimplify.c: Likewise.
8456 * c-indentation.c: Likewise.
8457 * c-lex.c: Likewise.
8458 * c-omp.c: Likewise.
8459 * c-opts.c: Likewise.
8460 * c-pch.c: Likewise.
8461 * c-ppoutput.c: Likewise.
8462 * c-pragma.c: Likewise.
8463 * c-pretty-print.c: Likewise.
8464 * c-semantics.c: Likewise.
8465 * c-ubsan.c: Likewise.
8466 * cilk.c: Likewise.
8467 * stub-objc.c: Likewise.
8468
076fecad
PP
84692015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8470
8471 PR c++/65168
8472 * c-common.c (c_common_truthvalue_conversion): Warn when
8473 converting an address of a reference to a truth value.
8474
13fdf2e2
AM
84752015-06-08 Andrew MacLeod <amacleod@redhat.com>
8476
8477 * array-notation-common.c : Adjust include files.
8478 * c-ada-spec.c : Likewise.
8479 * c-cilkplus.c : Likewise.
8480 * c-common.c : Likewise.
8481 * c-common.h : Likewise.
8482 * c-cppbuiltin.c : Likewise.
8483 * c-dump.c : Likewise.
8484 * c-format.c : Likewise.
8485 * c-gimplify.c : Likewise.
8486 * c-indentation.c : Likewise.
8487 * c-lex.c : Likewise.
8488 * c-omp.c : Likewise.
8489 * c-opts.c : Likewise.
8490 * c-pch.c : Likewise.
8491 * c-ppoutput.c : Likewise.
8492 * c-pragma.c : Likewise.
8493 * c-pretty-print.c : Likewise.
8494 * c-semantics.c : Likewise.
8495 * c-ubsan.c : Likewise.
8496 * cilk.c : Likewise.
8497 * stub-objc.c : Likewise.
8498
a1661b90
MP
84992015-06-08 Marek Polacek <polacek@redhat.com>
8500
8501 PR c/66415
8502 * c-format.c (location_from_offset): Return LOC if LINE is null.
8503
d7438551
AH
85042015-06-05 Aldy Hernandez <aldyh@redhat.com>
8505
8506 * c-common.h (c_parse_final_cleanups): New prototype.
8507 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8508
b3d5bc62
JJ
85092015-06-04 Sriraman Tallam <tmsriram@google.com>
8510
8511 * c-common.c (noplt): New attribute.
8512 (handle_noplt_attribute): New handler.
8513
ecb9f223
AM
85142015-06-04 Andrew MacLeod <amacleod@redhat.com>
8515
8516 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8517 * c-ada-spec.c: Likewise.
8518 * c-cilkplus.c: Likewise.
8519 * c-common.c: Likewise.
8520 * c-common.h: Likewise.
8521 * c-cppbuiltin.c: Likewise.
8522 * c-dump.c: Likewise.
8523 * c-format.c: Likewise.
8524 * c-gimplify.c: Likewise.
8525 * c-indentation.c: Likewise.
8526 * c-lex.c: Likewise.
8527 * c-omp.c: Likewise.
8528 * c-opts.c: Likewise.
8529 * c-pch.c: Likewise.
8530 * c-ppoutput.c: Likewise.
8531 * c-pragma.c: Likewise.
8532 * c-pretty-print.c: Likewise.
8533 * c-semantics.c: Likewise.
8534 * c-ubsan.c: Likewise.
8535 * cilk.c: Likewise.
8536 * stub-objc.c: Likewise.
8537
6ac48155
DM
85382015-06-02 David Malcolm <dmalcolm@redhat.com>
8539
8540 PR c/66220:
8541 * c-indentation.c (should_warn_for_misleading_indentation): Use
8542 expand_location rather than expand_location_to_spelling_point.
8543 Don't warn if the guarding statement is more indented than the
8544 next/body stmts.
8545
773ce42e
DM
85462015-06-02 David Malcolm <dmalcolm@redhat.com>
8547
8548 * c-indentation.c (warn_for_misleading_indentation): Bail out
8549 immediately if -Wmisleading-indentation isn't enabled.
8550
4fef8379
ML
85512015-06-01 Martin Liska <mliska@suse.cz>
8552
8553 * c-format.c (check_format_arg):Use new type-based pool allocator.
8554 (check_format_info_main) Likewise.
8555
1edfb384
EB
85562015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8557
8558 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8559 (has_nontrivial_methods): Likewise.
8560
9677ef52
MP
85612015-05-25 Marek Polacek <polacek@redhat.com>
8562
8563 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8564
fd5c817a
MP
85652015-05-22 Marek Polacek <polacek@redhat.com>
8566
8567 PR c/47043
8568 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8569
a2f45fe6 85702015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8571
8572 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8573 STACK_GROWS_DOWNWARD.
8574
a2f45fe6 85752015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8576
8577 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8578 STACK_GROWS_DOWNWARD rather than if it is defined.
8579
0fee2ac2 85802015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8581
0fee2ac2
MLI
8582 PR c/52952
8583 * c-format.c (location_column_from_byte_offset): New.
8584 (location_from_offset): New.
8585 (struct format_wanted_type): Add offset_loc field.
8586 (check_format_info): Move handling of location for extra arguments
8587 closer to the point of warning.
8588 (check_format_info_main): Pass the result of location_from_offset
8589 to warning_at.
8590 (format_type_warning): Pass the result of location_from_offset
8591 to warning_at.
8592
cf4ef6f7
MP
85932015-05-20 Marek Polacek <polacek@redhat.com>
8594
8595 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8596
3a65ee74
MP
85972015-05-20 Marek Polacek <polacek@redhat.com>
8598
8599 * c-ada-spec.c (dump_sloc): Use DECL_P.
8600
21b634ae
MP
86012015-05-20 Marek Polacek <polacek@redhat.com>
8602
8603 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8604 * c-common.c: Likewise.
8605
0e50b624
DM
86062015-05-19 David Malcolm <dmalcolm@redhat.com>
8607
8608 * c-common.h (fe_file_change): Strengthen param from
8609 const line_map * to const line_map_ordinary *.
8610 (pp_file_change): Likewise.
8611 * c-lex.c (fe_file_change): Likewise.
8612 (cb_define): Use linemap_check_ordinary when invoking
8613 SOURCE_LINE.
8614 (cb_undef): Likewise.
8615 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8616 invoking cb_file_change.
8617 (c_finish_options): Likewise.
8618 (push_command_line_include): Likewise.
8619 (cb_file_change): Strengthen param "new_map" from
8620 const line_map * to const line_map_ordinary *.
8621 * c-ppoutput.c (cb_define): Likewise for local "map".
8622 (pp_file_change): Likewise for param "map" and local "from".
8623
fab27f52
MM
86242015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8625
8626 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8627
2fe1d762
TV
86282015-05-18 Tom de Vries <tom@codesourcery.com>
8629
8630 * c-common.c (build_va_arg_1): New function.
8631 (build_va_arg): Add address operator to va_list operand if necessary.
8632
7a37fa90
MM
86332015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8634
8635 PR c/48956
8636 * c-common.c (int_safely_convertible_to_real_p): Define.
8637 (unsafe_conversion_p): Check conversions involving complex types.
8638 (conversion_warning): Add new warning message for conversions which
8639 discard imaginary component.
8640 * c-common.h: (enum conversion_safety): Add new enumerator for such
8641 conversions.
8642
3aa3c9fc
MP
86432015-05-14 Marek Polacek <polacek@redhat.com>
8644
8645 PR c/66066
8646 PR c/66127
8647 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8648 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8649 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8650 use it. If FOR_INT_CONST, require that all evaluated operands be
8651 INTEGER_CSTs.
8652
c3388e62
DM
86532015-05-12 David Malcolm <dmalcolm@redhat.com>
8654
8655 * c-common.h (warn_for_misleading_indentation): New prototype.
8656 * c-indentation.c: New file.
8657 * c.opt (Wmisleading-indentation): New option.
8658
c7b38fd5
TV
86592015-05-12 Tom de Vries <tom@codesourcery.com>
8660
8661 PR tree-optimization/66010
8662 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8663
381bf11e
JM
86642015-05-09 Jason Merrill <jason@redhat.com>
8665
edff0c06
JM
8666 * c-opts.c (c_common_post_options): Also clear
8667 cpp_opts->cpp_warn_cxx11_compat.
8668
129211bc
JM
8669 * c-common.h (enum cxx_dialect): Add cxx_unset.
8670 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8671 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8672
381bf11e
JM
8673 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8674 (std=gnu++0x): Mark as Undocumented.
8675 (std=gnu++1y): Add deprecated message.
8676
fe191308
JM
86772015-05-08 Jason Merrill <jason@redhat.com>
8678
765189ff
JM
8679 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8680 * c-opts.c: Adjust.
8681
fe191308
JM
8682 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8683
755e528f
MP
86842015-05-08 Marek Polacek <polacek@redhat.com>
8685
8686 PR c/64918
8687 * c.opt (Woverride-init-side-effects): New option.
8688
0173bd2a
MP
86892015-05-07 Marek Polacek <polacek@redhat.com>
8690
8691 PR c/65179
8692 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8693 negative value.
8694 * c.opt (Wshift-negative-value): New option.
8695 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8696 when -Wextra and C99/C++11 mode.
8697
e0f0d3b9
MP
86982015-05-07 Marek Polacek <polacek@redhat.com>
8699 Martin Uecker <uecker@eecs.berkeley.edu>
8700
8701 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8702 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8703
8243e2a9
JM
87042015-05-05 Jason Merrill <jason@redhat.com>
8705
8706 * c.opt (Wterminate): New.
8707
577cd070
MP
87082015-04-30 Marek Polacek <polacek@redhat.com>
8709
8710 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8711 require that the non-constant be of a boolean type.
8712
0373796b
JT
87132015-04-29 Josh Triplett <josh@joshtriplett.org>
8714
e0f0d3b9
MP
8715 * c-common.c (handle_section_attribute): Refactor to reduce
8716 nesting and distinguish between error cases.
0373796b 8717
716c0ba6
MP
87182015-04-29 Marek Polacek <polacek@redhat.com>
8719
8720 PR c/64610
8721 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8722 with 0/1.
8723
8848828b
JJ
87242015-04-29 Jakub Jelinek <jakub@redhat.com>
8725
8726 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8727 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8728 HOST_BITS_PER_WIDE_INT.
8729
ecd0e562
TV
87302015-04-28 Tom de Vries <tom@codesourcery.com>
8731
8732 PR tree-optimization/65887
8733 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8734
2a877204 87352015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8736 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8737
8738 * c-ada-spec.c (in_function): Delete.
8739 (dump_generic_ada_node): Do not change in_function and remove the
8740 redundant code dealing with it.
8741 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8742 (print_ada_methods): Output the static member functions in a nested
8743 package after the regular methods as well as associated renamings.
8744
4853031e
MP
87452015-04-24 Marek Polacek <polacek@redhat.com>
8746
8747 PR c/65830
8748 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8749 and OPT_Wshift_count_overflow.
8750
8c2b7f79
MP
8751 PR c/63357
8752 * c-common.c (warn_logical_operator): Warn if the operands have the
8753 same expressions.
8754
b8787813
MP
87552015-04-24 Marek Polacek <polacek@redhat.com>
8756
8757 PR c/61534
8758 * c-common.c (warn_logical_operator): Bail if either operand comes
8759 from a macro expansion.
8760
8fba1830
BRF
87612015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8762
8763 PR target/55143
8764 * c-common.c (c_default_pointer_mode): Add definition.
8765 * c-common.h (c_default_pointer_mode): Add declaration.
8766
17958621
JJ
87672015-03-11 Jakub Jelinek <jakub@redhat.com>
8768
8769 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8770 on record_builtin_type argument.
8771
7ccb1a11
JJ
87722015-03-10 Jakub Jelinek <jakub@redhat.com>
8773
8774 PR c/65120
8775 * c-common.c (warn_logical_not_parentheses): Don't warn for
8776 !x == 0 or !x != 0.
8777
04fd785e
MP
87782015-03-07 Marek Polacek <polacek@redhat.com>
8779
8780 PR sanitizer/65280
8781 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8782 before trying to figure out whether we have a flexible array member.
8783
a4e26206 87842015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8785 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8786
8787 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8788
0d2489f4
EB
87892015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8790
8791 PR ada/65319
8792 * c-ada-spec.c (print_destructor): Remove obsolete code.
8793
83ed54d7
EB
87942015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8795
8796 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8797 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8798 DECL_TEMPLATE_RESULT emulations.
8799 (dump_ada_template)): Add guard for TYPE_METHODS.
8800
7631f0e2
MP
88012015-02-27 Marek Polacek <polacek@redhat.com>
8802
8803 PR c/65040
8804 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8805
d1783ae5
KT
88062015-02-27 Kai Tietz <ktietz@redhat.com>
8807
8808 PR c/35330
8809 * c-pragma.c (handle_pragma_weak): Do not try to create
8810 weak/alias of declarations not being function, or variable
8811 declarations.
8812
56a9f6bc
TS
88132015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8814
8815 PR libgomp/64625
8816 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8817 Remove macros.
8818 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8819
3d5cb23d
MP
88202015-02-16 Marek Polacek <polacek@redhat.com>
8821
8822 PR c/65066
8823 * c-format.c (check_format_types): Handle null param.
8824
fa008882
MP
88252015-02-13 Marek Polacek <polacek@redhat.com>
8826
8827 PR c/65040
8828 * c-format.c (check_format_types): Don't warn about different
8829 signedness if the original value is in the range of WANTED_TYPE.
8830
785f21af
JM
88312015-02-12 Jason Merrill <jason@redhat.com>
8832
8833 PR c++/64956
8834 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8835 to the current highest version.
8836 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8837
4886ec8e
JJ
88382015-02-04 Jakub Jelinek <jakub@redhat.com>
8839
8840 PR c/64824
8841 PR c/64868
8842 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8843 instead of RDIV_EXPR. Use build_binary_op instead of
8844 build2_loc.
8845
40fecdd6
JM
88462015-01-30 Joseph Myers <joseph@codesourcery.com>
8847
8848 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8849 to pass input_location as first argument.
8850
a0c88d06
TV
88512015-01-23 Tom de Vries <tom@codesourcery.com>
8852
8853 PR libgomp/64672
8854 * c.opt (fopenacc): Mark as LTO option.
8855
1506ae0e
TV
88562015-01-23 Tom de Vries <tom@codesourcery.com>
8857
8858 PR libgomp/64707
8859 * c.opt (fopenmp): Mark as LTO option.
8860
31be63ab
JJ
88612015-01-21 Jakub Jelinek <jakub@redhat.com>
8862
8863 PR c/63307
b1726d6c 8864 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8865 (compare_decls): Fix up formatting.
8866
88672015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8868
8869 PR c/63307
8870 * cilk.c: Include vec.h.
8871 (struct cilk_decls): New structure.
8872 (wrapper_parm_cb): Split this function to...
8873 (fill_decls_vec): ...this...
8874 (create_parm_list): ...and this.
8875 (compare_decls): New function.
8876 (for_local_cb): Remove.
8877 (wrapper_local_cb): Ditto.
8878 (build_wrapper_type): For now first traverse and fill vector of
8879 declarations then sort it and then deal with sorted vector.
8880 (cilk_outline): Ditto.
8881 (declare_one_free_variable): Ditto.
8882
6875457f
JM
88832015-01-21 Jason Merrill <jason@redhat.com>
8884
8885 PR c++/64629
8886 * c-format.c (check_format_arg): Call decl_constant_value.
8887
185c9e56
ML
88882015-01-19 Martin Liska <mliska@suse.cz>
8889
8890 * c-common.c (handle_noicf_attribute): New function.
8891
41dbbb37
TS
88922015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8893 Bernd Schmidt <bernds@codesourcery.com>
8894 James Norris <jnorris@codesourcery.com>
8895 Cesar Philippidis <cesar@codesourcery.com>
8896 Ilmir Usmanov <i.usmanov@samsung.com>
8897 Jakub Jelinek <jakub@redhat.com>
8898
8899 * c.opt (fopenacc): New option.
8900 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8901 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8902 New macros.
8903 * c-common.h (c_finish_oacc_wait): New prototype.
8904 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8905 (c_finish_oacc_wait): New function.
8906 * c-pragma.c (oacc_pragmas): New variable.
8907 (c_pp_lookup_pragma, init_pragma): Handle it.
8908 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8909 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8910 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8911 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8912 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8913 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8914 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8915 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8916 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8917 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8918 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8919 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8920 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8921 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8922 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8923 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8924 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8925 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8926 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8927 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8928 PRAGMA_OACC_CLAUSE_WORKER.
8929
3f8257db 89302015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8931
8932 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8933 for the new option fstack-protector_explicit.
8934 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8935 (handle_stack_protect_attribute): New function.
8936
3f8257db 89372015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8938
8939 * c.opt: New option -Warray-bounds=.
8940
adfac8df
JJ
89412015-01-09 Michael Collison <michael.collison@linaro.org>
8942
8943 * array-notation-common.c: Include hash-set.h, machmode.h,
8944 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8945 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8946 * c-ada-spec.c: Ditto.
8947 * c-cilkplus.c: Ditto.
8948 * c-common.c: Include input.h due to flattening of tree.h.
8949 Define macro GCC_C_COMMON_C.
8950 * c-common.h: Flatten tree.h header files into c-common.h.
8951 Remove include of tree-core.h.
8952 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8953 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8954 fold-const.h, wide-int.h, and inchash.h due to
8955 flattening of tree.h.
8956 * c-dump.c: Ditto.
8957 * c-format.c: Flatten tree.h header files into c-common.h.
8958 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8959 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8960 fold-const.h, wide-int.h, and inchash.h due to
8961 flattening of tree.h.
8962 * c-dump.c: Include hash-set.h, machmode.h,
8963 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8964 fold-const.h, wide-int.h, and inchash.h due to
8965 flattening of tree.h.
8966 * c-format.c: Include hash-set.h, machmode.h,
8967 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8968 fold-const.h, wide-int.h, inchash.h and real.h due to
8969 flattening of tree.h.
8970 * c-gimplify.c: Include hash-set.h, machmode.h,
8971 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8972 fold-const.h, wide-int.h, and inchash.h due to
8973 flattening of tree.h.
8974 * cilk.c: Ditto.
8975 * c-lex.c: Ditto.
8976 * c-omp.c: Ditto.
8977 * c-opts.c: Ditto.
8978 * c-pch.c: Ditto.
8979 * c-ppoutput.c: Ditto.
8980 * c-pragma.c: Ditto.
8981 * c-pretty-print.c: Ditto.
8982 * c-semantics.c: Ditto.
8983 * c-ubsan.c: Ditto.
8984 * stub-objc.c: Ditto.
8985
f5481fc4
JM
89862015-01-08 Jason Merrill <jason@redhat.com>
8987
8988 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8989 do_ubsan_in_current_function.
8990 (ubsan_maybe_instrument_reference_or_call): Likewise.
8991 * c-ubsan.h: Declare it.
8992
de35aa66
MS
89932015-01-08 Mike Stump <mikestump@comcast.net>
8994
8995 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8996
4a9a42ab
MP
89972015-01-07 Marek Polacek <polacek@redhat.com>
8998
8999 PR c/64440
9000 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9001 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9002
2f42e5de
TS
90032015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9004
9005 PR c++/31397
9006 * c.opt (Wsuggest-override): New option.
9007
5624e564
JJ
90082015-01-05 Jakub Jelinek <jakub@redhat.com>
9009
9010 Update copyright years.
9011
5bd012f8
MP
90122015-01-05 Marek Polacek <polacek@redhat.com>
9013
9014 PR c/64423
9015 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9016 parameter. Use it.
9017 * c-common.h (warn_array_subscript_with_type_char): Update
9018 declaration.
9019
a7fa8d18
ESR
90202014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9021
9022 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9023 Control macro with flag_sized_deallocation.
9024
3f8257db 90252014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9026
9027 * c.opt (Wdiscarded-array-qualifiers): New option.
9028
1f8d3e84
JJ
90292014-12-19 Jakub Jelinek <jakub@redhat.com>
9030
9031 PR preprocessor/63831
9032 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9033 and __has_cpp_attribute here.
9034 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9035 c_common_has_attribute.
9036 * c-common.h (c_common_has_attribute): New prototype.
9037 * c-lex.c (init_c_lex): Set cb->has_attribute to
9038 c_common_has_attribute instead of cb_has_attribute.
9039 (get_token_no_padding): New function.
9040 (cb_has_attribute): Renamed to ...
9041 (c_common_has_attribute): ... this. No longer static. Use
9042 get_token_no_padding, require ()s, don't build TREE_LIST
9043 unnecessarily, fix up formatting, adjust diagnostics, call
9044 init_attributes.
9045
20b06add
JM
90462014-12-15 Jason Merrill <jason@redhat.com>
9047
9048 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9049 (-Wsized-deallocation): New.
9050 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9051 to on in C++14 and up.
9052
94a073b2
JM
90532014-12-11 Jason Merrill <jason@redhat.com>
9054
acaa5911
JM
9055 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9056
94a073b2
JM
9057 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9058 we aren't complaining about VLAs.
9059
7fb66c15
MP
90602014-12-06 Marek Polacek <polacek@redhat.com>
9061
9062 PR tree-optimization/64183
9063 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9064 shift-expression if it is integer_type_node. Use types_compatible_p.
9065
b731b390
JJ
90662014-11-29 Jakub Jelinek <jakub@redhat.com>
9067
9068 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9069 last argument from create_tmp_var_raw and create_tmp_var calls.
9070 * cilk.c (gimplify_cilk_spawn): Likewise.
9071 * c-omp.c (c_finish_omp_atomic): Likewise.
9072
6a4da643
MP
90732014-11-28 Marek Polacek <polacek@redhat.com>
9074
9075 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9076 instead of unsigned_type_node.
9077
541e35a6
MP
90782014-11-28 Marek Polacek <polacek@redhat.com>
9079
9080 PR c/63862
9081 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9082 to op1_utype.
9083 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9084 expression to unsigned_type_node.
9085
dcc97066
MW
90862014-11-20 Mark Wielaard <mjw@redhat.com>
9087
9088 PR debug/38757
9089 * c-opts.c (set_std_c89): Set lang_hooks.name.
9090 (set_std_c99): Likewise.
9091 (set_std_c11): Likewise.
9092 (set_std_cxx98): Likewise.
9093 (set_std_cxx11): Likewise.
9094 (set_std_cxx14): Likewise.
9095 (set_std_cxx1z): Likewise.
9096
aa7da51a
JJ
90972014-11-21 Jakub Jelinek <jakub@redhat.com>
9098
9099 PR target/63764
9100 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9101 return type to bool.
009a3480 9102 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9103 (convert_vector_to_pointer_for_subscript): Change return type to
9104 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9105 and copy it into a TARGET_EXPR and use that instead of *vecp
9106 directly.
9107
538dd0b7
DM
91082014-11-19 David Malcolm <dmalcolm@redhat.com>
9109
9110 Merger of git branch "gimple-classes-v2-option-3".
9111 * ChangeLog.gimple-classes: New.
9112 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9113 from being just a vec<gimple> to a vec<gbind *>.
9114
c39a5e99
JJ
91152014-11-18 Jakub Jelinek <jakub@redhat.com>
9116
9117 PR sanitizer/63813
9118 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9119 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9120 get_pointer_alignment for non-pointers. Use ptype, or if it is
9121 reference type, corresponding pointer type, as type of kind
9122 argument.
9123 (ubsan_maybe_instrument_reference,
9124 ubsan_maybe_instrument_member_call): Adjust callers.
9125
8537a4a9
MP
91262014-11-15 Marek Polacek <polacek@redhat.com>
9127
9128 PR middle-end/63884
9129 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9130 for NULL fndecl.
9131 (extract_array_notation_exprs): Return for NULL node.
9132
2079956a
JM
91332014-11-12 Joseph Myers <joseph@codesourcery.com>
9134
9135 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9136 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9137
1304953e
JJ
91382014-11-12 Jakub Jelinek <jakub@redhat.com>
9139
9140 PR c/59708
9141 * c-common.c (check_builtin_function_arguments): Handle
9142 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9143
e5e44252
AK
91442014-11-10 Andi Kleen <ak@linux.intel.com>
9145
9146 PR c/60804
9147 * c-common.h (check_no_cilk): Declare.
9148 * cilk.c (get_error_location): New function.
9149 (check_no_cilk): Dito.
9150
e64b984d
AK
91512014-11-10 Andi Kleen <ak@linux.intel.com>
9152
9153 * cilk.c (recognize_spawn): Use expression location
9154 for error message.
9155
13c21655
PC
91562014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9157
9158 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9159
42fd12b1
ESR
91602014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9161
9162 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9163 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9164 (__cpp_range_based_for, __cpp_initializer_lists,
9165 __cpp_delegating_constructors, __cpp_nsdmi,
9166 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9167 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9168 __has_cpp_attribute.
9169 * c-lex.c (cb_has_attribute): New callback CPP function;
9170 (init_c_lex): Set has_attribute callback.
9171
6f450181
RB
91722014-11-04 Richard Biener <rguenther@suse.de>
9173
9174 * c-common.c (shorten_compare): Do not shorten mixed
9175 DFP and non-DFP compares.
9176
26f0e1d6
ESR
91772014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9178
9179 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9180 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9181 Commentary and rearrangement of tests.
9182 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9183 Commentary and rearrangement of tests.
ab20d992 9184 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9185 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9186
ef4bddc2
RS
91872014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9188
9189 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9190 enum from machine_mode.
9191
c582198b
AM
91922014-10-28 Andrew MacLeod <amacleod@redhat.com>
9193
adfac8df
JJ
9194 * c-common.c: Adjust include files.
9195 * c-gimplify.c: Ditto.
9196 * cilk.c: Ditto.
9197 * c-pragma.c: Ditto.
9198 * c-ubsan.c: Ditto.
c582198b 9199
60393bbc
AM
92002014-10-27 Andrew MacLeod <amacleod@redhat.com>
9201
9202 * c-gimplify.c: Adjust include files.
9203
d723bb7c
MLI
92042014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9205
9206 PR c++/53061
9207 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9208 c_common_initialize_diagnostics.
9209 * c-common.h: Likewise.
9210
90f3520e
MP
92112014-10-24 Marek Polacek <polacek@redhat.com>
9212
9213 PR c/56980
9214 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9215 print "struct"/"union"/"enum" for typedefed names.
9216
59d7607a
MP
92172014-10-23 Marek Polacek <polacek@redhat.com>
9218
9219 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9220 in unsigned type.
9221
d95a2703
JJ
92222014-10-22 Jakub Jelinek <jakub@redhat.com>
9223 Yury Gribov <y.gribov@samsung.com>
9224
9225 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9226 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9227 instead of flag_sanitize_recover as bool flag.
9228
8e6ef852
KY
92292014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9230
9231 * cilk.c: Revert previous change.
9232
948cf550
IZ
92332014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9234
9235 PR c/63307
9236 * cilk.c: Include vec.h.
9237 (struct cilk_decls): New structure.
9238 (wrapper_parm_cb): Split this function to...
9239 (fill_decls_vec): ...this...
9240 (create_parm_list): ...and this.
9241 (compare_decls): New function.
9242 (for_local_cb): Remove.
9243 (wrapper_local_cb): Ditto.
9244 (build_wrapper_type): For now first traverse and fill vector of
9245 declarations then sort it and then deal with sorted vector.
9246 (cilk_outline): Ditto.
9247 (declare_one_free_variable): Ditto.
9248
92574c7c
MP
92492014-10-17 Marek Polacek <polacek@redhat.com>
9250
9251 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9252 * c.opt (Wimplicit-int): Initialize to -1.
9253
83685514
AM
92542014-10-16 Andrew MacLeod <amacleod@redhat.com>
9255
9256 * c-pragma.c: Adjust include files.
9257 * c-semantics.c: Likewise.
9258
5b8300ea
DD
92592014-10-16 DJ Delorie <dj@redhat.com>
9260
9261 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9262 multiples of bytes.
9263
5f83e90b
JM
92642014-10-14 Jason Merrill <jason@redhat.com>
9265
9266 PR c++/63455
9267 * c-common.h (CPP_PREPARSED_EXPR): New.
9268 (N_CP_TTYPES): Adjust.
9269
d73326ca
MP
92702014-10-15 Marek Polacek <polacek@redhat.com>
9271
9272 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9273
78a7c317
DD
92742014-10-14 DJ Delorie <dj@redhat.com>
9275
9276 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9277 types, not just __int128.
9278 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9279 types, not just __int128.
9280 (cpp_atomic_builtins): Round pointer sizes up.
9281 (type_suffix): Use type precision, not specific types.
9282 * c-common.c (c_common_reswords): Remove __int128 special case.
9283 (c_common_type_for_size): Check for all __intN types, not just
9284 __int128.
9285 (c_common_type_for_mode): Likewise.
9286 (c_common_signed_or_unsigned_type): Likewise.
9287 (c_build_bitfield_integer_type): Likewise.
9288 (c_common_nodes_and_builtins): Likewise.
9289 (keyword_begins_type_specifier): Likewise.
9290 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9291 __intN variants.
9292
2a22f99c
TS
92932014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9294
9295 * c-common.c: Use hash_table instead of hashtab.
9296
2a8ef767
ESR
92972014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9298
adfac8df 9299 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9300 C++11 section.
9301
3c9aabbd
MG
93022014-10-03 Marc Glisse <marc.glisse@inria.fr>
9303
9304 PR c++/54427
9305 PR c++/57198
9306 PR c++/58845
9307 * c-common.c (warn_logical_operator): Punt for vectors.
9308
a15f7cb8
ESR
93092014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9310
9311 Implement SD-6: SG10 Feature Test Recommendations
9312 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9313 macros and the __has_header macro.
9314
8d0cf15e
JM
93152014-09-30 Jason Merrill <jason@redhat.com>
9316
dd5d5481
JM
9317 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9318 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9319 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9320
b752325e
JM
9321 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9322 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9323
8d0cf15e
JM
9324 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9325 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9326
083e891e
MP
93272014-09-24 Marek Polacek <polacek@redhat.com>
9328
9329 PR c/61405
9330 PR c/53874
9331 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9332
7861b648
AK
93332014-09-23 Andi Kleen <ak@linux.intel.com>
9334
9335 * c-common.c (handle_no_reorder_attribute): New function.
9336 (c_common_attribute_table): Add no_reorder attribute.
9337
9a79452d
JM
93382014-09-22 Joseph Myers <joseph@codesourcery.com>
9339
9340 * c-cppbuiltin.c (c_cpp_builtins): Define
9341 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9342 modes.
9343
dd69f047
JM
93442014-09-18 Joseph Myers <joseph@codesourcery.com>
9345
9346 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9347 for supported floating-point modes.
9348
737a4826
MLI
93492014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9350
9351 * c.opt (Wpsabi): Use LangEnabledBy.
9352 * c-opts.c (c_common_handle_option): Do not handle here.
9353
8cc4b7a2
JM
93542014-09-12 Joseph Myers <joseph@codesourcery.com>
9355
9356 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9357 macros for floating-point modes.
9358
179b5a55
MG
93592014-09-11 Marc Glisse <marc.glisse@inria.fr>
9360
9361 PR target/58757
9362 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9363 __*_DENORM_MIN__ without denormals.
9364
570a11fe
JJ
93652014-09-10 Jakub Jelinek <jakub@redhat.com>
9366
9367 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9368 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9369 ubsan_create_data callers.
9370 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9371 index is constant or BIT_AND_EXPR with constant mask and is
9372 small enough for the bound.
9373 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9374 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9375
b559c810
MLI
93762014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9377
9378 * c.opt: Add CppReason to various flags.
9379 (Wdate-time): Re-sort.
9380 * c-common.c: Include c-common.h earlier.
9381 (struct reason_option_codes_t): Delete.
9382 (c_option_controlling_cpp_error): Prefix global type and struct
9383 with cpp_.
9384
1ef33fd4
MLI
93852014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9386
9387 * c.opt (Wnormalized): New.
9388 (Wnormalized=): Use Enum and Reject Negative.
9389 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9390
66bb34c0
JM
93912014-09-08 Joseph Myers <joseph@codesourcery.com>
9392
9393 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9394 digits of floating-point modes if -fbuilding-libgcc.
9395
53d68b9f
JM
93962014-09-05 Joseph Myers <joseph@codesourcery.com>
9397
9398 * c-cppbuiltin.c (c_cpp_builtins): Also define
9399 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9400 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9401 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9402 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9403 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9404 __LIBGCC_STACK_GROWS_DOWNWARD__,
9405 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9406 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9407 __LIBGCC_DWARF_FRAME_REGISTERS__,
9408 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9409 __LIBGCC_STACK_POINTER_REGNUM__ and
9410 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9411 (builtin_define_with_value): Handle backslash-escaping in string
9412 macro values.
9413
f65586dc
RB
94142014-09-05 Richard Biener <rguenther@suse.de>
9415
9416 PR middle-end/63148
9417 * c-format.c (check_format_arg): Properly handle
9418 effectively signed POINTER_PLUS_EXPR offset.
9419
2b71f4a4
MLI
94202014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9421
9422 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9423 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9424 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9425 and Init.
9426 * c-opts.c (c_common_handle_option): Do not handle here.
9427 (sanitize_cpp_opts): Likewise.
9428 * c-common.c (struct reason_option_codes_t): Handle
9429 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9430
d2e4feca
MP
94312014-09-03 Marek Polacek <polacek@redhat.com>
9432
9433 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9434
9a771876
JJ
94352014-09-02 Jakub Jelinek <jakub@redhat.com>
9436 Balaji V. Iyer <balaji.v.iyer@intel.com>
9437 Igor Zamyatin <igor.zamyatin@intel.com>
9438
9439 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9440 * c-common.c (c_common_reswords): Added _Cilk_for.
9441 * c-common.h (enum rid): Added RID_CILK_FOR.
9442 (cilk_for_number_of_iterations): Add declaration.
9443 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9444 CILK_FOR.
9445 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9446 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9447
81b5d104
MLI
94482014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9449
9450 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9451 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9452 Wundef): Use CPP, Var and Init.
9453 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9454
b753b37b
MLI
94552014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9456
9457 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9458 * c-opts.c (c_common_handle_option): Do not handle here.
9459
028aee17
JM
94602014-08-25 Jason Merrill <jason@redhat.com>
9461
9462 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9463 -std=c++14 and -std=gnu++14, rather than the reverse.
9464 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9465 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9466 * c-common.h (cxx_dialect): Remove cxx1y.
9467
e4276ba5
ESR
94682014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9469
9470 * c-common.h (enum cxx_dialect): Add cxx14.
9471 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9472 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9473 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9474
a545cacd
JM
94752014-08-22 Jason Merrill <jason@redhat.com>
9476
9477 * c.opt (std=gnu++17): Fix alias.
9478
59ea0364
MP
94792014-08-22 Marek Polacek <polacek@redhat.com>
9480
9481 PR c++/62199
9482 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9483 check for vector types. Drop LHS argument.
9484 * c-common.h (warn_logical_not_parentheses): Adjust.
9485
596e808c
MLI
94862014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9487
9488 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9489 (Wmultichar): Likewise.
9490 (Wdate-time): Use C-family languages instead of Common. Use CPP
9491 and Var.
9492 * c-opts.c (c_common_handle_option): Do not handle the above
9493 options here.
9494 (sanitize_cpp_opts): Likewise.
9495
18767f65
MLI
94962014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9497
9498 PR fortran/44054
9499 * c-opts.c: Include tree-diagnostics.h.
9500 (c_diagnostic_finalizer): New.
9501 (c_common_initialize_diagnostics): Use it.
9502
b4413594
MLI
95032014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9504
9505 PR preprocessor/51303
9506 * c-common.c (struct reason_option_codes_t option_codes):
9507 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9508
43f9a13c
MLI
95092014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9510
9511 PR c/60975
9512 PR c/53063
9513 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9514 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9515 (c_common_post_options): Call init_global_opts_from_cpp.
9516 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9517
04159acf
MP
95182014-08-19 Marek Polacek <polacek@redhat.com>
9519
9520 PR c++/62153
9521 * c-common.c (maybe_warn_bool_compare): New function.
9522 * c-common.h (maybe_warn_bool_compare): Declare.
9523 * c.opt (Wbool-compare): New option.
9524
35aff4fb
MP
95252014-08-19 Marek Polacek <polacek@redhat.com>
9526
9527 * c.opt (Wc99-c11-compat): New option.
9528
177cce46
MP
95292014-08-19 Marek Polacek <polacek@redhat.com>
9530
9531 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9532 to warn_c90_c99_compat.
9533 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9534 to -1.
9535
6ae9194f
MLI
95362014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9537 Steven Bosscher <steven@gcc.gnu.org>
9538
9539 PR c/52952
9540 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9541 format_check_results.
9542 (check_function_format): Use true and add comment for boolean
9543 argument.
9544 (finish_dollar_format_checking): Use explicit location when warning.
9545 (check_format_info): Likewise.
9546 (check_format_arg): Set extra_arg_loc and format_string_loc.
9547 (check_format_info_main): Use explicit location when warning.
9548 (check_format_types): Pass explicit location.
9549 (format_type_warning): Likewise.
9550
8e54f6d3
MLI
95512014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9552
9553 PR fortran/44054
9554 * c-format.c: Handle Fortran flags.
9555
cd4e76fc
IZ
95562014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9557
9558 PR other/61962
9559 * array-notation-common.c (find_rank): Added handling for other
9560 types of references.
9561
f3bede71
MP
95622014-08-10 Marek Polacek <polacek@redhat.com>
9563
9564 PR c/51849
9565 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9566 * c.opt (Wc90-c99-compat): Add option.
9567
9f25a338
TS
95682014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9569
9570 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9571
62e4eb35
MP
95722014-08-03 Marek Polacek <polacek@redhat.com>
9573
ab20d992 9574 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9575 (c_add_case_label): Pass loc to check_case_value.
9576
b787e7a2
TS
95772014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9578
9579 * cilk.c: Use hash_map instead of pointer_map.
9580
6e2830c3
TS
95812014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9582
9583 * c-gimplify.c: Use hash_set instead of pointer_set.
9584
a7ee52fb
IZ
95852014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9586
9587 PR middle-end/61455
9588 * array-notation-common.c (extract_array_notation_exprs): Handling
9589 of DECL_EXPR added.
9590
944fa280
JJ
95912014-08-01 Jakub Jelinek <jakub@redhat.com>
9592
9593 * c-common.h (min_align_of_type): Removed prototype.
9594 * c-common.c (min_align_of_type): Removed.
9595 * c-ubsan.h (ubsan_maybe_instrument_reference,
9596 ubsan_maybe_instrument_member_call): New prototypes.
9597 * c-ubsan.c: Include stor-layout.h and builtins.h.
9598 (ubsan_maybe_instrument_reference_or_call,
9599 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9600 functions.
9601
b4dfdc11
MG
96022014-07-31 Marc Glisse <marc.glisse@inria.fr>
9603
9604 PR c++/60517
9605 * c.opt (-Wreturn-local-addr): Move to common.opt.
9606
a41844e5
JM
96072014-07-30 Jason Merrill <jason@redhat.com>
9608
9609 PR c++/61659
9610 PR c++/61687
9611 Revert:
9612 * c.opt (-fuse-all-virtuals): New.
9613
976d5a22
TT
96142014-07-30 Tom Tromey <tromey@redhat.com>
9615
9616 PR c/59855
9617 * c.opt (Wdesignated-init): New option.
9618 * c-common.c (c_common_attribute_table): Add "designated_init".
9619 (handle_designated_init): New function.
9620
cdc94aca
MP
96212014-07-24 Marek Polacek <polacek@redhat.com>
9622
9623 PR c/57653
9624 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9625
f41373b6
DS
96262014-07-16 Dodji Seketeli <dodji@redhat.com>
9627
9628 PR preprocessor/60723 - missing system-ness marks for macro tokens
9629 * c-ppoutput.c (struct print::prev_was_system_token): New data
9630 member.
9631 (init_pp_output): Initialize it.
9632 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9633 (do_line_change): Return a flag saying if a line marker was
9634 emitted or not.
9635 (scan_translation_unit): Detect if the system-ness of the token we
9636 are about to emit is different from the one of the previously
9637 emitted token. If so, emit a line marker. Avoid emitting useless
9638 adjacent line markers. Avoid emitting line markers for tokens
9639 originating from the expansion of built-in macros.
9640 (scan_translation_unit_directives_only): Adjust.
9641
4d661eaa
MP
96422014-07-15 Marek Polacek <polacek@redhat.com>
9643
9644 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9645 TYPE_MAX_VALUE is NULL.
9646
b108f48f
JJ
96472014-07-14 Jakub Jelinek <jakub@redhat.com>
9648
9649 PR middle-end/61294
9650 * c.opt (Wmemset-transposed-args): New warning.
9651
c0221884
JM
96522014-07-10 Jason Merrill <jason@redhat.com>
9653
9654 PR c++/61659
9655 PR c++/61687
9656 * c.opt (-fuse-all-virtuals): New.
9657
63dfbb95
RB
96582014-07-09 Richard Biener <rguenther@suse.de>
9659
9660 PR c-family/61741
9661 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9662 using unsigned arithmetic if overflow does not wrap instead of
9663 if overflow is undefined.
9664
773ec47f
MP
96652014-07-06 Marek Polacek <polacek@redhat.com>
9666
9667 PR c/6940
9668 * c.opt (Wsizeof-array-argument): New option.
9669
00a7ba58
JJ
96702014-07-03 Jakub Jelinek <jakub@redhat.com>
9671
b1726d6c 9672 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9673 comments->count <= 1, as comments->entries might be NULL.
9674
52ec0ea3
MP
96752014-07-01 Marek Polacek <polacek@redhat.com>
9676
9677 * c.opt (Wint-conversion): New option.
9678
d5c3d343
MP
96792014-07-01 Marek Polacek <polacek@redhat.com>
9680
9681 PR c/58286
9682 * c.opt (Wincompatible-pointer-types): New option.
9683
6e7ceb17
PC
96842014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9685
9686 PR c++/51400
9687 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9688 Do not discard TYPE_QUALS of type.
9689
da73100b
JM
96902014-06-26 Jason Merrill <jason@redhat.com>
9691
9692 * c-common.h (enum cxx_dialect): Add cxx1z.
9693 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9694 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9695
08eedf75
TJ
96962014-06-26 Teresa Johnson <tejohnson@google.com>
9697
9698 * c-common.h (get_dump_info): Declare.
9699 * c-gimplify.c (c_genericize): Use saved dump files.
9700 * c-opts.c (c_common_parse_file): Begin and end dumps
9701 once around parsing invocation.
9702 (get_dump_info): New function.
9703
7b56b2f8
MP
97042014-06-23 Marek Polacek <polacek@redhat.com>
9705 Andrew MacLeod <amacleod@redhat.com>
9706
9707 PR c/61553
9708 * c-common.c (get_atomic_generic_size): Don't segfault if the
9709 type doesn't have a size.
9710
0e37a2f3
MP
97112014-06-20 Marek Polacek <polacek@redhat.com>
9712
9713 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9714 (ubsan_walk_array_refs_r): New function.
9715 (c_genericize): Instrument array bounds.
9716 * c-ubsan.c: Include "internal-fn.h".
9717 (ubsan_instrument_division): Mark instrumented arrays as having
9718 side effects. Adjust ubsan_type_descriptor call.
9719 (ubsan_instrument_shift): Likewise.
9720 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9721 (ubsan_instrument_bounds): New function.
9722 (ubsan_array_ref_instrumented_p): New function.
9723 (ubsan_maybe_instrument_array_ref): New function.
9724 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9725 (ubsan_array_ref_instrumented_p): Declare.
9726 (ubsan_maybe_instrument_array_ref): Declare.
9727
97282014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9729
9730 PR lto/61123
9731 * c.opt (fshort-enums): Add to LTO.
9732 * c.opt (fshort-wchar): Likewise.
9733
5c3d09f7
MP
97342014-06-16 Marek Polacek <polacek@redhat.com>
9735
9736 PR c/60439
9737 * c.opt (Wswitch-bool): Add Var.
9738
9cf32741
JJ
97392014-06-12 Jakub Jelinek <jakub@redhat.com>
9740
9741 PR middle-end/61486
9742 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9743 #pragma omp target teams or
9744 #pragma omp {,target }teams distribute simd.
9745
62984918
JM
97462014-06-12 Jason Merrill <jason@redhat.com>
9747
9748 * c.opt (Wabi=, fabi-compat-version): New.
9749 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9750 (c_common_post_options): Handle flag_abi_compat_version default.
9751 Disallow -fabi-compat-version=1.
9752 * c-common.h (abi_version_crosses): New.
9753
f961457f
JH
97542014-06-11 Jan Hubicka <hubicka@ucw.cz>
9755
adfac8df 9756 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9757 section names that are no longer trees.
9758
92d28cbb
JJ
97592014-06-10 Jakub Jelinek <jakub@redhat.com>
9760
9761 PR fortran/60928
9762 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9763 (omp_pragmas): ... back here.
9764
742938c9
MP
97652014-06-05 Marek Polacek <polacek@redhat.com>
9766
9767 PR c/49706
9768 * c-common.c (warn_logical_not_parentheses): New function.
9769 * c-common.h (warn_logical_not_parentheses): Declare.
9770 * c.opt (Wlogical-not-parentheses): New option.
9771
9d548dfb
MP
97722014-06-04 Marek Polacek <polacek@redhat.com>
9773
9774 PR c/30020
9775 * c-common.c (check_case_bounds): Add location parameter.
9776 Use it.
9777 (c_add_case_label): Pass loc to check_case_bounds.
9778
fedfecef
MP
97792014-06-03 Marek Polacek <polacek@redhat.com>
9780
9781 PR c/60439
9782 * c.opt (Wswitch-bool): New option.
9783
f6a7cffc
TS
97842014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9785
040d18b6
TS
9786 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9787 Remove prototypes.
9788 (record_types_used_by_current_var_decl): Move prototype to where
9789 it belongs.
9790
f6a7cffc
TS
9791 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9792 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9793 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9794
632f2871
RS
97952014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9796
9797 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9798 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9799 void_zero_node.
9800 * c-pretty-print.c (pp_c_void_constant): New function.
9801 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9802 (c_pretty_printer::expression): Handle VOID_CST.
9803 * cilk.c (extract_free_variables): Likewise.
9804 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9805 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9806
766090c2
TS
98072014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9808
9809 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9810 * c-pragma.c (push_alignment): Adjust.
9811 (handle_pragma_push_options): Likewise.
9812
661a0813
MP
98132014-05-09 Marek Polacek <polacek@redhat.com>
9814
9815 PR c/50459
9816 * c-common.c (check_user_alignment): Return -1 if alignment is error
9817 node.
9818 (handle_aligned_attribute): Don't call default_conversion on
9819 FUNCTION_DECLs.
9820 (handle_vector_size_attribute): Likewise.
9821 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9822 (handle_sentinel_attribute): Call default_conversion and allow even
9823 integral types as an argument.
9824
2793eeab
MP
98252014-05-08 Marek Polacek <polacek@redhat.com>
9826
9827 PR c/61053
9828 * c-common.c (min_align_of_type): New function factored out from...
9829 (c_sizeof_or_alignof_type): ...here.
9830 * c-common.h (min_align_of_type): Declare.
9831
f827930a
MP
98322014-05-08 Marek Polacek <polacek@redhat.com>
9833
9834 PR c/61077
9835 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9836 parameter type of main.
9837
ca49b74e
DD
98382014-05-07 DJ Delorie <dj@redhat.com>
9839
9840 * c-cppbuiltin.c (print_bits_of_hex): New.
9841 (builtin_define_type_minmax): Print values using hex so as not to
9842 require a pre-computed list of string values.
9843
1d60af08
KZ
98442014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9845 Mike Stump <mikestump@comcast.net>
9846 Richard Sandiford <rdsandiford@googlemail.com>
9847
9848 * c-ada-spec.c: Include wide-int.h.
9849 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9850 (dump_generic_ada_node): Use wide-int interfaces.
9851 * c-common.c: Include wide-int-print.h.
9852 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9853 (pointer_int_sum): Use wide-int interfaces.
9854 (c_common_nodes_and_builtins): Use make_int_cst.
9855 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9856 (handle_alloc_size_attribute): Use wide-int interfaces.
9857 (get_nonnull_operand): Likewise.
9858 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9859 * c-lex.c: Include wide-int.h.
9860 (narrowest_unsigned_type): Take a widest_int rather than two
9861 HOST_WIDE_INTs.
9862 (narrowest_signed_type): Likewise.
9863 (interpret_integer): Update accordingly. Use wide-int interfaces.
9864 (lex_charconst): Use wide-int interfaces.
9865 * c-pretty-print.c: Include wide-int.h.
9866 (pp_c_integer_constant): Use wide-int interfaces.
9867 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9868 INT_CST_LT_UNSIGNED.
9869
b15458be
RB
98702014-05-06 Richard Biener <rguenther@suse.de>
9871
9872 * c-opts.c (c_common_post_options): For -freestanding,
9873 -fno-hosted and -fno-builtin disable pattern recognition
9874 if not enabled explicitely.
9875
6577374e
MP
98762014-05-02 Marek Polacek <polacek@redhat.com>
9877
9878 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9879
d00887e8
MP
98802014-05-01 Marek Polacek <polacek@redhat.com>
9881
9882 PR c/43245
9883 * c.opt (Wdiscarded-qualifiers): Add.
9884
f8ed5150
MP
98852014-04-30 Marek Polacek <polacek@redhat.com>
9886
9887 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9888 INT_MIN / -1 sanitization only for integer types.
9889
45484dcf
MP
98902014-04-25 Marek Polacek <polacek@redhat.com>
9891
9892 PR c/18079
9893 * c-common.c (handle_noinline_attribute): Warn if the attribute
9894 conflicts with always_inline attribute.
9895 (handle_always_inline_attribute): Warn if the attribute conflicts
9896 with noinline attribute.
9897
38e514c0
MP
98982014-04-25 Marek Polacek <polacek@redhat.com>
9899
9900 PR c/60156
9901 * c-common.c (check_main_parameter_types): Warn about variadic main.
9902
44875f92
MS
99032014-04-24 Mike Stump <mikestump@comcast.net>
9904
9905 * c.opt (Wshadow-ivar): Default to on.
9906
dcaaa5a0
DP
99072014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9908
9909 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9910
c07d7c02
MP
99112014-04-23 Marek Polacek <polacek@redhat.com>
9912
9913 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9914
1c33c9b7
JJ
99152014-04-22 Jakub Jelinek <jakub@redhat.com>
9916
9917 PR sanitizer/60275
9918 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9919 if flag_sanitize_undefined_trap_on_error.
9920 (ubsan_instrument_division, ubsan_instrument_shift,
9921 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9922 if !flag_sanitize_recover.
9923
793c625f
MG
99242014-04-22 Marc Glisse <marc.glisse@inria.fr>
9925
9926 PR libstdc++/43622
9927 * c-common.c (registered_builtin_types): Make non-static.
9928 * c-common.h (registered_builtin_types): Declare.
9929
b0f1bf36 99302014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9931 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9932
9933 PR c/60819
9934 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9935 apply may-alias the scalar pointer type when applicable.
9936
3b07fa4a
IZ
99372014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9938
9939 PR middle-end/60467
9940 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9941 as possible argument for Cilk_spawn.
9942
cbbd2b1c
TB
99432014-04-11 Tobias Burnus <burnus@net-b.de>
9944
9945 PR c/60194
9946 * c.opt (Wformat-signedness): Add
9947 * c-format.c(check_format_types): Use it.
9948
6415bd5d
JM
99492014-04-11 Jason Merrill <jason@redhat.com>
9950
9951 PR c++/57926
9952 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9953 default_conversion for an array argument.
9954
6525783a
MP
99552014-04-08 Marek Polacek <polacek@redhat.com>
9956
9957 PR sanitizer/60745
9958 * c-ubsan.c: Include asan.h.
9959 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9960
880a467b
NS
99612014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9962
9963 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9964
7b59ff2d
MP
99652014-04-02 Marek Polacek <polacek@redhat.com>
9966
9967 * c-common.h (c_expand_expr): Remove declaration.
9968
8edbfaa6
JJ
99692014-03-28 Jakub Jelinek <jakub@redhat.com>
9970
9971 PR c++/60689
9972 * c-common.c (add_atomic_size_parameter): When creating new
9973 params vector, push the size argument first.
9974
07d72e1d
JJ
99752014-03-26 Jakub Jelinek <jakub@redhat.com>
9976
9977 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9978 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9979 ubsan_create_data callers.
9980
b35e0fa0
JJ
99812014-03-22 Jakub Jelinek <jakub@redhat.com>
9982
9983 PR debug/60603
9984 * c-opts.c (c_finish_options): Restore cb_file_change call to
9985 <built-in>.
9986
39a1ebb3
JJ
99872014-03-13 Jakub Jelinek <jakub@redhat.com>
9988
9989 PR middle-end/36282
9990 * c-pragma.c (apply_pragma_weak): Only look at
9991 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9992 DECL_ASSEMBLER_NAME_SET_P (decl).
9993 (maybe_apply_pending_pragma_weaks): Exit early if
9994 vec_safe_is_empty (pending_weaks) rather than only when
9995 !pending_weaks.
9996 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9997 set assembler name back to NULL afterwards.
9998
a07f6ed2
JM
99992014-03-11 Jason Merrill <jason@redhat.com>
10000
10001 * c.opt: Add -std=gnu++14.
10002
75b107f5
IB
100032014-03-11 Ian Bolton <ian.bolton@arm.com>
10004
10005 * c-opts.c (c_common_post_options): Don't override
10006 -ffp-contract=fast if unsafe-math-optimizations is on.
10007
f42c637e
PM
100082014-03-08 Paulo Matos <paulo@matos-sorge.com>
10009
22b15758 10010 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10011
70e24808
JM
100122014-03-07 Jason Merrill <jason@redhat.com>
10013
10014 * c.opt: Add -std=c++14.
10015
3af9c5e9
MP
100162014-03-06 Marek Polacek <polacek@redhat.com>
10017
10018 PR c/60197
10019 * cilk.c (contains_cilk_spawn_stmt): New function.
10020 (contains_cilk_spawn_stmt_walker): Likewise.
10021 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10022 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10023
b3bdf019
JJ
100242014-03-03 Jakub Jelinek <jakub@redhat.com>
10025
10026 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10027 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10028 even when flag_preprocess_only.
10029
ca7e759d
JM
100302014-02-26 Jason Merrill <jason@redhat.com>
10031
10032 PR c++/59231
10033 PR c++/11586
10034 * c-common.c (shorten_compare): Don't check
10035 c_inhibit_evaluation_warnings.
10036
28e41874
JJ
100372014-02-19 Jakub Jelinek <jakub@redhat.com>
10038
cca615af
JJ
10039 PR c/37743
10040 * c-common.c (c_common_nodes_and_builtins): When initializing
10041 c_uint{16,32,64}_type_node, also set corresponding
10042 uint{16,32,64}_type_node to the same value.
10043
28e41874
JJ
10044 PR c++/60267
10045 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10046 for PRAGMA_IVDEP if flag_preprocess_only.
10047
c2bf53a1
JJ
100482014-02-12 Jakub Jelinek <jakub@redhat.com>
10049
10050 PR c/60101
10051 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10052 if false, add ADD itself, rather than vice versa.
10053 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10054 copy. For SAVE_EXPR, only call merge_tlist once.
10055
8fcbce72
JJ
100562014-02-08 Jakub Jelinek <jakub@redhat.com>
10057
10058 PR middle-end/60092
10059 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10060 and tree_to_uhwi.
10061 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10062 functions.
10063 (c_common_attribute_table): Add alloc_align and assume_aligned
10064 attributes.
10065
0a756a3f
MP
100662014-02-06 Marek Polacek <polacek@redhat.com>
10067
10068 PR c/60087
10069 * c-common.c (warn_for_sign_compare): Call warning_at with location
10070 instead of warning.
10071
7ec4847a
MP
100722014-02-05 Marek Polacek <polacek@redhat.com>
10073
10074 PR c/53123
10075 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10076 statement.
10077
66f20604
MP
100782014-02-04 Marek Polacek <polacek@redhat.com>
10079
10080 PR c/60036
10081 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10082 SAVE_EXPR.
10083
5d77fb19
MG
100842014-02-03 Marc Glisse <marc.glisse@inria.fr>
10085
10086 PR c++/53017
10087 PR c++/59211
10088 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10089 handle_vector_size_attribute, handle_nonnull_attribute): Call
10090 default_conversion on the attribute argument.
10091 (handle_nonnull_attribute): Increment the argument number.
10092
81e5eca8
MP
100932014-01-31 Marek Polacek <polacek@redhat.com>
10094
10095 PR c/59963
10096 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10097 build_function_call_vec.
10098 (resolve_overloaded_builtin): Likewise.
10099 * c-common.h (build_function_call_vec): Adjust declaration.
10100
68fca595
MP
101012014-01-30 Marek Polacek <polacek@redhat.com>
10102
10103 PR c/59940
10104 * c-common.h (unsafe_conversion_p): Adjust declaration.
10105 (warnings_for_convert_and_check): Likewise.
10106 (convert_and_check): Likewise.
10107 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10108 expansion_point_location_if_in_system_header on it.
10109 (warnings_for_convert_and_check): Add location parameter. Call
10110 expansion_point_location_if_in_system_header on it. Use it.
10111 (convert_and_check): Add location parameter. Use it.
10112 (conversion_warning): Likewise.
10113 (c_add_case_label): Adjust convert_and_check calls.
10114 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10115
b72271b9
BI
101162014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10117
10118 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10119 flag_cilkplus.
10120 * c-pragma.c (init_pragma): Likewise.
10121 * c.opt: Likewise.
10122
393e8e8b
MP
101232014-01-23 Marek Polacek <polacek@redhat.com>
10124
10125 PR c/59846
10126 * c-common.c (shorten_compare): Add location_t parameter.
10127 * c-common.h (shorten_binary_op): Adjust declaration.
10128
f04dda30
MP
101292014-01-23 Marek Polacek <polacek@redhat.com>
10130
10131 PR c/58346
10132 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10133 * c-common.h: Declare it.
10134
621955cb
EB
101352014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10136
10137 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10138 * c-ada-spec.c (dump_ads): Likewise.
10139 (cpp_check): Likewise.
10140 (dump_ada_specs): Likewise.
10141
101422014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10143
10144 PR c++/49718
10145 * c-common.c (handle_no_instrument_function_attribute): Allow
10146 no_instrument_function attribute in class member
10147 definition/declaration.
10148
241f845a
JJ
101492014-01-15 Jakub Jelinek <jakub@redhat.com>
10150
10151 PR c/58943
10152 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10153 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10154 being COMPOUND_EXPR.
10155 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10156 operand a SAVE_EXPR and second MODIFY_EXPR.
10157
e83b8e2e
JJ
101582014-01-09 Jakub Jelinek <jakub@redhat.com>
10159
10160 PR target/58115
10161 * c-pch.c (c_common_write_pch): Call
10162 prepare_target_option_nodes_for_pch.
10163
23a5b65a
RS
101642014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10165
10166 Update copyright years
10167
f9030485
RS
101682014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10169
10170 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10171 the copyright notice.
10172
f2aa696b
EB
101732013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10174
10175 * c-ada-spec.c (print_constructor): New function.
10176 (print_destructor): Retrieve the origin of the destructor.
10177 (print_ada_declaration): Revamp handling of constructors/destructors.
10178
3f8257db 101792013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10180 Bill Maddox <maddox@google.com>
10181 Jason Merrill <jason@redhat.com>
10182
10183 * c.opt: Add -fdeclone-ctor-dtor.
10184 * c-opts.c (c_common_post_options): Default to on iff -Os.
10185
41958c28
BI
101862013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10187
10188 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10189 attribute.
10190 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10191 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10192 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10193 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10194 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10195 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10196 PRAGMA_CILK_CLAUSE_UNIFORM.
10197
b1726d6c 10198
12893402
BI
101992013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10200
10201 * cilk.c (cilk_outline): Made this function non-static.
10202 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10203 (create_cilk_wrapper): Added a new parameter: a function pointer.
10204 (c_install_body_w_frame_cleanup): Remove
10205 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10206 * c-common.h (cilk_outline): New prototype.
10207 (gimplify_cilk_spawn): Removed two parameters.
10208 (cilk_install_body_with_frame_cleanup): New prototype.
10209 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10210 CILK_SPAWN_STMT case.
10211
085b42ed
BS
102122013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10213
2ce064c3
BS
10214 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10215
085b42ed
BS
10216 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10217 (int_array_type_node): Remove.
10218 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10219
9e36c9ed
MP
102202013-12-05 Marek Polacek <polacek@redhat.com>
10221
10222 PR c/52023
10223 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10224 [ADJUST_FIELD_ALIGN].
10225
296674db
JM
102262013-12-04 Joseph Myers <joseph@codesourcery.com>
10227
10228 PR c/52023
10229 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10230 and check field alignment if set.
10231 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10232 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10233
b1726d6c 102342013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10235 Marek Polacek <polacek@redhat.com>
10236
10237 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10238 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10239
d7947e19
L
102402013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10241
10242 PR c/59309
10243 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10244 arguments.
10245
fad7652e
JJ
102462013-11-29 Jakub Jelinek <jakub@redhat.com>
10247
10248 PR c/59280
10249 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10250 goto invalid. If it is error_mark_node, don't issue further
10251 diagnostics.
10252
8b5e1202
SO
102532013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10254
10255 * c.opt (Wopenmp-simd): New.
10256
0a508bb6
JJ
102572013-11-22 Jakub Jelinek <jakub@redhat.com>
10258
10259 * c-ubsan.h (ubsan_instrument_return): New prototype.
10260 * c-ubsan.c (ubsan_instrument_return): New function.
10261
2fb9a547
AM
102622013-11-22 Andrew MacLeod <amacleod@redhat.com>
10263
10264 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10265 * c-gimplify.c: Likewise.
10266 * cilk.c: Likewise.
2fb9a547 10267
8400e75e
DM
102682013-11-22 David Malcolm <dmalcolm@redhat.com>
10269
10270 * c-common.c (unsafe_conversion_p): Remove use of
10271 EXPR_LOC_OR_HERE macro.
10272 (conversion_warning): Likewise.
10273 (warnings_for_convert_and_check): Likewise.
10274 (warn_for_collisions_1): Likewise.
10275 (shorten_compare): Likewise, and remove use of in_system_header
10276 macro, using the location from the former.
10277 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10278 (cb_def_pragma): Remove use of in_system_header macro.
10279 (lex_string): Likewise.
10280 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10281
eb1ce453
KZ
102822013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10283 Mike Stump <mikestump@comcast.net>
10284 Richard Sandiford <rdsandiford@googlemail.com>
10285
10286 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10287 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10288 tree_fits_shwi_p or tree_fits_uhwi_p.
10289 (dump_generic_ada_node): Likewise.
10290 * c-format.c (check_format_arg): Likewise.
10291 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10292
6b3b8c27
KZ
102932013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10294
10295 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10296
49b0aa18
JC
102972013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10298
10299 PR c/53001
10300 * c-common.c (unsafe_conversion_p): Make this function
10301 return an enumeration with more detail.
10302 (conversion_warning): Use the new return type of
10303 unsafe_conversion_p to separately warn either about conversions
10304 that lower floating point number precision or about the other
10305 kinds of conversions.
10306 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10307 (unsafe_conversion_p): switching return type to
10308 conversion_safety enumeration.
49b0aa18
JC
10309 * c.opt: Adding new warning -Wfloat-conversion and
10310 enabling it with -Wconversion.
10311
b826515a
BS
103122013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10313
8e745a17
JJ
10314 * c-opts.c: Include plugin.h.
10315 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10316
b9a55b13
MP
103172013-11-19 Marek Polacek <polacek@redhat.com>
10318
10319 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10320 call.
10321 (ubsan_instrument_shift): Likewise.
10322 (ubsan_instrument_vla): Likewise.
10323
7d362f6c
RS
103242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10325
10326 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10327 cast to unsigned type.
10328
386b1f1f
RS
103292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10330
10331 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10332 tree_low_cst.
10333 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10334 rather than tree_low_cst.
10335
ae7e9ddd
RS
103362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10337
10338 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10339 tree_to_uhwi throughout.
10340
9439e9a1
RS
103412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10342
10343 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10344 tree_low_cst (..., 0) with tree_to_shwi throughout.
10345
cc269bb6
RS
103462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10347
10348 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10349 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10350
9541ffee
RS
103512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10352
10353 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10354 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10355
c02065fc
AH
103562013-11-15 Aldy Hernandez <aldyh@redhat.com>
10357
10358 * c-cilkplus.c: New file.
10359 * c-common.c (readonly_error): Add location argument.
10360 * c-common.h (readonly_error): Same.
10361 (c_finish_cilk_clauses): Protoize.
10362 (c_check_cilk_loop): Same.
10363 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10364 Do not fail on error_mark_node.
10365 Abstract increment canonicalization to here...
10366 (c_omp_for_incr_canonicalize_ptr): New.
10367 c-pragma.c (init_pragma): Register "simd" pragma.
10368 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10369 (enum pragma_cilk_clause): New.
10370
9cc65f15
RS
103712013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10372
10373 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10374 wchar_type and host_integerp checks.
10375
18f429e2
AM
103762013-11-14 Andrew MacLeod <amacleod@redhat.com>
10377
10378 * c-common.c: Likewise.
10379 * c-gimplify.c: Likewise.
10380 * cilk.c: Likewise.
10381
d8a2d370
DN
103822013-11-14 Diego Novillo <dnovillo@google.com>
10383
10384 * c-common.c: Include fold-const.h.
10385 Include stor-layout.h.
10386 Include calls.h.
10387 Include stringpool.h.
10388 Include attribs.h.
10389 Include varasm.h.
10390 Include trans-mem.h.
10391 * c-cppbuiltin.c: Include stor-layout.h.
10392 Include stringpool.h.
10393 * c-format.c: Include stringpool.h.
10394 * c-lex.c: Include stringpool.h.
10395 Include stor-layout.h.
10396 * c-pragma.c: Include stringpool.h.
10397 Include attribs.h.
10398 Include varasm.h.
10399 Include gcc-symtab.h.
10400 * c-pretty-print.c: Include stor-layout.h.
10401 Include attribs.h.
10402 * cilk.c: Include stringpool.h.
10403 Include calls.h.
10404
38b7bc7f
JM
104052013-11-13 Joseph Myers <joseph@codesourcery.com>
10406
10407 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10408 * c-common.c (c_common_reswords): Add __auto_type.
10409 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10410
45b0be94
AM
104112013-11-12 Andrew MacLeod <amacleod@redhat.com>
10412
18f429e2
AM
10413 * c-common.c: Include gimplify.h.
10414 * c-gimplify.c: Likewise.
10415 * cilk.c: Likewise.
10416 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10417 * c-ubsan.c: Don't include gimple.h.
45b0be94 10418
582d9b50
JM
104192013-11-12 Joseph Myers <joseph@codesourcery.com>
10420
10421 * c-common.c (c_common_reswords): Add _Thread_local.
10422
6b28e197
JM
104232013-11-09 Joseph Myers <joseph@codesourcery.com>
10424
10425 * c-common.c (atomic_size_supported_p): New function.
10426 (resolve_overloaded_atomic_exchange)
10427 (resolve_overloaded_atomic_compare_exchange)
10428 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10429 Use it instead of comparing size with a local list of sizes.
10430
267bac10
JM
104312013-11-07 Andrew MacLeod <amacleod@redhat.com>
10432 Joseph Myers <joseph@codesourcery.com>
10433
10434 * c-common.h (enum rid): Add RID_ATOMIC.
10435 * c-common.c (c_common_reswords): Add _Atomic.
10436 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10437 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10438 * c-format.c (check_format_types): Check for extra _Atomic
10439 qualifiers in format argument.
10440 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10441 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10442
5157b91e
TB
104432013-11-06 Tobias Burnus <burnus@net-b.de>
10444
10445 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10446
6dbe0958
JM
104472013-11-06 Joseph Myers <joseph@codesourcery.com>
10448
10449 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10450 standards modes.
10451 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10452 to mean lack of IEEE 754 support.
10453
e8ff5196
TB
104542013-11-05 Tobias Burnus <burnus@net-b.de>
10455
10456 * c.opt (-Wdate-time): New option
10457 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10458
254a0760
JM
104592013-11-05 Joseph Myers <joseph@codesourcery.com>
10460
10461 * c-cppbuiltin.c (cpp_iec_559_value): Test
10462 flag_excess_precision_cmdline not flag_excess_precision.
10463
6d7f7e0a
TB
104642013-11-05 Tobias Burnus <burnus@net-b.de>
10465
10466 * c.opt (fopenmp-simd): New option.
10467 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10468 (omp_pragmas): ... this new struct.
10469 (c_pp_lookup_pragma): Also walk omp_pragmas.
10470 (init_pragma): Init pragmas for -fopenmp-simd.
10471
55a7f02f
MP
104722013-11-04 Marek Polacek <polacek@redhat.com>
10473
10474 PR c++/58979
10475 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10476
9193fb05
JM
104772013-11-04 Joseph Myers <joseph@codesourcery.com>
10478
10479 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10480 New functions.
10481 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10482
94159ecf
EB
104832013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10484
10485 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10486 (dump_ada_specs): Adjust prototype of second callback.
10487 * c-ada-spec.c (cpp_check): New global variable.
10488 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10489 (print_generic_ada_decl): Likewise.
10490 (has_static_fields): Change return type to bool and add guard.
10491 (has_nontrivial_methods): New predicate.
10492 (is_tagged_type): Change return type to bool.
10493 (separate_class_package): Call has_nontrivial_methods.
10494 (pp_ada_tree_identifier): Minor tweaks.
10495 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10496 (dump_ada_array_domains): Likewise.
10497 (dump_ada_array_type): Likewise.
10498 (dump_template_types): Remove cpp_check parameter and do not pass it to
10499 dump_generic_ada_node.
10500 (dump_ada_template): Likewise.
10501 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10502 recursively.
10503 (print_ada_methods): Change return type to integer. Remove cpp_check
10504 parameter and do not pass it down.
10505 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10506 dump_generic_ada_node.
10507 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10508 accessing methods.
10509 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10510 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10511 value of print_ada_methods.
10512 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10513 Set cpp_check to it before invoking dump_ada_nodes.
10514 (dump_ada_specs): Likewise.
10515
b906f4ca
MP
105162013-11-03 Marek Polacek <polacek@redhat.com>
10517
10518 * c-ubsan.c: Don't include hash-table.h.
10519 (ubsan_instrument_vla): New function.
10520 * c-ubsan.h: Declare it.
10521
5e20cdc9
DM
105222013-10-31 David Malcolm <dmalcolm@redhat.com>
10523
10524 Automated part of renaming of symtab_node_base to symtab_node.
10525
10526 Patch autogenerated by rename_symtab.py from
10527 https://github.com/davidmalcolm/gcc-refactoring-scripts
10528 revision 58bb219cc090b2f4516a9297d868c245495ee622
10529
10530 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10531 symtab_node_base to symtab_node.
10532
7057e645
ESR
105332013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10534
8e745a17 10535 Implement C++14 digit separators.
7057e645
ESR
10536 * c-lex.c (interpret_float): Remove digit separators from scratch string
10537 before building real literal.
10538
193ea7bc
JJ
105392013-10-30 Jakub Jelinek <jakub@redhat.com>
10540
10541 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10542
939b37da
BI
105432013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10544
10545 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10546 fields.
10547 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10548 enabled.
10549 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10550 (insert_cilk_frame): New prototype.
10551 (cilk_init_builtins): Likewise.
10552 (gimplify_cilk_spawn): Likewise.
10553 (c_cilk_install_body_w_frame_cleanup): Likewise.
10554 (cilk_detect_spawn_and_unwrap): Likewise.
10555 (cilk_set_spawn_marker): Likewise.
10556 (build_cilk_sync): Likewise.
10557 (build_cilk_spawn): Likewise.
10558 * cilk.c: New file.
10559
67348ccc
DM
105602013-10-29 David Malcolm <dmalcolm@redhat.com>
10561
10562 Patch autogenerated by refactor_symtab.py from
10563 https://github.com/davidmalcolm/gcc-refactoring-scripts
10564 revision 58bb219cc090b2f4516a9297d868c245495ee622
10565
10566 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10567 to a true class hierarchy.
10568 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10569
d570872d
RS
105702013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10571
10572 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10573
98906124
JL
105742013-10-26 Jeff Law <law@redhat.com>
10575
adfac8df
JJ
10576 * c-common.c (c_define_builtins): Remove mudflap support.
10577 * c.opt: Ignore and warn for mudflap options.
98906124 10578
d73749df 105792013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10580
10581 PR other/33426
10582 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10583 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10584
3f04b1bb
JM
105852013-10-23 Jason Merrill <jason@redhat.com>
10586
10587 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10588
acf0174b
JJ
105892013-10-11 Jakub Jelinek <jakub@redhat.com>
10590
acd15a28
JJ
10591 * c-common.h (omp_clause_mask::operator !=): New method.
10592 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10593 instead of if (mask & something) tests everywhere.
10594
acf0174b
JJ
10595 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10596 201307 instead of 201107.
10597 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10598 (c_common_attribute_table): Add "omp declare target" and
10599 "omp declare simd" attributes.
10600 (handle_omp_declare_target_attribute,
10601 handle_omp_declare_simd_attribute): New functions.
10602 * c-omp.c: Include c-pragma.h.
10603 (c_finish_omp_taskgroup): New function.
10604 (c_finish_omp_atomic): Add swapped argument, if true,
10605 build the operation first with rhs, lhs arguments and use NOP_EXPR
10606 build_modify_expr.
10607 (c_finish_omp_for): Add code argument, pass it down to make_code.
10608 (c_omp_split_clauses): New function.
10609 (c_split_parallel_clauses): Removed.
10610 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10611 c_omp_declare_simd_clauses_to_decls): New functions.
10612 * c-common.h (omp_clause_mask): New type.
10613 (OMP_CLAUSE_MASK_1): Define.
10614 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10615 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10616 omp_clause_mask::operator |, omp_clause_mask::operator &,
10617 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10618 omp_clause_mask::operator ==): New methods.
10619 (enum c_omp_clause_split): New.
10620 (c_finish_omp_taskgroup): New prototype.
10621 (c_finish_omp_atomic): Add swapped argument.
10622 (c_finish_omp_for): Add code argument.
10623 (c_omp_split_clauses): New prototype.
10624 (c_split_parallel_clauses): Removed.
10625 (c_omp_declare_simd_clauses_to_numbers,
10626 c_omp_declare_simd_clauses_to_decls): New prototypes.
10627 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10628 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10629 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10630 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10631 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10632 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10633 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10634 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10635 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10636 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10637 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10638 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10639 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10640 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10641 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10642 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10643 PRAGMA_OMP_CLAUSE_UNIFORM.
10644
826cacfe
MG
106452013-10-09 Marc Glisse <marc.glisse@inria.fr>
10646
10647 PR tree-optimization/20318
10648 * c-common.c (handle_returns_nonnull_attribute): New function.
10649 (c_common_attribute_table): Add returns_nonnull.
10650
2284b034
MG
106512013-10-03 Marc Glisse <marc.glisse@inria.fr>
10652
10653 PR c++/19476
10654 * c.opt (fcheck-new): Move to common.opt.
10655
b56e9788
MP
106562013-09-25 Marek Polacek <polacek@redhat.com>
10657 Jakub Jelinek <jakub@redhat.com>
10658
10659 PR sanitizer/58413
10660 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10661 an expression if we can prove it is correct.
10662 (ubsan_instrument_division): Likewise. Remove unnecessary
10663 check.
10664
ce6923c5
MP
106652013-09-18 Marek Polacek <polacek@redhat.com>
10666
10667 PR sanitizer/58411
10668 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10669 Declare it.
10670 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10671
fb5610fb
IS
106722013-09-14 Iain Sandoe <iain@codesourcery.com>
10673
10674 PR target/48094
10675 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10676 fobjc-gc, freplace-objc-classes): Accept for LTO.
10677
88b0e79e
JC
106782013-09-13 Jacek Caban <jacek@codeweavers.com>
10679
10680 * c-target.def: New hook
10681
c9b0866a
PC
106822013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10683
10684 PR c++/43452
10685 * c.opt (Wdelete-incomplete): Add.
10686
0af94e6f
JR
106872013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10688
10689 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10690 (vector_types_compatible_elements_p): New function.
10691 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10692 declaration.
10693 (vector_types_compatible_elements_p): Declare.
10694
7c26172c
GDR
106952013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10696
10697 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10698 a virtual member function.
10699 (pp_simple_type_specifier): Remove.
10700 (pp_c_type_specifier): Likewise.
10701 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10702 Rename from pp_c_type_specifier. Adjust.
10703 (c_pretty_printer::c_pretty_printer): Do not assign to
10704 simple_type_specifier.
10705
20059c8b
GDR
107062013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10707
10708 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10709 member function.
10710 (c_pretty_printer::storage_class_specifier): Likewise.
10711 (c_pretty_printer::initializer): Likewise.
10712 (pp_declaration): Remove.
10713 (pp_declaration_specifiers): Likewise.
10714 (pp_abstract_declarator): Likewise.
10715 (pp_declarator): Likewise.
10716 (pp_type_id): Likewise.
10717 (pp_statement): Likewise.
10718 (pp_constant): Likewise.
10719 (pp_id_expression): Likewise.
10720 (pp_primary_expression): Likewise.
10721 (pp_unary_expression): Likewise.
10722 (pp_multiplicative_expression): Likewise.
10723 (pp_conditional_expression): Likewise.
10724 (pp_assignment_expression): Likewise.
10725 (pp_expression): Likewise.
10726 (pp_c_type_id): Likewise.
10727 (pp_c_storage_class_specifier): Likewise.
10728 * c-pretty-print.c (pp_c_type_cast): Tidy.
10729 (pp_c_pointer): Likewise.
10730 (pp_c_type_specifier): Likewise.
10731 (pp_c_parameter_type_list): Likewise.
10732 (pp_c_function_definition): Likewise.
10733 (pp_c_init_declarator): Likewise.
10734 (pp_c_initializer_list): Likewise.
10735 (pp_c_constructor_elts): Likewise.
10736 (c_pretty_printer::direct_abstract_declarator): Likewise.
10737 (c_pretty_printer::declaration_specifiers): Likewise.
10738 (c_pretty_printer::primary_expression): Likewise.
10739 (c_pretty_printer::postfix_expression): Likewise.
10740 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10741 (c_pretty_printer::storage_class_specifier): Rename from
10742 pp_c_storage_class_specifier.
10743 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10744 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10745 storage_class_specifier, initializer, offset_list, flags.
10746
de5a5fa1
MP
107472013-08-30 Marek Polacek <polacek@redhat.com>
10748
10749 * c-ubsan.c: New file.
10750 * c-ubsan.h: New file.
10751
8f0e4d72
GDR
107522013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10753
10754 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10755 member function.
10756 (c_pretty_printer::declaration_specifiers): Likewise.
10757 (c_pretty_printer::declarator): Likewise.
10758 (c_pretty_printer::abstract_declarator): Likewise.
10759 (c_pretty_printer::direct_abstract_declarator): Likewise.
10760 (c_pretty_printer::direct_declarator): Likewise.
10761 (c_pretty_printer::function_specifier): Likewise.
10762 (pp_declaration): Adjust.
10763 (pp_declaration_specifiers): Likewise.
10764 (pp_abstract_declarator): Likewise.
10765 (pp_direct_declarator): Likewise.
10766 (pp_function_specifier): Likewise.
10767 (pp_direct_abstract_declarator): Remove as unused.
10768 (pp_c_declaration): Remove.
10769 (pp_c_declaration_specifiers): Likewise.
10770 (pp_c_declarator): Likewise.
10771 (pp_c_direct_declarator): Likewise.
10772 (pp_c_function_specifier): Likewise.
10773 (pp_c_direct_abstract_declarator): Likewise.
10774 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10775 from pp_c_abstract_declarator. Adjust.
ab20d992 10776 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10777 pp_c_direct_abstract_declarator. Adjust.
10778 (c_pretty_printer::function_specifier): Rename from
10779 pp_c_function_specifier. Adjust.
10780 (c_pretty_printer::declaration_specifiers): Rename from
10781 pp_c_declaration_specifiers. Adjust.
10782 (c_pretty_printer::direct_declarator): Rename from
10783 pp_c_direct_declarator. Adjust.
10784 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10785 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10786 (c_pretty_printer::c_pretty_printer): Do not assign to
10787 declaration, declaration_specifiers, declarator,
10788 direct_declarator, direct_abstract_declarator, function_specifier.
10789
00d34d3a
GDR
107902013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10791
10792 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10793 virtual member function.
10794 (c_pretty_printer::multiplicative_expression): Likewise.
10795 (c_pretty_printer::conditional_expression): Likewise.
10796 (c_pretty_printer::assignment_expression): Likewise.
10797 (c_pretty_printer::expression): Likewise.
10798 (pp_unary_expression): Adjust.
10799 (pp_multiplicative_expression): Likewise.
10800 (pp_assignment_expression): Likewise.
10801 (pp_conditional_expression): Likewise.
10802 (pp_expression): Likewise.
10803 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10804 from pp_c_unary_expression. Adjust.
10805 (c_pretty_printer::multiplicative_expression): Rename from
10806 pp_c_multiplicative_expression. Adjust.
10807 (c_pretty_printer::conditional_expression): Rename from
10808 pp_c_conditional_expression. Adjust.
10809 (c_pretty_printer::assignment_expression): Rename from
10810 pp_c_assignment_expression. Adjust.
10811 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10812 (c_pretty_printer::c_pretty_printer): Do not assign to
10813 unary_expression, multiplicative_expression,
10814 conditional_expression, expression.
10815
fb22178f
GDR
108162013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10817
10818 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10819 virtual member function.
10820 (pp_postfix_expression): Adjust.
10821 (pp_c_postfix_expression): Remove.
10822 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10823 from pp_c_postfix_expression. Adjust.
10824 (c_pretty_printer::c_pretty_printer): Do not assign to
10825 postfix_expression.
10826
7ecc2600
GDR
108272013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10828
10829 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10830 virtua member function.
10831 (pp_primary_expression): Adjust.
10832 (pp_c_primary_expression): Remove.
10833 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10834 from pp_c_primary_expression. Adjust.
10835 (pp_c_initializer_list): Use pp_primary_expression.
10836 (c_pretty_printer::c_pretty_printer): Do not assign to
10837 primary_expression.
10838
0691175f
GDR
108392013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10840
10841 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10842 * c-pretty-print.c (M_): Remove.
10843 (c_pretty_printer::translate_string): Define.
10844 (pp_c_type_specifier): Use it.
10845 (pp_c_primary_expression): Likewise.
10846 (pp_c_expression): Likewise.
10847
66dfe4c4
GDR
108482013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10849
10850 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10851 virtual function.
10852 (pp_c_id_expression): Remove.
10853 (pp_id_expression): Adjust.
10854 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10855 pp_c_id_expression. Adjust.
10856 (pp_c_postfix_expression): Use pp_id_expression.
10857 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10858
ca43e9d5
GDR
108592013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10860
10861 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10862 member function.
10863 (pp_constant): Adjust.
10864 (pp_c_constant): Remove.
10865 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10866 pp_c_constant. Adjust.
10867 (pp_c_constant)
10868 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10869 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10870
da6ca2b5
GDR
108712013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10872
10873 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10874 (c_pretty_printer::c_pretty_printer): Declare.
10875 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10876 c_pretty_printer_init. Adjust.
10877 (print_c_tree): Do not call c_pretty_printer_init.
10878 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10879
65a372f4
AC
108802013-08-09 Arnaud Charlet <charlet@adacore.com>
10881
10882 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10883
fd9b0f32
PC
108842013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10885
10886 PR c++/58080
10887 * c-common.c (pointer_int_sum): Add bool parameter.
10888 * c-common.h (pointer_int_sum): Adjust declaration.
10889
e0aec1e9
GDR
108902013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10891
10892 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10893 c_pretty_printer variable.
10894
b066401f
GDR
108952013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10896
10897 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10898 (pp_base): Remove.
10899 (pp_c_base): Likewise. Adjust users.
10900 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10901 (pp_c_whitespace): Do not call pp_base.
10902 (pp_c_left_paren): Likewise.
10903 (pp_c_right_paren): Likewise.
10904 (pp_c_left_brace): Likewise.
10905 (pp_c_right_brace): Likewise.
10906 (pp_c_left_bracket): Likewise.
10907 (pp_c_right_bracket): Likewise.
10908 (pp_c_dot): Likewise.
10909 (pp_c_ampersand): Likewise.
10910 (pp_c_star): Likewise.
10911 (pp_c_arrow): Likewise.
10912 (pp_c_semicolon): Likewise.
10913 (pp_c_complement): Likewise.
10914 (pp_c_exclamation): Likewise.
10915 (pp_c_direct_declarator): Likewise.
10916 (pp_c_ws_string): Likewise.
10917 (pp_c_identifier): Likewise.
10918 (pp_c_statement): Likewise.
10919 (print_c_tree): Likewise.
10920
65e5a578
ESR
109212013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10922
10923 PR c++/58072
10924 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10925 provide useful error strings.
10926
137a1a27
GDR
109272013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10928
10929 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10930 printer functions instead of pp_string or operators and punctuators.
10931 (dump_generic_ada_node): Likewise.
10932 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10933 (pp_c_relational_expression): Likewise.
10934 (pp_c_logical_or_expression): Likewise.
10935
07838b13
GDR
109362013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10937
10938 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10939 functions instead of pp_character.
10940 (pp_ada_tree_identifier): Likewise.
10941 (dump_ada_double_name): Likewise.
10942 (dump_ada_function_declaration): Likewise.
10943 (dump_ada_array_domains): Likewise.
10944 (dump_template_types): Likewise.
10945 (dump_generic_ada_node): Likewise.
10946 (print_ada_declaration): Likewise.
10947 (print_ada_struct_decl): Likewise.
10948 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10949
433cc7b0
TT
109502013-07-23 Tom Tromey <tromey@redhat.com>
10951
10952 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10953 * c-common.c (c_common_reswords): Add _Generic.
10954
688010ba
OB
109552013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10956
10957 * c-common.c: Fix typos.
10958 * c-common.h: Likewise.
10959
2a99e5e6
LL
109602013-07-13 Lubos Lunak <l.lunak@suse.cz>
10961
10962 PR c++/55203
10963 * c-common.c (c_common_attribute_table): Add warn_unused.
10964 (handle_warn_unused_attribute): New.
10965
c26302d5
JJ
109662013-07-10 Jakub Jelinek <jakub@redhat.com>
10967
10968 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10969 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10970
dfeadaa0
PC
109712013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10972
10973 PR c++/57869
10974 * c.opt: Add Wconditionally-supported.
10975
6a2fa4b2
GS
109762013-07-08 Graham Stott <graham.stott@btinternet.com>
10977
adfac8df 10978 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10979 unused variables l_length and l_node.
10980
ecdbd01a 109812013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10982
10983 PR c/57821
10984 * c-common.c (complete_array_type): Delay folding first index
10985 like other indices. When folding, check for index overflow.
10986
bedc293e
MG
109872013-06-27 Marc Glisse <marc.glisse@inria.fr>
10988
10989 PR c++/57509
10990 * c-common.h (c_build_vec_perm_expr): New complain argument.
10991 * c-common.c (c_build_vec_perm_expr): Likewise.
10992 Use save_expr also in C++.
10993
604b2bfc
GDR
109942013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10995
10996 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10997 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10998 * c-opts.c (c_common_post_options): Likewise.
10999
dfeadaa0 110002013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11001
11002 * array-notation-common.c (length_mismatch_in_expr): Changed the
11003 parameter type's from a dynamic array to a vec_tree. Also removed
11004 the size parameters.
11005 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11006 the change above.
11007
2ce86d2e
BI
110082013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11009
11010 * c-common.h (struct cilkplus_an_parts): New structure.
11011 (struct cilkplus_an_loop_parts): Likewise.
11012 (cilkplus_extract_an_triplets): New prototype.
11013 (fix_sec_implicit_args): Likewise.
11014 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11015 (fix_sec_implicit_args): Likewise.
604b2bfc 11016
07a6825b
BI
110172013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11018
11019 * array-notation-common.c (find_inv_trees): Removed an unwanted
11020 typecasting.
11021 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11022 enum rid to enum tree_code.
11023
08346abd
JH
110242013-06-11 Jan Hubicka <jh@suse.cz>
11025
11026 * c-common.c (handle_alias_ifunc_attribute): Do not set
11027 DECL_EXTERNAL for weakref variables.
11028 * c-pragma.c (handle_pragma_weak): Make sure aliases
11029 are not declared as external.
11030
d60f1706
BI
110312013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11032
11033 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11034 function from c/c-array-notation.c.
11035 (is_cilkplus_reduce_builtin): Likewise.
11036 (find_rank): Likewise.
11037 (extract_array_notation_exprs): Likewise.
11038 (replace_array_notations): Likewise.
11039 (find_inv_trees): Likewise.
11040 (replace_inv_trees): Likewise.
11041 (contains_array_notation_expr): Likewise.
11042 (find_correct_array_notation_type): Likewise.
11043 * c-common.h (struct inv_list): Moved this struct from the file
11044 c/c-array-notation.c and added a new field called additional tcodes.
11045 (length_mismatch_in_expr_p): New prototype.
11046 (is_cilkplus_reduce_builtin): Likewise.
11047 (find_rank): Likewise.
11048 (extract_array_notation_exprs): Likewise.
11049 (replace_array_notation): Likewise.
11050 (find_inv_trees): Likewise.
11051 (replace_inv_trees): Likewise.
11052 (find_correct_array_notation_type): Likewise.
dfeadaa0 11053
36536d79
BI
110542013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11055
11056 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11057 function array_notation_init_builtins is called.
11058 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11059 * c-common.def (ARRAY_NOTATION_REF): New tree.
11060 * c-common.h (build_array_notation_expr): New function declaration.
11061 (build_array_notation_ref): Likewise.
11062 (extract_sec_implicit_index_arg): New extern declaration.
11063 (is_sec_implicit_index_fn): Likewise.
11064 (ARRAY_NOTATION_CHECK): New define.
11065 (ARRAY_NOTATION_ARRAY): Likewise.
11066 (ARRAY_NOTATION_START): Likewise.
11067 (ARRAY_NOTATION_LENGTH): Likewise.
11068 (ARRAY_NOTATION_STRIDE): Likewise.
11069 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11070 ARRAY_NOTATION_REF.
11071 (pp_c_expression): Likewise.
11072 * c.opt (flag_enable_cilkplus): New flag.
11073 * array-notation-common.c: New file.
11074
f7716d57
JJ
110752013-05-14 Jakub Jelinek <jakub@redhat.com>
11076
11077 PR c++/57274
11078 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11079
a5e0cd1d
MG
110802013-05-10 Marc Glisse <marc.glisse@inria.fr>
11081
11082 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11083 vectors.
11084
f6bc1c4a
HS
110852013-05-07 Han Shen <shenhan@google.com>
11086
11087 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11088
3f12f6e9
SKS
110892013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11090
11091 * c-common.c (check_user_alignment): Emit error for negative values.
11092
61949153
PC
110932013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11094
11095 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11096
e93e18e9
PC
110972013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11098
11099 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11100 __GXX_EXPERIMENTAL_CXX1Y__.
11101
44d90fe1 111022013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11103 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11104
11105 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11106 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11107 to simply use OPT_Wpointer_arith.
11108 (c_sizeof_or_alignof_type): Likewise.
11109
13f39b2e
PC
111102013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11111
11112 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11113
4b84d650
JJ
111142013-04-12 Jakub Jelinek <jakub@redhat.com>
11115
11116 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11117 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11118 specifiers.
11119
fb037b5d
SB
111202013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11121
11122 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11123
4e856798
PC
111242013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11125
11126 * c-common.c (pointer_int_sum): Remove dead code.
11127
4b1baac8
RS
111282013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11129
11130 PR middle-end/56524
11131 * c-common.c (handle_optimize_attribute): Don't call
11132 save_optabs_if_changed.
11133
0b50e654
JJ
111342013-03-05 Jakub Jelinek <jakub@redhat.com>
11135
11136 PR middle-end/56461
11137 * c-pch.c (pch_init): Free target_validity at the end.
11138
48c41403
JJ
111392013-03-04 Jakub Jelinek <jakub@redhat.com>
11140
11141 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11142
e664c61c
KS
111432013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11144 Jakub Jelinek <jakub@redhat.com>
11145
11146 PR sanitizer/56454
11147 * c-common.c (handle_no_sanitize_address_attribute): New function.
11148 (c_common_attribute_table): Add no_sanitize_address attribute.
11149 (handle_no_address_safety_analysis_attribute): Add
11150 no_sanitize_address attribute, not no_address_safety_analysis
11151 attribute.
11152
a475fd3d 111532013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11154
11155 PR target/52555
11156 * c-common.c (handle_optimize_attribute): Call
11157 save_optabs_if_changed.
11158
f6007d99
JJ
111592013-02-18 Jakub Jelinek <jakub@redhat.com>
11160 Steven Bosscher <steven@gcc.gnu.org>
11161
11162 PR pch/54117
11163 * c-opts.c (c_common_post_options): If debug info is enabled
11164 and non-dwarf*, refuse to load PCH files and when writing PCH
11165 file warn.
11166
cf35e2b1
JJ
111672013-02-05 Jakub Jelinek <jakub@redhat.com>
11168
11169 PR middle-end/56167
11170 * c-common.c (handle_error_attribute): Fix condition.
11171
32887460
JJ
111722013-01-30 Jakub Jelinek <jakub@redhat.com>
11173
11174 PR c++/55742
11175 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11176
5af057d8
JM
111772013-01-18 Jason Merrill <jason@redhat.com>
11178
11179 PR target/54908
11180 * c.opt (-fextern-tls-init): New.
11181 * c-opts.c (c_common_post_options): Handle it.
11182
cc83c823
JJ
111832013-01-09 Jakub Jelinek <jakub@redhat.com>
11184
11185 PR c/48418
11186 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11187 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11188 and is either negative or bigger or equal to type precision
11189 of the first operand.
11190
a859517f
MP
111912012-12-03 Marek Polacek <polacek@redhat.com>
11192
11193 PR c/55570
11194 * c-common.c (check_user_alignment): Swap order of tests,
11195 check TREE_CODE first.
11196
2d7aa578
ESR
111972012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11198
11199 PR c++/52654
11200 * c-common.h (overflow_type): New enum.
11201 (build_userdef_literal): Add overflow_type argument.
11202 (tree_userdef_literal): Add overflow_type.
11203 (USERDEF_LITERAL_OVERFLOW): New access macro.
11204 * c-common.c (build_userdef_literal): Add overflow_type
11205 argument.
11206 * c-lex.c (c_lex_with_flags): Add overflow_type to
11207 build_userdef_literal calls.
11208 (interpret_integer, interpret_float): Add overflow_type argument.
11209
cc3c4f62
RB
112102012-11-28 Richard Biener <rguenther@suse.de>
11211
11212 PR c/35634
11213 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11214 here and use a type with proper overflow behavior for types that would
11215 need to be promoted for the arithmetic.
11216
77bc5132
JJ
112172012-11-23 Jakub Jelinek <jakub@redhat.com>
11218
11219 PR sanitizer/55435
11220 * c-common.c (handle_no_address_safety_analysis_attribute): New
11221 function.
11222 (c_common_attribute_table): Add no_address_safety_analysis.
11223
5dc99c46
SB
112242012-11-16 Simon Baldwin <simonb@google.com>
11225
11226 * c.opt: Add f[no-]canonical-system-headers.
11227 * c-opts.c (c_common_handle_option): Handle
11228 OPT_fcanonical_system_headers.
11229
a4a0016d
ESR
112302012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11231
11232 PR c++/54413
11233 * c-opts.c (c_common_handle_option): Set new flags.
11234 * c.opt: Describe new flags.
11235
7dbb85a7
JM
112362012-11-09 Jason Merrill <jason@redhat.com>
11237
11238 * c.opt (Wabi-tag): New.
11239
ad7bac31
AK
112402012-11-09 Andi Kleen <ak@linux.intel.com>
11241
11242 PR 55139
11243 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11244 MEMMODEL_MASK
ad7bac31 11245
7332899a
MLI
112462012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11247
11248 PR c/53063
11249 * c.opt (Wformat): Make it Alias Wformat=1.
11250 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11251 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11252 LangEnabledBy.
11253 (Wformat=): RejectNegative. Use LangEnabledBy.
11254 (Wnonnull): Use LangEnabledBy.
11255 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11256 * c-format.c (set_Wformat): Delete.
11257 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11258 (maybe_read_dollar_number): Likewise.
11259 (avoid_dollar_number): Likewise.
11260 (finish_dollar_format_checking): Likewise.
11261 (check_format_info): Likewise.
11262 (check_format_info_main): Likewise.
11263 (check_format_types): Likewise.
11264 (format_type_warning): Likewise.
11265 * c-common.c (int): Likewise.
11266 (check_function_sentinel): Likewise.
8e745a17 11267 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11268
34a180a6
MLI
112692012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11270
11271 PR c/53063
11272 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11273 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11274 Use LangEnabledBy.
11275 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11276 common.opt.
11277 (Wvariadic-macros): Init(1).
11278 * c-opts.c (c_common_handle_option): Do not handle them
11279 explicitly.
11280 (c_common_post_options): Likewise.
11281 (sanitize_cpp_opts): warn_unused_macros is now
11282 cpp_warn_unused_macros.
11283 (push_command_line_include): Likewise.
11284 * c-common.c (warn_unknown_pragmas): Do not define.
11285 * c-common.h (warn_unknown_pragmas): Do not declare.
11286
3f46d6a5
MLI
112872012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11288
11289 PR c/51294
11290 * c-common.c (conversion_warning): Handle conditional expressions.
11291
880661a4
JW
112922012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11293
11294 PR c++/54930
11295 * c.opt (Wreturn_local_addr): Define new option.
11296
4514a96b
JM
112972012-10-25 Jason Merrill <jason@redhat.com>
11298
f14edc1a
JM
11299 * c.opt (Wvirtual-move-assign): New.
11300
4514a96b
JM
11301 * c.opt (Winherited-variadic-ctor): New.
11302
93100c6b
MG
113032012-10-25 Marc Glisse <marc.glisse@inria.fr>
11304
11305 PR c++/54427
11306 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11307
1efcb8c6
JM
113082012-10-23 Joseph Myers <joseph@codesourcery.com>
11309
11310 * c-common.h (pch_cpp_save_state): Declare.
11311 * c-target.def (c_preinclude): New hook.
11312 * c-opts.c (done_preinclude): New.
11313 (push_command_line_include): Handle default preincluded header.
11314 (cb_file_change): Call pch_cpp_save_state when calling
11315 push_command_line_include.
11316 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11317 (pch_cpp_save_state): New.
11318 (pch_init): Call pch_cpp_save_state conditionally, instead of
11319 calling cpp_save_state.
11320
4a0ae68e
MLI
113212012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11322
11323 PR c/53063
11324 PR c/40989
11325 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11326 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11327 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11328 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11329 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11330 * c-opts.c (c_common_handle_option): Remove explicit handling from
11331 here.
11332 (c_common_post_options): Likewise.
11333
67e4210b
EB
113342012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11335
11336 * c-ada-spec.c (LOCATION_COL): Delete.
11337 (compare_location): New function.
11338 (compare_node): Use it.
11339 (compare_comment): Likewise.
11340
65d4f2cd
MLI
113412012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11342
11343 PR c/53063
11344 PR c/40989
11345 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11346 * c-opts.c (c_common_handle_option): Do not set them here. Add
11347 comment.
11348 (c_common_post_options): Likewise.
11349
909881cb
EB
113502012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11351
11352 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11353 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11354 Remove POINTER_TYPE handling, add large unsigned handling and use
11355 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11356
3a785c97
JJ
113572012-10-12 Jakub Jelinek <jakub@redhat.com>
11358
11359 PR c/54381
11360 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11361 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11362 locs and array of 3 trees instead of just single loc and single
11363 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11364 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11365 For *cmp* builtins that take two sources strings report warnings
11366 about first and second source, not about destination and source.
11367
5e54f81d
MG
113682012-10-12 Marc Glisse <marc.glisse@inria.fr>
11369
11370 PR c++/53055
11371 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11372
f5b02f1e
EB
113732012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11374
11375 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11376 declaring something coming from another file.
11377
b46dbc6c
AC
113782012-10-10 Arnaud Charlet <charlet@adacore.com>
11379
f5b02f1e 11380 PR ada/54845
b46dbc6c
AC
11381 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11382
5d9de0d0
PC
113832012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11384
11385 PR c++/54194
11386 * c-common.c (warn_about_parentheses): Add location_t parameter;
11387 use EXPR_LOC_OR_LOC.
11388 * c-common.h: Update declaration.
11389
a212e43f
MG
113902012-10-09 Marc Glisse <marc.glisse@inria.fr>
11391
11392 PR c++/54427
11393 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11394 more operations. Make error messages optional.
11395 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11396 (scalar_to_vector): Declare.
11397
b1db7f91
JM
113982012-10-08 Jason Merrill <jason@redhat.com>
11399
11400 * c-common.c (c_common_reswords): Add thread_local.
11401
e28d52cf
DS
114022012-10-08 Dodji Seketeli <dodji@redhat.com>
11403
11404 PR c++/53528 C++11 attribute support
11405 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11406 new functions.
11407 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11408 static function.
11409 (handle_aligned_attribute): In choose strictest alignment
11410 among many. Use new check_cxx_fundamental_alignment_constraints.
11411 (handle_transparent_union_attribute): In c++11 attribute syntax,
11412 don't look through typedefs.
11413
3b78de56
AC
114142012-10-04 Arnaud Charlet <charlet@adacore.com>
11415
11416 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11417 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11418 out of dumpfile.h.
11419
6040bb5f
DC
114202012-09-25 Dehao Chen <dehao@google.com>
11421
11422 PR middle-end/54645
3b78de56 11423 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11424 map when read in the pch.
11425
3f8257db 114262012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11427
11428 * c-ada-spec.c: Style fixes.
11429
3f8257db 114302012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11431
11432 * c.opt (-fada-spec-parent): Define new command line switch.
11433 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11434 is specified, generate binding spec as a child of the specified unit.
11435
0ccb505d
PC
114362012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11437 Manuel López-Ibáñez <manu@gcc.gnu.org>
11438
11439 PR c++/53210
11440 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11441
c583af79
AC
114422012-08-23 Arnaud Charlet <charlet@adacore.com>
11443
11444 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11445 for pointers, and add missing Convention C pragma.
11446 (print_ada_struct_decl): Add missing aliased keyword.
11447 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11448
1a4049e7
JJ
114492012-08-17 Jakub Jelinek <jakub@redhat.com>
11450
11451 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11452 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11453 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11454 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11455 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11456
70b5e7dc
RG
114572012-08-10 Richard Guenther <rguenther@suse.de>
11458
11459 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11460
f8923f7e
SB
114612012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11462
11463 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11464 instead of separate pp_newline and pp_flush.
11465 (print_c_tree): Likewise.
11466
e45abe1f
RH
114672012-07-26 Richard Henderson <rth@redhat.com>
11468
11469 * c-common.c (handle_hot_attribute): Allow labels.
11470 (handle_cold_attribute): Likewise.
11471
332f1d24
JJ
114722012-07-20 Jakub Jelinek <jakub@redhat.com>
11473
11474 PR c++/28656
11475 * c-common.c (check_function_nonnull): Handle multiple nonnull
11476 attributes properly.
11477
7ee2468b
SB
114782012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11479
11480 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11481 * c-ada-spec.c: Likewise.
11482 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11483
ee7b28eb
SB
114842012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11485
11486 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11487 Remove code conditional on it.
11488
6bdf3519
SB
114892012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11490
11491 * c-gimplify.c: Do not include basic-block.h.
11492 * c-common.c: Do not include linfuncs.h.
11493
532aafad
SB
114942012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11495
11496 * c-common.h: Include tree.h.
11497
8d0d1915
JM
114982012-07-02 Jason Merrill <jason@redhat.com>
11499
11500 PR c++/53524
11501 * c-common.c (get_priority): Call default_conversion.
11502
fbc873ad
UB
115032012-07-01 Uros Bizjak <ubizjak@gmail.com>
11504
11505 * c-pch.c (c_common_write_pch): Remove unused variables.
11506
d4a10d0a
SB
115072012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11508
11509 * cppspec.c: Moved from gcc/ to here.
11510
6f3a2e23
KT
115112012-06-27 Kai Tietz <ktietz@redhat.com>
11512
11513 PR preprocessor/37215
11514 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11515
8ca92d04
SB
115162012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11517
11518 * c-common.h (c_common_print_pch_checksum): Remove.
11519 * c-pch.c: Do not include output.h.
11520 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11521 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11522 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11523 (struct c_pch_header): Remove.
11524 (get_ident): Update gpch version.
11525 (pch_init): Do not print executable_checksum to asm_out_file.
11526 Do not fail if there is no asm_out_file to read back from. Set
11527 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11528 (c_common_write_pch): Verify that nothing was written to asm_out_file
11529 since pch_init was called. Do not write a c_pch_header, and do not
11530 copy from asm_out_file to the PCH.
11531 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11532 the content of asm_out_file from the PCH.
11533 (c_common_print_pch_checksum): Remove.
11534 * c-opts.c (c_common_init): Print out executable_checksum directly.
11535
70f42967
SB
115362012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11537
11538 * c-target.def (objc_declare_unresolved_class_reference,
11539 objc_declare_class_definition): Add new hooks.
11540
a8781821
SB
115412012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11542
11543 * c-lex.c: Do not include output.h.
11544 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11545 Remove uses of ASM_OUTPUT_IDENT.
11546
9e1a8dd1
RR
115472012-06-15 Marc Glisse <marc.glisse@inria.fr>
11548
11549 PR c++/51033
11550 * c-common.h (c_build_vec_perm_expr): Move decl here.
11551 * c-common.c (c_build_vec_perm_expr): Move definition
11552 here.
11553
6f07a821
SB
115542012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11555
11556 * c.opt (fconserve-space): Turn into a no-op.
11557
9faeb493 115582012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11559
11560 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11561 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11562 both the start and end of the function.
11563
a4b7d13c
SB
115642012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11565
11566 * c-common.c: Do not include output.h.
11567 * c-pragma.c: Likewise.
11568
c265f413
SA
115692012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11570
11571 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11572 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11573 (lang_decl_name): Handle namespace decls.
11574
be7a421e
SB
115752012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11576
11577 * c-ada-spec.c: Do not include output.h.
11578 * c-semantics.c: Likewise.
11579
65de6659
JM
115802012-05-29 Joseph Myers <joseph@codesourcery.com>
11581
11582 * c-common.c: Fix typo.
11583
ca5f4331
MM
115842012-05-29 Michael Matz <matz@suse.de>
11585
11586 * c-common.h (c_expand_decl): Remove prototype.
11587
4f7f7aca
MLI
115882012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11589
11590 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11591 * c-opts.c (c_common_handle_option): Remove code handling
11592 warn_missing_braces.
11593
4a792f9b
PC
115942012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11595
11596 PR c++/25137
11597 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11598 -Wmissing_braces.
11599
650dc14a
DS
116002012-05-22 Dodji Seketeli <dodji@redhat.com>
11601
11602 PR c++/53322
11603 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11604
9b095bf1
MLI
116052012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11606
11607 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11608 * c-opts.c (c_common_handle_option): Do not handle explicitly
11609 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11610
0b2c4be5
DS
116112012-05-16 Dodji Seketeli <dodji@redhat.com>
11612
11613 PR preprocessor/7263
ab20d992 11614 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11615 to cpp_classify_number. For diagnostics, use the precise location
11616 instead of the global input_location.
11617
a1bde5af
PC
116182012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11619
d02924ef 11620 PR c++/11856
a1bde5af
PC
11621 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11622
d1ede5f4
BS
116232012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11624
a1bde5af 11625 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11626
f2bc201f
MLI
116272012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11628
11629 PR 53063
11630 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11631 Wreorder): Use LangEnabledBy.
11632 * c-opts.c (c_common_handle_option): Do not enable them
11633 explicitly. Call lang-specific generated functions.
11634 (c_common_post_options): Do not set them here.
11635
95744782
MLI
116362012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11637
11638 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11639 Wmissing-field-initializers,Wmissing-parameter-type,
11640 Wold-style-declaration,Woverride-init): Use EnabledBy.
11641 * c-opts.c (c_common_post_options): Do not set here explicitly.
11642
7d5a5747
MLI
116432012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11644
11645 PR 53063
11646 * c-opts.c (c_common_handle_option): Use handle_generated_option
11647 to enable sub-options.
11648
5a3c9cf2
PC
116492012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11650
11651 PR c++/53158
11652 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11653
3ac8781c
RG
116542012-05-10 Richard Guenther <rguenther@suse.de>
11655
11656 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11657 adjust commentary about TYPE_IS_SIZETYPE types.
11658
1e537948
MLI
116592012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11660
11661 PR c++/53261
11662 * c-common.c (warn_logical_operator): Check that argument of
11663 integer_zerop is not NULL.
11664
f2c4a785
MLI
116652012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11666
11667 PR c/43772
11668 * c-common.c (warn_logical_operator): Do not warn if either side
11669 is already true or false.
11670
50f305ca
MLI
116712012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11672
11673 PR c/51712
11674 * c-common.c (expr_original_type): New.
11675 (shorten_compare): Do not warn for enumeration types.
11676
0c3641b0
MLI
116772012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11678
11679 * c.opt (fpermissive): Add Var(flag_permissive).
11680
7edaa4d2
MG
116812012-04-30 Marc Glisse <marc.glisse@inria.fr>
11682
11683 PR c++/51033
11684 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11685 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11686
b9c8da34
DS
116872012-04-30 Dodji Seketeli <dodji@redhat.com>
11688
11689 Add -Wvarargs option
ab20d992 11690 * c.opt (Wvarargs): Define new option.
b9c8da34 11691
e6c69da0
MLI
116922012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11693
11694 * c-common.c (check_function_arguments): Replace
11695 Wmissing-format-attribute with Wsuggest-attribute=format.
11696
90137d8f
MLI
116972012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11698
11699 * c.opt (Wsuggest-attribute=format): New. Alias of
11700 Wmissing-format-attribute.
11701 * c-format.c (decode_format_type): Replace
11702 Wmissing-format-attribute with Wsuggest-attribute=format.
11703 (check_function_format): Likewise.
11704
9faeb493 117052012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11706
11707 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11708 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11709 * c.opt: Add Wliteral-suffix.
11710
c1771a20
MLI
117112012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11712
11713 PR c/44774
11714 * c.opt (Wpedantic): New.
11715 (pedantic): Alias Wpedantic.
11716 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11717 (c_common_post_options): Likewise.
11718 (sanitize_cpp_opts): Likewise.
11719 * c-lex.c (interpret_float): Likewise.
11720 * c-format.c (check_format_types): Likewise.
11721 * c-common.c (pointer_int_sum): Likewise.
11722 (c_sizeof_or_alignof_type): Likewise.
11723 (c_add_case_label): Likewise.
11724 (c_do_switch_warnings): Likewise.
11725 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11726
04b391c1
JM
117272012-04-15 Jason Merrill <jason@redhat.com>
11728
11729 PR c++/52818
11730 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11731 (C_STD_NAME): Distinguish between C++98 and C++11.
11732
ac868f29
EB
117332012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11734
11735 PR target/52624
11736 * c-common.h (uint16_type_node): Rename into...
11737 (c_uint16_type_node): ...this.
11738 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11739 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11740
fd4116f4
MLI
117412012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11742
11743 * c-common.c (warn_if_unused_value): Move definition to here.
11744 * c-common.h (warn_if_unused_value): Move declaration to here.
11745
573ac65e
WB
117462012-03-23 William Bader <williambader@hotmail.com>
11747
11748 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11749
552b8185
JM
117502012-03-20 Jason Merrill <jason@redhat.com>
11751
11752 * c-common.h (enum cxx_dialect): Add cxx1y.
11753 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11754 test.
11755 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11756 * c-opts.c (c_common_post_options): Likewise.
11757 (set_std_cxx1y): New.
11758 (c_common_handle_option): Call it.
11759 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11760
04398fa8
PC
117612012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11762
11763 PR c++/14710
11764 * c.opt ([Wuseless-cast]): Add.
11765
d2a12ae7
RG
117662012-03-16 Richard Guenther <rguenther@suse.de>
11767
11768 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11769
a12bf402
MLI
117702012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11771
11772 PR c++/44783
11773 * c.opt (ftemplate-backtrace-limit) Add.
11774
5c30094f
RO
117752012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11776
11777 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11778 handling.
11779 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11780 (init_pragma): Don't register extern_prefix.
11781
21fa2faf
RG
117822012-03-12 Richard Guenther <rguenther@suse.de>
11783
11784 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11785 (builtin_type_for_size): Likewise.
11786
e3793c6f
JJ
117872012-02-13 Jakub Jelinek <jakub@redhat.com>
11788
11789 PR c++/52215
11790 * c-common.c (sync_resolve_params): Don't decide whether to convert
11791 or not based on TYPE_SIZE comparison, convert whenever arg_type
11792 is unsigned INTEGER_TYPE.
11793
93286335
PC
117942012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11795
11796 PR c/52118
11797 * c.opt ([Wunused-local-typedefs]): Fix description.
11798
7a421706
MS
117992012-01-24 Mike Stump <mikestump@comcast.net>
11800
11801 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11802 exactly.
11803
ba9b1f11
RG
118042012-01-18 Richard Guenther <rguenther@suse.de>
11805
11806 * c-opts.c (c_common_post_options): Reset LTO flags if
11807 we are about to generate a PCH.
11808
465406be
PC
118092012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11810
11811 PR c++/51777
11812 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11813 use pp_unsigned_wide_integer.
11814
aee15221
RG
118152012-01-10 Richard Guenther <rguenther@suse.de>
11816
11817 PR middle-end/51806
11818 * c-opts.c (c_common_handle_option): Move -Werror handling
11819 to language independent code.
11820
5720c0dc
RG
118212012-01-05 Richard Guenther <rguenther@suse.de>
11822
11823 PR middle-end/51764
11824 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11825 from common.opt.
11826
73ac190a
PC
118272011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11828
11829 PR c++/51316
11830 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11831 of array types with an unknown bound.
11832
48b0b196
JM
118332011-12-20 Joseph Myers <joseph@codesourcery.com>
11834
11835 * c-common.c (flag_isoc99): Update comment to refer to C11.
11836 (flag_isoc1x): Change to flag_isoc11.
11837 * c-common.h (flag_isoc99): Update comment to refer to C11.
11838 (flag_isoc1x): Change to flag_isoc11.
11839 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11840 C11.
11841 * c-opts.c (set_std_c1x): Change to set_std_c11.
11842 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11843 Call set_std_c11.
11844 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11845 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11846 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11847 standard.
11848 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11849 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11850 (std=gnu1x): Make alias of std=gnu11.
11851
d58d6eb5
JM
118522011-12-19 Jason Merrill <jason@redhat.com>
11853
11854 PR c++/51228
11855 * c-common.c (handle_transparent_union_attribute): Check the first
11856 field if the type is complete.
11857
b3908fcc
JW
118582011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11859
11860 PR libstdc++/51365
11861 * c-common.c (RID_IS_FINAL): Add.
11862 * c-common.h (RID_IS_FINAL): Add.
11863
fea3ca91
IS
118642011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11865
11866 * c.opt (fgnu-runtime): Provide full description.
11867 (fnext-runtime): Likewise.
11868 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11869
62bad7cd
AM
118702011-11-28 Andrew MacLeod <amacleod@redhat.com>
11871
11872 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11873 predefines in one place. Add LOCK_FREE predefines.
11874 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11875 new func.
11876
c466c4ff
AM
118772011-11-24 Andrew MacLeod <amacleod@redhat.com>
11878
11879 PR c/51256
9faeb493 11880 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11881 conditions
9faeb493
UB
11882 (resolve_overloaded_atomic_exchange,
11883 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11884 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11885 error_mark_node for error conditions.
9faeb493 11886
a5952633
RG
118872011-11-08 Richard Guenther <rguenther@suse.de>
11888
11889 PR middle-end/51010
ab20d992 11890 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11891
0a35513e
AH
118922011-11-07 Richard Henderson <rth@redhat.com>
11893 Aldy Hernandez <aldyh@redhat.com>
11894 Torvald Riegel <triegel@redhat.com>
11895
11896 Merged from transactional-memory.
11897
11898 * c-common.c (handle_tm_wrap_attribute,
11899 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11900 (struct c_common_reswords): Added __transaction* keywords.
11901 (struct c_common_attribute_table): Added transaction* and tm_regparm
11902 attributes.
11903 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11904 masks.
11905 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11906 find_tm_attribute): Declare.
11907
6d87092d
JM
119082011-11-07 Jason Merrill <jason@redhat.com>
11909
11910 PR c++/35688
11911 * c-common.c, c-common.h: Revert yesterday's changes.
11912
8e7860a1
JM
119132011-11-06 Jason Merrill <jason@redhat.com>
11914
11915 PR c++/35688
11916 * c-common.c (decl_has_visibility_attr): Split out from...
11917 (c_determine_visibility): ...here.
11918 * c-common.h: Declare it.
11919
d19fa6b5
JM
119202011-11-06 Joseph Myers <joseph@codesourcery.com>
11921
11922 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11923 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11924 type.
11925 (check_user_alignment): New. Split out of
11926 handle_aligned_attribute. Disallow integer constants with
11927 noninteger types. Conditionally allow zero.
11928 (handle_aligned_attribute): Use check_user_alignment.
11929 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11930
86951993
AM
119312011-11-06 Andrew MacLeod <amacleod@redhat.com>
11932 Richard Henderson <rth@redhat.com>
11933
11934 Merged from cxx-mem-model.
11935
11936 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11937 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11938 parameters that are the same type size.
11939 (get_atomic_generic_size): New. Find size of generic
11940 atomic function parameters and do typechecking.
11941 (add_atomic_size_parameter): New. Insert size into parameter list.
11942 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11943 either __atomic_exchange_n or external library call.
9faeb493 11944 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11945 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11946 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11947 __atomic_load_n or an external library call.
11948 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11949 __atomic_store_n or an external library call.
11950 (resolve_overloaded_builtin): Handle new __atomic builtins.
11951
cf9e9959
EB
119522011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11953
11954 PR c++/50608
11955 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11956 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11957 <INDIRECT_REF>: Return the argument.
11958 <ARRAY_REF>: Remove special code for negative offset.
11959 Call fold_build_pointer_plus instead of size_binop.
11960 (fold_offsetof): Remove STOP_REF argument and adjust.
11961 * c-common.h (fold_offsetof_1): Declare.
11962 (fold_offsetof): Remove STOP_REF argument.
11963
25339f10
JM
119642011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11965
11966 PR c++/50810
11967 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11968 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11969 Wnarrowing for C++0x and C++98.
11970 * c.opt ([Wnarrowing]): Update.
11971
89401152
PC
119722011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11973
11974 PR c++/44277
11975 * c.opt: Add Wzero-as-null-pointer-constant.
11976
97e3ad20
JM
119772011-10-31 Jason Merrill <jason@redhat.com>
11978
15694fdd
JM
11979 * c.opt (-fdeduce-init-list): Off by default.
11980
97e3ad20
JM
11981 PR c++/50920
11982 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11983 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11984 and -Wc++11-compat.
11985 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11986
fb9120e3
RAV
119872011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11988
11989 PR c++/30066
11990 * c.opt (fvisibility-inlines-hidden): Description change.
11991
3ce4f9e4
ESR
119922011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11993
11994 Implement C++11 user-defined literals.
11995 * c-common.c (build_userdef_literal): New.
11996 * c-common.def: New tree code.
11997 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11998 * c-lex.c (interpret_float): Add suffix parm.
11999 (c_lex_with_flags): Build literal tokens.
12000
5f53c243
PC
120012011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12002
12003 PR c++/50841
12004 Revert:
12005 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12006
12007 PR c++/50810
12008 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12009 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12010 Wnarrowing for C++0x and C++98.
12011 * c.opt ([Wnarrowing]): Update.
12012
263734e1
PC
120132011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12014
12015 PR c++/50810
12016 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12017 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12018 Wnarrowing for C++0x and C++98.
12019 * c.opt ([Wnarrowing]): Update.
12020
d2e312d7
PC
120212011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12022
12023 PR c++/45385
12024 * c-common.c (conversion_warning): Remove code looking for
12025 artificial operands.
12026
d17687f6
DS
120272011-10-18 Dodji Seketeli <dodji@redhat.com>
12028
12029 PR bootstrap/50760
12030 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12031 !NO_IMPLICIT_EXTERN_C.
d17687f6 12032
fc8396e9
PC
120332011-10-17 Michael Spertus <mike_spertus@symantec.com>
12034
12035 * c-common.c (c_common_reswords): Add __bases,
12036 __direct_bases.
12037 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12038
120392011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12040
12041 PR c++/50757
12042 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12043
847e697a
TT
120442011-10-15 Tom Tromey <tromey@redhat.com>
12045 Dodji Seketeli <dodji@redhat.com>
12046
12047 * c.opt (fdebug-cpp): New option.
12048 * c-opts.c (c_common_handle_option): Handle the option.
12049 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12050 output stream in parameter. Factorized from ...
12051 (maybe_print_line): ... this. Dump location debug information when
12052 -fdebug-cpp is in effect.
12053 (print_line_1): New static function. Takes an output stream in
12054 parameter. Factorized from ...
12055 (print_line): ... here. Dump location information when -fdebug-cpp
12056 is in effect.
12057 (scan_translation_unit): Dump location information when
12058 -fdebug-cpp is in effect.
12059
92582b75
TT
120602011-10-15 Tom Tromey <tromey@redhat.com>
12061 Dodji Seketeli <dodji@redhat.com>
12062
12063 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12064 without argument.
12065 * c-opts.c (c_common_handle_option)<case
12066 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12067 cases. Handle -ftrack-macro-expansion with and without argument.
12068
46427374
TT
120692011-10-15 Tom Tromey <tromey@redhat.com>
12070 Dodji Seketeli <dodji@redhat.com>
12071
12072 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12073 (print_line, cb_define, do_line_change): Adjust to avoid touching
12074 the internals of struct line_map. Use the public API instead.
12075 * c-pch.c (c_common_read_pch): Likewise.
12076 * c-lex.c (fe_file_change): Likewise.
12077
fc8396e9
PC
120782011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12079
12080 PR c++/17212
12081 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12082
120832011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12084
12085 PR c++/33067
12086 * c-pretty-print.c (pp_c_floating_constant): Output
12087 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12088
e79983f4
MM
120892011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12090
12091 * c-common.c (def_builtin_1): Delete old interface with two
12092 parallel arrays to hold standard builtin declarations, and replace
12093 it with a function based interface that can support creating
12094 builtins on the fly in the future. Change all uses, and poison
12095 the old names. Make sure 0 is not a legitimate builtin index.
12096 * c-omp.c (c_finish_omp_barrier): Ditto.
12097 (c_finish_omp_taskwait): Ditto.
12098 (c_finish_omp_flush): Ditto.
12099
6637388f
TG
121002011-10-11 Tristan Gingold <gingold@adacore.com>
12101
12102 * c.opt: (fallow-parameterless-variadic-functions): New.
12103
3797cb21
DS
121042011-09-08 Dodji Seketeli <dodji@redhat.com>
12105
12106 PR c++/33255 - Support -Wunused-local-typedefs warning
12107 * c-common.h (struct c_language_function::local_typedefs): New
12108 field.
9faeb493
UB
12109 (record_locally_defined_typedef, maybe_record_typedef_use)
12110 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12111 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12112 (maybe_record_typedef_use)
12113 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12114 * c.opt: Declare new -Wunused-local-typedefs flag.
12115
693ddb1b
EB
121162011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12117
12118 PR middle-end/50266
12119 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12120 computations.
12121
830c740f
RG
121222011-09-05 Richard Guenther <rguenther@suse.de>
12123
12124 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12125 of integer_minus_one_node for empty array upper bounds.
12126
892a371f
DS
121272011-08-28 Dodji Seketeli <dodji@redhat.com>
12128
12129 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12130 it's the first time it's being called on this main TU.
12131
0e3fdb48
RB
121322011-08-24 Richard Guenther <rguenther@suse.de>
12133
12134 PR c/49396
12135 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12136
121372011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12138
12139 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12140 defined in cpp_init_builtins and c_cpp_builtins.
12141
d4a83c10
JM
121422011-08-19 Joseph Myers <joseph@codesourcery.com>
12143
12144 * c-common.c (c_common_reswords): Add __builtin_complex.
12145 * c-common.h (RID_BUILTIN_COMPLEX): New.
12146
bbceee64
JM
121472011-08-18 Joseph Myers <joseph@codesourcery.com>
12148
12149 * c-common.c (c_common_reswords): Add _Noreturn.
12150 (keyword_is_function_specifier): Handle RID_NORETURN.
12151 * c-common.h (RID_NORETURN): New.
12152
3f8257db 121532011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12154
12155 * c-common.c (unsafe_conversion_p): New function. Check if it is
12156 unsafe to convert an expression to the type.
12157 (conversion_warning): Adjust, use unsafe_conversion_p.
12158 * c-common.h (unsafe_conversion_p): New function declaration.
12159
20906c66
JJ
121602011-08-02 Jakub Jelinek <jakub@redhat.com>
12161
12162 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12163 (c_finish_omp_taskyield): New prototype.
12164 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12165 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12166 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12167 or RHS1 have side-effects, evaluate those too in the right spot,
12168 if it is a decl and LHS is also a decl, error out if they
12169 aren't the same.
12170 (c_finish_omp_taskyield): New function.
12171 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12172 * c-pragma.c (omp_pragmas): Add taskyield.
12173 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12174 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12175 PRAGMA_OMP_CLAUSE_MERGEABLE.
12176
770e5a2e
DS
121772011-07-25 Dodji Seketeli <dodji@redhat.com>
12178
12179 * c-common.h (set_underlying_type): Remove parm name from
12180 declaration.
12181
1baae426
RG
121822011-07-25 Romain Geissler <romain.geissler@gmail.com>
12183
12184 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12185
fcb21722
JM
121862011-07-22 Jason Merrill <jason@redhat.com>
12187
76f86d00
JM
12188 PR c++/49793
12189 * c.opt (Wnarrowing): New.
12190
3a636414
JM
12191 PR c++/30112
12192 * c-common.h: Declare c_linkage_bindings.
12193 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12194
fcb21722
JM
12195 PR c++/49813
12196 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12197 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12198 as flag_isoc99 for 'restrict'.
12199 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12200
02614448
ILT
122012011-07-21 Ian Lance Taylor <iant@google.com>
12202
12203 PR middle-end/49705
12204 * c-common.c (c_disable_warnings): New static function.
12205 (c_enable_warnings): New static function.
12206 (c_fully_fold_internal): Change local unused_p to bool. Call
12207 c_disable_warnings and c_enable_warnings rather than change
12208 c_inhibit_evaluation_warnings.
12209
34429675
JM
122102011-07-20 Jason Merrill <jason@redhat.com>
12211
12212 PR c++/6709 (DR 743)
12213 PR c++/42603 (DR 950)
12214 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12215 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12216 (CPP_DECLTYPE): New.
12217 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12218
5d49b6a7
RG
122192011-07-19 Richard Guenther <rguenther@suse.de>
12220
12221 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12222 * c-omp.c (c_finish_omp_for): Likewise.
12223
e84a58ff
EB
122242011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12225
12226 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12227 body on the next line.
12228
329af3c7
JM
122292011-07-08 Jason Merrill <jason@redhat.com>
12230
4063e61b
JM
12231 PR c++/45437
12232 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12233
329af3c7
JM
12234 PR c++/49673
12235 * c-common.c (c_apply_type_quals_to_decl): Don't check
12236 TYPE_NEEDS_CONSTRUCTING.
12237
1a072294
RG
122382011-07-06 Richard Guenther <rguenther@suse.de>
12239
12240 * c-common.c (c_common_nodes_and_builtins):
12241 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12242
fce5dddd
RG
122432011-07-05 Richard Guenther <rguenther@suse.de>
12244
12245 * c-common.c (c_common_nodes_and_builtins): Build all common
12246 tree nodes first.
12247
45d439ac
JJ
122482011-06-27 Jakub Jelinek <jakub@redhat.com>
12249
56300785
JJ
12250 * c-common.h (c_tree_chain_next): New static inline function.
12251
45d439ac
JJ
12252 * c-common.c (check_builtin_function_arguments): Handle
12253 BUILT_IN_ASSUME_ALIGNED.
12254
e0a8ecf2
AM
122552011-06-21 Andrew MacLeod <amacleod@redhat.com>
12256
12257 * c-common.c: Add sync_ or SYNC__ to builtin names.
12258 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12259
122602011-06-20 Pierre Vittet <piervit@pvittet.com>
12261
12262 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12263 handler.
12264 (gen_pragma_handler): New union.
12265 (internal_pragma_handler): New type.
12266 (c_register_pragma_with_data)
12267 (c_register_pragma_with_expansion_and_data): New functions.
12268
12269 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12270 (c_register_pragma, c_register_pragma_with_expansion)
12271 (c_invoke_pragma_handler): Changed to work with
12272 internal_pragma_handler.
12273 (c_register_pragma_with_data)
12274 (c_register_pragma_with_expansion_and_data): New functions.
12275
677f3fa8
JM
122762011-06-14 Joseph Myers <joseph@codesourcery.com>
12277
12278 * c-common.c: Include common/common-target.h.
12279 (handle_section_attribute): Use
12280 targetm_common.have_named_sections.
12281 * c-cppbuiltin.c: Include common/common-target.h.
12282 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12283
d7fc8c14
RG
122842011-06-10 Richard Guenther <rguenther@suse.de>
12285
12286 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12287 to print a IDENTIFIER_NODE.
12288
10e48e39
RO
122892011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12290 Joseph Myers <joseph@codesourcery.com>
12291
12292 * c.opt (fbuilding-libgcc): New option.
12293 * c-cppbuiltin.c (c_cpp_builtins): Define
12294 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12295
6976ae51
JM
122962011-06-07 Jason Merrill <jason@redhat.com>
12297
3ff60975
JM
12298 * c-common.c (max_tinst_depth): Lower default to 900.
12299
6976ae51
JM
12300 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12301
009db074
RG
123022011-06-07 Richard Guenther <rguenther@suse.de>
12303
12304 * c-common.c (c_common_nodes_and_builtins): Do not set
12305 size_type_node or call set_sizetype.
12306
b4592b92
DS
123072011-06-07 Dodji Seketeli <dodji@redhat.com>
12308
12309 PR debug/49130
12310 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12311 type when using pointer comparison to compare types.
b4592b92 12312
014ab419
JW
123132011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12314
12315 * c.opt: Add -Wdelete-non-virtual-dtor.
12316 * c-opts.c (c_common_handle_option): Include it in -Wall.
12317
4f60111f
NF
123182011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12319
12320 PR bootstrap/49190
12321
12322 Revert:
12323 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12324
12325 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12326 not tree_common.
12327
4cc4f2f4
JJ
123282011-05-27 Jakub Jelinek <jakub@redhat.com>
12329
12330 PR c++/49165
12331 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12332 C++ don't call c_common_truthvalue_conversion on void type arms.
12333
38e01f9e
NF
123342011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12335
12336 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12337 (stmt_list_stack): Define.
12338 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12339 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12340
92e948a8
NF
123412011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12342
12343 * c-common.c (warning_candidate_p): Check for BLOCKs.
12344
a2fc3e63
NF
123452011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12346
12347 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12348 not tree_common.
12349
0957c029
JJ
123502011-05-25 Jakub Jelinek <jakub@redhat.com>
12351
12352 * c-common.c (def_fn_type): Remove extra va_end.
12353
828fb3ba
JM
123542011-05-23 Jason Merrill <jason@redhat.com>
12355
12356 PR c++/48106
12357 * c-common.c (c_common_get_narrower): New.
12358 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12359
dde05067
NF
123602011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12361
12362 * c-common.h (check_function_arguments): Tweak prototype of
12363 check_function_arguments.
12364 * c-common.c (check_function_arguments): Likewise. Adjust
12365 calls to check_function_nonnull, check_function_format, and
12366 check_function_sentinel.
12367 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12368 separate attributes and typelist arguments. Use
12369 FOREACH_FUNCTION_ARGS to iterate over argument types.
12370
3c0d13bf
PC
123712011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12372
12373 * c-common.c (c_common_reswords): Reorder.
12374 * c-common.h (rid): Likewise.
12375
8242dd04
NF
123762011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12377
12378 * c-common.c (def_fn_type): Don't call build_function_type, call
12379 build_function_type_array or build_varargs_function_type_array
12380 instead.
12381 (c_common_nodes_and_builtins): Likewise.
12382
3d528853
NF
123832011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12384
12385 * c-common.c (c_add_case_label): Omit the loc argument to
12386 build_case_label.
12387 * c-common.h (build_case_label): Remove.
12388 * c-semantics.c (build_case_label): Remove.
12389
a04a722b
JM
123902011-05-05 Joseph Myers <joseph@codesourcery.com>
12391
12392 * c-objc.h (objc_start_method_definition): Update prototype.
12393 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12394
e19a18d4
NF
123952011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12396
12397 * c-common.c (check_main_parameter_types): Reindent. Don't use
12398 TYPE_ARG_TYPES directly.
12399 (handle_nonnull_attribute): Likewise.
12400 (sync_resolve_params): Likewise.
12401 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12402 to check_format_string.
12403 (handle_format_attribute): Likewise.
12404 (check_format_string): Take a function type to examine instead of
12405 a type list. Use a function_arg_iterator to step through argument
12406 types.
12407
c62c040f
RG
124082011-05-04 Richard Guenther <rguenther@suse.de>
12409
12410 * c-common.c (fix_string_type): Use size_int for index type bounds.
12411 (start_fname_decls): Do not pass NULL to build_int_cst.
12412 (c_init_attributes): Likewise.
12413 * c-lex.c (c_lex_with_flags): Likewise.
12414
c12ff9d8
JM
124152011-04-27 Jason Merrill <jason@redhat.com>
12416
12417 * c-common.c (make_tree_vector_from_list): New.
12418 * c-common.h: Declare it.
12419
304dfbe3
RG
124202011-04-26 Richard Guenther <rguenther@suse.de>
12421
12422 PR preprocessor/48248
12423 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12424 for output size with -P.
12425
3c0d13bf
PC
124262011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12427
12428 * c-common.c (struct c_common_resword): Add __underlying_type.
12429 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12430
04695783
JM
124312011-04-20 Jim Meyering <meyering@redhat.com>
12432
12433 * c-format.c (init_dollar_format_checking): Remove useless
12434 if-before-free.
12435
0dc33c3c
NP
124362011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12437
12438 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12439 (objc_detect_field_duplicates): New.
0dc33c3c 12440 * stub-objc.c: Likewise.
3c0d13bf 12441
c59633d9
NP
124422011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12443
12444 * stub-objc.c (objc_declare_protocols): Renamed to
12445 objc_declare_protocol.
12446 * c-objc.h: Likewise.
3c0d13bf 12447
32dabdaf
NP
124482011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12449
12450 * stub-objc.c (objc_declare_class): Updated argument name.
12451
81f653d6
NF
124522011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12453
12454 * c-common.h (c_common_init_ts): Declare.
12455 * c-common.c (c_common_init_ts): Define.
12456
eb345401
NP
124572011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12458
12459 * c-objc.h (objc_build_message_expr): Updated prototype.
12460 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12461
a358e188
MJ
124622011-04-12 Martin Jambor <mjambor@suse.cz>
12463
12464 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12465 of cgraph_node.
12466
e6313a78
RG
124672011-04-11 Richard Guenther <rguenther@suse.de>
12468
12469 * c-common.c (complete_array_type): Build a range type of
12470 proper type.
12471
dcf0c47e
NF
124722011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12473
12474 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12475 (handle_type_generic_attribute): Likewise.
12476
1ee44b26
JM
124772011-04-07 Jason Merrill <jason@redhat.com>
12478
12479 PR c++/48450
12480 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12481 conversion from C++0x scoped enum.
12482
acce4e77
JM
124832011-04-06 Joseph Myers <joseph@codesourcery.com>
12484
12485 * c-target-def.h: New file.
12486 * c-target.def: New file.
12487 * c-target.h: New file.
12488 * c-common.c (targetcm): Don't define here.
12489 * c-common.h (default_handle_c_option): Declare.
12490 * c-format.c: Include c-target.h instead of target.h.
12491 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12492 include tm.h.
12493 (default_handle_c_option): Move from targhooks.c.
12494
e2eefb55
JJ
124952011-03-29 Jakub Jelinek <jakub@redhat.com>
12496
12497 PR preprocessor/48248
12498 * c-ppoutput.c (print): Add src_file field.
12499 (init_pp_output): Initialize it.
12500 (maybe_print_line): Don't optimize by adding up to 8 newlines
12501 if map->to_file and print.src_file are different file.
12502 (print_line): Update print.src_file.
12503
ba78087b
KT
125042011-03-25 Kai Tietz <ktietz@redhat.com>
12505
12506 * c-ada-spec.c (compare_comment): Use filename_cmp
12507 instead of strcmp for filename.
12508
0edf1bb2
JL
125092011-03-25 Jeff Law <law@redhat.com>
12510
adfac8df 12511 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12512
c7dc8804
JM
125132011-03-25 Jason Merrill <jason@redhat.com>
12514
12515 * c.opt: Add -std=c++03.
12516
d1d879b1
EB
125172011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12518
12519 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12520
3f8257db 125212011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12522
12523 PR target/12171
5050afdf
KT
12524 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12525 Display allowed attributes for function pointer types.
12526 (pp_c_attributes_display): New function to display
12527 attributes having affects_type_identity flag set to true.
12528 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12529
62d784f7
KT
12530 * c-common.c (c_common_attribute_table):
12531 Add new element.
12532 (c_common_format_attribute_table): Likewise.
12533
82d37118
JM
125342011-03-18 Jason Merrill <jason@redhat.com>
12535
49a000c3
JM
12536 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12537 * c-common.h: Don't declare it here.
12538 * c-common.c: Or define it here.
12539 * c-opts.c (c_common_handle_option): Or set it here.
12540
82d37118
JM
12541 PR c++/35315
12542 * c-common.c (handle_transparent_union_attribute): Don't
12543 make a duplicate type in C++.
12544
17bc631c
JM
125452011-03-15 Jason Merrill <jason@redhat.com>
12546
12547 * c-common.c (max_constexpr_depth): New.
12548 * c-common.h: Declare it.
12549 * c-opts.c (c_common_handle_option): Set it.
12550 * c.opt (fconstexpr-depth): New option.
12551
1b9b91a6
JM
125522011-03-11 Jason Merrill <jason@redhat.com>
12553
f231b5ff
JM
12554 * c-common.c (attribute_takes_identifier_p): Add missing const.
12555
1b9b91a6
JM
12556 PR c++/46803
12557 * c-common.c (attribute_takes_identifier_p): Assume that an
12558 unknown attribute takes an identifier.
12559
a19e4d44
NF
125602011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12561
12562 PR c/47786
12563 * c-common.c (c_type_hash): Call list_length instead of iterating
12564 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12565
982d62f6
JJ
125662011-02-19 Jakub Jelinek <jakub@redhat.com>
12567
12568 PR c/47809
12569 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12570
0a256240
NP
125712011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12572
12573 * c.opt (fobjc-abi-version=) New.
12574 (fobjc-nilcheck): New.
12575
ba9e6dd5
NF
125762011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12577
12578 PR c++/46890
12579 * c-common.h (keyword_is_decl_specifier): Declare.
12580 * c-common.c (keyword_is_decl_specifier): Define.
12581 (keyword_is_function_specifier): New function.
12582
7273813a
JJ
125832011-01-26 Jakub Jelinek <jakub@redhat.com>
12584
12585 PR c/47473
12586 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12587 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12588 REAL_TYPE.
12589
908ef79b
AC
125902011-01-26 Arnaud Charlet <charlet@adacore.com>
12591
12592 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12593
237e9384
JJ
125942011-01-26 Jakub Jelinek <jakub@redhat.com>
12595
12596 PR pch/47430
12597 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12598 after init_c_lex if pch_file is set.
12599
47ea1edf
DK
126002011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12601
d4dba752 12602 PR c++/43601
47ea1edf
DK
12603 * c.opt (-fkeep-inline-dllexport): New switch.
12604
2aa9c6ae
RG
126052011-01-12 Richard Guenther <rguenther@suse.de>
12606
12607 PR middle-end/32511
12608 * c-common.c (handle_weak_attribute): Warn instead of error
12609 on declaring an inline function weak.
12610
7bd11157
TT
126112011-01-05 Tom Tromey <tromey@redhat.com>
12612
12613 * c-common.h (lvalue_error): Update.
12614 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12615 not error.
12616
0e66e494 126172010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12618
b4f588c4
NP
12619 PR objc/47075
12620 * c-objc.h (objc_finish_message_expr): Added argument to
12621 prototype.
12622
f4da8dce
NF
126232010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12624
12625 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12626 Use prototype_p.
12627
46270f14
NP
126282010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12629
12630 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12631 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12632
4816c593
NF
126332010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12634
12635 * c-common.h (readonly_error): Declare.
12636 * c-common.c (readonly_error): Define.
12637
7a6daeb0
NF
126382010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12639
12640 * c-common.h (invalid_indirection_error): Declare.
12641 * c-common.c (invalid_indirection_error): Define.
12642
892f6119
RG
126432010-12-03 Richard Guenther <rguenther@suse.de>
12644
12645 PR c/46745
12646 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12647 (pp_c_unary_expression): Likewise.
12648 (pp_c_expression): Likewise.
12649
6c39e757
NP
126502010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12651
12652 * c-common.h (objc_finish_function): New.
12653 (objc_non_volatilized_type): Removed.
12654 (objc_type_quals_match): Removed.
12655 * stub-objc.c (objc_finish_function): New.
12656 (objc_non_volatilized_type): Removed.
12657 (objc_type_quals_match): Removed.
9faeb493 12658
7c475d11
JM
126592010-11-30 Joseph Myers <joseph@codesourcery.com>
12660
12661 * c-common.h (parse_optimize_options): Declare.
12662 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12663 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12664
71f3e391
JM
126652010-11-29 Joseph Myers <joseph@codesourcery.com>
12666
12667 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12668 GET_ENVIRONMENT.
12669 * c-pch.c (O_BINARY): Don't define here.
12670 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12671
d5fabb58
JM
126722010-11-25 Joseph Myers <joseph@codesourcery.com>
12673
12674 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12675 targetm.except_unwind_info.
12676
299404a1
JM
126772010-11-23 Joseph Myers <joseph@codesourcery.com>
12678
12679 * c-opts.c (c_common_handle_option): Pass location to
12680 set_struct_debug_option.
12681
c98cd5bf
JM
126822010-11-23 Joseph Myers <joseph@codesourcery.com>
12683
12684 * c-common.c (visibility_options): Move from ../opts.c.
12685 * c-common.h (struct visibility_flags, visibility_options):
12686 Declare here.
12687 * c-opts.c (finish_options): Rename to c_finish_options.
12688 (c_common_init): Update call to finish_options.
12689
a9546771
NP
126902010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12691
12692 PR objc/34033
12693 * c-lex.c (lex_string): Check that each string in an Objective-C
12694 string concat sequence starts with either one or zero '@', and
12695 that there are no spurious '@' signs at the end.
12696
24a57808
JM
126972010-11-20 Joseph Myers <joseph@codesourcery.com>
12698
12699 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12700 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12701 HANDLE_PRAGMA_VISIBILITY.
12702 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12703 HANDLE_PRAGMA_VISIBILITY): Don't define.
12704 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12705
a9aa2c3a
NF
127062010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12707
12708 PR c++/16189
12709 PR c++/36888
12710 PR c++/45331
12711 * c-common.h (keyword_begins_type_specifier): Declare.
12712 (keyword_is_storage_class_specifier): Declare.
12713 (keyword_is_type_qualifier): Declare.
12714 * c-common.c (keyword_begins_type_specifier): New function.
12715 (keyword_is_storage_class_specifier): New function.
12716 (keyword_is_type_qualifier): Declare.
12717
5386338c
JM
127182010-11-19 Joseph Myers <joseph@codesourcery.com>
12719
12720 PR c/46547
12721 * c-common.c (in_late_binary_op): Define.
12722 (c_common_truthvalue_conversion): Check in_late_binary_op before
12723 calling c_save_expr.
12724 * c-common.h (in_late_binary_op): Declare.
12725
69ccdddb
JM
127262010-11-19 Joseph Myers <joseph@codesourcery.com>
12727
12728 * c-opts.c (c_common_handle_option): Update calls to
12729 set_struct_debug_option.
12730
6b192a09
NP
127312010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12732
12733 * c-common.h (objc_declare_protocols): Added additional argument.
12734 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12735
fb52b50a
NF
127362010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12737
12738 PR c/33193
12739 * c-common.h (build_real_imag_expr): Declare.
12740 * c-semantics.c (build_real_imag_expr): Define.
12741
b37421c6
JM
127422010-11-17 Joseph Myers <joseph@codesourcery.com>
12743
12744 * c-opts.c (c_common_parse_file): Take no arguments.
12745 * c-common.h (c_common_parse_file): Update prototype.
12746
07078664
JJ
127472010-11-16 Jakub Jelinek <jakub@redhat.com>
12748
12749 PR c++/46401
12750 * c-common.c (warning_candidate_p): Don't track non-const calls
12751 or STRING_CSTs.
12752
c6a13190
ILT
127532010-11-15 Ian Lance Taylor <iant@google.com>
12754
12755 * c-lex.c (init_c_lex): Set macro debug callbacks if
12756 flag_dump_go_spec is set.
12757
925e8657
NP
127582010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12759
12760 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12761 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12762
bb0a9581
NF
127632010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12764
12765 PR preprocessor/45038
12766 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12767 dialects.
12768
c5fa0890
JM
127692010-11-12 Joseph Myers <joseph@codesourcery.com>
12770
12771 * c-common.h (c_family_lang_mask): Declare.
12772 * c-opts.c (c_family_lang_mask): Make extern.
12773 * c-pragma.c (handle_pragma_diagnostic): Use
12774 control_warning_option.
12775
a4d8c676
JM
127762010-11-12 Joseph Myers <joseph@codesourcery.com>
12777
12778 * c-common.c (parse_optimize_options): Update call to
12779 decode_options.
12780 * c-common.h (c_common_handle_option): Update prototype.
12781 * c-opts.c (c_common_handle_option): Take location_t parameter and
12782 pass it to other functions.
12783
f954bd2c
JM
127842010-11-11 Joseph Myers <joseph@codesourcery.com>
12785
12786 * c-opts.c (warning_as_error_callback): Remove.
12787 (c_common_initialize_diagnostics): Don't call
12788 register_warning_as_error_callback.
12789 (c_common_handle_option): Handle -Werror=normalized= here.
12790
d8a07487
JM
127912010-11-10 Joseph Myers <joseph@codesourcery.com>
12792
12793 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12794 in diagnostic.
12795 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12796 letter.
12797 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12798 Remove trailing '.' from diagnostics.
12799 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12800
d5478783
JM
128012010-11-10 Joseph Myers <joseph@codesourcery.com>
12802
12803 * c-common.c (parse_optimize_options): Pass global_dc to
12804 decode_options.
12805 * c-opts.c (c_common_handle_option): Pass &global_options to
12806 set_Wstrict_aliasing.
12807 * c.opt (v): Don't mark Common or document here.
12808
91ebb981
IS
128092010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12810
12811 PR target/44981
12812 * c-format.c (format_type): New type gcc_objc_string_format_type.
12813 (valid_stringptr_type_p): New.
12814 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12815 (check_format_string): Pass expected type, use
91ebb981
IS
12816 valid_stringptr_type_p (), check that the format string types are
12817 consistent with the format specification.
12818 (decode_format_attr): Warn if NSString is used outside objective-c.
12819 (format_types_orig): Add NSString.
12820 (format_name): New.
12821 (format_flags): New.
12822 (check_format_arg): Handle format strings requiring an external parser.
12823 first_target_format_type: New variable.
12824 (handle_format_attribute): Set up first_target_format_type, pass the
12825 expected format arg string type to check_format_string().
ab20d992 12826 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12827 * stub-objc.c (objc_string_ref_type_p): New.
12828 (objc_check_format_arg): New.
12829
bede2adc
NP
128302010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12831
9faeb493 12832 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12833 * c-common.h (objc_build_class_component_ref): New.
12834 * stub-objc.c (objc_build_class_component_ref): New.
12835
9a179d01
NP
128362010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12837
12838 * c.opt (Wproperty-assign-default): New option.
12839
22d8d616
NP
128402010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12841
12842 Implemented -fobjc-std=objc1 flag.
12843 * c.opt (fobjc-std=objc1): New option.
12844
2debdb4f
NP
128452010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12846
12847 Implemented format and noreturn attributes for Objective-C methods.
12848 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12849 attribute for Objective-C methods.
12850
ec52b111
JM
128512010-10-31 Jason Merrill <jason@redhat.com>
12852
12853 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12854 EXPR_LOC_OR_HERE.
12855
46a88c12
NP
128562010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12857
12858 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12859 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12860 (objc_add_property_declaration): Removed arguments for copies and
12861 ivar.
12862 (objc_build_getter_call): Renamed to
12863 objc_maybe_build_component_ref.
12864 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12865 (objc_is_property_ref): New.
12866 * c-common.c (c_common_reswords): Removed copies and ivar.
12867 * stub-objc.c (objc_add_property_declaration): Removed arguments
12868 for copies and ivar.
12869 (objc_build_getter_call): Renamed to
12870 objc_maybe_build_component_ref.
12871 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12872 (objc_is_property_ref): New.
9faeb493 12873
1e4bf85b
AC
128742010-10-29 Arnaud Charlet <charlet@adacore.com>
12875 Matthew Gingell <gingell@adacore.com>
12876
12877 * c-ada-spec.c (separate_class_package): New function.
12878 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12879 name of their enclosing package.
12880 (print_ada_declaration): Use separate_class_package.
12881
81f0bab2
JM
128822010-10-27 Jason Merrill <jason@redhat.com>
12883
2b08f2c5
JM
12884 * c-common.c (c_common_reswords): Add __is_literal_type.
12885 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12886
81f0bab2
JM
12887 * c-common.c (check_case_value): Remove special C++ code.
12888
200290f2
NP
128892010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12890
12891 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12892 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12893 and RID_LAST_PATTR.
12894 (objc_add_property_declaration): Added additional arguments.
12895 (objc_property_attribute_kind): Removed.
12896 (objc_set_property_attr): Removed.
12897 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12898 copy and nonatomic.
12899 * stub-objc.c (objc_add_property_declaration): Added additional
12900 arguments.
12901 (objc_set_property_attr): Removed.
9faeb493 12902
f614132b
NP
129032010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12904
12905 * c-common.h (objc_add_property_variable): Renamed to
12906 objc_add_property_declaration. Added location argument.
12907 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12908
b8a18805
NP
129092010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12910
12911 * c-common.h (objc_maybe_printable_name): New.
12912 * stub-objc.c (objc_maybe_printable_name): New.
12913
3f8257db
JJ
129142010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12915 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12916
12917 * c-common.h (c_common_mark_addressable_vec): Declare.
12918 * c-common.c (c_common_mark_addressable_vec): New function.
12919
249a82c4
NP
129202010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12921
12922 * c-common.h (objc_set_method_type): Removed.
12923 (objc_add_method_declaration): Added boolean argument.
12924 (objc_start_method_definition): Same change.
12925 (objc_build_method_signature): Same change.
12926 * stub-objc.c (objc_set_method_type): Removed.
12927 (objc_add_method_declaration): Added boolean argument.
12928 (objc_start_method_definition): Same change.
12929 (objc_build_method_signature): Same change.
12930
977e30bc
NP
129312010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12932
12933 * c-common.h (finish_file): Removed.
12934 (objc_write_global_declarations): New.
12935 * c-opts.c (c_common_parse_file): Do not call finish_file.
12936 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12937
da57d1b9
NP
129382010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12939
12940 Implemented parsing @synthesize and @dynamic for
12941 Objective-C/Objective-C++.
12942 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12943 (objc_add_synthesize_declaration): New.
12944 (objc_add_dynamic_declaration): New.
12945 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12946 * stub-objc.c (objc_add_synthesize_declaration): New.
12947 (objc_add_dynamic_declaration): New.
9faeb493 12948
0069111f
MM
129492010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12950
12951 PR target/46041
12952 * c-cppbuiltin.c (mode_has_fma): Move function here from
12953 builtins.c. Don't use the fma optab, instead just use the
12954 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12955 using -save-temps.
12956
e426b47b
NP
129572010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12958
12959 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12960
3f8257db 12961 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12962
9faeb493 12963 Radar 4330422
e426b47b
NP
12964 * c-common.h (objc_non_volatilized_type): New declaration
12965 * stub-objc.c (objc_non_volatilized_type): New stub.
12966
90fbfdc3
NP
129672010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12968
e426b47b 12969 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12970
ab20d992 12971 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12972
9faeb493 12973 Radar 4133425
90fbfdc3 12974 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12975 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12976
c37d8c30
IS
129772010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12978
12979 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12980 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12981 (objc_ivar_visibility_kind): New enum.
12982 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12983 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12984 visibility enum.
12985
1b1562a5
MM
129862010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12987
12988 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12989 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12990 has the appropriate fma builtins.
12991 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12992
668ea4b1
IS
129932010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12994
1b1562a5 12995 merge from FSF apple 'trunk' branch.
3f8257db 12996 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12997
668ea4b1
IS
12998 Radars 4436866, 4505126, 4506903, 4517826
12999 * c-common.c (c_common_resword): Define @property and its attributes.
13000 * c-common.h: Define property attribute enum entries.
13001 (OBJC_IS_PATTR_KEYWORD): New.
13002 (objc_property_attribute_kind): New enum.
13003 Declare objc_set_property_attr (), objc_add_property_variable (),
13004 objc_build_getter_call () and objc_build_setter_call ().
13005 * stub-objc.c (objc_set_property_attr): New stub.
13006 (objc_add_property_variable): Likewise.
13007 (objc_build_getter_call): Likewise.
13008 (objc_build_setter_call) Likewise.
1b1562a5 13009
a1178b30
IS
130102010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13011
1b1562a5 13012 merge from FSF apple 'trunk' branch.
ab20d992 13013 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13014
13015 Radar 3803157 (method attributes)
13016 * c-common.c (handle_deprecated_attribute): Recognize
13017 objc methods as valid declarations.
13018 * c-common.h: Declare objc_method_decl ().
1b1562a5 13019 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13020
a75bfaa6
JM
130212010-10-08 Joseph Myers <joseph@codesourcery.com>
13022
13023 * c-common.c (parse_optimize_options): Call
13024 decode_cmdline_options_to_array_default_mask before
13025 decode_options. Update arguments to decode_options.
13026 * c-common.h (c_common_init_options_struct): Declare.
13027 * c-opts.c (c_common_init_options_struct): New. Split out from
13028 c_common_init_options.
13029
f05b9d93
NP
130302010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13031
13032 Implemented fast enumeration for Objective-C.
13033 * c-common.h (objc_finish_foreach_loop): New.
13034 * stub-objc.c (objc_finish_foreach_loop): New.
13035
1ebe4b4f
JM
130362010-10-05 Joseph Myers <joseph@codesourcery.com>
13037
13038 * c-common.h (struct diagnostic_context): Don't declare here.
13039 (c_common_initialize_diagnostics): Declare using
13040 diagnostic_context typedef.
13041 * c-opts.c (c_common_handle_option): Pass global_dc to
13042 handle_generated_option.
13043
d4d24ba4
JM
130442010-10-04 Joseph Myers <joseph@codesourcery.com>
13045
13046 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13047 handle_generated_option.
13048
478a1c5b
ILT
130492010-10-03 Ian Lance Taylor <iant@google.com>
13050
13051 * c.opt (-fplan9-extensions): New option.
13052
82a1c2fe
FXC
130532010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13054
13055 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13056 Remove.
13057 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13058 of duplicating code.
13059
92902b1b
IS
130602010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13061
13062 * c-common.c: Add two new entries for @optional
13063 and @required keywords.
13064
13065 merge from FSF 'apple/trunk' branch.
3f8257db 13066 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13067
13068 Radar 4386773
13069 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13070 objective-c keywords.
13071 (objc_set_method_opt): New declaration.
13072 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13073
46625112
JM
130742010-09-30 Joseph Myers <joseph@codesourcery.com>
13075
13076 * c-common.c (handle_optimize_attribute): Pass &global_options to
13077 cl_optimization_save and cl_optimization_restore.
13078 * c-opts.c (c_common_handle_option): Pass &global_options to
13079 handle_generated_option.
13080 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13081 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13082 &global_options to cl_optimization_restore.
13083
49b91f05
NP
130842010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13085
13086 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13087 Objective-C/Objective-C++ keywords.
13088
13ed556f 130892010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13090
9faeb493
UB
13091 Merge from 'apple/trunk' branch on FSF servers.
13092
3f8257db 13093 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13094
13095 Radar 4281748
13096 * c-common.h (objc_check_global_decl): New declaration.
13097 * stub-objc.c (objc_check_global_decl): New stub.
13098
f0036cca
JM
130992010-09-29 Joseph Myers <joseph@codesourcery.com>
13100
13101 * c.opt: Don't use VarExists.
13102
e3339d0f
JM
131032010-09-29 Joseph Myers <joseph@codesourcery.com>
13104
13105 * c-common.c (c_cpp_error): Update names of diagnostic_context
13106 members.
13107 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13108 cl_optimization members.
13109 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13110 sanitize_cpp_opts, finish_options): Update names of cpp_options
13111 members.
13112
1973201f
NP
131132010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13114
13115 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13116 (objc_is_reserved_word): Removed.
13117 * c-common.c: Updated comments.
13118 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13119 objc_is_reserved_word.
13120 * stub-objc.c (objc_is_reserved_word): Removed.
13121
f7e71da5
IS
131222010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13123
9faeb493 13124 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13125 include attributes.
13126 (objc_start_method_definition): Likewise.
13127 (objc_build_keyword_decl): Likewise.
13128 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13129 (objc_start_method_definition): Likewise.
13130 (objc_build_keyword_decl): Likewise.
13131
c165dca7
IS
131322010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13133
13134 * c-common.h (objc_start_class_interface): Adjust prototype.
13135 (objc_start_category_interface): Likewise.
13136 (objc_start_protocol): Likewise.
13137 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13138 (objc_start_class_interface): Likewise.
13139 (objc_start_category_interface): Likewise.
13140
7458026b
ILT
131412010-09-27 Ian Lance Taylor <iant@google.com>
13142
13143 * c-common.c (c_common_attribute_table): Add no_split_stack.
13144 (handle_no_split_stack_attribute): New static function.
13145
b581b85b
NP
131462010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13147
9faeb493 13148 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13149
3f8257db 13150 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13151
9faeb493 13152 Radar 4229905
b581b85b
NP
13153 * c-common.h (objc_have_common_type): New declaration.
13154 * stub-objc.c (objc_have_common_type): New stub.
13155
13156 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13157
13158 Radar 4154928
13159 * c-common.h (objc_common_type): New prototype.
9faeb493 13160 * stub-objc.c (objc_common_type): New stub.
b581b85b 13161
46a4da10
JH
131622010-09-24 Jan Hubicka <jh@suse.cz>
13163
13164 * c-common.c (handle_leaf_attribute): New function.
13165 (struct attribute_spec c_common_att): Add leaf.
13166
e200444e
JM
131672010-09-22 Joseph Myers <joseph@codesourcery.com>
13168
13169 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13170 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13171 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13172 -include-barrier, -include-directory, -include-directory=,
13173 -include-directory-after, -include-directory-after=,
13174 -include-prefix, -include-prefix=, -include-with-prefix,
13175 -include-with-prefix=, -include-with-prefix-after,
13176 -include-with-prefix-after=, -include-with-prefix-before,
13177 -include-with-prefix-before=, -no-integrated-cpp,
13178 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13179 -output=, -pedantic, -pedantic-errors, -preprocess,
13180 -print-missing-file-dependencies, -trace-includes, -traditional,
13181 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13182 -user-dependencies, -verbose, -write-dependencies,
13183 -write-user-dependencies, no-integrated-cpp, traditional): New.
13184
29a80ea6
NP
131852010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13186
13187 PR objc/23710
ac1fc2fc
NP
13188 * c-common.h (objc_start_method_definition): Return bool instead
13189 of void.
13190 * stub-objc.c (objc_start_method_definition): Return bool instead
13191 of void.
13192
131932010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13194
13195 PR objc/25965
13196 * c-common.h (objc_get_interface_ivars): New declaration.
13197 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13198
de621752
ILT
131992010-09-15 Ian Lance Taylor <iant@google.com>
13200
13201 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13202 messages. Remove period at end of warning message.
de621752 13203
ba885ec5
NS
132042010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13205
13206 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13207 (handle_alias_attribute): ... here.
13208 (handle_ifunc_attribute): New.
13209
c5ee1358
MM
132102010-09-06 Mark Mitchell <mark@codesourcery.com>
13211
13212 * c-common.h (do_warn_double_promotion): Declare.
13213 * c-common.c (do_warn_double_promotion): Define.
13214
0a0b3574
MM
132152010-09-05 Mark Mitchell <mark@codesourcery.com>
13216
13217 * c.opt (Wdouble-promotion): New.
13218
d1779886
JM
132192010-09-02 Joseph Myers <joseph@codesourcery.com>
13220
13221 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13222 fvtable-thunks, fxref): Mark no longer supported in help text.
13223
2d2bd949
JM
132242010-09-02 Joseph Myers <joseph@codesourcery.com>
13225
13226 * c.opt (Wimport, fall-virtual, falt-external-templates,
13227 fdefault-inline, fenum-int-equiv, fexternal-templates,
13228 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13229 fname-mangling-version-, fnew-abi, fnonnull-objects,
13230 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13231 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13232 applicable.
13233 (fhandle-exceptions): Mark with Alias and Warn.
13234 * c-opts.c (c_common_handle_option): Don't handle options marked
13235 as ignored.
13236
5de8299c
JM
132372010-09-02 Joseph Myers <joseph@codesourcery.com>
13238
13239 * c.opt (Wcomments, Werror-implicit-function-declaration,
13240 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13241 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13242 aliases.
13243 * c-common.c (option_codes): Use OPT_Wcomment instead of
13244 OPT_Wcomments.
13245 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13246 Don't handle options marked as aliases.
13247
0ceb0201
RG
132482010-08-25 Richard Guenther <rguenther@suse.de>
13249
13250 * c-common.c (c_common_get_alias_set): Remove special
13251 handling for pointers.
13252
ac47786e
NF
132532010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13254
13255 * c-common.c: Use FOR_EACH_VEC_ELT.
13256 * c-gimplify.c: Likewise.
13257 * c-pragma.c: Likewise.
13258
c878765b
JM
132592010-08-16 Joseph Myers <joseph@codesourcery.com>
13260
13261 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13262 RejectDriver.
13263 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13264 RejectDriver.
13265 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13266 instead of OPT_MDX and OPT_MMDX.
13267
603349bf
JM
132682010-08-16 Joseph Myers <joseph@codesourcery.com>
13269
13270 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13271
644fa7ac
JM
132722010-08-12 Joseph Myers <joseph@codesourcery.com>
13273
13274 * c.opt (MD, MMD): Change to MDX and MMDX.
13275 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13276
481e1176
JM
132772010-08-11 Joseph Myers <joseph@codesourcery.com>
13278
13279 * c-opts.c (c_common_handle_option): Call handle_generated_option
13280 instead of handle_option.
13281
ac8dc9f7
NF
132822010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13283
13284 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13285 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13286
4f8c876d
NF
132872010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13288
13289 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13290 (pending_redefine_extname): Change type to a VEC.
13291 (add_to_renaming_pragma_list): Update for new type of
13292 pending_redefine_extname.
ac8dc9f7 13293 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13294
3b0c690e
AC
132952010-08-04 Arnaud Charlet <charlet@adacore.com>
13296
13297 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13298 visited.
13299 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13300 decide whether a type has already been declared/seen.
13301 Do not go to the original type.
13302 (dump_nested_types): New parameter forward.
13303 Generate forward declaration if needed and mark type as visited.
13304 (print_ada_declaration): Call dump_nested_types if not already done.
13305 Mark types as visited.
13306
1890bccc
JM
133072010-08-03 Joseph Myers <joseph@codesourcery.com>
13308
13309 * c.opt (-print-pch-checksum): Remove option.
13310 * c-opts.c (c_common_handle_option): Don't handle
13311 OPT_print_pch_checksum.
13312
5f20c657
JM
133132010-07-27 Joseph Myers <joseph@codesourcery.com>
13314
13315 * c-common.h (c_common_handle_option): Update prototype and return
13316 value type.
13317 * c-opts.c (c_common_handle_option): Update prototype and return
13318 value type. Update calls to handle_option and
13319 enable_warning_as_error.
13320
f551f80c
JJ
133212010-07-27 Jakub Jelinek <jakub@redhat.com>
13322
13323 PR c/45079
13324 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13325
61ff2bdc
JM
133262010-07-27 Joseph Myers <joseph@codesourcery.com>
13327
13328 * c-common.h (c_common_missing_argument): Remove.
13329 * c-opts.c (c_common_missing_argument): Remove.
13330 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13331 idirafter, imacros, include, isysroot, isystem, iquote): Add
13332 MissingArgError.
13333 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13334
7a9bf9a4
JM
133352010-07-27 Joseph Myers <joseph@codesourcery.com>
13336
13337 * c-common.h (c_common_option_lang_mask,
13338 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13339 New.
13340 (c_common_init_options): Update prototype.
13341 * c-opts.c (c_common_option_lang_mask): New.
13342 (c_common_initialize_diagnostics): Split out of
13343 c_common_init_options.
13344 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13345 New.
13346 (c_common_init_options): Update prototype. Use decoded options in
13347 search for -lang-asm.
13348
910ad8de
NF
133492010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13350
13351 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13352 * c-format.c: Likewise.
13353
718f9c0f
MLI
133542010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13355
13356 * c-common.h: Include diagnostic-core.h. Error if already
13357 included.
13358 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13359
4d451982
MLI
133602010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13361
adfac8df 13362 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13363 Do not include expr.h
13364 (vector_mode_valid_p): Move here.
13365
119fe915
SB
133662010-06-21 DJ Delorie <dj@redhat.com>
13367
13368 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13369 allow these pragmas anywhere.
13370
133712010-06-14 Jakub Jelinek <jakub@redhat.com>
13372
13373 PR bootstrap/44509
13374 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13375 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13376 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13377 ggc_strdup instead of xstrdup.
13378
133792010-06-10 Jakub Jelinek <jakub@redhat.com>
13380
13381 * c-cppbuiltin.c: Include cpp-id-data.h.
13382 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13383 (lazy_hex_fp_value): New function.
13384 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13385
6662d794
MLI
133862010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13387
13388 * c-gimplify.c: Do not include tree-flow.h
13389
38f8b050
JR
133902010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13391
13392 PR other/44034
13393 * c-common.c: Rename targetm member:
13394 targetm.enum_va_list -> targetm.enum_va_list_p
13395
9589f23e
AS
133962010-06-28 Anatoly Sokolov <aesok@post.ru>
13397
13398 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13399
3b06d379
SB
134002010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13401
13402 * c-cppbuiltin.c: Do not include except.h.
13403
d166d4c3
AK
134042010-06-24 Andi Kleen <ak@linux.intel.com>
13405
9faeb493
UB
13406 * c-common.c (warn_for_omitted_condop): New.
13407 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13408
70cb8be6
JM
134092010-06-21 Joseph Myers <joseph@codesourcery.com>
13410
13411 * c.opt (lang-objc): Remove.
13412 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13413
a4c97feb
JR
134142010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13415
13416 * c-opts.c: Include "tm_p.h".
13417
6e2f1956
JM
134182010-06-20 Joseph Myers <joseph@codesourcery.com>
13419
13420 * c-common.c (parse_optimize_options): Update call to
13421 decode_options.
13422
bc87224e
NF
134232010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13424
13425 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13426 new type of types_used_by_cur_var_decl.
13427
b49cf425
JR
134282010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13429
13430 PR bootstrap/44512
13431 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13432 for C++ standard compliance.
13433
59f9c2ed
JM
134342010-06-16 Jason Merrill <jason@redhat.com>
13435
13436 * c.opt: Add -Wnoexcept.
13437
33766b66
RG
134382010-06-16 Richard Guenther <rguenther@suse.de>
13439
13440 PR c/44555
13441 * c-common.c (c_common_truthvalue_conversion): Remove
13442 premature and wrong optimization concering ADDR_EXPRs.
13443
eff7e30c
AC
134442010-06-15 Arnaud Charlet <charlet@adacore.com>
13445
13446 * c-ada-spec.c (dump_sloc): Remove column info.
13447 (is_simple_enum): New function.
13448 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13449 enum types when relevant.
13450
6312e84d
MLI
134512010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13452
9faeb493 13453 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13454 location.
13455
1cb42611
JM
134562010-06-10 Joseph Myers <joseph@codesourcery.com>
13457
13458 * c-opts.c (c_common_handle_option): Don't handle
13459 OPT_fshow_column.
13460
a9429e29
LB
134612010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13462
13463 * c-pragma.c (push_alignment): Use typed GC allocation.
13464 (handle_pragma_push_options): Likewise.
13465
13466 * c-common.c (parse_optimize_options): Likewise.
13467
13468 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13469 option.
13470
5498f011
JM
134712010-06-07 Joseph Myers <joseph@codesourcery.com>
13472
13473 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13474 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13475 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13476 flag_signed_bitfields, warn_strict_null_sentinel,
13477 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13478 flag_gen_declaration, flag_no_gnu_keywords,
13479 flag_implement_inlines, flag_implicit_templates,
13480 flag_implicit_inline_templates, flag_optional_diags,
13481 flag_elide_constructors, flag_default_inline, flag_rtti,
13482 flag_conserve_space, flag_access_control, flag_check_new,
13483 flag_new_for_scope, flag_weak, flag_working_directory,
13484 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13485 flag_enforce_eh_specs, flag_threadsafe_statics,
13486 flag_pretty_templates): Remove.
13487 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13488 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13489 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13490 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13491 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13492 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13493 flag_no_gnu_keywords, flag_implement_inlines,
13494 flag_implicit_templates, flag_implicit_inline_templates,
13495 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13496 flag_rtti, flag_conserve_space, flag_access_control,
13497 flag_check_new, flag_new_for_scope, flag_weak,
13498 flag_working_directory, flag_use_cxa_atexit,
13499 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13500 flag_threadsafe_statics, flag_pretty_templates,
13501 warn_strict_null_sentinel): Remove.
13502 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13503 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13504 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13505 fimplicit-inline-templates, fimplicit-templates,
13506 flax-vector-conversions, fms-extensions, fnil-receivers,
13507 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13508 frtti, fshort-double, fshort-enums, fshort-wchar,
13509 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13510 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13511 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13512 gen-decls, undef): Use Var.
13513 (fdefault-inline, foptional-diags): Document as doing nothing.
13514 * c-opts.c (c_common_handle_option): Remove cases for options now
13515 using Var. Mark ignored options as such.
13516
39dabefd
SB
135172010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13518
9faeb493 13519 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13520 * c-common.def: Likewise.
13521 * c-common.h: Likewise.
13522 * c-cppbuiltin.c: Likewise.
13523 * c-dump.c: Likewise.
13524 * c-format.c: Likewise.
13525 * c-format.h : Likewise.
13526 * c-gimplify.c: Likewise.
13527 * c-lex.c: Likewise.
13528 * c-omp.c: Likewise.
13529 * c.opt: Likewise.
13530 * c-opts.c: Likewise.
13531 * c-pch.c: Likewise.
13532 * c-ppoutput.c: Likewise.
13533 * c-pragma.c: Likewise.
13534 * c-pragma.h: Likewise.
13535 * c-pretty-print.c: Likewise.
13536 * c-pretty-print.h: Likewise.
13537 * c-semantics.c: Likewise.
13538 * stub-objc.c: Likewise.
13539
13540 * c-common.c: Include gt-c-family-c-common.h.
13541 * c-pragma.c: Include gt-c-family-c-pragma.h.
13542\f
877e3c2a 13543Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
13544
13545Copying and distribution of this file, with or without modification,
13546are permitted in any medium without royalty provided the copyright
13547notice and this notice are preserved.