]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
1 2022-10-12 Lewis Hyatt <lhyatt@gmail.com>
2
3 PR preprocessor/60014
4 PR preprocessor/60723
5 * c-ppoutput.cc (class token_streamer): Remove member
6 line_marker_emitted to...
7 (token_streamer::stream): ...a local variable here. Set
8 print.prev_was_system_token on all code paths.
9
10 2022-10-10 Nathan Sidwell <nathan@acm.org>
11
12 * c-opts.cc (c_common_post_options): Bump abi to 18.
13
14 2022-10-10 Marek Polacek <polacek@redhat.com>
15
16 PR c++/106937
17 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
18 attributes here.
19 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
20 attributes here.
21 (pp_c_attributes): Remove.
22 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
23 get_attribute_name. Don't print a trailing space when printing the
24 [[]] form.
25 * c-pretty-print.h (pp_c_attributes): Remove.
26
27 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
28
29 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
30 (c_common_attribute_table): New item for strict_flex_array.
31 * c.opt: (fstrict-flex-arrays): New option.
32 (fstrict-flex-arrays=): New option.
33
34 2022-10-07 Martin Liska <mliska@suse.cz>
35
36 * name-hint.h: Use std::move.
37
38 2022-10-07 Jakub Jelinek <jakub@redhat.com>
39
40 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
41 only in gnu namespace or as standard attribute, treat fallthrough
42 attributes in other namespaces like any other unknown attribute.
43
44 2022-10-06 Joseph Myers <joseph@codesourcery.com>
45
46 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
47 typeof_unqual.
48 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
49 (D_EXT11): New macro. Values of subsequent macros updated.
50
51 2022-10-06 Jakub Jelinek <jakub@redhat.com>
52
53 PR c++/106654
54 * c-attribs.cc (handle_assume_attribute): New function.
55 (c_common_attribute_table): Add entry for assume attribute.
56 * c-lex.cc (c_common_has_attribute): Handle
57 __have_cpp_attribute (assume).
58
59 2022-10-04 Jakub Jelinek <jakub@redhat.com>
60
61 * c-omp.cc (c_omp_directives): Uncomment begin declare target
62 entry.
63
64 2022-10-03 Patrick Palka <ppalka@redhat.com>
65
66 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
67 RID_IS_SAME_AS.
68
69 2022-10-03 Joseph Myers <joseph@codesourcery.com>
70
71 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
72 special-case __*_EPSILON__ setting for IBM long double for C2x.
73
74 2022-09-30 Patrick Palka <ppalka@redhat.com>
75
76 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
77 C++ traits.
78 * c-common.h (enum rid): Likewise.
79
80 2022-09-29 Joseph Myers <joseph@codesourcery.com>
81
82 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
83 C.
84
85 2022-09-29 Patrick Palka <ppalka@redhat.com>
86
87 * c-common.cc (c_common_reswords): Add __remove_cv,
88 __remove_reference and __remove_cvref.
89 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
90 and RID_REMOVE_CVREF.
91
92 2022-09-27 Marek Polacek <polacek@redhat.com>
93
94 PR c++/101165
95 PR c++/106882
96 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
97
98 2022-09-27 Marek Polacek <polacek@redhat.com>
99
100 * c-format.cc (c_keywords): Drop nothrow.
101
102 2022-09-27 Jakub Jelinek <jakub@redhat.com>
103
104 PR c++/106651
105 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
106 __cpp_static_call_operator=202207L for C++23.
107
108 2022-09-27 Jakub Jelinek <jakub@redhat.com>
109
110 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
111 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
112 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
113 * c-pragma.cc (omp_pragmas): Add assumes and begin.
114 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
115 (omp_pragmas_simd): Add assume.
116 * c-common.h (c_omp_directives): Declare.
117 * c-omp.cc (omp_directives): Rename to ...
118 (c_omp_directives): ... this. No longer static. Uncomment
119 assume, assumes, begin assumes and end assumes entries.
120 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
121 to PRAGMA_OMP_END.
122 (c_omp_categorize_directive): Adjust for omp_directives to
123 c_omp_directives renaming.
124
125 2022-09-27 Jakub Jelinek <jakub@redhat.com>
126
127 PR c++/106652
128 PR c++/85518
129 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
130 _Float{32,64,128}x flags from D_CONLY to 0.
131 (shorten_binary_op): Punt if common_type returns error_mark_node.
132 (shorten_compare): Likewise.
133 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
134 and _Float{32,64,128}x builtin types if available. For C++
135 clear float128t_type_node.
136 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
137 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
138 * c-lex.cc (interpret_float): For q/Q suffixes prefer
139 float128t_type_node over float128_type_node. Allow
140 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
141 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
142 with pedwarn. Don't call excess_precision_type for C++.
143
144 2022-09-26 Marek Polacek <polacek@redhat.com>
145
146 PR c++/106656
147 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
148 for C++20.
149
150 2022-09-23 Marek Polacek <polacek@redhat.com>
151
152 PR c++/106784
153 * c-common.cc (c_common_reswords): Add __is_convertible and
154 __is_nothrow_convertible.
155 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
156 RID_IS_NOTHROW_CONVERTIBLE.
157
158 2022-09-22 David Malcolm <dmalcolm@redhat.com>
159
160 PR c/106830
161 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
162 values that don't fit in uhwi.
163
164 2022-09-15 Richard Biener <rguenther@suse.de>
165
166 * c-common.h (build_void_list_node): Remove.
167 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
168 void_list_node.
169
170 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
171
172 * c-format.cc (convert_format_name_to_system_name): Fix warning.
173
174 2022-09-07 Joseph Myers <joseph@codesourcery.com>
175
176 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
177 for alignas, alignof, bool, false, static_assert, thread_local and
178 true.
179
180 2022-09-07 Jakub Jelinek <jakub@redhat.com>
181
182 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
183 " in comments" from description.
184 (Wunicode): New option.
185
186 2022-09-06 Jakub Jelinek <jakub@redhat.com>
187
188 PR c/106836
189 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
190
191 2022-09-03 Jakub Jelinek <jakub@redhat.com>
192
193 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
194 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
195 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
196 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
197
198 2022-09-02 David Malcolm <dmalcolm@redhat.com>
199
200 PR c/90885
201 * c-common.h (check_for_xor_used_as_pow): New decl.
202 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
203 * c-warn.cc (check_for_xor_used_as_pow): New.
204 * c.opt (Wxor-used-as-pow): New.
205
206 2022-09-01 Jason Merrill <jason@redhat.com>
207
208 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
209 char8_t.
210 (braced_list_to_string): Check for char-sized elements.
211
212 2022-09-01 Jakub Jelinek <jakub@redhat.com>
213
214 PR c++/106655
215 * c.opt (-Winvalid-utf8): New warning.
216 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
217 Set cpp_opts->cpp_input_charset_explicit.
218 (c_common_post_options): If -finput-charset=UTF-8 is explicit
219 in C++23, enable -Winvalid-utf8 by default and if -pedantic
220 or -pedantic-errors, make it a pedwarn.
221
222 2022-08-31 Joseph Myers <joseph@codesourcery.com>
223
224 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
225 for LABEL_DECL.
226 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
227 decl_attributes.
228 * c-common.h (do_case, c_add_case_label): Update declarations.
229 * c-lex.cc (c_common_has_attribute): For C, produce a result of
230 201910 for fallthrough and 202106 for maybe_unused.
231
232 2022-08-26 Marek Polacek <polacek@redhat.com>
233
234 PR c++/81159
235 * c.opt (Wself-move): New option.
236
237 2022-08-26 Jakub Jelinek <jakub@redhat.com>
238
239 * c-common.cc (check_builtin_function_arguments): Handle
240 BUILT_IN_ISSIGNALING.
241
242 2022-08-26 Jakub Jelinek <jakub@redhat.com>
243
244 PR c++/106648
245 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
246 __cpp_named_character_escapes to 202207L.
247
248 2022-08-25 Marek Polacek <polacek@redhat.com>
249
250 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
251 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
252 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
253 (struct c_common_resword): Resize the disable member.
254 (D_C2X): Add.
255 (nullptr_node): Define.
256 (nullptr_type_node): Define.
257 (NULLPTR_TYPE_P): Define.
258 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
259 NULLPTR_TYPE.
260 (c_pretty_printer::direct_abstract_declarator): Likewise.
261 (c_pretty_printer::constant): Likewise.
262
263 2022-08-16 Tom Honermann <tom@honermann.net>
264
265 PR c++/106423
266 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
267 diagnostics in C++20 and later.
268 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
269
270 2022-08-11 Marek Polacek <polacek@redhat.com>
271
272 PR middle-end/102633
273 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
274 suppress_warning here.
275
276 2022-08-08 Tom Honermann <tom@honermann.net>
277
278 PR preprocessor/106426
279 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
280 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
281
282 2022-08-08 Tom Honermann <tom@honermann.net>
283
284 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
285 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
286 enabled.
287 * c-opts.cc (c_common_post_options): Set flag_char8_t if
288 targeting C2x.
289
290 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
291
292 PR c++/66290
293 * c-common.h: Rename global done_lexing to
294 override_libcpp_locations.
295 * c-common.cc (c_cpp_diagnostic): Likewise.
296 * c-opts.cc (c_common_finish): Set override_libcpp_locations
297 (formerly done_lexing) immediately prior to calling cpp_finish ().
298
299 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
300
301 * c-ppoutput.cc (token_streamer::stream): Update input_location
302 prior to streaming each token.
303
304 2022-07-23 Immad Mir <mirimmad@outlook.com>
305
306 * c-attribs.cc: (c_common_attribute_table): add three new attributes
307 namely: fd_arg, fd_arg_read and fd_arg_write.
308 (handle_fd_arg_attribute): New.
309
310 2022-07-15 Marek Polacek <polacek@redhat.com>
311
312 PR c++/104477
313 * c-common.cc (c_common_reswords): Add
314 __reference_constructs_from_temporary and
315 __reference_converts_from_temporary.
316 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
317 RID_REF_CONVERTS_FROM_TEMPORARY.
318
319 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
320
321 * c-format.cc (class range_label_for_format_type_mismatch):
322 Adjust to new label_text API.
323
324 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
325
326 PR preprocessor/106252
327 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
328 option argument prior to verifying the option was found.
329
330 2022-07-07 David Malcolm <dmalcolm@redhat.com>
331
332 * c-format.cc (range_label_for_format_type_mismatch::get_text):
333 Update for removal of label_text::maybe_free in favor of automatic
334 memory management.
335
336 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
337
338 PR preprocessor/53920
339 PR c++/53431
340 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
341 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
342 (c_pp_stream_token): Declare.
343 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
344 pragmas to...
345 (should_output_pragmas): ...here. New function.
346 (token_streamer::stream): Support handling early pragmas.
347 (do_line_change): Likewise.
348 (c_pp_stream_token): New function.
349 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
350 (pragma_diagnostic_lex_normal): New function. Moved logic for
351 interpreting GCC diagnostic pragmas here.
352 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
353 directly from libcpp.
354 (handle_pragma_diagnostic): Refactor into helper function...
355 (handle_pragma_diagnostic_impl): ...here. New function.
356 (handle_pragma_diagnostic_early): New function.
357 (handle_pragma_diagnostic_early_pp): New function.
358 (struct pragma_ns_name): Renamed to...
359 (struct pragma_pp_data): ...this. Add new "early_handler" member.
360 (c_register_pragma_1): Support early pragmas in the preprocessor.
361 (c_register_pragma_with_early_handler): New function.
362 (c_register_pragma): Support the new early handlers in struct
363 internal_pragma_handler.
364 (c_register_pragma_with_data): Likewise.
365 (c_register_pragma_with_expansion): Likewise.
366 (c_register_pragma_with_expansion_and_data): Likewise.
367 (c_invoke_early_pragma_handler): New function.
368 (c_pp_invoke_early_pragma_handler): New function.
369 (init_pragma): Add early pragma support for diagnostic pragmas.
370 * c-pragma.h (struct internal_pragma_handler): Add new early handler
371 members.
372 (c_register_pragma_with_early_handler): Declare.
373 (c_invoke_early_pragma_handler): Declare.
374 (c_pp_invoke_early_pragma_handler): Declare.
375
376 2022-07-05 Marek Polacek <polacek@redhat.com>
377
378 PR c++/105626
379 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
380 u8 strings.
381
382 2022-07-01 Marek Polacek <polacek@redhat.com>
383
384 PR c++/106111
385 * c-common.h (enum rid): Update RID_LAST_CXX20.
386
387 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
388
389 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
390 names.
391
392 2022-06-24 Jason Merrill <jason@redhat.com>
393
394 PR c++/87729
395 PR c++/20423
396 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
397
398 2022-06-18 Jakub Jelinek <jakub@redhat.com>
399
400 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
401 Use flag_sanitize_trap & SANITIZE_??? instead of
402 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
403 and flag_sanitize_trap differs for them, emit __builtin_trap only
404 for the comparison where trap is requested.
405 (ubsan_instrument_vla, ubsan_instrument_return): Use
406 lag_sanitize_trap & SANITIZE_??? instead of
407 flag_sanitize_undefined_trap_on_error.
408
409 2022-06-13 Jason Merrill <jason@redhat.com>
410
411 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
412
413 2022-05-27 Marek Polacek <polacek@redhat.com>
414
415 PR c/90658
416 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
417
418 2022-05-27 Jakub Jelinek <jakub@redhat.com>
419
420 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
421
422 2022-05-20 David Malcolm <dmalcolm@redhat.com>
423
424 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
425 and "override".
426 * c-pretty-print.h: Likewise.
427
428 2022-05-18 Marek Polacek <polacek@redhat.com>
429
430 PR c/105131
431 * c.opt (Wenum-int-mismatch): New.
432
433 2022-05-18 Marek Polacek <polacek@redhat.com>
434
435 PR c++/105497
436 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
437 enumerator when it was marked with attribute unused.
438
439 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
440
441 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
442 floating-point complex types.
443 <POINTER_TYPE>: Do not use limited_with clause if the designated
444 type is a scalar type.
445
446 2022-05-17 Jakub Jelinek <jakub@redhat.com>
447
448 * c-omp.cc (c_finish_omp_depobj): Handle
449 OMP_CLAUSE_DEPEND_INOUTSET.
450
451 2022-05-16 Jason Merrill <jason@redhat.com>
452
453 PR c/105492
454 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
455 here.
456
457 2022-05-16 Martin Liska <mliska@suse.cz>
458
459 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
460 (c_common_nodes_and_builtins): Likewise.
461 * c-format.cc (check_tokens): Likewise.
462 (check_plain): Likewise.
463 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
464 (init_pragma): Likewise.
465 * known-headers.cc (get_string_macro_hint): Likewise.
466 (get_stdlib_header_for_name): Likewise.
467 * c-attribs.cc: Likewise.
468
469 2022-05-13 Richard Biener <rguenther@suse.de>
470
471 * c-omp.cc: Remove gimple-fold.h include.
472
473 2022-05-12 Jakub Jelinek <jakub@redhat.com>
474
475 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
476 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
477 if null_pointer_node.
478
479 2022-05-11 Martin Liska <mliska@suse.cz>
480
481 PR target/105355
482 * c-opts.cc (c_common_handle_option): Change option name.
483 * c.opt: Remove Joined and use Separate option.
484
485 2022-05-09 Alex Coplan <alex.coplan@arm.com>
486
487 * c-common.h (get_dump_info): Delete.
488 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
489 from the global dump_manager instead of the (now obsolete)
490 get_dump_info.
491 * c-opts.cc (original_dump_file): Delete.
492 (original_dump_flags): Delete.
493 (c_common_parse_file): Switch to using global dump_manager to
494 manage the original dump file; fix leak of dump file.
495 (get_dump_info): Delete.
496
497 2022-05-07 Marek Polacek <polacek@redhat.com>
498
499 PR c++/101833
500 PR c++/47634
501 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
502 with FN being either a function declaration or function type. Use
503 maybe_adjust_arg_pos_for_attribute.
504 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
505 check_function_format.
506 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
507 (positional_argument): Adjust.
508 * c-format.cc (get_constant): Rename to ...
509 (validate_constant): ... this. Take EXPR by reference. Return bool
510 instead of tree.
511 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
512 return value of validate_constant.
513 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
514 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
515 (check_function_format): Adjust a parameter name.
516 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
517
518 2022-05-04 Marek Polacek <polacek@redhat.com>
519
520 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
521 char to int.
522
523 2022-04-30 Jason Merrill <jason@redhat.com>
524
525 PR c/100545
526 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
527 and typedef.
528 * c-common.cc (set_underlying_type): Add assert.
529
530 2022-04-26 Patrick Palka <ppalka@redhat.com>
531
532 PR c++/105304
533 * c-common.cc (verify_tree) [restart]: Move up to before the
534 NULL test.
535
536 2022-04-11 Jakub Jelinek <jakub@redhat.com>
537
538 PR c++/105186
539 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
540 and __int%d__ builtin types, initialize corresponding ridpointers
541 entry.
542
543 2022-03-30 Marek Polacek <polacek@redhat.com>
544
545 PR c++/101030
546 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
547 conversion_warning when OP1 is null.
548
549 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
550
551 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
552 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
553 option properties.
554
555 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
556
557 * c.opt (Wuse-after-free): Remove.
558
559 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
560
561 * c.opt (Warray-bounds): Remove.
562
563 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
564
565 * c.opt: Properly quote comment.
566
567 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
568
569 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
570 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
571 the referenced type instead. Deal with the anonymous original type
572 of a typedef'ed type. In the actual access case, follow the chain
573 of external subtypes.
574 <TYPE_DECL>: Tidy up control flow.
575
576 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
577
578 * c-ada-spec.cc: Change array length
579
580 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
581
582 * c-common.cc (c_family_tests): Call the new tests.
583 * c-common.h (c_diagnostic_tests): Declare.
584 (c_opt_problem_cc_tests): Likewise.
585
586 2022-03-19 Jakub Jelinek <jakub@redhat.com>
587
588 PR c++/101515
589 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
590 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
591 be printed.
592
593 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
594 Roger Sayle <roger@nextmovesoftware.com>
595
596 PR c/98198
597 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
598
599 2022-03-16 Patrick Palka <ppalka@redhat.com>
600
601 PR c++/96780
602 * c.opt: Add -ffold-simple-inlines.
603
604 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
605
606 * c-target.def (check_string_object_format_arg): Fix description typo.
607
608 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
609
610 PR other/65095
611 * c-common.h (c_omp_map_clause_name): Remove.
612 * c-omp.cc (c_omp_map_clause_name): Remove.
613
614 2022-03-09 Jakub Jelinek <jakub@redhat.com>
615
616 PR c/104711
617 * c-opts.cc (c_common_post_options): Don't enable
618 -Wshift-negative-value from -Wextra for C++20 or later.
619 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
620 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
621 instead of TYPE_UNSIGNED.
622
623 2022-03-07 Jakub Jelinek <jakub@redhat.com>
624
625 * c-attribs.cc: Fix up duplicated word issue in a comment.
626
627 2022-03-01 Martin Liska <mliska@suse.cz>
628
629 PR ipa/104533
630 * c-attribs.cc (handle_target_clones_attribute): Use
631 get_target_clone_attr_len and report warning soon.
632
633 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
634
635 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
636 (handle_pragma_weak): Likewise.
637 (handle_pragma_scalar_storage_order): Likewise.
638 (handle_pragma_redefine_extname): Likewise.
639 (handle_pragma_visibility): Likewise.
640 (handle_pragma_diagnostic): Likewise.
641 (handle_pragma_target): Likewise.
642 (handle_pragma_optimize): Likewise.
643 (handle_pragma_push_options): Likewise.
644 (handle_pragma_pop_options): Likewise.
645 (handle_pragma_reset_options): Likewise.
646 (handle_pragma_message): Likewise.
647 (handle_pragma_float_const_decimal64): Likewise.
648
649 2022-02-16 Jakub Jelinek <jakub@redhat.com>
650
651 PR c/104531
652 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
653 build_binary_op with LT_EXPR and only if that doesn't return
654 error_mark_node call build_modify_expr.
655
656 2022-02-16 Jakub Jelinek <jakub@redhat.com>
657
658 PR c/104510
659 * c-common.cc (shorten_compare): Convert original arguments to
660 the original *restype_ptr when mixing binary and decimal float.
661
662 2022-02-14 Richard Biener <rguenther@suse.de>
663
664 PR c/104505
665 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
666 internal function calls.
667
668 2022-02-11 Richard Biener <rguenther@suse.de>
669
670 * c-attribs.cc (c_common_attribute_table): Add entry for
671 vector_mask.
672 (handle_vector_mask_attribute): New.
673
674 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
675
676 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
677 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
678 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
679
680 2022-02-09 Jason Merrill <jason@redhat.com>
681
682 * c-cppbuiltin.cc (c_cpp_builtins): Update values
683 of __cpp_constexpr and __cpp_concepts for C++20.
684
685 2022-01-24 Marek Polacek <polacek@redhat.com>
686
687 PR preprocessor/104030
688 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
689
690 2022-01-21 Jakub Jelinek <jakub@redhat.com>
691
692 PR c++/104148
693 * c-common.h (check_function_arguments_recurse): Add for_format
694 arg.
695 * c-common.cc (check_function_nonnull): Pass false to
696 check_function_arguments_recurse's last argument.
697 (check_function_arguments_recurse): Add for_format argument,
698 if true, don't stop on warning_suppressed_p.
699 * c-format.cc (check_format_info): Pass true to
700 check_function_arguments_recurse's last argument.
701
702 2022-01-19 David Malcolm <dmalcolm@redhat.com>
703
704 * c-common.cc (c_common_c_tests): Rename to...
705 (c_common_cc_tests): ...this.
706 (c_family_tests): Update calls for .c to .cc renaming.
707 * c-common.h (c_format_c_tests): Rename to...
708 (c_format_cc_tests): ...this.
709 (c_indentation_c_tests): Rename to...
710 (c_indentation_cc_tests): ...this.
711 (c_pretty_print_c_tests): Rename to...
712 (c_pretty_print_cc_tests): ...this.
713 * c-format.cc (c_format_c_tests): Rename to...
714 (c_format_cc_tests): ...this.
715 * c-indentation.cc (c_indentation_c_tests): Rename to...
716 (c_indentation_cc_tests): ...this.
717 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
718 (c_pretty_print_cc_tests): ...this.
719
720 2022-01-17 Martin Liska <mliska@suse.cz>
721
722 * c-ada-spec.cc: Rename .c names to .cc.
723 * c-ada-spec.h: Likewise.
724 * c-common.cc (c_build_vec_convert): Likewise.
725 (warning_candidate_p): Likewise.
726 * c-common.h (enum rid): Likewise.
727 (build_real_imag_expr): Likewise.
728 (finish_label_address_expr): Likewise.
729 (c_get_substring_location): Likewise.
730 (c_build_bind_expr): Likewise.
731 (conflict_marker_get_final_tok_kind): Likewise.
732 (c_parse_error): Likewise.
733 (check_missing_format_attribute): Likewise.
734 (invalid_array_size_error): Likewise.
735 (warn_for_multistatement_macros): Likewise.
736 (build_attr_access_from_parms): Likewise.
737 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
738 * c-format.cc: Likewise.
739 * c-gimplify.cc (c_gimplify_expr): Likewise.
740 * c-indentation.h: Likewise.
741 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
742 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
743 * c-opts.cc (c_common_post_options): Likewise.
744 (set_std_cxx23): Likewise.
745 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
746 * c-pretty-print.h: Likewise.
747
748 2022-01-17 Martin Liska <mliska@suse.cz>
749
750 * c-ada-spec.c: Moved to...
751 * c-ada-spec.cc: ...here.
752 * c-attribs.c: Moved to...
753 * c-attribs.cc: ...here.
754 * c-common.c: Moved to...
755 * c-common.cc: ...here.
756 * c-cppbuiltin.c: Moved to...
757 * c-cppbuiltin.cc: ...here.
758 * c-dump.c: Moved to...
759 * c-dump.cc: ...here.
760 * c-format.c: Moved to...
761 * c-format.cc: ...here.
762 * c-gimplify.c: Moved to...
763 * c-gimplify.cc: ...here.
764 * c-indentation.c: Moved to...
765 * c-indentation.cc: ...here.
766 * c-lex.c: Moved to...
767 * c-lex.cc: ...here.
768 * c-omp.c: Moved to...
769 * c-omp.cc: ...here.
770 * c-opts.c: Moved to...
771 * c-opts.cc: ...here.
772 * c-pch.c: Moved to...
773 * c-pch.cc: ...here.
774 * c-ppoutput.c: Moved to...
775 * c-ppoutput.cc: ...here.
776 * c-pragma.c: Moved to...
777 * c-pragma.cc: ...here.
778 * c-pretty-print.c: Moved to...
779 * c-pretty-print.cc: ...here.
780 * c-semantics.c: Moved to...
781 * c-semantics.cc: ...here.
782 * c-ubsan.c: Moved to...
783 * c-ubsan.cc: ...here.
784 * c-warn.c: Moved to...
785 * c-warn.cc: ...here.
786 * cppspec.c: Moved to...
787 * cppspec.cc: ...here.
788 * stub-objc.c: Moved to...
789 * stub-objc.cc: ...here.
790
791 2022-01-15 Martin Sebor <msebor@redhat.com>
792
793 PR c/63272
794 * c.opt (-Wdangling-pointer): New option.
795
796 2022-01-15 Martin Sebor <msebor@redhat.com>
797
798 PR tree-optimization/80532
799 * c.opt (-Wuse-after-free): New options.
800
801 2022-01-14 David Malcolm <dmalcolm@redhat.com>
802
803 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
804 (handle_tainted_args_attribute): New.
805
806 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
807 Jason Merrill <jason@redhat.com>
808
809 PR c++/70417
810 * c.opt: Added -Wmissing-template-keyword.
811
812 2022-01-13 Richard Biener <rguenther@suse.de>
813
814 PR c/104002
815 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
816
817 2022-01-12 Martin Liska <mliska@suse.cz>
818
819 PR target/103804
820 * c-attribs.c (handle_optimize_attribute): Do not call
821 cl_optimization_compare if we seen an error.
822
823 2022-01-11 Jakub Jelinek <jakub@redhat.com>
824
825 PR c/101537
826 PR c/103881
827 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
828 and BIT_XOR_EXPR.
829
830 2022-01-10 Richard Biener <rguenther@suse.de>
831
832 PR middle-end/101530
833 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
834 in a TARGET_EXPR to force a temporary.
835
836 2022-01-06 Marek Polacek <polacek@redhat.com>
837
838 PR c++/103758
839 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
840 diagnostic messages.
841 (handle_pragma_diagnostic): Likewise.
842
843 2022-01-03 Marek Polacek <polacek@redhat.com>
844
845 PR c++/103758
846 * c-format.c (check_tokens): Accept "decl-specifier*".
847
848 2022-01-03 Jakub Jelinek <jakub@redhat.com>
849
850 PR c++/103600
851 * c-attribs.c (handle_non_overlapping_attribute): New function.
852 (c_common_attribute_table): Add "non overlapping" attribute.
853
854 2021-12-30 Jakub Jelinek <jakub@redhat.com>
855
856 PR c++/103012
857 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
858 cpp_define_unused/cpp_undef calls with forced token locations
859 BUILTINS_LOCATION.
860
861 2021-12-27 Patrick Palka <ppalka@redhat.com>
862
863 PR c++/103700
864 * c-common.c (pointer_int_sum): When quiet, return
865 error_mark_node for an incomplete pointed-to type and don't
866 call size_in_bytes_loc.
867
868 2021-12-17 Jason Merrill <jason@redhat.com>
869
870 PR c++/103681
871 * c-opts.c (c_common_post_options): Update defaults.
872
873 2021-12-16 Martin Liska <mliska@suse.cz>
874
875 PR target/103709
876 * c-pragma.c (handle_pragma_pop_options): Do not check
877 global options modification when an error is seen in parsing
878 of options (pragmas or attributes).
879
880 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
881
882 * known-headers.cc: Define INCLUDE_MEMORY instead of
883 INCLUDE_UNIQUE_PTR.
884 * name-hint.h: Likewise.
885 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
886
887 2021-12-09 Jakub Jelinek <jakub@redhat.com>
888
889 PR pch/71934
890 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
891 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
892
893 2021-12-03 Jakub Jelinek <jakub@redhat.com>
894
895 PR pch/71934
896 * c-pch.c (struct c_pch_validity): Remove pch_init member.
897 (pch_init): Don't initialize v.pch_init.
898 (c_common_valid_pch): Don't warn and punt if .text addresses change.
899
900 2021-12-01 Jason Merrill <jason@redhat.com>
901
902 PR c++/103310
903 * c.opt: Add -fconstexpr-fp-except.
904
905 2021-11-29 Richard Biener <rguenther@suse.de>
906
907 * c-format.c (check_format_string): Remove spurious
908 gcc_unreachable.
909
910 2021-11-29 Richard Biener <rguenther@suse.de>
911
912 * c-opts.c (c_common_post_options): Remove unreachable return.
913 * c-pragma.c (handle_pragma_target): Likewise.
914 (handle_pragma_optimize): Likewise.
915
916 2021-11-25 Jakub Jelinek <jakub@redhat.com>
917
918 PR c++/102611
919 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
920 default for C++23 regardless of warn_deprecated.
921 * c-cppbuiltin.c (c_cpp_builtins): Predefine
922 __cpp_multidimensional_subscript=202110L for C++23.
923
924 2021-11-23 Martin Sebor <msebor@redhat.com>
925
926 PR middle-end/88232
927 * c.opt: Add -Winfinite-recursion.
928
929 2021-11-19 Martin Sebor <msebor@redhat.com>
930
931 PR c++/33925
932 PR c/102867
933 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
934 and improve handling tof defined symbols.
935
936 2021-11-19 Martin Liska <mliska@suse.cz>
937
938 Revert:
939 2021-11-18 Martin Liska <mliska@suse.cz>
940
941 * c-gimplify.c (genericize_c_loop): Use option directly.
942
943 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
944
945 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
946 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
947
948 2021-11-18 Martin Liska <mliska@suse.cz>
949
950 * c-gimplify.c (genericize_c_loop): Use option directly.
951
952 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
953
954 PR c/91038
955 PR c/29970
956 * c-common.c (pointer_int_sum): Make sure pointer expressions
957 are evaluated first when the size expression depends on for
958 variably-modified types.
959
960 2021-11-17 Marek Polacek <polacek@redhat.com>
961
962 PR preprocessor/103026
963 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
964
965 2021-11-16 Jason Merrill <jason@redhat.com>
966
967 * c-common.c (release_tree_vector): Only cache vecs smaller than
968 16 elements.
969
970 2021-11-15 Jason Merrill <jason@redhat.com>
971
972 * c.opt: Add -fimplicit-constexpr.
973 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
974 * c-opts.c (c_common_post_options): Disable below C++14.
975
976 2021-11-15 Jakub Jelinek <jakub@redhat.com>
977
978 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
979 Duplicate to both OMP_TARGET and OMP_TEAMS.
980
981 2021-11-10 Marek Polacek <polacek@redhat.com>
982
983 PR c++/101940
984 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
985 ignored_attributes.
986
987 2021-11-09 David Malcolm <dmalcolm@redhat.com>
988
989 * c-pragma.c (GCC_BAD_AT): New macro.
990 (GCC_BAD2_AT): New macro.
991 (handle_pragma_pack): Use the location of the pertinent token when
992 issuing diagnostics about invalid constants/actions, and trailing
993 junk.
994 (handle_pragma_target): Likewise for non-string "GCC option".
995 (handle_pragma_message): Likewise for trailing junk.
996
997 2021-11-03 Joseph Myers <joseph@codesourcery.com>
998
999 PR c/103031
1000 * c-common.c (convert_and_check): Add argument init_const. Call
1001 convert_init if init_const.
1002 * c-common.h (convert_and_check): Update prototype.
1003 (convert_init): New prototype.
1004
1005 2021-11-01 David Malcolm <dmalcolm@redhat.com>
1006
1007 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1008 CPP_OTHER tokens, set the "escape on output" flag.
1009
1010 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1011
1012 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1013 POINTER_PLUS_EXPR.
1014 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1015 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1016
1017 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1018
1019 PR c++/102854
1020 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1021 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1022 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1023 conversions temporarily clear the 3rd bit from d->kind while walking
1024 subtrees.
1025 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1026 if possibly non-rectangular.
1027
1028 2021-10-21 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR middle-end/64888
1031 * c-omp.c (c_omp_predefined_variable): Return true also for
1032 ubsan_create_data created artificial variables.
1033
1034 2021-10-14 Joseph Myers <joseph@codesourcery.com>
1035
1036 * c-format.c (printf_length_specs, scanf_length_specs)
1037 (print_char_table, scan_char_table): Support DFP formats for C2X.
1038 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1039 (T2X_D32, T2X_D64, T2X_D128): New macros.
1040
1041 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1042
1043 * c-omp.c (c_omp_check_context_selector): Rename to
1044 omp_check_context_selector and move to omp-general.c.
1045 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1046 move to omp-general.c.
1047
1048 2021-10-12 Joseph Myers <joseph@codesourcery.com>
1049
1050 * c-format.c (print_char_table): Add %b and %B formats.
1051 (scan_char_table): Add %b format.
1052 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1053 (T2X_UPD, T2X_UIM): New macros.
1054
1055 2021-10-12 Jakub Jelinek <jakub@redhat.com>
1056
1057 * c-omp.c (c_finish_omp_atomic): Use
1058 clear_padding_type_may_have_padding_p.
1059
1060 2021-10-08 Martin Liska <mliska@suse.cz>
1061
1062 * c-opts.c (c_common_post_options): Use new macro
1063 OPTION_SET_P.
1064
1065 2021-10-07 Martin Liska <mliska@suse.cz>
1066
1067 * c-common.c (parse_optimize_options): Make
1068 save_opt_decoded_options a pointer type.
1069
1070 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1071
1072 PR tree-optimization/102571
1073 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1074 padding, but the non-padding bits are contiguous set of bytes
1075 by adjusting the memcmp call arguments instead of emitting
1076 __builtin_clear_padding and then comparing all the type's bytes.
1077
1078 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1079
1080 PR c++/102612
1081 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1082 __cpp_constexpr to 202110L rather than 201907L.
1083
1084 2021-10-04 Marek Polacek <polacek@redhat.com>
1085
1086 PR c++/97573
1087 * c-common.h (do_warn_array_compare): Declare.
1088 * c-warn.c (do_warn_array_compare): New.
1089 * c.opt (Warray-compare): New option.
1090
1091 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1092
1093 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1094 NULL, this is not needed.
1095
1096 2021-10-01 Martin Sebor <msebor@redhat.com>
1097
1098 PR c/102103
1099 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1100 Check and perform warning suppression.
1101 (c_common_truthvalue_conversion): Enhance warning suppression.
1102
1103 2021-10-01 Martin Liska <mliska@suse.cz>
1104
1105 PR target/102552
1106 * c-common.c (parse_optimize_options): decoded_options[0] is
1107 used for program name, so merged_decoded_options should also
1108 respect that.
1109
1110 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1111 Richard Biener <rguenther@suse.de>
1112
1113 PR sanitizer/102515
1114 * c-ubsan.c (ubsan_instrument_division): Check the right
1115 flag_sanitize_recover bit, depending on which sanitization
1116 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1117 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1118 and SANITIZE_DIVIDE is enabled, neither check is known
1119 to be false and flag_sanitize_recover bits for those two
1120 aren't the same, emit both __ubsan_handle_divrem_overflow
1121 and __ubsan_handle_divrem_overflow_abort calls.
1122
1123 2021-10-01 Martin Liska <mliska@suse.cz>
1124
1125 * c-common.c (parse_optimize_options): Combine optimize
1126 options with what was provided on the command line.
1127
1128 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1129
1130 * c-omp.c (c_omp_split_clauses): Also copy
1131 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1132
1133 2021-09-27 Martin Liska <mliska@suse.cz>
1134
1135 * c-opts.c (c_common_init_options_struct): Set also
1136 x_flag_default_complex_method.
1137
1138 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1139
1140 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1141
1142 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1143
1144 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1145 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1146 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1147 __ROUNDING_MATH__ according to the new optimization flags.
1148
1149 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1150
1151 * c-omp.c (c_omp_split_clauses): Split order clause also to
1152 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1153
1154 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1155
1156 * c-omp.c (c_finish_omp_atomic): Avoid creating
1157 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1158 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1159 had NULL initializer. When omitting operands after v = x,
1160 use type of v rather than type of x. Fix type of vtmp
1161 TARGET_EXPR.
1162
1163 2021-09-13 Jason Merrill <jason@redhat.com>
1164
1165 * c.opt: Add -Winterference-size.
1166 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1167 and __GCC_CONSTRUCTIVE_SIZE.
1168
1169 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1170
1171 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1172 * c-omp.c: Include gimple-fold.h.
1173 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1174 OpenMP 5.1 atomics.
1175
1176 2021-09-09 qing zhao <qing.zhao@oracle.com>
1177
1178 * c-attribs.c (handle_uninitialized_attribute): New function.
1179 (c_common_attribute_table): Add "uninitialized" attribute.
1180
1181 2021-09-08 liuhongt <hongtao.liu@intel.com>
1182
1183 * c-common.c (excess_precision_mode_join): Update below comments.
1184 (c_ts18661_flt_eval_method): Set excess_precision_type to
1185 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1186 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1187 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1188 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1189
1190 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1191
1192 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1193
1194 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1195
1196 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1197 and -gnatwu warning for the package specification.
1198
1199 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1200
1201 * c-attribs.c (handle_unavailable_attribute): New.
1202
1203 2021-08-30 Jason Merrill <jason@redhat.com>
1204
1205 * c.opt: Add -Wmissing-requires.
1206
1207 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1208
1209 PR other/93067
1210 * c-opts.c (c_common_input_charset_cb): New function.
1211 (c_common_post_options): Call new function
1212 diagnostic_initialize_input_context().
1213
1214 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1215
1216 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1217 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1218 "di" and "u", respecitively; fill with BADLEN to match
1219 size of 'types'.
1220 (get_init_dynamic_hwi): Split off from ...
1221 (init_dynamic_diag_info): ... here. Call it.
1222 (init_dynamic_gfc_info): Call it.
1223
1224 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1225
1226 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1227 * c-pragma.c (omp_pragmas): Add error directive.
1228 * c-omp.c (omp_directives): Uncomment error directive entry.
1229
1230 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1231
1232 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1233 * c-pragma.c (omp_pragmas): Add nothing directive.
1234 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1235
1236 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1237
1238 PR c++/101539
1239 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1240 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1241
1242 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1243
1244 * c-opts.c (c_common_post_options): Default to
1245 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1246
1247 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1248
1249 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1250 * c-pragma.c (omp_pragmas): Add scope construct.
1251 * c-omp.c (omp_directives): Uncomment scope directive entry.
1252
1253 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1254
1255 * c-cppbuiltin.c (c_cpp_builtins): Define
1256 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1257
1258 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1259
1260 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1261 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1262 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1263 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1264 enumerator.
1265 (c_finish_omp_masked): Declare.
1266 * c-omp.c (c_finish_omp_masked): New function.
1267 (c_omp_split_clauses): Handle combined masked constructs.
1268
1269 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1270
1271 PR c++/101539
1272 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1273 * c-common.c (c_common_reswords): Add
1274 __is_pointer_interconvertible_base_of.
1275
1276 2021-07-29 Richard Biener <rguenther@suse.de>
1277
1278 PR c/101512
1279 * c-common.c (c_common_mark_addressable_vec): Look through
1280 C_MAYBE_CONST_EXPR even if not at the toplevel.
1281
1282 2021-07-27 Martin Sebor <msebor@redhat.com>
1283
1284 PR c/101585
1285 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1286
1287 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1288
1289 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1290 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1291 and later.
1292
1293 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1294
1295 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1296 PRAGMA_OMP__LAST_ enumerators.
1297
1298 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1299 Joseph Myers <joseph@codesourcery.com>
1300 Cesar Philippidis <cesar@codesourcery.com>
1301
1302 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1303
1304 2021-07-20 Martin Sebor <msebor@redhat.com>
1305
1306 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1307 by-const-reference.
1308 * c-common.h (c_build_shufflevector): Same.
1309
1310 2021-07-16 Andrew Pinski <apinski@marvell.com>
1311
1312 PR c/101453
1313 * c-common.c (parse_optimize_options): Use the correct
1314 size for buffer.
1315
1316 2021-07-15 Martin Sebor <msebor@redhat.com>
1317
1318 PR c/101289
1319 PR c/97548
1320 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1321
1322 2021-07-14 Jason Merrill <jason@redhat.com>
1323
1324 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1325
1326 2021-07-06 Martin Sebor <msebor@redhat.com>
1327
1328 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1329 (gcc_cdiag_char_table): Same.
1330 (gcc_cxxdiag_char_table): Same.
1331
1332 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1333
1334 * c-common.h (enum c_omp_directive_kind): New enum.
1335 (struct c_omp_directive): New type.
1336 (c_omp_categorize_directive): Declare.
1337 * c-omp.c (omp_directives): New variable.
1338 (c_omp_categorize_directive): New function.
1339
1340 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1341
1342 * c-ada-spec.c (packed_layout): New global variable.
1343 (dump_ada_declaration): Set it upon seeing a packed record type.
1344 Do not put the "aliased" keyword if it is set.
1345 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1346
1347 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1348
1349 * c-ada-spec.c (check_name): Rename into...
1350 (check_type_name_conflict): ...this. Minor tweak.
1351 (dump_ada_function_declaration): Adjust to above renaming.
1352 (dump_ada_array_domains): Fix oversight.
1353 (dump_ada_declaration): Call check_type_name_conflict for variables.
1354
1355 2021-06-25 Martin Sebor <msebor@redhat.com>
1356
1357 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1358 (c_common_truthvalue_conversion): Replace direct uses of
1359 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1360 copy_no_warning.
1361 (check_function_arguments_recurse): Same.
1362 * c-gimplify.c (c_gimplify_expr): Same.
1363 * c-warn.c (overflow_warning): Same.
1364 (warn_logical_operator): Same.
1365 (warn_if_unused_value): Same.
1366 (do_warn_unused_parameter): Same.
1367
1368 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1369
1370 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1371 C_ORT_OMP_TARGET.
1372 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1373 combined target constructs also add map (always, tofrom:) clause.
1374
1375 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1376
1377 * c-attribs.c (common_handle_aligned_attribute): Remove short
1378 circuit and dead code.
1379
1380 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1381
1382 PR c++/101052
1383 * known-headers.cc (get_stdlib_header_for_name): Add known
1384 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1385 exit, and getenv.
1386
1387 2021-06-12 Jason Merrill <jason@redhat.com>
1388
1389 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1390
1391 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1392
1393 PR c++/100974
1394 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1395 -std=c++2b for P1938R3 consteval if support.
1396
1397 2021-06-09 Jason Merrill <jason@redhat.com>
1398
1399 PR c++/100879
1400 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1401 warning.
1402
1403 2021-06-07 Martin Liska <mliska@suse.cz>
1404
1405 * c-target.def: Split long lines and replace them
1406 with '\n\'.
1407
1408 2021-06-04 Martin Sebor <msebor@redhat.com>
1409
1410 PR c/100783
1411 * c-attribs.c (positional_argument): Bail on erroneous types.
1412
1413 2021-06-04 Martin Sebor <msebor@redhat.com>
1414
1415 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1416 for element presence.
1417
1418 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1419
1420 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1421 (dump_ada_decl_name): Likewise.
1422 (dump_anonymous_type_name): Remove parent parameter and adjust.
1423 (dump_sloc): Minor tweak.
1424 (dump_ada_array_type): Remove type parameter and adjust.
1425 (dump_ada_enum_type): Remove parent parameter and adjust.
1426 (dump_ada_node): Adjust calls to above functions.
1427 (dumped_anonymous_types): New global variable.
1428 (dump_nested_types_1): Rename into...
1429 (dump_nested_types): ...this.
1430 (dump_nested_type): Remove parent and dumped_types parameters.
1431 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1432 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1433 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1434
1435 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1436
1437 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1438 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1439
1440 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1441
1442 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1443 (htable_t): New typedef.
1444 (overloaded_names): Use it.
1445 (add_name): New function.
1446 (init_overloaded_names): Use add_name to populate the table and add
1447 special cases for sigaction and stat.
1448 (overloaded_name_p): Rename into...
1449 (overloading_index): ...this. Do not initialize overloaded_names table
1450 here. Return the index or zero.
1451 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1452 but add an overloading suffix instead.
1453 (dump_ada_specs): Initialize overloaded_names tables here.
1454
1455 2021-06-01 Martin Liska <mliska@suse.cz>
1456
1457 PR other/100759
1458 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1459 to a situation where we are not in processing of an optimize
1460 pragma.
1461 * c-pragma.c (handle_pragma_pop_options): Restore target
1462 options.
1463
1464 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1465
1466 PR testsuite/100749
1467 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1468
1469 2021-05-31 Richard Biener <rguenther@suse.de>
1470
1471 PR c++/88601
1472 * c-common.c: Include tree-vector-builder.h and
1473 vec-perm-indices.h.
1474 (c_common_reswords): Add __builtin_shufflevector.
1475 (c_build_shufflevector): New funtion.
1476 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1477 (c_build_shufflevector): Declare.
1478
1479 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1480
1481 PR middle-end/99928
1482 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1483 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1484
1485 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1486
1487 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1488
1489 2021-05-25 Martin Liska <mliska@suse.cz>
1490
1491 PR tree-optimization/92860
1492 PR target/99592
1493 * c-attribs.c (handle_optimize_attribute): Save target node
1494 before calling parse_optimize_options and save it in case
1495 it changes.
1496 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1497 (handle_pragma_pop_options): Likewise here.
1498
1499 2021-05-25 Martin Liska <mliska@suse.cz>
1500
1501 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1502
1503 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1504
1505 PR middle-end/99928
1506 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1507 combined with simd and not with taskloop or for.
1508
1509 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1510
1511 PR middle-end/99928
1512 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1513 on firstprivate clause copy going to target construct, and for
1514 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1515
1516 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1517
1518 * c.opt (Wc++11-extensions, Wc++14-extensions)
1519 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1520 options.
1521
1522 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1523
1524 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1525
1526 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1527
1528 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1529 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1530 (pch_init): Renamed member.
1531 (c_common_valid_pch): Adjust access to debug_type_names.
1532
1533 2021-05-19 Martin Sebor <msebor@redhat.com>
1534
1535 PR c/100619
1536 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1537 bounds.
1538
1539 2021-05-18 Richard Biener <rguenther@suse.de>
1540
1541 PR c/100547
1542 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1543 Reword existing nunit diagnostic.
1544
1545 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1546
1547 * c-common.c (braced_list_to_string): Return CTOR unchanged
1548 if host and target character sizes don't match.
1549
1550 2021-05-14 Martin Liska <mliska@suse.cz>
1551
1552 * c.opt: Add Warning keyword for 2 options.
1553
1554 2021-05-13 Martin Liska <mliska@suse.cz>
1555
1556 PR middle-end/100504
1557 * c-attribs.c (handle_target_clones_attribute): Expect a string
1558 argument to target_clone argument.
1559
1560 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1561
1562 * c-lex.c (interpret_float): Handle digit separators for C2X.
1563
1564 2021-05-10 Martin Liska <mliska@suse.cz>
1565
1566 * c-ada-spec.c (print_destructor): Use startswith
1567 function instead of strncmp.
1568 (dump_ada_declaration): Likewise.
1569 * c-common.c (disable_builtin_function): Likewise.
1570 (def_builtin_1): Likewise.
1571 * c-format.c (check_tokens): Likewise.
1572 (check_plain): Likewise.
1573 (convert_format_name_to_system_name): Likewise.
1574
1575 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1576
1577 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1578 complex divide
1579
1580 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1581 Nathan Sidwell <nathan@codesourcery.com>
1582 Tom de Vries <vries@codesourcery.com>
1583 Julian Brown <julian@codesourcery.com>
1584 Kwok Cheung Yeung <kcy@codesourcery.com>
1585
1586 * c.opt (Wopenacc-parallelism): New.
1587
1588 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1589
1590 * c.opt (fopenacc-kernels=): Remove.
1591
1592 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1593
1594 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1595 occured -> occurred.
1596 (check_alignment_of_packed_member): Fix a comment typo,
1597 memeber -> member.
1598 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1599 and onless -> unless.
1600 (warn_parm_array_mismatch): Fix comment typos, declaratation
1601 -> declaration and woud -> would. Fix up comment indentation.
1602
1603 2021-04-08 Martin Sebor <msebor@redhat.com>
1604
1605 PR middle-end/99883
1606 * c.opt (Wmismatched-new-delete): Correct spelling.
1607
1608 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1609
1610 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1611 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1612 enumeral types use again the type name for the enumeration constants.
1613 (dump_ada_node): Adjust call to dump_ada_enum_type.
1614 (dump_nested_type): Likewise.
1615
1616 2021-04-01 Jason Merrill <jason@redhat.com>
1617
1618 PR c++/98481
1619 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1620
1621 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1622
1623 PR c++/99565
1624 * c-warn.c (do_warn_duplicated_branches): Pass also
1625 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1626
1627 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1628
1629 PR debug/99230
1630 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1631
1632 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1633
1634 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1635 after entering the separate class package, if any.
1636
1637 2021-03-04 Richard Biener <rguenther@suse.de>
1638
1639 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1640 Handle ERROR_MARK.
1641
1642 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1643
1644 PR c/99325
1645 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1646 (token_streamer::stream) Likewise.
1647 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1648 UNKNOWN_LOCATION.
1649
1650 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1651
1652 PR c/99324
1653 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1654 instead of mark_addressable. Fix a comment typo -
1655 neutrallly -> neutrally.
1656
1657 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1658
1659 PR c/99304
1660 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1661 message - refernced -> referenced. Remove superfluous space before
1662 closing paren of function calls.
1663
1664 2021-02-25 Nathan Sidwell <nathan@acm.org>
1665
1666 PR c++/99166
1667 * c.opt (-flang-info-module-cmi): Renamed option.
1668
1669 2021-02-19 Nathan Sidwell <nathan@acm.org>
1670
1671 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1672
1673 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
1674
1675 PR target/99113
1676 * c-attribs.c (c_common_attribute_table): Add the "retain"
1677 attribute.
1678 (handle_retain_attribute): New function.
1679
1680 2021-02-16 Marek Polacek <polacek@redhat.com>
1681
1682 PR c++/99062
1683 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1684 alignment argument is non-negative. Tweak a warning message.
1685
1686 2021-02-12 Martin Sebor <msebor@redhat.com>
1687
1688 PR c/99055
1689 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1690 print_generic_expr_to_str.
1691
1692 2021-02-10 Richard Biener <rguenther@suse.de>
1693
1694 * c-common.c (parse_optimize_options): Free decoded_options.
1695
1696 2021-02-04 emsr <3dw4rd@verizon.net>
1697
1698 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1699
1700 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1701
1702 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1703 * c-lex.c (interpret_integer): Set node type for size literal.
1704
1705 2021-01-28 Jakub Jelinek <jakub@redhat.com>
1706
1707 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1708 draft from description.
1709 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1710
1711 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
1712
1713 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1714 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1715 and -std=gnu++2b
1716 * c-opts.c (set_std_cxx23): New.
1717 (c_common_handle_option): Set options when -std=c++23 is enabled.
1718 (c_common_post_options): Adjust comments.
1719 (set_std_cxx20): Likewise.
1720
1721 2021-01-25 Martin Sebor <msebor@redhat.com>
1722
1723 PR c++/98646
1724 * c-common.c (check_nonnull_arg): Adjust warning text.
1725
1726 2021-01-17 Martin Sebor <msebor@redhat.com>
1727
1728 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1729 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1730
1731 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1732
1733 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1734 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1735
1736 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1737
1738 PR tree-optimization/98597
1739 * c-pretty-print.c: Include options.h.
1740 (c_fold_indirect_ref_for_warn): New function.
1741 (print_mem_ref): Use it. If it returns something that has compatible
1742 type and is TBAA compatible with zero offset, print it and return,
1743 otherwise print it using offsetof syntax or array ref syntax. Fix up
1744 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1745 argument has pointer to array type. Print pointers using the standard
1746 formatting.
1747
1748 2021-01-12 Martin Sebor <msebor@redhat.com>
1749
1750 PR c/98597
1751 PR c/98592
1752 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1753 has pointer type. Remove redundant code. Avoid calling
1754 gimple_canonical_types_compatible_p.
1755
1756 2021-01-07 Martin Sebor <msebor@redhat.com>
1757
1758 PR middle-end/98578
1759 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1760 Avoid assuming acces type's size is constant. Correct condition
1761 guarding the printing of a parenthesis.
1762
1763 2021-01-06 Martin Sebor <msebor@redhat.com>
1764
1765 PR c++/95768
1766 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1767 SSA_NAMEs print VLA names and GIMPLE defining statements.
1768 (print_mem_ref): New function.
1769 (c_pretty_printer::unary_expression): Call it.
1770
1771 2021-01-06 Richard Biener <rguenther@suse.de>
1772
1773 PR tree-optimization/95582
1774 * c-attribs.c (c_common_attribute_table): Add entry for
1775 signed_bool_precision.
1776 (handle_signed_bool_precision_attribute): New.
1777
1778 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1779
1780 * c.opt: Add -stdlib= option and enumerations for
1781 libstdc++ and libc++.
1782
1783 2020-12-16 Martin Liska <mliska@suse.cz>
1784
1785 * c.opt: Remove usage of Report.
1786
1787 2020-12-14 Martin Sebor <msebor@redhat.com>
1788
1789 PR middle-end/98166
1790 PR c++/57111
1791 PR middle-end/98160
1792 * c-attribs.c (maybe_add_noinline): New function.
1793 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1794 Implicitly add attribute noinline to functions not declared inline
1795 and warn on those.
1796
1797 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1798
1799 * c-pragma.c (omp_pragmas): Add 'allocate'.
1800 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1801
1802 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1803
1804 PR c++/98187
1805 * c-pragma.c (omp_pragmas): Remove "master".
1806 (omp_pragmas_simd): Add "master".
1807
1808 2020-12-07 Marek Polacek <polacek@redhat.com>
1809
1810 PR c++/98126
1811 * c-common.c (verify_tree_lim_r): New function.
1812 (verify_sequence_points): Use it. Use nullptr instead of 0.
1813
1814 2020-12-03 Martin Sebor <msebor@redhat.com>
1815
1816 PR c++/90629
1817 PR middle-end/94527
1818 * c-attribs.c (handle_dealloc_attribute): New function.
1819 (handle_malloc_attribute): Handle argument forms of attribute.
1820 * c.opt (-Wmismatched-dealloc): New option.
1821 (-Wmismatched-new-delete): New option.
1822
1823 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1824
1825 PR libstdc++/93121
1826 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1827 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1828
1829 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1830
1831 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1832 {__GNUC_EXECUTION_CHARSET_NAME} and
1833 _WIDE_EXECUTION_CHARSET_NAME} macros.
1834
1835 2020-12-01 Nathan Sidwell <nathan@acm.org>
1836
1837 * c-common.c (module, import, export): New internal tokens (with
1838 trailing space).
1839 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1840 them.
1841 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1842 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1843
1844 2020-12-01 Nathan Sidwell <nathan@acm.org>
1845
1846 * c-opts.c (c_common_init_options): Ask for module dependencies.
1847 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1848 * c-pch.c (c_common_valid_pch): ... does not play with C++
1849 modules.
1850 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1851 options.
1852 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1853 (fmodule-only, fmodule-mapper, fmodule-lazy)
1854 (fmodule-version-ignore, Winvalid-imported-macros)
1855 (flang-info-include-translate, flang-info-include-translate-not):
1856 New options
1857
1858 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1859
1860 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1861 (dump_ada_structure): Also deal with convention, unchecked union and
1862 bit-field for nested types. In the latter case, print an Alignment
1863 aspect along with the Pack aspect.
1864
1865 2020-11-25 Martin Sebor <msebor@redhat.com>
1866
1867 PR bootstrap/94982
1868 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1869 -Wformat-diag.
1870
1871 2020-11-24 Martin Sebor <msebor@redhat.com>
1872
1873 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1874
1875 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1876
1877 * c-attribs.c (handle_special_var_sec_attribute): New.
1878 (handle_noinit_attribute): Remove.
1879 (attr_noinit_exclusions): Rename to...
1880 (attr_section_exclusions): ...this, and add "persistent" attribute
1881 exclusion.
1882 (c_common_attribute_table): Add "persistent" attribute.
1883
1884 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1885
1886 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1887 Treat opaque types like other types.
1888 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1889 supported types.
1890
1891 2020-11-20 Martin Sebor <msebor@redhat.com>
1892
1893 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1894 with fewer arguments.
1895
1896 2020-11-20 Martin Sebor <msebor@redhat.com>
1897
1898 PR middle-end/97879
1899 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1900 Error out on invalid modes.
1901
1902 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1903
1904 PR libstdc++/88101
1905 * c-common.c (check_builtin_function_arguments): Handle
1906 BUILT_IN_CLEAR_PADDING.
1907
1908 2020-11-18 Nathan Sidwell <nathan@acm.org>
1909
1910 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1911
1912 2020-11-17 Nathan Sidwell <nathan@acm.org>
1913
1914 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1915 after newly-added CTI_MODULE_HWM.
1916
1917 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1918
1919 * c-cppbuiltin.c (builtin_define_float_constants): Define
1920 "*_IS_IEC_60559__" macros.
1921
1922 2020-11-17 Nathan Sidwell <nathan@acm.org>
1923
1924 * c-lex.c: #include "langhooks.h".
1925 (cb_undef): Maybe call preprocess_undef lang hook.
1926 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1927 lang hook.
1928 (push_command_line_include): Maybe call preprocess_main_file lang
1929 hook.
1930 (cb_file_change): Likewise.
1931 * c-ppoutput.c: #include "langhooks.h.
1932 (scan_translation_unit): Maybe call preprocess_token lang hook.
1933 (class do_streamer): New, derive from token_streamer.
1934 (directives_only_cb): Data pointer is do_streamer, call
1935 preprocess_token lang hook.
1936 (scan_translation_unit_directives_only): Use do_streamer.
1937 (print_line_1): Move src_line recording to after string output.
1938 (cb_undef): Maybe call preprocess_undef lang hook.
1939
1940 2020-11-17 Nathan Sidwell <nathan@acm.org>
1941
1942 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1943 code duplicating that functionality.
1944
1945 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR c/90628
1948 * c-common.c (check_builtin_function_arguments)
1949 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1950 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1951 for more builtins and argument positions.
1952
1953 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1954
1955 PR objc/97854
1956 * stub-objc.c: Include c-common.h to declare enum rid.
1957
1958 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1959
1960 PR c++/63287
1961 * c-cppbuiltin.c: Include configargs.h.
1962 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1963 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1964 "single".
1965
1966 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1967 Thomas Schwinge <thomas@codesourcery.com>
1968
1969 * c.opt (fopenacc-kernels): Add.
1970
1971 2020-11-13 Jason Merrill <jason@redhat.com>
1972
1973 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1974
1975 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1976
1977 PR c++/91318
1978 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1979
1980 2020-11-13 Martin Liska <mliska@suse.cz>
1981
1982 * c-attribs.c (build_attr_access_from_parms): Format properly.
1983
1984 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1985
1986 PR objc/90707
1987 * c-common.c (c_common_reswords): null_unspecified, nullable,
1988 nonnull, null_resettable: New keywords.
1989 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1990 RID_NONNULL, RID_NULL_RESETTABLE: New.
1991 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1992 ranges accepted for property attributes.
1993 * c-attribs.c (handle_objc_nullability_attribute): New.
1994 * c-objc.h (enum objc_property_attribute_group): Add
1995 OBJC_PROPATTR_GROUP_NULLABLE.
1996 (enum objc_property_attribute_kind):Add
1997 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1998 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1999
2000 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2001
2002 PR objc/77404
2003 * c-attribs.c (handle_objc_root_class_attribute): New
2004 * c-objc.h (objc_start_class_interface): Add a location
2005 value for the position of the class name.
2006 * c.opt: Add Wobjc-root-class.
2007 * stub-objc.c (objc_start_class_interface): Add a location
2008 value for the position of the class name.
2009
2010 2020-11-12 Joseph Myers <joseph@codesourcery.com>
2011
2012 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2013 Allow scope for C. Handle standard attributes for C. Do not
2014 accept unscoped attributes if std_syntax and not handled as
2015 standard attributes.
2016 * c-common.h (c_common_has_attribute): Update prototype.
2017
2018 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2019
2020 PR pch/86674
2021 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2022 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2023
2024 2020-11-11 Patrick Palka <ppalka@redhat.com>
2025
2026 PR c++/88115
2027 * c-opts.c (c_common_post_options): Update latest_abi_version.
2028
2029 2020-11-10 Jakub Jelinek <jakub@redhat.com>
2030
2031 PR c/97748
2032 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2033 to false.
2034 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2035 recursively and just return true instead of warning if it is true.
2036 Handle COMPLEX_EXPR.
2037
2038 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2039
2040 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2041 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2042 (c_omp_adjust_map_clauses): New function.
2043
2044 2020-11-09 Marek Polacek <polacek@redhat.com>
2045
2046 DR 1914
2047 * c-common.c (attribute_fallthrough_p): Tweak the warning
2048 message.
2049
2050 2020-11-09 Patrick Palka <ppalka@redhat.com>
2051
2052 * c-pragma.c (handle_pragma_diagnostic): Split the
2053 unknown-option -Wpragmas diagnostic into a warning and a
2054 subsequent note containing a spelling suggestion. Avoid
2055 computing the suggestion if -Wpragmas warnings are being
2056 suppressed.
2057
2058 2020-11-09 Patrick Palka <ppalka@redhat.com>
2059
2060 PR testsuite/97117
2061 * c-indentation.c (get_visual_column): Remove location_t
2062 parameter. Move the column-tracking diagnostic code from here
2063 to ...
2064 (should_warn_for_misleading_indentation): ... here, before the
2065 early exit for when the loci are not all distinct. Don't pass a
2066 location_t argument to get_visual_column.
2067 (assert_get_visual_column_succeeds): Don't pass a location_t
2068 argument to get_visual_column.
2069 (assert_get_visual_column_fails): Likewise.
2070
2071 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2072
2073 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2074 of keywords accepted in @property attribute contexts.
2075 * c-objc.h (enum objc_property_attribute_group): Add
2076 OBJC_PROPATTR_GROUP_CLASS.
2077 (enum objc_property_attribute_kind): Add
2078 OBJC_PROPERTY_ATTR_CLASS.
2079
2080 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2081
2082 * c-common.c (c_common_reswords): Add 'atomic' property
2083 attribute.
2084 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2085 property attributes.
2086
2087 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2088
2089 * c-attribs.c (handle_nsobject_attribute): New.
2090 * c.opt: Add WNSObject-attribute.
2091
2092 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2093
2094 * c-objc.h (enum objc_property_attribute_group): New
2095 (enum objc_property_attribute_kind): New.
2096 (OBJC_PROPATTR_GROUP_MASK): New.
2097 (struct property_attribute_info): Small class encapsulating
2098 parser output from property attributes.
2099 (objc_prop_attr_kind_for_rid): New
2100 (objc_add_property_declaration): Simplify interface.
2101 * stub-objc.c (enum rid): Dummy type.
2102 (objc_add_property_declaration): Simplify interface.
2103 (objc_prop_attr_kind_for_rid): New.
2104
2105 2020-11-06 Nathan Sidwell <nathan@acm.org>
2106
2107 * c-ada-spec.c (collect_ada_nodes): Rename
2108 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2109 (collect_ada_node): Likewise.
2110 (dump_forward_type): Likewise.
2111 * c-common.c (set_underlying_type): Rename
2112 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2113 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2114
2115 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2116
2117 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2118
2119 2020-11-05 Marek Polacek <polacek@redhat.com>
2120
2121 PR c++/97675
2122 * c.opt (Wexceptions): New option.
2123
2124 2020-11-05 Marek Polacek <polacek@redhat.com>
2125
2126 PR c++/25814
2127 * c.opt (Wvexing-parse): New option.
2128
2129 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2130
2131 PR c++/97670
2132 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2133 underlying decl to clear in the allocate_head bitmap.
2134
2135 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2136
2137 * c-objc.h (objc_non_constant_expr_p): New.
2138 * stub-objc.c (objc_non_constant_expr_p): New.
2139
2140 2020-11-03 Nathan Sidwell <nathan@acm.org>
2141
2142 * c.opt (MQ,MT): Reword description to be make-agnostic.
2143
2144 2020-11-02 Nathan Sidwell <nathan@acm.org>
2145
2146 * c-opts.c (c_common_post_options): Move var decl to its
2147 initialization point.
2148
2149 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2150
2151 * c-lex.c (c_lex_with_flags): When combining '@' with a
2152 keyword for Objective-C, combine the location ranges too.
2153
2154 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2155 H.J.Lu <hjl.tools@gmail.com>
2156
2157 * c-attribs.c (c_common_attribute_table): Add new attribute
2158 zero_call_used_regs.
2159 (handle_zero_call_used_regs_attribute): New function.
2160
2161 2020-10-28 Marek Polacek <polacek@redhat.com>
2162
2163 PR c++/97573
2164 * c-opts.c (c_common_post_options): In C++20, turn on
2165 -Wdeprecated-enum-enum-conversion and
2166 -Wdeprecated-enum-float-conversion.
2167 * c.opt (Wdeprecated-enum-enum-conversion,
2168 Wdeprecated-enum-float-conversion): New options.
2169 (Wenum-conversion): Allow for C++ too.
2170
2171 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2172
2173 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2174 * c-omp.c: Include bitmap.h.
2175 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2176
2177 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2178
2179 * c-common.c (__is_nothrow_assignable): New.
2180 (__is_nothrow_constructible): Likewise.
2181 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2182 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2183
2184 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2185
2186 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2187
2188 2020-10-23 Marek Polacek <polacek@redhat.com>
2189
2190 PR c++/91741
2191 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2192 (c_common_init_ts): Likewise.
2193 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2194 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2195 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2196 (maybe_warn_sizeof_array_div): New function.
2197 * c.opt (Wsizeof-array-div): New option.
2198
2199 2020-10-23 Martin Sebor <msebor@redhat.com>
2200
2201 PR c/97463
2202 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2203
2204 2020-10-22 Martin Liska <mliska@suse.cz>
2205
2206 PR c/94722
2207 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2208 (handle_stack_protect_attribute): Add error message for a
2209 no_stack_protector function.
2210
2211 2020-10-22 Martin Liska <mliska@suse.cz>
2212
2213 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2214
2215 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2216
2217 * c-gimplify.c: Include tree-nested.h
2218 (c_genericize): Update for new nested function info.
2219
2220 2020-10-14 Martin Sebor <msebor@redhat.com>
2221
2222 PR c/97413
2223 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2224 bounds in an extra list.
2225
2226 2020-10-05 Richard Biener <rguenther@suse.de>
2227 Jakub Jelinek <jakub@redhat.com>
2228
2229 PR c++/97197
2230 * c-pretty-print.c: Include langhooks.h.
2231 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2232 expression.
2233 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2234 unary_expression.
2235 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2236
2237 2020-09-30 Martin Sebor <msebor@redhat.com>
2238
2239 PR middle-end/97189
2240 * c-attribs.c (append_access_attr): Use the function declaration
2241 location for a warning about an attribute access argument.
2242
2243 2020-09-29 Marek Polacek <polacek@redhat.com>
2244
2245 PR c++/94695
2246 * c.opt (Wrange-loop-construct): New option.
2247
2248 2020-09-23 Martin Sebor <msebor@redhat.com>
2249
2250 PR c/97131
2251 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2252
2253 2020-09-23 Marek Polacek <polacek@redhat.com>
2254
2255 PR c/97125
2256 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2257 after loops and other structured control constructs have been lowered.
2258
2259 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2260
2261 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2262 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2263
2264 2020-09-21 Marek Polacek <polacek@redhat.com>
2265
2266 * c.opt (Wctad-maybe-unsupported): New option.
2267
2268 2020-09-19 Martin Sebor <msebor@redhat.com>
2269
2270 PR c/50584
2271 * c-common.h (warn_parm_array_mismatch): Declare new function.
2272 (has_attribute): Move declaration of an existing function.
2273 (build_attr_access_from_parms): Declare new function.
2274 * c-warn.c (parm_array_as_string): Define new function.
2275 (plus_one): Define new function.
2276 (warn_parm_ptrarray_mismatch): Define new function.
2277 (warn_parm_array_mismatch): Define new function.
2278 (vla_bound_parm_decl): New function.
2279 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2280 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2281 qualifiers here...
2282 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2283 them in brackets here. Also print [static]. Strip extraneous
2284 expressions from VLA bounds.
2285
2286 2020-09-19 Martin Sebor <msebor@redhat.com>
2287
2288 PR c/50584
2289 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2290 (handle_argspec_attribute): New function.
2291 (get_argument, get_argument_type): New functions.
2292 (append_access_attrs): Add overload. Handle internal attribute
2293 representation in addition to external.
2294 (handle_access_attribute): Handle internal attribute representation
2295 in addition to external.
2296 (build_attr_access_from_parms): New function.
2297
2298 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2299
2300 * c-gimplify.c (genericize_c_loop): Rewrite to match
2301 c_finish_loop in c-typeck.c.
2302
2303 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2304
2305 * c-common.c (c_block_may_fallthrough): New, split from
2306 cxx_block_may_fallthrough in the cp front end.
2307 (c_common_init_ts): Move handling of loop and switch-related
2308 statements here from the cp front end.
2309 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2310 cp front end.
2311 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2312 * c-common.h (c_block_may_fallthru): Declare.
2313 (bc_state_t): Move here from cp front end.
2314 (save_bc_state, restore_bc_state): Declare.
2315 (c_genericize_control_stmt): Declare.
2316 (WHILE_COND, WHILE_BODY): Likewise.
2317 (DO_COND, DO_BODY): Likewise.
2318 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2319 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2320 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2321 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2322 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2323 * c-dump.c (dump_stmt): Copy from cp front end.
2324 (c_dump_tree): Move code to handle structured loop and switch
2325 tree nodes here from cp front end.
2326 * c-gimplify.c: Adjust includes.
2327 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2328 cp front end.
2329 (save_bc_state, restore_bc_state): New functions using old code
2330 from cp front end.
2331 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2332 (genericize_c_loop): Move from cp front end.
2333 (genericize_for_stmt, genericize_while_stmt): Likewise.
2334 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2335 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2336 (genericize_omp_for_stmt): Likewise.
2337 (c_genericize_control_stmt): New function using code split from
2338 cp front end.
2339 (c_genericize_control_r): New.
2340 (c_genericize): Call walk_tree with c_genericize_control_r.
2341 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2342 structured loop and switch tree nodes here from cp front end.
2343
2344 2020-09-17 Patrick Palka <ppalka@redhat.com>
2345
2346 PR c/80076
2347 * c-indentation.c (should_warn_for_misleading_indentation): Move
2348 declarations of local variables closer to their first use.
2349 Handle virtual token locations by resolving them to their
2350 respective macro expansion points. If all three tokens are
2351 produced from the same macro expansion, then instead use their
2352 loci within the macro definition.
2353
2354 2020-09-16 Martin Sebor <msebor@redhat.com>
2355
2356 PR c/78666
2357 PR c/96126
2358 * c-attribs.c (validate_attr_args): New function.
2359 (validate_attr_arg): Same.
2360 (handle_section_attribute): Call it. Introduce a local variable.
2361 (handle_alloc_size_attribute): Same.
2362 (handle_alloc_align_attribute): Same.
2363
2364 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2365
2366 * c-attribs.c (handle_optimize_attribute): Adjust
2367 cl_optimization_save, cl_optimization_restore and
2368 build_optimization_node callers.
2369 * c-pragma.c (handle_pragma_optimize): Adjust
2370 build_optimization_node caller.
2371 (handle_pragma_push_options): Adjust
2372 build_optimization_node and build_target_option_node callers.
2373 (handle_pragma_pop_options, handle_pragma_reset_options):
2374 Adjust cl_optimization_restore callers.
2375
2376 2020-08-28 Martin Sebor <msebor@redhat.com>
2377
2378 * c.opt (Wstringop-overread): New option.
2379
2380 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2381
2382 PR c/96545
2383 * c-common.c (get_atomic_generic_size): Require that first argument's
2384 type points to a complete type and use tree_fits_uhwi_p instead of
2385 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2386
2387 2020-07-31 Martin Sebor <msebor@redhat.com>
2388
2389 PR c++/96003
2390 * c-common.c (check_function_arguments_recurse): Return early when
2391 no-warning bit is set.
2392
2393 2020-07-31 Richard Biener <rguenther@suse.de>
2394
2395 PR debug/96383
2396 * c-common.h (c_common_finalize_early_debug): Declare.
2397 * c-common.c: Include debug.h.
2398 (c_common_finalize_early_debug): finalize_early_debug langhook
2399 implementation generating debug for extern declarations.
2400
2401 2020-07-27 Nathan Sidwell <nathan@acm.org>
2402
2403 * c-common.c (try_to_locate_new_include_insertion_point): Use
2404 strcmp, not pointer equality.
2405
2406 2020-07-25 Martin Sebor <msebor@redhat.com>
2407
2408 PR c++/96310
2409 * c-common.c (check_nonnull_arg): Print note only when warning was
2410 issued.
2411
2412 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2413
2414 * c-omp.c (c_finish_omp_critical): Check for no name but
2415 nonzero hint provided.
2416
2417 2020-07-20 Jason Merrill <jason@redhat.com>
2418
2419 * c-cppbuiltin.c (c_cpp_builtins): Update
2420 __cpp_nontype_template_args for C++20.
2421
2422 2020-07-20 Martin Sebor <msebor@redhat.com>
2423
2424 PR c/96249
2425 * c.opt: Remove stray text.
2426
2427 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2428
2429 PR other/86904
2430 * c-indentation.c (should_warn_for_misleading_indentation): Get
2431 global tabstop from the new source.
2432 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2433 is now a common option.
2434 * c.opt: Likewise.
2435
2436 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2437
2438 * c.opt (Wscalar-storage-order): Add explicit variable.
2439
2440 2020-07-07 Nathan Sidwell <nathan@acm.org>
2441
2442 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2443 cpp_read_main_file.
2444 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2445 maps. Force token position to line_table's highest line.
2446 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2447 (cb_define): Always increment source line.
2448
2449 2020-07-06 Martin Sebor <msebor@redhat.com>
2450
2451 PR c++/95984
2452 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2453 to stub lambda objects with null this pointer.
2454 (check_nonnull_arg): Handle C++ nullptr.
2455
2456 2020-07-02 Jason Merrill <jason@redhat.com>
2457 Jakub Jelinek <jakub@redhat.com>
2458
2459 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2460
2461 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2462
2463 PR c++/95963
2464 * c-common.c (check_function_arguments_recurse): Don't crash on
2465 calls to internal functions.
2466
2467 2020-06-28 Martin Sebor <msebor@redhat.com>
2468
2469 PR c++/86568
2470 * c-common.c (struct nonnull_arg_ctx): Add members.
2471 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2472 C++ member functions specially. Consider the this pointer implicitly
2473 nonnull.
2474 (check_nonnull_arg): Use location of argument when available.
2475 (check_function_arguments): Use nonnull_arg_ctx as argument.
2476
2477 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2478
2479 PR middle-end/95903
2480 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2481 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2482 smaller precision intop operands separately.
2483
2484 2020-06-26 Marek Polacek <polacek@redhat.com>
2485
2486 * c-opts.c (c_common_init_options): Default to gnu++17.
2487
2488 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2489
2490 PR c/95378
2491 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2492 pointer arguments.
2493
2494 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2495
2496 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2497 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2498 idx members.
2499 (c_omp_is_loop_iterator): New function.
2500 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2501 if outer loop iterator is present. Perform duplicate checking through
2502 hash_set in the function rather than expecting caller to do that.
2503 Pass NULL instead of d->ppset to walk_tree_1.
2504 (c_omp_check_nonrect_loop_iv): New function.
2505 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2506 non-rectangular loop forms, diagnose multiple associated loops with
2507 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2508 (c_omp_check_loop_iv_exprs): Likewise.
2509
2510 2020-06-10 Martin Liska <mliska@suse.cz>
2511
2512 PR tree-optimization/92860
2513 * c-attribs.c (handle_optimize_attribute):
2514 Save global options and compare it after parsing of function
2515 attribute.
2516 * c-pragma.c (opt_stack::saved_global_options): New field.
2517 (handle_pragma_push_options): Save global_options.
2518 (handle_pragma_pop_options): Compare them after pop.
2519
2520 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2521
2522 PR c/95580
2523 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2524 case when MEM_REF's first argument has type pointer to incomplete type.
2525
2526 2020-06-05 Jason Merrill <jason@redhat.com>
2527
2528 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2529 operand to POINTER_PLUS_EXPR.
2530
2531 2020-06-04 Martin Sebor <msebor@redhat.com>
2532
2533 PR middle-end/10138
2534 PR middle-end/95136
2535 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2536 (handle_access_attribute): Same.
2537
2538 2020-06-03 Mark Wielaard <mark@klomp.org>
2539
2540 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2541 New function.
2542 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2543 New function declaration.
2544
2545 2020-06-03 Mark Wielaard <mark@klomp.org>
2546
2547 * known-headers.cc (get_string_macro_hint): New function.
2548 (get_stdlib_header_for_name): Use get_string_macro_hint.
2549 (get_c_stdlib_header_for_string_macro_name): New function.
2550 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2551 New function declaration.
2552
2553 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2554
2555 * c-common.h (c_omp_predetermined_mapping): Declare.
2556 * c-omp.c (c_omp_predetermined_mapping): New.
2557
2558 2020-05-22 Mark Wielaard <mark@klomp.org>
2559
2560 * known-headers.cc (get_stdlib_header_for_name): Add a new
2561 stdlib_hint array for stdbool and stdint.
2562
2563 2020-05-22 Mark Wielaard <mark@klomp.org>
2564
2565 * known-headers.cc (get_stdlib_header_for_name): Return
2566 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2567 flag_isoc99.
2568
2569 2020-05-20 Nathan Sidwell <nathan@acm.org>
2570
2571 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2572
2573 * c-common.c (try_to_locate_new_include_insertion_point): Use
2574 strcmp to compare filenames.
2575 * c-lex.c (init_c_lex): Move declaration to initialization.
2576 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2577 deferred count loop.
2578
2579 2020-05-15 Jason Merrill <jason@redhat.com>
2580
2581 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2582
2583 2020-05-13 Jason Merrill <jason@redhat.com>
2584
2585 * c.opt (std=c++20): Make c++2a the alias.
2586 (std=gnu++20): Likewise.
2587 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2588 * c-opts.c: Adjust.
2589 * c-cppbuiltin.c: Adjust.
2590 * c-ubsan.c: Adjust.
2591 * c-warn.c: Adjust.
2592
2593 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2594
2595 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2596
2597 2020-05-08 Nathan Sidwell <nathan@acm.org>
2598
2599 Reimplement directives only processing.
2600 * c-ppoutput.c (token_streamer): Ne.
2601 (directives_only_cb): New. Swallow ...
2602 (print_lines_directives_only): ... this.
2603 (scan_translation_unit_directives_only): Reimplment using the
2604 published interface.
2605
2606 2020-05-07 Marek Polacek <polacek@redhat.com>
2607
2608 * c-format.c (badwords): Add "nonstatic".
2609
2610 202-05-07 Jakub Jelinek <jakub@redhat.com>
2611
2612 PR c/94968
2613 * c-common.c (speculation_safe_value_resolve_params): Return false if
2614 error_operand_p (val2).
2615 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2616 Remove extraneous semicolon.
2617
2618 2020-05-06 qing zhao <qing.zhao@oracle.com>
2619
2620 PR c/94230
2621 * c-indentation.c (get_visual_column): Add a hint to use the new
2622 -flarge-source-files option.
2623
2624 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2625
2626 * c-attribs.c (handle_vector_size_attribute): Add attribute
2627 nonnull for argument args in order to silence warning of
2628 uninitialized variable usage. Since this is local to the
2629 compilation unit and thus cannot be checked at call sides by the
2630 compiler, added an assert statement in order to verify this.
2631
2632 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2633
2634 PR target/93492
2635 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2636 value to USHRT_MAX (65535).
2637
2638 2020-04-29 Jakub Jelinek <jakub@redhat.com>
2639
2640 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2641
2642 2020-04-27 Jakub Jelinek <jakub@redhat.com>
2643
2644 PR c/94755
2645 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2646 fncode == BUILT_IN_NONE before initialization of first_param.
2647
2648 2020-04-23 Marek Polacek <polacek@redhat.com>
2649
2650 PR c++/94733
2651 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2652 TREE_PURPOSE.
2653
2654 2020-04-14 Patrick Palka <ppalka@redhat.com>
2655
2656 PR c++/85278
2657 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2658 ampersand if it's an rvalue reference type.
2659
2660 2020-04-13 Martin Sebor <msebor@redhat.com>
2661
2662 PR c/92326
2663 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2664 printing array bound for flexible array members.
2665
2666 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2667
2668 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2669 define, per n4861.
2670
2671 2020-04-02 Richard Biener <rguenther@suse.de>
2672
2673 PR c/94392
2674 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2675 for -O2 and C++11 or newer.
2676
2677 2020-03-28 Patrick Palka <ppalka@redhat.com>
2678
2679 * c.opt: Add -fconcepts-diagnostics-depth.
2680
2681 2020-03-27 Martin Sebor <msebor@redhat.com>
2682
2683 PR c++/94346
2684 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2685 to decl_attributes. Make handling of different kinds of entities
2686 more robust.
2687
2688 2020-03-27 Martin Sebor <msebor@redhat.com>
2689
2690 PR c++/94098
2691 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2692 here.
2693
2694 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2695
2696 PR c++/91993
2697 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2698 result being COMPOUND_EXPRs, skip to ultimate rhs.
2699
2700 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2701
2702 PR middle-end/94072
2703 * c-common.c (c_common_type_for_mode): Before using a registered
2704 built-in type, check that the vectorness of the type matches
2705 the vectorness of the mode.
2706
2707 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2708
2709 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2710 issue in a diagnostic message.
2711
2712 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2713
2714 * c.opt: Avoid redundancy in the help text.
2715
2716 2020-03-02 Marek Polacek <polacek@redhat.com>
2717
2718 PR c++/93958 - add missing -std=gnu++20.
2719 * c.opt: Add -std=gnu++20.
2720
2721 2020-03-01 Martin Sebor <msebor@redhat.com>
2722
2723 PR c++/92721
2724 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2725 (handle_access_attribute): Same.
2726
2727 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2728
2729 PR c/93858
2730 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2731 "did you mean" hint in diagnostics.
2732
2733 2020-02-15 Jason Merrill <jason@redhat.com>
2734
2735 * c.opt: Add -std=c++20.
2736
2737 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2738
2739 * c-ada-spec.c: Include bitmap.h.
2740 (dump_ada_double_name): Rename into...
2741 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2742 (dump_ada_array_type): Adjust to above renaming. Robustify.
2743 (dump_nested_types_1): New function copied from... Add dumped_types
2744 parameter and pass it down to dump_nested_type.
2745 (dump_nested_types): ...this. Remove parent parameter. Just call
2746 dump_nested_types_1 on an automatic bitmap.
2747 (dump_nested_type): Add dumped_types parameter.
2748 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2749 Adjust recursive calls and adjust to above renaming.
2750 (dump_ada_declaration): Adjust call to dump_nested_types.
2751 Tidy up and adjust to above renaming.
2752 (dump_ada_specs): Initialize and release bitmap obstack.
2753
2754 2020-02-10 Martin Sebor <msebor@redhat.com>
2755
2756 PR c/93640
2757 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2758
2759 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR other/93641
2762 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2763 Remove useless extra test.
2764
2765 2020-02-03 Julian Brown <julian@codesourcery.com>
2766 Tobias Burnus <tobias@codesourcery.com>
2767
2768 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2769
2770 2020-01-29 Jason Merrill <jason@redhat.com>
2771
2772 PR c++/89357
2773 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2774
2775 2020-01-23 Jason Merrill <jason@redhat.com>
2776
2777 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2778
2779 2020-01-23 Martin Sebor <msebor@redhat.com>
2780
2781 PR c/84919
2782 * c-common.c (check_function_arguments): Avoid overlap checking
2783 of sprintf functions.
2784
2785 2020-01-22 Jason Merrill <jason@redhat.com>
2786
2787 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2788 PR c++/40752
2789 * c-warn.c (conversion_warning): Check operands only after checking
2790 the whole expression. Don't check second operand of + for sign.
2791
2792 2020-01-21 Jason Merrill <jason@redhat.com>
2793 Manuel López-Ibáñez <manu@gcc.gnu.org>
2794
2795 PR c++/40752 - useless -Wconversion with short +=.
2796 * c.opt (-Warith-conversion): New.
2797 * c-warn.c (conversion_warning): Recurse for operands of
2798 operators. Only warn about the whole expression with
2799 -Warith-conversion.
2800
2801 2020-01-21 Jason Merrill <jason@redhat.com>
2802
2803 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2804 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2805
2806 2020-01-20 Nathan Sidwell <nathan@acm.org>
2807
2808 PR preprocessor/80005
2809 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2810
2811 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2812
2813 * c-common.c (co_await, co_yield, co_return): New.
2814 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2815 RID_CO_RETURN): New enumeration values.
2816 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2817 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2818 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2819 * c.opt (fcoroutines): New command-line switch.
2820
2821 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2822
2823 * c-format.c (local_event_ptr_node): New.
2824 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2825 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2826 * c-format.h (T_EVENT_PTR): New define.
2827
2828 2020-01-10 Martin Sebor <msebor@redhat.com>
2829
2830 PR c/93132
2831 * c-attribs.c (append_access_attrs): Validate against the translated
2832 access string rather than the human-readable representation.
2833
2834 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2835
2836 Update copyright years.
2837
2838 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2839
2840 * c-ada-spec.h (decl_sloc): Delete.
2841 * c-ada-spec.c (decl_sloc): Make static.
2842
2843 2019-12-19 Julian Brown <julian@codesourcery.com>
2844
2845 * c-common.h (c_omp_map_clause_name): Add prototype.
2846 * c-omp.c (c_omp_map_clause_name): New function.
2847 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2848 PRAGMA_OACC_CLAUSE_DETACH.
2849
2850 2019-12-19 Julian Brown <julian@codesourcery.com>
2851 Maciej W. Rozycki <macro@codesourcery.com>
2852 Tobias Burnus <tobias@codesourcery.com>
2853 Thomas Schwinge <thomas@codesourcery.com>
2854
2855 * c-pragma.h (pragma_omp_clause): Add
2856 PRAGMA_OACC_CLAUSE_NO_CREATE.
2857
2858 2019-12-17 Martin Sebor <msebor@redhat.com>
2859
2860 PR c++/61339
2861 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2862
2863 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2864
2865 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2866 implementation.
2867 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2868
2869 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2870
2871 * c-format.c (range_label_for_format_type_mismatch::get_text):
2872 Replace label_text ctor called with true with label_text::take.
2873
2874 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2875
2876 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2877 initial newline from expected outputs.
2878 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2879 call to diagnostic_show_locus.
2880
2881 2019-12-06 Jakub Jelinek <jakub@redhat.com>
2882
2883 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2884 now.
2885
2886 2019-12-05 Marek Polacek <polacek@redhat.com>
2887 Jakub Jelinek <jakub@redhat.com>
2888
2889 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2890 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2891
2892 2019-12-05 Marek Polacek <polacek@redhat.com>
2893
2894 PR c++/92271 - make __is_same alias for __is_same_as.
2895 * c-common.c: Add __is_same, an alias for __is_same_as.
2896
2897 2019-12-03 Marek Polacek <polacek@redhat.com>
2898
2899 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2900 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2901 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2902
2903 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2904
2905 * c-attribs.c (handle_symver_attribute): New function
2906 (c_common_attributes): Add symver.
2907
2908 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2909
2910 * c-common.c (pointer_int_sum): Use verify_type_context to check
2911 whether the target allows pointer arithmetic for the types involved.
2912 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2913 to check whether the target allows sizeof and alignof operations
2914 for the types involved.
2915
2916 2019-11-27 Jason Merrill <jason@redhat.com>
2917
2918 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2919
2920 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2921
2922 PR c++/61414
2923 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2924 ENUMERAL_TYPEs.
2925
2926 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2927
2928 PR c/91985
2929 * c-common.c (c_common_type_for_mode): Handle decimal
2930 floating-point types being NULL_TREE.
2931 * c-format.c (get_format_for_type_1): Handle specified types being
2932 NULL_TREE.
2933 * c-lex.c (interpret_float): Give an error for decimal
2934 floating-point constants when decimal floating-point not
2935 supported.
2936
2937 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2938
2939 PR middle-end/83859
2940 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2941 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2942 group warning with inform together.
2943 (handle_access_attribute): Formatting fix.
2944
2945 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2946
2947 PR c/90677
2948 * c-common.h (identifier_global_tag): Declare.
2949 * c-format.c (get_pointer_to_named_type): Renamed to ...
2950 (get_named_type): ... this. Use identifier_global_tag instead of
2951 identifier_global_value, handle the return value being a TYPE_P.
2952 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2953 to call get_named_type instead. Formatting fixes.
2954
2955 Implement P1902R1, Missing feature-test macros 2017-2019.
2956 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2957 and __cpp_generic_lambdas for -std=c++2a. Define
2958 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2959 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2960 __cpp_concepts for -std=c++2a.
2961
2962 2019-11-22 Martin Sebor <msebor@redhat.com>
2963
2964 PR middle-end/83859
2965 * c-attribs.c (handle_access_attribute): New function.
2966 (c_common_attribute_table): Add new attribute.
2967 (get_argument_type): New function.
2968 (append_access_attrs): New function.
2969 (get_nonnull_operand): Rename...
2970 (get_attribute_operand): ...to this.
2971 * c-common.c (get_nonnull_operand): Rename...
2972 (get_attribute_operand): ...to this.
2973
2974 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2975
2976 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2977 of warning.
2978
2979 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2980
2981 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2982 warning for standard attributes mixed with fallthrough attributes.
2983
2984 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2985
2986 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2987 * c-common.h (handle_fallthrough_attribute): Declare.
2988
2989 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2990
2991 * c-attribs.c (handle_deprecated_attribute): Remove static.
2992 * c-common.h (handle_deprecated_attribute): Declare.
2993
2994 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2995
2996 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2997 char for C.
2998
2999 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3000
3001 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3002 valid vendors.
3003
3004 * c-omp.c (c_omp_check_context_selector): Handle name lists
3005 containing string literals. Don't diagnose atomic_default_mem_order
3006 with multiple props.
3007
3008 2019-11-13 Joseph Myers <joseph@codesourcery.com>
3009
3010 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3011 NORM_MAX constants. Update call to get_max_float.
3012 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3013 constants.
3014
3015 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3016
3017 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3018 (dump_forward_type): Do not generate a declaration for function types.
3019 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3020 of the component type if it is declared in another file.
3021
3022 2019-11-12 Martin Liska <mliska@suse.cz>
3023
3024 * c-opts.c (c_common_post_options):
3025 Use SET_OPTION_IF_UNSET.
3026
3027 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3028 Frederik Harwath <frederik@codesourcery.com>
3029
3030 gcc/c-family/
3031 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3032 constant.
3033 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3034
3035 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3036
3037 * c-common.h (gnu_vector_type_p): New function.
3038 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3039 vectors to satisfy gnu_vector_type_p.
3040 (c_build_vec_convert): Likewise __builtin_convertvector.
3041 (convert_vector_to_array_for_subscript): Likewise when applying
3042 implicit vector to array conversion.
3043 (scalar_to_vector): Likewise when converting vector-scalar
3044 operations to vector-vector operations.
3045
3046 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3047
3048 * c.opt (Wold-style-definition): Initialize to -1.
3049 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3050 to flag_isoc2x if not set explicitly.
3051
3052 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3053
3054 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3055
3056 2019-11-05 Jason Merrill <jason@redhat.com>
3057
3058 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3059 -fconcepts.
3060
3061 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3062
3063 * c-opts.c (c_common_post_options): Update
3064 latest_abi_version.
3065
3066 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3067
3068 * c-common.h (c_omp_get_context_selector): Remove.
3069 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3070 and renamed to omp_get_context_selector.
3071
3072 * c-omp.c (c_omp_mark_declare_variant): Use
3073 omp_context_selector_set_compare.
3074
3075 PR c++/88335 - Implement P1073R3: Immediate functions
3076 * c-common.h (enum rid): Add RID_CONSTEVAL.
3077 * c-common.c (c_common_reswords): Add consteval.
3078
3079 2019-11-01 Martin Sebor <msebor@redhat.com>
3080
3081 PR middle-end/91679
3082 PR middle-end/91647
3083 PR middle-end/91463
3084 PR middle-end/92312
3085 * c-pretty-print.c (direct_abstract_declarator): Print
3086 bound in zero-length arrays.
3087 * c.opt (-Wzero-length-bounds): New option.
3088
3089 2019-10-30 Nathan Sidwell <nathan@acm.org>
3090
3091 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3092 macros.
3093
3094 2019-10-28 Martin Sebor <msebor@redhat.com>
3095
3096 PR c/66970
3097 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3098 even when only preprocessing.
3099 * c-common.h (names_builtin_p): Declare new function.
3100 * c-lex.c (init_c_lex): Set has_builtin.
3101 (c_common_has_builtin): Define a new function.
3102 * c-ppoutput.c (init_pp_output): Set has_builtin.
3103
3104 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3105
3106 * c-common.h (c_omp_context_selector_matches): Remove.
3107 * c-omp.c (c_omp_context_selector_matches): Remove.
3108 * c-attribs.c (c_common_attribute_table): Add
3109 "omp declare target {host,nohost,block}" attributes.
3110
3111 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3112
3113 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3114
3115 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3116
3117 * c-common.h (user_facing_original_type_p): Declare.
3118 * c-common.c: Include c-spellcheck.h.
3119 (user_facing_original_type_p): New function.
3120
3121 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3122
3123 * c-common.h (c_omp_mark_declare_variant,
3124 c_omp_context_selector_matches): Declare.
3125 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3126 and hsa-common.h.
3127 (c_omp_get_context_selector): Support second argument NULL.
3128 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3129 functions.
3130 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3131 attribute, add "omp declare variant base" and
3132 "omp declare variant variant" attributes.
3133
3134 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3135
3136 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3137 CppReason(CPP_W_C11_C2X_COMPAT).
3138
3139 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3140
3141 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3142 _Decimal64 and _Decimal128.
3143
3144 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3145
3146 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3147 types if DFP not supported.
3148
3149 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3150
3151 * c-common.h (c_omp_check_context_selector,
3152 c_omp_get_context_selector): Declare.
3153 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3154 in diagnostic message.
3155 (c_omp_check_context_selector, c_omp_get_context_selector): New
3156 functions.
3157 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3158 attribute.
3159 (handle_omp_declare_variant_attribute): New function.
3160
3161 2019-10-09 Martin Sebor <msebor@redhat.com>
3162
3163 PR tree-optimization/90879
3164 * c.opt (-Wstring-compare): New option.
3165
3166 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3167 Jason Merrill <jason@redhat.com>
3168
3169 Update the concepts implementation to conform to the C++20
3170 specification, improve compile times, and generally clean up
3171 the implementation.
3172
3173 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3174 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3175 * c.opt: Add -Wconcepts-ts.
3176 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3177 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3178 (set_std_cxx2a): Enable concepts by default.
3179
3180 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3181
3182 * c-opts.c (c_common_post_options): Set
3183 -fno-fp-int-builtin-inexact for C2X.
3184
3185 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3186
3187 PR c++/91369 - Implement P0784R7: constexpr new
3188 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3189 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3190
3191 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3192
3193 PR c/82752
3194 * c-format.c (C_STD_VER): Handle C2x.
3195 (C_STD_NAME): Likewise.
3196 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3197 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3198 modifier allowed and 'p' flag.
3199 * c-format.h (enum format_std_version): Add STD_C2X.
3200 (struct format_char_info): Mention 'p' in comment on flags2.
3201
3202 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3203
3204 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3205 calling diagnostic_show_locus, rather than destroying it afterwards.
3206
3207 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3208
3209 PR c++/91925
3210 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3211 with NULL DECL_FIELD_OFFSET.
3212
3213 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3214
3215 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3216 has a type name, use it in preference to the __vector syntax.
3217
3218 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3219
3220 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3221 two spaces between a comma and "...".
3222
3223 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3224
3225 PR c++/88203
3226 * c-common.h (c_omp_predefined_variable): Declare.
3227 * c-omp.c (c_omp_predefined_variable): New function.
3228 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3229 for predefined variables.
3230
3231 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3232
3233 * c-common.h (build_function_call_vec): Take the original
3234 function decl as an optional final parameter.
3235 (check_builtin_function_arguments): Take the original function decl.
3236 * c-common.c (check_builtin_function_arguments): Likewise.
3237 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3238 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3239
3240 2019-09-15 Jason Merrill <jason@redhat.com>
3241
3242 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3243 fold_for_warn in "|| mask" warning.
3244
3245 2019-09-10 Martin Liska <mliska@suse.cz>
3246
3247 * c.opt: Use newly added WarnRemoved.
3248
3249 2019-09-09 Martin Liska <mliska@suse.cz>
3250
3251 * c.opt: Update comment of removed
3252 options that are preserved only for backward
3253 compatibility.
3254
3255 2019-09-06 Martin Liska <mliska@suse.cz>
3256
3257 PR c++/91125
3258 * c-common.c: Remove definition of flag_use_repository.
3259 * c-common.h: Likewise.
3260 * c-opts.c (c_common_handle_option):
3261 Do not handle OPT_frepo option.
3262 * c.opt: Mark the option with Deprecated.
3263
3264 2019-09-04 Marek Polacek <polacek@redhat.com>
3265
3266 * c.opt (fdeduce-init-list): Ignored.
3267
3268 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3269
3270 PR c/78736
3271 * c.opt (Wenum-conversion): New option.
3272
3273 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3274
3275 * c-attribs.c (handle_section_attribute): Call the
3276 handle_generic_attribute target hook after performing target
3277 independent processing.
3278 (handle_noinit_attribute): Likewise.
3279
3280 2019-09-03 Ian Lance Taylor <iant@golang.org>
3281
3282 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3283 when using -fgo-dump-spec.
3284
3285 2019-09-02 Martin Liska <mliska@suse.cz>
3286
3287 PR c++/91155
3288 * c-common.c (fname_as_string): Use cxx_printable_name for
3289 __PRETTY_FUNCTION__ same as was used before r265711.
3290
3291 2019-08-28 Marek Polacek <polacek@redhat.com>
3292
3293 Implement P1152R4: Deprecating some uses of volatile.
3294 PR c++/91361
3295 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3296 default for C++2a, unless -Wno-deprecated.
3297 * c.opt (Wvolatile): New warning.
3298
3299 2019-08-28 Marek Polacek <polacek@redhat.com>
3300
3301 PR c++/91360 - Implement C++20 P1143R2: constinit.
3302 * c-common.c (c_common_reswords): Add constinit and __constinit.
3303 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3304 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3305 RID_LAST_CXX20.
3306 (D_CXX20): Define.
3307 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3308 * c-format.c (cxx_keywords): Add "constinit".
3309 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3310
3311 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3312
3313 PR c++/91415
3314 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3315 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3316 like COMPOUND_EXPR rather than normal expression.
3317
3318 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3319
3320 PR pch/61250
3321 * c-lex.c (c_lex_with_flags): Don't call
3322 c_common_no_more_pch () from here.
3323
3324 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3325
3326 PR middle-end/91283
3327 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3328 instead of flag_excess_precision_cmdline.
3329 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3330 * c-opts.c (c_common_post_options): Likewise.
3331
3332 2019-08-22 Martin Sebor <msebor@redhat.com>
3333
3334 PR middle-end/91490
3335 * c-common.c (braced_list_to_string): Add argument and overload.
3336 Handle flexible length arrays and unions.
3337
3338 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3339
3340 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3341 function declarations where arguments are missing. Rename variables.
3342
3343 2019-08-15 Richard Biener <rguenther@suse.de>
3344
3345 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3346 enabled, define __SIZETYPE__.
3347
3348 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3349
3350 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3351 exclusion with "section" attribute.
3352 (attr_noinit_exclusions): New table.
3353 (handle_noinit_attribute): New function.
3354
3355 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3356
3357 PR middle-end/91421
3358 * c-common.c (resolve_overloaded_builtin): Use
3359 copy_decl_built_in_function.
3360
3361 2019-08-13 Martin Sebor <msebor@redhat.com>
3362
3363 PR c/80619
3364 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3365 (asm_fprintf_length_spec): Same.
3366 * c-format.h (format_lengths): Add FMT_LEN_w.
3367
3368 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3369
3370 * c-pragma.h (enum pragma_omp_clause): Add
3371 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3372
3373 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3374
3375 * c-pragma.h (enum pragma_omp_clause): Add
3376 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3377 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3378 enumeration value.
3379
3380 2019-08-05 Marek Polacek <polacek@redhat.com>
3381
3382 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3383 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3384 default for C++2a, unless -Wno-deprecated.
3385 * c.opt (Wcomma-subscript): New warning.
3386
3387 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3388
3389 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3390 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3391 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3392 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3393 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3394 constructs with the loop construct.
3395
3396 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3397
3398 PR c/91149
3399 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3400 OMP_CLAUSE_REDUCTION_TASK handling.
3401
3402 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3403
3404 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3405 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3406
3407 2019-07-09 Martin Sebor <msebor@redhat.com>
3408
3409 PR c++/61339
3410 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3411 and others to class.
3412 * c-pretty-print.h: Same.
3413
3414 2019-07-09 Martin Sebor <msebor@redhat.com>
3415
3416 PR c++/61339
3417 * c-format.c (check_argument_type): Change class-key from class to
3418 struct and vice versa to match convention and avoid -Wclass-is-pod
3419 and -Wstruct-no-pod.
3420 * c-pretty-print.h: Same.
3421
3422 2019-07-03 Martin Liska <mliska@suse.cz>
3423
3424 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3425 dead assignemts.
3426
3427 2019-07-03 Jakub Jelinek <jakub@redhat.com>
3428
3429 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3430 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3431 with OMP_PARALLEL.
3432
3433 2019-07-02 qing zhao <qing.zhao@oracle.com>
3434
3435 PR preprocessor/90581
3436 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3437 * c.opt: Add new option -fmax-include-depth.
3438
3439 2019-06-26 Jason Merrill <jason@redhat.com>
3440
3441 PR c++/55442 - memory-hog with highly recursive constexpr.
3442 * c.opt (fconstexpr-loop-limit): New.
3443
3444 2019-06-25 Jakub Jelinek <jakub@redhat.com>
3445
3446 PR sanitizer/90954
3447 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3448 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3449
3450 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3451
3452 * c-common.c (c_common_nodes_and_builtins): Define
3453 alternate "__intN__" name for "__intN" types.
3454
3455 2019-06-24 Jan Hubicka <jh@suse.cz>
3456
3457 * c-common.c (braced_lists_to_strings): Check that
3458 type is array or integer prior checking string flag.
3459
3460 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3461
3462 PR c++/90875 - added -Wswitch-outside-range option
3463 * c.opt (Wswitch-outside-range): Added new option.
3464 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3465
3466 2019-06-21 Marek Polacek <polacek@redhat.com>
3467
3468 PR c++/90953 - ICE with -Wmissing-format-attribute.
3469 * c-common.c (check_function_arguments_recurse): Use
3470 get_attribute_name.
3471 (check_missing_format_attribute): Likewise.
3472
3473 2019-06-19 Marek Polacek <polacek@redhat.com>
3474
3475 PR c++/60364 - noreturn after first decl not diagnosed.
3476 * c-attribs.c (handle_noreturn_attribute): No longer static.
3477 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3478 Declare.
3479 * c-format.c (check_function_format): Use get_attribute_name.
3480
3481 2019-06-19 Martin Sebor <msebor@redhat.com>
3482
3483 PR translation/90156
3484 * c-format.c (function_format_info::format_type): Adjust type.
3485 (function_format_info::is_raw): New member.
3486 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3487 (decode_format_attr): Adjust call to decode_format_type.
3488 Avoid a redundant call to convert_format_name_to_system_name.
3489 Avoid abbreviating the word "arguments" in a diagnostic.
3490 (format_warning_substr): New function.
3491 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3492 (finish_dollar_format_checking): Same.
3493 (check_format_info): Same.
3494 (struct baltoks_t): New.
3495 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3496 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3497 functions.
3498 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3499 maybe_diag_unbalanced_tokens.
3500 (handle_format_attribute): Spell out the word "arguments" in
3501 a diagnostic.
3502
3503 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3504
3505 PR c++/90449 - add -Winaccessible-base option.
3506 * c.opt (Winaccessible-base): New option.
3507
3508 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3509
3510 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3511 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3512 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3513 combined/composite constructs where it is not allowed. Copy over
3514 OMP_CLAUSE_REDUCTION_INSCAN.
3515
3516 2019-06-05 Martin Sebor <msebor@redhat.com>
3517
3518 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3519 (handle_alias_ifunc_attribute): Same.
3520 (handle_copy_attribute): Same.
3521 (handle_weakref_attribute): Same.
3522 (handle_nonnull_attribute): Same.
3523 * c-warn.c (warn_for_sign_compare): Same.
3524 (warn_for_restrict): Same.
3525 * c.opt: Same.
3526
3527 2019-06-05 Martin Sebor <msebor@redhat.com>
3528
3529 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3530 * c.opt (-Wformat-diag): Remove a spurious period.
3531
3532 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3533
3534 PR c/90628
3535 * c-common.c (check_builtin_function_arguments)
3536 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3537 as last argument.
3538
3539 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3540
3541 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3542
3543 2019-05-22 Martin Liska <mliska@suse.cz>
3544
3545 PR lto/90500
3546 * c-attribs.c (handle_copy_attribute): Do not copy
3547 target_clones attribute.
3548
3549 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3550
3551 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3552 * c-ada-spec.c (print_assignment_operator): New function.
3553 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3554 assignment operators declared as methods and filter out the others.
3555
3556 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3557
3558 PR c/89433
3559 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3560 "omp declare target".
3561
3562 2019-05-16 Martin Sebor <msebor@redhat.com>
3563
3564 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3565 keywords, operators, and types in diagnostics.
3566 (handle_scalar_storage_order_attribute): Same.
3567 (handle_mode_attribute): Same.
3568 (handle_visibility_attribute): Same.
3569 (handle_assume_aligned_attribute): Same.
3570 (handle_no_split_stack_attribute): Same.
3571 * c-common.c (shorten_compare): Same.
3572 (c_common_truthvalue_conversion): Same.
3573 (cb_get_source_date_epoch): Same.
3574 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3575 in diagnostics.
3576 (interpret_float): Same.
3577 * c-omp.c (c_finish_omp_for): Same.
3578 * c-opts.c (c_common_post_options): Same.
3579 * c-pch.c (c_common_pch_pragma): Same.
3580 * c-pragma.c (pop_alignment): Same.
3581 (handle_pragma_pack): Same.
3582 (apply_pragma_weak): Same.
3583 (handle_pragma_weak): Same.
3584 (handle_pragma_scalar_storage_order): Same.
3585 (handle_pragma_redefine_extname): Same.
3586 (add_to_renaming_pragma_list): Same.
3587 (maybe_apply_renaming_pragma): Same.
3588 (push_visibility): Same.
3589 (handle_pragma_visibility): Same.
3590 (handle_pragma_optimize): Same.
3591 (handle_pragma_message): Same.
3592 * c-warn.c (warn_for_omitted_condop): Same.
3593 (lvalue_error): Same.
3594
3595 2019-05-15 Richard Biener <rguenther@suse.de>
3596
3597 PR c/90474
3598 * c-common.c (c_common_mark_addressable_vec): Also mark
3599 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3600 c_mark_addressable.
3601
3602 2019-05-06 Nathan Sidwell <nathan@acm.org>
3603
3604 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3605
3606 2019-04-30 Nathan Sidwell <nathan@acm.org>
3607
3608 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3609
3610 2019-04-30 Martin Liska <mliska@suse.cz>
3611
3612 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3613 for unknown options.
3614
3615 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3616
3617 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3618 the pointer target rather than the pointer itself.
3619
3620 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3621
3622 PR c/89888
3623 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3624 arguments.
3625 (c_do_switch_warnings): Remove outside_range_p argument.
3626 * c-common.c (check_case_bounds): Removed.
3627 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3628 Don't call check_case_bounds. Fold low_value as well as high_value.
3629 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3630 Check for case labels outside of range of original type here and
3631 adjust them.
3632
3633 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3634
3635 PR translation/90041
3636 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3637 in the Warn diagnostics.
3638
3639 PR c/89946
3640 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3641 function comment. Warn if arguments of the attribute are not positive
3642 integer constants.
3643
3644 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3645
3646 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3647 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3648
3649 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3650
3651 * c-ada-spec.c (is_float128): New predicate extracted from...
3652 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3653 <REAL_TYPE>: ...here. Call it.
3654
3655 2019-04-05 David Malcolm <dmalcolm@redhat.com>
3656
3657 PR c/89985
3658 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3659 auto_diagnostic_group. Guard inform calls by result of
3660 warning_at call.
3661
3662 2019-04-05 Marek Polacek <polacek@redhat.com>
3663
3664 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
3665 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3666 of RHS.
3667
3668 2019-04-03 Jason Merrill <jason@redhat.com>
3669
3670 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3671 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3672
3673 2019-04-01 Martin Sebor <msebor@redhat.com>
3674
3675 PR c/89685
3676 * c-attribs.c (handle_copy_attribute): Handle references and
3677 non-constant expressions.
3678
3679 2019-03-22 Jakub Jelinek <jakub@redhat.com>
3680
3681 PR c++/87481
3682 * c.opt (-fconstexpr-ops-limit=): New option.
3683
3684 2019-03-21 Jakub Jelinek <jakub@redhat.com>
3685
3686 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3687 template param.
3688
3689 2019-03-19 Martin Sebor <msebor@redhat.com>
3690
3691 PR tree-optimization/89688
3692 * c-common.c (braced_list_to_string): Make static.
3693 (braced_lists_to_strings): Define new function.
3694 * c-common.h (braced_list_to_string): Remove.
3695 (braced_lists_to_strings): Declare.
3696
3697 2019-03-12 Martin Liska <mliska@suse.cz>
3698
3699 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3700
3701 2019-03-11 Martin Liska <mliska@suse.cz>
3702
3703 * c-opts.c (c_common_post_options): Wrap apostrophes
3704 in gcc internal format with %'.
3705
3706 2019-03-11 Martin Liska <mliska@suse.cz>
3707
3708 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3709 in a string format message and fix GNU coding style.
3710 * c-common.c (vector_types_convertible_p): Likewise.
3711 (c_build_vec_perm_expr): Likewise.
3712 * c-indentation.c (get_visual_column): Likewise.
3713 * c-opts.c (c_common_handle_option): Likewise.
3714 (c_common_post_options): Likewise.
3715 (sanitize_cpp_opts): Likewise.
3716 * c-pch.c (c_common_pch_pragma): Likewise.
3717 * c-pragma.c (handle_pragma_pack): Likewise.
3718
3719 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3720
3721 PR tree-optimization/89550
3722 * c-common.c (c_common_truthvalue_conversion): Only set
3723 TREE_NO_WARNING if warning_at returned true.
3724 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3725
3726 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3727 Martin Sebor <msebor@gmail.com>
3728
3729 * c.opt (Wmissing-attributes): Clean up doc string.
3730
3731 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3732
3733 PR c/89495
3734 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3735 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3736 checking.
3737
3738 2019-02-22 Richard Biener <rguenther@suse.de>
3739
3740 * c-pch.c (no_checksum): Remove.
3741 (pch_init): Remove assertion that executable_checksum is not
3742 all zero.
3743 (c_common_valid_pch): Likewise.
3744
3745 2019-02-18 Martin Sebor <msebor@redhat.com>
3746
3747 PR middle-end/89294
3748 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3749
3750 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3751
3752 PR c++/88680
3753 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3754 implementing -Wtype-limits.
3755
3756 2019-02-11 Martin Sebor <msebor@redhat.com>
3757
3758 PR c++/87996
3759 * c-common.c (invalid_array_size_error): New function.
3760 (valid_array_size_p): Call it. Handle size as well as type.
3761 * c-common.h (valid_constant_size_p): New function.
3762 (enum cst_size_error): New type.
3763
3764 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3765
3766 PR c/89122
3767 * known-headers.cc (get_stdlib_header_for_name): Add
3768 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3769
3770 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3771
3772 PR libstdc++/88170
3773 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3774 a C cast in pp_c_flag_gnu_v3 mode.
3775
3776 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3777
3778 PR c/86125
3779 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3780 builtin_structptr_types types even for C.
3781
3782 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3783
3784 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3785 when rhs is of array type correctly. Fix handling of nested structures.
3786 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3787 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3788 type casts within nested compound expressions.
3789
3790 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3791
3792 PR middle-end/88968
3793 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3794 variable after using BIT_FIELD_REF.
3795
3796 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3797
3798 PR c/51628
3799 PR c/88664
3800 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3801 Remove the boolean argument.
3802 * c-warn.c (check_address_of_packed_member): Renamed to ...
3803 (check_address_or_pointer_of_packed_member): This. Also
3804 warn pointer conversion.
3805 (check_and_warn_address_of_packed_member): Renamed to ...
3806 (check_and_warn_address_or_pointer_of_packed_member): This.
3807 Also warn pointer conversion.
3808 (warn_for_address_or_pointer_of_packed_member): Remove the
3809 boolean argument. Don't check pointer conversion here.
3810
3811 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3812
3813 PR inline-asm/52813
3814 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3815
3816 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3817
3818 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3819 and __cpp_nontype_template_parameter_auto. Add a comment that
3820 __cpp_template_auto is deprecated.
3821
3822 2019-01-14 Tom Honermann <tom@honermann.net>
3823
3824 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3825 * c-common.c (c_common_reswords): Add char8_t.
3826 (fix_string_type): Use char8_t for the type of u8 string literals.
3827 (c_common_get_alias_set): char8_t doesn't alias.
3828 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3829 C++.
3830 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3831 (keyword_begins_type_specifier): Add RID_CHAR8.
3832 * c-common.h (rid): Add RID_CHAR8.
3833 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3834 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3835 Define char8_type_node and char8_array_type_node.
3836 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3837 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3838 (c_cpp_builtins): Predefine __cpp_char8_t.
3839 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3840 CPP_UTF8STRING.
3841 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3842 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3843 targeting C++2a.
3844 * c.opt: Add the -fchar8_t command line option.
3845
3846 2019-01-14 Martin Sebor <msebor@redhat.com>
3847
3848 PR target/88638
3849 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3850 and issue errors if it fails.
3851 * c-common.h (valid_format_string_type_p): Declare.
3852 * c-format.c (valid_stringptr_type_p): Rename...
3853 (valid_format_string_type_p): ...to this and make extern.
3854 (handle_format_arg_attribute): Adjust to new name.
3855 (check_format_string): Same.
3856
3857 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3858
3859 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3860 Replace "may may" with "may" in warning message.
3861
3862 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3863
3864 PR c++/85052
3865 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3866 (c_build_vec_convert): Declare.
3867 * c-common.c (c_build_vec_convert): New function.
3868
3869 2019-01-04 Martin Sebor <msebor@redhat.com>
3870
3871 PR c/88546
3872 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3873 Handle C++ empty throw specification and C11 _Noreturn.
3874 (has_attribute): Also handle C11 _Noreturn.
3875
3876 2019-01-04 Martin Sebor <msebor@redhat.com>
3877
3878 PR c/88363
3879 * c-attribs.c (positional_argument): Also accept enumerated types.
3880
3881 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3882
3883 Update copyright years.
3884
3885 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3886
3887 PR c/51628
3888 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3889 * c-warn.c (check_alignment_of_packed_member): New function.
3890 (check_address_of_packed_member): Likewise.
3891 (check_and_warn_address_of_packed_member): Likewise.
3892 (warn_for_address_or_pointer_of_packed_member): Likewise.
3893 * c.opt: Add -Wno-address-of-packed-member.
3894
3895 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3896
3897 PR c++/87504
3898 * c-warn.c (get_outermost_macro_expansion): New function.
3899 (spelled_the_same_p): Use it to unwind the macro expansions, and
3900 compare the outermost macro in each nested expansion, rather than
3901 the innermost.
3902
3903 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3904
3905 PR c++/87504
3906 * c-common.h (warn_tautological_cmp): Convert 1st param from
3907 location_t to const op_location_t &.
3908 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3909 when testing for INTEGER_CST.
3910 (warn_tautological_bitwise_comparison): Convert 1st param from
3911 location_t to const op_location_t &; use it to build a
3912 binary_op_rich_location, and use this.
3913 (spelled_the_same_p): New function.
3914 (warn_tautological_cmp): Convert 1st param from location_t to
3915 const op_location_t &. Warn for macro expansions if
3916 spelled_the_same_p. Use binary_op_rich_location.
3917
3918 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3919
3920 PR c++/43064
3921 PR c++/43486
3922 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3923 (verify_tree): Handle location wrappers.
3924 (c_common_truthvalue_conversion): Strip any location wrapper.
3925 Handle CONST_DECL.
3926 (fold_offsetof): Strip any location wrapper.
3927 (complete_array_type): Likewise for initial_value.
3928 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3929 index before checking for INTEGER_CST.
3930 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3931 print parentheses around location wrappers.
3932 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3933 before checking for INTEGER_CST.
3934 (warn_tautological_bitwise_comparison): Call
3935 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3936 before checking for INTEGER_CST.
3937 (readonly_error): Strip any location wrapper.
3938 (warn_array_subscript_with_type_char): Strip location wrappers
3939 before checking for INTEGER_CST. Use the location of the index if
3940 available.
3941
3942 2018-12-06 Jason Merrill <jason@redhat.com>
3943
3944 PR c++/88136 - -Wdeprecated-copy false positives
3945 * c.opt (Wdeprecated-copy-dtor): New.
3946 (Wdeprecated-copy): Move to -Wextra.
3947
3948 2018-11-29 Martin Sebor <msebor@redhat.com>
3949
3950 PR c/88172
3951 PR testsuite/88208
3952 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3953 alignments to values less than the target requires.
3954 (has_attribute): For attribute aligned consider both the attribute
3955 and the alignment bits.
3956 * c-common.c (c_init_attributes): Optionally issue a warning for
3957 zero alignment.
3958
3959 2018-11-28 Martin Sebor <msebor@redhat.com>
3960
3961 PR c/88065
3962 PR c/87297
3963 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3964 or destination is an error.
3965
3966 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR c++/88215
3969 * c-ubsan.c: Include langhooks.h.
3970 (ubsan_instrument_division): Change gcc_assert that main variants
3971 of op0 and op1 types are equal to gcc_checking_assert that the
3972 main variants are compatible types.
3973
3974 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3975
3976 * c-ada-spec.c: Include stringpool.h.
3977 (has_static_fields): Return false for incomplete types.
3978 (is_tagged_type): Likewise.
3979 (has_nontrivial_methods): Likewise.
3980 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3981 (struct overloaded_name_hash): New structure.
3982 (struct overloaded_name_hasher): Likewise.
3983 (overloaded_names): New global variable.
3984 (init_overloaded_names): New static function.
3985 (overloaded_name_p): New predicate.
3986 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3987 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3988 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3989 Remove always-true condition and dump forward types.
3990 (dump_ada_specs): Delete overloaded_names.
3991
3992 2018-11-20 Martin Sebor <msebor@redhat.com>
3993
3994 * c-attribs.c (type_for_vector_size): New function.
3995 (type_valid_for_vector_size): Same.
3996 (handle_vector_size_attribute): Move code to the functions above
3997 and call them.
3998 (validate_attribute, has_attribute): New functions.
3999 * c-common.h (has_attribute): Declare.
4000 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4001 * c-common.c (c_common_resword): Same.
4002
4003 2018-11-16 Jason Merrill <jason@redhat.com>
4004
4005 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4006 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4007
4008 2018-11-16 Jakub Jelinek <jakub@redhat.com>
4009
4010 PR middle-end/87854
4011 * c-common.c (fix_string_type): Reject string literals larger than
4012 TYPE_MAX_VALUE (ssizetype) bytes.
4013
4014 2018-11-15 Martin Sebor <msebor@redhat.com>
4015
4016 PR c++/87541
4017 PR c++/87542
4018 * c-attribs.c (positional_argument): New function.
4019 (handle_alloc_size_attribute): Use it and simplify.
4020 (handle_alloc_align_attribute): Same.
4021 (handle_assume_aligned_attribute): Same.
4022 (handle_nonnull_attribute): Same.
4023 * c-common.c (check_function_arguments): Pass fntype to
4024 check_function_format.
4025 * c-common.h (check_function_format): Add an argument.
4026 (PosArgFlags, positional_argument): Declare new type and function.
4027 * c-format.c (decode_format_attr): Add arguments.
4028 (check_format_string, get_constant): Same.
4029 (convert_format_name_to_system_name): Adjust.
4030
4031 2018-11-15 David Malcolm <dmalcolm@redhat.com>
4032
4033 PR other/19165
4034 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4035
4036 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4037
4038 P1236R1 - Signed integers are two's complement
4039 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4040 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4041 with in-range second operand well defined for -std=c++2a.
4042
4043 PR other/88007
4044 * c-common.c (parse_optimize_options): Allocate option string from
4045 opts_obstack rather than as GC memory. Move the allocation after
4046 warning for invalid option.
4047
4048 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4049
4050 * c-common.c (c_get_substring_location): Update for renaming of
4051 get_source_location_for_substring to get_location_within_string.
4052 * c-lex.c: Replace "source_location" with "location_t".
4053 * c-opts.c: Likewise.
4054 * c-ppoutput.c: Likewise.
4055
4056 2018-11-13 Martin Sebor <msebor@redhat.com>
4057
4058 PR middle-end/81824
4059 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4060 (handle_tls_model_attribute): Improve diagnostics.
4061
4062 2018-11-12 Jason Merrill <jason@redhat.com>
4063
4064 * c-cppbuiltin.c (c_cpp_builtins): Define
4065 __cpp_impl_destroying_delete.
4066
4067 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4068 __cpp_conditional_explicit.
4069
4070 2018-11-09 Martin Sebor <msebor@redhat.com>
4071
4072 PR middle-end/81824
4073 * c-attribs.c (handle_copy_attribute): New function.
4074
4075 2018-11-09 Martin Sebor <msebor@redhat.com>
4076
4077 PR c/87795
4078 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4079
4080 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4081
4082 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4083 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4084 enum omp_memory_order MEMORY_ORDER.
4085 (c_finish_omp_flush): Add MO argument.
4086 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4087 (c_finish_omp_for): Add FINAL_P argument.
4088 * c-omp.c: Include memmodel.h.
4089 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4090 OMP_TASKGROUP_CLAUSES to it.
4091 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4092 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4093 instead of OMP_ATOMIC_SEQ_CST.
4094 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4095 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4096 __atomic_thread_fence call with the given value.
4097 (check_omp_for_incr_expr): Formatting fixes.
4098 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4099 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4100 is not constant expression 1 or -1. Transform NE_EXPR loops
4101 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4102 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4103 loops too.
4104 (c_omp_split_clauses): Add support for combined
4105 #pragma omp parallel master and
4106 #pragma omp {,parallel }master taskloop{, simd} constructs.
4107 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4108 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4109 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4110 (c_omp_predetermined_sharing): Don't return
4111 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4112 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4113 PRAGMA_OMP_REQUIRES.
4114 * c-pragma.h (enum pragma_kind): Likewise.
4115 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4116 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4117
4118 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4119
4120 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4121
4122 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4123
4124 * c-format.c (local_cgraph_node_ptr_node): New variable.
4125 (gcc_dump_printf_char_table): Add entry for %C.
4126 (get_pointer_to_named_type): New function, taken from the handling
4127 code for "gimple *" from...
4128 (init_dynamic_diag_info): ...here. Add handling for
4129 "cgraph_node *".
4130 * c-format.h (T_CGRAPH_NODE): New.
4131
4132 2018-10-19 Jason Merrill <jason@redhat.com>
4133
4134 * c-cppbuiltin.c (c_cpp_builtins): Add
4135 __cpp_nontype_template_parameter_class.
4136
4137 2018-10-31 Nathan Sidwell <nathan@acm.org>
4138
4139 * c-opts.c (c_finish_options): Force command line macro
4140 location. Refactor to avoid repeating main debug hook.
4141 (push_command_line_include): Clarify comment.
4142
4143 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4144
4145 2018-10-30 Martin Sebor <msebor@redhat.com>
4146
4147 PR middle-end/87041
4148 * c-format.c (check_format_types): Avoid diagnosing null pointer
4149 arguments to printf-family of functions.
4150
4151 2018-10-30 Marek Polacek <polacek@redhat.com>
4152
4153 Implement P0892R2, explicit(bool).
4154 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4155
4156 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4157
4158 * name-hint.h (name_hint::take_deferred): New member function.
4159
4160 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4161
4162 PR c++/56856
4163 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4164 argument.
4165 (check_function_restrict): Rename param "argarray" to
4166 "unfolded_argarray", and make a copy named "argarray", calling
4167 fold_for_warn on each argument.
4168 (check_function_arguments): Add note about responsibility for
4169 folding the arguments.
4170
4171 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4172
4173 * c-common.c (flag_isoc2x): New variable.
4174 * c-common.h (clk_c): Update comment to reference C2X.
4175 (flag_isoc99, flag_isoc11): Update comments to reference future
4176 standard versions in general.
4177 (flag_isoc2x): Declare.
4178 * c-opts.c (set_std_c2x): New function.
4179 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4180 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4181 flag_isoc2x to 0.
4182 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4183
4184 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4185
4186 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4187 (std=iso9899:2018): Document C17 as published in 2018.
4188
4189 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4190
4191 PR c++/87364
4192 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4193
4194 2018-10-11 Will Wray <wjwray@gmail.com>
4195
4196 PR c++/87364
4197 * c-pretty-print.h (pp_c_type_cast): Prototype.
4198 (pp_c_integer_constant): Likewise.
4199 * c-pretty-print.c (pp_c_type_cast): No longer static.
4200 (pp_c_integer_constant): Likewise.
4201 (pp_c_enumeration_constant): Fix loop termination when finding
4202 name of constant. No longer returns a value. Call
4203 pp_c_integer_constant.
4204 (c_pretty_printer::constant): Update for changes to
4205 pp_c_enumeration_constant.
4206
4207 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4208
4209 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4210 for no_unique_address.
4211
4212 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4213
4214 * c-common.c (c_option_controlling_cpp_error): Rename to...
4215 (c_option_controlling_cpp_diagnostic): ...this, and convert
4216 "reason" from int to enum.
4217 (c_cpp_error): Rename to...
4218 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4219 * c-common.h (c_cpp_error): Rename to...
4220 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4221 * c-opts.c (c_common_init_options): Update for renaming.
4222
4223 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4224
4225 PR c/87286
4226 * c-common.c (vector_types_compatible_elements_p): Use
4227 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4228
4229 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4230
4231 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4232 to generate constructor destructor priority warning.
4233 * c.opt (-Wprio-ctor-dtor): New option.
4234
4235 2018-10-01 Jason Merrill <jason@redhat.com>
4236
4237 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4238
4239 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4240
4241 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4242 (dump_ada_node): Add const keyword.
4243
4244 2018-09-25 Martin Liska <mliska@suse.cz>
4245
4246 * c-common.c (c_common_truthvalue_conversion):
4247 Remove Pascal from documentation.
4248
4249 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4250
4251 * c-ada-spec.c: Include diagnostic.h.
4252 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4253
4254 2018-09-19 Marek Polacek <polacek@redhat.com>
4255
4256 * c.opt (Wclass-conversion): New.
4257
4258 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4259
4260 * c-format.c (range_label_for_format_type_mismatch::get_text):
4261 Update for new param.
4262
4263 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4264
4265 * c-format.c (format_warning_at_char): Update for introduction of
4266 format_string_diagnostic_t.
4267 (format_type_warning): Likewise.
4268
4269 2018-09-17 Martin Jambor <mjambor@suse.cz>
4270
4271 PR c/63886
4272 * c.opt (Wabsolute-value): New.
4273
4274 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4275
4276 * c-common.c (complete_flexible_array_elts): New helper function.
4277 * c-common.h (complete_flexible_array_elts): Declare.
4278
4279 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4280
4281 * c-common.c (braced_list_to_string): Remove eval parameter.
4282 Add some more checks. Always create zero-terminated STRING_CST.
4283 * c-common.h (braced_list_to_string): Adjust prototype.
4284
4285 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4286
4287 PR 87091
4288 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4289 to a tri-state.
4290 (maybe_suggest_missing_token_insertion): Likewise.
4291 (maybe_add_include_fixit): Add param "override_location". If set,
4292 and source-printing is enabled, then override the rich_location's
4293 primary location with that of the insertion point for the fix-it
4294 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4295 * c-common.h (extern void maybe_add_include_fixit): Add bool
4296 param.
4297 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4298 for conversion of show_caret_p to a tri-state.
4299 * c-warn.c (warn_for_restrict): Likewise.
4300 * known-headers.cc
4301 (suggest_missing_header::~suggest_missing_header): Update call to
4302 maybe_add_include_fixit to suggest overriding the location, as it
4303 is for a note.
4304
4305 2018-08-27 Martin Liska <mliska@suse.cz>
4306
4307 * c-common.c (check_function_restrict): Use new function
4308 fndecl_built_in_p and remove check for FUNCTION_DECL if
4309 possible.
4310 (check_builtin_function_arguments): Likewise.
4311 (reject_gcc_builtin): Likewise.
4312 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4313
4314 2018-08-26 Marek Polacek <polacek@redhat.com>
4315
4316 PR c++/87029, Implement -Wredundant-move.
4317 * c.opt (Wredundant-move): New option.
4318
4319 2018-08-21 Marek Polacek <polacek@redhat.com>
4320
4321 PR c++/86981, Implement -Wpessimizing-move.
4322 * c.opt (Wpessimizing-move): New option.
4323
4324 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4325
4326 PR other/84889
4327 * c-attribs.c (common_handle_aligned_attribute): Add
4328 auto_diagnostic_group instance.
4329 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4330 * c-opts.c (c_common_post_options): Likewise.
4331 * c-warn.c (warn_logical_not_parentheses): Likewise.
4332 (warn_duplicated_cond_add_or_warn): Likewise.
4333 (warn_for_multistatement_macros): Likewise.
4334
4335 2018-08-20 Nathan Sidwell <nathan@acm.org>
4336
4337 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4338 access.
4339
4340 2018-08-17 Nathan Sidwell <nathan@acm.org>
4341
4342 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4343 field.
4344 (laxy_hex_fp_value_count): Make unsigned.
4345 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4346 manipulate the macro.
4347 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4348 cpp_define_lazily.
4349
4350 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4351
4352 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4353 (gcc_dump_printf_length_specs): New.
4354 (gcc_dump_printf_flag_pairs): New.
4355 (gcc_dump_printf_flag_specs): New.
4356 (gcc_dump_printf_char_table): New.
4357 (format_types_orig): Add entry for "gcc_dump_printf".
4358 (init_dynamic_diag_info): Set up length_char_specs and
4359 conversion_specs for gcc_dump_printf_format_type.
4360 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4361
4362 2018-08-17 Nathan Sidwell <nathan@acm.org>
4363
4364 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4365
4366 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4367 * c-cppbuiltin.c: Likewise.
4368
4369 2018-08-17 Martin Liska <mliska@suse.cz>
4370
4371 * c.opt: Remove Warn, Init and Report for options with
4372 Ignore/Deprecated flag. Warning is done automatically for
4373 Deprecated flags.
4374
4375 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4376
4377 PR c++/70693
4378 * c-common.c (selftest::c_family_tests): Call
4379 selftest::c_indentation_c_tests.
4380 * c-common.h (selftest::c_indentation_c_tests): New decl.
4381 * c-indentation.c: Include "selftest.h".
4382 (next_tab_stop): Add "tab_width" param, rather than accessing
4383 cpp_opts.
4384 (get_visual_column): Likewise. Clarify comment. Bulletproof
4385 against reading past the end of the line.
4386 (get_first_nws_vis_column): Add "tab_width" param.
4387 (detect_intervening_unindent): Likewise.
4388 (should_warn_for_misleading_indentation): Read tab width from
4389 cpp_opts and pass around.
4390 (selftest::test_next_tab_stop): New test.
4391 (selftest::assert_get_visual_column_succeeds): New function.
4392 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4393 (selftest::assert_get_visual_column_fails): New function.
4394 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4395 (selftest::test_get_visual_column): New test.
4396 (selftest::c_indentation_c_tests): New function.
4397
4398 2018-08-16 Nathan Sidwell <nathan@acm.org>
4399
4400 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4401 (store_ada_macro): Likewise.
4402 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4403 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4404
4405 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4406
4407 * c-format.c: Include "selftest-diagnostic.h" and
4408 "gcc-rich-location.h".
4409 (format_warning_at_char): Pass NULL for new label params of
4410 format_warning_va.
4411 (class indirection_suffix): New class.
4412 (class range_label_for_format_type_mismatch): New class.
4413 (format_type_warning): Move logic for generating "*" suffix to
4414 class indirection_suffix. Create "fmt_label" and "param_label"
4415 to show their types, and pass them to the
4416 format_warning_at_substring calls.
4417 (selftest::test_type_mismatch_range_labels): New test.
4418 (selftest::c_format_c_tests): Call it.
4419
4420 2018-08-13 Martin Sebor <msebor@redhat.com>
4421
4422 PR tree-optimization/71625
4423 * c-common.c (braced_list_to_string): New function.
4424 * c-common.h (braced_list_to_string): Declare it.
4425
4426 2018-08-08 Nathan Sidwell <nathan@acm.org>
4427
4428 * c-common.c (try_to_locate_new_include_inertion_point): Use
4429 linemap_included_from_linemap.
4430 * c-lex.c (fe_file_change): Use linemap_included_from.
4431 * c-ppoutput.c (pp_file_change): Likewise.
4432
4433 2018-08-01 Martin Sebor <msebor@redhat.com>
4434
4435 PR tree-optimization/86650
4436 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
4437 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4438 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4439 * c-format.h (T89_G): Update to be "gimple *" rather than
4440 "gcall *".
4441 (local_gcall_ptr_node): Rename...
4442 (local_gimple_ptr_node): ...to this.
4443
4444 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4445
4446 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4447 table entries for gcc_diag_char_table, and the 'Z' entry from
4448 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4449 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4450 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4451 adding missing "Z" for this table. Remove erroneous "G" and "K"
4452 entries.
4453 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4454 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4455 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4456
4457 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4458
4459 * c-common.c (speculation_safe_resolve_call): New function.
4460 (speculation_safe_resolve_params): New function.
4461 (speculation_safe_resolve_return): New function.
4462 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4463 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4464 __HAVE_SPECULATION_SAFE_VALUE.
4465
4466 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4467
4468 * c-common.c (c_cpp_error): Remove redundant "line_table"
4469 parameter from call to rich_location::set_range.
4470 (maybe_suggest_missing_token_insertion): Likewise.
4471
4472 2018-07-20 Martin Sebor <msebor@redhat.com>
4473
4474 PR middle-end/82063
4475 * c.opt (-Warray-bounds): Remove redundant -Wall.
4476
4477 2018-07-20 Martin Sebor <msebor@redhat.com>
4478
4479 PR middle-end/82063
4480 * c-common.h (c_common_handle_option): Change function argument
4481 to HOST_WIDE_INT.
4482 * c-opts.c (c_common_init_options): Same.
4483 (c_common_handle_option): Same. Remove special handling of
4484 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4485 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4486 options to take a HOST_WIDE_INT argument and accept a byte-size
4487 suffix. Initialize.
4488 (-Wvla-larger-than): Same.
4489 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4490 (-Wno-vla-larger-than): Same.
4491
4492 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4493
4494 * c-attribs.c (c_common_attribute_table): Add
4495 "omp declare target implicit" attribute.
4496
4497 2018-07-12 Richard Biener <rguenther@suse.de>
4498
4499 PR c/86453
4500 * c-attribs.c (handle_packed_attribute): Do not build a variant
4501 type with TYPE_PACKED, instead ignore the attribute if we may
4502 not apply to the original type.
4503
4504 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4505
4506 PR c++/86443
4507 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4508 to contain TREE_LIST for both the original class iterator and the
4509 "last" helper var.
4510
4511 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4512
4513 * c-ada-spec.c (to_ada_name): Remove index parameter.
4514 (pp_ada_tree_identifier): Likewise.
4515 (dump_ada_macros): Adjust call to to_ada_name.
4516 (struct overloaded_name_hash): Delete.
4517 (struct overloaded_name_hasher): Likewise.
4518 (overloaded_names): Likewise.
4519 (compute_overloading_index): Likewise.
4520 (dump_ada_decl_name): Do not call compute_overloading_index and
4521 adjust calls to pp_ada_tree_identifier.
4522 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4523 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4524 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4525 (dump_ada_enum_type): Remove type and display_convention parameters.
4526 Adjust calls to pp_ada_tree_identifier.
4527 (dump_ada_node): Likewise and for dump_ada_structure.
4528 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4529 and tidy up.
4530 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4531 syntax.
4532 (print_constructor): Adjust call to pp_ada_tree_identifier.
4533 (print_destructor): Likewise.
4534 (dump_ada_declaration): Switch to aspect syntax.
4535 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4536 parameter with nested parameter.
4537 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4538 (dump_ada_specs): Do not delete overloaded_names table.
4539
4540 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4541
4542 PR target/86324
4543 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4544 target hook.
4545
4546 2018-07-05 Nathan Sidwell <nathan@acm.org>
4547
4548 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4549 NO_IMPLICIT_EXTERN_C.
4550
4551 2018-06-28 Martin Liska <mliska@suse.cz>
4552
4553 * cppspec.c: Include opt-suggestions.h.
4554
4555 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4556 Thomas Schwinge <thomas@codesourcery.com>
4557 Cesar Philippidis <cesar@codesourcery.com>
4558
4559 * c-pragma.h (enum pragma_omp_clause): Add
4560 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4561 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4562
4563 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4564
4565 PR c++/86210
4566 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4567 comment.
4568
4569 2018-06-18 Martin Sebor <msebor@redhat.com>
4570
4571 PR middle-end/85602
4572 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4573 nonstring.
4574
4575 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4576
4577 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4578
4579 2018-06-13 Jason Merrill <jason@redhat.com>
4580
4581 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4582 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4583 handling.
4584
4585 PR c++/86094 - wrong code with defaulted move ctor.
4586 * c-opts.c (c_common_post_options): Bump the current ABI version to
4587 13. Set warn_abi_version and flag_abi_compat_version to the current
4588 version rather than 0. Fix defaulting flag_abi_compat_version from
4589 warn_abi_version.
4590
4591 2018-06-12 Martin Sebor <msebor@redhat.com>
4592
4593 PR c/85931
4594 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4595 sizeof source and destination yields the same value.
4596
4597 2018-06-12 Martin Liska <mliska@suse.cz>
4598
4599 * c.opt: Make MPX-related options as Deprecated.
4600
4601 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4602
4603 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4604 rather than 0.
4605
4606 2018-06-08 Martin Liska <mliska@suse.cz>
4607
4608 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4609 for MPX (macros, related functions, fields in cgraph_node, ...).
4610 (handle_bnd_legacy): Likewise.
4611 (handle_bnd_instrument): Likewise.
4612 * c.opt: Likewise.
4613
4614 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4615
4616 PR c++/86068
4617 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4618 __cpp_transactional_memory to 201500 instead of 210500.
4619
4620 2018-06-06 Jason Merrill <jason@redhat.com>
4621
4622 PR c++/85710 - ICE with -Wmemset-elt-size.
4623 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4624
4625 2018-06-01 Jason Merrill <jason@redhat.com>
4626
4627 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4628 201703.
4629
4630 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4631
4632 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4633 declaration for a typedef independently of whether the declaration of
4634 the subtype is generated.
4635
4636 2018-05-31 Martin Sebor <msebor@redhat.com>
4637
4638 PR c/82063
4639 * c.opt (-Wno-alloc-size-larger-than): New option.
4640
4641 2018-04-22 David Pagan <dave.pagan@oracle.com>
4642
4643 PR c/55976
4644 * c-opts.c (c_common_post_options): Set default for warn_return_type
4645 for C++/C++ with ObjC extensions only. For C, makes it possible to
4646 differentiate between default (no option), -Wreturn-type, and
4647 -Wno-return-type.
4648
4649 2018-05-29 Jason Merrill <jason@redhat.com>
4650
4651 * c.opt (Winit-list-lifetime): New flag.
4652
4653 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4654
4655 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4656 splay_tree_delete_pointers.
4657
4658 2018-05-26 Jakub Jelinek <jakub@redhat.com>
4659
4660 PR bootstrap/85921
4661 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4662 noinline variable to workaround broken kernel headers.
4663
4664 2018-05-18 Jason Merrill <jason@redhat.com>
4665
4666 * c.opt (Wdeprecated-copy): New flag.
4667
4668 2018-05-17 Martin Liska <mliska@suse.cz>
4669
4670 * c-warn.c (overflow_warning): Do not use
4671 space in between 'G_' and '('.
4672
4673 2018-05-09 Jason Merrill <jason@redhat.com>
4674
4675 * c-common.c (valid_array_size_p): Add complain parameter.
4676 * c-common.h: ...which defaults to true.
4677
4678 2018-05-11 Jakub Jelinek <jakub@redhat.com>
4679
4680 PR c/85696
4681 * c-omp.c (c_omp_predetermined_sharing): Return
4682 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4683
4684 2018-05-11 Martin Liska <mliska@suse.cz>
4685
4686 PR sanitizer/85556
4687 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4688 TREE_LIST values.
4689
4690 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4691
4692 PR c++/85662
4693 * c-common.h (fold_offsetof_1): Removed.
4694 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4695 CTX argument defaulted to ERROR_MARK.
4696 * c-common.c (fold_offsetof_1): Renamed to ...
4697 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4698 argument, convert the pointer constant to TYPE and use size_binop
4699 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4700 a pointer type. Adjust recursive calls.
4701
4702 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4703
4704 PR c++/85400
4705 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4706
4707 2018-05-07 Nathan Sidwell <nathan@acm.org>
4708
4709 * c.opt (ffor-scope): Remove functionality, issue warning.
4710
4711 2018-05-03 Nathan Sidwell <nathan@acm.org>
4712
4713 * c.opt (ffriend-injection): Remove functionality, issue warning.
4714
4715 2018-05-01 David Malcolm <dmalcolm@redhat.com>
4716
4717 PR c/84258
4718 * c-format.c (struct format_check_results): Add field
4719 "number_non_char".
4720 (check_format_info): Initialize it, and warn if encountered.
4721 (check_format_arg): Distinguish between wide char and
4722 everything else when detecting arrays of non-char.
4723
4724 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4725
4726 * c-format.c (get_corrected_substring): Update for
4727 location_get_source_line returning a char_span. Use a char_span
4728 when handling the prefix of the correction.
4729 * c-indentation.c (get_visual_column): Update for
4730 location_get_source_line returning a char_span.
4731 (get_first_nws_vis_column): Likewise.
4732
4733 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4734
4735 PR c++/84269
4736 * known-headers.cc (get_stdlib_header_for_name): Add various names
4737 from <assert.h>, <string.h>, and <memory.h>; add more names from
4738 <stdio.h>.
4739
4740 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4741
4742 PR c++/85061
4743 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4744 get_base_address of the second operand is a VAR_P, rather than the
4745 operand itself, and use gcc_checking_assert instead of gcc_assert.
4746
4747 2018-03-23 Marek Polacek <polacek@redhat.com>
4748
4749 PR c++/85045
4750 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4751 <case RDIV_EXPR>: Tweak condition.
4752
4753 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4754
4755 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4756
4757 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4758
4759 PR c/84909
4760 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4761 diagnostics.
4762
4763 PR c/84910
4764 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4765 diagnostics.
4766
4767 2018-03-16 Richard Biener <rguenther@suse.de>
4768
4769 PR c/84873
4770 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4771 unshare the possibly folded expression.
4772
4773 2018-03-15 Richard Biener <rguenther@suse.de>
4774
4775 PR c/84873
4776 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4777
4778 2018-03-13 Martin Sebor <msebor@redhat.com>
4779
4780 PR tree-optimization/84725
4781 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4782 with all three narrow character types, including their qualified forms.
4783
4784 2018-03-12 Martin Sebor <msebor@redhat.com>
4785
4786 PR tree-optimization/83456
4787 * c-common.c (check_function_restrict): Return bool.
4788 Restore checking of bounded built-in functions.
4789 (check_function_arguments): Also return the result
4790 of warn_for_restrict.
4791 * c-common.c (check_function_restrict): Return bool.
4792 * c-warn.c (warn_for_restrict): Return bool.
4793
4794 2018-03-02 Marek Polacek <polacek@redhat.com>
4795
4796 PR c++/84171
4797 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4798 is erroneous.
4799
4800 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4801
4802 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4803 function".
4804
4805 2018-03-01 Marek Polacek <polacek@redhat.com>
4806
4807 PR c++/84639
4808 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4809 alignment in computation.
4810
4811 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4812
4813 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4814 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4815
4816 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4817
4818 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4819 (is_char_array): Take a type instead of a declaration.
4820 (dump_ada_array_type): Likewise.
4821 (is_simple_enum): Minor tweak.
4822 (dump_ada_enum_type): New function extracted from...
4823 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4824 <INTEGER_TYPE>: Remove unreachable code.
4825 <RECORD_TYPE>: Likewise. Minor tweaks.
4826 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4827 <ENUMERAL_TYPE>: New case.
4828 <RECORD_TYPE>: Factor out common code.
4829 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4830 Minor tweaks. Deal with enumeral types.
4831 (dump_ada_structure): Minor tweaks.
4832
4833 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4834
4835 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4836 address for incomplete structures.
4837 (dump_forward_type): Do not bail out for incomplete structures.
4838 (dump_ada_declaration): Do not special-case incomplete structures
4839 for subtypes. Dump them as null records for types.
4840
4841 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4842
4843 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4844 (is_char_array): Fix formatting.
4845 (dump_template_types): Likewise.
4846 (dump_generic_ada_node): Rename into...
4847 (dump_ada_node): ...this.
4848 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4849 incomplete structures and not for empty structures. Do not use it
4850 when forward declarations are needed.
4851 (dump_forward_type): New function.
4852 (dump_nested_types): Remove FORWARD parameter. Do not consider
4853 TREE_VISITED and do not generate a forward declaration. Only dump
4854 original nested types for nested declaration.
4855 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4856 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4857 <RECORD_TYPE>: Do not consider TREE_VISITED.
4858 (dump_ada_declaration): Use booleans and fix formatting throughout.
4859 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4860 Call dump_forward_type instead of dump_nested_types for a typedef.
4861 Remove superfluous check and adjust call to dump_nested_types.
4862 <POINTER_TYPE>: Call dump_forward_type and fall through.
4863 (dump_ada_struct_decl): Rename into...
4864 (dump_ada_structure): ...this. Do not special-case empty structures.
4865
4866 2018-02-27 Martin Sebor <msebor@redhat.com>
4867
4868 PR c++/83871
4869 * c.opt (-Wmissing-attributes): New option.
4870
4871 2018-02-21 Martin Liska <mliska@suse.cz>
4872
4873 * c.opt (Wcatch-value=): Add IntegerRange.
4874
4875 2018-02-15 Jason Merrill <jason@redhat.com>
4876
4877 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4878
4879 2018-02-09 Nathan Sidwell <nathan@acm.org>
4880
4881 PR c/84293
4882 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4883 arg.
4884 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4885 arg. Adjust.
4886
4887 2018-02-09 Martin Sebor <msebor@redhat.com>
4888
4889 PR lto/84212
4890 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4891 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4892 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4893 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4894 (-Wuninitialized): Same.
4895
4896 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4897
4898 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4899 keyword for components.
4900
4901 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4902
4903 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4904
4905 2018-02-02 Julia Koval <julia.koval@intel.com>
4906
4907 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4908
4909 2018-01-29 Marek Polacek <polacek@redhat.com>
4910
4911 PR c/83966
4912 * c-format.c (check_function_format): Check current_function_decl.
4913
4914 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4915
4916 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4917 argument.
4918 (LAZY_HEX_FP_VALUES_CNT): Define.
4919 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4920 values rather than just 12.
4921 (builtin_define_with_hex_fp_value): Likewise.
4922
4923 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4924
4925 PR other/70268
4926 * c.opt (-fmacro-prefix-map): New option.
4927 * c-opts.c (c_common_handle_option): Handle it.
4928 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4929 * c-ppoutput.c (init_pp_output): Likewise.
4930
4931 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4932
4933 PR c++/83814
4934 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4935
4936 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4937
4938 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4939 Skip 'f' and 'F' characters if it is true.
4940 (store_ada_macro): Minor tweak.
4941 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4942 <CPP_WSTRING>: Likewise.
4943 <CPP_STRING>: Output '&' in the buffer if not the first string.
4944 <CPP_NUMBER>: Adjust calls to dump_number.
4945
4946 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4947
4948 PR c++/43486
4949 * c-common.c: Include "selftest.h".
4950 (get_atomic_generic_size): Perform the test for integral type
4951 before the range test for any integer constant, fixing indentation
4952 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4953 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4954 (selftest::test_fold_for_warn): New function.
4955 (selftest::c_common_c_tests): New function.
4956 (selftest::c_family_tests): Call it, and
4957 selftest::c_pretty_print_c_tests.
4958 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4959 * c-format.c (check_format_arg): Convert VAR_P check to a
4960 fold_for_warn.
4961 * c-pretty-print.c: Include "selftest.h".
4962 (pp_c_cast_expression): Don't print casts for location wrappers.
4963 (selftest::assert_c_pretty_printer_output): New function.
4964 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4965 (selftest::test_location_wrappers): New function.
4966 (selftest::c_pretty_print_c_tests): New function.
4967 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4968
4969 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4970 Alan Hayward <alan.hayward@arm.com>
4971 David Sherwood <david.sherwood@arm.com>
4972
4973 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4974
4975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4976 Alan Hayward <alan.hayward@arm.com>
4977 David Sherwood <david.sherwood@arm.com>
4978
4979 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4980 as polynomial.
4981
4982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4983 Alan Hayward <alan.hayward@arm.com>
4984 David Sherwood <david.sherwood@arm.com>
4985
4986 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4987 (convert_vector_to_array_for_subscript): Handle polynomial
4988 TYPE_VECTOR_SUBPARTS.
4989 (c_common_type_for_mode): Check valid_vector_subparts_p.
4990 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4991 VECTOR_CST_NELTS.
4992
4993 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4994
4995 Update copyright years.
4996
4997 2017-12-22 Mike Stump <mikestump@comcast.net>
4998 Eric Botcazou <ebotcazou@adacore.com>
4999
5000 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5001 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5002
5003 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
5004
5005 PR debug/83527
5006 PR debug/83419
5007 * c-semantics.c (only_debug_stmts_after_p): New.
5008 (pop_stmt_list): Clear side effects in debug-only stmt list.
5009 Check for single nondebug stmt followed by debug stmts only.
5010
5011 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
5012
5013 PR debug/83419
5014 * c-semantics.c (pop_stmt_list): Propagate side effects from
5015 single nondebug stmt to container list.
5016
5017 2017-12-19 Jakub Jelinek <jakub@redhat.com>
5018
5019 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5020 conditions with typical order conditions.
5021
5022 2017-12-18 Marek Polacek <polacek@redhat.com>
5023
5024 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5025 not in effect.
5026
5027 2017-12-17 Martin Sebor <msebor@redhat.com>
5028
5029 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5030 an error for attribute warn_if_not_aligned.
5031
5032 2017-12-16 Martin Sebor <msebor@redhat.com>
5033
5034 PR tree-optimization/78918
5035 * c-common.c (check_function_restrict): Avoid checking built-ins.
5036 * c.opt (-Wrestrict): Include in -Wall.
5037
5038 2017-12-15 Jakub Jelinek <jakub@redhat.com>
5039
5040 * c-attribs.c (c_common_attribute_table,
5041 c_common_format_attribute_table): Swap affects_type_identity
5042 and handler fields, adjust comments.
5043
5044 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5045
5046 * c.opt (Wcast-function-type): New warning option.
5047 * c-lex.c (get_fileinfo): Avoid warning.
5048 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5049
5050 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
5051
5052 PR middle_end/79538
5053 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5054 Adjust the size of buf1 and buf2, add a new buf to avoid
5055 format-overflow warning.
5056
5057 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5058
5059 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5060 subsequent statement list.
5061
5062 2017-12-07 Martin Sebor <msebor@redhat.com>
5063
5064 PR c/81544
5065 PR c/81566
5066 * c-attribs.c (attr_aligned_exclusions): New array.
5067 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5068 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5069 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5070 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5071 (attr_warn_unused_result_exclusions): Same.
5072 (handle_hot_attribute, handle_cold_attribute): Simplify.
5073 (handle_const_attribute): Warn on function returning void.
5074 (handle_pure_attribute): Same.
5075 (handle_aligned_attribute): Diagnose conflicting attribute
5076 specifications.
5077 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5078
5079 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5080
5081 PR c/83236
5082 * c-common.c (selftest::c_family_tests): Call
5083 selftest::c_spellcheck_cc_tests.
5084 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5085 * c-spellcheck.cc: Include "selftest.h".
5086 (name_reserved_for_implementation_p): New function.
5087 (should_suggest_as_macro_p): New function.
5088 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5089 should_suggest_as_macro_p and call it.
5090 (selftest::test_name_reserved_for_implementation_p): New function.
5091 (selftest::c_spellcheck_cc_tests): New function.
5092 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5093
5094 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5095
5096 * c-spellcheck.cc: New file, taken from macro-handling code in
5097 spellcheck-tree.c.
5098 * c-spellcheck.h: New file, taken from macro-handling code in
5099 spellcheck-tree.h.
5100
5101 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5102
5103 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5104 attribute.
5105 (handle_simd_attribute): Don't check for "cilk simd function"
5106 attribute. Reindent, formatting changes.
5107
5108 2017-11-30 Julia Koval <julia.koval@intel.com>
5109
5110 * c-common.h (inv_list): Remove.
5111
5112 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5113
5114 PR sanitizer/81275
5115 * c-common.c (c_switch_covers_all_cases_p_1,
5116 c_switch_covers_all_cases_p): New functions.
5117 * c-common.h (c_switch_covers_all_cases_p): Declare.
5118
5119 2017-11-28 Julia Koval <julia.koval@intel.com>
5120 Sebastian Peryt <sebastian.peryt@intel.com>
5121
5122 * array-notation-common.c: Delete.
5123 * c-cilkplus.c: Ditto.
5124 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5125 * c-common.def (ARRAY_NOTATION_REF): Remove.
5126 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5127 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5128 c_validate_cilk_plus_loop, cilkplus_an_parts,
5129 cilk_ignorable_spawn_rhs_op,
5130 cilk_recognize_spawn): Remove.
5131 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5132 * c-omp.c: Remove CILK_SIMD check.
5133 * c-pragma.c: Ditto.
5134 * c-pragma.h: Remove CILK related pragmas.
5135 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5136 ARRAY_NOTATION_REF condition.
5137 (c_pretty_printer::expression): Ditto.
5138 * c.opt (fcilkplus): Remove.
5139 * cilk.c: Delete.
5140
5141 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5142
5143 * c-pretty-print.c (pp_c_additive_expression,
5144 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5145
5146 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5147
5148 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5149
5150 PR c++/83059
5151 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5152 instead of tree_to_uhwi, formatting fix.
5153
5154 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5155
5156 PR c/81404
5157 * known-headers.cc: New file, based on material from c/c-decl.c.
5158 (suggest_missing_header): Copied as-is.
5159 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5160 heavily edited to add C++ support. Add some knowledge about
5161 <limits.h>, <stdint.h>, and <wchar.h>.
5162 * known-headers.h: Likewise.
5163
5164 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5165
5166 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5167 (lookup_name_fuzzy): Likewise. Convert return type from
5168 const char * to name_hint. Add location_t param.
5169 * name-hint.h: New header.
5170
5171 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5172
5173 PR c/66618
5174 PR c/69960
5175 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5176
5177 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5178
5179 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5180 expected publication date of C17.
5181 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5182
5183 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5184
5185 PR c/81156
5186 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5187 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5188
5189 2017-11-10 Martin Sebor <msebor@redhat.com>
5190
5191 PR c/81117
5192 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5193 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5194 * c.opt (-Wstringop-truncation): New option.
5195
5196 2017-11-06 Martin Liska <mliska@suse.cz>
5197
5198 PR middle-end/82404
5199 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5200 FE.
5201 * c.opt: Set default value of warn_return_type.
5202
5203 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5204
5205 * c-common.c (binary_op_error): Update for renaming of
5206 error_at_rich_loc.
5207 (c_parse_error): Likewise.
5208 * c-warn.c (warn_logical_not_parentheses): Likewise for
5209 renaming of inform_at_rich_loc.
5210 (warn_for_restrict): Likewise for renaming of
5211 warning_at_rich_loc_n.
5212
5213 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5214
5215 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5216 * c-opts.c (set_std_c17): New function.
5217 (c_common_init_options): Use gnu17 as default C version.
5218 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5219
5220 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5221
5222 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5223 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5224 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5225 __FP_FAST_FMA<N>X.
5226
5227 2017-10-23 Marek Polacek <polacek@redhat.com>
5228
5229 PR c/82681
5230 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5231
5232 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5233
5234 * c-common.c (check_builtin_function_arguments): Also check arguments
5235 of __builtin_alloca_with_align_and_max.
5236
5237 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5238
5239 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5240 rather than NULL to format_warning_va.
5241 (check_format_types): Likewise when calling format_type_warning.
5242 Remove code to extract source_ranges and source_range * in favor
5243 of just a location_t.
5244 (format_type_warning): Convert source_range * param to a
5245 location_t.
5246
5247 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5248
5249 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5250 [LR]SHIFT_EXPR.
5251
5252 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5253
5254 * c-common.c (enum missing_token_insertion_kind): New enum.
5255 (get_missing_token_insertion_kind): New function.
5256 (maybe_suggest_missing_token_insertion): New function.
5257 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5258
5259 2017-10-11 Nathan Sidwell <nathan@acm.org>
5260
5261 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5262 (c_common_handle_option): Update incpath_kind names.
5263
5264 2017-10-11 Martin Liska <mliska@suse.cz>
5265
5266 PR sanitizer/82490
5267 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5268 Wattributes warning.
5269
5270 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5271
5272 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5273 operating on trees as wide_ints.
5274 * c-common.c (pointer_int_sum): Likewise.
5275 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5276 * c-warn.c (match_case_to_enum_1): Likewise.
5277 (c_do_switch_warnings): Likewise.
5278 (maybe_warn_shift_overflow): Likewise.
5279
5280 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5281
5282 PR c/82437
5283 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5284 instead of wide_int::from.
5285
5286 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5287
5288 PR c/82437
5289 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5290 using to_widest use wide_int with the larger of the two precisions.
5291
5292 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5293
5294 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5295 functions.
5296
5297 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5298
5299 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5300 when combining the original unconverted comparison operands.
5301
5302 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5303
5304 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5305 attribute.
5306
5307 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5308
5309 * c-ada-spec.c (to_ada_name): Add index parameter.
5310 (pp_ada_tree_identifier): Likewise.
5311 (dump_ada_macros): Adjust call to to_ada_name.
5312 (struct overloaded_name_hash): New type.
5313 (struct overloaded_name_hasher): Likewise.
5314 (overloaded_names): New hash table.
5315 (compute_overloading_index): New function.
5316 (dump_ada_decl_name): Call it and pass the result to
5317 pp_ada_tree_identifier.
5318 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5319 (dump_ada_function_declaration): Likewise.
5320 (dump_generic_ada_node): Likewise.
5321 (print_constructor): Likewise.
5322 (print_destructor): Likewise.
5323 (dump_ada_specs): Delete overloaded_names table.
5324
5325 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5326
5327 * c-ada-spec.c (max_ada_macros): Move around.
5328 (store_ada_macro_index): Likewise.
5329 (source_file): Rename into...
5330 (macro_source_file): ...this.
5331 (count_ada_macro): Move around.
5332 (store_ada_macro): Likewise.
5333 (compare_macro): Likewise.
5334 (print_ada_macros): Merge in...
5335 (dump_ada_macros): ...this.
5336 (source_file_base): Rename into...
5337 (current_source_file): ...this.
5338 (print_comment): Move around.
5339 (dump_ada_nodes): Call dump_ada_declaration directly.
5340 (struct with): Change type of limited field to bool.
5341 (append_withs): Change type of limited_access parameter to bool.
5342 (pp_ada_tree_identifie): Likewise.
5343 (dump_ada_decl_nam): Likewise.
5344 (dump_generic_ada_node): Likewise. Do not print the return type.
5345 (to_ada_name): Change type of space_found parameter to bool.
5346 (dump_ada_function_declaration): Return void and change type of
5347 parameters to bool. Also print the return type for a function.
5348 (print_ada_methods): Rename into...
5349 (dump_ada_methods): ...this.
5350 (print_ada_declaration): Rename into ...
5351 (dump_ada_declaration): ...this. Do not print the return type.
5352 (print_ada_struct_decl): Rename into...
5353 (dump_ada_struct_decl): ...this.
5354
5355 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5356
5357 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5358 rather than DECL_INITIAL.
5359 (common_handle_aligned_attribute): Likewise.
5360
5361 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5362
5363 * c.opt (gen-decls): Add RejectNegative.
5364
5365 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5366 Jakub Jelinek <jakub@redhat.com>
5367
5368 Add support for -std=c++2a.
5369 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5370 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5371 * c-opts.c (set_std_cxx2a): New.
5372 (c_common_handle_option): Set options when -std=c++2a is enabled.
5373 (c_common_post_options): Adjust comments.
5374 (set_std_cxx14, set_std_cxx17): Likewise.
5375
5376 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5377
5378 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5379 message for non-uniform endianness and issue a warning in C++.
5380
5381 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5382
5383 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5384 (Wc++17-compat): Change from undocumented alias to option.
5385 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5386 change C++1z to C++17 in description.
5387 (std=c++1z, std=gnu++1z): Change from option to undocumented
5388 deprecated alias.
5389 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5390 Adjust description.
5391 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5392 * c-opts.c (set_std_cxx1z): Rename to ...
5393 (set_std_cxx17): ... this.
5394 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5395 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5396 caller.
5397 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5398 comments.
5399
5400 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5401
5402 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5403 function alignment if warn_if_not_aligned_p is true.
5404
5405 2017-09-12 Nathan Sidwell <nathan@acm.org>
5406
5407 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5408 resort_sorted_fields): Move to c/c-decl.c.
5409 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5410 (struct sorted_fields_type): Move to c/c-lang.h.
5411
5412 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5413
5414 PR c++/81852
5415 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5416
5417 2017-09-04 Marek Polacek <polacek@redhat.com>
5418
5419 PR c/81783
5420 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5421 (warn_tautological_cmp): Call it.
5422
5423 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5424
5425 * c-opts.c (c_common_finish): Write dependency information even if
5426 there are errors.
5427
5428 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5429
5430 PR c/81887
5431 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5432 (omp_pragmas_simd): ... here.
5433 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5434 create new clauses list containing just simd clause.
5435
5436 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5437 Alan Hayward <alan.hayward@arm.com>
5438 David Sherwood <david.sherwood@arm.com>
5439
5440 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5441 into scalar_mode_supported_p call.
5442 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5443
5444 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5445 Alan Hayward <alan.hayward@arm.com>
5446 David Sherwood <david.sherwood@arm.com>
5447
5448 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5449 for the mode iterator.
5450
5451 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5452 Alan Hayward <alan.hayward@arm.com>
5453 David Sherwood <david.sherwood@arm.com>
5454
5455 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5456 * c-common.c (c_build_vec_perm_expr): Likewise.
5457
5458 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5459 Alan Hayward <alan.hayward@arm.com>
5460 David Sherwood <david.sherwood@arm.com>
5461
5462 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5463
5464 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5465 Alan Hayward <alan.hayward@arm.com>
5466 David Sherwood <david.sherwood@arm.com>
5467
5468 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5469 before calling targetm.addr_space.valid_pointer_mode.
5470
5471 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5472 Alan Hayward <alan.hayward@arm.com>
5473 David Sherwood <david.sherwood@arm.com>
5474
5475 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5476
5477 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5478 Alan Hayward <alan.hayward@arm.com>
5479 David Sherwood <david.sherwood@arm.com>
5480
5481 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5482 iterators.
5483 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5484
5485 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5486 Alan Hayward <alan.hayward@arm.com>
5487 David Sherwood <david.sherwood@arm.com>
5488
5489 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5490 case statements.
5491
5492 2017-08-29 Martin Liska <mliska@suse.cz>
5493
5494 PR other/39851
5495 * c-common.c (parse_optimize_options): Add argument to function
5496 call.
5497 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5498
5499 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5500
5501 * c-lex.c (interpret_float): Use token location
5502 when building an EXCESS_PRECISION_EXPR.
5503
5504 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5505
5506 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5507 it to check_function_format.
5508 * c-common.h (check_function_arguments): Add vec<location_t> *
5509 param.
5510 (check_function_format): Likewise.
5511 * c-format.c (struct format_check_context): Add field "arglocs".
5512 (check_function_format): Add param "arglocs"; pass it to
5513 check_format_info.
5514 (check_format_info): Add param "arglocs"; use it to initialize
5515 new field of format_ctx.
5516 (check_format_arg): Pass format_ctx->arglocs to new param of
5517 check_format_info_main.
5518 (class argument_parser): New field "arglocs".
5519 (argument_parser::argument_parser): Add "arglocs_" param and use
5520 it to initialize new field.
5521 (argument_parser::check_argument_type): Pass new arglocs field to
5522 check_format_types.
5523 (check_format_info_main): Add param "arglocs", and use it when
5524 constructing arg_parser.
5525 (check_format_types): Add param "arglocs"; use it if non-NULL when
5526 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5527
5528 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5529
5530 PR c/53037
5531 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5532 (c_common_attribute_table): Add warn_if_not_aligned.
5533 (handle_aligned_attribute): Renamed to ...
5534 (common_handle_aligned_attribute): Remove argument, name, and add
5535 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5536 (handle_aligned_attribute): New.
5537 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5538
5539 2017-08-14 Martin Sebor <msebor@redhat.com>
5540
5541 PR c/81117
5542 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5543 (handle_nonstring_attribute): New function.
5544
5545 2017-08-14 Martin Sebor <msebor@redhat.com>
5546
5547 PR c/81117
5548 * c-format.h (T89_G): New macro.
5549 * c-format.c (local_gcall_ptr_node): New variable.
5550 (init_dynamic_diag_info): Initialize it.
5551
5552 2017-08-11 Martin Liska <mliska@suse.cz>
5553
5554 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5555 TARGET_SUPPORTS_ALIASES.
5556
5557 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5558
5559 * c-common.c (c_parse_error): Add rich_location * param, using it
5560 rather implicitly using input_location.
5561 * c-common.h (c_parse_error): Add rich_location * param.
5562
5563 2017-08-09 Marek Polacek <polacek@redhat.com>
5564
5565 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5566 (c_common_truthvalue_conversion): Likewise.
5567 * c-omp.c (c_finish_omp_atomic): Likewise.
5568 * c-common.h (build_binary_op): Update declaration.
5569
5570 2017-08-08 Martin Liska <mliska@suse.cz>
5571
5572 * c-ada-spec.c: Include header files.
5573 * c-ubsan.c: Likewise.
5574 * c-warn.c: Likewise.
5575
5576 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5577
5578 PR c/69389
5579 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5580
5581 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5582
5583 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5584 (print_ada_methods): Likewise.
5585 (print_ada_declaration): Likewise.
5586
5587 2017-08-07 Martin Liska <mliska@suse.cz>
5588
5589 * array-notation-common.c: Add new includes.
5590 * c-format.c( handle_format_attribute): Canonicalize a format
5591 function name.
5592 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5593 attribute.
5594 * c-pretty-print.c: Add new include.
5595
5596 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5597
5598 * c-ada-spec.c (has_static_fields): Look only into variables.
5599 (print_constructor): Add TYPE parameter and use it for the name.
5600 (print_destructor): Likewise.
5601 (print_ada_declaration): Adjust to new constructor/destructor names.
5602 Adjust calls to print_constructor and print_destructor.
5603 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5604 Look only into variables in the final loop.
5605
5606 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5607
5608 * c-ada-spec.c (has_static_fields): Look only into fields.
5609 (dump_generic_ada_node): Small tweak.
5610 (dump_nested_types): Look only into fields.
5611 (print_ada_declaration): Look only into methods. Small tweak.
5612 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5613
5614 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5615
5616 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5617 (dump_ada_function_declaration): Likewise.
5618 (dump_generic_ada_node): Likewise.
5619 (print_ada_declaration): Add support for const-qualified variables.
5620
5621 2017-07-31 Martin Liska <mliska@suse.cz>
5622
5623 PR sanitize/81530
5624 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5625 Guard condition with flag_sanitize_p also with current_function_decl
5626 non-null equality.
5627 (ubsan_maybe_instrument_reference_or_call): Likewise.
5628
5629 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
5630
5631 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5632
5633 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5634
5635 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5636 for enumeral types.
5637 (print_ada_declaration): Add missing guard for record types.
5638
5639 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5640
5641 PR c/45784
5642 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5643 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5644 new COMPOUND_EXPRs around the rhs of the comparison.
5645
5646 2017-07-27 Marek Polacek <polacek@redhat.com>
5647
5648 PR c/81417
5649 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5650 the types.
5651
5652 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5653
5654 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5655 (handle_noipa_attribute): New function.
5656
5657 2017-07-07 Torsten Duwe <duwe@suse.de>
5658
5659 * c-attribs.c (c_common_attribute_table): Add entry for
5660 "patchable_function_entry".
5661
5662 2017-07-20 Nathan Sidwell <nathan@acm.org>
5663
5664 Remove TYPE_METHODS.
5665 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5666 dump_ada_template, print_ada_methods,
5667 print_ada_declaration): Member fns are on TYPE_FIELDS.
5668
5669 2017-07-18 Nathan Sidwell <nathan@acm.org>
5670
5671 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5672
5673 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5674
5675 * c-common.c (try_to_locate_new_include_insertion_point): New
5676 function.
5677 (per_file_includes_t): New typedef.
5678 (added_includes_t): New typedef.
5679 (added_includes): New variable.
5680 (maybe_add_include_fixit): New function.
5681 * c-common.h (maybe_add_include_fixit): New decl.
5682
5683 2017-07-10 Martin Sebor <msebor@redhat.com>
5684
5685 PR other/81345
5686 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5687
5688 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5689
5690 * c-common.c (selftest::c_family_tests): New.
5691 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5692 (selftest::c_family_tests): New decl.
5693
5694 2017-07-04 Marek Polacek <polacek@redhat.com>
5695
5696 PR c/81231
5697 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5698 types.
5699
5700 2017-07-04 Marek Polacek <polacek@redhat.com>
5701
5702 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5703
5704 2017-06-28 Martin Liska <mliska@suse.cz>
5705
5706 PR ipa/81128
5707 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5708 to a function declaration.
5709
5710 2017-06-28 Martin Liska <mliska@suse.cz>
5711
5712 PR driver/79659
5713 * c.opt: Add IntegerRange to various options.
5714
5715 2017-06-26 Marek Polacek <polacek@redhat.com>
5716
5717 PR c/80116
5718 * c-common.h (warn_for_multistatement_macros): Declare.
5719 * c-warn.c: Include "c-family/c-indentation.h".
5720 (warn_for_multistatement_macros): New function.
5721 * c.opt (Wmultistatement-macros): New option.
5722 * c-indentation.c (guard_tinfo_to_string): No longer static.
5723 Change the parameter type to "enum rid". Handle RID_SWITCH.
5724 * c-indentation.h (guard_tinfo_to_string): Declare.
5725
5726 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5727
5728 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5729
5730 2017-06-15 Martin Sebor <msebor@redhat.com>
5731
5732 PR c++/80560
5733 * c.opt (-Wclass-memaccess): New option.
5734
5735 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5736
5737 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5738
5739 2017-06-13 Marek Polacek <polacek@redhat.com>
5740
5741 PR objc/80949
5742 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5743 branches is null.
5744
5745 2017-06-13 Martin Liska <mliska@suse.cz>
5746
5747 PR sanitize/78204
5748 * c-attribs.c (add_no_sanitize_value): New function.
5749 (handle_no_sanitize_attribute): Likewise.
5750 (handle_no_sanitize_address_attribute): Use the function.
5751 (handle_no_sanitize_thread_attribute): New function.
5752 (handle_no_address_safety_analysis_attribute): Use
5753 add_no_sanitize_value.
5754 (handle_no_sanitize_undefined_attribute): Likewise.
5755 * c-common.h: Declare new functions.
5756 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5757 (ubsan_instrument_shift): Likewise.
5758 (ubsan_instrument_bounds): Likewise.
5759 (ubsan_maybe_instrument_array_ref): Likewise.
5760 (ubsan_maybe_instrument_reference_or_call): Likewise.
5761
5762 2017-06-11 Jason Merrill <jason@redhat.com>
5763
5764 * c-ada-spec.c, c-pragma.c: Use id_equal.
5765
5766 2017-06-04 Marek Polacek <polacek@redhat.com>
5767
5768 PR c/80919
5769 * c-format.c (matching_type_p): Return false if any of the types
5770 requires structural equality.
5771
5772 2017-06-02 Martin Sebor <msebor@redhat.com>
5773
5774 PR c/80892
5775 * c-warn.c (conversion_warning): Use -Wconversion for integer
5776 conversion and -Wfloat-conversion for floating one.
5777
5778 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5779
5780 * c.opt (Wsizeof-pointer-div): New warning option.
5781
5782 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5783
5784 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5785 (Wcatch-value=1): Enable by -Wall.
5786
5787 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5788
5789 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5790 format_chars.
5791 * c.opt (fdiagnostics-show-template-tree): New option.
5792 (felide-type): New option.
5793
5794 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5795
5796 * c.opt (Wcatch-value=): New C++ warning flag.
5797
5798 2017-05-24 Nathan Sidwell <nathan@acm.org>
5799
5800 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5801 const casts to avoid warning.
5802
5803 2017-05-24 Martin Sebor <msebor@redhat.com>
5804
5805 PR c/80731
5806 * c-common.h (unsafe_conversion_p): Add a function argument.
5807 * c-common.c (unsafe_conversion_p): Same.
5808 Add type names and values to diagnostics.
5809 (scalar_to_vector): Adjust.
5810 * c-warn.c (constant_expression_error): Add a function argument.
5811 Add type names and values to diagnostics.
5812 (conversion_warning): Add a function argument.
5813 Add type names and values to diagnostics.
5814 (warnings_for_convert_and_check): Same.
5815
5816 2017-05-19 Jason Merrill <jason@redhat.com>
5817
5818 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5819 enumerators.
5820
5821 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5822
5823 * c-format.c (locus): Move out of function scope,
5824 add GTY attribute.
5825
5826 2017-05-19 Nathan Sidwell <nathan@acm.org>
5827
5828 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5829 (c_common_parse_file): Remove class dump handling.
5830 (get_dump_info): Likewise.
5831
5832 2017-05-19 Richard Biener <rguenther@suse.de>
5833
5834 PR c++/80593
5835 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5836 to alias-set zero memory.
5837
5838 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5839
5840 * c-format.c (local_tree_type_node): Add GTY attribute.
5841
5842 2017-05-18 Marek Polacek <polacek@redhat.com>
5843
5844 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5845 (c_common_fixed_point_type_for_size): Likewise.
5846 (c_common_type_for_mode): Likewise.
5847 (shorten_compare): Likewise.
5848 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5849 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5850
5851 2017-05-18 Marek Polacek <polacek@redhat.com>
5852
5853 * c-common.c (self_promoting_args_p): Change the return type to bool.
5854 Use false/true instead of 0/1.
5855 * c-common.h (self_promoting_args_p): Update.
5856
5857 2017-05-17 Marek Polacek <polacek@redhat.com>
5858
5859 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5860 * c-warn.c: Likewise.
5861
5862 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5863
5864 Implement new C++ intrinsics __is_assignable and __is_constructible.
5865 * c-common.c (__is_assignable, __is_constructible): New.
5866 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5867
5868 2017-05-17 Martin Liska <mliska@suse.cz>
5869
5870 * c-common.h: Introduce dump_flags_t type and
5871 use it instead of int type.
5872 * c-gimplify.c (c_genericize): Likewise.
5873 * c-opts.c: Likewise.
5874
5875 2017-05-17 Marek Polacek <polacek@redhat.com>
5876
5877 * c-common.c (c_save_expr): Remove.
5878 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5879 * c-common.h (c_save_expr): Remove declaration.
5880
5881 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5882
5883 PR c/35441
5884 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5885 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5886 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5887 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5888 RDIV_EXPR.
5889 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5890
5891 2017-05-09 Marek Polacek <polacek@redhat.com>
5892
5893 PR c/80525
5894 * c-warn.c (unwrap_c_maybe_const): New.
5895 (warn_logical_operator): Call it.
5896
5897 2017-05-09 Nathan Sidwell <nathan@acm.org>
5898
5899 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5900 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5901
5902 2017-05-08 Martin Sebor <msebor@redhat.com>
5903
5904 PR translation/80280
5905 * c-format.h (struct format_flag_spec): Add new member.
5906 (T89_T): New macro.
5907 * c-format.c (local_tree_type_node): New global.
5908 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5909 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5910 (strfmon_flag_specs): Likewise.
5911 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5912 with distinct quoting properties.
5913 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5914 (flag_chars_t::validate): Add argument and handle bad quoting.
5915 (check_format_info_main): Handle quoting problems.
5916 (init_dynamic_diag_info): Simplify.
5917
5918 2017-05-08 Jason Merrill <jason@redhat.com>
5919
5920 * c-opts.c (c_common_post_options): Update defaults for
5921 flag_abi_version and flag_abi_compat_version.
5922
5923 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5924
5925 * c-common.c (c_cpp_error): Replace report_diagnostic
5926 with diagnostic_report_diagnostic.
5927
5928 2017-05-04 Martin Sebor <msebor@redhat.com>
5929
5930 PR translation/80280
5931 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5932 (handle_weakref_attribute): Same.
5933
5934 2017-05-03 Nathan Sidwell <nathan@acm.org>
5935
5936 Canonicalize canonical type hashing
5937 * c-common.c (complete_array_type): Use type_hash_canon.
5938
5939 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5940
5941 PR c++/80038
5942 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5943 prototype.
5944 (cilk_install_body_pedigree_operations): Likewise.
5945 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5946 detatched.
5947 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5948 (cilk_install_body_pedigree_operations): Likewise.
5949 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5950 unwrapping.
5951
5952 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5953
5954 PR c++/80534
5955 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5956 flag on non-aggregate element types.
5957
5958 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5959
5960 * c-common.c (c_type_hasher, type_hash_table): Remove.
5961 (c_common_get_alias_set): Remove unreachable code.
5962 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5963
5964 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5965
5966 * c.opt (Wextra-semi): New C++ warning flag.
5967
5968 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5969
5970 PR middle-end/80423
5971 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5972
5973 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5974
5975 PR middle-end/79788
5976 PR middle-end/80375
5977 * c-common.c (c_common_type_for_mode): Don't handle
5978 widest_*_literal_type_node here.
5979 c_common_signed_or_unsigned_type): Likewise.
5980 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5981 to *intTI_type_node or *intDI_type_node depending on whether
5982 TImode is supported by the target or not.
5983
5984 2017-04-10 Martin Liska <mliska@suse.cz>
5985
5986 PR sanitizer/80350
5987 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5988 doing an UBSAN check.
5989
5990 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5991
5992 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5993
5994 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5995
5996 PR c++/79572
5997 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5998 tree *.
5999 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6000 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6001 REFERENCE_TYPE.
6002
6003 2017-03-31 David Malcolm <dmalcolm@redhat.com>
6004
6005 PR documentation/78732
6006 * c.opt (Wendif-labels): Fix description to refer to
6007 #else rather than #elif.
6008
6009 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6010
6011 PR libstdc++/80251
6012 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6013 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6014
6015 2017-03-27 Jakub Jelinek <jakub@redhat.com>
6016
6017 PR middle-end/80162
6018 * c-common.c (c_common_mark_addressable_vec): Don't set
6019 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6020
6021 2017-03-21 Martin Sebor <msebor@redhat.com>
6022
6023 PR c++/79548
6024 * c-common.c (set_underlying_type): Mark type used only when
6025 original del is declared unused.
6026
6027 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6028
6029 PR translation/79848
6030 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6031 "%qs".
6032
6033 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6034
6035 PR c/79921
6036 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6037 from inform's message, so that xgettext can locate it.
6038
6039 2017-03-09 Marek Polacek <polacek@redhat.com>
6040
6041 PR c++/79962
6042 PR c++/79984
6043 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6044 conversion to the attribute list.
6045
6046 2017-03-09 Martin Liska <mliska@suse.cz>
6047
6048 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6049
6050 2017-03-03 Jason Merrill <jason@redhat.com>
6051
6052 * c.opt (Wnoexcept-type): New.
6053
6054 2017-03-02 Richard Biener <rguenther@suse.de>
6055
6056 PR c/79756
6057 * c-common.c (c_common_mark_addressable_vec): Look through
6058 C_MAYBE_CONST_EXPR.
6059
6060 2017-02-28 Martin Liska <mliska@suse.cz>
6061
6062 * c.opt: Replace space with tabular for options of <number>
6063 type.
6064
6065 2017-02-28 Martin Liska <mliska@suse.cz>
6066
6067 * c.opt: Fix --help=option -Q for options which are of
6068 an enum type.
6069
6070 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6071
6072 PR c++/79588
6073 * c-common.c (check_function_restrict): New function.
6074 (check_function_arguments): Add FNDECL argument. Call
6075 check_function_restrict if -Wrestrict.
6076 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6077 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6078 * c-common.h (check_function_arguments): Add FNDECL argument.
6079 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6080
6081 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6082
6083 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6084 treatment of parameters with pointer-to-tagged type and tidy up.
6085 (print_ada_methods): Remove the special treatment of C++ static member
6086 functions.
6087
6088 2017-02-22 Martin Liska <mliska@suse.cz>
6089
6090 * c.opt: Replace inequality signs with square brackets
6091 for -Wnornalized.
6092
6093 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6094
6095 PR c++/79641
6096 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6097 preserve quals.
6098
6099 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6100
6101 * c-cppbuiltin.c (builtin_define_float_constants): Define
6102 __DECIMAL_DIG__ to the value for long double.
6103
6104 2017-02-15 Marek Polacek <polacek@redhat.com>
6105
6106 PR c/79515
6107 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6108 conversion has occured.
6109
6110 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6111
6112 * c-common.c (c_common_reswords): Add "__RTL".
6113 * c-common.h (enum rid): Add RID_RTL.
6114
6115 2017-01-20 Marek Polacek <polacek@redhat.com>
6116
6117 PR c/64279
6118 * c-common.h (do_warn_duplicated_branches_r): Declare.
6119 * c-gimplify.c (c_genericize): Walk the function tree calling
6120 do_warn_duplicated_branches_r.
6121 * c-warn.c (expr_from_macro_expansion_r): New.
6122 (do_warn_duplicated_branches): New.
6123 (do_warn_duplicated_branches_r): New.
6124 * c.opt (Wduplicated-branches): New option.
6125
6126 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6127
6128 PR c++/71497
6129 * c-indentation.c (warn_for_misleading_indentation): Use the past
6130 subjunctive in the note.
6131
6132 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6133
6134 PR c/79116
6135 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6136 start type to integer_type.
6137
6138 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6139
6140 PR driver/49726
6141 * c.opt (gen-decls): Add Driver flag.
6142
6143 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6144
6145 Revert:
6146 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6147
6148 PR c++/71737
6149 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6150
6151 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6152
6153 PR c++/71737
6154 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6155
6156 2017-01-12 Martin Sebor <msebor@redhat.com>
6157
6158 (-Wformat-overflow): ...to this.
6159
6160 2017-01-11 Martin Sebor <msebor@redhat.com>
6161
6162 PR c/78768
6163 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6164 Also enable for LTO.
6165
6166 2017-01-10 Jason Merrill <jason@redhat.com>
6167
6168 Implement P0195R2, C++17 variadic using.
6169 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6170
6171 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6172
6173 PR translation/79019
6174 PR translation/79020
6175 * c.opt (Wnormalized=): Fix typo in description.
6176
6177 2017-01-08 Martin Sebor <msebor@redhat.com>
6178
6179 PR middle-end/77708
6180 * c.opt (-Wformat-truncation): New option.
6181
6182 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6183
6184 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6185 value to unsigned short to fit in 4 hex digits without
6186 warnings.
6187
6188 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6189
6190 * c.opt (fsso-struct): Add 'native' value.
6191
6192 2017-01-05 Martin Liska <mliska@suse.cz>
6193
6194 PR pch/78970
6195 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6196 header.
6197
6198 2017-01-04 Marek Polacek <polacek@redhat.com>
6199
6200 PR c++/64767
6201 * c.opt (Wpointer-compare): New option.
6202
6203 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6204
6205 PR driver/78957
6206 * c.opt (fsso-struct=): Add RejectNegative.
6207
6208 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6209
6210 Update copyright years.
6211
6212 2016-12-29 Martin Liska <mliska@suse.cz>
6213
6214 PR c/78933
6215 * c.opt (strong-eval-order): Add RejectNegative keyword.
6216
6217 2016-12-22 Jason Merrill <jason@redhat.com>
6218
6219 Implement P0522R0, matching of template template arguments.
6220 * c-cppbuiltin.c (c_cpp_builtins): Define
6221 __cpp_template_template_args.
6222
6223 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6224
6225 PR bootstrap/78817
6226 * c-common.c (struct nonnull_arg_ctx): New type.
6227 (check_function_nonnull): Return bool instead of void. Use
6228 nonnull_arg_ctx as context rather than just location_t.
6229 (check_nonnull_arg): Adjust for the new context type, set
6230 warned_p to true if a warning has been diagnosed.
6231 (check_function_arguments): Return bool instead of void.
6232 * c-common.h (check_function_arguments): Adjust prototype.
6233
6234 2016-12-21 Jason Merrill <jason@redhat.com>
6235
6236 * c.opt (-fnew-ttp-matching): New flag.
6237 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6238
6239 2016-12-14 Martin Jambor <mjambor@suse.cz>
6240
6241 * c-omp.c: Include omp-general.h instead of omp-low.h.
6242 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6243 name.
6244
6245 2016-12-14 Martin Sebor <msebor@redhat.com>
6246
6247 PR c/17308
6248 * c-common.c (check_nonnull_arg): Disable when optimization
6249 is enabled.
6250
6251 2016-12-12 Marek Polacek <polacek@redhat.com>
6252
6253 PR c++/78647
6254 * c-common.c (attribute_fallthrough_p): Return false for
6255 error_mark_node.
6256
6257 2016-12-08 Martin Sebor <msebor@redhat.com>
6258
6259 PR c/78284
6260 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6261
6262 2016-12-08 Martin Sebor <msebor@redhat.com>
6263
6264 PR c/78165
6265 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6266 suffix.
6267
6268 2016-12-07 Martin Sebor <msebor@redhat.com>
6269
6270 PR c/53562
6271 PR middle-end/77784
6272 PR middle-end/78149
6273 PR middle-end/78138
6274 * c.opt (-Wstringop-overflow): New option.
6275
6276 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6277
6278 * c-attribs.c (asan odr indicator): New attribute.
6279 (handle_asan_odr_indicator_attribute): New function.
6280
6281 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6282
6283 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6284 ptrdiff_type_node;
6285
6286 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6287
6288 * c-common.c (excess_precision_mode_join): New.
6289 (c_ts18661_flt_eval_method): New.
6290 (c_c11_flt_eval_method): Likewise.
6291 (c_flt_eval_method): Likewise.
6292 * c-common.h (excess_precision_mode_join): New.
6293 (c_flt_eval_method): Likewise.
6294 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6295 (cpp_iec_559_value): Call it.
6296 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6297 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6298 __FLT_EVAL_METHOD_TS_18661_3__.
6299
6300 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6301
6302 * c-opts.c (c_common_post_options): Add logic to handle the default
6303 case for -fpermitted-flt-eval-methods.
6304
6305 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6306
6307 * c.opt (Wexpansion-to-defined): New.
6308
6309 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6310
6311 PR target/78451
6312 * c-pragma.c (handle_pragma_target): Don't replace
6313 current_target_pragma, but chainon the new args to the current one.
6314
6315 2016-11-22 Nathan Sidwell <nathan@acm.org>
6316
6317 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6318 indentation and formatting.
6319
6320 2016-11-21 Martin Sebor <msebor@redhat.com>
6321
6322 * c.opt (-fprintf-return-value): Enable by default.
6323
6324 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6325
6326 PR c++/71973
6327 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6328 * c-common.c (c_common_nodes_and_builtins): Initialize
6329 const_tm_ptr_type_node.
6330
6331 2016-11-16 Marek Polacek <polacek@redhat.com>
6332
6333 PR c/78285
6334 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6335
6336 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6337
6338 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6339
6340 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6341 Richard Biener <rguenther@suse.de>
6342
6343 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6344 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6345 * c.opt (fgimple): New option.
6346
6347 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6348
6349 PR c/35503
6350 * c-common.h (warn_for_restrict): Declare.
6351 * c-warn.c: Include gcc-rich-location.h.
6352 (warn_for_restrict): New function.
6353 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6354 (gcc_cdiag_char_table): Likewise.
6355 (gcc_cxxdiag_char_table): Likewise.
6356 * c.opt (Wrestrict): New option.
6357
6358 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6359
6360 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6361 for nested types only if the type is a record or union and dump SLOC.
6362
6363 2016-11-09 Jason Merrill <jason@redhat.com>
6364
6365 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6366
6367 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6368
6369 * c-ubsan.c (ubsan_instrument_shift): Handle split
6370 -fsanitize=shift-base and -fsanitize=shift-exponent.
6371
6372 2016-11-07 Jason Merrill <jason@redhat.com>
6373
6374 * c.opt (Wc++1z-compat): New.
6375 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6376
6377 2016-11-07 Martin Liska <mliska@suse.cz>
6378
6379 * c-warn.c (warn_for_unused_label): Save all labels used
6380 in goto or in &label.
6381
6382 2016-11-03 Jason Merrill <jason@redhat.com>
6383
6384 * c-cppbuiltin.c (c_cpp_builtins): Correct
6385 __cpp_inheriting_constructors.
6386
6387 2016-11-01 Jason Merrill <jason@redhat.com>
6388
6389 * c-cppbuiltin.c (c_cpp_builtins): Update
6390 __cpp_inheriting_constructors.
6391
6392 * c.opt (-fnew-inheriting-ctors): New.
6393 * c-opts.c: Default to on for ABI 11+.
6394
6395 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6396
6397 PR c++/77948
6398 * c.opt (fext-numeric-literals): Add Var and Init.
6399 * c-opts.c (c_common_handle_option): Don't clear
6400 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6401 (c_common_post_options): Clear it here if not set
6402 explicitly.
6403
6404 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6405
6406 PR debug/77773
6407 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6408 if NULL.
6409
6410 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6411
6412 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6413 * c-common.c (c_common_reswords): Add __builtin_launder.
6414
6415 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6416
6417 * c-common.c (c_common_truthvalue_conversion): Warn for
6418 multiplications in boolean context. Fix the quoting of '<<' and '<'
6419 in the shift warning.
6420
6421 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6422
6423 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6424
6425 2016-10-20 Jason Merrill <jason@redhat.com>
6426
6427 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6428
6429 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6430
6431 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6432 integer shift ops in boolean context.
6433
6434 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
6435
6436 * c.opt (Walloca): New.
6437 (Walloca-larger-than=): New.
6438 (Wvla-larger-than=): New.
6439
6440 2016-10-17 Marek Polacek <polacek@redhat.com>
6441
6442 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6443 Return immediately when finding a match.
6444 (warn_tautological_cmp): Remove a boolean variable that is no longer
6445 needed.
6446
6447 2016-10-17 Marek Polacek <polacek@redhat.com>
6448
6449 * c-attribs.c: New file.
6450 * c-common.c: Move attributes handling to c-attribs.c.
6451 (get_nonnull_operand): No longer static.
6452 * c-common.h: Move the declarations from c-attribs.c to its own section.
6453
6454 2016-10-14 Jason Merrill <jason@redhat.com>
6455
6456 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6457 and __cpp_deduction_guides.
6458
6459 2016-10-13 Jason Merrill <jason@redhat.com>
6460
6461 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6462
6463 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6464
6465 * c-cppbuiltin.c: Include memmodel.h.
6466 * c-opts.c: Likewise.
6467 * c-pragma.c: Likewise.
6468 * c-warn.c: Likewise.
6469
6470 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6471
6472 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6473 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6474 * c-opts.c (sanitize_cpp_opts): Initialize
6475 cpp_opts->cpp_warn_implicit_fallthrough.
6476
6477 2016-10-11 Marek Polacek <polacek@redhat.com>
6478
6479 * c-common.c (warning_candidate_p): Change the return type to bool
6480 and return true/false instead of 1/0.
6481 (vector_mode_valid_p): Likewise.
6482
6483 2016-10-11 Marek Polacek <polacek@redhat.com>
6484
6485 * c-common.c (fold_for_warn): No longer static.
6486 (bool_promoted_to_int_p): Likewise.
6487 (c_common_get_narrower): Likewise.
6488 (constant_expression_warning): Move to c-warn.c.
6489 (constant_expression_error): Likewise.
6490 (overflow_warning): Likewise.
6491 (warn_logical_operator): Likewise.
6492 (find_array_ref_with_const_idx_r): Likewise.
6493 (warn_tautological_cmp): Likewise.
6494 (expr_has_boolean_operands_p): Likewise.
6495 (warn_logical_not_parentheses): Likewise.
6496 (warn_if_unused_value): Likewise.
6497 (strict_aliasing_warning): Likewise.
6498 (sizeof_pointer_memaccess_warning): Likewise.
6499 (check_main_parameter_types): Likewise.
6500 (conversion_warning): Likewise.
6501 (warnings_for_convert_and_check): Likewise.
6502 (match_case_to_enum_1): Likewise.
6503 (match_case_to_enum): Likewise.
6504 (c_do_switch_warnings): Likewise.
6505 (warn_for_omitted_condop): Likewise.
6506 (readonly_error): Likewise.
6507 (lvalue_error): Likewise.
6508 (invalid_indirection_error): Likewise.
6509 (warn_array_subscript_with_type_char): Likewise.
6510 (warn_about_parentheses): Likewise.
6511 (warn_for_unused_label): Likewise.
6512 (warn_for_div_by_zero): Likewise.
6513 (warn_for_memset): Likewise.
6514 (warn_for_sign_compare): Likewise.
6515 (do_warn_double_promotion): Likewise.
6516 (do_warn_unused_parameter): Likewise.
6517 (record_locally_defined_typedef): Likewise.
6518 (maybe_record_typedef_use): Likewise.
6519 (maybe_warn_unused_local_typedefs): Likewise.
6520 (maybe_warn_bool_compare): Likewise.
6521 (maybe_warn_shift_overflow): Likewise.
6522 (warn_duplicated_cond_add_or_warn): Likewise.
6523 (diagnose_mismatched_attributes): Likewise.
6524 * c-common.h: Move the declarations from c-warn.c to its own section.
6525 * c-warn.c: New file.
6526
6527 2016-10-08 Jason Merrill <jason@redhat.com>
6528
6529 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6530 into COND_EXPR in C++.
6531
6532 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6533
6534 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6535 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6536 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6537
6538 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6539
6540 Implement LWG2296 helper intrinsic
6541 * c-common.h (enum rid): Add RID_ADDRESSOF.
6542 * c-common.c (c_common_reswords): Add __builtin_addressof.
6543
6544 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6545
6546 PR c++/77700
6547 * c-common.c (c_common_truthvalue_conversion): Warn also for
6548 suspicious enum values in boolean context.
6549
6550 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6551
6552 Implement P0258R2 - helper for C++17
6553 std::has_unique_object_representations trait
6554 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6555 * c-common.c (c_common_reswords): Add
6556 __has_unique_object_representations.
6557
6558 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6559
6560 PR sanitizer/66343
6561 * c-ubsan.c (ubsan_instrument_return): Don't call
6562 initialize_sanitizer_builtins here.
6563
6564 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6565
6566 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6567 conditional expression in boolean context when only one arm is
6568 non-boolean.
6569
6570 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6571
6572 PR sanitizer/77823
6573 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6574 is not integral.
6575
6576 * c-common.c (c_common_reswords): Update comment for C++11.
6577
6578 2016-10-04 Jason Merrill <jason@redhat.com>
6579
6580 * c-common.c (make_tree_vector_from_ctor): New.
6581 * c-common.h: Declare it.
6582
6583 2016-10-04 Jakub Jelinek <jakub@redhat.com>
6584
6585 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6586 __LIBGCC_JCR_SECTION_NAME__.
6587
6588 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6589
6590 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6591 left shift in boolean context.
6592
6593 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6594
6595 Implement P0001R1 - C++17 removal of register storage class specifier
6596 * c.opt (Wregister): New warning.
6597 * c-opts.c (c_common_post_options): Enable -Wregister by
6598 default for C++17.
6599
6600 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6601
6602 * c-opts.c (c_common_post_options): Remove special case for
6603 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6604 in C++.
6605
6606 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6607
6608 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6609 -std=c++1z.
6610
6611 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6612
6613 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6614
6615 * c-common.c: Include memmodel.h.
6616
6617 2016-09-26 Marek Polacek <polacek@redhat.com>
6618
6619 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6620
6621 2016-09-26 Marek Polacek <polacek@redhat.com>
6622
6623 PR c/7652
6624 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6625 (handle_fallthrough_attribute): New function.
6626 (attribute_fallthrough_p): New function.
6627 * c-common.h (attribute_fallthrough_p): Declare.
6628
6629 2016-09-24 Marek Polacek <polacek@redhat.com>
6630
6631 PR c/77490
6632 * c.opt (Wbool-operation): New.
6633
6634 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6635
6636 * c-common.c (c_common_truthvalue_conversion): Inhibit
6637 Wint-in-bool-context warning with from_macro_definition_at.
6638 Mention the expression will always evaluate to true.
6639
6640 2016-09-21 Martin Sebor <msebor@redhat.com>
6641
6642 PR bootstrap/77676
6643 * c.opt (fprintf-return-value): Temporarily initialize to zero
6644 to unblock bootstrap failures.
6645
6646 2016-09-21 Jakub Jelinek <jakub@redhat.com>
6647
6648 PR c++/77651
6649 * c.opt (Waligned-new=): Add RejectNegative.
6650 (faligned-new=): Likewise. Spelling fix - change
6651 aligned_new_threshhold to aligned_new_threshold.
6652 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6653 to aligned_new_threshold.
6654
6655 2016-09-20 Martin Sebor <msebor@redhat.com>
6656
6657 PR middle-end/49905
6658 * c.opt: Add -Wformat-length and -fprintf-return-value.
6659
6660 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6661
6662 PR c++/77434
6663 * c.opt (Wint-in-bool-context): New warning.
6664 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6665 constants in boolean context.
6666
6667 2016-09-19 Joseph Myers <joseph@codesourcery.com>
6668
6669 * c-common.c (max_align_t_align): Also consider alignment of
6670 float128_type_node.
6671
6672 2016-09-15 Jason Merrill <jason@redhat.com>
6673
6674 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6675 DECL_EXTERNAL.
6676
6677 2016-09-14 Jason Merrill <jason@redhat.com>
6678
6679 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6680 limit FIELD_DECL, either.
6681
6682 2016-09-14 Marek Polacek <polacek@redhat.com>
6683
6684 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6685 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6686 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6687
6688 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6689
6690 * c-common.c (warn_logical_not_parentheses): Replace
6691 rich_location::add_fixit_insert calls with add_fixit_insert_before
6692 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6693
6694 2016-09-13 Jason Merrill <jason@redhat.com>
6695 Tom de Vries <tom@codesourcery.com>
6696
6697 PR c++/77427
6698 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6699
6700 2016-09-13 Jason Merrill <jason@redhat.com>
6701
6702 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6703 limit types at all.
6704
6705 2016-09-12 Jason Merrill <jason@redhat.com>
6706
6707 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6708 bit/byte confusion, allow large alignment for types.
6709
6710 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6711
6712 PR c++/77496
6713 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6714
6715 2016-09-12 David Malcolm <dmalcolm@redhat.com>
6716
6717 PR c/72858
6718 * c-format.c (argument_parser::check_argument_type): Add params
6719 "type_start" and "conversion_char". Use the former to generate
6720 offset_to_type_start and pass it and conversion_char to
6721 check_format_types.
6722 (check_format_info_main): Capture the start of the type
6723 information as "type_start", and pass it an format_char
6724 to arg_parser.check_argument_type.
6725 (check_format_types): Provide an example in the leading comment.
6726 Add params "offset_to_type_start" and "conversion_char"; pass
6727 them to format_type_warning calls.
6728 (test_get_modifier_for_format_len): Likewise.
6729 (matching_type_p): New function.
6730 (get_format_for_type): Add param "conversion_char" and move
6731 implementation into...
6732 (get_format_for_type_1): ...new function, called twice.
6733 Use new function matching_type_p rather than checking for
6734 TYPE_CANONICAL equality.
6735 (get_corrected_substring): New function.
6736 (format_type_warning): Provide an example in the leading comment.
6737 Add params "offset_to_type_start" and "conversion_char". Replace
6738 call to get_format_for_type with call to get_corrected_substring
6739 and move rejection of hints for widths/precisions there.
6740 (assert_format_for_type_streq): Add param "conversion_char".
6741 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6742 (test_get_format_for_type_printf): Add conversion chars to the
6743 tests, adding coverage for various combinations of integer
6744 vs double conversions, and for preserving octal and hexadecimal
6745 conversions.
6746 (test_get_format_for_type_scanf): Add conversion chars to the
6747 tests.
6748
6749 2016-09-10 Tom de Vries <tom@codesourcery.com>
6750
6751 PR C/71602
6752 * c-common.c (build_va_arg): Handle more strict
6753 targetm.canonical_va_list_type. Replace first argument type error with
6754 assert.
6755
6756 2016-09-09 Martin Sebor <msebor@redhat.com>
6757
6758 PR c/77520
6759 PR c/77521
6760 * c-format.c (argument_parser::find_format_char_info): Use %qc
6761 format directive unconditionally.
6762
6763 2016-09-09 Jason Merrill <jason@redhat.com>
6764
6765 Implement C++17 new of over-aligned types.
6766 * c.opt: Add -faligned-new and -Waligned-new.
6767 * c-common.c (max_align_t_align): Split out from...
6768 (cxx_fundamental_alignment_p): ...here.
6769 * c-common.h: Declare it.
6770 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6771
6772 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6773
6774 * c-cppbuiltin.c (builtin_define_type_width): New function.
6775 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6776 macros.
6777
6778 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6779
6780 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6781 a POINTER_TYPE.
6782 (substring_loc::get_location): Move to substring-locations.c,
6783 keeping implementation as...
6784 (c_get_substring_location): New function, from the above, reworked
6785 to use accessors rather than member lookup.
6786 * c-common.h (class substring_loc): Move to substring-locations.h,
6787 replacing with a forward decl.
6788 (c_get_substring_location): New decl.
6789 * c-format.c: Include "substring-locations.h".
6790 (format_warning_va): Move to substring-locations.c.
6791 (format_warning_at_substring): Likewise.
6792
6793 2016-09-06 Martin Sebor <msebor@redhat.com>
6794
6795 PR c/77336
6796 * c-format.c (check_function_format): Avoid issuing warnings for
6797 functions unless they call format functions with non-constant
6798 format strings.
6799
6800 2016-09-06 Richard Biener <rguenther@suse.de>
6801
6802 PR c/77450
6803 * c-common.c (c_common_mark_addressable_vec): Handle
6804 COMPOUND_LITERAL_EXPR.
6805
6806 2016-09-05 Marek Polacek <polacek@redhat.com>
6807
6808 PR c/77423
6809 * c-common.c (bool_promoted_to_int_p): New function.
6810 (expr_has_boolean_operands_p): New function.
6811 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6812 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6813
6814 2016-09-04 Tom de Vries <tom@codesourcery.com>
6815
6816 revert:
6817 2016-08-29 Tom de Vries <tom@codesourcery.com>
6818
6819 * c-common.c (build_va_arg): Replace first argument type error
6820 with assert.
6821
6822 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6823
6824 PR c/65467
6825 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6826 (c_finish_omp_for): Reject _Atomic qualified iterators.
6827
6828 2016-09-01 Martin Sebor <msebor@redhat.com>
6829
6830 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6831 size to guarantee it fits the output of the formatted function
6832 regardless of its arguments.
6833
6834 2016-09-01 Marek Polacek <polacek@redhat.com>
6835
6836 PR c/7652
6837 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6838 FALLTHRU comments.
6839
6840 2016-08-29 Marek Polacek <polacek@redhat.com>
6841
6842 PR c/77292
6843 * c-common.c (warn_logical_not_parentheses): Don't warn for
6844 a comparison or a logical operator.
6845
6846 2016-08-29 Tom de Vries <tom@codesourcery.com>
6847
6848 * c-common.c (build_va_arg): Fix type comparison assert.
6849
6850 2016-08-29 Tom de Vries <tom@codesourcery.com>
6851
6852 * c-common.c (build_va_arg): Replace first argument type error
6853 with assert.
6854
6855 2016-08-29 Tom de Vries <tom@codesourcery.com>
6856
6857 PR c/77398
6858 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6859 with error_mark_node as va_list instead of with illegal va_list.
6860
6861 2016-08-25 Marek Polacek <polacek@redhat.com>
6862 David Malcolm <dmalcolm@redhat.com>
6863
6864 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6865 * c-common.h (warn_logical_not_parentheses): Update declaration.
6866
6867 2016-08-22 Marek Polacek <polacek@redhat.com>
6868
6869 PR c++/77321
6870 * c-common.c (warn_for_memset): Check type for null.
6871
6872 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6873
6874 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6875 _FloatNx types for suffixes for built-in functions.
6876
6877 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6878
6879 PR c/32187
6880 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6881 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6882 (RID_FLOAT128X): New enum rid values.
6883 (CASE_RID_FLOATN_NX): New macro.
6884 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6885 keywords.
6886 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6887 corresponding complex types.
6888 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6889 _FloatNx and corresponding complex types.
6890 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6891 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6892 and _FloatNx types for the widest type for determining
6893 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6894 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6895 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6896 and _FloatNx types.
6897 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6898 constants.
6899 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6900 _FloatNx types.
6901
6902 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6903
6904 * c-opts.c (c_diagnostic_finalizer): Update for change to
6905 diagnostic_show_locus.
6906
6907 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6908
6909 * c-common.c: Include "spellcheck.h".
6910 (cb_get_suggestion): New function.
6911 * c-common.h (cb_get_suggestion): New decl.
6912 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6913 cb_get_suggestion.
6914
6915 2016-08-18 Marek Polacek <polacek@redhat.com>
6916
6917 PR c/71514
6918 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6919 and pointer-to-VLA.
6920
6921 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6922
6923 PR c/72857
6924 * c-common.c (substring_loc::get_range): Rename to...
6925 (substring_loc::get_location): ...this, converting param from a
6926 source_range * to a location_t *. Call
6927 get_source_location_for_substring rather than
6928 get_source_range_for_substring, and pass in m_caret_idx.
6929 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6930 (substring_loc::get_range): Replace with...
6931 (substring_loc::get_location): ...this.
6932 (substring_loc::set_caret_index): New method.
6933 (substring_loc): Add field m_caret_idx.
6934 * c-format.c (format_warning_va): Update for above changes.
6935 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6936 clashing with type name.
6937 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6938 (check_argument_type): Likewise.
6939 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6940 Use a copy when emitting warnings, setting the caret index from TYPE.
6941
6942 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6943 Arnaud Charlet <charlet@adacore.com>
6944
6945 * c-ada-spec.c (dump_number): New function.
6946 (handle_escape_character): Likewise.
6947 (print_ada_macros): Add handling of constant integers and strings.
6948
6949 2016-08-12 Marek Polacek <polacek@redhat.com>
6950
6951 PR c/7652
6952 * c-common.c (scalar_to_vector): Adjust fall through comment.
6953 * c-opts.c (c_common_handle_option): Likewise.
6954 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6955 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6956 fall through comment.
6957 * cilk.c (extract_free_variables): Add FALLTHRU.
6958
6959 2016-08-10 Jason Merrill <jason@redhat.com>
6960
6961 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6962
6963 2016-08-09 Jason Merrill <jason@redhat.com>
6964
6965 * c-common.c (c_common_attribute_table): vector_size affects type
6966 identity.
6967
6968 2016-08-09 Marek Polacek <polacek@redhat.com>
6969
6970 PR c/7652
6971 * c-ada-spec.c (dump_generic_ada_node): Add return.
6972
6973 2016-08-09 Jason Merrill <jason@redhat.com>
6974
6975 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6976 C++17 constexpr lambdas.
6977
6978 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6979
6980 PR c/64955
6981 * c-common.h (selftest::c_format_c_tests): New declaration.
6982 (selftest::run_c_tests): New declaration.
6983 * c-format.c: Include "selftest.h.
6984 (format_warning_va): Add param "corrected_substring" and use
6985 it to add a replacement fix-it hint.
6986 (format_warning_at_substring): Likewise.
6987 (format_warning_at_char): Update for new param of
6988 format_warning_va.
6989 (argument_parser::check_argument_type): Pass "fki" to
6990 check_format_types.
6991 (check_format_types): Add param "fki" and pass it to
6992 format_type_warning.
6993 (deref_n_times): New function.
6994 (get_modifier_for_format_len): New function.
6995 (selftest::test_get_modifier_for_format_len): New function.
6996 (get_format_for_type): New function.
6997 (format_type_warning): Add param "fki" and use it to attempt
6998 to provide hints for argument types when calling
6999 format_warning_at_substring.
7000 (selftest::get_info): New function.
7001 (selftest::assert_format_for_type_streq): New function.
7002 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7003 (selftest::test_get_format_for_type_printf): New function.
7004 (selftest::test_get_format_for_type_scanf): New function.
7005 (selftest::c_format_c_tests): New function.
7006
7007 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7008
7009 PR c/52952
7010 * c-format.c: Include "diagnostic.h".
7011 (location_column_from_byte_offset): Delete.
7012 (location_from_offset): Delete.
7013 (format_warning_va): New function.
7014 (format_warning_at_substring): New function.
7015 (format_warning_at_char): New function.
7016 (check_format_arg): Capture location of format_tree and pass to
7017 check_format_info_main.
7018 (argument_parser): Add fields "start_of_this_format" and
7019 "format_string_cst".
7020 (flag_chars_t::validate): Add param "format_string_cst". Convert
7021 warning_at call using location_from_offset to call to
7022 format_warning_at_char.
7023 (argument_parser::argument_parser): Add param "format_string_cst_"
7024 and use use it to initialize field "format_string_cst".
7025 Initialize new field "start_of_this_format".
7026 (argument_parser::read_format_flags): Convert warning_at call
7027 using location_from_offset to a call to format_warning_at_char.
7028 (argument_parser::read_any_format_left_precision): Likewise.
7029 (argument_parser::read_any_format_precision): Likewise.
7030 (argument_parser::read_any_other_modifier): Likewise.
7031 (argument_parser::find_format_char_info): Likewise, in three places.
7032 (argument_parser::parse_any_scan_set): Likewise, in one place.
7033 (argument_parser::handle_conversions): Likewise, in two places.
7034 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7035 and use it to make a substring_loc. Pass the latter to
7036 check_format_types.
7037 (check_format_info_main): Add params "fmt_param_loc" and
7038 "format_string_cst". Convert warning_at calls using
7039 location_from_offset to calls to format_warning_at_char. Pass the
7040 new params to the arg_parser ctor. Pass "format_string_cst" to
7041 flag_chars.validate. Pass "fmt_param_loc" to
7042 arg_parser.check_argument_type.
7043 (check_format_types): Convert first param from a location_t
7044 to a const substring_loc & and rename to "fmt_loc". Attempt
7045 to extract the range of the relevant parameter and pass it
7046 to format_type_warning.
7047 (format_type_warning): Convert first param from a location_t
7048 to a const substring_loc & and rename to "fmt_loc". Add
7049 params "param_range" and "type". Replace calls to warning_at
7050 with calls to format_warning_at_substring.
7051
7052 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7053
7054 * c-format.c (class flag_chars_t): New class.
7055 (struct length_modifier): New struct.
7056 (class argument_parser): New class.
7057 (flag_chars_t::flag_chars_t): New ctor.
7058 (flag_chars_t::has_char_p): New method.
7059 (flag_chars_t::add_char): New method.
7060 (flag_chars_t::validate): New method.
7061 (flag_chars_t::get_alloc_flag): New method.
7062 (flag_chars_t::assignment_suppression_p): New method.
7063 (argument_parser::argument_parser): New ctor.
7064 (argument_parser::read_any_dollar): New method.
7065 (argument_parser::read_format_flags): New method.
7066 (argument_parser::read_any_format_width): New method.
7067 (argument_parser::read_any_format_left_precision): New method.
7068 (argument_parser::read_any_format_precision): New method.
7069 (argument_parser::handle_alloc_chars): New method.
7070 (argument_parser::read_any_length_modifier): New method.
7071 (argument_parser::read_any_other_modifier): New method.
7072 (argument_parser::find_format_char_info): New method.
7073 (argument_parser::validate_flag_pairs): New method.
7074 (argument_parser::give_y2k_warnings): New method.
7075 (argument_parser::parse_any_scan_set): New method.
7076 (argument_parser::handle_conversions): New method.
7077 (argument_parser::check_argument_type): New method.
7078 (check_format_info_main): Introduce classes argument_parser
7079 and flag_chars_t, moving the code within the loop into methods
7080 of these classes. Make various locals "const".
7081
7082 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7083
7084 * c-common.c: Include "substring-locations.h".
7085 (get_cpp_ttype_from_string_type): New function.
7086 (g_string_concat_db): New global.
7087 (substring_loc::get_range): New method.
7088 * c-common.h (g_string_concat_db): New declaration.
7089 (class substring_loc): New class.
7090 * c-lex.c (lex_string): When concatenating strings, capture the
7091 locations of all tokens using a new obstack, and record the
7092 concatenation locations within g_string_concat_db.
7093 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7094 on the ggc-heap.
7095
7096 2016-07-29 Marek Polacek <polacek@redhat.com>
7097
7098 PR c/71926
7099 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7100 parentheses warning.
7101
7102 PR c/71574
7103 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7104
7105 2016-07-28 Martin Liska <mliska@suse.cz>
7106
7107 PR gcov-profile/68025
7108 * c-common.c (handle_no_profile_instrument_function_attribute):
7109
7110 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7111
7112 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7113 BITS_PER_UNIT_LOG.
7114
7115 2016-07-25 Jason Merrill <jason@redhat.com>
7116
7117 PR c++/65970
7118 * c.opt (fconstexpr-loop-limit): New.
7119
7120 2016-07-22 Martin Sebor <msebor@redhat.com>
7121
7122 PR c++/71675
7123 * c-common.c (resolve_overloaded_builtin): Avoid converting
7124 __atomic_compare_exchange_n return type to that of what its
7125 first argument points to.
7126
7127 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7128
7129 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7130 ~(unsigned HOST_WIDE_INT) 0.
7131
7132 2016-07-22 Martin Liska <mliska@suse.cz>
7133
7134 PR gcov-profile/69028
7135 PR gcov-profile/62047
7136 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7137 to the current_function_decl.
7138
7139 2016-07-21 Jason Merrill <jason@redhat.com>
7140
7141 PR c++/65168
7142 * c-common.c (c_common_truthvalue_conversion): Check
7143 c_inhibit_evaluation_warnings for warning about address of
7144 reference.
7145
7146 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7147
7148 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7149 const char *.
7150
7151 2016-07-15 Jason Merrill <jason@redhat.com>
7152
7153 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7154
7155 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7156
7157 PR c/71858
7158 * c-common.h (enum lookup_name_fuzzy_kind): Add
7159 FUZZY_LOOKUP_FUNCTION_NAME.
7160
7161 2016-07-08 Jason Merrill <jason@redhat.com>
7162
7163 P0145: Refining Expression Order for C++.
7164 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7165 * c-opts.c: Adjust.
7166
7167 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7168
7169 PR c++/71214
7170 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7171
7172 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7173
7174 * c-pragma.h (enum pragma_kind): Rename
7175 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7176 users.
7177
7178 2016-06-29 Richard Biener <rguenther@suse.de>
7179
7180 PR middle-end/71002
7181 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7182
7183 2016-06-24 Jason Merrill <jason@redhat.com>
7184
7185 P0145R2: Refining Expression Order for C++.
7186 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7187 MODIFY_EXPR.
7188
7189 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7190
7191 * c-common.c (check_builtin_function_arguments): Require last
7192 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7193 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7194 if the last argument is pointer to enumerated or boolean type.
7195
7196 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7197
7198 PR c/70339
7199 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7200 (lookup_name_fuzzy): New prototype.
7201
7202 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7203
7204 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7205
7206 2016-06-14 Jason Merrill <jason@redhat.com>
7207
7208 P0145R2: Refining Expression Order for C++.
7209 * c.opt (fargs-in-order): New.
7210 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7211
7212 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7213
7214 PR sanitizer/71498
7215 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7216 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7217
7218 PR preprocessor/71183
7219 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7220 to cb_get_source_date_epoch.
7221
7222 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7223
7224 PR c/68657
7225 * c.opt (Wpsabi): Add Warning flag.
7226
7227 2016-06-10 Martin Sebor <msebor@redhat.com>
7228
7229 PR c/71392
7230 * c-common.c (handle_nonnull_attribute): Accept
7231 the nonnull attribute in type-generic builtins.
7232
7233 2016-06-09 Martin Sebor <msebor@redhat.com>
7234
7235 PR c/70883
7236 * c-common.c (builtin_function_validate_nargs): Make text of error
7237 message consistent with others like it.
7238
7239 2016-06-08 Martin Sebor <msebor@redhat.com>
7240 Jakub Jelinek <jakub@redhat.com>
7241
7242 PR c++/70507
7243 PR c/68120
7244 * c-common.c (check_builtin_function_arguments): Handle
7245 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7246
7247 2016-06-08 Richard Biener <rguenther@suse.de>
7248
7249 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7250
7251 2016-06-07 Richard Biener <rguenther@suse.de>
7252
7253 PR c/61564
7254 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7255 options and warn about others.
7256
7257 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7258
7259 * c-common.c (get_source_date_epoch): Rename to
7260 cb_get_source_date_epoch.
7261 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7262 message when the parsing fails. Use error_at instead of fatal_error.
7263 * c-common.h (get_source_date_epoch): Rename to
7264 cb_get_source_date_epoch.
7265 * c-common.h (cb_get_source_date_epoch): Prototype.
7266 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7267 * c-common.h (c_omp_region_type): Remove trailing comma.
7268 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7269 * c-lex.c (c_lex_with_flags): Remove initialization of
7270 pfile->source_date_epoch.
7271
7272 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7273
7274 PR c++/71349
7275 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7276 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7277 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7278 instead of C_OMP_CLAUSE_SPLIT_FOR.
7279
7280 2016-05-24 Richard Biener <rguenther@suse.de>
7281
7282 PR middle-end/70434
7283 PR c/69504
7284 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7285 (convert_vector_to_array_for_subscript): ... this.
7286 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7287 VIEW_CONVERT_EXPR to an array type. Rename to ...
7288 (convert_vector_to_array_for_subscript): ... this.
7289
7290 2016-05-12 Marek Polacek <polacek@redhat.com>
7291
7292 PR c/70756
7293 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7294 size_in_bytes and pass LOC to it.
7295
7296 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7297
7298 PR c/43651
7299 * c.opt (Wduplicate-decl-specifier): New option.
7300
7301 2016-05-11 Marek Polacek <polacek@redhat.com>
7302
7303 PR c++/71024
7304 * c-common.c (diagnose_mismatched_attributes): New function.
7305 * c-common.h (diagnose_mismatched_attributes): Declare.
7306
7307 2016-05-04 Marek Polacek <polacek@redhat.com>
7308
7309 * c.opt (Wdangling-else): New option.
7310
7311 2016-05-03 Marek Polacek <polacek@redhat.com>
7312
7313 PR c/70859
7314 * c-common.c (builtin_function_validate_nargs): Add location
7315 parameter. Use it.
7316 (check_builtin_function_arguments): Add location and arguments
7317 parameters. Use them.
7318 * c-common.h (check_builtin_function_arguments): Update declaration.
7319
7320 2016-05-03 Richard Biener <rguenther@suse.de>
7321
7322 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7323 allow call args to gimplify to SSA names.
7324
7325 2016-05-03 Marek Polacek <polacek@redhat.com>
7326
7327 * c-common.h (enum c_omp_region_type): Remove stray comma.
7328
7329 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7330
7331 * c-common.h (enum c_omp_region_type): Define.
7332
7333 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7334
7335 * c-common.c (shorten_compare): Use wi::to_wide.
7336
7337 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7338
7339 PR middle-end/70626
7340 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7341 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7342 reduction clauses in acc parallel loops.
7343
7344 2016-04-29 Marek Polacek <polacek@redhat.com>
7345
7346 PR c/70852
7347 * c-common.c (warn_for_memset): Check domain before accessing it.
7348
7349 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7350
7351 PR/69089
7352 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7353 "aligned" attribute.
7354
7355 2016-04-28 Jason Merrill <jason@redhat.com>
7356
7357 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7358
7359 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7360 Matthias Klose <doko@debian.org>
7361
7362 * c-common.c (get_source_date_epoch): New function, gets the environment
7363 variable SOURCE_DATE_EPOCH and parses it as long long with error
7364 handling.
7365 * c-common.h (get_source_date_epoch): Prototype.
7366 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7367
7368 2015-04-27 Ryan Burn <contact@rnburn.com>
7369
7370 PR c++/69024
7371 PR c++/68997
7372 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7373 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7374 external linkage.
7375 (cilk_detect_and_unwrap): Corresponding changes.
7376 (extract_free_variables): Don't extract free variables from
7377 AGGR_INIT_EXPR slot.
7378 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7379 (cilk_recognize_spawn): Likewise.
7380
7381 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7382
7383 * c.opt (Wmemset-elt-size): New option.
7384 * c-common.c (warn_for_memset): New function.
7385 * c-common.h (warn_for_memset): Declare.
7386
7387 2016-04-25 Jason Merrill <jason@redhat.com>
7388
7389 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7390 No longer static.
7391 * c-common.h: Declare it.
7392 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7393
7394 2016-04-22 Jason Merrill <jason@redhat.com>
7395
7396 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7397
7398 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7399
7400 PR c++/69363
7401 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7402 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7403
7404 2016-04-18 Michael Matz <matz@suse.de>
7405
7406 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7407 and SET_DECL_ALIGN.
7408
7409 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7410
7411 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7412 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7413 to incomplete types.
7414 (dump_nested_type): Remove redundant tests and tidy up.
7415 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7416 a type which is the typedef of an original type.
7417
7418 2016-04-15 Marek Polacek <polacek@redhat.com>
7419
7420 PR c/70651
7421 * c-common.c (build_va_arg): Change two asserts into errors and return
7422 error_mark_node.
7423
7424 2016-04-13 Marek Polacek <polacek@redhat.com>
7425
7426 PR c++/70639
7427 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7428 for switch statements, too.
7429
7430 2016-03-28 Jason Merrill <jason@redhat.com>
7431
7432 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7433
7434 2016-03-23 Marek Polacek <polacek@redhat.com>
7435
7436 PR c++/69884
7437 * c.opt (Wignored-attributes): New option.
7438
7439 2016-03-22 David Malcolm <dmalcolm@redhat.com>
7440
7441 PR c/69993
7442 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7443 diagnostic text, reversing the order of the warning and note so
7444 that they appear in source order.
7445
7446 2016-03-17 Marek Polacek <polacek@redhat.com>
7447
7448 PR c/69407
7449 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7450 operations.
7451
7452 2016-03-14 Jason Merrill <jason@redhat.com>
7453
7454 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7455
7456 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7457
7458 2016-03-09 Richard Biener <rguenther@suse.de>
7459
7460 PR c/70143
7461 * c-common.c (strict_aliasing_warning): Add back
7462 alias_sets_conflict_p check.
7463
7464 2016-03-08 Jason Merrill <jason@redhat.com>
7465
7466 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7467
7468 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7469
7470 PR c/68187
7471 * c-indentation.c (get_visual_column): Move code to determine next
7472 tab stop to...
7473 (next_tab_stop): ...this new function.
7474 (line_contains_hash_if): Delete function.
7475 (detect_preprocessor_logic): Delete function.
7476 (get_first_nws_vis_column): New function.
7477 (detect_intervening_unindent): New function.
7478 (should_warn_for_misleading_indentation): Replace call to
7479 detect_preprocessor_logic with a call to
7480 detect_intervening_unindent.
7481
7482 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7483
7484 PR c/68187
7485 * c-indentation.c (should_warn_for_misleading_indentation): When
7486 suppressing warnings about cases where the guard and body are on
7487 the same column, only use the first non-whitespace column in place
7488 of the guard token column when dealing with "else" clauses.
7489 When rejecting aligned BODY and NEXT, loosen the requirement
7490 from equality with the first non-whitespace of guard to simply
7491 that they not be indented relative to it.
7492
7493 2016-03-04 Richard Biener <rguenther@suse.de>
7494
7495 PR c++/70054
7496 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7497 instead of alias_sets_conflict_p.
7498
7499 2016-03-01 Marek Polacek <polacek@redhat.com>
7500
7501 PR c++/69795
7502 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7503 any DECL.
7504
7505 2016-02-22 Martin Sebor <msebor@redhat.com>
7506
7507 PR middle-end/69780
7508 * c-common.c (check_builtin_function_arguments): Validate and
7509 reject invalid arguments to __builtin_alloca_with_align.
7510
7511 2016-02-20 Mark Wielaard <mjw@redhat.com>
7512
7513 PR c/28901
7514 * c.opt (Wunused-const-variable): Turn into Alias for...
7515 (Wunused-const-variable=): New option.
7516
7517 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7518
7519 PR c++/69865
7520 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7521 here...
7522 (c_common_init_options): ...to here.
7523 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7524
7525 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7526
7527 PR c++/69826
7528 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7529 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7530 flag_preprocess_only.
7531
7532 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7533
7534 PR c/69835
7535 * c.opt (Wnonnull-compare): Enable for -Wall.
7536
7537 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7538
7539 PR c++/69797
7540 * c-common.c (sync_resolve_size): Diagnose too few arguments
7541 even when params is non-NULL empty vector.
7542
7543 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7544
7545 PR target/60410
7546 * c.opt (fshort-double): Remove.
7547
7548 2016-02-05 Martin Sebor <msebor@redhat.com>
7549
7550 PR c++/69662
7551 * c.opt (Warning options): Update -Wplacement-new to take
7552 an optional argument.
7553
7554 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7555
7556 PR preprocessor/69543
7557 PR c/69558
7558 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7559 instead of loc to control_warning_option.
7560
7561 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7562
7563 * c.opt (fopenacc-dim=): New option.
7564
7565 2016-01-27 Ryan Burn <contact@rnburn.com>
7566
7567 PR cilkplus/69267
7568 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7569 gimplify_arg. Removed superfluous post_p argument.
7570 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7571 superfluous post_p argument.
7572 * c-gimplify.c (c_gimplify_expr): Likewise.
7573
7574 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7575
7576 PR other/69006
7577 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7578 pp_newline_and_flush with pp_flush.
7579
7580 2016-01-20 Martin Sebor <msebor@redhat.com>
7581
7582 PR c/69405
7583 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7584 an incompatible argument when the argument isn't a valid tree node.
7585
7586 2016-01-18 Jason Merrill <jason@redhat.com>
7587
7588 PR c++/68767
7589 * c-common.c (check_function_arguments_recurse): Fold the whole
7590 COND_EXPR, not just the condition.
7591
7592 2016-01-18 Tom de Vries <tom@codesourcery.com>
7593
7594 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7595 classify as loop clause.
7596
7597 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7598
7599 PR bootstrap/68271
7600 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7601 C++ FE no longer has limit on number of pragmas.
7602
7603 2015-01-14 Ryan Burn <contact@rnburn.com>
7604
7605 PR c++/69048
7606 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7607 to add missing cleanup point.
7608
7609 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7610
7611 PR c++/68819
7612 * c-indentation.c (get_visual_column): Add location_t param.
7613 Handle the column number being zero by effectively disabling the
7614 warning, with an "inform".
7615 (should_warn_for_misleading_indentation): Add location_t argument
7616 for all uses of get_visual_column.
7617
7618 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7619
7620 PR c++/69029
7621 * c-indentation.c (should_warn_for_misleading_indentation):
7622 Don't warn about do-while statements.
7623
7624 2016-01-07 Martin Sebor <msebor@redhat.com>
7625
7626 PR c/68966
7627 * c-common.c (sync_resolve_size): Reject first argument when it's
7628 a pointer to _Bool.
7629
7630 2016-01-05 David Malcolm <dmalcolm@redhat.com>
7631
7632 PR c/69122
7633 * c-indentation.c (get_visual_column): Remove default argument.
7634 (should_warn_for_misleading_indentation): For the multiline case,
7635 update call to get_visual_column for next_stmt_exploc so that it
7636 captures the location of the first non-whitespace character in the
7637 relevant line. Don't issue warnings if there is non-whitespace
7638 before the next statement.
7639
7640 2016-01-04 Jakub Jelinek <jakub@redhat.com>
7641
7642 Update copyright years.
7643
7644 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7645
7646 * c-common.c (binary_op_error): Convert first param from
7647 location_t to rich_location * and use it when emitting an error.
7648 * c-common.h (binary_op_error): Convert first param from
7649 location_t to rich_location *.
7650
7651 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7652
7653 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7654 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7655
7656 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7657
7658 * c-common.c (c_common_attribute_table): Handle "omp declare target
7659 link" attribute.
7660
7661 2015-12-14 Jakub Jelinek <jakub@redhat.com>
7662
7663 PR c/68833
7664 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7665
7666 2014-12-12 Tobias Burnus <burnus@net-b.de>
7667
7668 PR fortran/68815
7669 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7670 specifiers (%d, %i,%u and %c).
7671
7672 2015-12-10 David Malcolm <dmalcolm@redhat.com>
7673
7674 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7675
7676 2015-12-08 Jakub Jelinek <jakub@redhat.com>
7677
7678 PR c/48088
7679 PR c/68657
7680 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7681 * c-pragma.c (handle_pragma_diagnostic): Adjust
7682 control_warning_option caller.
7683
7684 2015-12-07 David Malcolm <dmalcolm@redhat.com>
7685
7686 * c-common.c (c_cpp_error): Update for change to
7687 rich_location::set_range.
7688
7689 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
7690
7691 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7692 shifting 1 out of the sign bit.
7693
7694 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7695
7696 * c-common.c (c_common_attribute_table[]): Update max arguments
7697 count for "simd" attribute.
7698 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7699
7700 2015-12-03 Jakub Jelinek <jakub@redhat.com>
7701
7702 PR preprocessor/57580
7703 * c-ppoutput.c (print): Change printed field to bool.
7704 Move src_file last for smaller padding.
7705 (init_pp_output): Set print.printed to false instead of 0.
7706 (scan_translation_unit): Fix up formatting. Set print.printed
7707 to true after printing something other than newline.
7708 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7709 (maybe_print_line_1): Set print.printed to false instead of 0.
7710 (print_line_1): Likewise.
7711 (do_line_change): Set print.printed to true instead of 1.
7712 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7713 dump_macro): Set print.printed to false after printing newline.
7714
7715 2015-12-02 Jason Merrill <jason@redhat.com>
7716
7717 * c-common.c (fold_for_warn): New.
7718 (warn_logical_operator, warn_tautological_cmp)
7719 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7720
7721 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7722 (c_fully_fold_internal, decl_constant_value_for_optimization):
7723 Move to c/c-fold.c.
7724 * c-common.h: Don't declare decl_constant_value_for_optimization.
7725
7726 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7727
7728 PR c/68162
7729 * c-common.h (c_build_qualified_type): Add extra default
7730 arguments.
7731
7732 2015-12-01 Julian Brown <julian@codesourcery.com>
7733 Cesar Philippidis <cesar@codesourcery.com>
7734 James Norris <James_Norris@mentor.com>
7735
7736 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7737 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7738 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7739
7740 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7741
7742 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7743 (decl_sloc_common): Delete and move bulk of processing to...
7744 (decl_sloc): ...here.
7745 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7746 (dump_ada_double_name): Remove S parameter and compute the suffix.
7747 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7748 element type and deal with an anonymous one.
7749 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7750 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7751 and remove reference to QUAL_UNION_TYPE.
7752 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7753 (dump_nested_type): ...here. New function extracted from above.
7754 Generate a full declaration for anonymous element type of arrays.
7755 (print_ada_declaration): Really skip anonymous declarations. Remove
7756 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7757 Clean up processing of declarations of array types and objects.
7758 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7759 Remove obsolete code and tidy up.
7760
7761 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7762
7763 PR c/67581
7764 * c-common.c (handle_transparent_union_attribute): Update
7765 also type variants.
7766
7767 2015-11-27 Martin Liska <mliska@suse.cz>
7768
7769 PR c++/68312
7770 * array-notation-common.c (cilkplus_extract_an_triplets):
7771 Release vector of vectors.
7772 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7773
7774 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7775
7776 PR c++/68527
7777 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7778 (print_ada_struct_decl): Likewise.
7779
7780 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7781
7782 PR c++/68001
7783 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7784 * cilk.c (recognize_spawn): Determine location in a more precise
7785 way.
7786
7787 2015-11-19 Jason Merrill <jason@redhat.com>
7788
7789 * c-common.c (shorten_compare): But look through macros from
7790 system headers.
7791
7792 2015-11-18 Jason Merrill <jason@redhat.com>
7793
7794 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7795 non-constant operand comes from a macro.
7796
7797 2015-11-17 Jason Merrill <jason@redhat.com>
7798
7799 PR bootstrap/68346
7800 * c-common.c (warn_tautological_cmp): Fold before checking for
7801 constants.
7802
7803 2015-11-16 Marek Polacek <polacek@redhat.com>
7804
7805 PR c++/68362
7806 * c-common.c (check_case_bounds): Fold low and high cases.
7807
7808 2015-11-16 Marek Polacek <polacek@redhat.com>
7809
7810 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7811 * c-common.c (c_common_get_alias_set): Likewise.
7812 (handle_visibility_attribute): Likewise.
7813
7814 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7815
7816 * c-common.c (handle_simd_attribute): New.
7817 (struct attribute_spec): Add entry for "simd".
7818 (handle_simd_attribute): New.
7819
7820 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7821
7822 * c-lex.c (interpret_float): Use fold_convert.
7823
7824 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7825
7826 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7827 and store it on the result.
7828 * c-opts.c (c_common_init_options): Set
7829 global_dc->colorize_source_p.
7830
7831 2015-11-12 James Norris <jnorris@codesourcery.com>
7832 Joseph Myers <joseph@codesourcery.com>
7833
7834 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7835 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7836 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7837 PRAGMA_OACC_CLAUSE_LINK.
7838
7839 2015-11-11 Marek Polacek <polacek@redhat.com>
7840
7841 PR c/68107
7842 PR c++/68266
7843 * c-common.c (valid_array_size_p): New function.
7844 * c-common.h (valid_array_size_p): Declare.
7845
7846 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7847
7848 PR bootstrap/68271
7849 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7850
7851 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7852
7853 * array-notation-common.c: Remove unused header files.
7854 * c-ada-spec.c: Likewise.
7855 * c-cilkplus.c: Likewise.
7856 * c-common.c: Likewise.
7857 * c-cppbuiltin.c: Likewise.
7858 * c-dump.c: Likewise.
7859 * c-format.c: Likewise.
7860 * c-gimplify.c: Likewise.
7861 * c-indentation.c: Likewise.
7862 * c-lex.c: Likewise.
7863 * c-omp.c: Likewise.
7864 * c-opts.c: Likewise.
7865 * c-pch.c: Likewise.
7866 * c-ppoutput.c: Likewise.
7867 * c-pragma.c: Likewise.
7868 * c-pretty-print.c: Likewise.
7869 * c-semantics.c: Likewise.
7870 * c-ubsan.c: Likewise.
7871 * cilk.c: Likewise.
7872 * stub-objc.c: Likewise.
7873
7874 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7875 Cesar Philippidis <cesar@codesourcery.com>
7876 James Norris <jnorris@codesourcery.com>
7877 Julian Brown <julian@codesourcery.com>
7878 Nathan Sidwell <nathan@codesourcery.com>
7879
7880 * c-pragma.c (oacc_pragmas): Add "routine".
7881 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7882
7883 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7884
7885 * c-common.c (c_common_attributes): Add scalar_storage_order.
7886 (handle_scalar_storage_order_attribute): New function.
7887 * c-pragma.c (global_sso): New variable.
7888 (maybe_apply_pragma_scalar_storage_order): New function.
7889 (handle_pragma_scalar_storage_order): Likewise.
7890 (init_pragma): Register scalar_storage_order.
7891 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7892 * c.opt (Wscalar-storage-order): New warning.
7893 (fsso-struct=): New option.
7894
7895 2015-11-08 Martin Sebor <msebor@redhat.com>
7896
7897 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7898
7899 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7900
7901 * c-common.c: Don't undef DEF_BUILTIN.
7902
7903 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7904
7905 * c-common.c (c_cpp_error): Convert parameter from location_t to
7906 rich_location *. Eliminate the "column_override" parameter and
7907 the call to diagnostic_override_column.
7908 Update the "done_lexing" clause to set range 0
7909 on the rich_location, rather than overwriting a location_t.
7910 * c-common.h (c_cpp_error): Convert parameter from location_t to
7911 rich_location *. Eliminate the "column_override" parameter.
7912
7913 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7914 Thomas Schwinge <thomas@codesourcery.com>
7915 James Norris <jnorris@codesourcery.com>
7916
7917 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7918 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7919 clauses with parallel and kernels and loops.
7920 * c-pragma.h (enum pragma_omp_clause): Add entries for
7921 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7922 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7923 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7924 INDEPENDENT,SEQ}.
7925 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7926
7927 2015-11-05 Martin Sebor <msebor@redhat.com>
7928
7929 PR c++/67942
7930 * c.opt (-Wplacement-new): New option.
7931
7932 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7933
7934 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7935 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7936 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7937 save_expr or create_tmp_var* if TEST is true.
7938 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7939 Don't call add_stmt here.
7940 (struct c_omp_check_loop_iv_data): New type.
7941 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7942 c_omp_check_loop_iv_exprs): New functions.
7943 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7944 distribute.
7945 (c_omp_declare_simd_clauses_to_numbers): Change
7946 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7947 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7948 from numbers to PARM_DECLs.
7949
7950 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7951
7952 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7953 flag_checking.
7954
7955 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7956
7957 PR c++-common/67882
7958 * c-common.h (fold_offsetof_1): Add argument.
7959 * c-common.c (fold_offsetof_1): Diagnose more invalid
7960 offsetof expressions that reference elements past the end of
7961 an array.
7962
7963 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7964 Chung-Lin Tang <cltang@codesourcery.com>
7965
7966 * c-pragma.c (oacc_pragmas): Add "atomic".
7967 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7968
7969 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7970
7971 * c-common.c (handle_target_clones_attribute): New.
7972 (c_common_attribute_table): Add handle_target_clones_attribute.
7973 (handle_always_inline_attribute): Add check on target_clones attribute.
7974 (handle_target_attribute): Ditto.
7975
7976 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7977
7978 * array-notation-common.c: Reorder #include's and remove duplicates.
7979 * c-ada-spec.c: Likewise.
7980 * c-cilkplus.c: Likewise.
7981 * c-common.c: Likewise.
7982 * c-cppbuiltin.c: Likewise.
7983 * c-dump.c: Likewise.
7984 * c-format.c: Likewise.
7985 * c-gimplify.c: Likewise.
7986 * c-indentation.c: Likewise.
7987 * c-lex.c: Likewise.
7988 * c-omp.c: Likewise.
7989 * c-opts.c: Likewise.
7990 * c-pch.c: Likewise.
7991 * c-ppoutput.c: Likewise.
7992 * c-pragma.c: Likewise.
7993 * c-pretty-print.c: Likewise.
7994 * c-semantics.c: Likewise.
7995 * c-ubsan.c: Likewise.
7996 * cilk.c: Likewise.
7997 * stub-objc.c: Likewise.
7998
7999 2015-10-28 Jason Merrill <jason@redhat.com>
8000
8001 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8002
8003 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8004 James Norris <jnorris@codesourcery.com>
8005 Cesar Philippidis <cesar@codesourcery.com>
8006
8007 PR c/64765
8008 PR c/64880
8009 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8010 * c-omp.c (c_oacc_split_loop_clauses): New function.
8011
8012 2015-10-21 Martin Sebor <msebor@redhat.com>
8013
8014 PR driver/68043
8015 * c.opt: End each sentence that describes an option with a period.
8016
8017 2015-10-20 Marek Polacek <polacek@redhat.com>
8018
8019 * array-notation-common.c (is_cilkplus_vector_p): Define.
8020 * c-common.h (is_cilkplus_vector_p): Declare.
8021
8022 2015-10-20 Marek Polacek <polacek@redhat.com>
8023
8024 * c.opt (std=gnu++11): Do not describe as experimental.
8025 (std=gnu++14): Likewise.
8026
8027 2015-10-19 Jason Merrill <jason@redhat.com>
8028
8029 * c-cppbuiltin.c (c_cpp_builtins): Define
8030 __cpp_nontype_template_args.
8031
8032 2015-10-19 Jason Merrill <jason@redhat.com>
8033
8034 * c-cppbuiltin.c (c_cpp_builtins): Define
8035 __cpp_enumerator_attributes, __cpp_fold_expressions,
8036 __cpp_unicode_characters.
8037
8038 2015-10-13 Jakub Jelinek <jakub@redhat.com>
8039 Aldy Hernandez <aldyh@redhat.com>
8040
8041 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8042 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8043 (c_define_builtins): Likewise.
8044 * c-common.h (enum c_omp_clause_split): Add
8045 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8046 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8047 (c_finish_omp_for): Add ORIG_DECLV argument.
8048 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8049 201511 instead of 201307.
8050 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8051 OMP_CRITICAL_CLAUSES to it.
8052 (c_finish_omp_ordered): Add CLAUSES argument, set
8053 OMP_ORDERED_CLAUSES to it.
8054 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8055 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8056 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8057 constructs and new OpenMP 4.5 clauses. Clear
8058 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8059 verification code.
8060 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8061 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8062 (enum pragma_omp_clause): Add
8063 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8064 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8065
8066 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8067
8068 * c-lex.c (interpret_float): Use real_equal instead of
8069 REAL_VALUES_EQUAL.
8070
8071 2015-10-04 Jason Merrill <jason@redhat.com>
8072
8073 Implement N4514, C++ Extensions for Transactional Memory.
8074 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8075 (c_common_attribute_table): Add transaction_safe_dynamic.
8076 transaction_safe now affects type identity.
8077 (handle_tm_attribute): Handle transaction_safe_dynamic.
8078 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8079 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8080 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8081 (D_TRANSMEM): New.
8082 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8083 * c-pretty-print.c (pp_c_attributes_display): Don't print
8084 transaction_safe in C++.
8085
8086 2015-10-02 Marek Polacek <polacek@redhat.com>
8087
8088 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8089
8090 2015-10-02 Marek Polacek <polacek@redhat.com>
8091
8092 PR c/64249
8093 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8094 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8095 * c.opt (Wduplicated-cond): New option.
8096
8097 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8098
8099 * c.opt (std=c11): Do not describe as experimental.
8100 (std=gnu11): Likewise.
8101 (std=iso9899:2011): Likewise.
8102
8103 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8104
8105 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8106 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8107
8108 2015-09-25 Marek Polacek <polacek@redhat.com>
8109
8110 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8111 (ubsan_instrument_shift): Likewise.
8112
8113 2015-09-25 Marek Polacek <polacek@redhat.com>
8114
8115 PR sanitizer/64906
8116 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8117
8118 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8119
8120 * c-indentation.c (should_warn_for_misleading_indentation):
8121 Compare next_stmt_vis_column with guard_line_first_nws instead
8122 of with guard_line_vis_column.
8123
8124 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8125
8126 PR c/49654
8127 PR c/49655
8128 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8129 options and options not valid for the current language.
8130
8131 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8132
8133 * c-indentation.c (should_warn_for_misleading_indentation):
8134 Float out and consolidate the calls to get_visual_column that
8135 are passed guard_exploc as an argument. Compare
8136 next_stmt_vis_column with guard_line_first_nws instead of with
8137 body_line_first_nws.
8138
8139 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8140
8141 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8142 Wnamespaces): New C++ warnings.
8143
8144 2015-09-22 Jason Merrill <jason@redhat.com>
8145
8146 * c-common.h (abi_compat_version_crosses): New.
8147 (warn_abi_version): Declare.
8148 * c-common.c: Define it.
8149 * c-opts.c (c_common_post_options): Handle it.
8150 flag_abi_compat_version defaults to 8.
8151
8152 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8153
8154 Complete the implementation of N4230, Nested namespace definition.
8155 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8156 __cpp_nested_namespace_definitions.
8157
8158 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8159
8160 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8161
8162 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8163
8164 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8165 when warning.
8166 * c-pragma.h (pragma_lex): Add optional loc argument.
8167
8168 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8169
8170 * c-format.c (check_format_arg): Adjust to use common block size in all
8171 object pools.
8172
8173 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8174
8175 * c-format.c (location_from_offset): Update for change in
8176 signature of location_get_source_line.
8177 * c-indentation.c (get_visual_column): Likewise.
8178 (line_contains_hash_if): Likewise.
8179
8180 2015-09-14 Marek Polacek <polacek@redhat.com>
8181
8182 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8183 setting various warnings.
8184
8185 2015-09-14 Marek Polacek <polacek@redhat.com>
8186
8187 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8188 a negative value.
8189
8190 2015-09-11 Mark Wielaard <mjw@redhat.com>
8191
8192 PR c/28901
8193 * c.opt (Wunused-variable): Option from common.opt.
8194 (Wunused-const-variable): New option.
8195
8196 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8197
8198 PR c++/53184
8199 * c.opt ([Wsubobject-linkage]): Add.
8200
8201 2015-09-03 Martin Sebor <msebor@redhat.com>
8202
8203 PR c/66516
8204 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8205 functions.
8206 * c-common.c (reject_gcc_builtin): Define.
8207
8208 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8209
8210 PR middle-end/60586
8211 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8212 prototype.
8213 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8214 cilk_gimplify_call_params_in_spawned_fn.
8215 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8216 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8217 unwrapping.
8218
8219 2015-08-25 Marek Polacek <polacek@redhat.com>
8220
8221 PR middle-end/67330
8222 * c-common.c (handle_weak_attribute): Don't check whether the
8223 visibility can be changed here.
8224
8225 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8226
8227 * c-lex.c (c_lex_with_flags): Use explicit locations.
8228
8229 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8230
8231 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8232 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8233
8234 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8235
8236 PR middle-end/36757
8237 * c-common.c (check_builtin_function_arguments): Add check
8238 for BUILT_IN_SIGNBIT argument.
8239
8240 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8241
8242 PR c++/67160
8243 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8244 in c++1z mode.
8245
8246 2015-08-17 Marek Polacek <polacek@redhat.com>
8247
8248 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8249 with whitespaces before qualifier names.
8250
8251 2015-08-12 Marek Polacek <polacek@redhat.com>
8252
8253 PR c++/55095
8254 * c-common.c (maybe_warn_shift_overflow): Properly handle
8255 left-shifting 1 into the sign bit.
8256
8257 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8258
8259 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8260
8261 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8262 Braden Obrzut <admin@maniacsvault.net>
8263 Jason Merrill <jason@redhat.com>
8264
8265 Add C++ Concepts TS support.
8266 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8267 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8268 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8269 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8270 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8271 * c.opt (fconcepts): New.
8272
8273 2015-08-02 Martin Sebor <msebor@redhat.com>
8274
8275 * c.opt (-Wframe-address): New warning option.
8276
8277 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8278
8279 * c-indentation.c (should_warn_for_misleading_indentation):
8280 Improve heuristics.
8281
8282 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8283
8284 * c-indentation.c (get_visual_column): Add parameter first_nws,
8285 use it. Update comment documenting the function.
8286 (is_first_nonwhitespace_on_line): Remove.
8287 (should_warn_for_misleading_indentation): Replace usage of
8288 of is_first_nonwhitespace_on_line with get_visual_column.
8289
8290 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8291
8292 * c-indentation.h (struct token_indent_info): Define.
8293 (get_token_indent_info): Define.
8294 (warn_for_misleading_information): Declare.
8295 * c-common.h (warn_for_misleading_information): Remove.
8296 * c-identation.c (warn_for_misleading_indentation):
8297 Change declaration to take three token_indent_infos. Adjust
8298 accordingly.
8299 * c-identation.c (should_warn_for_misleading_indentation):
8300 Likewise. Bail out early if the body is a compound statement.
8301 (guard_tinfo_to_string): Define.
8302
8303 2015-07-30 Jason Merrill <jason@redhat.com>
8304
8305 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8306 '*' for reference decay.
8307
8308 2015-07-30 Marek Polacek <polacek@redhat.com>
8309
8310 * c-common.c (warn_tautological_cmp): Bail for float types.
8311
8312 2015-07-27 Marek Polacek <polacek@redhat.com>
8313
8314 PR bootstrap/67030
8315 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8316
8317 2015-07-27 Marek Polacek <polacek@redhat.com>
8318
8319 PR c++/66555
8320 PR c/54979
8321 * c-common.c (find_array_ref_with_const_idx_r): New function.
8322 (warn_tautological_cmp): New function.
8323 * c-common.h (warn_tautological_cmp): Declare.
8324 * c.opt (Wtautological-compare): New option.
8325
8326 2015-07-23 Marek Polacek <polacek@redhat.com>
8327
8328 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8329 (ubsan_instrument_shift): Likewise.
8330
8331 2015-07-23 Marek Polacek <polacek@redhat.com>
8332
8333 PR sanitizer/66908
8334 * c-ubsan.c: Include gimplify.h.
8335 (ubsan_instrument_division): Unshare OP0 and OP1.
8336 (ubsan_instrument_shift): Likewise.
8337
8338 2015-07-20 Marek Polacek <polacek@redhat.com>
8339 Richard Sandiford <richard.sandiford@arm.com>
8340
8341 PR c++/55095
8342 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8343 Use EXPR_LOC_OR_LOC.
8344 (maybe_warn_shift_overflow): New function.
8345 * c-common.h (maybe_warn_shift_overflow): Declare.
8346 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8347 * c.opt (Wshift-overflow): New option.
8348
8349 2015-07-16 Martin Liska <mliska@suse.cz>
8350
8351 * c-format.c (static void check_format_info_main): Use
8352 object_allocator instead of pool_allocator.
8353 (check_format_arg): Likewise.
8354 (check_format_info_main): Likewise.
8355
8356 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8357
8358 * c-opts.c: Remove multiline #include comment.
8359
8360 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8361
8362 * c-common.c: Fix double word typos.
8363
8364 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8365
8366 * c-ada-spec.h (cpp_operation): Revert latest change.
8367 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8368 constructors and destructors.
8369
8370 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8371
8372 * c-common.h: Adjust includes for flags.h changes.
8373 * stub-objc.c: Likewise.
8374
8375 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8376
8377 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8378 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8379
8380 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8381
8382 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8383 are to be removed, return NULL rather than original clauses list.
8384
8385 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8386
8387 * array-notation-common.c: Adjust includes.
8388 * c-ada-spec.c: Likewise.
8389 * c-cilkplus.c: Likewise.
8390 * c-common.h: Likewise.
8391 * c-cppbuiltin.c: Likewise.
8392 * c-dump.c: Likewise.
8393 * c-format.c: Likewise.
8394 * c-gimplify.c: Likewise.
8395 * c-indentation.c: Likewise.
8396 * c-lex.c: Likewise.
8397 * c-omp.c: Likewise.
8398 * c-opts.c: Likewise.
8399 * c-pch.c: Likewise.
8400 * c-ppoutput.c: Likewise.
8401 * c-pragma.c: Likewise.
8402 * c-pretty-print.c: Likewise.
8403 * c-semantics.c: Likewise.
8404 * c-ubsan.c: Likewise.
8405 * cilk.c: Likewise.
8406 * stub-objc.c: Likewise.
8407
8408 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8409
8410 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8411 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8412
8413 2015-07-01 Jason Merrill <jason@redhat.com>
8414
8415 * c-common.h (D_CXX11): Rename from D_CXX0X.
8416 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8417 * c-common.c: Adjust.
8418
8419 * c-opts.c (c_common_post_options): Default to C++14.
8420
8421 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8422
8423 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8424
8425 Implement N4197 - Adding u8 character literals
8426 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
8427 CPP_CHAR.
8428 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
8429 CPP_UTF8CHAR_USERDEF tokens.
8430 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
8431 and CPP_UTF8CHAR tokens.
8432 (lex_charconst): Treat CPP_UTF8CHAR token.
8433
8434 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8435
8436 PR fortran/66605
8437 * c-common.c (do_warn_unused_parameter): Move here.
8438 * c-common.h (do_warn_unused_parameter): Declare.
8439
8440 2015-06-29 Marek Polacek <polacek@redhat.com>
8441
8442 PR c/66322
8443 * c-common.c (check_case_bounds): Add bool * parameter. Set
8444 OUTSIDE_RANGE_P.
8445 (c_add_case_label): Add bool * parameter. Pass it down to
8446 check_case_bounds.
8447 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8448 warning here.
8449 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8450 declarations.
8451
8452 2015-06-27 Marek Polacek <polacek@redhat.com>
8453
8454 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8455 or VECTOR_INTEGER_TYPE_P throughout.
8456 * c-gimplify.c: Likewise.
8457
8458 2015-06-26 Marek Polacek <polacek@redhat.com>
8459
8460 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8461 * c-common.c (c_fully_fold_internal): Likewise.
8462 (c_alignof_expr): Likewise.
8463 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8464 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8465 * cilk.c (create_parm_list): Likewise.
8466
8467 2015-06-26 Marek Polacek <polacek@redhat.com>
8468
8469 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8470
8471 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8472
8473 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8474 * c-gimplify.c: Likewise.
8475 * c-pragma.c: Likewise.
8476 * c-ubsan.c: Likewise.
8477 * cilk.c: Likewise.
8478
8479 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8480
8481 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8482 ggc_hasher.
8483
8484 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8485
8486 * cilk.c: Move calls.h after tm.h in the include chain.
8487
8488 2015-06-25 Marek Polacek <polacek@redhat.com>
8489
8490 * array-notation-common.c: Use VAR_P throughout.
8491 * c-ada-spec.c: Likewise.
8492 * c-common.c: Likewise.
8493 * c-format.c: Likewise.
8494 * c-gimplify.c: Likewise.
8495 * c-omp.c: Likewise.
8496 * c-pragma.c: Likewise.
8497 * c-pretty-print.c: Likewise.
8498 * cilk.c: Likewise.
8499
8500 2015-06-25 Marek Polacek <polacek@redhat.com>
8501
8502 * cilk.c (extract_free_variables): Use is_global_var.
8503
8504 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8505
8506 * c-common.c: Don't include target-def.h.
8507
8508 2015-06-23 Marek Polacek <polacek@redhat.com>
8509
8510 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8511 when comparing INTEGER_CSTs.
8512
8513 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8514
8515 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8516 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8517 (dump_ada_template): Skip partially specialized types.
8518
8519 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8520
8521 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8522 swapping.
8523
8524 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8525
8526 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8527 * c-ada-spec.c: Likewise.
8528 * c-cilkplus.c: Likewise.
8529 * c-common.c: Likewise.
8530 * c-common.h: Likewise.
8531 * c-cppbuiltin.c: Likewise.
8532 * c-dump.c: Likewise.
8533 * c-format.c: Likewise.
8534 * c-gimplify.c: Likewise.
8535 * c-indentation.c: Likewise.
8536 * c-lex.c: Likewise.
8537 * c-omp.c: Likewise.
8538 * c-opts.c: Likewise.
8539 * c-pch.c: Likewise.
8540 * c-ppoutput.c: Likewise.
8541 * c-pragma.c: Likewise.
8542 * c-pretty-print.c: Likewise.
8543 * c-semantics.c: Likewise.
8544 * c-ubsan.c: Likewise.
8545 * cilk.c: Likewise.
8546 * stub-objc.c: Likewise.
8547
8548 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8549
8550 PR c++/65168
8551 * c-common.c (c_common_truthvalue_conversion): Warn when
8552 converting an address of a reference to a truth value.
8553
8554 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8555
8556 * array-notation-common.c : Adjust include files.
8557 * c-ada-spec.c : Likewise.
8558 * c-cilkplus.c : Likewise.
8559 * c-common.c : Likewise.
8560 * c-common.h : Likewise.
8561 * c-cppbuiltin.c : Likewise.
8562 * c-dump.c : Likewise.
8563 * c-format.c : Likewise.
8564 * c-gimplify.c : Likewise.
8565 * c-indentation.c : Likewise.
8566 * c-lex.c : Likewise.
8567 * c-omp.c : Likewise.
8568 * c-opts.c : Likewise.
8569 * c-pch.c : Likewise.
8570 * c-ppoutput.c : Likewise.
8571 * c-pragma.c : Likewise.
8572 * c-pretty-print.c : Likewise.
8573 * c-semantics.c : Likewise.
8574 * c-ubsan.c : Likewise.
8575 * cilk.c : Likewise.
8576 * stub-objc.c : Likewise.
8577
8578 2015-06-08 Marek Polacek <polacek@redhat.com>
8579
8580 PR c/66415
8581 * c-format.c (location_from_offset): Return LOC if LINE is null.
8582
8583 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
8584
8585 * c-common.h (c_parse_final_cleanups): New prototype.
8586 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8587
8588 2015-06-04 Sriraman Tallam <tmsriram@google.com>
8589
8590 * c-common.c (noplt): New attribute.
8591 (handle_noplt_attribute): New handler.
8592
8593 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8594
8595 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8596 * c-ada-spec.c: Likewise.
8597 * c-cilkplus.c: Likewise.
8598 * c-common.c: Likewise.
8599 * c-common.h: Likewise.
8600 * c-cppbuiltin.c: Likewise.
8601 * c-dump.c: Likewise.
8602 * c-format.c: Likewise.
8603 * c-gimplify.c: Likewise.
8604 * c-indentation.c: Likewise.
8605 * c-lex.c: Likewise.
8606 * c-omp.c: Likewise.
8607 * c-opts.c: Likewise.
8608 * c-pch.c: Likewise.
8609 * c-ppoutput.c: Likewise.
8610 * c-pragma.c: Likewise.
8611 * c-pretty-print.c: Likewise.
8612 * c-semantics.c: Likewise.
8613 * c-ubsan.c: Likewise.
8614 * cilk.c: Likewise.
8615 * stub-objc.c: Likewise.
8616
8617 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8618
8619 PR c/66220:
8620 * c-indentation.c (should_warn_for_misleading_indentation): Use
8621 expand_location rather than expand_location_to_spelling_point.
8622 Don't warn if the guarding statement is more indented than the
8623 next/body stmts.
8624
8625 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8626
8627 * c-indentation.c (warn_for_misleading_indentation): Bail out
8628 immediately if -Wmisleading-indentation isn't enabled.
8629
8630 2015-06-01 Martin Liska <mliska@suse.cz>
8631
8632 * c-format.c (check_format_arg):Use new type-based pool allocator.
8633 (check_format_info_main) Likewise.
8634
8635 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8636
8637 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8638 (has_nontrivial_methods): Likewise.
8639
8640 2015-05-25 Marek Polacek <polacek@redhat.com>
8641
8642 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8643
8644 2015-05-22 Marek Polacek <polacek@redhat.com>
8645
8646 PR c/47043
8647 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8648
8649 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8650
8651 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8652 STACK_GROWS_DOWNWARD.
8653
8654 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8655
8656 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8657 STACK_GROWS_DOWNWARD rather than if it is defined.
8658
8659 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8660
8661 PR c/52952
8662 * c-format.c (location_column_from_byte_offset): New.
8663 (location_from_offset): New.
8664 (struct format_wanted_type): Add offset_loc field.
8665 (check_format_info): Move handling of location for extra arguments
8666 closer to the point of warning.
8667 (check_format_info_main): Pass the result of location_from_offset
8668 to warning_at.
8669 (format_type_warning): Pass the result of location_from_offset
8670 to warning_at.
8671
8672 2015-05-20 Marek Polacek <polacek@redhat.com>
8673
8674 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8675
8676 2015-05-20 Marek Polacek <polacek@redhat.com>
8677
8678 * c-ada-spec.c (dump_sloc): Use DECL_P.
8679
8680 2015-05-20 Marek Polacek <polacek@redhat.com>
8681
8682 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8683 * c-common.c: Likewise.
8684
8685 2015-05-19 David Malcolm <dmalcolm@redhat.com>
8686
8687 * c-common.h (fe_file_change): Strengthen param from
8688 const line_map * to const line_map_ordinary *.
8689 (pp_file_change): Likewise.
8690 * c-lex.c (fe_file_change): Likewise.
8691 (cb_define): Use linemap_check_ordinary when invoking
8692 SOURCE_LINE.
8693 (cb_undef): Likewise.
8694 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8695 invoking cb_file_change.
8696 (c_finish_options): Likewise.
8697 (push_command_line_include): Likewise.
8698 (cb_file_change): Strengthen param "new_map" from
8699 const line_map * to const line_map_ordinary *.
8700 * c-ppoutput.c (cb_define): Likewise for local "map".
8701 (pp_file_change): Likewise for param "map" and local "from".
8702
8703 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8704
8705 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8706
8707 2015-05-18 Tom de Vries <tom@codesourcery.com>
8708
8709 * c-common.c (build_va_arg_1): New function.
8710 (build_va_arg): Add address operator to va_list operand if necessary.
8711
8712 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8713
8714 PR c/48956
8715 * c-common.c (int_safely_convertible_to_real_p): Define.
8716 (unsafe_conversion_p): Check conversions involving complex types.
8717 (conversion_warning): Add new warning message for conversions which
8718 discard imaginary component.
8719 * c-common.h: (enum conversion_safety): Add new enumerator for such
8720 conversions.
8721
8722 2015-05-14 Marek Polacek <polacek@redhat.com>
8723
8724 PR c/66066
8725 PR c/66127
8726 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8727 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8728 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8729 use it. If FOR_INT_CONST, require that all evaluated operands be
8730 INTEGER_CSTs.
8731
8732 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8733
8734 * c-common.h (warn_for_misleading_indentation): New prototype.
8735 * c-indentation.c: New file.
8736 * c.opt (Wmisleading-indentation): New option.
8737
8738 2015-05-12 Tom de Vries <tom@codesourcery.com>
8739
8740 PR tree-optimization/66010
8741 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8742
8743 2015-05-09 Jason Merrill <jason@redhat.com>
8744
8745 * c-opts.c (c_common_post_options): Also clear
8746 cpp_opts->cpp_warn_cxx11_compat.
8747
8748 * c-common.h (enum cxx_dialect): Add cxx_unset.
8749 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8750 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8751
8752 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8753 (std=gnu++0x): Mark as Undocumented.
8754 (std=gnu++1y): Add deprecated message.
8755
8756 2015-05-08 Jason Merrill <jason@redhat.com>
8757
8758 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8759 * c-opts.c: Adjust.
8760
8761 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8762
8763 2015-05-08 Marek Polacek <polacek@redhat.com>
8764
8765 PR c/64918
8766 * c.opt (Woverride-init-side-effects): New option.
8767
8768 2015-05-07 Marek Polacek <polacek@redhat.com>
8769
8770 PR c/65179
8771 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8772 negative value.
8773 * c.opt (Wshift-negative-value): New option.
8774 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8775 when -Wextra and C99/C++11 mode.
8776
8777 2015-05-07 Marek Polacek <polacek@redhat.com>
8778 Martin Uecker <uecker@eecs.berkeley.edu>
8779
8780 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8781 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8782
8783 2015-05-05 Jason Merrill <jason@redhat.com>
8784
8785 * c.opt (Wterminate): New.
8786
8787 2015-04-30 Marek Polacek <polacek@redhat.com>
8788
8789 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8790 require that the non-constant be of a boolean type.
8791
8792 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8793
8794 * c-common.c (handle_section_attribute): Refactor to reduce
8795 nesting and distinguish between error cases.
8796
8797 2015-04-29 Marek Polacek <polacek@redhat.com>
8798
8799 PR c/64610
8800 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8801 with 0/1.
8802
8803 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8804
8805 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8806 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8807 HOST_BITS_PER_WIDE_INT.
8808
8809 2015-04-28 Tom de Vries <tom@codesourcery.com>
8810
8811 PR tree-optimization/65887
8812 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8813
8814 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8815 Pierre-Marie de Rodat <derodat@adacore.com>
8816
8817 * c-ada-spec.c (in_function): Delete.
8818 (dump_generic_ada_node): Do not change in_function and remove the
8819 redundant code dealing with it.
8820 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8821 (print_ada_methods): Output the static member functions in a nested
8822 package after the regular methods as well as associated renamings.
8823
8824 2015-04-24 Marek Polacek <polacek@redhat.com>
8825
8826 PR c/65830
8827 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8828 and OPT_Wshift_count_overflow.
8829
8830 PR c/63357
8831 * c-common.c (warn_logical_operator): Warn if the operands have the
8832 same expressions.
8833
8834 2015-04-24 Marek Polacek <polacek@redhat.com>
8835
8836 PR c/61534
8837 * c-common.c (warn_logical_operator): Bail if either operand comes
8838 from a macro expansion.
8839
8840 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8841
8842 PR target/55143
8843 * c-common.c (c_default_pointer_mode): Add definition.
8844 * c-common.h (c_default_pointer_mode): Add declaration.
8845
8846 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8847
8848 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8849 on record_builtin_type argument.
8850
8851 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8852
8853 PR c/65120
8854 * c-common.c (warn_logical_not_parentheses): Don't warn for
8855 !x == 0 or !x != 0.
8856
8857 2015-03-07 Marek Polacek <polacek@redhat.com>
8858
8859 PR sanitizer/65280
8860 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8861 before trying to figure out whether we have a flexible array member.
8862
8863 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8864 Jonathan Wakely <jwakely.gcc@gmail.com>
8865
8866 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8867
8868 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8869
8870 PR ada/65319
8871 * c-ada-spec.c (print_destructor): Remove obsolete code.
8872
8873 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8874
8875 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8876 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8877 DECL_TEMPLATE_RESULT emulations.
8878 (dump_ada_template)): Add guard for TYPE_METHODS.
8879
8880 2015-02-27 Marek Polacek <polacek@redhat.com>
8881
8882 PR c/65040
8883 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8884
8885 2015-02-27 Kai Tietz <ktietz@redhat.com>
8886
8887 PR c/35330
8888 * c-pragma.c (handle_pragma_weak): Do not try to create
8889 weak/alias of declarations not being function, or variable
8890 declarations.
8891
8892 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8893
8894 PR libgomp/64625
8895 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8896 Remove macros.
8897 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8898
8899 2015-02-16 Marek Polacek <polacek@redhat.com>
8900
8901 PR c/65066
8902 * c-format.c (check_format_types): Handle null param.
8903
8904 2015-02-13 Marek Polacek <polacek@redhat.com>
8905
8906 PR c/65040
8907 * c-format.c (check_format_types): Don't warn about different
8908 signedness if the original value is in the range of WANTED_TYPE.
8909
8910 2015-02-12 Jason Merrill <jason@redhat.com>
8911
8912 PR c++/64956
8913 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8914 to the current highest version.
8915 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8916
8917 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8918
8919 PR c/64824
8920 PR c/64868
8921 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8922 instead of RDIV_EXPR. Use build_binary_op instead of
8923 build2_loc.
8924
8925 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8926
8927 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8928 to pass input_location as first argument.
8929
8930 2015-01-23 Tom de Vries <tom@codesourcery.com>
8931
8932 PR libgomp/64672
8933 * c.opt (fopenacc): Mark as LTO option.
8934
8935 2015-01-23 Tom de Vries <tom@codesourcery.com>
8936
8937 PR libgomp/64707
8938 * c.opt (fopenmp): Mark as LTO option.
8939
8940 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8941
8942 PR c/63307
8943 * cilk.c (fill_decls_vec): Only put decls into vector v.
8944 (compare_decls): Fix up formatting.
8945
8946 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8947
8948 PR c/63307
8949 * cilk.c: Include vec.h.
8950 (struct cilk_decls): New structure.
8951 (wrapper_parm_cb): Split this function to...
8952 (fill_decls_vec): ...this...
8953 (create_parm_list): ...and this.
8954 (compare_decls): New function.
8955 (for_local_cb): Remove.
8956 (wrapper_local_cb): Ditto.
8957 (build_wrapper_type): For now first traverse and fill vector of
8958 declarations then sort it and then deal with sorted vector.
8959 (cilk_outline): Ditto.
8960 (declare_one_free_variable): Ditto.
8961
8962 2015-01-21 Jason Merrill <jason@redhat.com>
8963
8964 PR c++/64629
8965 * c-format.c (check_format_arg): Call decl_constant_value.
8966
8967 2015-01-19 Martin Liska <mliska@suse.cz>
8968
8969 * c-common.c (handle_noicf_attribute): New function.
8970
8971 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8972 Bernd Schmidt <bernds@codesourcery.com>
8973 James Norris <jnorris@codesourcery.com>
8974 Cesar Philippidis <cesar@codesourcery.com>
8975 Ilmir Usmanov <i.usmanov@samsung.com>
8976 Jakub Jelinek <jakub@redhat.com>
8977
8978 * c.opt (fopenacc): New option.
8979 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8980 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8981 New macros.
8982 * c-common.h (c_finish_oacc_wait): New prototype.
8983 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8984 (c_finish_oacc_wait): New function.
8985 * c-pragma.c (oacc_pragmas): New variable.
8986 (c_pp_lookup_pragma, init_pragma): Handle it.
8987 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8988 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8989 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8990 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8991 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8992 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8993 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8994 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8995 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8996 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8997 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8998 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8999 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9000 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9001 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9002 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9003 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9004 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9005 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9006 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9007 PRAGMA_OACC_CLAUSE_WORKER.
9008
9009 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
9010
9011 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9012 for the new option fstack-protector_explicit.
9013 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9014 (handle_stack_protect_attribute): New function.
9015
9016 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
9017
9018 * c.opt: New option -Warray-bounds=.
9019
9020 2015-01-09 Michael Collison <michael.collison@linaro.org>
9021
9022 * array-notation-common.c: Include hash-set.h, machmode.h,
9023 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9024 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9025 * c-ada-spec.c: Ditto.
9026 * c-cilkplus.c: Ditto.
9027 * c-common.c: Include input.h due to flattening of tree.h.
9028 Define macro GCC_C_COMMON_C.
9029 * c-common.h: Flatten tree.h header files into c-common.h.
9030 Remove include of tree-core.h.
9031 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9032 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9033 fold-const.h, wide-int.h, and inchash.h due to
9034 flattening of tree.h.
9035 * c-dump.c: Ditto.
9036 * c-format.c: Flatten tree.h header files into c-common.h.
9037 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9038 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9039 fold-const.h, wide-int.h, and inchash.h due to
9040 flattening of tree.h.
9041 * c-dump.c: Include hash-set.h, machmode.h,
9042 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9043 fold-const.h, wide-int.h, and inchash.h due to
9044 flattening of tree.h.
9045 * c-format.c: Include hash-set.h, machmode.h,
9046 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9047 fold-const.h, wide-int.h, inchash.h and real.h due to
9048 flattening of tree.h.
9049 * c-gimplify.c: Include hash-set.h, machmode.h,
9050 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9051 fold-const.h, wide-int.h, and inchash.h due to
9052 flattening of tree.h.
9053 * cilk.c: Ditto.
9054 * c-lex.c: Ditto.
9055 * c-omp.c: Ditto.
9056 * c-opts.c: Ditto.
9057 * c-pch.c: Ditto.
9058 * c-ppoutput.c: Ditto.
9059 * c-pragma.c: Ditto.
9060 * c-pretty-print.c: Ditto.
9061 * c-semantics.c: Ditto.
9062 * c-ubsan.c: Ditto.
9063 * stub-objc.c: Ditto.
9064
9065 2015-01-08 Jason Merrill <jason@redhat.com>
9066
9067 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9068 do_ubsan_in_current_function.
9069 (ubsan_maybe_instrument_reference_or_call): Likewise.
9070 * c-ubsan.h: Declare it.
9071
9072 2015-01-08 Mike Stump <mikestump@comcast.net>
9073
9074 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9075
9076 2015-01-07 Marek Polacek <polacek@redhat.com>
9077
9078 PR c/64440
9079 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9080 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9081
9082 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9083
9084 PR c++/31397
9085 * c.opt (Wsuggest-override): New option.
9086
9087 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9088
9089 Update copyright years.
9090
9091 2015-01-05 Marek Polacek <polacek@redhat.com>
9092
9093 PR c/64423
9094 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9095 parameter. Use it.
9096 * c-common.h (warn_array_subscript_with_type_char): Update
9097 declaration.
9098
9099 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9100
9101 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9102 Control macro with flag_sized_deallocation.
9103
9104 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9105
9106 * c.opt (Wdiscarded-array-qualifiers): New option.
9107
9108 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9109
9110 PR preprocessor/63831
9111 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9112 and __has_cpp_attribute here.
9113 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9114 c_common_has_attribute.
9115 * c-common.h (c_common_has_attribute): New prototype.
9116 * c-lex.c (init_c_lex): Set cb->has_attribute to
9117 c_common_has_attribute instead of cb_has_attribute.
9118 (get_token_no_padding): New function.
9119 (cb_has_attribute): Renamed to ...
9120 (c_common_has_attribute): ... this. No longer static. Use
9121 get_token_no_padding, require ()s, don't build TREE_LIST
9122 unnecessarily, fix up formatting, adjust diagnostics, call
9123 init_attributes.
9124
9125 2014-12-15 Jason Merrill <jason@redhat.com>
9126
9127 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9128 (-Wsized-deallocation): New.
9129 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9130 to on in C++14 and up.
9131
9132 2014-12-11 Jason Merrill <jason@redhat.com>
9133
9134 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9135
9136 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9137 we aren't complaining about VLAs.
9138
9139 2014-12-06 Marek Polacek <polacek@redhat.com>
9140
9141 PR tree-optimization/64183
9142 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9143 shift-expression if it is integer_type_node. Use types_compatible_p.
9144
9145 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9146
9147 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9148 last argument from create_tmp_var_raw and create_tmp_var calls.
9149 * cilk.c (gimplify_cilk_spawn): Likewise.
9150 * c-omp.c (c_finish_omp_atomic): Likewise.
9151
9152 2014-11-28 Marek Polacek <polacek@redhat.com>
9153
9154 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9155 instead of unsigned_type_node.
9156
9157 2014-11-28 Marek Polacek <polacek@redhat.com>
9158
9159 PR c/63862
9160 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9161 to op1_utype.
9162 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9163 expression to unsigned_type_node.
9164
9165 2014-11-20 Mark Wielaard <mjw@redhat.com>
9166
9167 PR debug/38757
9168 * c-opts.c (set_std_c89): Set lang_hooks.name.
9169 (set_std_c99): Likewise.
9170 (set_std_c11): Likewise.
9171 (set_std_cxx98): Likewise.
9172 (set_std_cxx11): Likewise.
9173 (set_std_cxx14): Likewise.
9174 (set_std_cxx1z): Likewise.
9175
9176 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9177
9178 PR target/63764
9179 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9180 return type to bool.
9181 * c-common.c: Include gimple-expr.h.
9182 (convert_vector_to_pointer_for_subscript): Change return type to
9183 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9184 and copy it into a TARGET_EXPR and use that instead of *vecp
9185 directly.
9186
9187 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9188
9189 Merger of git branch "gimple-classes-v2-option-3".
9190 * ChangeLog.gimple-classes: New.
9191 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9192 from being just a vec<gimple> to a vec<gbind *>.
9193
9194 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9195
9196 PR sanitizer/63813
9197 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9198 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9199 get_pointer_alignment for non-pointers. Use ptype, or if it is
9200 reference type, corresponding pointer type, as type of kind
9201 argument.
9202 (ubsan_maybe_instrument_reference,
9203 ubsan_maybe_instrument_member_call): Adjust callers.
9204
9205 2014-11-15 Marek Polacek <polacek@redhat.com>
9206
9207 PR middle-end/63884
9208 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9209 for NULL fndecl.
9210 (extract_array_notation_exprs): Return for NULL node.
9211
9212 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9213
9214 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9215 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9216
9217 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9218
9219 PR c/59708
9220 * c-common.c (check_builtin_function_arguments): Handle
9221 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9222
9223 2014-11-10 Andi Kleen <ak@linux.intel.com>
9224
9225 PR c/60804
9226 * c-common.h (check_no_cilk): Declare.
9227 * cilk.c (get_error_location): New function.
9228 (check_no_cilk): Dito.
9229
9230 2014-11-10 Andi Kleen <ak@linux.intel.com>
9231
9232 * cilk.c (recognize_spawn): Use expression location
9233 for error message.
9234
9235 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9236
9237 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9238
9239 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9240
9241 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9242 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9243 (__cpp_range_based_for, __cpp_initializer_lists,
9244 __cpp_delegating_constructors, __cpp_nsdmi,
9245 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9246 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9247 __has_cpp_attribute.
9248 * c-lex.c (cb_has_attribute): New callback CPP function;
9249 (init_c_lex): Set has_attribute callback.
9250
9251 2014-11-04 Richard Biener <rguenther@suse.de>
9252
9253 * c-common.c (shorten_compare): Do not shorten mixed
9254 DFP and non-DFP compares.
9255
9256 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9257
9258 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9259 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9260 Commentary and rearrangement of tests.
9261 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9262 Commentary and rearrangement of tests.
9263 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9264 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9265
9266 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9267
9268 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9269 enum from machine_mode.
9270
9271 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9272
9273 * c-common.c: Adjust include files.
9274 * c-gimplify.c: Ditto.
9275 * cilk.c: Ditto.
9276 * c-pragma.c: Ditto.
9277 * c-ubsan.c: Ditto.
9278
9279 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9280
9281 * c-gimplify.c: Adjust include files.
9282
9283 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9284
9285 PR c++/53061
9286 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9287 c_common_initialize_diagnostics.
9288 * c-common.h: Likewise.
9289
9290 2014-10-24 Marek Polacek <polacek@redhat.com>
9291
9292 PR c/56980
9293 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9294 print "struct"/"union"/"enum" for typedefed names.
9295
9296 2014-10-23 Marek Polacek <polacek@redhat.com>
9297
9298 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9299 in unsigned type.
9300
9301 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9302 Yury Gribov <y.gribov@samsung.com>
9303
9304 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9305 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9306 instead of flag_sanitize_recover as bool flag.
9307
9308 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9309
9310 * cilk.c: Revert previous change.
9311
9312 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9313
9314 PR c/63307
9315 * cilk.c: Include vec.h.
9316 (struct cilk_decls): New structure.
9317 (wrapper_parm_cb): Split this function to...
9318 (fill_decls_vec): ...this...
9319 (create_parm_list): ...and this.
9320 (compare_decls): New function.
9321 (for_local_cb): Remove.
9322 (wrapper_local_cb): Ditto.
9323 (build_wrapper_type): For now first traverse and fill vector of
9324 declarations then sort it and then deal with sorted vector.
9325 (cilk_outline): Ditto.
9326 (declare_one_free_variable): Ditto.
9327
9328 2014-10-17 Marek Polacek <polacek@redhat.com>
9329
9330 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9331 * c.opt (Wimplicit-int): Initialize to -1.
9332
9333 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9334
9335 * c-pragma.c: Adjust include files.
9336 * c-semantics.c: Likewise.
9337
9338 2014-10-16 DJ Delorie <dj@redhat.com>
9339
9340 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9341 multiples of bytes.
9342
9343 2014-10-14 Jason Merrill <jason@redhat.com>
9344
9345 PR c++/63455
9346 * c-common.h (CPP_PREPARSED_EXPR): New.
9347 (N_CP_TTYPES): Adjust.
9348
9349 2014-10-15 Marek Polacek <polacek@redhat.com>
9350
9351 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9352
9353 2014-10-14 DJ Delorie <dj@redhat.com>
9354
9355 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9356 types, not just __int128.
9357 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9358 types, not just __int128.
9359 (cpp_atomic_builtins): Round pointer sizes up.
9360 (type_suffix): Use type precision, not specific types.
9361 * c-common.c (c_common_reswords): Remove __int128 special case.
9362 (c_common_type_for_size): Check for all __intN types, not just
9363 __int128.
9364 (c_common_type_for_mode): Likewise.
9365 (c_common_signed_or_unsigned_type): Likewise.
9366 (c_build_bitfield_integer_type): Likewise.
9367 (c_common_nodes_and_builtins): Likewise.
9368 (keyword_begins_type_specifier): Likewise.
9369 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9370 __intN variants.
9371
9372 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9373
9374 * c-common.c: Use hash_table instead of hashtab.
9375
9376 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9377
9378 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9379 C++11 section.
9380
9381 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9382
9383 PR c++/54427
9384 PR c++/57198
9385 PR c++/58845
9386 * c-common.c (warn_logical_operator): Punt for vectors.
9387
9388 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9389
9390 Implement SD-6: SG10 Feature Test Recommendations
9391 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9392 macros and the __has_header macro.
9393
9394 2014-09-30 Jason Merrill <jason@redhat.com>
9395
9396 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9397 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9398 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9399
9400 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9401 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9402
9403 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9404 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9405
9406 2014-09-24 Marek Polacek <polacek@redhat.com>
9407
9408 PR c/61405
9409 PR c/53874
9410 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9411
9412 2014-09-23 Andi Kleen <ak@linux.intel.com>
9413
9414 * c-common.c (handle_no_reorder_attribute): New function.
9415 (c_common_attribute_table): Add no_reorder attribute.
9416
9417 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9418
9419 * c-cppbuiltin.c (c_cpp_builtins): Define
9420 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9421 modes.
9422
9423 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9424
9425 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9426 for supported floating-point modes.
9427
9428 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9429
9430 * c.opt (Wpsabi): Use LangEnabledBy.
9431 * c-opts.c (c_common_handle_option): Do not handle here.
9432
9433 2014-09-12 Joseph Myers <joseph@codesourcery.com>
9434
9435 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9436 macros for floating-point modes.
9437
9438 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
9439
9440 PR target/58757
9441 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9442 __*_DENORM_MIN__ without denormals.
9443
9444 2014-09-10 Jakub Jelinek <jakub@redhat.com>
9445
9446 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9447 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9448 ubsan_create_data callers.
9449 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9450 index is constant or BIT_AND_EXPR with constant mask and is
9451 small enough for the bound.
9452 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9453 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9454
9455 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9456
9457 * c.opt: Add CppReason to various flags.
9458 (Wdate-time): Re-sort.
9459 * c-common.c: Include c-common.h earlier.
9460 (struct reason_option_codes_t): Delete.
9461 (c_option_controlling_cpp_error): Prefix global type and struct
9462 with cpp_.
9463
9464 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9465
9466 * c.opt (Wnormalized): New.
9467 (Wnormalized=): Use Enum and Reject Negative.
9468 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9469
9470 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9471
9472 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9473 digits of floating-point modes if -fbuilding-libgcc.
9474
9475 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9476
9477 * c-cppbuiltin.c (c_cpp_builtins): Also define
9478 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9479 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9480 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9481 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9482 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9483 __LIBGCC_STACK_GROWS_DOWNWARD__,
9484 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9485 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9486 __LIBGCC_DWARF_FRAME_REGISTERS__,
9487 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9488 __LIBGCC_STACK_POINTER_REGNUM__ and
9489 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9490 (builtin_define_with_value): Handle backslash-escaping in string
9491 macro values.
9492
9493 2014-09-05 Richard Biener <rguenther@suse.de>
9494
9495 PR middle-end/63148
9496 * c-format.c (check_format_arg): Properly handle
9497 effectively signed POINTER_PLUS_EXPR offset.
9498
9499 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9500
9501 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9502 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9503 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9504 and Init.
9505 * c-opts.c (c_common_handle_option): Do not handle here.
9506 (sanitize_cpp_opts): Likewise.
9507 * c-common.c (struct reason_option_codes_t): Handle
9508 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9509
9510 2014-09-03 Marek Polacek <polacek@redhat.com>
9511
9512 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9513
9514 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9515 Balaji V. Iyer <balaji.v.iyer@intel.com>
9516 Igor Zamyatin <igor.zamyatin@intel.com>
9517
9518 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9519 * c-common.c (c_common_reswords): Added _Cilk_for.
9520 * c-common.h (enum rid): Added RID_CILK_FOR.
9521 (cilk_for_number_of_iterations): Add declaration.
9522 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9523 CILK_FOR.
9524 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9525 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9526
9527 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9528
9529 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9530 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9531 Wundef): Use CPP, Var and Init.
9532 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9533
9534 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9535
9536 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9537 * c-opts.c (c_common_handle_option): Do not handle here.
9538
9539 2014-08-25 Jason Merrill <jason@redhat.com>
9540
9541 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9542 -std=c++14 and -std=gnu++14, rather than the reverse.
9543 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9544 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9545 * c-common.h (cxx_dialect): Remove cxx1y.
9546
9547 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9548
9549 * c-common.h (enum cxx_dialect): Add cxx14.
9550 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9551 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9552 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9553
9554 2014-08-22 Jason Merrill <jason@redhat.com>
9555
9556 * c.opt (std=gnu++17): Fix alias.
9557
9558 2014-08-22 Marek Polacek <polacek@redhat.com>
9559
9560 PR c++/62199
9561 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9562 check for vector types. Drop LHS argument.
9563 * c-common.h (warn_logical_not_parentheses): Adjust.
9564
9565 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9566
9567 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9568 (Wmultichar): Likewise.
9569 (Wdate-time): Use C-family languages instead of Common. Use CPP
9570 and Var.
9571 * c-opts.c (c_common_handle_option): Do not handle the above
9572 options here.
9573 (sanitize_cpp_opts): Likewise.
9574
9575 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9576
9577 PR fortran/44054
9578 * c-opts.c: Include tree-diagnostics.h.
9579 (c_diagnostic_finalizer): New.
9580 (c_common_initialize_diagnostics): Use it.
9581
9582 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9583
9584 PR preprocessor/51303
9585 * c-common.c (struct reason_option_codes_t option_codes):
9586 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9587
9588 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9589
9590 PR c/60975
9591 PR c/53063
9592 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9593 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9594 (c_common_post_options): Call init_global_opts_from_cpp.
9595 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9596
9597 2014-08-19 Marek Polacek <polacek@redhat.com>
9598
9599 PR c++/62153
9600 * c-common.c (maybe_warn_bool_compare): New function.
9601 * c-common.h (maybe_warn_bool_compare): Declare.
9602 * c.opt (Wbool-compare): New option.
9603
9604 2014-08-19 Marek Polacek <polacek@redhat.com>
9605
9606 * c.opt (Wc99-c11-compat): New option.
9607
9608 2014-08-19 Marek Polacek <polacek@redhat.com>
9609
9610 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9611 to warn_c90_c99_compat.
9612 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9613 to -1.
9614
9615 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9616 Steven Bosscher <steven@gcc.gnu.org>
9617
9618 PR c/52952
9619 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9620 format_check_results.
9621 (check_function_format): Use true and add comment for boolean
9622 argument.
9623 (finish_dollar_format_checking): Use explicit location when warning.
9624 (check_format_info): Likewise.
9625 (check_format_arg): Set extra_arg_loc and format_string_loc.
9626 (check_format_info_main): Use explicit location when warning.
9627 (check_format_types): Pass explicit location.
9628 (format_type_warning): Likewise.
9629
9630 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9631
9632 PR fortran/44054
9633 * c-format.c: Handle Fortran flags.
9634
9635 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9636
9637 PR other/61962
9638 * array-notation-common.c (find_rank): Added handling for other
9639 types of references.
9640
9641 2014-08-10 Marek Polacek <polacek@redhat.com>
9642
9643 PR c/51849
9644 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9645 * c.opt (Wc90-c99-compat): Add option.
9646
9647 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9648
9649 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9650
9651 2014-08-03 Marek Polacek <polacek@redhat.com>
9652
9653 * c-common.c (check_case_value): Add location_t parameter. Use it.
9654 (c_add_case_label): Pass loc to check_case_value.
9655
9656 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9657
9658 * cilk.c: Use hash_map instead of pointer_map.
9659
9660 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9661
9662 * c-gimplify.c: Use hash_set instead of pointer_set.
9663
9664 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9665
9666 PR middle-end/61455
9667 * array-notation-common.c (extract_array_notation_exprs): Handling
9668 of DECL_EXPR added.
9669
9670 2014-08-01 Jakub Jelinek <jakub@redhat.com>
9671
9672 * c-common.h (min_align_of_type): Removed prototype.
9673 * c-common.c (min_align_of_type): Removed.
9674 * c-ubsan.h (ubsan_maybe_instrument_reference,
9675 ubsan_maybe_instrument_member_call): New prototypes.
9676 * c-ubsan.c: Include stor-layout.h and builtins.h.
9677 (ubsan_maybe_instrument_reference_or_call,
9678 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9679 functions.
9680
9681 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
9682
9683 PR c++/60517
9684 * c.opt (-Wreturn-local-addr): Move to common.opt.
9685
9686 2014-07-30 Jason Merrill <jason@redhat.com>
9687
9688 PR c++/61659
9689 PR c++/61687
9690 Revert:
9691 * c.opt (-fuse-all-virtuals): New.
9692
9693 2014-07-30 Tom Tromey <tromey@redhat.com>
9694
9695 PR c/59855
9696 * c.opt (Wdesignated-init): New option.
9697 * c-common.c (c_common_attribute_table): Add "designated_init".
9698 (handle_designated_init): New function.
9699
9700 2014-07-24 Marek Polacek <polacek@redhat.com>
9701
9702 PR c/57653
9703 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9704
9705 2014-07-16 Dodji Seketeli <dodji@redhat.com>
9706
9707 PR preprocessor/60723 - missing system-ness marks for macro tokens
9708 * c-ppoutput.c (struct print::prev_was_system_token): New data
9709 member.
9710 (init_pp_output): Initialize it.
9711 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9712 (do_line_change): Return a flag saying if a line marker was
9713 emitted or not.
9714 (scan_translation_unit): Detect if the system-ness of the token we
9715 are about to emit is different from the one of the previously
9716 emitted token. If so, emit a line marker. Avoid emitting useless
9717 adjacent line markers. Avoid emitting line markers for tokens
9718 originating from the expansion of built-in macros.
9719 (scan_translation_unit_directives_only): Adjust.
9720
9721 2014-07-15 Marek Polacek <polacek@redhat.com>
9722
9723 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9724 TYPE_MAX_VALUE is NULL.
9725
9726 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9727
9728 PR middle-end/61294
9729 * c.opt (Wmemset-transposed-args): New warning.
9730
9731 2014-07-10 Jason Merrill <jason@redhat.com>
9732
9733 PR c++/61659
9734 PR c++/61687
9735 * c.opt (-fuse-all-virtuals): New.
9736
9737 2014-07-09 Richard Biener <rguenther@suse.de>
9738
9739 PR c-family/61741
9740 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9741 using unsigned arithmetic if overflow does not wrap instead of
9742 if overflow is undefined.
9743
9744 2014-07-06 Marek Polacek <polacek@redhat.com>
9745
9746 PR c/6940
9747 * c.opt (Wsizeof-array-argument): New option.
9748
9749 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9750
9751 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9752 comments->count <= 1, as comments->entries might be NULL.
9753
9754 2014-07-01 Marek Polacek <polacek@redhat.com>
9755
9756 * c.opt (Wint-conversion): New option.
9757
9758 2014-07-01 Marek Polacek <polacek@redhat.com>
9759
9760 PR c/58286
9761 * c.opt (Wincompatible-pointer-types): New option.
9762
9763 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9764
9765 PR c++/51400
9766 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9767 Do not discard TYPE_QUALS of type.
9768
9769 2014-06-26 Jason Merrill <jason@redhat.com>
9770
9771 * c-common.h (enum cxx_dialect): Add cxx1z.
9772 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9773 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9774
9775 2014-06-26 Teresa Johnson <tejohnson@google.com>
9776
9777 * c-common.h (get_dump_info): Declare.
9778 * c-gimplify.c (c_genericize): Use saved dump files.
9779 * c-opts.c (c_common_parse_file): Begin and end dumps
9780 once around parsing invocation.
9781 (get_dump_info): New function.
9782
9783 2014-06-23 Marek Polacek <polacek@redhat.com>
9784 Andrew MacLeod <amacleod@redhat.com>
9785
9786 PR c/61553
9787 * c-common.c (get_atomic_generic_size): Don't segfault if the
9788 type doesn't have a size.
9789
9790 2014-06-20 Marek Polacek <polacek@redhat.com>
9791
9792 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9793 (ubsan_walk_array_refs_r): New function.
9794 (c_genericize): Instrument array bounds.
9795 * c-ubsan.c: Include "internal-fn.h".
9796 (ubsan_instrument_division): Mark instrumented arrays as having
9797 side effects. Adjust ubsan_type_descriptor call.
9798 (ubsan_instrument_shift): Likewise.
9799 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9800 (ubsan_instrument_bounds): New function.
9801 (ubsan_array_ref_instrumented_p): New function.
9802 (ubsan_maybe_instrument_array_ref): New function.
9803 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9804 (ubsan_array_ref_instrumented_p): Declare.
9805 (ubsan_maybe_instrument_array_ref): Declare.
9806
9807 2014-06-20 Hale Wang <hale.wang@arm.com>
9808
9809 PR lto/61123
9810 * c.opt (fshort-enums): Add to LTO.
9811 * c.opt (fshort-wchar): Likewise.
9812
9813 2014-06-16 Marek Polacek <polacek@redhat.com>
9814
9815 PR c/60439
9816 * c.opt (Wswitch-bool): Add Var.
9817
9818 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9819
9820 PR middle-end/61486
9821 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9822 #pragma omp target teams or
9823 #pragma omp {,target }teams distribute simd.
9824
9825 2014-06-12 Jason Merrill <jason@redhat.com>
9826
9827 * c.opt (Wabi=, fabi-compat-version): New.
9828 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9829 (c_common_post_options): Handle flag_abi_compat_version default.
9830 Disallow -fabi-compat-version=1.
9831 * c-common.h (abi_version_crosses): New.
9832
9833 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9834
9835 * c-common.c (handle_section_attribute): Update handling for
9836 section names that are no longer trees.
9837
9838 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9839
9840 PR fortran/60928
9841 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9842 (omp_pragmas): ... back here.
9843
9844 2014-06-05 Marek Polacek <polacek@redhat.com>
9845
9846 PR c/49706
9847 * c-common.c (warn_logical_not_parentheses): New function.
9848 * c-common.h (warn_logical_not_parentheses): Declare.
9849 * c.opt (Wlogical-not-parentheses): New option.
9850
9851 2014-06-04 Marek Polacek <polacek@redhat.com>
9852
9853 PR c/30020
9854 * c-common.c (check_case_bounds): Add location parameter.
9855 Use it.
9856 (c_add_case_label): Pass loc to check_case_bounds.
9857
9858 2014-06-03 Marek Polacek <polacek@redhat.com>
9859
9860 PR c/60439
9861 * c.opt (Wswitch-bool): New option.
9862
9863 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9864
9865 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9866 Remove prototypes.
9867 (record_types_used_by_current_var_decl): Move prototype to where
9868 it belongs.
9869
9870 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9871 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9872 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9873
9874 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9875
9876 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9877 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9878 void_zero_node.
9879 * c-pretty-print.c (pp_c_void_constant): New function.
9880 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9881 (c_pretty_printer::expression): Handle VOID_CST.
9882 * cilk.c (extract_free_variables): Likewise.
9883 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9884 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9885
9886 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9887
9888 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9889 * c-pragma.c (push_alignment): Adjust.
9890 (handle_pragma_push_options): Likewise.
9891
9892 2014-05-09 Marek Polacek <polacek@redhat.com>
9893
9894 PR c/50459
9895 * c-common.c (check_user_alignment): Return -1 if alignment is error
9896 node.
9897 (handle_aligned_attribute): Don't call default_conversion on
9898 FUNCTION_DECLs.
9899 (handle_vector_size_attribute): Likewise.
9900 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9901 (handle_sentinel_attribute): Call default_conversion and allow even
9902 integral types as an argument.
9903
9904 2014-05-08 Marek Polacek <polacek@redhat.com>
9905
9906 PR c/61053
9907 * c-common.c (min_align_of_type): New function factored out from...
9908 (c_sizeof_or_alignof_type): ...here.
9909 * c-common.h (min_align_of_type): Declare.
9910
9911 2014-05-08 Marek Polacek <polacek@redhat.com>
9912
9913 PR c/61077
9914 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9915 parameter type of main.
9916
9917 2014-05-07 DJ Delorie <dj@redhat.com>
9918
9919 * c-cppbuiltin.c (print_bits_of_hex): New.
9920 (builtin_define_type_minmax): Print values using hex so as not to
9921 require a pre-computed list of string values.
9922
9923 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9924 Mike Stump <mikestump@comcast.net>
9925 Richard Sandiford <rdsandiford@googlemail.com>
9926
9927 * c-ada-spec.c: Include wide-int.h.
9928 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9929 (dump_generic_ada_node): Use wide-int interfaces.
9930 * c-common.c: Include wide-int-print.h.
9931 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9932 (pointer_int_sum): Use wide-int interfaces.
9933 (c_common_nodes_and_builtins): Use make_int_cst.
9934 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9935 (handle_alloc_size_attribute): Use wide-int interfaces.
9936 (get_nonnull_operand): Likewise.
9937 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9938 * c-lex.c: Include wide-int.h.
9939 (narrowest_unsigned_type): Take a widest_int rather than two
9940 HOST_WIDE_INTs.
9941 (narrowest_signed_type): Likewise.
9942 (interpret_integer): Update accordingly. Use wide-int interfaces.
9943 (lex_charconst): Use wide-int interfaces.
9944 * c-pretty-print.c: Include wide-int.h.
9945 (pp_c_integer_constant): Use wide-int interfaces.
9946 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9947 INT_CST_LT_UNSIGNED.
9948
9949 2014-05-06 Richard Biener <rguenther@suse.de>
9950
9951 * c-opts.c (c_common_post_options): For -freestanding,
9952 -fno-hosted and -fno-builtin disable pattern recognition
9953 if not enabled explicitely.
9954
9955 2014-05-02 Marek Polacek <polacek@redhat.com>
9956
9957 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9958
9959 2014-05-01 Marek Polacek <polacek@redhat.com>
9960
9961 PR c/43245
9962 * c.opt (Wdiscarded-qualifiers): Add.
9963
9964 2014-04-30 Marek Polacek <polacek@redhat.com>
9965
9966 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9967 INT_MIN / -1 sanitization only for integer types.
9968
9969 2014-04-25 Marek Polacek <polacek@redhat.com>
9970
9971 PR c/18079
9972 * c-common.c (handle_noinline_attribute): Warn if the attribute
9973 conflicts with always_inline attribute.
9974 (handle_always_inline_attribute): Warn if the attribute conflicts
9975 with noinline attribute.
9976
9977 2014-04-25 Marek Polacek <polacek@redhat.com>
9978
9979 PR c/60156
9980 * c-common.c (check_main_parameter_types): Warn about variadic main.
9981
9982 2014-04-24 Mike Stump <mikestump@comcast.net>
9983
9984 * c.opt (Wshadow-ivar): Default to on.
9985
9986 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9987
9988 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9989
9990 2014-04-23 Marek Polacek <polacek@redhat.com>
9991
9992 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9993
9994 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9995
9996 PR sanitizer/60275
9997 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9998 if flag_sanitize_undefined_trap_on_error.
9999 (ubsan_instrument_division, ubsan_instrument_shift,
10000 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10001 if !flag_sanitize_recover.
10002
10003 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
10004
10005 PR libstdc++/43622
10006 * c-common.c (registered_builtin_types): Make non-static.
10007 * c-common.h (registered_builtin_types): Declare.
10008
10009 2014-04-14 Richard Biener <rguenther@suse.de>
10010 Marc Glisse <marc.glisse@inria.fr>
10011
10012 PR c/60819
10013 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10014 apply may-alias the scalar pointer type when applicable.
10015
10016 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10017
10018 PR middle-end/60467
10019 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10020 as possible argument for Cilk_spawn.
10021
10022 2014-04-11 Tobias Burnus <burnus@net-b.de>
10023
10024 PR c/60194
10025 * c.opt (Wformat-signedness): Add
10026 * c-format.c(check_format_types): Use it.
10027
10028 2014-04-11 Jason Merrill <jason@redhat.com>
10029
10030 PR c++/57926
10031 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10032 default_conversion for an array argument.
10033
10034 2014-04-08 Marek Polacek <polacek@redhat.com>
10035
10036 PR sanitizer/60745
10037 * c-ubsan.c: Include asan.h.
10038 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10039
10040 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10041
10042 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10043
10044 2014-04-02 Marek Polacek <polacek@redhat.com>
10045
10046 * c-common.h (c_expand_expr): Remove declaration.
10047
10048 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10049
10050 PR c++/60689
10051 * c-common.c (add_atomic_size_parameter): When creating new
10052 params vector, push the size argument first.
10053
10054 2014-03-26 Jakub Jelinek <jakub@redhat.com>
10055
10056 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10057 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10058 ubsan_create_data callers.
10059
10060 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10061
10062 PR debug/60603
10063 * c-opts.c (c_finish_options): Restore cb_file_change call to
10064 <built-in>.
10065
10066 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10067
10068 PR middle-end/36282
10069 * c-pragma.c (apply_pragma_weak): Only look at
10070 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10071 DECL_ASSEMBLER_NAME_SET_P (decl).
10072 (maybe_apply_pending_pragma_weaks): Exit early if
10073 vec_safe_is_empty (pending_weaks) rather than only when
10074 !pending_weaks.
10075 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10076 set assembler name back to NULL afterwards.
10077
10078 2014-03-11 Jason Merrill <jason@redhat.com>
10079
10080 * c.opt: Add -std=gnu++14.
10081
10082 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10083
10084 * c-opts.c (c_common_post_options): Don't override
10085 -ffp-contract=fast if unsafe-math-optimizations is on.
10086
10087 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10088
10089 * c.opt: Enable LTO FE for fshort-double.
10090
10091 2014-03-07 Jason Merrill <jason@redhat.com>
10092
10093 * c.opt: Add -std=c++14.
10094
10095 2014-03-06 Marek Polacek <polacek@redhat.com>
10096
10097 PR c/60197
10098 * cilk.c (contains_cilk_spawn_stmt): New function.
10099 (contains_cilk_spawn_stmt_walker): Likewise.
10100 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10101 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10102
10103 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10104
10105 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10106 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10107 even when flag_preprocess_only.
10108
10109 2014-02-26 Jason Merrill <jason@redhat.com>
10110
10111 PR c++/59231
10112 PR c++/11586
10113 * c-common.c (shorten_compare): Don't check
10114 c_inhibit_evaluation_warnings.
10115
10116 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10117
10118 PR c/37743
10119 * c-common.c (c_common_nodes_and_builtins): When initializing
10120 c_uint{16,32,64}_type_node, also set corresponding
10121 uint{16,32,64}_type_node to the same value.
10122
10123 PR c++/60267
10124 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10125 for PRAGMA_IVDEP if flag_preprocess_only.
10126
10127 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10128
10129 PR c/60101
10130 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10131 if false, add ADD itself, rather than vice versa.
10132 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10133 copy. For SAVE_EXPR, only call merge_tlist once.
10134
10135 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10136
10137 PR middle-end/60092
10138 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10139 and tree_to_uhwi.
10140 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10141 functions.
10142 (c_common_attribute_table): Add alloc_align and assume_aligned
10143 attributes.
10144
10145 2014-02-06 Marek Polacek <polacek@redhat.com>
10146
10147 PR c/60087
10148 * c-common.c (warn_for_sign_compare): Call warning_at with location
10149 instead of warning.
10150
10151 2014-02-05 Marek Polacek <polacek@redhat.com>
10152
10153 PR c/53123
10154 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10155 statement.
10156
10157 2014-02-04 Marek Polacek <polacek@redhat.com>
10158
10159 PR c/60036
10160 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10161 SAVE_EXPR.
10162
10163 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10164
10165 PR c++/53017
10166 PR c++/59211
10167 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10168 handle_vector_size_attribute, handle_nonnull_attribute): Call
10169 default_conversion on the attribute argument.
10170 (handle_nonnull_attribute): Increment the argument number.
10171
10172 2014-01-31 Marek Polacek <polacek@redhat.com>
10173
10174 PR c/59963
10175 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10176 build_function_call_vec.
10177 (resolve_overloaded_builtin): Likewise.
10178 * c-common.h (build_function_call_vec): Adjust declaration.
10179
10180 2014-01-30 Marek Polacek <polacek@redhat.com>
10181
10182 PR c/59940
10183 * c-common.h (unsafe_conversion_p): Adjust declaration.
10184 (warnings_for_convert_and_check): Likewise.
10185 (convert_and_check): Likewise.
10186 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10187 expansion_point_location_if_in_system_header on it.
10188 (warnings_for_convert_and_check): Add location parameter. Call
10189 expansion_point_location_if_in_system_header on it. Use it.
10190 (convert_and_check): Add location parameter. Use it.
10191 (conversion_warning): Likewise.
10192 (c_add_case_label): Adjust convert_and_check calls.
10193 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10194
10195 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10196
10197 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10198 flag_cilkplus.
10199 * c-pragma.c (init_pragma): Likewise.
10200 * c.opt: Likewise.
10201
10202 2014-01-23 Marek Polacek <polacek@redhat.com>
10203
10204 PR c/59846
10205 * c-common.c (shorten_compare): Add location_t parameter.
10206 * c-common.h (shorten_binary_op): Adjust declaration.
10207
10208 2014-01-23 Marek Polacek <polacek@redhat.com>
10209
10210 PR c/58346
10211 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10212 * c-common.h: Declare it.
10213
10214 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10215
10216 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10217 * c-ada-spec.c (dump_ads): Likewise.
10218 (cpp_check): Likewise.
10219 (dump_ada_specs): Likewise.
10220
10221 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10222
10223 PR c++/49718
10224 * c-common.c (handle_no_instrument_function_attribute): Allow
10225 no_instrument_function attribute in class member
10226 definition/declaration.
10227
10228 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10229
10230 PR c/58943
10231 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10232 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10233 being COMPOUND_EXPR.
10234 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10235 operand a SAVE_EXPR and second MODIFY_EXPR.
10236
10237 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10238
10239 PR target/58115
10240 * c-pch.c (c_common_write_pch): Call
10241 prepare_target_option_nodes_for_pch.
10242
10243 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10244
10245 Update copyright years
10246
10247 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10248
10249 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10250 the copyright notice.
10251
10252 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10253
10254 * c-ada-spec.c (print_constructor): New function.
10255 (print_destructor): Retrieve the origin of the destructor.
10256 (print_ada_declaration): Revamp handling of constructors/destructors.
10257
10258 2013-12-23 Stuart Hastings <stuart@apple.com>
10259 Bill Maddox <maddox@google.com>
10260 Jason Merrill <jason@redhat.com>
10261
10262 * c.opt: Add -fdeclone-ctor-dtor.
10263 * c-opts.c (c_common_post_options): Default to on iff -Os.
10264
10265 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10266
10267 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10268 attribute.
10269 * c-pragma.h (enum pragma_cilk_clause): Remove.
10270 (enum pragma_omp_clause): Added the following fields:
10271 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10272 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10273 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10274 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10275 PRAGMA_CILK_CLAUSE_UNIFORM.
10276
10277
10278 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10279
10280 * cilk.c (cilk_outline): Made this function non-static.
10281 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10282 (create_cilk_wrapper): Added a new parameter: a function pointer.
10283 (c_install_body_w_frame_cleanup): Remove
10284 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10285 * c-common.h (cilk_outline): New prototype.
10286 (gimplify_cilk_spawn): Removed two parameters.
10287 (cilk_install_body_with_frame_cleanup): New prototype.
10288 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10289 CILK_SPAWN_STMT case.
10290
10291 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10292
10293 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10294
10295 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10296 (int_array_type_node): Remove.
10297 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10298
10299 2013-12-05 Marek Polacek <polacek@redhat.com>
10300
10301 PR c/52023
10302 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10303 [ADJUST_FIELD_ALIGN].
10304
10305 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10306
10307 PR c/52023
10308 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10309 and check field alignment if set.
10310 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10311 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10312
10313 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10314 Marek Polacek <polacek@redhat.com>
10315
10316 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10317 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10318
10319 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10320
10321 PR c/59309
10322 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10323 arguments.
10324
10325 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10326
10327 PR c/59280
10328 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10329 goto invalid. If it is error_mark_node, don't issue further
10330 diagnostics.
10331
10332 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10333
10334 * c.opt (Wopenmp-simd): New.
10335
10336 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10337
10338 * c-ubsan.h (ubsan_instrument_return): New prototype.
10339 * c-ubsan.c (ubsan_instrument_return): New function.
10340
10341 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10342
10343 * c-common.c: Add required include files from gimple.h.
10344 * c-gimplify.c: Likewise.
10345 * cilk.c: Likewise.
10346
10347 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10348
10349 * c-common.c (unsafe_conversion_p): Remove use of
10350 EXPR_LOC_OR_HERE macro.
10351 (conversion_warning): Likewise.
10352 (warnings_for_convert_and_check): Likewise.
10353 (warn_for_collisions_1): Likewise.
10354 (shorten_compare): Likewise, and remove use of in_system_header
10355 macro, using the location from the former.
10356 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10357 (cb_def_pragma): Remove use of in_system_header macro.
10358 (lex_string): Likewise.
10359 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10360
10361 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10362 Mike Stump <mikestump@comcast.net>
10363 Richard Sandiford <rdsandiford@googlemail.com>
10364
10365 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10366 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10367 tree_fits_shwi_p or tree_fits_uhwi_p.
10368 (dump_generic_ada_node): Likewise.
10369 * c-format.c (check_format_arg): Likewise.
10370 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10371
10372 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10373
10374 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10375
10376 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10377
10378 PR c/53001
10379 * c-common.c (unsafe_conversion_p): Make this function
10380 return an enumeration with more detail.
10381 (conversion_warning): Use the new return type of
10382 unsafe_conversion_p to separately warn either about conversions
10383 that lower floating point number precision or about the other
10384 kinds of conversions.
10385 * c-common.h (enum conversion_safety): New enumeration.
10386 (unsafe_conversion_p): switching return type to
10387 conversion_safety enumeration.
10388 * c.opt: Adding new warning -Wfloat-conversion and
10389 enabling it with -Wconversion.
10390
10391 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10392
10393 * c-opts.c: Include plugin.h.
10394 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10395
10396 2013-11-19 Marek Polacek <polacek@redhat.com>
10397
10398 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10399 call.
10400 (ubsan_instrument_shift): Likewise.
10401 (ubsan_instrument_vla): Likewise.
10402
10403 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10404
10405 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10406 cast to unsigned type.
10407
10408 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10409
10410 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10411 tree_low_cst.
10412 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10413 rather than tree_low_cst.
10414
10415 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10416
10417 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10418 tree_to_uhwi throughout.
10419
10420 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10421
10422 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10423 tree_low_cst (..., 0) with tree_to_shwi throughout.
10424
10425 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10426
10427 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10428 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10429
10430 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10431
10432 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10433 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10434
10435 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
10436
10437 * c-cilkplus.c: New file.
10438 * c-common.c (readonly_error): Add location argument.
10439 * c-common.h (readonly_error): Same.
10440 (c_finish_cilk_clauses): Protoize.
10441 (c_check_cilk_loop): Same.
10442 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10443 Do not fail on error_mark_node.
10444 Abstract increment canonicalization to here...
10445 (c_omp_for_incr_canonicalize_ptr): New.
10446 c-pragma.c (init_pragma): Register "simd" pragma.
10447 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10448 (enum pragma_cilk_clause): New.
10449
10450 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10451
10452 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10453 wchar_type and host_integerp checks.
10454
10455 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10456
10457 * c-common.c: Likewise.
10458 * c-gimplify.c: Likewise.
10459 * cilk.c: Likewise.
10460
10461 2013-11-14 Diego Novillo <dnovillo@google.com>
10462
10463 * c-common.c: Include fold-const.h.
10464 Include stor-layout.h.
10465 Include calls.h.
10466 Include stringpool.h.
10467 Include attribs.h.
10468 Include varasm.h.
10469 Include trans-mem.h.
10470 * c-cppbuiltin.c: Include stor-layout.h.
10471 Include stringpool.h.
10472 * c-format.c: Include stringpool.h.
10473 * c-lex.c: Include stringpool.h.
10474 Include stor-layout.h.
10475 * c-pragma.c: Include stringpool.h.
10476 Include attribs.h.
10477 Include varasm.h.
10478 Include gcc-symtab.h.
10479 * c-pretty-print.c: Include stor-layout.h.
10480 Include attribs.h.
10481 * cilk.c: Include stringpool.h.
10482 Include calls.h.
10483
10484 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10485
10486 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10487 * c-common.c (c_common_reswords): Add __auto_type.
10488 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10489
10490 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10491
10492 * c-common.c: Include gimplify.h.
10493 * c-gimplify.c: Likewise.
10494 * cilk.c: Likewise.
10495 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10496 * c-ubsan.c: Don't include gimple.h.
10497
10498 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10499
10500 * c-common.c (c_common_reswords): Add _Thread_local.
10501
10502 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10503
10504 * c-common.c (atomic_size_supported_p): New function.
10505 (resolve_overloaded_atomic_exchange)
10506 (resolve_overloaded_atomic_compare_exchange)
10507 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10508 Use it instead of comparing size with a local list of sizes.
10509
10510 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10511 Joseph Myers <joseph@codesourcery.com>
10512
10513 * c-common.h (enum rid): Add RID_ATOMIC.
10514 * c-common.c (c_common_reswords): Add _Atomic.
10515 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10516 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10517 * c-format.c (check_format_types): Check for extra _Atomic
10518 qualifiers in format argument.
10519 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10520 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10521
10522 2013-11-06 Tobias Burnus <burnus@net-b.de>
10523
10524 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10525
10526 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10527
10528 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10529 standards modes.
10530 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10531 to mean lack of IEEE 754 support.
10532
10533 2013-11-05 Tobias Burnus <burnus@net-b.de>
10534
10535 * c.opt (-Wdate-time): New option
10536 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10537
10538 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10539
10540 * c-cppbuiltin.c (cpp_iec_559_value): Test
10541 flag_excess_precision_cmdline not flag_excess_precision.
10542
10543 2013-11-05 Tobias Burnus <burnus@net-b.de>
10544
10545 * c.opt (fopenmp-simd): New option.
10546 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10547 (omp_pragmas): ... this new struct.
10548 (c_pp_lookup_pragma): Also walk omp_pragmas.
10549 (init_pragma): Init pragmas for -fopenmp-simd.
10550
10551 2013-11-04 Marek Polacek <polacek@redhat.com>
10552
10553 PR c++/58979
10554 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10555
10556 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10557
10558 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10559 New functions.
10560 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10561
10562 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10563
10564 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10565 (dump_ada_specs): Adjust prototype of second callback.
10566 * c-ada-spec.c (cpp_check): New global variable.
10567 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10568 (print_generic_ada_decl): Likewise.
10569 (has_static_fields): Change return type to bool and add guard.
10570 (has_nontrivial_methods): New predicate.
10571 (is_tagged_type): Change return type to bool.
10572 (separate_class_package): Call has_nontrivial_methods.
10573 (pp_ada_tree_identifier): Minor tweaks.
10574 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10575 (dump_ada_array_domains): Likewise.
10576 (dump_ada_array_type): Likewise.
10577 (dump_template_types): Remove cpp_check parameter and do not pass it to
10578 dump_generic_ada_node.
10579 (dump_ada_template): Likewise.
10580 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10581 recursively.
10582 (print_ada_methods): Change return type to integer. Remove cpp_check
10583 parameter and do not pass it down.
10584 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10585 dump_generic_ada_node.
10586 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10587 accessing methods.
10588 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10589 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10590 value of print_ada_methods.
10591 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10592 Set cpp_check to it before invoking dump_ada_nodes.
10593 (dump_ada_specs): Likewise.
10594
10595 2013-11-03 Marek Polacek <polacek@redhat.com>
10596
10597 * c-ubsan.c: Don't include hash-table.h.
10598 (ubsan_instrument_vla): New function.
10599 * c-ubsan.h: Declare it.
10600
10601 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10602
10603 Automated part of renaming of symtab_node_base to symtab_node.
10604
10605 Patch autogenerated by rename_symtab.py from
10606 https://github.com/davidmalcolm/gcc-refactoring-scripts
10607 revision 58bb219cc090b2f4516a9297d868c245495ee622
10608
10609 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10610 symtab_node_base to symtab_node.
10611
10612 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10613
10614 Implement C++14 digit separators.
10615 * c-lex.c (interpret_float): Remove digit separators from scratch string
10616 before building real literal.
10617
10618 2013-10-30 Jakub Jelinek <jakub@redhat.com>
10619
10620 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10621
10622 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10623
10624 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10625 fields.
10626 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10627 enabled.
10628 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10629 (insert_cilk_frame): New prototype.
10630 (cilk_init_builtins): Likewise.
10631 (gimplify_cilk_spawn): Likewise.
10632 (c_cilk_install_body_w_frame_cleanup): Likewise.
10633 (cilk_detect_spawn_and_unwrap): Likewise.
10634 (cilk_set_spawn_marker): Likewise.
10635 (build_cilk_sync): Likewise.
10636 (build_cilk_spawn): Likewise.
10637 * cilk.c: New file.
10638
10639 2013-10-29 David Malcolm <dmalcolm@redhat.com>
10640
10641 Patch autogenerated by refactor_symtab.py from
10642 https://github.com/davidmalcolm/gcc-refactoring-scripts
10643 revision 58bb219cc090b2f4516a9297d868c245495ee622
10644
10645 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10646 to a true class hierarchy.
10647 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10648
10649 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10650
10651 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10652
10653 2013-10-26 Jeff Law <law@redhat.com>
10654
10655 * c-common.c (c_define_builtins): Remove mudflap support.
10656 * c.opt: Ignore and warn for mudflap options.
10657
10658 2013-10-24 Tobias Burnus <burnus@net-b.de>
10659
10660 PR other/33426
10661 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10662 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10663
10664 2013-10-23 Jason Merrill <jason@redhat.com>
10665
10666 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10667
10668 2013-10-11 Jakub Jelinek <jakub@redhat.com>
10669
10670 * c-common.h (omp_clause_mask::operator !=): New method.
10671 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10672 instead of if (mask & something) tests everywhere.
10673
10674 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10675 201307 instead of 201107.
10676 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10677 (c_common_attribute_table): Add "omp declare target" and
10678 "omp declare simd" attributes.
10679 (handle_omp_declare_target_attribute,
10680 handle_omp_declare_simd_attribute): New functions.
10681 * c-omp.c: Include c-pragma.h.
10682 (c_finish_omp_taskgroup): New function.
10683 (c_finish_omp_atomic): Add swapped argument, if true,
10684 build the operation first with rhs, lhs arguments and use NOP_EXPR
10685 build_modify_expr.
10686 (c_finish_omp_for): Add code argument, pass it down to make_code.
10687 (c_omp_split_clauses): New function.
10688 (c_split_parallel_clauses): Removed.
10689 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10690 c_omp_declare_simd_clauses_to_decls): New functions.
10691 * c-common.h (omp_clause_mask): New type.
10692 (OMP_CLAUSE_MASK_1): Define.
10693 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10694 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10695 omp_clause_mask::operator |, omp_clause_mask::operator &,
10696 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10697 omp_clause_mask::operator ==): New methods.
10698 (enum c_omp_clause_split): New.
10699 (c_finish_omp_taskgroup): New prototype.
10700 (c_finish_omp_atomic): Add swapped argument.
10701 (c_finish_omp_for): Add code argument.
10702 (c_omp_split_clauses): New prototype.
10703 (c_split_parallel_clauses): Removed.
10704 (c_omp_declare_simd_clauses_to_numbers,
10705 c_omp_declare_simd_clauses_to_decls): New prototypes.
10706 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10707 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10708 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10709 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10710 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10711 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10712 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10713 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10714 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10715 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10716 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10717 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10718 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10719 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10720 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10721 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10722 PRAGMA_OMP_CLAUSE_UNIFORM.
10723
10724 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10725
10726 PR tree-optimization/20318
10727 * c-common.c (handle_returns_nonnull_attribute): New function.
10728 (c_common_attribute_table): Add returns_nonnull.
10729
10730 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10731
10732 PR c++/19476
10733 * c.opt (fcheck-new): Move to common.opt.
10734
10735 2013-09-25 Marek Polacek <polacek@redhat.com>
10736 Jakub Jelinek <jakub@redhat.com>
10737
10738 PR sanitizer/58413
10739 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10740 an expression if we can prove it is correct.
10741 (ubsan_instrument_division): Likewise. Remove unnecessary
10742 check.
10743
10744 2013-09-18 Marek Polacek <polacek@redhat.com>
10745
10746 PR sanitizer/58411
10747 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10748 Declare it.
10749 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10750
10751 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10752
10753 PR target/48094
10754 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10755 fobjc-gc, freplace-objc-classes): Accept for LTO.
10756
10757 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10758
10759 * c-target.def: New hook
10760
10761 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10762
10763 PR c++/43452
10764 * c.opt (Wdelete-incomplete): Add.
10765
10766 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10767
10768 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10769 (vector_types_compatible_elements_p): New function.
10770 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10771 declaration.
10772 (vector_types_compatible_elements_p): Declare.
10773
10774 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10775
10776 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10777 a virtual member function.
10778 (pp_simple_type_specifier): Remove.
10779 (pp_c_type_specifier): Likewise.
10780 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10781 Rename from pp_c_type_specifier. Adjust.
10782 (c_pretty_printer::c_pretty_printer): Do not assign to
10783 simple_type_specifier.
10784
10785 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10786
10787 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10788 member function.
10789 (c_pretty_printer::storage_class_specifier): Likewise.
10790 (c_pretty_printer::initializer): Likewise.
10791 (pp_declaration): Remove.
10792 (pp_declaration_specifiers): Likewise.
10793 (pp_abstract_declarator): Likewise.
10794 (pp_declarator): Likewise.
10795 (pp_type_id): Likewise.
10796 (pp_statement): Likewise.
10797 (pp_constant): Likewise.
10798 (pp_id_expression): Likewise.
10799 (pp_primary_expression): Likewise.
10800 (pp_unary_expression): Likewise.
10801 (pp_multiplicative_expression): Likewise.
10802 (pp_conditional_expression): Likewise.
10803 (pp_assignment_expression): Likewise.
10804 (pp_expression): Likewise.
10805 (pp_c_type_id): Likewise.
10806 (pp_c_storage_class_specifier): Likewise.
10807 * c-pretty-print.c (pp_c_type_cast): Tidy.
10808 (pp_c_pointer): Likewise.
10809 (pp_c_type_specifier): Likewise.
10810 (pp_c_parameter_type_list): Likewise.
10811 (pp_c_function_definition): Likewise.
10812 (pp_c_init_declarator): Likewise.
10813 (pp_c_initializer_list): Likewise.
10814 (pp_c_constructor_elts): Likewise.
10815 (c_pretty_printer::direct_abstract_declarator): Likewise.
10816 (c_pretty_printer::declaration_specifiers): Likewise.
10817 (c_pretty_printer::primary_expression): Likewise.
10818 (c_pretty_printer::postfix_expression): Likewise.
10819 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10820 (c_pretty_printer::storage_class_specifier): Rename from
10821 pp_c_storage_class_specifier.
10822 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10823 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10824 storage_class_specifier, initializer, offset_list, flags.
10825
10826 2013-08-30 Marek Polacek <polacek@redhat.com>
10827
10828 * c-ubsan.c: New file.
10829 * c-ubsan.h: New file.
10830
10831 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10832
10833 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10834 member function.
10835 (c_pretty_printer::declaration_specifiers): Likewise.
10836 (c_pretty_printer::declarator): Likewise.
10837 (c_pretty_printer::abstract_declarator): Likewise.
10838 (c_pretty_printer::direct_abstract_declarator): Likewise.
10839 (c_pretty_printer::direct_declarator): Likewise.
10840 (c_pretty_printer::function_specifier): Likewise.
10841 (pp_declaration): Adjust.
10842 (pp_declaration_specifiers): Likewise.
10843 (pp_abstract_declarator): Likewise.
10844 (pp_direct_declarator): Likewise.
10845 (pp_function_specifier): Likewise.
10846 (pp_direct_abstract_declarator): Remove as unused.
10847 (pp_c_declaration): Remove.
10848 (pp_c_declaration_specifiers): Likewise.
10849 (pp_c_declarator): Likewise.
10850 (pp_c_direct_declarator): Likewise.
10851 (pp_c_function_specifier): Likewise.
10852 (pp_c_direct_abstract_declarator): Likewise.
10853 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10854 from pp_c_abstract_declarator. Adjust.
10855 (c_pretty_printer::direct_abstract_declarator): Rename from
10856 pp_c_direct_abstract_declarator. Adjust.
10857 (c_pretty_printer::function_specifier): Rename from
10858 pp_c_function_specifier. Adjust.
10859 (c_pretty_printer::declaration_specifiers): Rename from
10860 pp_c_declaration_specifiers. Adjust.
10861 (c_pretty_printer::direct_declarator): Rename from
10862 pp_c_direct_declarator. Adjust.
10863 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10864 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10865 (c_pretty_printer::c_pretty_printer): Do not assign to
10866 declaration, declaration_specifiers, declarator,
10867 direct_declarator, direct_abstract_declarator, function_specifier.
10868
10869 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10870
10871 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10872 virtual member function.
10873 (c_pretty_printer::multiplicative_expression): Likewise.
10874 (c_pretty_printer::conditional_expression): Likewise.
10875 (c_pretty_printer::assignment_expression): Likewise.
10876 (c_pretty_printer::expression): Likewise.
10877 (pp_unary_expression): Adjust.
10878 (pp_multiplicative_expression): Likewise.
10879 (pp_assignment_expression): Likewise.
10880 (pp_conditional_expression): Likewise.
10881 (pp_expression): Likewise.
10882 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10883 from pp_c_unary_expression. Adjust.
10884 (c_pretty_printer::multiplicative_expression): Rename from
10885 pp_c_multiplicative_expression. Adjust.
10886 (c_pretty_printer::conditional_expression): Rename from
10887 pp_c_conditional_expression. Adjust.
10888 (c_pretty_printer::assignment_expression): Rename from
10889 pp_c_assignment_expression. Adjust.
10890 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10891 (c_pretty_printer::c_pretty_printer): Do not assign to
10892 unary_expression, multiplicative_expression,
10893 conditional_expression, expression.
10894
10895 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10896
10897 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10898 virtual member function.
10899 (pp_postfix_expression): Adjust.
10900 (pp_c_postfix_expression): Remove.
10901 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10902 from pp_c_postfix_expression. Adjust.
10903 (c_pretty_printer::c_pretty_printer): Do not assign to
10904 postfix_expression.
10905
10906 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10907
10908 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10909 virtua member function.
10910 (pp_primary_expression): Adjust.
10911 (pp_c_primary_expression): Remove.
10912 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10913 from pp_c_primary_expression. Adjust.
10914 (pp_c_initializer_list): Use pp_primary_expression.
10915 (c_pretty_printer::c_pretty_printer): Do not assign to
10916 primary_expression.
10917
10918 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10919
10920 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10921 * c-pretty-print.c (M_): Remove.
10922 (c_pretty_printer::translate_string): Define.
10923 (pp_c_type_specifier): Use it.
10924 (pp_c_primary_expression): Likewise.
10925 (pp_c_expression): Likewise.
10926
10927 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10928
10929 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10930 virtual function.
10931 (pp_c_id_expression): Remove.
10932 (pp_id_expression): Adjust.
10933 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10934 pp_c_id_expression. Adjust.
10935 (pp_c_postfix_expression): Use pp_id_expression.
10936 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10937
10938 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10939
10940 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10941 member function.
10942 (pp_constant): Adjust.
10943 (pp_c_constant): Remove.
10944 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10945 pp_c_constant. Adjust.
10946 (pp_c_constant)
10947 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10948 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10949
10950 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10951
10952 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10953 (c_pretty_printer::c_pretty_printer): Declare.
10954 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10955 c_pretty_printer_init. Adjust.
10956 (print_c_tree): Do not call c_pretty_printer_init.
10957 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10958
10959 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10960
10961 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10962
10963 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10964
10965 PR c++/58080
10966 * c-common.c (pointer_int_sum): Add bool parameter.
10967 * c-common.h (pointer_int_sum): Adjust declaration.
10968
10969 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10970
10971 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10972 c_pretty_printer variable.
10973
10974 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10975
10976 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10977 (pp_base): Remove.
10978 (pp_c_base): Likewise. Adjust users.
10979 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10980 (pp_c_whitespace): Do not call pp_base.
10981 (pp_c_left_paren): Likewise.
10982 (pp_c_right_paren): Likewise.
10983 (pp_c_left_brace): Likewise.
10984 (pp_c_right_brace): Likewise.
10985 (pp_c_left_bracket): Likewise.
10986 (pp_c_right_bracket): Likewise.
10987 (pp_c_dot): Likewise.
10988 (pp_c_ampersand): Likewise.
10989 (pp_c_star): Likewise.
10990 (pp_c_arrow): Likewise.
10991 (pp_c_semicolon): Likewise.
10992 (pp_c_complement): Likewise.
10993 (pp_c_exclamation): Likewise.
10994 (pp_c_direct_declarator): Likewise.
10995 (pp_c_ws_string): Likewise.
10996 (pp_c_identifier): Likewise.
10997 (pp_c_statement): Likewise.
10998 (print_c_tree): Likewise.
10999
11000 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11001
11002 PR c++/58072
11003 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11004 provide useful error strings.
11005
11006 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11007
11008 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11009 printer functions instead of pp_string or operators and punctuators.
11010 (dump_generic_ada_node): Likewise.
11011 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11012 (pp_c_relational_expression): Likewise.
11013 (pp_c_logical_or_expression): Likewise.
11014
11015 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11016
11017 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11018 functions instead of pp_character.
11019 (pp_ada_tree_identifier): Likewise.
11020 (dump_ada_double_name): Likewise.
11021 (dump_ada_function_declaration): Likewise.
11022 (dump_ada_array_domains): Likewise.
11023 (dump_template_types): Likewise.
11024 (dump_generic_ada_node): Likewise.
11025 (print_ada_declaration): Likewise.
11026 (print_ada_struct_decl): Likewise.
11027 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11028
11029 2013-07-23 Tom Tromey <tromey@redhat.com>
11030
11031 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11032 * c-common.c (c_common_reswords): Add _Generic.
11033
11034 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11035
11036 * c-common.c: Fix typos.
11037 * c-common.h: Likewise.
11038
11039 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
11040
11041 PR c++/55203
11042 * c-common.c (c_common_attribute_table): Add warn_unused.
11043 (handle_warn_unused_attribute): New.
11044
11045 2013-07-10 Jakub Jelinek <jakub@redhat.com>
11046
11047 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11048 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11049
11050 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11051
11052 PR c++/57869
11053 * c.opt: Add Wconditionally-supported.
11054
11055 2013-07-08 Graham Stott <graham.stott@btinternet.com>
11056
11057 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11058 unused variables l_length and l_node.
11059
11060 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11061
11062 PR c/57821
11063 * c-common.c (complete_array_type): Delay folding first index
11064 like other indices. When folding, check for index overflow.
11065
11066 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11067
11068 PR c++/57509
11069 * c-common.h (c_build_vec_perm_expr): New complain argument.
11070 * c-common.c (c_build_vec_perm_expr): Likewise.
11071 Use save_expr also in C++.
11072
11073 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11074
11075 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11076 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11077 * c-opts.c (c_common_post_options): Likewise.
11078
11079 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11080
11081 * array-notation-common.c (length_mismatch_in_expr): Changed the
11082 parameter type's from a dynamic array to a vec_tree. Also removed
11083 the size parameters.
11084 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11085 the change above.
11086
11087 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11088
11089 * c-common.h (struct cilkplus_an_parts): New structure.
11090 (struct cilkplus_an_loop_parts): Likewise.
11091 (cilkplus_extract_an_triplets): New prototype.
11092 (fix_sec_implicit_args): Likewise.
11093 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11094 (fix_sec_implicit_args): Likewise.
11095
11096 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11097
11098 * array-notation-common.c (find_inv_trees): Removed an unwanted
11099 typecasting.
11100 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11101 enum rid to enum tree_code.
11102
11103 2013-06-11 Jan Hubicka <jh@suse.cz>
11104
11105 * c-common.c (handle_alias_ifunc_attribute): Do not set
11106 DECL_EXTERNAL for weakref variables.
11107 * c-pragma.c (handle_pragma_weak): Make sure aliases
11108 are not declared as external.
11109
11110 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11111
11112 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11113 function from c/c-array-notation.c.
11114 (is_cilkplus_reduce_builtin): Likewise.
11115 (find_rank): Likewise.
11116 (extract_array_notation_exprs): Likewise.
11117 (replace_array_notations): Likewise.
11118 (find_inv_trees): Likewise.
11119 (replace_inv_trees): Likewise.
11120 (contains_array_notation_expr): Likewise.
11121 (find_correct_array_notation_type): Likewise.
11122 * c-common.h (struct inv_list): Moved this struct from the file
11123 c/c-array-notation.c and added a new field called additional tcodes.
11124 (length_mismatch_in_expr_p): New prototype.
11125 (is_cilkplus_reduce_builtin): Likewise.
11126 (find_rank): Likewise.
11127 (extract_array_notation_exprs): Likewise.
11128 (replace_array_notation): Likewise.
11129 (find_inv_trees): Likewise.
11130 (replace_inv_trees): Likewise.
11131 (find_correct_array_notation_type): Likewise.
11132
11133 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11134
11135 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11136 function array_notation_init_builtins is called.
11137 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11138 * c-common.def (ARRAY_NOTATION_REF): New tree.
11139 * c-common.h (build_array_notation_expr): New function declaration.
11140 (build_array_notation_ref): Likewise.
11141 (extract_sec_implicit_index_arg): New extern declaration.
11142 (is_sec_implicit_index_fn): Likewise.
11143 (ARRAY_NOTATION_CHECK): New define.
11144 (ARRAY_NOTATION_ARRAY): Likewise.
11145 (ARRAY_NOTATION_START): Likewise.
11146 (ARRAY_NOTATION_LENGTH): Likewise.
11147 (ARRAY_NOTATION_STRIDE): Likewise.
11148 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11149 ARRAY_NOTATION_REF.
11150 (pp_c_expression): Likewise.
11151 * c.opt (flag_enable_cilkplus): New flag.
11152 * array-notation-common.c: New file.
11153
11154 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11155
11156 PR c++/57274
11157 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11158
11159 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11160
11161 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11162 vectors.
11163
11164 2013-05-07 Han Shen <shenhan@google.com>
11165
11166 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11167
11168 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11169
11170 * c-common.c (check_user_alignment): Emit error for negative values.
11171
11172 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11173
11174 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11175
11176 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11177
11178 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11179 __GXX_EXPERIMENTAL_CXX1Y__.
11180
11181 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11182 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11183
11184 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11185 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11186 to simply use OPT_Wpointer_arith.
11187 (c_sizeof_or_alignof_type): Likewise.
11188
11189 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11190
11191 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11192
11193 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11194
11195 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11196 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11197 specifiers.
11198
11199 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11200
11201 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11202
11203 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11204
11205 * c-common.c (pointer_int_sum): Remove dead code.
11206
11207 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11208
11209 PR middle-end/56524
11210 * c-common.c (handle_optimize_attribute): Don't call
11211 save_optabs_if_changed.
11212
11213 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11214
11215 PR middle-end/56461
11216 * c-pch.c (pch_init): Free target_validity at the end.
11217
11218 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11219
11220 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11221
11222 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11223 Jakub Jelinek <jakub@redhat.com>
11224
11225 PR sanitizer/56454
11226 * c-common.c (handle_no_sanitize_address_attribute): New function.
11227 (c_common_attribute_table): Add no_sanitize_address attribute.
11228 (handle_no_address_safety_analysis_attribute): Add
11229 no_sanitize_address attribute, not no_address_safety_analysis
11230 attribute.
11231
11232 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11233
11234 PR target/52555
11235 * c-common.c (handle_optimize_attribute): Call
11236 save_optabs_if_changed.
11237
11238 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11239 Steven Bosscher <steven@gcc.gnu.org>
11240
11241 PR pch/54117
11242 * c-opts.c (c_common_post_options): If debug info is enabled
11243 and non-dwarf*, refuse to load PCH files and when writing PCH
11244 file warn.
11245
11246 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11247
11248 PR middle-end/56167
11249 * c-common.c (handle_error_attribute): Fix condition.
11250
11251 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11252
11253 PR c++/55742
11254 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11255
11256 2013-01-18 Jason Merrill <jason@redhat.com>
11257
11258 PR target/54908
11259 * c.opt (-fextern-tls-init): New.
11260 * c-opts.c (c_common_post_options): Handle it.
11261
11262 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11263
11264 PR c/48418
11265 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11266 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11267 and is either negative or bigger or equal to type precision
11268 of the first operand.
11269
11270 2012-12-03 Marek Polacek <polacek@redhat.com>
11271
11272 PR c/55570
11273 * c-common.c (check_user_alignment): Swap order of tests,
11274 check TREE_CODE first.
11275
11276 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11277
11278 PR c++/52654
11279 * c-common.h (overflow_type): New enum.
11280 (build_userdef_literal): Add overflow_type argument.
11281 (tree_userdef_literal): Add overflow_type.
11282 (USERDEF_LITERAL_OVERFLOW): New access macro.
11283 * c-common.c (build_userdef_literal): Add overflow_type
11284 argument.
11285 * c-lex.c (c_lex_with_flags): Add overflow_type to
11286 build_userdef_literal calls.
11287 (interpret_integer, interpret_float): Add overflow_type argument.
11288
11289 2012-11-28 Richard Biener <rguenther@suse.de>
11290
11291 PR c/35634
11292 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11293 here and use a type with proper overflow behavior for types that would
11294 need to be promoted for the arithmetic.
11295
11296 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11297
11298 PR sanitizer/55435
11299 * c-common.c (handle_no_address_safety_analysis_attribute): New
11300 function.
11301 (c_common_attribute_table): Add no_address_safety_analysis.
11302
11303 2012-11-16 Simon Baldwin <simonb@google.com>
11304
11305 * c.opt: Add f[no-]canonical-system-headers.
11306 * c-opts.c (c_common_handle_option): Handle
11307 OPT_fcanonical_system_headers.
11308
11309 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11310
11311 PR c++/54413
11312 * c-opts.c (c_common_handle_option): Set new flags.
11313 * c.opt: Describe new flags.
11314
11315 2012-11-09 Jason Merrill <jason@redhat.com>
11316
11317 * c.opt (Wabi-tag): New.
11318
11319 2012-11-09 Andi Kleen <ak@linux.intel.com>
11320
11321 PR 55139
11322 * c-common.c (get_atomic_generic_size): Mask with
11323 MEMMODEL_MASK
11324
11325 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11326
11327 PR c/53063
11328 * c.opt (Wformat): Make it Alias Wformat=1.
11329 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11330 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11331 LangEnabledBy.
11332 (Wformat=): RejectNegative. Use LangEnabledBy.
11333 (Wnonnull): Use LangEnabledBy.
11334 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11335 * c-format.c (set_Wformat): Delete.
11336 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11337 (maybe_read_dollar_number): Likewise.
11338 (avoid_dollar_number): Likewise.
11339 (finish_dollar_format_checking): Likewise.
11340 (check_format_info): Likewise.
11341 (check_format_info_main): Likewise.
11342 (check_format_types): Likewise.
11343 (format_type_warning): Likewise.
11344 * c-common.c (int): Likewise.
11345 (check_function_sentinel): Likewise.
11346 * c-common.h (warn_format,set_Wformat): Do not declare here.
11347
11348 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11349
11350 PR c/53063
11351 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11352 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11353 Use LangEnabledBy.
11354 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11355 common.opt.
11356 (Wvariadic-macros): Init(1).
11357 * c-opts.c (c_common_handle_option): Do not handle them
11358 explicitly.
11359 (c_common_post_options): Likewise.
11360 (sanitize_cpp_opts): warn_unused_macros is now
11361 cpp_warn_unused_macros.
11362 (push_command_line_include): Likewise.
11363 * c-common.c (warn_unknown_pragmas): Do not define.
11364 * c-common.h (warn_unknown_pragmas): Do not declare.
11365
11366 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11367
11368 PR c/51294
11369 * c-common.c (conversion_warning): Handle conditional expressions.
11370
11371 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11372
11373 PR c++/54930
11374 * c.opt (Wreturn_local_addr): Define new option.
11375
11376 2012-10-25 Jason Merrill <jason@redhat.com>
11377
11378 * c.opt (Wvirtual-move-assign): New.
11379
11380 * c.opt (Winherited-variadic-ctor): New.
11381
11382 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11383
11384 PR c++/54427
11385 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11386
11387 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11388
11389 * c-common.h (pch_cpp_save_state): Declare.
11390 * c-target.def (c_preinclude): New hook.
11391 * c-opts.c (done_preinclude): New.
11392 (push_command_line_include): Handle default preincluded header.
11393 (cb_file_change): Call pch_cpp_save_state when calling
11394 push_command_line_include.
11395 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11396 (pch_cpp_save_state): New.
11397 (pch_init): Call pch_cpp_save_state conditionally, instead of
11398 calling cpp_save_state.
11399
11400 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11401
11402 PR c/53063
11403 PR c/40989
11404 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11405 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11406 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11407 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11408 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11409 * c-opts.c (c_common_handle_option): Remove explicit handling from
11410 here.
11411 (c_common_post_options): Likewise.
11412
11413 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11414
11415 * c-ada-spec.c (LOCATION_COL): Delete.
11416 (compare_location): New function.
11417 (compare_node): Use it.
11418 (compare_comment): Likewise.
11419
11420 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11421
11422 PR c/53063
11423 PR c/40989
11424 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11425 * c-opts.c (c_common_handle_option): Do not set them here. Add
11426 comment.
11427 (c_common_post_options): Likewise.
11428
11429 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11430
11431 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11432 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11433 Remove POINTER_TYPE handling, add large unsigned handling and use
11434 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11435
11436 2012-10-12 Jakub Jelinek <jakub@redhat.com>
11437
11438 PR c/54381
11439 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11440 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11441 locs and array of 3 trees instead of just single loc and single
11442 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11443 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11444 For *cmp* builtins that take two sources strings report warnings
11445 about first and second source, not about destination and source.
11446
11447 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
11448
11449 PR c++/53055
11450 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11451
11452 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11453
11454 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11455 declaring something coming from another file.
11456
11457 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11458
11459 PR ada/54845
11460 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11461
11462 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11463
11464 PR c++/54194
11465 * c-common.c (warn_about_parentheses): Add location_t parameter;
11466 use EXPR_LOC_OR_LOC.
11467 * c-common.h: Update declaration.
11468
11469 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11470
11471 PR c++/54427
11472 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11473 more operations. Make error messages optional.
11474 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11475 (scalar_to_vector): Declare.
11476
11477 2012-10-08 Jason Merrill <jason@redhat.com>
11478
11479 * c-common.c (c_common_reswords): Add thread_local.
11480
11481 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11482
11483 PR c++/53528 C++11 attribute support
11484 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11485 new functions.
11486 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11487 static function.
11488 (handle_aligned_attribute): In choose strictest alignment
11489 among many. Use new check_cxx_fundamental_alignment_constraints.
11490 (handle_transparent_union_attribute): In c++11 attribute syntax,
11491 don't look through typedefs.
11492
11493 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11494
11495 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11496 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11497 out of dumpfile.h.
11498
11499 2012-09-25 Dehao Chen <dehao@google.com>
11500
11501 PR middle-end/54645
11502 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11503 map when read in the pch.
11504
11505 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11506
11507 * c-ada-spec.c: Style fixes.
11508
11509 2012-09-18 Thomas Quinot <quinot@adacore.com>
11510
11511 * c.opt (-fada-spec-parent): Define new command line switch.
11512 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11513 is specified, generate binding spec as a child of the specified unit.
11514
11515 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11516 Manuel López-Ibáñez <manu@gcc.gnu.org>
11517
11518 PR c++/53210
11519 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11520
11521 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11522
11523 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11524 for pointers, and add missing Convention C pragma.
11525 (print_ada_struct_decl): Add missing aliased keyword.
11526 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11527
11528 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11529
11530 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11531 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11532 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11533 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11534 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11535
11536 2012-08-10 Richard Guenther <rguenther@suse.de>
11537
11538 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11539
11540 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11541
11542 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11543 instead of separate pp_newline and pp_flush.
11544 (print_c_tree): Likewise.
11545
11546 2012-07-26 Richard Henderson <rth@redhat.com>
11547
11548 * c-common.c (handle_hot_attribute): Allow labels.
11549 (handle_cold_attribute): Likewise.
11550
11551 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11552
11553 PR c++/28656
11554 * c-common.c (check_function_nonnull): Handle multiple nonnull
11555 attributes properly.
11556
11557 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11558
11559 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11560 * c-ada-spec.c: Likewise.
11561 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11562
11563 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11564
11565 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11566 Remove code conditional on it.
11567
11568 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11569
11570 * c-gimplify.c: Do not include basic-block.h.
11571 * c-common.c: Do not include linfuncs.h.
11572
11573 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11574
11575 * c-common.h: Include tree.h.
11576
11577 2012-07-02 Jason Merrill <jason@redhat.com>
11578
11579 PR c++/53524
11580 * c-common.c (get_priority): Call default_conversion.
11581
11582 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
11583
11584 * c-pch.c (c_common_write_pch): Remove unused variables.
11585
11586 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11587
11588 * cppspec.c: Moved from gcc/ to here.
11589
11590 2012-06-27 Kai Tietz <ktietz@redhat.com>
11591
11592 PR preprocessor/37215
11593 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11594
11595 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11596
11597 * c-common.h (c_common_print_pch_checksum): Remove.
11598 * c-pch.c: Do not include output.h.
11599 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11600 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11601 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11602 (struct c_pch_header): Remove.
11603 (get_ident): Update gpch version.
11604 (pch_init): Do not print executable_checksum to asm_out_file.
11605 Do not fail if there is no asm_out_file to read back from. Set
11606 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11607 (c_common_write_pch): Verify that nothing was written to asm_out_file
11608 since pch_init was called. Do not write a c_pch_header, and do not
11609 copy from asm_out_file to the PCH.
11610 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11611 the content of asm_out_file from the PCH.
11612 (c_common_print_pch_checksum): Remove.
11613 * c-opts.c (c_common_init): Print out executable_checksum directly.
11614
11615 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11616
11617 * c-target.def (objc_declare_unresolved_class_reference,
11618 objc_declare_class_definition): Add new hooks.
11619
11620 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11621
11622 * c-lex.c: Do not include output.h.
11623 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11624 Remove uses of ASM_OUTPUT_IDENT.
11625
11626 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
11627
11628 PR c++/51033
11629 * c-common.h (c_build_vec_perm_expr): Move decl here.
11630 * c-common.c (c_build_vec_perm_expr): Move definition
11631 here.
11632
11633 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11634
11635 * c.opt (fconserve-space): Turn into a no-op.
11636
11637 2012-06-04 Sterling Augustine <saugustine@google.com>
11638
11639 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11640 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11641 both the start and end of the function.
11642
11643 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11644
11645 * c-common.c: Do not include output.h.
11646 * c-pragma.c: Likewise.
11647
11648 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11649
11650 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11651 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11652 (lang_decl_name): Handle namespace decls.
11653
11654 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11655
11656 * c-ada-spec.c: Do not include output.h.
11657 * c-semantics.c: Likewise.
11658
11659 2012-05-29 Joseph Myers <joseph@codesourcery.com>
11660
11661 * c-common.c: Fix typo.
11662
11663 2012-05-29 Michael Matz <matz@suse.de>
11664
11665 * c-common.h (c_expand_decl): Remove prototype.
11666
11667 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11668
11669 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11670 * c-opts.c (c_common_handle_option): Remove code handling
11671 warn_missing_braces.
11672
11673 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11674
11675 PR c++/25137
11676 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11677 -Wmissing_braces.
11678
11679 2012-05-22 Dodji Seketeli <dodji@redhat.com>
11680
11681 PR c++/53322
11682 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11683
11684 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11685
11686 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11687 * c-opts.c (c_common_handle_option): Do not handle explicitly
11688 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11689
11690 2012-05-16 Dodji Seketeli <dodji@redhat.com>
11691
11692 PR preprocessor/7263
11693 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
11694 to cpp_classify_number. For diagnostics, use the precise location
11695 instead of the global input_location.
11696
11697 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11698
11699 PR c++/11856
11700 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11701
11702 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11703
11704 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
11705
11706 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11707
11708 PR 53063
11709 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11710 Wreorder): Use LangEnabledBy.
11711 * c-opts.c (c_common_handle_option): Do not enable them
11712 explicitly. Call lang-specific generated functions.
11713 (c_common_post_options): Do not set them here.
11714
11715 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11716
11717 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11718 Wmissing-field-initializers,Wmissing-parameter-type,
11719 Wold-style-declaration,Woverride-init): Use EnabledBy.
11720 * c-opts.c (c_common_post_options): Do not set here explicitly.
11721
11722 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11723
11724 PR 53063
11725 * c-opts.c (c_common_handle_option): Use handle_generated_option
11726 to enable sub-options.
11727
11728 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11729
11730 PR c++/53158
11731 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11732
11733 2012-05-10 Richard Guenther <rguenther@suse.de>
11734
11735 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11736 adjust commentary about TYPE_IS_SIZETYPE types.
11737
11738 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11739
11740 PR c++/53261
11741 * c-common.c (warn_logical_operator): Check that argument of
11742 integer_zerop is not NULL.
11743
11744 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11745
11746 PR c/43772
11747 * c-common.c (warn_logical_operator): Do not warn if either side
11748 is already true or false.
11749
11750 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11751
11752 PR c/51712
11753 * c-common.c (expr_original_type): New.
11754 (shorten_compare): Do not warn for enumeration types.
11755
11756 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11757
11758 * c.opt (fpermissive): Add Var(flag_permissive).
11759
11760 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11761
11762 PR c++/51033
11763 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11764 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11765
11766 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11767
11768 Add -Wvarargs option
11769 * c.opt (Wvarargs): Define new option.
11770
11771 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11772
11773 * c-common.c (check_function_arguments): Replace
11774 Wmissing-format-attribute with Wsuggest-attribute=format.
11775
11776 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11777
11778 * c.opt (Wsuggest-attribute=format): New. Alias of
11779 Wmissing-format-attribute.
11780 * c-format.c (decode_format_type): Replace
11781 Wmissing-format-attribute with Wsuggest-attribute=format.
11782 (check_function_format): Likewise.
11783
11784 2012-04-27 Ollie Wild <aaw@google.com>
11785
11786 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11787 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11788 * c.opt: Add Wliteral-suffix.
11789
11790 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11791
11792 PR c/44774
11793 * c.opt (Wpedantic): New.
11794 (pedantic): Alias Wpedantic.
11795 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11796 (c_common_post_options): Likewise.
11797 (sanitize_cpp_opts): Likewise.
11798 * c-lex.c (interpret_float): Likewise.
11799 * c-format.c (check_format_types): Likewise.
11800 * c-common.c (pointer_int_sum): Likewise.
11801 (c_sizeof_or_alignof_type): Likewise.
11802 (c_add_case_label): Likewise.
11803 (c_do_switch_warnings): Likewise.
11804 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11805
11806 2012-04-15 Jason Merrill <jason@redhat.com>
11807
11808 PR c++/52818
11809 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11810 (C_STD_NAME): Distinguish between C++98 and C++11.
11811
11812 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11813
11814 PR target/52624
11815 * c-common.h (uint16_type_node): Rename into...
11816 (c_uint16_type_node): ...this.
11817 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11818 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11819
11820 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11821
11822 * c-common.c (warn_if_unused_value): Move definition to here.
11823 * c-common.h (warn_if_unused_value): Move declaration to here.
11824
11825 2012-03-23 William Bader <williambader@hotmail.com>
11826
11827 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11828
11829 2012-03-20 Jason Merrill <jason@redhat.com>
11830
11831 * c-common.h (enum cxx_dialect): Add cxx1y.
11832 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11833 test.
11834 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11835 * c-opts.c (c_common_post_options): Likewise.
11836 (set_std_cxx1y): New.
11837 (c_common_handle_option): Call it.
11838 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11839
11840 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11841
11842 PR c++/14710
11843 * c.opt ([Wuseless-cast]): Add.
11844
11845 2012-03-16 Richard Guenther <rguenther@suse.de>
11846
11847 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11848
11849 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11850
11851 PR c++/44783
11852 * c.opt (ftemplate-backtrace-limit) Add.
11853
11854 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11855
11856 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11857 handling.
11858 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11859 (init_pragma): Don't register extern_prefix.
11860
11861 2012-03-12 Richard Guenther <rguenther@suse.de>
11862
11863 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11864 (builtin_type_for_size): Likewise.
11865
11866 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11867
11868 PR c++/52215
11869 * c-common.c (sync_resolve_params): Don't decide whether to convert
11870 or not based on TYPE_SIZE comparison, convert whenever arg_type
11871 is unsigned INTEGER_TYPE.
11872
11873 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11874
11875 PR c/52118
11876 * c.opt ([Wunused-local-typedefs]): Fix description.
11877
11878 2012-01-24 Mike Stump <mikestump@comcast.net>
11879
11880 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11881 exactly.
11882
11883 2012-01-18 Richard Guenther <rguenther@suse.de>
11884
11885 * c-opts.c (c_common_post_options): Reset LTO flags if
11886 we are about to generate a PCH.
11887
11888 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11889
11890 PR c++/51777
11891 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11892 use pp_unsigned_wide_integer.
11893
11894 2012-01-10 Richard Guenther <rguenther@suse.de>
11895
11896 PR middle-end/51806
11897 * c-opts.c (c_common_handle_option): Move -Werror handling
11898 to language independent code.
11899
11900 2012-01-05 Richard Guenther <rguenther@suse.de>
11901
11902 PR middle-end/51764
11903 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11904 from common.opt.
11905
11906 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11907
11908 PR c++/51316
11909 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11910 of array types with an unknown bound.
11911
11912 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11913
11914 * c-common.c (flag_isoc99): Update comment to refer to C11.
11915 (flag_isoc1x): Change to flag_isoc11.
11916 * c-common.h (flag_isoc99): Update comment to refer to C11.
11917 (flag_isoc1x): Change to flag_isoc11.
11918 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11919 C11.
11920 * c-opts.c (set_std_c1x): Change to set_std_c11.
11921 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11922 Call set_std_c11.
11923 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11924 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11925 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11926 standard.
11927 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11928 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11929 (std=gnu1x): Make alias of std=gnu11.
11930
11931 2011-12-19 Jason Merrill <jason@redhat.com>
11932
11933 PR c++/51228
11934 * c-common.c (handle_transparent_union_attribute): Check the first
11935 field if the type is complete.
11936
11937 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11938
11939 PR libstdc++/51365
11940 * c-common.c (RID_IS_FINAL): Add.
11941 * c-common.h (RID_IS_FINAL): Add.
11942
11943 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11944
11945 * c.opt (fgnu-runtime): Provide full description.
11946 (fnext-runtime): Likewise.
11947 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11948
11949 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11950
11951 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11952 predefines in one place. Add LOCK_FREE predefines.
11953 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11954 new func.
11955
11956 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11957
11958 PR c/51256
11959 * c-common.c (get_atomic_generic_size): Check for various error
11960 conditions
11961 (resolve_overloaded_atomic_exchange,
11962 resolve_overloaded_atomic_compare_exchange,
11963 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11964 error_mark_node for error conditions.
11965
11966 2011-11-08 Richard Guenther <rguenther@suse.de>
11967
11968 PR middle-end/51010
11969 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11970
11971 2011-11-07 Richard Henderson <rth@redhat.com>
11972 Aldy Hernandez <aldyh@redhat.com>
11973 Torvald Riegel <triegel@redhat.com>
11974
11975 Merged from transactional-memory.
11976
11977 * c-common.c (handle_tm_wrap_attribute,
11978 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11979 (struct c_common_reswords): Added __transaction* keywords.
11980 (struct c_common_attribute_table): Added transaction* and tm_regparm
11981 attributes.
11982 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11983 masks.
11984 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11985 find_tm_attribute): Declare.
11986
11987 2011-11-07 Jason Merrill <jason@redhat.com>
11988
11989 PR c++/35688
11990 * c-common.c, c-common.h: Revert yesterday's changes.
11991
11992 2011-11-06 Jason Merrill <jason@redhat.com>
11993
11994 PR c++/35688
11995 * c-common.c (decl_has_visibility_attr): Split out from...
11996 (c_determine_visibility): ...here.
11997 * c-common.h: Declare it.
11998
11999 2011-11-06 Joseph Myers <joseph@codesourcery.com>
12000
12001 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12002 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12003 type.
12004 (check_user_alignment): New. Split out of
12005 handle_aligned_attribute. Disallow integer constants with
12006 noninteger types. Conditionally allow zero.
12007 (handle_aligned_attribute): Use check_user_alignment.
12008 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12009
12010 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
12011 Richard Henderson <rth@redhat.com>
12012
12013 Merged from cxx-mem-model.
12014
12015 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
12016 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
12017 parameters that are the same type size.
12018 (get_atomic_generic_size): New. Find size of generic
12019 atomic function parameters and do typechecking.
12020 (add_atomic_size_parameter): New. Insert size into parameter list.
12021 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12022 either __atomic_exchange_n or external library call.
12023 (resolve_overloaded_atomic_compare_exchange): Restructure
12024 __atomic_compare_exchange to either _n variant or external library call.
12025 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
12026 __atomic_load_n or an external library call.
12027 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12028 __atomic_store_n or an external library call.
12029 (resolve_overloaded_builtin): Handle new __atomic builtins.
12030
12031 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12032
12033 PR c++/50608
12034 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12035 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12036 <INDIRECT_REF>: Return the argument.
12037 <ARRAY_REF>: Remove special code for negative offset.
12038 Call fold_build_pointer_plus instead of size_binop.
12039 (fold_offsetof): Remove STOP_REF argument and adjust.
12040 * c-common.h (fold_offsetof_1): Declare.
12041 (fold_offsetof): Remove STOP_REF argument.
12042
12043 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12044
12045 PR c++/50810
12046 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12047 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12048 Wnarrowing for C++0x and C++98.
12049 * c.opt ([Wnarrowing]): Update.
12050
12051 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12052
12053 PR c++/44277
12054 * c.opt: Add Wzero-as-null-pointer-constant.
12055
12056 2011-10-31 Jason Merrill <jason@redhat.com>
12057
12058 * c.opt (-fdeduce-init-list): Off by default.
12059
12060 PR c++/50920
12061 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12062 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12063 and -Wc++11-compat.
12064 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12065
12066 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12067
12068 PR c++/30066
12069 * c.opt (fvisibility-inlines-hidden): Description change.
12070
12071 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12072
12073 Implement C++11 user-defined literals.
12074 * c-common.c (build_userdef_literal): New.
12075 * c-common.def: New tree code.
12076 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12077 * c-lex.c (interpret_float): Add suffix parm.
12078 (c_lex_with_flags): Build literal tokens.
12079
12080 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12081
12082 PR c++/50841
12083 Revert:
12084 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12085
12086 PR c++/50810
12087 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12088 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12089 Wnarrowing for C++0x and C++98.
12090 * c.opt ([Wnarrowing]): Update.
12091
12092 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12093
12094 PR c++/50810
12095 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12096 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12097 Wnarrowing for C++0x and C++98.
12098 * c.opt ([Wnarrowing]): Update.
12099
12100 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12101
12102 PR c++/45385
12103 * c-common.c (conversion_warning): Remove code looking for
12104 artificial operands.
12105
12106 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12107
12108 PR bootstrap/50760
12109 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12110 !NO_IMPLICIT_EXTERN_C.
12111
12112 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12113
12114 * c-common.c (c_common_reswords): Add __bases,
12115 __direct_bases.
12116 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12117
12118 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12119
12120 PR c++/50757
12121 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12122
12123 2011-10-15 Tom Tromey <tromey@redhat.com>
12124 Dodji Seketeli <dodji@redhat.com>
12125
12126 * c.opt (fdebug-cpp): New option.
12127 * c-opts.c (c_common_handle_option): Handle the option.
12128 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12129 output stream in parameter. Factorized from ...
12130 (maybe_print_line): ... this. Dump location debug information when
12131 -fdebug-cpp is in effect.
12132 (print_line_1): New static function. Takes an output stream in
12133 parameter. Factorized from ...
12134 (print_line): ... here. Dump location information when -fdebug-cpp
12135 is in effect.
12136 (scan_translation_unit): Dump location information when
12137 -fdebug-cpp is in effect.
12138
12139 2011-10-15 Tom Tromey <tromey@redhat.com>
12140 Dodji Seketeli <dodji@redhat.com>
12141
12142 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12143 without argument.
12144 * c-opts.c (c_common_handle_option)<case
12145 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12146 cases. Handle -ftrack-macro-expansion with and without argument.
12147
12148 2011-10-15 Tom Tromey <tromey@redhat.com>
12149 Dodji Seketeli <dodji@redhat.com>
12150
12151 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12152 (print_line, cb_define, do_line_change): Adjust to avoid touching
12153 the internals of struct line_map. Use the public API instead.
12154 * c-pch.c (c_common_read_pch): Likewise.
12155 * c-lex.c (fe_file_change): Likewise.
12156
12157 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12158
12159 PR c++/17212
12160 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12161
12162 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12163
12164 PR c++/33067
12165 * c-pretty-print.c (pp_c_floating_constant): Output
12166 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12167
12168 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12169
12170 * c-common.c (def_builtin_1): Delete old interface with two
12171 parallel arrays to hold standard builtin declarations, and replace
12172 it with a function based interface that can support creating
12173 builtins on the fly in the future. Change all uses, and poison
12174 the old names. Make sure 0 is not a legitimate builtin index.
12175 * c-omp.c (c_finish_omp_barrier): Ditto.
12176 (c_finish_omp_taskwait): Ditto.
12177 (c_finish_omp_flush): Ditto.
12178
12179 2011-10-11 Tristan Gingold <gingold@adacore.com>
12180
12181 * c.opt: (fallow-parameterless-variadic-functions): New.
12182
12183 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12184
12185 PR c++/33255 - Support -Wunused-local-typedefs warning
12186 * c-common.h (struct c_language_function::local_typedefs): New
12187 field.
12188 (record_locally_defined_typedef, maybe_record_typedef_use)
12189 (maybe_warn_unused_local_typedefs): Declare new functions.
12190 * c-common.c (record_locally_defined_typedef)
12191 (maybe_record_typedef_use)
12192 (maybe_warn_unused_local_typedefs): Define new functions.
12193 * c.opt: Declare new -Wunused-local-typedefs flag.
12194
12195 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12196
12197 PR middle-end/50266
12198 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12199 computations.
12200
12201 2011-09-05 Richard Guenther <rguenther@suse.de>
12202
12203 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12204 of integer_minus_one_node for empty array upper bounds.
12205
12206 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12207
12208 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12209 it's the first time it's being called on this main TU.
12210
12211 2011-08-24 Richard Guenther <rguenther@suse.de>
12212
12213 PR c/49396
12214 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12215
12216 2011-08-22 Gabriel Charette <gchare@google.com>
12217
12218 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12219 defined in cpp_init_builtins and c_cpp_builtins.
12220
12221 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12222
12223 * c-common.c (c_common_reswords): Add __builtin_complex.
12224 * c-common.h (RID_BUILTIN_COMPLEX): New.
12225
12226 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12227
12228 * c-common.c (c_common_reswords): Add _Noreturn.
12229 (keyword_is_function_specifier): Handle RID_NORETURN.
12230 * c-common.h (RID_NORETURN): New.
12231
12232 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12233
12234 * c-common.c (unsafe_conversion_p): New function. Check if it is
12235 unsafe to convert an expression to the type.
12236 (conversion_warning): Adjust, use unsafe_conversion_p.
12237 * c-common.h (unsafe_conversion_p): New function declaration.
12238
12239 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12240
12241 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12242 (c_finish_omp_taskyield): New prototype.
12243 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12244 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12245 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12246 or RHS1 have side-effects, evaluate those too in the right spot,
12247 if it is a decl and LHS is also a decl, error out if they
12248 aren't the same.
12249 (c_finish_omp_taskyield): New function.
12250 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12251 * c-pragma.c (omp_pragmas): Add taskyield.
12252 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12253 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12254 PRAGMA_OMP_CLAUSE_MERGEABLE.
12255
12256 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12257
12258 * c-common.h (set_underlying_type): Remove parm name from
12259 declaration.
12260
12261 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12262
12263 * c-pretty-print.h: Search c-common.h in c-family.
12264
12265 2011-07-22 Jason Merrill <jason@redhat.com>
12266
12267 PR c++/49793
12268 * c.opt (Wnarrowing): New.
12269
12270 PR c++/30112
12271 * c-common.h: Declare c_linkage_bindings.
12272 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12273
12274 PR c++/49813
12275 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12276 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12277 as flag_isoc99 for 'restrict'.
12278 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12279
12280 2011-07-21 Ian Lance Taylor <iant@google.com>
12281
12282 PR middle-end/49705
12283 * c-common.c (c_disable_warnings): New static function.
12284 (c_enable_warnings): New static function.
12285 (c_fully_fold_internal): Change local unused_p to bool. Call
12286 c_disable_warnings and c_enable_warnings rather than change
12287 c_inhibit_evaluation_warnings.
12288
12289 2011-07-20 Jason Merrill <jason@redhat.com>
12290
12291 PR c++/6709 (DR 743)
12292 PR c++/42603 (DR 950)
12293 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12294 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12295 (CPP_DECLTYPE): New.
12296 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12297
12298 2011-07-19 Richard Guenther <rguenther@suse.de>
12299
12300 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12301 * c-omp.c (c_finish_omp_for): Likewise.
12302
12303 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12304
12305 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12306 body on the next line.
12307
12308 2011-07-08 Jason Merrill <jason@redhat.com>
12309
12310 PR c++/45437
12311 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12312
12313 PR c++/49673
12314 * c-common.c (c_apply_type_quals_to_decl): Don't check
12315 TYPE_NEEDS_CONSTRUCTING.
12316
12317 2011-07-06 Richard Guenther <rguenther@suse.de>
12318
12319 * c-common.c (c_common_nodes_and_builtins):
12320 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12321
12322 2011-07-05 Richard Guenther <rguenther@suse.de>
12323
12324 * c-common.c (c_common_nodes_and_builtins): Build all common
12325 tree nodes first.
12326
12327 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12328
12329 * c-common.h (c_tree_chain_next): New static inline function.
12330
12331 * c-common.c (check_builtin_function_arguments): Handle
12332 BUILT_IN_ASSUME_ALIGNED.
12333
12334 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12335
12336 * c-common.c: Add sync_ or SYNC__ to builtin names.
12337 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12338
12339 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12340
12341 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12342 handler.
12343 (gen_pragma_handler): New union.
12344 (internal_pragma_handler): New type.
12345 (c_register_pragma_with_data)
12346 (c_register_pragma_with_expansion_and_data): New functions.
12347
12348 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12349 (c_register_pragma, c_register_pragma_with_expansion)
12350 (c_invoke_pragma_handler): Changed to work with
12351 internal_pragma_handler.
12352 (c_register_pragma_with_data)
12353 (c_register_pragma_with_expansion_and_data): New functions.
12354
12355 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12356
12357 * c-common.c: Include common/common-target.h.
12358 (handle_section_attribute): Use
12359 targetm_common.have_named_sections.
12360 * c-cppbuiltin.c: Include common/common-target.h.
12361 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12362
12363 2011-06-10 Richard Guenther <rguenther@suse.de>
12364
12365 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12366 to print a IDENTIFIER_NODE.
12367
12368 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12369 Joseph Myers <joseph@codesourcery.com>
12370
12371 * c.opt (fbuilding-libgcc): New option.
12372 * c-cppbuiltin.c (c_cpp_builtins): Define
12373 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12374
12375 2011-06-07 Jason Merrill <jason@redhat.com>
12376
12377 * c-common.c (max_tinst_depth): Lower default to 900.
12378
12379 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12380
12381 2011-06-07 Richard Guenther <rguenther@suse.de>
12382
12383 * c-common.c (c_common_nodes_and_builtins): Do not set
12384 size_type_node or call set_sizetype.
12385
12386 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12387
12388 PR debug/49130
12389 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12390 type when using pointer comparison to compare types.
12391
12392 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12393
12394 * c.opt: Add -Wdelete-non-virtual-dtor.
12395 * c-opts.c (c_common_handle_option): Include it in -Wall.
12396
12397 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12398
12399 PR bootstrap/49190
12400
12401 Revert:
12402 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12403
12404 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12405 not tree_common.
12406
12407 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12408
12409 PR c++/49165
12410 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12411 C++ don't call c_common_truthvalue_conversion on void type arms.
12412
12413 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12414
12415 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12416 (stmt_list_stack): Define.
12417 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12418 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12419
12420 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12421
12422 * c-common.c (warning_candidate_p): Check for BLOCKs.
12423
12424 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12425
12426 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12427 not tree_common.
12428
12429 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12430
12431 * c-common.c (def_fn_type): Remove extra va_end.
12432
12433 2011-05-23 Jason Merrill <jason@redhat.com>
12434
12435 PR c++/48106
12436 * c-common.c (c_common_get_narrower): New.
12437 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12438
12439 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12440
12441 * c-common.h (check_function_arguments): Tweak prototype of
12442 check_function_arguments.
12443 * c-common.c (check_function_arguments): Likewise. Adjust
12444 calls to check_function_nonnull, check_function_format, and
12445 check_function_sentinel.
12446 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12447 separate attributes and typelist arguments. Use
12448 FOREACH_FUNCTION_ARGS to iterate over argument types.
12449
12450 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12451
12452 * c-common.c (c_common_reswords): Reorder.
12453 * c-common.h (rid): Likewise.
12454
12455 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12456
12457 * c-common.c (def_fn_type): Don't call build_function_type, call
12458 build_function_type_array or build_varargs_function_type_array
12459 instead.
12460 (c_common_nodes_and_builtins): Likewise.
12461
12462 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12463
12464 * c-common.c (c_add_case_label): Omit the loc argument to
12465 build_case_label.
12466 * c-common.h (build_case_label): Remove.
12467 * c-semantics.c (build_case_label): Remove.
12468
12469 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12470
12471 * c-objc.h (objc_start_method_definition): Update prototype.
12472 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12473
12474 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12475
12476 * c-common.c (check_main_parameter_types): Reindent. Don't use
12477 TYPE_ARG_TYPES directly.
12478 (handle_nonnull_attribute): Likewise.
12479 (sync_resolve_params): Likewise.
12480 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12481 to check_format_string.
12482 (handle_format_attribute): Likewise.
12483 (check_format_string): Take a function type to examine instead of
12484 a type list. Use a function_arg_iterator to step through argument
12485 types.
12486
12487 2011-05-04 Richard Guenther <rguenther@suse.de>
12488
12489 * c-common.c (fix_string_type): Use size_int for index type bounds.
12490 (start_fname_decls): Do not pass NULL to build_int_cst.
12491 (c_init_attributes): Likewise.
12492 * c-lex.c (c_lex_with_flags): Likewise.
12493
12494 2011-04-27 Jason Merrill <jason@redhat.com>
12495
12496 * c-common.c (make_tree_vector_from_list): New.
12497 * c-common.h: Declare it.
12498
12499 2011-04-26 Richard Guenther <rguenther@suse.de>
12500
12501 PR preprocessor/48248
12502 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12503 for output size with -P.
12504
12505 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12506
12507 * c-common.c (struct c_common_resword): Add __underlying_type.
12508 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12509
12510 2011-04-20 Jim Meyering <meyering@redhat.com>
12511
12512 * c-format.c (init_dollar_format_checking): Remove useless
12513 if-before-free.
12514
12515 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12516
12517 * c-objc.h (objc_get_interface_ivars): Removed.
12518 (objc_detect_field_duplicates): New.
12519 * stub-objc.c: Likewise.
12520
12521 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12522
12523 * stub-objc.c (objc_declare_protocols): Renamed to
12524 objc_declare_protocol.
12525 * c-objc.h: Likewise.
12526
12527 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12528
12529 * stub-objc.c (objc_declare_class): Updated argument name.
12530
12531 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12532
12533 * c-common.h (c_common_init_ts): Declare.
12534 * c-common.c (c_common_init_ts): Define.
12535
12536 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12537
12538 * c-objc.h (objc_build_message_expr): Updated prototype.
12539 * stub-objc.c (objc_build_message_expr): Likewise.
12540
12541 2011-04-12 Martin Jambor <mjambor@suse.cz>
12542
12543 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12544 of cgraph_node.
12545
12546 2011-04-11 Richard Guenther <rguenther@suse.de>
12547
12548 * c-common.c (complete_array_type): Build a range type of
12549 proper type.
12550
12551 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12552
12553 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12554 (handle_type_generic_attribute): Likewise.
12555
12556 2011-04-07 Jason Merrill <jason@redhat.com>
12557
12558 PR c++/48450
12559 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12560 conversion from C++0x scoped enum.
12561
12562 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12563
12564 * c-target-def.h: New file.
12565 * c-target.def: New file.
12566 * c-target.h: New file.
12567 * c-common.c (targetcm): Don't define here.
12568 * c-common.h (default_handle_c_option): Declare.
12569 * c-format.c: Include c-target.h instead of target.h.
12570 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12571 include tm.h.
12572 (default_handle_c_option): Move from targhooks.c.
12573
12574 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12575
12576 PR preprocessor/48248
12577 * c-ppoutput.c (print): Add src_file field.
12578 (init_pp_output): Initialize it.
12579 (maybe_print_line): Don't optimize by adding up to 8 newlines
12580 if map->to_file and print.src_file are different file.
12581 (print_line): Update print.src_file.
12582
12583 2011-03-25 Kai Tietz <ktietz@redhat.com>
12584
12585 * c-ada-spec.c (compare_comment): Use filename_cmp
12586 instead of strcmp for filename.
12587
12588 2011-03-25 Jeff Law <law@redhat.com>
12589
12590 * c-common.c (def_fn_type): Add missing va_end.
12591
12592 2011-03-25 Jason Merrill <jason@redhat.com>
12593
12594 * c.opt: Add -std=c++03.
12595
12596 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12597
12598 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12599
12600 2011-03-17 Kai Tietz <ktietz@redhat.com>
12601
12602 PR target/12171
12603 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12604 Display allowed attributes for function pointer types.
12605 (pp_c_attributes_display): New function to display
12606 attributes having affects_type_identity flag set to true.
12607 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12608
12609 * c-common.c (c_common_attribute_table):
12610 Add new element.
12611 (c_common_format_attribute_table): Likewise.
12612
12613 2011-03-18 Jason Merrill <jason@redhat.com>
12614
12615 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12616 * c-common.h: Don't declare it here.
12617 * c-common.c: Or define it here.
12618 * c-opts.c (c_common_handle_option): Or set it here.
12619
12620 PR c++/35315
12621 * c-common.c (handle_transparent_union_attribute): Don't
12622 make a duplicate type in C++.
12623
12624 2011-03-15 Jason Merrill <jason@redhat.com>
12625
12626 * c-common.c (max_constexpr_depth): New.
12627 * c-common.h: Declare it.
12628 * c-opts.c (c_common_handle_option): Set it.
12629 * c.opt (fconstexpr-depth): New option.
12630
12631 2011-03-11 Jason Merrill <jason@redhat.com>
12632
12633 * c-common.c (attribute_takes_identifier_p): Add missing const.
12634
12635 PR c++/46803
12636 * c-common.c (attribute_takes_identifier_p): Assume that an
12637 unknown attribute takes an identifier.
12638
12639 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12640
12641 PR c/47786
12642 * c-common.c (c_type_hash): Call list_length instead of iterating
12643 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12644
12645 2011-02-19 Jakub Jelinek <jakub@redhat.com>
12646
12647 PR c/47809
12648 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12649
12650 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12651
12652 * c.opt (fobjc-abi-version=) New.
12653 (fobjc-nilcheck): New.
12654
12655 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12656
12657 PR c++/46890
12658 * c-common.h (keyword_is_decl_specifier): Declare.
12659 * c-common.c (keyword_is_decl_specifier): Define.
12660 (keyword_is_function_specifier): New function.
12661
12662 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12663
12664 PR c/47473
12665 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12666 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12667 REAL_TYPE.
12668
12669 2011-01-26 Arnaud Charlet <charlet@adacore.com>
12670
12671 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12672
12673 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12674
12675 PR pch/47430
12676 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12677 after init_c_lex if pch_file is set.
12678
12679 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12680
12681 PR c++/43601
12682 * c.opt (-fkeep-inline-dllexport): New switch.
12683
12684 2011-01-12 Richard Guenther <rguenther@suse.de>
12685
12686 PR middle-end/32511
12687 * c-common.c (handle_weak_attribute): Warn instead of error
12688 on declaring an inline function weak.
12689
12690 2011-01-05 Tom Tromey <tromey@redhat.com>
12691
12692 * c-common.h (lvalue_error): Update.
12693 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12694 not error.
12695
12696 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
12697
12698 PR objc/47075
12699 * c-objc.h (objc_finish_message_expr): Added argument to
12700 prototype.
12701
12702 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12703
12704 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12705 Use prototype_p.
12706
12707 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12708
12709 * c-objc.h (objc_maybe_warn_exceptions): New.
12710 * stub-objc.c (objc_maybe_warn_exceptions): New.
12711
12712 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12713
12714 * c-common.h (readonly_error): Declare.
12715 * c-common.c (readonly_error): Define.
12716
12717 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12718
12719 * c-common.h (invalid_indirection_error): Declare.
12720 * c-common.c (invalid_indirection_error): Define.
12721
12722 2010-12-03 Richard Guenther <rguenther@suse.de>
12723
12724 PR c/46745
12725 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12726 (pp_c_unary_expression): Likewise.
12727 (pp_c_expression): Likewise.
12728
12729 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12730
12731 * c-common.h (objc_finish_function): New.
12732 (objc_non_volatilized_type): Removed.
12733 (objc_type_quals_match): Removed.
12734 * stub-objc.c (objc_finish_function): New.
12735 (objc_non_volatilized_type): Removed.
12736 (objc_type_quals_match): Removed.
12737
12738 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12739
12740 * c-common.h (parse_optimize_options): Declare.
12741 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12742 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12743
12744 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12745
12746 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12747 GET_ENVIRONMENT.
12748 * c-pch.c (O_BINARY): Don't define here.
12749 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12750
12751 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12752
12753 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12754 targetm.except_unwind_info.
12755
12756 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12757
12758 * c-opts.c (c_common_handle_option): Pass location to
12759 set_struct_debug_option.
12760
12761 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12762
12763 * c-common.c (visibility_options): Move from ../opts.c.
12764 * c-common.h (struct visibility_flags, visibility_options):
12765 Declare here.
12766 * c-opts.c (finish_options): Rename to c_finish_options.
12767 (c_common_init): Update call to finish_options.
12768
12769 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12770
12771 PR objc/34033
12772 * c-lex.c (lex_string): Check that each string in an Objective-C
12773 string concat sequence starts with either one or zero '@', and
12774 that there are no spurious '@' signs at the end.
12775
12776 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12777
12778 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12779 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12780 HANDLE_PRAGMA_VISIBILITY.
12781 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12782 HANDLE_PRAGMA_VISIBILITY): Don't define.
12783 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12784
12785 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12786
12787 PR c++/16189
12788 PR c++/36888
12789 PR c++/45331
12790 * c-common.h (keyword_begins_type_specifier): Declare.
12791 (keyword_is_storage_class_specifier): Declare.
12792 (keyword_is_type_qualifier): Declare.
12793 * c-common.c (keyword_begins_type_specifier): New function.
12794 (keyword_is_storage_class_specifier): New function.
12795 (keyword_is_type_qualifier): Declare.
12796
12797 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12798
12799 PR c/46547
12800 * c-common.c (in_late_binary_op): Define.
12801 (c_common_truthvalue_conversion): Check in_late_binary_op before
12802 calling c_save_expr.
12803 * c-common.h (in_late_binary_op): Declare.
12804
12805 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12806
12807 * c-opts.c (c_common_handle_option): Update calls to
12808 set_struct_debug_option.
12809
12810 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12811
12812 * c-common.h (objc_declare_protocols): Added additional argument.
12813 * stub-objc.c (objc_declare_protocol): Same change.
12814
12815 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12816
12817 PR c/33193
12818 * c-common.h (build_real_imag_expr): Declare.
12819 * c-semantics.c (build_real_imag_expr): Define.
12820
12821 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12822
12823 * c-opts.c (c_common_parse_file): Take no arguments.
12824 * c-common.h (c_common_parse_file): Update prototype.
12825
12826 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12827
12828 PR c++/46401
12829 * c-common.c (warning_candidate_p): Don't track non-const calls
12830 or STRING_CSTs.
12831
12832 2010-11-15 Ian Lance Taylor <iant@google.com>
12833
12834 * c-lex.c (init_c_lex): Set macro debug callbacks if
12835 flag_dump_go_spec is set.
12836
12837 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12838
12839 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12840 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12841
12842 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12843
12844 PR preprocessor/45038
12845 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12846 dialects.
12847
12848 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12849
12850 * c-common.h (c_family_lang_mask): Declare.
12851 * c-opts.c (c_family_lang_mask): Make extern.
12852 * c-pragma.c (handle_pragma_diagnostic): Use
12853 control_warning_option.
12854
12855 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12856
12857 * c-common.c (parse_optimize_options): Update call to
12858 decode_options.
12859 * c-common.h (c_common_handle_option): Update prototype.
12860 * c-opts.c (c_common_handle_option): Take location_t parameter and
12861 pass it to other functions.
12862
12863 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12864
12865 * c-opts.c (warning_as_error_callback): Remove.
12866 (c_common_initialize_diagnostics): Don't call
12867 register_warning_as_error_callback.
12868 (c_common_handle_option): Handle -Werror=normalized= here.
12869
12870 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12871
12872 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12873 in diagnostic.
12874 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12875 letter.
12876 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12877 Remove trailing '.' from diagnostics.
12878 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12879
12880 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12881
12882 * c-common.c (parse_optimize_options): Pass global_dc to
12883 decode_options.
12884 * c-opts.c (c_common_handle_option): Pass &global_options to
12885 set_Wstrict_aliasing.
12886 * c.opt (v): Don't mark Common or document here.
12887
12888 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12889
12890 PR target/44981
12891 * c-format.c (format_type): New type gcc_objc_string_format_type.
12892 (valid_stringptr_type_p): New.
12893 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12894 (check_format_string): Pass expected type, use
12895 valid_stringptr_type_p (), check that the format string types are
12896 consistent with the format specification.
12897 (decode_format_attr): Warn if NSString is used outside objective-c.
12898 (format_types_orig): Add NSString.
12899 (format_name): New.
12900 (format_flags): New.
12901 (check_format_arg): Handle format strings requiring an external parser.
12902 first_target_format_type: New variable.
12903 (handle_format_attribute): Set up first_target_format_type, pass the
12904 expected format arg string type to check_format_string().
12905 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12906 * stub-objc.c (objc_string_ref_type_p): New.
12907 (objc_check_format_arg): New.
12908
12909 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12910
12911 Fixed using the Objective-C 2.0 dot-syntax with class names.
12912 * c-common.h (objc_build_class_component_ref): New.
12913 * stub-objc.c (objc_build_class_component_ref): New.
12914
12915 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12916
12917 * c.opt (Wproperty-assign-default): New option.
12918
12919 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12920
12921 Implemented -fobjc-std=objc1 flag.
12922 * c.opt (fobjc-std=objc1): New option.
12923
12924 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12925
12926 Implemented format and noreturn attributes for Objective-C methods.
12927 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12928 attribute for Objective-C methods.
12929
12930 2010-10-31 Jason Merrill <jason@redhat.com>
12931
12932 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12933 EXPR_LOC_OR_HERE.
12934
12935 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12936
12937 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12938 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12939 (objc_add_property_declaration): Removed arguments for copies and
12940 ivar.
12941 (objc_build_getter_call): Renamed to
12942 objc_maybe_build_component_ref.
12943 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12944 (objc_is_property_ref): New.
12945 * c-common.c (c_common_reswords): Removed copies and ivar.
12946 * stub-objc.c (objc_add_property_declaration): Removed arguments
12947 for copies and ivar.
12948 (objc_build_getter_call): Renamed to
12949 objc_maybe_build_component_ref.
12950 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12951 (objc_is_property_ref): New.
12952
12953 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12954 Matthew Gingell <gingell@adacore.com>
12955
12956 * c-ada-spec.c (separate_class_package): New function.
12957 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12958 name of their enclosing package.
12959 (print_ada_declaration): Use separate_class_package.
12960
12961 2010-10-27 Jason Merrill <jason@redhat.com>
12962
12963 * c-common.c (c_common_reswords): Add __is_literal_type.
12964 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12965
12966 * c-common.c (check_case_value): Remove special C++ code.
12967
12968 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12969
12970 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12971 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12972 and RID_LAST_PATTR.
12973 (objc_add_property_declaration): Added additional arguments.
12974 (objc_property_attribute_kind): Removed.
12975 (objc_set_property_attr): Removed.
12976 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12977 copy and nonatomic.
12978 * stub-objc.c (objc_add_property_declaration): Added additional
12979 arguments.
12980 (objc_set_property_attr): Removed.
12981
12982 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12983
12984 * c-common.h (objc_add_property_variable): Renamed to
12985 objc_add_property_declaration. Added location argument.
12986 * stub-objc.c (objc_add_property_variable): Same change.
12987
12988 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12989
12990 * c-common.h (objc_maybe_printable_name): New.
12991 * stub-objc.c (objc_maybe_printable_name): New.
12992
12993 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12994 Andrew Pinski <pinskia@gmail.com>
12995
12996 * c-common.h (c_common_mark_addressable_vec): Declare.
12997 * c-common.c (c_common_mark_addressable_vec): New function.
12998
12999 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13000
13001 * c-common.h (objc_set_method_type): Removed.
13002 (objc_add_method_declaration): Added boolean argument.
13003 (objc_start_method_definition): Same change.
13004 (objc_build_method_signature): Same change.
13005 * stub-objc.c (objc_set_method_type): Removed.
13006 (objc_add_method_declaration): Added boolean argument.
13007 (objc_start_method_definition): Same change.
13008 (objc_build_method_signature): Same change.
13009
13010 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13011
13012 * c-common.h (finish_file): Removed.
13013 (objc_write_global_declarations): New.
13014 * c-opts.c (c_common_parse_file): Do not call finish_file.
13015 * stub-objc.c (objc_write_global_declarations): New.
13016
13017 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13018
13019 Implemented parsing @synthesize and @dynamic for
13020 Objective-C/Objective-C++.
13021 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13022 (objc_add_synthesize_declaration): New.
13023 (objc_add_dynamic_declaration): New.
13024 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13025 * stub-objc.c (objc_add_synthesize_declaration): New.
13026 (objc_add_dynamic_declaration): New.
13027
13028 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13029
13030 PR target/46041
13031 * c-cppbuiltin.c (mode_has_fma): Move function here from
13032 builtins.c. Don't use the fma optab, instead just use the
13033 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13034 using -save-temps.
13035
13036 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13037
13038 Merge from 'apple/trunk' branch on FSF servers.
13039
13040 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
13041
13042 Radar 4330422
13043 * c-common.h (objc_non_volatilized_type): New declaration
13044 * stub-objc.c (objc_non_volatilized_type): New stub.
13045
13046 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13047
13048 Merge from 'apple/trunk' branch on FSF servers.
13049
13050 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
13051
13052 Radar 4133425
13053 * c-common.h (objc_diagnose_private_ivar): New decl.
13054 * stub-objc.c (objc_diagnose_private_ivar): New stub.
13055
13056 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13057
13058 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13059 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13060 (objc_ivar_visibility_kind): New enum.
13061 (objc_set_visibility): Adjust prototype to use visibility enum.
13062 * stub-objc.c (objc_set_visibility): Adjust stub to use
13063 visibility enum.
13064
13065 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13066
13067 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13068 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13069 has the appropriate fma builtins.
13070 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13071
13072 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13073
13074 merge from FSF apple 'trunk' branch.
13075 2006 Fariborz Jahanian <fjahanian@apple.com>
13076
13077 Radars 4436866, 4505126, 4506903, 4517826
13078 * c-common.c (c_common_resword): Define @property and its attributes.
13079 * c-common.h: Define property attribute enum entries.
13080 (OBJC_IS_PATTR_KEYWORD): New.
13081 (objc_property_attribute_kind): New enum.
13082 Declare objc_set_property_attr (), objc_add_property_variable (),
13083 objc_build_getter_call () and objc_build_setter_call ().
13084 * stub-objc.c (objc_set_property_attr): New stub.
13085 (objc_add_property_variable): Likewise.
13086 (objc_build_getter_call): Likewise.
13087 (objc_build_setter_call) Likewise.
13088
13089 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13090
13091 merge from FSF apple 'trunk' branch.
13092 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13093
13094 Radar 3803157 (method attributes)
13095 * c-common.c (handle_deprecated_attribute): Recognize
13096 objc methods as valid declarations.
13097 * c-common.h: Declare objc_method_decl ().
13098 * stub-objc.c (objc_method_decl): New stub.
13099
13100 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13101
13102 * c-common.c (parse_optimize_options): Call
13103 decode_cmdline_options_to_array_default_mask before
13104 decode_options. Update arguments to decode_options.
13105 * c-common.h (c_common_init_options_struct): Declare.
13106 * c-opts.c (c_common_init_options_struct): New. Split out from
13107 c_common_init_options.
13108
13109 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13110
13111 Implemented fast enumeration for Objective-C.
13112 * c-common.h (objc_finish_foreach_loop): New.
13113 * stub-objc.c (objc_finish_foreach_loop): New.
13114
13115 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13116
13117 * c-common.h (struct diagnostic_context): Don't declare here.
13118 (c_common_initialize_diagnostics): Declare using
13119 diagnostic_context typedef.
13120 * c-opts.c (c_common_handle_option): Pass global_dc to
13121 handle_generated_option.
13122
13123 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13124
13125 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13126 handle_generated_option.
13127
13128 2010-10-03 Ian Lance Taylor <iant@google.com>
13129
13130 * c.opt (-fplan9-extensions): New option.
13131
13132 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13133
13134 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13135 Remove.
13136 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13137 of duplicating code.
13138
13139 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13140
13141 * c-common.c: Add two new entries for @optional
13142 and @required keywords.
13143
13144 merge from FSF 'apple/trunk' branch.
13145 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13146
13147 Radar 4386773
13148 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13149 objective-c keywords.
13150 (objc_set_method_opt): New declaration.
13151 * stub-objc.c (objc_set_method_opt): New stub.
13152
13153 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13154
13155 * c-common.c (handle_optimize_attribute): Pass &global_options to
13156 cl_optimization_save and cl_optimization_restore.
13157 * c-opts.c (c_common_handle_option): Pass &global_options to
13158 handle_generated_option.
13159 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13160 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13161 &global_options to cl_optimization_restore.
13162
13163 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13164
13165 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13166 Objective-C/Objective-C++ keywords.
13167
13168 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13169
13170 Merge from 'apple/trunk' branch on FSF servers.
13171
13172 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13173
13174 Radar 4281748
13175 * c-common.h (objc_check_global_decl): New declaration.
13176 * stub-objc.c (objc_check_global_decl): New stub.
13177
13178 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13179
13180 * c.opt: Don't use VarExists.
13181
13182 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13183
13184 * c-common.c (c_cpp_error): Update names of diagnostic_context
13185 members.
13186 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13187 cl_optimization members.
13188 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13189 sanitize_cpp_opts, finish_options): Update names of cpp_options
13190 members.
13191
13192 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13193
13194 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13195 (objc_is_reserved_word): Removed.
13196 * c-common.c: Updated comments.
13197 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13198 objc_is_reserved_word.
13199 * stub-objc.c (objc_is_reserved_word): Removed.
13200
13201 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13202
13203 * c-common.h (objc_add_method_declaration): Adjust prototype to
13204 include attributes.
13205 (objc_start_method_definition): Likewise.
13206 (objc_build_keyword_decl): Likewise.
13207 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13208 (objc_start_method_definition): Likewise.
13209 (objc_build_keyword_decl): Likewise.
13210
13211 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13212
13213 * c-common.h (objc_start_class_interface): Adjust prototype.
13214 (objc_start_category_interface): Likewise.
13215 (objc_start_protocol): Likewise.
13216 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13217 (objc_start_class_interface): Likewise.
13218 (objc_start_category_interface): Likewise.
13219
13220 2010-09-27 Ian Lance Taylor <iant@google.com>
13221
13222 * c-common.c (c_common_attribute_table): Add no_split_stack.
13223 (handle_no_split_stack_attribute): New static function.
13224
13225 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13226
13227 Merge from 'apple/trunk' branch on FSF servers.
13228
13229 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13230
13231 Radar 4229905
13232 * c-common.h (objc_have_common_type): New declaration.
13233 * stub-objc.c (objc_have_common_type): New stub.
13234
13235 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13236
13237 Radar 4154928
13238 * c-common.h (objc_common_type): New prototype.
13239 * stub-objc.c (objc_common_type): New stub.
13240
13241 2010-09-24 Jan Hubicka <jh@suse.cz>
13242
13243 * c-common.c (handle_leaf_attribute): New function.
13244 (struct attribute_spec c_common_att): Add leaf.
13245
13246 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13247
13248 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13249 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13250 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13251 -include-barrier, -include-directory, -include-directory=,
13252 -include-directory-after, -include-directory-after=,
13253 -include-prefix, -include-prefix=, -include-with-prefix,
13254 -include-with-prefix=, -include-with-prefix-after,
13255 -include-with-prefix-after=, -include-with-prefix-before,
13256 -include-with-prefix-before=, -no-integrated-cpp,
13257 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13258 -output=, -pedantic, -pedantic-errors, -preprocess,
13259 -print-missing-file-dependencies, -trace-includes, -traditional,
13260 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13261 -user-dependencies, -verbose, -write-dependencies,
13262 -write-user-dependencies, no-integrated-cpp, traditional): New.
13263
13264 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13265
13266 PR objc/23710
13267 * c-common.h (objc_start_method_definition): Return bool instead
13268 of void.
13269 * stub-objc.c (objc_start_method_definition): Return bool instead
13270 of void.
13271
13272 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13273
13274 PR objc/25965
13275 * c-common.h (objc_get_interface_ivars): New declaration.
13276 * stub-objc.c (objc_get_interface_ivars): New stub.
13277
13278 2010-09-15 Ian Lance Taylor <iant@google.com>
13279
13280 * c-common.c (parse_optimize_options): Do not capitalize warning
13281 messages. Remove period at end of warning message.
13282
13283 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13284
13285 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13286 (handle_alias_attribute): ... here.
13287 (handle_ifunc_attribute): New.
13288
13289 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13290
13291 * c-common.h (do_warn_double_promotion): Declare.
13292 * c-common.c (do_warn_double_promotion): Define.
13293
13294 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13295
13296 * c.opt (Wdouble-promotion): New.
13297
13298 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13299
13300 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13301 fvtable-thunks, fxref): Mark no longer supported in help text.
13302
13303 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13304
13305 * c.opt (Wimport, fall-virtual, falt-external-templates,
13306 fdefault-inline, fenum-int-equiv, fexternal-templates,
13307 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13308 fname-mangling-version-, fnew-abi, fnonnull-objects,
13309 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13310 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13311 applicable.
13312 (fhandle-exceptions): Mark with Alias and Warn.
13313 * c-opts.c (c_common_handle_option): Don't handle options marked
13314 as ignored.
13315
13316 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13317
13318 * c.opt (Wcomments, Werror-implicit-function-declaration,
13319 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13320 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13321 aliases.
13322 * c-common.c (option_codes): Use OPT_Wcomment instead of
13323 OPT_Wcomments.
13324 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13325 Don't handle options marked as aliases.
13326
13327 2010-08-25 Richard Guenther <rguenther@suse.de>
13328
13329 * c-common.c (c_common_get_alias_set): Remove special
13330 handling for pointers.
13331
13332 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13333
13334 * c-common.c: Use FOR_EACH_VEC_ELT.
13335 * c-gimplify.c: Likewise.
13336 * c-pragma.c: Likewise.
13337
13338 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13339
13340 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13341 RejectDriver.
13342 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13343 RejectDriver.
13344 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13345 instead of OPT_MDX and OPT_MMDX.
13346
13347 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13348
13349 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13350
13351 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13352
13353 * c.opt (MD, MMD): Change to MDX and MMDX.
13354 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13355
13356 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13357
13358 * c-opts.c (c_common_handle_option): Call handle_generated_option
13359 instead of handle_option.
13360
13361 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13362
13363 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13364 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13365
13366 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13367
13368 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13369 (pending_redefine_extname): Change type to a VEC.
13370 (add_to_renaming_pragma_list): Update for new type of
13371 pending_redefine_extname.
13372 (maybe_apply_renaming_pragma): Likewise.
13373
13374 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13375
13376 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13377 visited.
13378 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13379 decide whether a type has already been declared/seen.
13380 Do not go to the original type.
13381 (dump_nested_types): New parameter forward.
13382 Generate forward declaration if needed and mark type as visited.
13383 (print_ada_declaration): Call dump_nested_types if not already done.
13384 Mark types as visited.
13385
13386 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13387
13388 * c.opt (-print-pch-checksum): Remove option.
13389 * c-opts.c (c_common_handle_option): Don't handle
13390 OPT_print_pch_checksum.
13391
13392 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13393
13394 * c-common.h (c_common_handle_option): Update prototype and return
13395 value type.
13396 * c-opts.c (c_common_handle_option): Update prototype and return
13397 value type. Update calls to handle_option and
13398 enable_warning_as_error.
13399
13400 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13401
13402 PR c/45079
13403 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13404
13405 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13406
13407 * c-common.h (c_common_missing_argument): Remove.
13408 * c-opts.c (c_common_missing_argument): Remove.
13409 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13410 idirafter, imacros, include, isysroot, isystem, iquote): Add
13411 MissingArgError.
13412 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13413
13414 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13415
13416 * c-common.h (c_common_option_lang_mask,
13417 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13418 New.
13419 (c_common_init_options): Update prototype.
13420 * c-opts.c (c_common_option_lang_mask): New.
13421 (c_common_initialize_diagnostics): Split out of
13422 c_common_init_options.
13423 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13424 New.
13425 (c_common_init_options): Update prototype. Use decoded options in
13426 search for -lang-asm.
13427
13428 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13429
13430 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13431 * c-format.c: Likewise.
13432
13433 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13434
13435 * c-common.h: Include diagnostic-core.h. Error if already
13436 included.
13437 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13438
13439 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13440
13441 * c-common.c (IN_GCC_FRONTEND): Do not undef.
13442 Do not include expr.h
13443 (vector_mode_valid_p): Move here.
13444
13445 2010-06-21 DJ Delorie <dj@redhat.com>
13446
13447 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13448 allow these pragmas anywhere.
13449
13450 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13451
13452 PR bootstrap/44509
13453 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13454 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13455 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13456 ggc_strdup instead of xstrdup.
13457
13458 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13459
13460 * c-cppbuiltin.c: Include cpp-id-data.h.
13461 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13462 (lazy_hex_fp_value): New function.
13463 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13464
13465 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13466
13467 * c-gimplify.c: Do not include tree-flow.h
13468
13469 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13470
13471 PR other/44034
13472 * c-common.c: Rename targetm member:
13473 targetm.enum_va_list -> targetm.enum_va_list_p
13474
13475 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13476
13477 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13478
13479 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13480
13481 * c-cppbuiltin.c: Do not include except.h.
13482
13483 2010-06-24 Andi Kleen <ak@linux.intel.com>
13484
13485 * c-common.c (warn_for_omitted_condop): New.
13486 * c-common.h (warn_for_omitted_condop): Add prototype.
13487
13488 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13489
13490 * c.opt (lang-objc): Remove.
13491 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13492
13493 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13494
13495 * c-opts.c: Include "tm_p.h".
13496
13497 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13498
13499 * c-common.c (parse_optimize_options): Update call to
13500 decode_options.
13501
13502 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13503
13504 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13505 new type of types_used_by_cur_var_decl.
13506
13507 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13508
13509 PR bootstrap/44512
13510 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13511 for C++ standard compliance.
13512
13513 2010-06-16 Jason Merrill <jason@redhat.com>
13514
13515 * c.opt: Add -Wnoexcept.
13516
13517 2010-06-16 Richard Guenther <rguenther@suse.de>
13518
13519 PR c/44555
13520 * c-common.c (c_common_truthvalue_conversion): Remove
13521 premature and wrong optimization concering ADDR_EXPRs.
13522
13523 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13524
13525 * c-ada-spec.c (dump_sloc): Remove column info.
13526 (is_simple_enum): New function.
13527 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13528 enum types when relevant.
13529
13530 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13531
13532 * c-common.c (conversion_warning): Warn at expression
13533 location.
13534
13535 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13536
13537 * c-opts.c (c_common_handle_option): Don't handle
13538 OPT_fshow_column.
13539
13540 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13541
13542 * c-pragma.c (push_alignment): Use typed GC allocation.
13543 (handle_pragma_push_options): Likewise.
13544
13545 * c-common.c (parse_optimize_options): Likewise.
13546
13547 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13548 option.
13549
13550 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13551
13552 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13553 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13554 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13555 flag_signed_bitfields, warn_strict_null_sentinel,
13556 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13557 flag_gen_declaration, flag_no_gnu_keywords,
13558 flag_implement_inlines, flag_implicit_templates,
13559 flag_implicit_inline_templates, flag_optional_diags,
13560 flag_elide_constructors, flag_default_inline, flag_rtti,
13561 flag_conserve_space, flag_access_control, flag_check_new,
13562 flag_new_for_scope, flag_weak, flag_working_directory,
13563 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13564 flag_enforce_eh_specs, flag_threadsafe_statics,
13565 flag_pretty_templates): Remove.
13566 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13567 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13568 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13569 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13570 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13571 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13572 flag_no_gnu_keywords, flag_implement_inlines,
13573 flag_implicit_templates, flag_implicit_inline_templates,
13574 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13575 flag_rtti, flag_conserve_space, flag_access_control,
13576 flag_check_new, flag_new_for_scope, flag_weak,
13577 flag_working_directory, flag_use_cxa_atexit,
13578 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13579 flag_threadsafe_statics, flag_pretty_templates,
13580 warn_strict_null_sentinel): Remove.
13581 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13582 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13583 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13584 fimplicit-inline-templates, fimplicit-templates,
13585 flax-vector-conversions, fms-extensions, fnil-receivers,
13586 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13587 frtti, fshort-double, fshort-enums, fshort-wchar,
13588 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13589 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13590 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13591 gen-decls, undef): Use Var.
13592 (fdefault-inline, foptional-diags): Document as doing nothing.
13593 * c-opts.c (c_common_handle_option): Remove cases for options now
13594 using Var. Mark ignored options as such.
13595
13596 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13597
13598 * c-common.c: Moved to here from parent directory.
13599 * c-common.def: Likewise.
13600 * c-common.h: Likewise.
13601 * c-cppbuiltin.c: Likewise.
13602 * c-dump.c: Likewise.
13603 * c-format.c: Likewise.
13604 * c-format.h : Likewise.
13605 * c-gimplify.c: Likewise.
13606 * c-lex.c: Likewise.
13607 * c-omp.c: Likewise.
13608 * c.opt: Likewise.
13609 * c-opts.c: Likewise.
13610 * c-pch.c: Likewise.
13611 * c-ppoutput.c: Likewise.
13612 * c-pragma.c: Likewise.
13613 * c-pragma.h: Likewise.
13614 * c-pretty-print.c: Likewise.
13615 * c-pretty-print.h: Likewise.
13616 * c-semantics.c: Likewise.
13617 * stub-objc.c: Likewise.
13618
13619 * c-common.c: Include gt-c-family-c-common.h.
13620 * c-pragma.c: Include gt-c-family-c-pragma.h.
13621 \f
13622 Copyright (C) 2010-2022 Free Software Foundation, Inc.
13623
13624 Copying and distribution of this file, with or without modification,
13625 are permitted in any medium without royalty provided the copyright
13626 notice and this notice are preserved.