1 2022-10-04 Jakub Jelinek <jakub@redhat.com>
3 * c-omp.cc (c_omp_directives): Uncomment begin declare target
6 2022-10-03 Patrick Palka <ppalka@redhat.com>
8 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
11 2022-10-03 Joseph Myers <joseph@codesourcery.com>
13 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
14 special-case __*_EPSILON__ setting for IBM long double for C2x.
16 2022-09-30 Patrick Palka <ppalka@redhat.com>
18 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
20 * c-common.h (enum rid): Likewise.
22 2022-09-29 Joseph Myers <joseph@codesourcery.com>
24 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
27 2022-09-29 Patrick Palka <ppalka@redhat.com>
29 * c-common.cc (c_common_reswords): Add __remove_cv,
30 __remove_reference and __remove_cvref.
31 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
34 2022-09-27 Marek Polacek <polacek@redhat.com>
38 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
40 2022-09-27 Marek Polacek <polacek@redhat.com>
42 * c-format.cc (c_keywords): Drop nothrow.
44 2022-09-27 Jakub Jelinek <jakub@redhat.com>
47 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
48 __cpp_static_call_operator=202207L for C++23.
50 2022-09-27 Jakub Jelinek <jakub@redhat.com>
52 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
53 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
54 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
55 * c-pragma.cc (omp_pragmas): Add assumes and begin.
56 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
57 (omp_pragmas_simd): Add assume.
58 * c-common.h (c_omp_directives): Declare.
59 * c-omp.cc (omp_directives): Rename to ...
60 (c_omp_directives): ... this. No longer static. Uncomment
61 assume, assumes, begin assumes and end assumes entries.
62 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
64 (c_omp_categorize_directive): Adjust for omp_directives to
65 c_omp_directives renaming.
67 2022-09-27 Jakub Jelinek <jakub@redhat.com>
71 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
72 _Float{32,64,128}x flags from D_CONLY to 0.
73 (shorten_binary_op): Punt if common_type returns error_mark_node.
74 (shorten_compare): Likewise.
75 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
76 and _Float{32,64,128}x builtin types if available. For C++
77 clear float128t_type_node.
78 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
79 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
80 * c-lex.cc (interpret_float): For q/Q suffixes prefer
81 float128t_type_node over float128_type_node. Allow
82 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
83 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
84 with pedwarn. Don't call excess_precision_type for C++.
86 2022-09-26 Marek Polacek <polacek@redhat.com>
89 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
92 2022-09-23 Marek Polacek <polacek@redhat.com>
95 * c-common.cc (c_common_reswords): Add __is_convertible and
96 __is_nothrow_convertible.
97 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
98 RID_IS_NOTHROW_CONVERTIBLE.
100 2022-09-22 David Malcolm <dmalcolm@redhat.com>
103 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
104 values that don't fit in uhwi.
106 2022-09-15 Richard Biener <rguenther@suse.de>
108 * c-common.h (build_void_list_node): Remove.
109 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
112 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
114 * c-format.cc (convert_format_name_to_system_name): Fix warning.
116 2022-09-07 Joseph Myers <joseph@codesourcery.com>
118 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
119 for alignas, alignof, bool, false, static_assert, thread_local and
122 2022-09-07 Jakub Jelinek <jakub@redhat.com>
124 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
125 " in comments" from description.
126 (Wunicode): New option.
128 2022-09-06 Jakub Jelinek <jakub@redhat.com>
131 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
133 2022-09-03 Jakub Jelinek <jakub@redhat.com>
135 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
136 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
137 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
138 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
140 2022-09-02 David Malcolm <dmalcolm@redhat.com>
143 * c-common.h (check_for_xor_used_as_pow): New decl.
144 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
145 * c-warn.cc (check_for_xor_used_as_pow): New.
146 * c.opt (Wxor-used-as-pow): New.
148 2022-09-01 Jason Merrill <jason@redhat.com>
150 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
152 (braced_list_to_string): Check for char-sized elements.
154 2022-09-01 Jakub Jelinek <jakub@redhat.com>
157 * c.opt (-Winvalid-utf8): New warning.
158 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
159 Set cpp_opts->cpp_input_charset_explicit.
160 (c_common_post_options): If -finput-charset=UTF-8 is explicit
161 in C++23, enable -Winvalid-utf8 by default and if -pedantic
162 or -pedantic-errors, make it a pedwarn.
164 2022-08-31 Joseph Myers <joseph@codesourcery.com>
166 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
168 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
170 * c-common.h (do_case, c_add_case_label): Update declarations.
171 * c-lex.cc (c_common_has_attribute): For C, produce a result of
172 201910 for fallthrough and 202106 for maybe_unused.
174 2022-08-26 Marek Polacek <polacek@redhat.com>
177 * c.opt (Wself-move): New option.
179 2022-08-26 Jakub Jelinek <jakub@redhat.com>
181 * c-common.cc (check_builtin_function_arguments): Handle
182 BUILT_IN_ISSIGNALING.
184 2022-08-26 Jakub Jelinek <jakub@redhat.com>
187 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
188 __cpp_named_character_escapes to 202207L.
190 2022-08-25 Marek Polacek <polacek@redhat.com>
192 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
193 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
194 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
195 (struct c_common_resword): Resize the disable member.
197 (nullptr_node): Define.
198 (nullptr_type_node): Define.
199 (NULLPTR_TYPE_P): Define.
200 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
202 (c_pretty_printer::direct_abstract_declarator): Likewise.
203 (c_pretty_printer::constant): Likewise.
205 2022-08-16 Tom Honermann <tom@honermann.net>
208 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
209 diagnostics in C++20 and later.
210 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
212 2022-08-11 Marek Polacek <polacek@redhat.com>
215 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
216 suppress_warning here.
218 2022-08-08 Tom Honermann <tom@honermann.net>
220 PR preprocessor/106426
221 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
222 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
224 2022-08-08 Tom Honermann <tom@honermann.net>
226 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
227 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
229 * c-opts.cc (c_common_post_options): Set flag_char8_t if
232 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
235 * c-common.h: Rename global done_lexing to
236 override_libcpp_locations.
237 * c-common.cc (c_cpp_diagnostic): Likewise.
238 * c-opts.cc (c_common_finish): Set override_libcpp_locations
239 (formerly done_lexing) immediately prior to calling cpp_finish ().
241 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
243 * c-ppoutput.cc (token_streamer::stream): Update input_location
244 prior to streaming each token.
246 2022-07-23 Immad Mir <mirimmad@outlook.com>
248 * c-attribs.cc: (c_common_attribute_table): add three new attributes
249 namely: fd_arg, fd_arg_read and fd_arg_write.
250 (handle_fd_arg_attribute): New.
252 2022-07-15 Marek Polacek <polacek@redhat.com>
255 * c-common.cc (c_common_reswords): Add
256 __reference_constructs_from_temporary and
257 __reference_converts_from_temporary.
258 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
259 RID_REF_CONVERTS_FROM_TEMPORARY.
261 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
263 * c-format.cc (class range_label_for_format_type_mismatch):
264 Adjust to new label_text API.
266 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
268 PR preprocessor/106252
269 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
270 option argument prior to verifying the option was found.
272 2022-07-07 David Malcolm <dmalcolm@redhat.com>
274 * c-format.cc (range_label_for_format_type_mismatch::get_text):
275 Update for removal of label_text::maybe_free in favor of automatic
278 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
280 PR preprocessor/53920
282 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
283 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
284 (c_pp_stream_token): Declare.
285 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
287 (should_output_pragmas): ...here. New function.
288 (token_streamer::stream): Support handling early pragmas.
289 (do_line_change): Likewise.
290 (c_pp_stream_token): New function.
291 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
292 (pragma_diagnostic_lex_normal): New function. Moved logic for
293 interpreting GCC diagnostic pragmas here.
294 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
295 directly from libcpp.
296 (handle_pragma_diagnostic): Refactor into helper function...
297 (handle_pragma_diagnostic_impl): ...here. New function.
298 (handle_pragma_diagnostic_early): New function.
299 (handle_pragma_diagnostic_early_pp): New function.
300 (struct pragma_ns_name): Renamed to...
301 (struct pragma_pp_data): ...this. Add new "early_handler" member.
302 (c_register_pragma_1): Support early pragmas in the preprocessor.
303 (c_register_pragma_with_early_handler): New function.
304 (c_register_pragma): Support the new early handlers in struct
305 internal_pragma_handler.
306 (c_register_pragma_with_data): Likewise.
307 (c_register_pragma_with_expansion): Likewise.
308 (c_register_pragma_with_expansion_and_data): Likewise.
309 (c_invoke_early_pragma_handler): New function.
310 (c_pp_invoke_early_pragma_handler): New function.
311 (init_pragma): Add early pragma support for diagnostic pragmas.
312 * c-pragma.h (struct internal_pragma_handler): Add new early handler
314 (c_register_pragma_with_early_handler): Declare.
315 (c_invoke_early_pragma_handler): Declare.
316 (c_pp_invoke_early_pragma_handler): Declare.
318 2022-07-05 Marek Polacek <polacek@redhat.com>
321 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
324 2022-07-01 Marek Polacek <polacek@redhat.com>
327 * c-common.h (enum rid): Update RID_LAST_CXX20.
329 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
331 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
334 2022-06-24 Jason Merrill <jason@redhat.com>
338 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
340 2022-06-18 Jakub Jelinek <jakub@redhat.com>
342 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
343 Use flag_sanitize_trap & SANITIZE_??? instead of
344 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
345 and flag_sanitize_trap differs for them, emit __builtin_trap only
346 for the comparison where trap is requested.
347 (ubsan_instrument_vla, ubsan_instrument_return): Use
348 lag_sanitize_trap & SANITIZE_??? instead of
349 flag_sanitize_undefined_trap_on_error.
351 2022-06-13 Jason Merrill <jason@redhat.com>
353 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
355 2022-05-27 Marek Polacek <polacek@redhat.com>
358 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
360 2022-05-27 Jakub Jelinek <jakub@redhat.com>
362 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
364 2022-05-20 David Malcolm <dmalcolm@redhat.com>
366 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
368 * c-pretty-print.h: Likewise.
370 2022-05-18 Marek Polacek <polacek@redhat.com>
373 * c.opt (Wenum-int-mismatch): New.
375 2022-05-18 Marek Polacek <polacek@redhat.com>
378 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
379 enumerator when it was marked with attribute unused.
381 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
383 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
384 floating-point complex types.
385 <POINTER_TYPE>: Do not use limited_with clause if the designated
386 type is a scalar type.
388 2022-05-17 Jakub Jelinek <jakub@redhat.com>
390 * c-omp.cc (c_finish_omp_depobj): Handle
391 OMP_CLAUSE_DEPEND_INOUTSET.
393 2022-05-16 Jason Merrill <jason@redhat.com>
396 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
399 2022-05-16 Martin Liska <mliska@suse.cz>
401 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
402 (c_common_nodes_and_builtins): Likewise.
403 * c-format.cc (check_tokens): Likewise.
404 (check_plain): Likewise.
405 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
406 (init_pragma): Likewise.
407 * known-headers.cc (get_string_macro_hint): Likewise.
408 (get_stdlib_header_for_name): Likewise.
409 * c-attribs.cc: Likewise.
411 2022-05-13 Richard Biener <rguenther@suse.de>
413 * c-omp.cc: Remove gimple-fold.h include.
415 2022-05-12 Jakub Jelinek <jakub@redhat.com>
417 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
418 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
419 if null_pointer_node.
421 2022-05-11 Martin Liska <mliska@suse.cz>
424 * c-opts.cc (c_common_handle_option): Change option name.
425 * c.opt: Remove Joined and use Separate option.
427 2022-05-09 Alex Coplan <alex.coplan@arm.com>
429 * c-common.h (get_dump_info): Delete.
430 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
431 from the global dump_manager instead of the (now obsolete)
433 * c-opts.cc (original_dump_file): Delete.
434 (original_dump_flags): Delete.
435 (c_common_parse_file): Switch to using global dump_manager to
436 manage the original dump file; fix leak of dump file.
437 (get_dump_info): Delete.
439 2022-05-07 Marek Polacek <polacek@redhat.com>
443 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
444 with FN being either a function declaration or function type. Use
445 maybe_adjust_arg_pos_for_attribute.
446 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
447 check_function_format.
448 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
449 (positional_argument): Adjust.
450 * c-format.cc (get_constant): Rename to ...
451 (validate_constant): ... this. Take EXPR by reference. Return bool
453 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
454 return value of validate_constant.
455 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
456 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
457 (check_function_format): Adjust a parameter name.
458 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
460 2022-05-04 Marek Polacek <polacek@redhat.com>
462 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
465 2022-04-30 Jason Merrill <jason@redhat.com>
468 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
470 * c-common.cc (set_underlying_type): Add assert.
472 2022-04-26 Patrick Palka <ppalka@redhat.com>
475 * c-common.cc (verify_tree) [restart]: Move up to before the
478 2022-04-11 Jakub Jelinek <jakub@redhat.com>
481 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
482 and __int%d__ builtin types, initialize corresponding ridpointers
485 2022-03-30 Marek Polacek <polacek@redhat.com>
488 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
489 conversion_warning when OP1 is null.
491 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
493 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
494 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
497 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
499 * c.opt (Wuse-after-free): Remove.
501 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
503 * c.opt (Warray-bounds): Remove.
505 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
507 * c.opt: Properly quote comment.
509 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
511 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
512 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
513 the referenced type instead. Deal with the anonymous original type
514 of a typedef'ed type. In the actual access case, follow the chain
515 of external subtypes.
516 <TYPE_DECL>: Tidy up control flow.
518 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
520 * c-ada-spec.cc: Change array length
522 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
524 * c-common.cc (c_family_tests): Call the new tests.
525 * c-common.h (c_diagnostic_tests): Declare.
526 (c_opt_problem_cc_tests): Likewise.
528 2022-03-19 Jakub Jelinek <jakub@redhat.com>
531 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
532 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
535 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
536 Roger Sayle <roger@nextmovesoftware.com>
539 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
541 2022-03-16 Patrick Palka <ppalka@redhat.com>
544 * c.opt: Add -ffold-simple-inlines.
546 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
548 * c-target.def (check_string_object_format_arg): Fix description typo.
550 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
553 * c-common.h (c_omp_map_clause_name): Remove.
554 * c-omp.cc (c_omp_map_clause_name): Remove.
556 2022-03-09 Jakub Jelinek <jakub@redhat.com>
559 * c-opts.cc (c_common_post_options): Don't enable
560 -Wshift-negative-value from -Wextra for C++20 or later.
561 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
562 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
563 instead of TYPE_UNSIGNED.
565 2022-03-07 Jakub Jelinek <jakub@redhat.com>
567 * c-attribs.cc: Fix up duplicated word issue in a comment.
569 2022-03-01 Martin Liska <mliska@suse.cz>
572 * c-attribs.cc (handle_target_clones_attribute): Use
573 get_target_clone_attr_len and report warning soon.
575 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
577 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
578 (handle_pragma_weak): Likewise.
579 (handle_pragma_scalar_storage_order): Likewise.
580 (handle_pragma_redefine_extname): Likewise.
581 (handle_pragma_visibility): Likewise.
582 (handle_pragma_diagnostic): Likewise.
583 (handle_pragma_target): Likewise.
584 (handle_pragma_optimize): Likewise.
585 (handle_pragma_push_options): Likewise.
586 (handle_pragma_pop_options): Likewise.
587 (handle_pragma_reset_options): Likewise.
588 (handle_pragma_message): Likewise.
589 (handle_pragma_float_const_decimal64): Likewise.
591 2022-02-16 Jakub Jelinek <jakub@redhat.com>
594 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
595 build_binary_op with LT_EXPR and only if that doesn't return
596 error_mark_node call build_modify_expr.
598 2022-02-16 Jakub Jelinek <jakub@redhat.com>
601 * c-common.cc (shorten_compare): Convert original arguments to
602 the original *restype_ptr when mixing binary and decimal float.
604 2022-02-14 Richard Biener <rguenther@suse.de>
607 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
608 internal function calls.
610 2022-02-11 Richard Biener <rguenther@suse.de>
612 * c-attribs.cc (c_common_attribute_table): Add entry for
614 (handle_vector_mask_attribute): New.
616 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
618 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
619 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
620 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
622 2022-02-09 Jason Merrill <jason@redhat.com>
624 * c-cppbuiltin.cc (c_cpp_builtins): Update values
625 of __cpp_constexpr and __cpp_concepts for C++20.
627 2022-01-24 Marek Polacek <polacek@redhat.com>
629 PR preprocessor/104030
630 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
632 2022-01-21 Jakub Jelinek <jakub@redhat.com>
635 * c-common.h (check_function_arguments_recurse): Add for_format
637 * c-common.cc (check_function_nonnull): Pass false to
638 check_function_arguments_recurse's last argument.
639 (check_function_arguments_recurse): Add for_format argument,
640 if true, don't stop on warning_suppressed_p.
641 * c-format.cc (check_format_info): Pass true to
642 check_function_arguments_recurse's last argument.
644 2022-01-19 David Malcolm <dmalcolm@redhat.com>
646 * c-common.cc (c_common_c_tests): Rename to...
647 (c_common_cc_tests): ...this.
648 (c_family_tests): Update calls for .c to .cc renaming.
649 * c-common.h (c_format_c_tests): Rename to...
650 (c_format_cc_tests): ...this.
651 (c_indentation_c_tests): Rename to...
652 (c_indentation_cc_tests): ...this.
653 (c_pretty_print_c_tests): Rename to...
654 (c_pretty_print_cc_tests): ...this.
655 * c-format.cc (c_format_c_tests): Rename to...
656 (c_format_cc_tests): ...this.
657 * c-indentation.cc (c_indentation_c_tests): Rename to...
658 (c_indentation_cc_tests): ...this.
659 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
660 (c_pretty_print_cc_tests): ...this.
662 2022-01-17 Martin Liska <mliska@suse.cz>
664 * c-ada-spec.cc: Rename .c names to .cc.
665 * c-ada-spec.h: Likewise.
666 * c-common.cc (c_build_vec_convert): Likewise.
667 (warning_candidate_p): Likewise.
668 * c-common.h (enum rid): Likewise.
669 (build_real_imag_expr): Likewise.
670 (finish_label_address_expr): Likewise.
671 (c_get_substring_location): Likewise.
672 (c_build_bind_expr): Likewise.
673 (conflict_marker_get_final_tok_kind): Likewise.
674 (c_parse_error): Likewise.
675 (check_missing_format_attribute): Likewise.
676 (invalid_array_size_error): Likewise.
677 (warn_for_multistatement_macros): Likewise.
678 (build_attr_access_from_parms): Likewise.
679 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
680 * c-format.cc: Likewise.
681 * c-gimplify.cc (c_gimplify_expr): Likewise.
682 * c-indentation.h: Likewise.
683 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
684 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
685 * c-opts.cc (c_common_post_options): Likewise.
686 (set_std_cxx23): Likewise.
687 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
688 * c-pretty-print.h: Likewise.
690 2022-01-17 Martin Liska <mliska@suse.cz>
692 * c-ada-spec.c: Moved to...
693 * c-ada-spec.cc: ...here.
694 * c-attribs.c: Moved to...
695 * c-attribs.cc: ...here.
696 * c-common.c: Moved to...
697 * c-common.cc: ...here.
698 * c-cppbuiltin.c: Moved to...
699 * c-cppbuiltin.cc: ...here.
700 * c-dump.c: Moved to...
701 * c-dump.cc: ...here.
702 * c-format.c: Moved to...
703 * c-format.cc: ...here.
704 * c-gimplify.c: Moved to...
705 * c-gimplify.cc: ...here.
706 * c-indentation.c: Moved to...
707 * c-indentation.cc: ...here.
708 * c-lex.c: Moved to...
710 * c-omp.c: Moved to...
712 * c-opts.c: Moved to...
713 * c-opts.cc: ...here.
714 * c-pch.c: Moved to...
716 * c-ppoutput.c: Moved to...
717 * c-ppoutput.cc: ...here.
718 * c-pragma.c: Moved to...
719 * c-pragma.cc: ...here.
720 * c-pretty-print.c: Moved to...
721 * c-pretty-print.cc: ...here.
722 * c-semantics.c: Moved to...
723 * c-semantics.cc: ...here.
724 * c-ubsan.c: Moved to...
725 * c-ubsan.cc: ...here.
726 * c-warn.c: Moved to...
727 * c-warn.cc: ...here.
728 * cppspec.c: Moved to...
729 * cppspec.cc: ...here.
730 * stub-objc.c: Moved to...
731 * stub-objc.cc: ...here.
733 2022-01-15 Martin Sebor <msebor@redhat.com>
736 * c.opt (-Wdangling-pointer): New option.
738 2022-01-15 Martin Sebor <msebor@redhat.com>
740 PR tree-optimization/80532
741 * c.opt (-Wuse-after-free): New options.
743 2022-01-14 David Malcolm <dmalcolm@redhat.com>
745 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
746 (handle_tainted_args_attribute): New.
748 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
749 Jason Merrill <jason@redhat.com>
752 * c.opt: Added -Wmissing-template-keyword.
754 2022-01-13 Richard Biener <rguenther@suse.de>
757 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
759 2022-01-12 Martin Liska <mliska@suse.cz>
762 * c-attribs.c (handle_optimize_attribute): Do not call
763 cl_optimization_compare if we seen an error.
765 2022-01-11 Jakub Jelinek <jakub@redhat.com>
769 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
772 2022-01-10 Richard Biener <rguenther@suse.de>
775 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
776 in a TARGET_EXPR to force a temporary.
778 2022-01-06 Marek Polacek <polacek@redhat.com>
781 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
783 (handle_pragma_diagnostic): Likewise.
785 2022-01-03 Marek Polacek <polacek@redhat.com>
788 * c-format.c (check_tokens): Accept "decl-specifier*".
790 2022-01-03 Jakub Jelinek <jakub@redhat.com>
793 * c-attribs.c (handle_non_overlapping_attribute): New function.
794 (c_common_attribute_table): Add "non overlapping" attribute.
796 2021-12-30 Jakub Jelinek <jakub@redhat.com>
799 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
800 cpp_define_unused/cpp_undef calls with forced token locations
803 2021-12-27 Patrick Palka <ppalka@redhat.com>
806 * c-common.c (pointer_int_sum): When quiet, return
807 error_mark_node for an incomplete pointed-to type and don't
808 call size_in_bytes_loc.
810 2021-12-17 Jason Merrill <jason@redhat.com>
813 * c-opts.c (c_common_post_options): Update defaults.
815 2021-12-16 Martin Liska <mliska@suse.cz>
818 * c-pragma.c (handle_pragma_pop_options): Do not check
819 global options modification when an error is seen in parsing
820 of options (pragmas or attributes).
822 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
824 * known-headers.cc: Define INCLUDE_MEMORY instead of
826 * name-hint.h: Likewise.
827 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
829 2021-12-09 Jakub Jelinek <jakub@redhat.com>
832 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
833 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
835 2021-12-03 Jakub Jelinek <jakub@redhat.com>
838 * c-pch.c (struct c_pch_validity): Remove pch_init member.
839 (pch_init): Don't initialize v.pch_init.
840 (c_common_valid_pch): Don't warn and punt if .text addresses change.
842 2021-12-01 Jason Merrill <jason@redhat.com>
845 * c.opt: Add -fconstexpr-fp-except.
847 2021-11-29 Richard Biener <rguenther@suse.de>
849 * c-format.c (check_format_string): Remove spurious
852 2021-11-29 Richard Biener <rguenther@suse.de>
854 * c-opts.c (c_common_post_options): Remove unreachable return.
855 * c-pragma.c (handle_pragma_target): Likewise.
856 (handle_pragma_optimize): Likewise.
858 2021-11-25 Jakub Jelinek <jakub@redhat.com>
861 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
862 default for C++23 regardless of warn_deprecated.
863 * c-cppbuiltin.c (c_cpp_builtins): Predefine
864 __cpp_multidimensional_subscript=202110L for C++23.
866 2021-11-23 Martin Sebor <msebor@redhat.com>
869 * c.opt: Add -Winfinite-recursion.
871 2021-11-19 Martin Sebor <msebor@redhat.com>
875 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
876 and improve handling tof defined symbols.
878 2021-11-19 Martin Liska <mliska@suse.cz>
881 2021-11-18 Martin Liska <mliska@suse.cz>
883 * c-gimplify.c (genericize_c_loop): Use option directly.
885 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
887 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
888 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
890 2021-11-18 Martin Liska <mliska@suse.cz>
892 * c-gimplify.c (genericize_c_loop): Use option directly.
894 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
898 * c-common.c (pointer_int_sum): Make sure pointer expressions
899 are evaluated first when the size expression depends on for
900 variably-modified types.
902 2021-11-17 Marek Polacek <polacek@redhat.com>
904 PR preprocessor/103026
905 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
907 2021-11-16 Jason Merrill <jason@redhat.com>
909 * c-common.c (release_tree_vector): Only cache vecs smaller than
912 2021-11-15 Jason Merrill <jason@redhat.com>
914 * c.opt: Add -fimplicit-constexpr.
915 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
916 * c-opts.c (c_common_post_options): Disable below C++14.
918 2021-11-15 Jakub Jelinek <jakub@redhat.com>
920 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
921 Duplicate to both OMP_TARGET and OMP_TEAMS.
923 2021-11-10 Marek Polacek <polacek@redhat.com>
926 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
929 2021-11-09 David Malcolm <dmalcolm@redhat.com>
931 * c-pragma.c (GCC_BAD_AT): New macro.
932 (GCC_BAD2_AT): New macro.
933 (handle_pragma_pack): Use the location of the pertinent token when
934 issuing diagnostics about invalid constants/actions, and trailing
936 (handle_pragma_target): Likewise for non-string "GCC option".
937 (handle_pragma_message): Likewise for trailing junk.
939 2021-11-03 Joseph Myers <joseph@codesourcery.com>
942 * c-common.c (convert_and_check): Add argument init_const. Call
943 convert_init if init_const.
944 * c-common.h (convert_and_check): Update prototype.
945 (convert_init): New prototype.
947 2021-11-01 David Malcolm <dmalcolm@redhat.com>
949 * c-lex.c (c_lex_with_flags): When complaining about non-printable
950 CPP_OTHER tokens, set the "escape on output" flag.
952 2021-10-27 Jakub Jelinek <jakub@redhat.com>
954 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
956 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
957 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
959 2021-10-27 Jakub Jelinek <jakub@redhat.com>
962 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
963 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
964 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
965 conversions temporarily clear the 3rd bit from d->kind while walking
967 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
968 if possibly non-rectangular.
970 2021-10-21 Jakub Jelinek <jakub@redhat.com>
973 * c-omp.c (c_omp_predefined_variable): Return true also for
974 ubsan_create_data created artificial variables.
976 2021-10-14 Joseph Myers <joseph@codesourcery.com>
978 * c-format.c (printf_length_specs, scanf_length_specs)
979 (print_char_table, scan_char_table): Support DFP formats for C2X.
980 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
981 (T2X_D32, T2X_D64, T2X_D128): New macros.
983 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
985 * c-omp.c (c_omp_check_context_selector): Rename to
986 omp_check_context_selector and move to omp-general.c.
987 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
988 move to omp-general.c.
990 2021-10-12 Joseph Myers <joseph@codesourcery.com>
992 * c-format.c (print_char_table): Add %b and %B formats.
993 (scan_char_table): Add %b format.
994 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
995 (T2X_UPD, T2X_UIM): New macros.
997 2021-10-12 Jakub Jelinek <jakub@redhat.com>
999 * c-omp.c (c_finish_omp_atomic): Use
1000 clear_padding_type_may_have_padding_p.
1002 2021-10-08 Martin Liska <mliska@suse.cz>
1004 * c-opts.c (c_common_post_options): Use new macro
1007 2021-10-07 Martin Liska <mliska@suse.cz>
1009 * c-common.c (parse_optimize_options): Make
1010 save_opt_decoded_options a pointer type.
1012 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1014 PR tree-optimization/102571
1015 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1016 padding, but the non-padding bits are contiguous set of bytes
1017 by adjusting the memcmp call arguments instead of emitting
1018 __builtin_clear_padding and then comparing all the type's bytes.
1020 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1023 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1024 __cpp_constexpr to 202110L rather than 201907L.
1026 2021-10-04 Marek Polacek <polacek@redhat.com>
1029 * c-common.h (do_warn_array_compare): Declare.
1030 * c-warn.c (do_warn_array_compare): New.
1031 * c.opt (Warray-compare): New option.
1033 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1035 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1036 NULL, this is not needed.
1038 2021-10-01 Martin Sebor <msebor@redhat.com>
1041 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1042 Check and perform warning suppression.
1043 (c_common_truthvalue_conversion): Enhance warning suppression.
1045 2021-10-01 Martin Liska <mliska@suse.cz>
1048 * c-common.c (parse_optimize_options): decoded_options[0] is
1049 used for program name, so merged_decoded_options should also
1052 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1053 Richard Biener <rguenther@suse.de>
1056 * c-ubsan.c (ubsan_instrument_division): Check the right
1057 flag_sanitize_recover bit, depending on which sanitization
1058 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1059 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1060 and SANITIZE_DIVIDE is enabled, neither check is known
1061 to be false and flag_sanitize_recover bits for those two
1062 aren't the same, emit both __ubsan_handle_divrem_overflow
1063 and __ubsan_handle_divrem_overflow_abort calls.
1065 2021-10-01 Martin Liska <mliska@suse.cz>
1067 * c-common.c (parse_optimize_options): Combine optimize
1068 options with what was provided on the command line.
1070 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1072 * c-omp.c (c_omp_split_clauses): Also copy
1073 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1075 2021-09-27 Martin Liska <mliska@suse.cz>
1077 * c-opts.c (c_common_init_options_struct): Set also
1078 x_flag_default_complex_method.
1080 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1082 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1084 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1086 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1087 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1088 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1089 __ROUNDING_MATH__ according to the new optimization flags.
1091 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1093 * c-omp.c (c_omp_split_clauses): Split order clause also to
1094 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1096 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1098 * c-omp.c (c_finish_omp_atomic): Avoid creating
1099 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1100 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1101 had NULL initializer. When omitting operands after v = x,
1102 use type of v rather than type of x. Fix type of vtmp
1105 2021-09-13 Jason Merrill <jason@redhat.com>
1107 * c.opt: Add -Winterference-size.
1108 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1109 and __GCC_CONSTRUCTIVE_SIZE.
1111 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1113 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1114 * c-omp.c: Include gimple-fold.h.
1115 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1118 2021-09-09 qing zhao <qing.zhao@oracle.com>
1120 * c-attribs.c (handle_uninitialized_attribute): New function.
1121 (c_common_attribute_table): Add "uninitialized" attribute.
1123 2021-09-08 liuhongt <hongtao.liu@intel.com>
1125 * c-common.c (excess_precision_mode_join): Update below comments.
1126 (c_ts18661_flt_eval_method): Set excess_precision_type to
1127 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1128 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1129 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1130 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1132 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1134 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1136 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1138 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1139 and -gnatwu warning for the package specification.
1141 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1143 * c-attribs.c (handle_unavailable_attribute): New.
1145 2021-08-30 Jason Merrill <jason@redhat.com>
1147 * c.opt: Add -Wmissing-requires.
1149 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1152 * c-opts.c (c_common_input_charset_cb): New function.
1153 (c_common_post_options): Call new function
1154 diagnostic_initialize_input_context().
1156 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1158 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1159 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1160 "di" and "u", respecitively; fill with BADLEN to match
1162 (get_init_dynamic_hwi): Split off from ...
1163 (init_dynamic_diag_info): ... here. Call it.
1164 (init_dynamic_gfc_info): Call it.
1166 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1168 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1169 * c-pragma.c (omp_pragmas): Add error directive.
1170 * c-omp.c (omp_directives): Uncomment error directive entry.
1172 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1174 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1175 * c-pragma.c (omp_pragmas): Add nothing directive.
1176 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1178 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1181 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1182 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1184 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1186 * c-opts.c (c_common_post_options): Default to
1187 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1189 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1191 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1192 * c-pragma.c (omp_pragmas): Add scope construct.
1193 * c-omp.c (omp_directives): Uncomment scope directive entry.
1195 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1197 * c-cppbuiltin.c (c_cpp_builtins): Define
1198 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1200 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1202 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1203 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1204 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1205 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1207 (c_finish_omp_masked): Declare.
1208 * c-omp.c (c_finish_omp_masked): New function.
1209 (c_omp_split_clauses): Handle combined masked constructs.
1211 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1214 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1215 * c-common.c (c_common_reswords): Add
1216 __is_pointer_interconvertible_base_of.
1218 2021-07-29 Richard Biener <rguenther@suse.de>
1221 * c-common.c (c_common_mark_addressable_vec): Look through
1222 C_MAYBE_CONST_EXPR even if not at the toplevel.
1224 2021-07-27 Martin Sebor <msebor@redhat.com>
1227 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1229 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1231 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1232 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1235 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1237 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1238 PRAGMA_OMP__LAST_ enumerators.
1240 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1241 Joseph Myers <joseph@codesourcery.com>
1242 Cesar Philippidis <cesar@codesourcery.com>
1244 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1246 2021-07-20 Martin Sebor <msebor@redhat.com>
1248 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1250 * c-common.h (c_build_shufflevector): Same.
1252 2021-07-16 Andrew Pinski <apinski@marvell.com>
1255 * c-common.c (parse_optimize_options): Use the correct
1258 2021-07-15 Martin Sebor <msebor@redhat.com>
1262 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1264 2021-07-14 Jason Merrill <jason@redhat.com>
1266 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1268 2021-07-06 Martin Sebor <msebor@redhat.com>
1270 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1271 (gcc_cdiag_char_table): Same.
1272 (gcc_cxxdiag_char_table): Same.
1274 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1276 * c-common.h (enum c_omp_directive_kind): New enum.
1277 (struct c_omp_directive): New type.
1278 (c_omp_categorize_directive): Declare.
1279 * c-omp.c (omp_directives): New variable.
1280 (c_omp_categorize_directive): New function.
1282 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1284 * c-ada-spec.c (packed_layout): New global variable.
1285 (dump_ada_declaration): Set it upon seeing a packed record type.
1286 Do not put the "aliased" keyword if it is set.
1287 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1289 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1291 * c-ada-spec.c (check_name): Rename into...
1292 (check_type_name_conflict): ...this. Minor tweak.
1293 (dump_ada_function_declaration): Adjust to above renaming.
1294 (dump_ada_array_domains): Fix oversight.
1295 (dump_ada_declaration): Call check_type_name_conflict for variables.
1297 2021-06-25 Martin Sebor <msebor@redhat.com>
1299 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1300 (c_common_truthvalue_conversion): Replace direct uses of
1301 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1303 (check_function_arguments_recurse): Same.
1304 * c-gimplify.c (c_gimplify_expr): Same.
1305 * c-warn.c (overflow_warning): Same.
1306 (warn_logical_operator): Same.
1307 (warn_if_unused_value): Same.
1308 (do_warn_unused_parameter): Same.
1310 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1312 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1314 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1315 combined target constructs also add map (always, tofrom:) clause.
1317 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1319 * c-attribs.c (common_handle_aligned_attribute): Remove short
1320 circuit and dead code.
1322 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1325 * known-headers.cc (get_stdlib_header_for_name): Add known
1326 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1329 2021-06-12 Jason Merrill <jason@redhat.com>
1331 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1333 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1336 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1337 -std=c++2b for P1938R3 consteval if support.
1339 2021-06-09 Jason Merrill <jason@redhat.com>
1342 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1345 2021-06-07 Martin Liska <mliska@suse.cz>
1347 * c-target.def: Split long lines and replace them
1350 2021-06-04 Martin Sebor <msebor@redhat.com>
1353 * c-attribs.c (positional_argument): Bail on erroneous types.
1355 2021-06-04 Martin Sebor <msebor@redhat.com>
1357 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1358 for element presence.
1360 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1362 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1363 (dump_ada_decl_name): Likewise.
1364 (dump_anonymous_type_name): Remove parent parameter and adjust.
1365 (dump_sloc): Minor tweak.
1366 (dump_ada_array_type): Remove type parameter and adjust.
1367 (dump_ada_enum_type): Remove parent parameter and adjust.
1368 (dump_ada_node): Adjust calls to above functions.
1369 (dumped_anonymous_types): New global variable.
1370 (dump_nested_types_1): Rename into...
1371 (dump_nested_types): ...this.
1372 (dump_nested_type): Remove parent and dumped_types parameters.
1373 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1374 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1375 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1377 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1379 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1380 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1382 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1384 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1385 (htable_t): New typedef.
1386 (overloaded_names): Use it.
1387 (add_name): New function.
1388 (init_overloaded_names): Use add_name to populate the table and add
1389 special cases for sigaction and stat.
1390 (overloaded_name_p): Rename into...
1391 (overloading_index): ...this. Do not initialize overloaded_names table
1392 here. Return the index or zero.
1393 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1394 but add an overloading suffix instead.
1395 (dump_ada_specs): Initialize overloaded_names tables here.
1397 2021-06-01 Martin Liska <mliska@suse.cz>
1400 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1401 to a situation where we are not in processing of an optimize
1403 * c-pragma.c (handle_pragma_pop_options): Restore target
1406 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1409 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1411 2021-05-31 Richard Biener <rguenther@suse.de>
1414 * c-common.c: Include tree-vector-builder.h and
1416 (c_common_reswords): Add __builtin_shufflevector.
1417 (c_build_shufflevector): New funtion.
1418 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1419 (c_build_shufflevector): Declare.
1421 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1424 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1425 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1427 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1429 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1431 2021-05-25 Martin Liska <mliska@suse.cz>
1433 PR tree-optimization/92860
1435 * c-attribs.c (handle_optimize_attribute): Save target node
1436 before calling parse_optimize_options and save it in case
1438 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1439 (handle_pragma_pop_options): Likewise here.
1441 2021-05-25 Martin Liska <mliska@suse.cz>
1443 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1445 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1448 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1449 combined with simd and not with taskloop or for.
1451 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1454 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1455 on firstprivate clause copy going to target construct, and for
1456 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1458 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1460 * c.opt (Wc++11-extensions, Wc++14-extensions)
1461 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1464 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1466 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1468 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1470 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1471 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1472 (pch_init): Renamed member.
1473 (c_common_valid_pch): Adjust access to debug_type_names.
1475 2021-05-19 Martin Sebor <msebor@redhat.com>
1478 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1481 2021-05-18 Richard Biener <rguenther@suse.de>
1484 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1485 Reword existing nunit diagnostic.
1487 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1489 * c-common.c (braced_list_to_string): Return CTOR unchanged
1490 if host and target character sizes don't match.
1492 2021-05-14 Martin Liska <mliska@suse.cz>
1494 * c.opt: Add Warning keyword for 2 options.
1496 2021-05-13 Martin Liska <mliska@suse.cz>
1498 PR middle-end/100504
1499 * c-attribs.c (handle_target_clones_attribute): Expect a string
1500 argument to target_clone argument.
1502 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1504 * c-lex.c (interpret_float): Handle digit separators for C2X.
1506 2021-05-10 Martin Liska <mliska@suse.cz>
1508 * c-ada-spec.c (print_destructor): Use startswith
1509 function instead of strncmp.
1510 (dump_ada_declaration): Likewise.
1511 * c-common.c (disable_builtin_function): Likewise.
1512 (def_builtin_1): Likewise.
1513 * c-format.c (check_tokens): Likewise.
1514 (check_plain): Likewise.
1515 (convert_format_name_to_system_name): Likewise.
1517 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1519 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1522 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1523 Nathan Sidwell <nathan@codesourcery.com>
1524 Tom de Vries <vries@codesourcery.com>
1525 Julian Brown <julian@codesourcery.com>
1526 Kwok Cheung Yeung <kcy@codesourcery.com>
1528 * c.opt (Wopenacc-parallelism): New.
1530 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1532 * c.opt (fopenacc-kernels=): Remove.
1534 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1536 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1537 occured -> occurred.
1538 (check_alignment_of_packed_member): Fix a comment typo,
1540 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1541 and onless -> unless.
1542 (warn_parm_array_mismatch): Fix comment typos, declaratation
1543 -> declaration and woud -> would. Fix up comment indentation.
1545 2021-04-08 Martin Sebor <msebor@redhat.com>
1548 * c.opt (Wmismatched-new-delete): Correct spelling.
1550 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1552 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1553 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1554 enumeral types use again the type name for the enumeration constants.
1555 (dump_ada_node): Adjust call to dump_ada_enum_type.
1556 (dump_nested_type): Likewise.
1558 2021-04-01 Jason Merrill <jason@redhat.com>
1561 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1563 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1566 * c-warn.c (do_warn_duplicated_branches): Pass also
1567 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1569 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1572 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1574 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1576 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1577 after entering the separate class package, if any.
1579 2021-03-04 Richard Biener <rguenther@suse.de>
1581 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1584 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1587 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1588 (token_streamer::stream) Likewise.
1589 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1592 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1595 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1596 instead of mark_addressable. Fix a comment typo -
1597 neutrallly -> neutrally.
1599 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1602 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1603 message - refernced -> referenced. Remove superfluous space before
1604 closing paren of function calls.
1606 2021-02-25 Nathan Sidwell <nathan@acm.org>
1609 * c.opt (-flang-info-module-cmi): Renamed option.
1611 2021-02-19 Nathan Sidwell <nathan@acm.org>
1613 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1615 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
1618 * c-attribs.c (c_common_attribute_table): Add the "retain"
1620 (handle_retain_attribute): New function.
1622 2021-02-16 Marek Polacek <polacek@redhat.com>
1625 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1626 alignment argument is non-negative. Tweak a warning message.
1628 2021-02-12 Martin Sebor <msebor@redhat.com>
1631 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1632 print_generic_expr_to_str.
1634 2021-02-10 Richard Biener <rguenther@suse.de>
1636 * c-common.c (parse_optimize_options): Free decoded_options.
1638 2021-02-04 emsr <3dw4rd@verizon.net>
1640 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1642 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1644 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1645 * c-lex.c (interpret_integer): Set node type for size literal.
1647 2021-01-28 Jakub Jelinek <jakub@redhat.com>
1649 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1650 draft from description.
1651 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1653 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
1655 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1656 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1658 * c-opts.c (set_std_cxx23): New.
1659 (c_common_handle_option): Set options when -std=c++23 is enabled.
1660 (c_common_post_options): Adjust comments.
1661 (set_std_cxx20): Likewise.
1663 2021-01-25 Martin Sebor <msebor@redhat.com>
1666 * c-common.c (check_nonnull_arg): Adjust warning text.
1668 2021-01-17 Martin Sebor <msebor@redhat.com>
1670 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1671 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1673 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1675 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1676 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1678 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1680 PR tree-optimization/98597
1681 * c-pretty-print.c: Include options.h.
1682 (c_fold_indirect_ref_for_warn): New function.
1683 (print_mem_ref): Use it. If it returns something that has compatible
1684 type and is TBAA compatible with zero offset, print it and return,
1685 otherwise print it using offsetof syntax or array ref syntax. Fix up
1686 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1687 argument has pointer to array type. Print pointers using the standard
1690 2021-01-12 Martin Sebor <msebor@redhat.com>
1694 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1695 has pointer type. Remove redundant code. Avoid calling
1696 gimple_canonical_types_compatible_p.
1698 2021-01-07 Martin Sebor <msebor@redhat.com>
1701 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1702 Avoid assuming acces type's size is constant. Correct condition
1703 guarding the printing of a parenthesis.
1705 2021-01-06 Martin Sebor <msebor@redhat.com>
1708 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1709 SSA_NAMEs print VLA names and GIMPLE defining statements.
1710 (print_mem_ref): New function.
1711 (c_pretty_printer::unary_expression): Call it.
1713 2021-01-06 Richard Biener <rguenther@suse.de>
1715 PR tree-optimization/95582
1716 * c-attribs.c (c_common_attribute_table): Add entry for
1717 signed_bool_precision.
1718 (handle_signed_bool_precision_attribute): New.
1720 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1722 * c.opt: Add -stdlib= option and enumerations for
1723 libstdc++ and libc++.
1725 2020-12-16 Martin Liska <mliska@suse.cz>
1727 * c.opt: Remove usage of Report.
1729 2020-12-14 Martin Sebor <msebor@redhat.com>
1734 * c-attribs.c (maybe_add_noinline): New function.
1735 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1736 Implicitly add attribute noinline to functions not declared inline
1739 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1741 * c-pragma.c (omp_pragmas): Add 'allocate'.
1742 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1744 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1747 * c-pragma.c (omp_pragmas): Remove "master".
1748 (omp_pragmas_simd): Add "master".
1750 2020-12-07 Marek Polacek <polacek@redhat.com>
1753 * c-common.c (verify_tree_lim_r): New function.
1754 (verify_sequence_points): Use it. Use nullptr instead of 0.
1756 2020-12-03 Martin Sebor <msebor@redhat.com>
1760 * c-attribs.c (handle_dealloc_attribute): New function.
1761 (handle_malloc_attribute): Handle argument forms of attribute.
1762 * c.opt (-Wmismatched-dealloc): New option.
1763 (-Wmismatched-new-delete): New option.
1765 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1768 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1769 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1771 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1773 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1774 {__GNUC_EXECUTION_CHARSET_NAME} and
1775 _WIDE_EXECUTION_CHARSET_NAME} macros.
1777 2020-12-01 Nathan Sidwell <nathan@acm.org>
1779 * c-common.c (module, import, export): New internal tokens (with
1781 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1783 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1784 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1786 2020-12-01 Nathan Sidwell <nathan@acm.org>
1788 * c-opts.c (c_common_init_options): Ask for module dependencies.
1789 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1790 * c-pch.c (c_common_valid_pch): ... does not play with C++
1792 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1794 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1795 (fmodule-only, fmodule-mapper, fmodule-lazy)
1796 (fmodule-version-ignore, Winvalid-imported-macros)
1797 (flang-info-include-translate, flang-info-include-translate-not):
1800 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1802 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1803 (dump_ada_structure): Also deal with convention, unchecked union and
1804 bit-field for nested types. In the latter case, print an Alignment
1805 aspect along with the Pack aspect.
1807 2020-11-25 Martin Sebor <msebor@redhat.com>
1810 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1813 2020-11-24 Martin Sebor <msebor@redhat.com>
1815 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1817 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1819 * c-attribs.c (handle_special_var_sec_attribute): New.
1820 (handle_noinit_attribute): Remove.
1821 (attr_noinit_exclusions): Rename to...
1822 (attr_section_exclusions): ...this, and add "persistent" attribute
1824 (c_common_attribute_table): Add "persistent" attribute.
1826 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1828 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1829 Treat opaque types like other types.
1830 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1833 2020-11-20 Martin Sebor <msebor@redhat.com>
1835 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1836 with fewer arguments.
1838 2020-11-20 Martin Sebor <msebor@redhat.com>
1841 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1842 Error out on invalid modes.
1844 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1847 * c-common.c (check_builtin_function_arguments): Handle
1848 BUILT_IN_CLEAR_PADDING.
1850 2020-11-18 Nathan Sidwell <nathan@acm.org>
1852 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1854 2020-11-17 Nathan Sidwell <nathan@acm.org>
1856 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1857 after newly-added CTI_MODULE_HWM.
1859 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1861 * c-cppbuiltin.c (builtin_define_float_constants): Define
1862 "*_IS_IEC_60559__" macros.
1864 2020-11-17 Nathan Sidwell <nathan@acm.org>
1866 * c-lex.c: #include "langhooks.h".
1867 (cb_undef): Maybe call preprocess_undef lang hook.
1868 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1870 (push_command_line_include): Maybe call preprocess_main_file lang
1872 (cb_file_change): Likewise.
1873 * c-ppoutput.c: #include "langhooks.h.
1874 (scan_translation_unit): Maybe call preprocess_token lang hook.
1875 (class do_streamer): New, derive from token_streamer.
1876 (directives_only_cb): Data pointer is do_streamer, call
1877 preprocess_token lang hook.
1878 (scan_translation_unit_directives_only): Use do_streamer.
1879 (print_line_1): Move src_line recording to after string output.
1880 (cb_undef): Maybe call preprocess_undef lang hook.
1882 2020-11-17 Nathan Sidwell <nathan@acm.org>
1884 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1885 code duplicating that functionality.
1887 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1890 * c-common.c (check_builtin_function_arguments)
1891 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1892 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1893 for more builtins and argument positions.
1895 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1898 * stub-objc.c: Include c-common.h to declare enum rid.
1900 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1903 * c-cppbuiltin.c: Include configargs.h.
1904 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1905 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1908 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1909 Thomas Schwinge <thomas@codesourcery.com>
1911 * c.opt (fopenacc-kernels): Add.
1913 2020-11-13 Jason Merrill <jason@redhat.com>
1915 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1917 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1920 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1922 2020-11-13 Martin Liska <mliska@suse.cz>
1924 * c-attribs.c (build_attr_access_from_parms): Format properly.
1926 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1929 * c-common.c (c_common_reswords): null_unspecified, nullable,
1930 nonnull, null_resettable: New keywords.
1931 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1932 RID_NONNULL, RID_NULL_RESETTABLE: New.
1933 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1934 ranges accepted for property attributes.
1935 * c-attribs.c (handle_objc_nullability_attribute): New.
1936 * c-objc.h (enum objc_property_attribute_group): Add
1937 OBJC_PROPATTR_GROUP_NULLABLE.
1938 (enum objc_property_attribute_kind):Add
1939 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1940 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1942 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1945 * c-attribs.c (handle_objc_root_class_attribute): New
1946 * c-objc.h (objc_start_class_interface): Add a location
1947 value for the position of the class name.
1948 * c.opt: Add Wobjc-root-class.
1949 * stub-objc.c (objc_start_class_interface): Add a location
1950 value for the position of the class name.
1952 2020-11-12 Joseph Myers <joseph@codesourcery.com>
1954 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1955 Allow scope for C. Handle standard attributes for C. Do not
1956 accept unscoped attributes if std_syntax and not handled as
1957 standard attributes.
1958 * c-common.h (c_common_has_attribute): Update prototype.
1960 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1963 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1964 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1966 2020-11-11 Patrick Palka <ppalka@redhat.com>
1969 * c-opts.c (c_common_post_options): Update latest_abi_version.
1971 2020-11-10 Jakub Jelinek <jakub@redhat.com>
1974 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1976 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1977 recursively and just return true instead of warning if it is true.
1978 Handle COMPLEX_EXPR.
1980 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1982 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1983 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1984 (c_omp_adjust_map_clauses): New function.
1986 2020-11-09 Marek Polacek <polacek@redhat.com>
1989 * c-common.c (attribute_fallthrough_p): Tweak the warning
1992 2020-11-09 Patrick Palka <ppalka@redhat.com>
1994 * c-pragma.c (handle_pragma_diagnostic): Split the
1995 unknown-option -Wpragmas diagnostic into a warning and a
1996 subsequent note containing a spelling suggestion. Avoid
1997 computing the suggestion if -Wpragmas warnings are being
2000 2020-11-09 Patrick Palka <ppalka@redhat.com>
2003 * c-indentation.c (get_visual_column): Remove location_t
2004 parameter. Move the column-tracking diagnostic code from here
2006 (should_warn_for_misleading_indentation): ... here, before the
2007 early exit for when the loci are not all distinct. Don't pass a
2008 location_t argument to get_visual_column.
2009 (assert_get_visual_column_succeeds): Don't pass a location_t
2010 argument to get_visual_column.
2011 (assert_get_visual_column_fails): Likewise.
2013 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2015 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2016 of keywords accepted in @property attribute contexts.
2017 * c-objc.h (enum objc_property_attribute_group): Add
2018 OBJC_PROPATTR_GROUP_CLASS.
2019 (enum objc_property_attribute_kind): Add
2020 OBJC_PROPERTY_ATTR_CLASS.
2022 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2024 * c-common.c (c_common_reswords): Add 'atomic' property
2026 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2027 property attributes.
2029 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2031 * c-attribs.c (handle_nsobject_attribute): New.
2032 * c.opt: Add WNSObject-attribute.
2034 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2036 * c-objc.h (enum objc_property_attribute_group): New
2037 (enum objc_property_attribute_kind): New.
2038 (OBJC_PROPATTR_GROUP_MASK): New.
2039 (struct property_attribute_info): Small class encapsulating
2040 parser output from property attributes.
2041 (objc_prop_attr_kind_for_rid): New
2042 (objc_add_property_declaration): Simplify interface.
2043 * stub-objc.c (enum rid): Dummy type.
2044 (objc_add_property_declaration): Simplify interface.
2045 (objc_prop_attr_kind_for_rid): New.
2047 2020-11-06 Nathan Sidwell <nathan@acm.org>
2049 * c-ada-spec.c (collect_ada_nodes): Rename
2050 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2051 (collect_ada_node): Likewise.
2052 (dump_forward_type): Likewise.
2053 * c-common.c (set_underlying_type): Rename
2054 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2055 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2057 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2059 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2061 2020-11-05 Marek Polacek <polacek@redhat.com>
2064 * c.opt (Wexceptions): New option.
2066 2020-11-05 Marek Polacek <polacek@redhat.com>
2069 * c.opt (Wvexing-parse): New option.
2071 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2074 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2075 underlying decl to clear in the allocate_head bitmap.
2077 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2079 * c-objc.h (objc_non_constant_expr_p): New.
2080 * stub-objc.c (objc_non_constant_expr_p): New.
2082 2020-11-03 Nathan Sidwell <nathan@acm.org>
2084 * c.opt (MQ,MT): Reword description to be make-agnostic.
2086 2020-11-02 Nathan Sidwell <nathan@acm.org>
2088 * c-opts.c (c_common_post_options): Move var decl to its
2089 initialization point.
2091 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2093 * c-lex.c (c_lex_with_flags): When combining '@' with a
2094 keyword for Objective-C, combine the location ranges too.
2096 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2097 H.J.Lu <hjl.tools@gmail.com>
2099 * c-attribs.c (c_common_attribute_table): Add new attribute
2100 zero_call_used_regs.
2101 (handle_zero_call_used_regs_attribute): New function.
2103 2020-10-28 Marek Polacek <polacek@redhat.com>
2106 * c-opts.c (c_common_post_options): In C++20, turn on
2107 -Wdeprecated-enum-enum-conversion and
2108 -Wdeprecated-enum-float-conversion.
2109 * c.opt (Wdeprecated-enum-enum-conversion,
2110 Wdeprecated-enum-float-conversion): New options.
2111 (Wenum-conversion): Allow for C++ too.
2113 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2115 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2116 * c-omp.c: Include bitmap.h.
2117 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2119 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2121 * c-common.c (__is_nothrow_assignable): New.
2122 (__is_nothrow_constructible): Likewise.
2123 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2124 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2126 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2128 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2130 2020-10-23 Marek Polacek <polacek@redhat.com>
2133 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2134 (c_common_init_ts): Likewise.
2135 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2136 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2137 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2138 (maybe_warn_sizeof_array_div): New function.
2139 * c.opt (Wsizeof-array-div): New option.
2141 2020-10-23 Martin Sebor <msebor@redhat.com>
2144 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2146 2020-10-22 Martin Liska <mliska@suse.cz>
2149 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2150 (handle_stack_protect_attribute): Add error message for a
2151 no_stack_protector function.
2153 2020-10-22 Martin Liska <mliska@suse.cz>
2155 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2157 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2159 * c-gimplify.c: Include tree-nested.h
2160 (c_genericize): Update for new nested function info.
2162 2020-10-14 Martin Sebor <msebor@redhat.com>
2165 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2166 bounds in an extra list.
2168 2020-10-05 Richard Biener <rguenther@suse.de>
2169 Jakub Jelinek <jakub@redhat.com>
2172 * c-pretty-print.c: Include langhooks.h.
2173 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2175 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2177 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2179 2020-09-30 Martin Sebor <msebor@redhat.com>
2182 * c-attribs.c (append_access_attr): Use the function declaration
2183 location for a warning about an attribute access argument.
2185 2020-09-29 Marek Polacek <polacek@redhat.com>
2188 * c.opt (Wrange-loop-construct): New option.
2190 2020-09-23 Martin Sebor <msebor@redhat.com>
2193 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2195 2020-09-23 Marek Polacek <polacek@redhat.com>
2198 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2199 after loops and other structured control constructs have been lowered.
2201 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2203 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2204 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2206 2020-09-21 Marek Polacek <polacek@redhat.com>
2208 * c.opt (Wctad-maybe-unsupported): New option.
2210 2020-09-19 Martin Sebor <msebor@redhat.com>
2213 * c-common.h (warn_parm_array_mismatch): Declare new function.
2214 (has_attribute): Move declaration of an existing function.
2215 (build_attr_access_from_parms): Declare new function.
2216 * c-warn.c (parm_array_as_string): Define new function.
2217 (plus_one): Define new function.
2218 (warn_parm_ptrarray_mismatch): Define new function.
2219 (warn_parm_array_mismatch): Define new function.
2220 (vla_bound_parm_decl): New function.
2221 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2222 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2224 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2225 them in brackets here. Also print [static]. Strip extraneous
2226 expressions from VLA bounds.
2228 2020-09-19 Martin Sebor <msebor@redhat.com>
2231 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2232 (handle_argspec_attribute): New function.
2233 (get_argument, get_argument_type): New functions.
2234 (append_access_attrs): Add overload. Handle internal attribute
2235 representation in addition to external.
2236 (handle_access_attribute): Handle internal attribute representation
2237 in addition to external.
2238 (build_attr_access_from_parms): New function.
2240 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2242 * c-gimplify.c (genericize_c_loop): Rewrite to match
2243 c_finish_loop in c-typeck.c.
2245 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2247 * c-common.c (c_block_may_fallthrough): New, split from
2248 cxx_block_may_fallthrough in the cp front end.
2249 (c_common_init_ts): Move handling of loop and switch-related
2250 statements here from the cp front end.
2251 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2253 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2254 * c-common.h (c_block_may_fallthru): Declare.
2255 (bc_state_t): Move here from cp front end.
2256 (save_bc_state, restore_bc_state): Declare.
2257 (c_genericize_control_stmt): Declare.
2258 (WHILE_COND, WHILE_BODY): Likewise.
2259 (DO_COND, DO_BODY): Likewise.
2260 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2261 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2262 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2263 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2264 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2265 * c-dump.c (dump_stmt): Copy from cp front end.
2266 (c_dump_tree): Move code to handle structured loop and switch
2267 tree nodes here from cp front end.
2268 * c-gimplify.c: Adjust includes.
2269 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2271 (save_bc_state, restore_bc_state): New functions using old code
2273 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2274 (genericize_c_loop): Move from cp front end.
2275 (genericize_for_stmt, genericize_while_stmt): Likewise.
2276 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2277 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2278 (genericize_omp_for_stmt): Likewise.
2279 (c_genericize_control_stmt): New function using code split from
2281 (c_genericize_control_r): New.
2282 (c_genericize): Call walk_tree with c_genericize_control_r.
2283 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2284 structured loop and switch tree nodes here from cp front end.
2286 2020-09-17 Patrick Palka <ppalka@redhat.com>
2289 * c-indentation.c (should_warn_for_misleading_indentation): Move
2290 declarations of local variables closer to their first use.
2291 Handle virtual token locations by resolving them to their
2292 respective macro expansion points. If all three tokens are
2293 produced from the same macro expansion, then instead use their
2294 loci within the macro definition.
2296 2020-09-16 Martin Sebor <msebor@redhat.com>
2300 * c-attribs.c (validate_attr_args): New function.
2301 (validate_attr_arg): Same.
2302 (handle_section_attribute): Call it. Introduce a local variable.
2303 (handle_alloc_size_attribute): Same.
2304 (handle_alloc_align_attribute): Same.
2306 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2308 * c-attribs.c (handle_optimize_attribute): Adjust
2309 cl_optimization_save, cl_optimization_restore and
2310 build_optimization_node callers.
2311 * c-pragma.c (handle_pragma_optimize): Adjust
2312 build_optimization_node caller.
2313 (handle_pragma_push_options): Adjust
2314 build_optimization_node and build_target_option_node callers.
2315 (handle_pragma_pop_options, handle_pragma_reset_options):
2316 Adjust cl_optimization_restore callers.
2318 2020-08-28 Martin Sebor <msebor@redhat.com>
2320 * c.opt (Wstringop-overread): New option.
2322 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2325 * c-common.c (get_atomic_generic_size): Require that first argument's
2326 type points to a complete type and use tree_fits_uhwi_p instead of
2327 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2329 2020-07-31 Martin Sebor <msebor@redhat.com>
2332 * c-common.c (check_function_arguments_recurse): Return early when
2333 no-warning bit is set.
2335 2020-07-31 Richard Biener <rguenther@suse.de>
2338 * c-common.h (c_common_finalize_early_debug): Declare.
2339 * c-common.c: Include debug.h.
2340 (c_common_finalize_early_debug): finalize_early_debug langhook
2341 implementation generating debug for extern declarations.
2343 2020-07-27 Nathan Sidwell <nathan@acm.org>
2345 * c-common.c (try_to_locate_new_include_insertion_point): Use
2346 strcmp, not pointer equality.
2348 2020-07-25 Martin Sebor <msebor@redhat.com>
2351 * c-common.c (check_nonnull_arg): Print note only when warning was
2354 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2356 * c-omp.c (c_finish_omp_critical): Check for no name but
2357 nonzero hint provided.
2359 2020-07-20 Jason Merrill <jason@redhat.com>
2361 * c-cppbuiltin.c (c_cpp_builtins): Update
2362 __cpp_nontype_template_args for C++20.
2364 2020-07-20 Martin Sebor <msebor@redhat.com>
2367 * c.opt: Remove stray text.
2369 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2372 * c-indentation.c (should_warn_for_misleading_indentation): Get
2373 global tabstop from the new source.
2374 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2375 is now a common option.
2378 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2380 * c.opt (Wscalar-storage-order): Add explicit variable.
2382 2020-07-07 Nathan Sidwell <nathan@acm.org>
2384 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2386 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2387 maps. Force token position to line_table's highest line.
2388 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2389 (cb_define): Always increment source line.
2391 2020-07-06 Martin Sebor <msebor@redhat.com>
2394 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2395 to stub lambda objects with null this pointer.
2396 (check_nonnull_arg): Handle C++ nullptr.
2398 2020-07-02 Jason Merrill <jason@redhat.com>
2399 Jakub Jelinek <jakub@redhat.com>
2401 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2403 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2406 * c-common.c (check_function_arguments_recurse): Don't crash on
2407 calls to internal functions.
2409 2020-06-28 Martin Sebor <msebor@redhat.com>
2412 * c-common.c (struct nonnull_arg_ctx): Add members.
2413 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2414 C++ member functions specially. Consider the this pointer implicitly
2416 (check_nonnull_arg): Use location of argument when available.
2417 (check_function_arguments): Use nonnull_arg_ctx as argument.
2419 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2422 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2423 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2424 smaller precision intop operands separately.
2426 2020-06-26 Marek Polacek <polacek@redhat.com>
2428 * c-opts.c (c_common_init_options): Default to gnu++17.
2430 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2433 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2436 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2438 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2439 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2441 (c_omp_is_loop_iterator): New function.
2442 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2443 if outer loop iterator is present. Perform duplicate checking through
2444 hash_set in the function rather than expecting caller to do that.
2445 Pass NULL instead of d->ppset to walk_tree_1.
2446 (c_omp_check_nonrect_loop_iv): New function.
2447 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2448 non-rectangular loop forms, diagnose multiple associated loops with
2449 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2450 (c_omp_check_loop_iv_exprs): Likewise.
2452 2020-06-10 Martin Liska <mliska@suse.cz>
2454 PR tree-optimization/92860
2455 * c-attribs.c (handle_optimize_attribute):
2456 Save global options and compare it after parsing of function
2458 * c-pragma.c (opt_stack::saved_global_options): New field.
2459 (handle_pragma_push_options): Save global_options.
2460 (handle_pragma_pop_options): Compare them after pop.
2462 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2465 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2466 case when MEM_REF's first argument has type pointer to incomplete type.
2468 2020-06-05 Jason Merrill <jason@redhat.com>
2470 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2471 operand to POINTER_PLUS_EXPR.
2473 2020-06-04 Martin Sebor <msebor@redhat.com>
2477 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2478 (handle_access_attribute): Same.
2480 2020-06-03 Mark Wielaard <mark@klomp.org>
2482 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2484 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2485 New function declaration.
2487 2020-06-03 Mark Wielaard <mark@klomp.org>
2489 * known-headers.cc (get_string_macro_hint): New function.
2490 (get_stdlib_header_for_name): Use get_string_macro_hint.
2491 (get_c_stdlib_header_for_string_macro_name): New function.
2492 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2493 New function declaration.
2495 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2497 * c-common.h (c_omp_predetermined_mapping): Declare.
2498 * c-omp.c (c_omp_predetermined_mapping): New.
2500 2020-05-22 Mark Wielaard <mark@klomp.org>
2502 * known-headers.cc (get_stdlib_header_for_name): Add a new
2503 stdlib_hint array for stdbool and stdint.
2505 2020-05-22 Mark Wielaard <mark@klomp.org>
2507 * known-headers.cc (get_stdlib_header_for_name): Return
2508 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2511 2020-05-20 Nathan Sidwell <nathan@acm.org>
2513 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2515 * c-common.c (try_to_locate_new_include_insertion_point): Use
2516 strcmp to compare filenames.
2517 * c-lex.c (init_c_lex): Move declaration to initialization.
2518 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2519 deferred count loop.
2521 2020-05-15 Jason Merrill <jason@redhat.com>
2523 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2525 2020-05-13 Jason Merrill <jason@redhat.com>
2527 * c.opt (std=c++20): Make c++2a the alias.
2528 (std=gnu++20): Likewise.
2529 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2531 * c-cppbuiltin.c: Adjust.
2532 * c-ubsan.c: Adjust.
2535 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2537 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2539 2020-05-08 Nathan Sidwell <nathan@acm.org>
2541 Reimplement directives only processing.
2542 * c-ppoutput.c (token_streamer): Ne.
2543 (directives_only_cb): New. Swallow ...
2544 (print_lines_directives_only): ... this.
2545 (scan_translation_unit_directives_only): Reimplment using the
2546 published interface.
2548 2020-05-07 Marek Polacek <polacek@redhat.com>
2550 * c-format.c (badwords): Add "nonstatic".
2552 202-05-07 Jakub Jelinek <jakub@redhat.com>
2555 * c-common.c (speculation_safe_value_resolve_params): Return false if
2556 error_operand_p (val2).
2557 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2558 Remove extraneous semicolon.
2560 2020-05-06 qing zhao <qing.zhao@oracle.com>
2563 * c-indentation.c (get_visual_column): Add a hint to use the new
2564 -flarge-source-files option.
2566 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2568 * c-attribs.c (handle_vector_size_attribute): Add attribute
2569 nonnull for argument args in order to silence warning of
2570 uninitialized variable usage. Since this is local to the
2571 compilation unit and thus cannot be checked at call sides by the
2572 compiler, added an assert statement in order to verify this.
2574 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2577 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2578 value to USHRT_MAX (65535).
2580 2020-04-29 Jakub Jelinek <jakub@redhat.com>
2582 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2584 2020-04-27 Jakub Jelinek <jakub@redhat.com>
2587 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2588 fncode == BUILT_IN_NONE before initialization of first_param.
2590 2020-04-23 Marek Polacek <polacek@redhat.com>
2593 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2596 2020-04-14 Patrick Palka <ppalka@redhat.com>
2599 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2600 ampersand if it's an rvalue reference type.
2602 2020-04-13 Martin Sebor <msebor@redhat.com>
2605 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2606 printing array bound for flexible array members.
2608 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2610 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2613 2020-04-02 Richard Biener <rguenther@suse.de>
2616 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2617 for -O2 and C++11 or newer.
2619 2020-03-28 Patrick Palka <ppalka@redhat.com>
2621 * c.opt: Add -fconcepts-diagnostics-depth.
2623 2020-03-27 Martin Sebor <msebor@redhat.com>
2626 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2627 to decl_attributes. Make handling of different kinds of entities
2630 2020-03-27 Martin Sebor <msebor@redhat.com>
2633 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2636 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2639 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2640 result being COMPOUND_EXPRs, skip to ultimate rhs.
2642 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2645 * c-common.c (c_common_type_for_mode): Before using a registered
2646 built-in type, check that the vectorness of the type matches
2647 the vectorness of the mode.
2649 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2651 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2652 issue in a diagnostic message.
2654 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2656 * c.opt: Avoid redundancy in the help text.
2658 2020-03-02 Marek Polacek <polacek@redhat.com>
2660 PR c++/93958 - add missing -std=gnu++20.
2661 * c.opt: Add -std=gnu++20.
2663 2020-03-01 Martin Sebor <msebor@redhat.com>
2666 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2667 (handle_access_attribute): Same.
2669 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2672 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2673 "did you mean" hint in diagnostics.
2675 2020-02-15 Jason Merrill <jason@redhat.com>
2677 * c.opt: Add -std=c++20.
2679 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2681 * c-ada-spec.c: Include bitmap.h.
2682 (dump_ada_double_name): Rename into...
2683 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2684 (dump_ada_array_type): Adjust to above renaming. Robustify.
2685 (dump_nested_types_1): New function copied from... Add dumped_types
2686 parameter and pass it down to dump_nested_type.
2687 (dump_nested_types): ...this. Remove parent parameter. Just call
2688 dump_nested_types_1 on an automatic bitmap.
2689 (dump_nested_type): Add dumped_types parameter.
2690 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2691 Adjust recursive calls and adjust to above renaming.
2692 (dump_ada_declaration): Adjust call to dump_nested_types.
2693 Tidy up and adjust to above renaming.
2694 (dump_ada_specs): Initialize and release bitmap obstack.
2696 2020-02-10 Martin Sebor <msebor@redhat.com>
2699 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2701 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2704 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2705 Remove useless extra test.
2707 2020-02-03 Julian Brown <julian@codesourcery.com>
2708 Tobias Burnus <tobias@codesourcery.com>
2710 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2712 2020-01-29 Jason Merrill <jason@redhat.com>
2715 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2717 2020-01-23 Jason Merrill <jason@redhat.com>
2719 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2721 2020-01-23 Martin Sebor <msebor@redhat.com>
2724 * c-common.c (check_function_arguments): Avoid overlap checking
2725 of sprintf functions.
2727 2020-01-22 Jason Merrill <jason@redhat.com>
2729 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2731 * c-warn.c (conversion_warning): Check operands only after checking
2732 the whole expression. Don't check second operand of + for sign.
2734 2020-01-21 Jason Merrill <jason@redhat.com>
2735 Manuel López-Ibáñez <manu@gcc.gnu.org>
2737 PR c++/40752 - useless -Wconversion with short +=.
2738 * c.opt (-Warith-conversion): New.
2739 * c-warn.c (conversion_warning): Recurse for operands of
2740 operators. Only warn about the whole expression with
2743 2020-01-21 Jason Merrill <jason@redhat.com>
2745 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2746 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2748 2020-01-20 Nathan Sidwell <nathan@acm.org>
2750 PR preprocessor/80005
2751 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2753 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2755 * c-common.c (co_await, co_yield, co_return): New.
2756 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2757 RID_CO_RETURN): New enumeration values.
2758 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2759 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2760 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2761 * c.opt (fcoroutines): New command-line switch.
2763 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2765 * c-format.c (local_event_ptr_node): New.
2766 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2767 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2768 * c-format.h (T_EVENT_PTR): New define.
2770 2020-01-10 Martin Sebor <msebor@redhat.com>
2773 * c-attribs.c (append_access_attrs): Validate against the translated
2774 access string rather than the human-readable representation.
2776 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2778 Update copyright years.
2780 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2782 * c-ada-spec.h (decl_sloc): Delete.
2783 * c-ada-spec.c (decl_sloc): Make static.
2785 2019-12-19 Julian Brown <julian@codesourcery.com>
2787 * c-common.h (c_omp_map_clause_name): Add prototype.
2788 * c-omp.c (c_omp_map_clause_name): New function.
2789 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2790 PRAGMA_OACC_CLAUSE_DETACH.
2792 2019-12-19 Julian Brown <julian@codesourcery.com>
2793 Maciej W. Rozycki <macro@codesourcery.com>
2794 Tobias Burnus <tobias@codesourcery.com>
2795 Thomas Schwinge <thomas@codesourcery.com>
2797 * c-pragma.h (pragma_omp_clause): Add
2798 PRAGMA_OACC_CLAUSE_NO_CREATE.
2800 2019-12-17 Martin Sebor <msebor@redhat.com>
2803 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2805 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2807 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2809 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2811 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2813 * c-format.c (range_label_for_format_type_mismatch::get_text):
2814 Replace label_text ctor called with true with label_text::take.
2816 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2818 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2819 initial newline from expected outputs.
2820 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2821 call to diagnostic_show_locus.
2823 2019-12-06 Jakub Jelinek <jakub@redhat.com>
2825 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2828 2019-12-05 Marek Polacek <polacek@redhat.com>
2829 Jakub Jelinek <jakub@redhat.com>
2831 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2832 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2834 2019-12-05 Marek Polacek <polacek@redhat.com>
2836 PR c++/92271 - make __is_same alias for __is_same_as.
2837 * c-common.c: Add __is_same, an alias for __is_same_as.
2839 2019-12-03 Marek Polacek <polacek@redhat.com>
2841 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2842 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2843 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2845 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2847 * c-attribs.c (handle_symver_attribute): New function
2848 (c_common_attributes): Add symver.
2850 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2852 * c-common.c (pointer_int_sum): Use verify_type_context to check
2853 whether the target allows pointer arithmetic for the types involved.
2854 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2855 to check whether the target allows sizeof and alignof operations
2856 for the types involved.
2858 2019-11-27 Jason Merrill <jason@redhat.com>
2860 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2862 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2865 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2868 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2871 * c-common.c (c_common_type_for_mode): Handle decimal
2872 floating-point types being NULL_TREE.
2873 * c-format.c (get_format_for_type_1): Handle specified types being
2875 * c-lex.c (interpret_float): Give an error for decimal
2876 floating-point constants when decimal floating-point not
2879 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2882 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2883 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2884 group warning with inform together.
2885 (handle_access_attribute): Formatting fix.
2887 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2890 * c-common.h (identifier_global_tag): Declare.
2891 * c-format.c (get_pointer_to_named_type): Renamed to ...
2892 (get_named_type): ... this. Use identifier_global_tag instead of
2893 identifier_global_value, handle the return value being a TYPE_P.
2894 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2895 to call get_named_type instead. Formatting fixes.
2897 Implement P1902R1, Missing feature-test macros 2017-2019.
2898 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2899 and __cpp_generic_lambdas for -std=c++2a. Define
2900 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2901 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2902 __cpp_concepts for -std=c++2a.
2904 2019-11-22 Martin Sebor <msebor@redhat.com>
2907 * c-attribs.c (handle_access_attribute): New function.
2908 (c_common_attribute_table): Add new attribute.
2909 (get_argument_type): New function.
2910 (append_access_attrs): New function.
2911 (get_nonnull_operand): Rename...
2912 (get_attribute_operand): ...to this.
2913 * c-common.c (get_nonnull_operand): Rename...
2914 (get_attribute_operand): ...to this.
2916 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2918 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2921 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2923 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2924 warning for standard attributes mixed with fallthrough attributes.
2926 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2928 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2929 * c-common.h (handle_fallthrough_attribute): Declare.
2931 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2933 * c-attribs.c (handle_deprecated_attribute): Remove static.
2934 * c-common.h (handle_deprecated_attribute): Declare.
2936 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2938 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2941 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2943 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2946 * c-omp.c (c_omp_check_context_selector): Handle name lists
2947 containing string literals. Don't diagnose atomic_default_mem_order
2948 with multiple props.
2950 2019-11-13 Joseph Myers <joseph@codesourcery.com>
2952 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2953 NORM_MAX constants. Update call to get_max_float.
2954 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2957 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2959 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2960 (dump_forward_type): Do not generate a declaration for function types.
2961 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2962 of the component type if it is declared in another file.
2964 2019-11-12 Martin Liska <mliska@suse.cz>
2966 * c-opts.c (c_common_post_options):
2967 Use SET_OPTION_IF_UNSET.
2969 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2970 Frederik Harwath <frederik@codesourcery.com>
2973 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2975 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2977 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2979 * c-common.h (gnu_vector_type_p): New function.
2980 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2981 vectors to satisfy gnu_vector_type_p.
2982 (c_build_vec_convert): Likewise __builtin_convertvector.
2983 (convert_vector_to_array_for_subscript): Likewise when applying
2984 implicit vector to array conversion.
2985 (scalar_to_vector): Likewise when converting vector-scalar
2986 operations to vector-vector operations.
2988 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2990 * c.opt (Wold-style-definition): Initialize to -1.
2991 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2992 to flag_isoc2x if not set explicitly.
2994 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2996 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2998 2019-11-05 Jason Merrill <jason@redhat.com>
3000 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3003 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3005 * c-opts.c (c_common_post_options): Update
3008 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3010 * c-common.h (c_omp_get_context_selector): Remove.
3011 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3012 and renamed to omp_get_context_selector.
3014 * c-omp.c (c_omp_mark_declare_variant): Use
3015 omp_context_selector_set_compare.
3017 PR c++/88335 - Implement P1073R3: Immediate functions
3018 * c-common.h (enum rid): Add RID_CONSTEVAL.
3019 * c-common.c (c_common_reswords): Add consteval.
3021 2019-11-01 Martin Sebor <msebor@redhat.com>
3027 * c-pretty-print.c (direct_abstract_declarator): Print
3028 bound in zero-length arrays.
3029 * c.opt (-Wzero-length-bounds): New option.
3031 2019-10-30 Nathan Sidwell <nathan@acm.org>
3033 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3036 2019-10-28 Martin Sebor <msebor@redhat.com>
3039 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3040 even when only preprocessing.
3041 * c-common.h (names_builtin_p): Declare new function.
3042 * c-lex.c (init_c_lex): Set has_builtin.
3043 (c_common_has_builtin): Define a new function.
3044 * c-ppoutput.c (init_pp_output): Set has_builtin.
3046 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3048 * c-common.h (c_omp_context_selector_matches): Remove.
3049 * c-omp.c (c_omp_context_selector_matches): Remove.
3050 * c-attribs.c (c_common_attribute_table): Add
3051 "omp declare target {host,nohost,block}" attributes.
3053 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3055 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3057 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3059 * c-common.h (user_facing_original_type_p): Declare.
3060 * c-common.c: Include c-spellcheck.h.
3061 (user_facing_original_type_p): New function.
3063 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3065 * c-common.h (c_omp_mark_declare_variant,
3066 c_omp_context_selector_matches): Declare.
3067 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3069 (c_omp_get_context_selector): Support second argument NULL.
3070 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3072 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3073 attribute, add "omp declare variant base" and
3074 "omp declare variant variant" attributes.
3076 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3078 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3079 CppReason(CPP_W_C11_C2X_COMPAT).
3081 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3083 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3084 _Decimal64 and _Decimal128.
3086 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3088 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3089 types if DFP not supported.
3091 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3093 * c-common.h (c_omp_check_context_selector,
3094 c_omp_get_context_selector): Declare.
3095 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3096 in diagnostic message.
3097 (c_omp_check_context_selector, c_omp_get_context_selector): New
3099 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3101 (handle_omp_declare_variant_attribute): New function.
3103 2019-10-09 Martin Sebor <msebor@redhat.com>
3105 PR tree-optimization/90879
3106 * c.opt (-Wstring-compare): New option.
3108 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3109 Jason Merrill <jason@redhat.com>
3111 Update the concepts implementation to conform to the C++20
3112 specification, improve compile times, and generally clean up
3115 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3116 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3117 * c.opt: Add -Wconcepts-ts.
3118 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3119 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3120 (set_std_cxx2a): Enable concepts by default.
3122 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3124 * c-opts.c (c_common_post_options): Set
3125 -fno-fp-int-builtin-inexact for C2X.
3127 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3129 PR c++/91369 - Implement P0784R7: constexpr new
3130 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3131 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3133 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3136 * c-format.c (C_STD_VER): Handle C2x.
3137 (C_STD_NAME): Likewise.
3138 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3139 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3140 modifier allowed and 'p' flag.
3141 * c-format.h (enum format_std_version): Add STD_C2X.
3142 (struct format_char_info): Mention 'p' in comment on flags2.
3144 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3146 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3147 calling diagnostic_show_locus, rather than destroying it afterwards.
3149 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3152 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3153 with NULL DECL_FIELD_OFFSET.
3155 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3157 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3158 has a type name, use it in preference to the __vector syntax.
3160 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3162 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3163 two spaces between a comma and "...".
3165 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3168 * c-common.h (c_omp_predefined_variable): Declare.
3169 * c-omp.c (c_omp_predefined_variable): New function.
3170 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3171 for predefined variables.
3173 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3175 * c-common.h (build_function_call_vec): Take the original
3176 function decl as an optional final parameter.
3177 (check_builtin_function_arguments): Take the original function decl.
3178 * c-common.c (check_builtin_function_arguments): Likewise.
3179 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3180 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3182 2019-09-15 Jason Merrill <jason@redhat.com>
3184 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3185 fold_for_warn in "|| mask" warning.
3187 2019-09-10 Martin Liska <mliska@suse.cz>
3189 * c.opt: Use newly added WarnRemoved.
3191 2019-09-09 Martin Liska <mliska@suse.cz>
3193 * c.opt: Update comment of removed
3194 options that are preserved only for backward
3197 2019-09-06 Martin Liska <mliska@suse.cz>
3200 * c-common.c: Remove definition of flag_use_repository.
3201 * c-common.h: Likewise.
3202 * c-opts.c (c_common_handle_option):
3203 Do not handle OPT_frepo option.
3204 * c.opt: Mark the option with Deprecated.
3206 2019-09-04 Marek Polacek <polacek@redhat.com>
3208 * c.opt (fdeduce-init-list): Ignored.
3210 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3213 * c.opt (Wenum-conversion): New option.
3215 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3217 * c-attribs.c (handle_section_attribute): Call the
3218 handle_generic_attribute target hook after performing target
3219 independent processing.
3220 (handle_noinit_attribute): Likewise.
3222 2019-09-03 Ian Lance Taylor <iant@golang.org>
3224 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3225 when using -fgo-dump-spec.
3227 2019-09-02 Martin Liska <mliska@suse.cz>
3230 * c-common.c (fname_as_string): Use cxx_printable_name for
3231 __PRETTY_FUNCTION__ same as was used before r265711.
3233 2019-08-28 Marek Polacek <polacek@redhat.com>
3235 Implement P1152R4: Deprecating some uses of volatile.
3237 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3238 default for C++2a, unless -Wno-deprecated.
3239 * c.opt (Wvolatile): New warning.
3241 2019-08-28 Marek Polacek <polacek@redhat.com>
3243 PR c++/91360 - Implement C++20 P1143R2: constinit.
3244 * c-common.c (c_common_reswords): Add constinit and __constinit.
3245 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3246 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3249 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3250 * c-format.c (cxx_keywords): Add "constinit".
3251 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3253 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3256 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3257 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3258 like COMPOUND_EXPR rather than normal expression.
3260 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3263 * c-lex.c (c_lex_with_flags): Don't call
3264 c_common_no_more_pch () from here.
3266 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3269 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3270 instead of flag_excess_precision_cmdline.
3271 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3272 * c-opts.c (c_common_post_options): Likewise.
3274 2019-08-22 Martin Sebor <msebor@redhat.com>
3277 * c-common.c (braced_list_to_string): Add argument and overload.
3278 Handle flexible length arrays and unions.
3280 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3282 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3283 function declarations where arguments are missing. Rename variables.
3285 2019-08-15 Richard Biener <rguenther@suse.de>
3287 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3288 enabled, define __SIZETYPE__.
3290 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3292 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3293 exclusion with "section" attribute.
3294 (attr_noinit_exclusions): New table.
3295 (handle_noinit_attribute): New function.
3297 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3300 * c-common.c (resolve_overloaded_builtin): Use
3301 copy_decl_built_in_function.
3303 2019-08-13 Martin Sebor <msebor@redhat.com>
3306 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3307 (asm_fprintf_length_spec): Same.
3308 * c-format.h (format_lengths): Add FMT_LEN_w.
3310 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3312 * c-pragma.h (enum pragma_omp_clause): Add
3313 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3315 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3317 * c-pragma.h (enum pragma_omp_clause): Add
3318 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3319 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3322 2019-08-05 Marek Polacek <polacek@redhat.com>
3324 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3325 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3326 default for C++2a, unless -Wno-deprecated.
3327 * c.opt (Wcomma-subscript): New warning.
3329 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3331 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3332 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3333 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3334 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3335 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3336 constructs with the loop construct.
3338 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3341 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3342 OMP_CLAUSE_REDUCTION_TASK handling.
3344 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3346 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3347 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3349 2019-07-09 Martin Sebor <msebor@redhat.com>
3352 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3353 and others to class.
3354 * c-pretty-print.h: Same.
3356 2019-07-09 Martin Sebor <msebor@redhat.com>
3359 * c-format.c (check_argument_type): Change class-key from class to
3360 struct and vice versa to match convention and avoid -Wclass-is-pod
3361 and -Wstruct-no-pod.
3362 * c-pretty-print.h: Same.
3364 2019-07-03 Martin Liska <mliska@suse.cz>
3366 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3369 2019-07-03 Jakub Jelinek <jakub@redhat.com>
3371 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3372 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3375 2019-07-02 qing zhao <qing.zhao@oracle.com>
3377 PR preprocessor/90581
3378 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3379 * c.opt: Add new option -fmax-include-depth.
3381 2019-06-26 Jason Merrill <jason@redhat.com>
3383 PR c++/55442 - memory-hog with highly recursive constexpr.
3384 * c.opt (fconstexpr-loop-limit): New.
3386 2019-06-25 Jakub Jelinek <jakub@redhat.com>
3389 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3390 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3392 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3394 * c-common.c (c_common_nodes_and_builtins): Define
3395 alternate "__intN__" name for "__intN" types.
3397 2019-06-24 Jan Hubicka <jh@suse.cz>
3399 * c-common.c (braced_lists_to_strings): Check that
3400 type is array or integer prior checking string flag.
3402 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3404 PR c++/90875 - added -Wswitch-outside-range option
3405 * c.opt (Wswitch-outside-range): Added new option.
3406 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3408 2019-06-21 Marek Polacek <polacek@redhat.com>
3410 PR c++/90953 - ICE with -Wmissing-format-attribute.
3411 * c-common.c (check_function_arguments_recurse): Use
3413 (check_missing_format_attribute): Likewise.
3415 2019-06-19 Marek Polacek <polacek@redhat.com>
3417 PR c++/60364 - noreturn after first decl not diagnosed.
3418 * c-attribs.c (handle_noreturn_attribute): No longer static.
3419 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3421 * c-format.c (check_function_format): Use get_attribute_name.
3423 2019-06-19 Martin Sebor <msebor@redhat.com>
3425 PR translation/90156
3426 * c-format.c (function_format_info::format_type): Adjust type.
3427 (function_format_info::is_raw): New member.
3428 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3429 (decode_format_attr): Adjust call to decode_format_type.
3430 Avoid a redundant call to convert_format_name_to_system_name.
3431 Avoid abbreviating the word "arguments" in a diagnostic.
3432 (format_warning_substr): New function.
3433 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3434 (finish_dollar_format_checking): Same.
3435 (check_format_info): Same.
3436 (struct baltoks_t): New.
3437 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3438 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3440 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3441 maybe_diag_unbalanced_tokens.
3442 (handle_format_attribute): Spell out the word "arguments" in
3445 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3447 PR c++/90449 - add -Winaccessible-base option.
3448 * c.opt (Winaccessible-base): New option.
3450 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3452 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3453 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3454 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3455 combined/composite constructs where it is not allowed. Copy over
3456 OMP_CLAUSE_REDUCTION_INSCAN.
3458 2019-06-05 Martin Sebor <msebor@redhat.com>
3460 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3461 (handle_alias_ifunc_attribute): Same.
3462 (handle_copy_attribute): Same.
3463 (handle_weakref_attribute): Same.
3464 (handle_nonnull_attribute): Same.
3465 * c-warn.c (warn_for_sign_compare): Same.
3466 (warn_for_restrict): Same.
3469 2019-06-05 Martin Sebor <msebor@redhat.com>
3471 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3472 * c.opt (-Wformat-diag): Remove a spurious period.
3474 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3477 * c-common.c (check_builtin_function_arguments)
3478 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3481 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3483 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3485 2019-05-22 Martin Liska <mliska@suse.cz>
3488 * c-attribs.c (handle_copy_attribute): Do not copy
3489 target_clones attribute.
3491 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3493 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3494 * c-ada-spec.c (print_assignment_operator): New function.
3495 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3496 assignment operators declared as methods and filter out the others.
3498 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3501 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3502 "omp declare target".
3504 2019-05-16 Martin Sebor <msebor@redhat.com>
3506 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3507 keywords, operators, and types in diagnostics.
3508 (handle_scalar_storage_order_attribute): Same.
3509 (handle_mode_attribute): Same.
3510 (handle_visibility_attribute): Same.
3511 (handle_assume_aligned_attribute): Same.
3512 (handle_no_split_stack_attribute): Same.
3513 * c-common.c (shorten_compare): Same.
3514 (c_common_truthvalue_conversion): Same.
3515 (cb_get_source_date_epoch): Same.
3516 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3518 (interpret_float): Same.
3519 * c-omp.c (c_finish_omp_for): Same.
3520 * c-opts.c (c_common_post_options): Same.
3521 * c-pch.c (c_common_pch_pragma): Same.
3522 * c-pragma.c (pop_alignment): Same.
3523 (handle_pragma_pack): Same.
3524 (apply_pragma_weak): Same.
3525 (handle_pragma_weak): Same.
3526 (handle_pragma_scalar_storage_order): Same.
3527 (handle_pragma_redefine_extname): Same.
3528 (add_to_renaming_pragma_list): Same.
3529 (maybe_apply_renaming_pragma): Same.
3530 (push_visibility): Same.
3531 (handle_pragma_visibility): Same.
3532 (handle_pragma_optimize): Same.
3533 (handle_pragma_message): Same.
3534 * c-warn.c (warn_for_omitted_condop): Same.
3535 (lvalue_error): Same.
3537 2019-05-15 Richard Biener <rguenther@suse.de>
3540 * c-common.c (c_common_mark_addressable_vec): Also mark
3541 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3544 2019-05-06 Nathan Sidwell <nathan@acm.org>
3546 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3548 2019-04-30 Nathan Sidwell <nathan@acm.org>
3550 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3552 2019-04-30 Martin Liska <mliska@suse.cz>
3554 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3555 for unknown options.
3557 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3559 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3560 the pointer target rather than the pointer itself.
3562 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3565 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3567 (c_do_switch_warnings): Remove outside_range_p argument.
3568 * c-common.c (check_case_bounds): Removed.
3569 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3570 Don't call check_case_bounds. Fold low_value as well as high_value.
3571 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3572 Check for case labels outside of range of original type here and
3575 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3577 PR translation/90041
3578 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3579 in the Warn diagnostics.
3582 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3583 function comment. Warn if arguments of the attribute are not positive
3586 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3588 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3589 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3591 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3593 * c-ada-spec.c (is_float128): New predicate extracted from...
3594 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3595 <REAL_TYPE>: ...here. Call it.
3597 2019-04-05 David Malcolm <dmalcolm@redhat.com>
3600 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3601 auto_diagnostic_group. Guard inform calls by result of
3604 2019-04-05 Marek Polacek <polacek@redhat.com>
3606 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
3607 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3610 2019-04-03 Jason Merrill <jason@redhat.com>
3612 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3613 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3615 2019-04-01 Martin Sebor <msebor@redhat.com>
3618 * c-attribs.c (handle_copy_attribute): Handle references and
3619 non-constant expressions.
3621 2019-03-22 Jakub Jelinek <jakub@redhat.com>
3624 * c.opt (-fconstexpr-ops-limit=): New option.
3626 2019-03-21 Jakub Jelinek <jakub@redhat.com>
3628 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3631 2019-03-19 Martin Sebor <msebor@redhat.com>
3633 PR tree-optimization/89688
3634 * c-common.c (braced_list_to_string): Make static.
3635 (braced_lists_to_strings): Define new function.
3636 * c-common.h (braced_list_to_string): Remove.
3637 (braced_lists_to_strings): Declare.
3639 2019-03-12 Martin Liska <mliska@suse.cz>
3641 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3643 2019-03-11 Martin Liska <mliska@suse.cz>
3645 * c-opts.c (c_common_post_options): Wrap apostrophes
3646 in gcc internal format with %'.
3648 2019-03-11 Martin Liska <mliska@suse.cz>
3650 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3651 in a string format message and fix GNU coding style.
3652 * c-common.c (vector_types_convertible_p): Likewise.
3653 (c_build_vec_perm_expr): Likewise.
3654 * c-indentation.c (get_visual_column): Likewise.
3655 * c-opts.c (c_common_handle_option): Likewise.
3656 (c_common_post_options): Likewise.
3657 (sanitize_cpp_opts): Likewise.
3658 * c-pch.c (c_common_pch_pragma): Likewise.
3659 * c-pragma.c (handle_pragma_pack): Likewise.
3661 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3663 PR tree-optimization/89550
3664 * c-common.c (c_common_truthvalue_conversion): Only set
3665 TREE_NO_WARNING if warning_at returned true.
3666 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3668 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3669 Martin Sebor <msebor@gmail.com>
3671 * c.opt (Wmissing-attributes): Clean up doc string.
3673 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3676 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3677 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3680 2019-02-22 Richard Biener <rguenther@suse.de>
3682 * c-pch.c (no_checksum): Remove.
3683 (pch_init): Remove assertion that executable_checksum is not
3685 (c_common_valid_pch): Likewise.
3687 2019-02-18 Martin Sebor <msebor@redhat.com>
3690 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3692 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3695 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3696 implementing -Wtype-limits.
3698 2019-02-11 Martin Sebor <msebor@redhat.com>
3701 * c-common.c (invalid_array_size_error): New function.
3702 (valid_array_size_p): Call it. Handle size as well as type.
3703 * c-common.h (valid_constant_size_p): New function.
3704 (enum cst_size_error): New type.
3706 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3709 * known-headers.cc (get_stdlib_header_for_name): Add
3710 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3712 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3715 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3716 a C cast in pp_c_flag_gnu_v3 mode.
3718 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3721 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3722 builtin_structptr_types types even for C.
3724 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3726 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3727 when rhs is of array type correctly. Fix handling of nested structures.
3728 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3729 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3730 type casts within nested compound expressions.
3732 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3735 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3736 variable after using BIT_FIELD_REF.
3738 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3742 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3743 Remove the boolean argument.
3744 * c-warn.c (check_address_of_packed_member): Renamed to ...
3745 (check_address_or_pointer_of_packed_member): This. Also
3746 warn pointer conversion.
3747 (check_and_warn_address_of_packed_member): Renamed to ...
3748 (check_and_warn_address_or_pointer_of_packed_member): This.
3749 Also warn pointer conversion.
3750 (warn_for_address_or_pointer_of_packed_member): Remove the
3751 boolean argument. Don't check pointer conversion here.
3753 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3756 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3758 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3760 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3761 and __cpp_nontype_template_parameter_auto. Add a comment that
3762 __cpp_template_auto is deprecated.
3764 2019-01-14 Tom Honermann <tom@honermann.net>
3766 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3767 * c-common.c (c_common_reswords): Add char8_t.
3768 (fix_string_type): Use char8_t for the type of u8 string literals.
3769 (c_common_get_alias_set): char8_t doesn't alias.
3770 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3772 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3773 (keyword_begins_type_specifier): Add RID_CHAR8.
3774 * c-common.h (rid): Add RID_CHAR8.
3775 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3776 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3777 Define char8_type_node and char8_array_type_node.
3778 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3779 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3780 (c_cpp_builtins): Predefine __cpp_char8_t.
3781 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3783 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3784 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3786 * c.opt: Add the -fchar8_t command line option.
3788 2019-01-14 Martin Sebor <msebor@redhat.com>
3791 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3792 and issue errors if it fails.
3793 * c-common.h (valid_format_string_type_p): Declare.
3794 * c-format.c (valid_stringptr_type_p): Rename...
3795 (valid_format_string_type_p): ...to this and make extern.
3796 (handle_format_arg_attribute): Adjust to new name.
3797 (check_format_string): Same.
3799 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3801 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3802 Replace "may may" with "may" in warning message.
3804 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3807 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3808 (c_build_vec_convert): Declare.
3809 * c-common.c (c_build_vec_convert): New function.
3811 2019-01-04 Martin Sebor <msebor@redhat.com>
3814 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3815 Handle C++ empty throw specification and C11 _Noreturn.
3816 (has_attribute): Also handle C11 _Noreturn.
3818 2019-01-04 Martin Sebor <msebor@redhat.com>
3821 * c-attribs.c (positional_argument): Also accept enumerated types.
3823 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3825 Update copyright years.
3827 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3830 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3831 * c-warn.c (check_alignment_of_packed_member): New function.
3832 (check_address_of_packed_member): Likewise.
3833 (check_and_warn_address_of_packed_member): Likewise.
3834 (warn_for_address_or_pointer_of_packed_member): Likewise.
3835 * c.opt: Add -Wno-address-of-packed-member.
3837 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3840 * c-warn.c (get_outermost_macro_expansion): New function.
3841 (spelled_the_same_p): Use it to unwind the macro expansions, and
3842 compare the outermost macro in each nested expansion, rather than
3845 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3848 * c-common.h (warn_tautological_cmp): Convert 1st param from
3849 location_t to const op_location_t &.
3850 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3851 when testing for INTEGER_CST.
3852 (warn_tautological_bitwise_comparison): Convert 1st param from
3853 location_t to const op_location_t &; use it to build a
3854 binary_op_rich_location, and use this.
3855 (spelled_the_same_p): New function.
3856 (warn_tautological_cmp): Convert 1st param from location_t to
3857 const op_location_t &. Warn for macro expansions if
3858 spelled_the_same_p. Use binary_op_rich_location.
3860 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3864 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3865 (verify_tree): Handle location wrappers.
3866 (c_common_truthvalue_conversion): Strip any location wrapper.
3868 (fold_offsetof): Strip any location wrapper.
3869 (complete_array_type): Likewise for initial_value.
3870 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3871 index before checking for INTEGER_CST.
3872 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3873 print parentheses around location wrappers.
3874 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3875 before checking for INTEGER_CST.
3876 (warn_tautological_bitwise_comparison): Call
3877 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3878 before checking for INTEGER_CST.
3879 (readonly_error): Strip any location wrapper.
3880 (warn_array_subscript_with_type_char): Strip location wrappers
3881 before checking for INTEGER_CST. Use the location of the index if
3884 2018-12-06 Jason Merrill <jason@redhat.com>
3886 PR c++/88136 - -Wdeprecated-copy false positives
3887 * c.opt (Wdeprecated-copy-dtor): New.
3888 (Wdeprecated-copy): Move to -Wextra.
3890 2018-11-29 Martin Sebor <msebor@redhat.com>
3894 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3895 alignments to values less than the target requires.
3896 (has_attribute): For attribute aligned consider both the attribute
3897 and the alignment bits.
3898 * c-common.c (c_init_attributes): Optionally issue a warning for
3901 2018-11-28 Martin Sebor <msebor@redhat.com>
3905 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3906 or destination is an error.
3908 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3911 * c-ubsan.c: Include langhooks.h.
3912 (ubsan_instrument_division): Change gcc_assert that main variants
3913 of op0 and op1 types are equal to gcc_checking_assert that the
3914 main variants are compatible types.
3916 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3918 * c-ada-spec.c: Include stringpool.h.
3919 (has_static_fields): Return false for incomplete types.
3920 (is_tagged_type): Likewise.
3921 (has_nontrivial_methods): Likewise.
3922 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3923 (struct overloaded_name_hash): New structure.
3924 (struct overloaded_name_hasher): Likewise.
3925 (overloaded_names): New global variable.
3926 (init_overloaded_names): New static function.
3927 (overloaded_name_p): New predicate.
3928 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3929 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3930 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3931 Remove always-true condition and dump forward types.
3932 (dump_ada_specs): Delete overloaded_names.
3934 2018-11-20 Martin Sebor <msebor@redhat.com>
3936 * c-attribs.c (type_for_vector_size): New function.
3937 (type_valid_for_vector_size): Same.
3938 (handle_vector_size_attribute): Move code to the functions above
3940 (validate_attribute, has_attribute): New functions.
3941 * c-common.h (has_attribute): Declare.
3942 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3943 * c-common.c (c_common_resword): Same.
3945 2018-11-16 Jason Merrill <jason@redhat.com>
3947 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3948 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3950 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3953 * c-common.c (fix_string_type): Reject string literals larger than
3954 TYPE_MAX_VALUE (ssizetype) bytes.
3956 2018-11-15 Martin Sebor <msebor@redhat.com>
3960 * c-attribs.c (positional_argument): New function.
3961 (handle_alloc_size_attribute): Use it and simplify.
3962 (handle_alloc_align_attribute): Same.
3963 (handle_assume_aligned_attribute): Same.
3964 (handle_nonnull_attribute): Same.
3965 * c-common.c (check_function_arguments): Pass fntype to
3966 check_function_format.
3967 * c-common.h (check_function_format): Add an argument.
3968 (PosArgFlags, positional_argument): Declare new type and function.
3969 * c-format.c (decode_format_attr): Add arguments.
3970 (check_format_string, get_constant): Same.
3971 (convert_format_name_to_system_name): Adjust.
3973 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3976 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3978 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3980 P1236R1 - Signed integers are two's complement
3981 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3982 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3983 with in-range second operand well defined for -std=c++2a.
3986 * c-common.c (parse_optimize_options): Allocate option string from
3987 opts_obstack rather than as GC memory. Move the allocation after
3988 warning for invalid option.
3990 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3992 * c-common.c (c_get_substring_location): Update for renaming of
3993 get_source_location_for_substring to get_location_within_string.
3994 * c-lex.c: Replace "source_location" with "location_t".
3995 * c-opts.c: Likewise.
3996 * c-ppoutput.c: Likewise.
3998 2018-11-13 Martin Sebor <msebor@redhat.com>
4001 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4002 (handle_tls_model_attribute): Improve diagnostics.
4004 2018-11-12 Jason Merrill <jason@redhat.com>
4006 * c-cppbuiltin.c (c_cpp_builtins): Define
4007 __cpp_impl_destroying_delete.
4009 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4010 __cpp_conditional_explicit.
4012 2018-11-09 Martin Sebor <msebor@redhat.com>
4015 * c-attribs.c (handle_copy_attribute): New function.
4017 2018-11-09 Martin Sebor <msebor@redhat.com>
4020 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4022 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4024 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4025 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4026 enum omp_memory_order MEMORY_ORDER.
4027 (c_finish_omp_flush): Add MO argument.
4028 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4029 (c_finish_omp_for): Add FINAL_P argument.
4030 * c-omp.c: Include memmodel.h.
4031 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4032 OMP_TASKGROUP_CLAUSES to it.
4033 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4034 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4035 instead of OMP_ATOMIC_SEQ_CST.
4036 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4037 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4038 __atomic_thread_fence call with the given value.
4039 (check_omp_for_incr_expr): Formatting fixes.
4040 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4041 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4042 is not constant expression 1 or -1. Transform NE_EXPR loops
4043 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4044 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4046 (c_omp_split_clauses): Add support for combined
4047 #pragma omp parallel master and
4048 #pragma omp {,parallel }master taskloop{, simd} constructs.
4049 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4050 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4051 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4052 (c_omp_predetermined_sharing): Don't return
4053 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4054 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4055 PRAGMA_OMP_REQUIRES.
4056 * c-pragma.h (enum pragma_kind): Likewise.
4057 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4058 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4060 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4062 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4064 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4066 * c-format.c (local_cgraph_node_ptr_node): New variable.
4067 (gcc_dump_printf_char_table): Add entry for %C.
4068 (get_pointer_to_named_type): New function, taken from the handling
4069 code for "gimple *" from...
4070 (init_dynamic_diag_info): ...here. Add handling for
4072 * c-format.h (T_CGRAPH_NODE): New.
4074 2018-10-19 Jason Merrill <jason@redhat.com>
4076 * c-cppbuiltin.c (c_cpp_builtins): Add
4077 __cpp_nontype_template_parameter_class.
4079 2018-10-31 Nathan Sidwell <nathan@acm.org>
4081 * c-opts.c (c_finish_options): Force command line macro
4082 location. Refactor to avoid repeating main debug hook.
4083 (push_command_line_include): Clarify comment.
4085 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4087 2018-10-30 Martin Sebor <msebor@redhat.com>
4090 * c-format.c (check_format_types): Avoid diagnosing null pointer
4091 arguments to printf-family of functions.
4093 2018-10-30 Marek Polacek <polacek@redhat.com>
4095 Implement P0892R2, explicit(bool).
4096 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4098 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4100 * name-hint.h (name_hint::take_deferred): New member function.
4102 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4105 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4107 (check_function_restrict): Rename param "argarray" to
4108 "unfolded_argarray", and make a copy named "argarray", calling
4109 fold_for_warn on each argument.
4110 (check_function_arguments): Add note about responsibility for
4111 folding the arguments.
4113 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4115 * c-common.c (flag_isoc2x): New variable.
4116 * c-common.h (clk_c): Update comment to reference C2X.
4117 (flag_isoc99, flag_isoc11): Update comments to reference future
4118 standard versions in general.
4119 (flag_isoc2x): Declare.
4120 * c-opts.c (set_std_c2x): New function.
4121 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4122 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4124 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4126 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4128 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4129 (std=iso9899:2018): Document C17 as published in 2018.
4131 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4134 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4136 2018-10-11 Will Wray <wjwray@gmail.com>
4139 * c-pretty-print.h (pp_c_type_cast): Prototype.
4140 (pp_c_integer_constant): Likewise.
4141 * c-pretty-print.c (pp_c_type_cast): No longer static.
4142 (pp_c_integer_constant): Likewise.
4143 (pp_c_enumeration_constant): Fix loop termination when finding
4144 name of constant. No longer returns a value. Call
4145 pp_c_integer_constant.
4146 (c_pretty_printer::constant): Update for changes to
4147 pp_c_enumeration_constant.
4149 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4151 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4152 for no_unique_address.
4154 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4156 * c-common.c (c_option_controlling_cpp_error): Rename to...
4157 (c_option_controlling_cpp_diagnostic): ...this, and convert
4158 "reason" from int to enum.
4159 (c_cpp_error): Rename to...
4160 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4161 * c-common.h (c_cpp_error): Rename to...
4162 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4163 * c-opts.c (c_common_init_options): Update for renaming.
4165 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4168 * c-common.c (vector_types_compatible_elements_p): Use
4169 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4171 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4173 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4174 to generate constructor destructor priority warning.
4175 * c.opt (-Wprio-ctor-dtor): New option.
4177 2018-10-01 Jason Merrill <jason@redhat.com>
4179 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4181 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4183 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4184 (dump_ada_node): Add const keyword.
4186 2018-09-25 Martin Liska <mliska@suse.cz>
4188 * c-common.c (c_common_truthvalue_conversion):
4189 Remove Pascal from documentation.
4191 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4193 * c-ada-spec.c: Include diagnostic.h.
4194 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4196 2018-09-19 Marek Polacek <polacek@redhat.com>
4198 * c.opt (Wclass-conversion): New.
4200 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4202 * c-format.c (range_label_for_format_type_mismatch::get_text):
4203 Update for new param.
4205 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4207 * c-format.c (format_warning_at_char): Update for introduction of
4208 format_string_diagnostic_t.
4209 (format_type_warning): Likewise.
4211 2018-09-17 Martin Jambor <mjambor@suse.cz>
4214 * c.opt (Wabsolute-value): New.
4216 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4218 * c-common.c (complete_flexible_array_elts): New helper function.
4219 * c-common.h (complete_flexible_array_elts): Declare.
4221 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4223 * c-common.c (braced_list_to_string): Remove eval parameter.
4224 Add some more checks. Always create zero-terminated STRING_CST.
4225 * c-common.h (braced_list_to_string): Adjust prototype.
4227 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4230 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4232 (maybe_suggest_missing_token_insertion): Likewise.
4233 (maybe_add_include_fixit): Add param "override_location". If set,
4234 and source-printing is enabled, then override the rich_location's
4235 primary location with that of the insertion point for the fix-it
4236 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4237 * c-common.h (extern void maybe_add_include_fixit): Add bool
4239 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4240 for conversion of show_caret_p to a tri-state.
4241 * c-warn.c (warn_for_restrict): Likewise.
4243 (suggest_missing_header::~suggest_missing_header): Update call to
4244 maybe_add_include_fixit to suggest overriding the location, as it
4247 2018-08-27 Martin Liska <mliska@suse.cz>
4249 * c-common.c (check_function_restrict): Use new function
4250 fndecl_built_in_p and remove check for FUNCTION_DECL if
4252 (check_builtin_function_arguments): Likewise.
4253 (reject_gcc_builtin): Likewise.
4254 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4256 2018-08-26 Marek Polacek <polacek@redhat.com>
4258 PR c++/87029, Implement -Wredundant-move.
4259 * c.opt (Wredundant-move): New option.
4261 2018-08-21 Marek Polacek <polacek@redhat.com>
4263 PR c++/86981, Implement -Wpessimizing-move.
4264 * c.opt (Wpessimizing-move): New option.
4266 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4269 * c-attribs.c (common_handle_aligned_attribute): Add
4270 auto_diagnostic_group instance.
4271 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4272 * c-opts.c (c_common_post_options): Likewise.
4273 * c-warn.c (warn_logical_not_parentheses): Likewise.
4274 (warn_duplicated_cond_add_or_warn): Likewise.
4275 (warn_for_multistatement_macros): Likewise.
4277 2018-08-20 Nathan Sidwell <nathan@acm.org>
4279 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4282 2018-08-17 Nathan Sidwell <nathan@acm.org>
4284 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4286 (laxy_hex_fp_value_count): Make unsigned.
4287 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4288 manipulate the macro.
4289 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4292 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4294 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4295 (gcc_dump_printf_length_specs): New.
4296 (gcc_dump_printf_flag_pairs): New.
4297 (gcc_dump_printf_flag_specs): New.
4298 (gcc_dump_printf_char_table): New.
4299 (format_types_orig): Add entry for "gcc_dump_printf".
4300 (init_dynamic_diag_info): Set up length_char_specs and
4301 conversion_specs for gcc_dump_printf_format_type.
4302 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4304 2018-08-17 Nathan Sidwell <nathan@acm.org>
4306 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4308 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4309 * c-cppbuiltin.c: Likewise.
4311 2018-08-17 Martin Liska <mliska@suse.cz>
4313 * c.opt: Remove Warn, Init and Report for options with
4314 Ignore/Deprecated flag. Warning is done automatically for
4317 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4320 * c-common.c (selftest::c_family_tests): Call
4321 selftest::c_indentation_c_tests.
4322 * c-common.h (selftest::c_indentation_c_tests): New decl.
4323 * c-indentation.c: Include "selftest.h".
4324 (next_tab_stop): Add "tab_width" param, rather than accessing
4326 (get_visual_column): Likewise. Clarify comment. Bulletproof
4327 against reading past the end of the line.
4328 (get_first_nws_vis_column): Add "tab_width" param.
4329 (detect_intervening_unindent): Likewise.
4330 (should_warn_for_misleading_indentation): Read tab width from
4331 cpp_opts and pass around.
4332 (selftest::test_next_tab_stop): New test.
4333 (selftest::assert_get_visual_column_succeeds): New function.
4334 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4335 (selftest::assert_get_visual_column_fails): New function.
4336 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4337 (selftest::test_get_visual_column): New test.
4338 (selftest::c_indentation_c_tests): New function.
4340 2018-08-16 Nathan Sidwell <nathan@acm.org>
4342 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4343 (store_ada_macro): Likewise.
4344 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4345 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4347 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4349 * c-format.c: Include "selftest-diagnostic.h" and
4350 "gcc-rich-location.h".
4351 (format_warning_at_char): Pass NULL for new label params of
4353 (class indirection_suffix): New class.
4354 (class range_label_for_format_type_mismatch): New class.
4355 (format_type_warning): Move logic for generating "*" suffix to
4356 class indirection_suffix. Create "fmt_label" and "param_label"
4357 to show their types, and pass them to the
4358 format_warning_at_substring calls.
4359 (selftest::test_type_mismatch_range_labels): New test.
4360 (selftest::c_format_c_tests): Call it.
4362 2018-08-13 Martin Sebor <msebor@redhat.com>
4364 PR tree-optimization/71625
4365 * c-common.c (braced_list_to_string): New function.
4366 * c-common.h (braced_list_to_string): Declare it.
4368 2018-08-08 Nathan Sidwell <nathan@acm.org>
4370 * c-common.c (try_to_locate_new_include_inertion_point): Use
4371 linemap_included_from_linemap.
4372 * c-lex.c (fe_file_change): Use linemap_included_from.
4373 * c-ppoutput.c (pp_file_change): Likewise.
4375 2018-08-01 Martin Sebor <msebor@redhat.com>
4377 PR tree-optimization/86650
4378 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
4379 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4380 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4381 * c-format.h (T89_G): Update to be "gimple *" rather than
4383 (local_gcall_ptr_node): Rename...
4384 (local_gimple_ptr_node): ...to this.
4386 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4388 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4389 table entries for gcc_diag_char_table, and the 'Z' entry from
4390 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4391 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4392 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4393 adding missing "Z" for this table. Remove erroneous "G" and "K"
4395 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4396 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4397 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4399 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4401 * c-common.c (speculation_safe_resolve_call): New function.
4402 (speculation_safe_resolve_params): New function.
4403 (speculation_safe_resolve_return): New function.
4404 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4405 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4406 __HAVE_SPECULATION_SAFE_VALUE.
4408 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4410 * c-common.c (c_cpp_error): Remove redundant "line_table"
4411 parameter from call to rich_location::set_range.
4412 (maybe_suggest_missing_token_insertion): Likewise.
4414 2018-07-20 Martin Sebor <msebor@redhat.com>
4417 * c.opt (-Warray-bounds): Remove redundant -Wall.
4419 2018-07-20 Martin Sebor <msebor@redhat.com>
4422 * c-common.h (c_common_handle_option): Change function argument
4424 * c-opts.c (c_common_init_options): Same.
4425 (c_common_handle_option): Same. Remove special handling of
4426 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4427 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4428 options to take a HOST_WIDE_INT argument and accept a byte-size
4430 (-Wvla-larger-than): Same.
4431 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4432 (-Wno-vla-larger-than): Same.
4434 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4436 * c-attribs.c (c_common_attribute_table): Add
4437 "omp declare target implicit" attribute.
4439 2018-07-12 Richard Biener <rguenther@suse.de>
4442 * c-attribs.c (handle_packed_attribute): Do not build a variant
4443 type with TYPE_PACKED, instead ignore the attribute if we may
4444 not apply to the original type.
4446 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4449 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4450 to contain TREE_LIST for both the original class iterator and the
4453 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4455 * c-ada-spec.c (to_ada_name): Remove index parameter.
4456 (pp_ada_tree_identifier): Likewise.
4457 (dump_ada_macros): Adjust call to to_ada_name.
4458 (struct overloaded_name_hash): Delete.
4459 (struct overloaded_name_hasher): Likewise.
4460 (overloaded_names): Likewise.
4461 (compute_overloading_index): Likewise.
4462 (dump_ada_decl_name): Do not call compute_overloading_index and
4463 adjust calls to pp_ada_tree_identifier.
4464 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4465 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4466 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4467 (dump_ada_enum_type): Remove type and display_convention parameters.
4468 Adjust calls to pp_ada_tree_identifier.
4469 (dump_ada_node): Likewise and for dump_ada_structure.
4470 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4472 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4474 (print_constructor): Adjust call to pp_ada_tree_identifier.
4475 (print_destructor): Likewise.
4476 (dump_ada_declaration): Switch to aspect syntax.
4477 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4478 parameter with nested parameter.
4479 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4480 (dump_ada_specs): Do not delete overloaded_names table.
4482 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4485 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4488 2018-07-05 Nathan Sidwell <nathan@acm.org>
4490 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4491 NO_IMPLICIT_EXTERN_C.
4493 2018-06-28 Martin Liska <mliska@suse.cz>
4495 * cppspec.c: Include opt-suggestions.h.
4497 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4498 Thomas Schwinge <thomas@codesourcery.com>
4499 Cesar Philippidis <cesar@codesourcery.com>
4501 * c-pragma.h (enum pragma_omp_clause): Add
4502 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4503 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4505 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4508 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4511 2018-06-18 Martin Sebor <msebor@redhat.com>
4514 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4517 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4519 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4521 2018-06-13 Jason Merrill <jason@redhat.com>
4523 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4524 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4527 PR c++/86094 - wrong code with defaulted move ctor.
4528 * c-opts.c (c_common_post_options): Bump the current ABI version to
4529 13. Set warn_abi_version and flag_abi_compat_version to the current
4530 version rather than 0. Fix defaulting flag_abi_compat_version from
4533 2018-06-12 Martin Sebor <msebor@redhat.com>
4536 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4537 sizeof source and destination yields the same value.
4539 2018-06-12 Martin Liska <mliska@suse.cz>
4541 * c.opt: Make MPX-related options as Deprecated.
4543 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4545 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4548 2018-06-08 Martin Liska <mliska@suse.cz>
4550 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4551 for MPX (macros, related functions, fields in cgraph_node, ...).
4552 (handle_bnd_legacy): Likewise.
4553 (handle_bnd_instrument): Likewise.
4556 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4559 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4560 __cpp_transactional_memory to 201500 instead of 210500.
4562 2018-06-06 Jason Merrill <jason@redhat.com>
4564 PR c++/85710 - ICE with -Wmemset-elt-size.
4565 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4567 2018-06-01 Jason Merrill <jason@redhat.com>
4569 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4572 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4574 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4575 declaration for a typedef independently of whether the declaration of
4576 the subtype is generated.
4578 2018-05-31 Martin Sebor <msebor@redhat.com>
4581 * c.opt (-Wno-alloc-size-larger-than): New option.
4583 2018-04-22 David Pagan <dave.pagan@oracle.com>
4586 * c-opts.c (c_common_post_options): Set default for warn_return_type
4587 for C++/C++ with ObjC extensions only. For C, makes it possible to
4588 differentiate between default (no option), -Wreturn-type, and
4591 2018-05-29 Jason Merrill <jason@redhat.com>
4593 * c.opt (Winit-list-lifetime): New flag.
4595 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4597 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4598 splay_tree_delete_pointers.
4600 2018-05-26 Jakub Jelinek <jakub@redhat.com>
4603 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4604 noinline variable to workaround broken kernel headers.
4606 2018-05-18 Jason Merrill <jason@redhat.com>
4608 * c.opt (Wdeprecated-copy): New flag.
4610 2018-05-17 Martin Liska <mliska@suse.cz>
4612 * c-warn.c (overflow_warning): Do not use
4613 space in between 'G_' and '('.
4615 2018-05-09 Jason Merrill <jason@redhat.com>
4617 * c-common.c (valid_array_size_p): Add complain parameter.
4618 * c-common.h: ...which defaults to true.
4620 2018-05-11 Jakub Jelinek <jakub@redhat.com>
4623 * c-omp.c (c_omp_predetermined_sharing): Return
4624 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4626 2018-05-11 Martin Liska <mliska@suse.cz>
4629 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4632 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4635 * c-common.h (fold_offsetof_1): Removed.
4636 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4637 CTX argument defaulted to ERROR_MARK.
4638 * c-common.c (fold_offsetof_1): Renamed to ...
4639 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4640 argument, convert the pointer constant to TYPE and use size_binop
4641 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4642 a pointer type. Adjust recursive calls.
4644 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4647 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4649 2018-05-07 Nathan Sidwell <nathan@acm.org>
4651 * c.opt (ffor-scope): Remove functionality, issue warning.
4653 2018-05-03 Nathan Sidwell <nathan@acm.org>
4655 * c.opt (ffriend-injection): Remove functionality, issue warning.
4657 2018-05-01 David Malcolm <dmalcolm@redhat.com>
4660 * c-format.c (struct format_check_results): Add field
4662 (check_format_info): Initialize it, and warn if encountered.
4663 (check_format_arg): Distinguish between wide char and
4664 everything else when detecting arrays of non-char.
4666 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4668 * c-format.c (get_corrected_substring): Update for
4669 location_get_source_line returning a char_span. Use a char_span
4670 when handling the prefix of the correction.
4671 * c-indentation.c (get_visual_column): Update for
4672 location_get_source_line returning a char_span.
4673 (get_first_nws_vis_column): Likewise.
4675 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4678 * known-headers.cc (get_stdlib_header_for_name): Add various names
4679 from <assert.h>, <string.h>, and <memory.h>; add more names from
4682 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4685 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4686 get_base_address of the second operand is a VAR_P, rather than the
4687 operand itself, and use gcc_checking_assert instead of gcc_assert.
4689 2018-03-23 Marek Polacek <polacek@redhat.com>
4692 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4693 <case RDIV_EXPR>: Tweak condition.
4695 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4697 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4699 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4702 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4706 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4709 2018-03-16 Richard Biener <rguenther@suse.de>
4712 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4713 unshare the possibly folded expression.
4715 2018-03-15 Richard Biener <rguenther@suse.de>
4718 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4720 2018-03-13 Martin Sebor <msebor@redhat.com>
4722 PR tree-optimization/84725
4723 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4724 with all three narrow character types, including their qualified forms.
4726 2018-03-12 Martin Sebor <msebor@redhat.com>
4728 PR tree-optimization/83456
4729 * c-common.c (check_function_restrict): Return bool.
4730 Restore checking of bounded built-in functions.
4731 (check_function_arguments): Also return the result
4732 of warn_for_restrict.
4733 * c-common.c (check_function_restrict): Return bool.
4734 * c-warn.c (warn_for_restrict): Return bool.
4736 2018-03-02 Marek Polacek <polacek@redhat.com>
4739 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4742 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4744 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4747 2018-03-01 Marek Polacek <polacek@redhat.com>
4750 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4751 alignment in computation.
4753 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4755 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4756 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4758 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4760 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4761 (is_char_array): Take a type instead of a declaration.
4762 (dump_ada_array_type): Likewise.
4763 (is_simple_enum): Minor tweak.
4764 (dump_ada_enum_type): New function extracted from...
4765 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4766 <INTEGER_TYPE>: Remove unreachable code.
4767 <RECORD_TYPE>: Likewise. Minor tweaks.
4768 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4769 <ENUMERAL_TYPE>: New case.
4770 <RECORD_TYPE>: Factor out common code.
4771 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4772 Minor tweaks. Deal with enumeral types.
4773 (dump_ada_structure): Minor tweaks.
4775 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4777 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4778 address for incomplete structures.
4779 (dump_forward_type): Do not bail out for incomplete structures.
4780 (dump_ada_declaration): Do not special-case incomplete structures
4781 for subtypes. Dump them as null records for types.
4783 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4785 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4786 (is_char_array): Fix formatting.
4787 (dump_template_types): Likewise.
4788 (dump_generic_ada_node): Rename into...
4789 (dump_ada_node): ...this.
4790 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4791 incomplete structures and not for empty structures. Do not use it
4792 when forward declarations are needed.
4793 (dump_forward_type): New function.
4794 (dump_nested_types): Remove FORWARD parameter. Do not consider
4795 TREE_VISITED and do not generate a forward declaration. Only dump
4796 original nested types for nested declaration.
4797 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4798 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4799 <RECORD_TYPE>: Do not consider TREE_VISITED.
4800 (dump_ada_declaration): Use booleans and fix formatting throughout.
4801 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4802 Call dump_forward_type instead of dump_nested_types for a typedef.
4803 Remove superfluous check and adjust call to dump_nested_types.
4804 <POINTER_TYPE>: Call dump_forward_type and fall through.
4805 (dump_ada_struct_decl): Rename into...
4806 (dump_ada_structure): ...this. Do not special-case empty structures.
4808 2018-02-27 Martin Sebor <msebor@redhat.com>
4811 * c.opt (-Wmissing-attributes): New option.
4813 2018-02-21 Martin Liska <mliska@suse.cz>
4815 * c.opt (Wcatch-value=): Add IntegerRange.
4817 2018-02-15 Jason Merrill <jason@redhat.com>
4819 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4821 2018-02-09 Nathan Sidwell <nathan@acm.org>
4824 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4826 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4829 2018-02-09 Martin Sebor <msebor@redhat.com>
4832 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4833 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4834 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4835 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4836 (-Wuninitialized): Same.
4838 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4840 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4841 keyword for components.
4843 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4845 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4847 2018-02-02 Julia Koval <julia.koval@intel.com>
4849 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4851 2018-01-29 Marek Polacek <polacek@redhat.com>
4854 * c-format.c (check_function_format): Check current_function_decl.
4856 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4858 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4860 (LAZY_HEX_FP_VALUES_CNT): Define.
4861 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4862 values rather than just 12.
4863 (builtin_define_with_hex_fp_value): Likewise.
4865 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4868 * c.opt (-fmacro-prefix-map): New option.
4869 * c-opts.c (c_common_handle_option): Handle it.
4870 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4871 * c-ppoutput.c (init_pp_output): Likewise.
4873 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4876 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4878 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4880 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4881 Skip 'f' and 'F' characters if it is true.
4882 (store_ada_macro): Minor tweak.
4883 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4884 <CPP_WSTRING>: Likewise.
4885 <CPP_STRING>: Output '&' in the buffer if not the first string.
4886 <CPP_NUMBER>: Adjust calls to dump_number.
4888 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4891 * c-common.c: Include "selftest.h".
4892 (get_atomic_generic_size): Perform the test for integral type
4893 before the range test for any integer constant, fixing indentation
4894 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4895 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4896 (selftest::test_fold_for_warn): New function.
4897 (selftest::c_common_c_tests): New function.
4898 (selftest::c_family_tests): Call it, and
4899 selftest::c_pretty_print_c_tests.
4900 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4901 * c-format.c (check_format_arg): Convert VAR_P check to a
4903 * c-pretty-print.c: Include "selftest.h".
4904 (pp_c_cast_expression): Don't print casts for location wrappers.
4905 (selftest::assert_c_pretty_printer_output): New function.
4906 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4907 (selftest::test_location_wrappers): New function.
4908 (selftest::c_pretty_print_c_tests): New function.
4909 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4911 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4912 Alan Hayward <alan.hayward@arm.com>
4913 David Sherwood <david.sherwood@arm.com>
4915 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4917 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4918 Alan Hayward <alan.hayward@arm.com>
4919 David Sherwood <david.sherwood@arm.com>
4921 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4925 Alan Hayward <alan.hayward@arm.com>
4926 David Sherwood <david.sherwood@arm.com>
4928 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4929 (convert_vector_to_array_for_subscript): Handle polynomial
4930 TYPE_VECTOR_SUBPARTS.
4931 (c_common_type_for_mode): Check valid_vector_subparts_p.
4932 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4935 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4937 Update copyright years.
4939 2017-12-22 Mike Stump <mikestump@comcast.net>
4940 Eric Botcazou <ebotcazou@adacore.com>
4942 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4943 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4945 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
4949 * c-semantics.c (only_debug_stmts_after_p): New.
4950 (pop_stmt_list): Clear side effects in debug-only stmt list.
4951 Check for single nondebug stmt followed by debug stmts only.
4953 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
4956 * c-semantics.c (pop_stmt_list): Propagate side effects from
4957 single nondebug stmt to container list.
4959 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4961 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4962 conditions with typical order conditions.
4964 2017-12-18 Marek Polacek <polacek@redhat.com>
4966 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4969 2017-12-17 Martin Sebor <msebor@redhat.com>
4971 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4972 an error for attribute warn_if_not_aligned.
4974 2017-12-16 Martin Sebor <msebor@redhat.com>
4976 PR tree-optimization/78918
4977 * c-common.c (check_function_restrict): Avoid checking built-ins.
4978 * c.opt (-Wrestrict): Include in -Wall.
4980 2017-12-15 Jakub Jelinek <jakub@redhat.com>
4982 * c-attribs.c (c_common_attribute_table,
4983 c_common_format_attribute_table): Swap affects_type_identity
4984 and handler fields, adjust comments.
4986 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4988 * c.opt (Wcast-function-type): New warning option.
4989 * c-lex.c (get_fileinfo): Avoid warning.
4990 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4992 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
4995 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4996 Adjust the size of buf1 and buf2, add a new buf to avoid
4997 format-overflow warning.
4999 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5001 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5002 subsequent statement list.
5004 2017-12-07 Martin Sebor <msebor@redhat.com>
5008 * c-attribs.c (attr_aligned_exclusions): New array.
5009 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5010 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5011 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5012 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5013 (attr_warn_unused_result_exclusions): Same.
5014 (handle_hot_attribute, handle_cold_attribute): Simplify.
5015 (handle_const_attribute): Warn on function returning void.
5016 (handle_pure_attribute): Same.
5017 (handle_aligned_attribute): Diagnose conflicting attribute
5019 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5021 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5024 * c-common.c (selftest::c_family_tests): Call
5025 selftest::c_spellcheck_cc_tests.
5026 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5027 * c-spellcheck.cc: Include "selftest.h".
5028 (name_reserved_for_implementation_p): New function.
5029 (should_suggest_as_macro_p): New function.
5030 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5031 should_suggest_as_macro_p and call it.
5032 (selftest::test_name_reserved_for_implementation_p): New function.
5033 (selftest::c_spellcheck_cc_tests): New function.
5034 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5036 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5038 * c-spellcheck.cc: New file, taken from macro-handling code in
5040 * c-spellcheck.h: New file, taken from macro-handling code in
5043 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5045 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5047 (handle_simd_attribute): Don't check for "cilk simd function"
5048 attribute. Reindent, formatting changes.
5050 2017-11-30 Julia Koval <julia.koval@intel.com>
5052 * c-common.h (inv_list): Remove.
5054 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5057 * c-common.c (c_switch_covers_all_cases_p_1,
5058 c_switch_covers_all_cases_p): New functions.
5059 * c-common.h (c_switch_covers_all_cases_p): Declare.
5061 2017-11-28 Julia Koval <julia.koval@intel.com>
5062 Sebastian Peryt <sebastian.peryt@intel.com>
5064 * array-notation-common.c: Delete.
5065 * c-cilkplus.c: Ditto.
5066 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5067 * c-common.def (ARRAY_NOTATION_REF): Remove.
5068 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5069 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5070 c_validate_cilk_plus_loop, cilkplus_an_parts,
5071 cilk_ignorable_spawn_rhs_op,
5072 cilk_recognize_spawn): Remove.
5073 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5074 * c-omp.c: Remove CILK_SIMD check.
5075 * c-pragma.c: Ditto.
5076 * c-pragma.h: Remove CILK related pragmas.
5077 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5078 ARRAY_NOTATION_REF condition.
5079 (c_pretty_printer::expression): Ditto.
5080 * c.opt (fcilkplus): Remove.
5083 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5085 * c-pretty-print.c (pp_c_additive_expression,
5086 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5088 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5090 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5093 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5094 instead of tree_to_uhwi, formatting fix.
5096 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5099 * known-headers.cc: New file, based on material from c/c-decl.c.
5100 (suggest_missing_header): Copied as-is.
5101 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5102 heavily edited to add C++ support. Add some knowledge about
5103 <limits.h>, <stdint.h>, and <wchar.h>.
5104 * known-headers.h: Likewise.
5106 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5108 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5109 (lookup_name_fuzzy): Likewise. Convert return type from
5110 const char * to name_hint. Add location_t param.
5111 * name-hint.h: New header.
5113 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5117 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5119 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5121 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5122 expected publication date of C17.
5123 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5125 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5128 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5129 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5131 2017-11-10 Martin Sebor <msebor@redhat.com>
5134 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5135 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5136 * c.opt (-Wstringop-truncation): New option.
5138 2017-11-06 Martin Liska <mliska@suse.cz>
5141 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5143 * c.opt: Set default value of warn_return_type.
5145 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5147 * c-common.c (binary_op_error): Update for renaming of
5149 (c_parse_error): Likewise.
5150 * c-warn.c (warn_logical_not_parentheses): Likewise for
5151 renaming of inform_at_rich_loc.
5152 (warn_for_restrict): Likewise for renaming of
5153 warning_at_rich_loc_n.
5155 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5157 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5158 * c-opts.c (set_std_c17): New function.
5159 (c_common_init_options): Use gnu17 as default C version.
5160 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5162 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5164 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5165 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5166 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5169 2017-10-23 Marek Polacek <polacek@redhat.com>
5172 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5174 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5176 * c-common.c (check_builtin_function_arguments): Also check arguments
5177 of __builtin_alloca_with_align_and_max.
5179 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5181 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5182 rather than NULL to format_warning_va.
5183 (check_format_types): Likewise when calling format_type_warning.
5184 Remove code to extract source_ranges and source_range * in favor
5185 of just a location_t.
5186 (format_type_warning): Convert source_range * param to a
5189 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5191 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5194 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5196 * c-common.c (enum missing_token_insertion_kind): New enum.
5197 (get_missing_token_insertion_kind): New function.
5198 (maybe_suggest_missing_token_insertion): New function.
5199 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5201 2017-10-11 Nathan Sidwell <nathan@acm.org>
5203 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5204 (c_common_handle_option): Update incpath_kind names.
5206 2017-10-11 Martin Liska <mliska@suse.cz>
5209 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5210 Wattributes warning.
5212 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5214 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5215 operating on trees as wide_ints.
5216 * c-common.c (pointer_int_sum): Likewise.
5217 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5218 * c-warn.c (match_case_to_enum_1): Likewise.
5219 (c_do_switch_warnings): Likewise.
5220 (maybe_warn_shift_overflow): Likewise.
5222 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5225 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5226 instead of wide_int::from.
5228 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5231 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5232 using to_widest use wide_int with the larger of the two precisions.
5234 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5236 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5239 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5241 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5242 when combining the original unconverted comparison operands.
5244 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5246 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5249 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5251 * c-ada-spec.c (to_ada_name): Add index parameter.
5252 (pp_ada_tree_identifier): Likewise.
5253 (dump_ada_macros): Adjust call to to_ada_name.
5254 (struct overloaded_name_hash): New type.
5255 (struct overloaded_name_hasher): Likewise.
5256 (overloaded_names): New hash table.
5257 (compute_overloading_index): New function.
5258 (dump_ada_decl_name): Call it and pass the result to
5259 pp_ada_tree_identifier.
5260 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5261 (dump_ada_function_declaration): Likewise.
5262 (dump_generic_ada_node): Likewise.
5263 (print_constructor): Likewise.
5264 (print_destructor): Likewise.
5265 (dump_ada_specs): Delete overloaded_names table.
5267 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5269 * c-ada-spec.c (max_ada_macros): Move around.
5270 (store_ada_macro_index): Likewise.
5271 (source_file): Rename into...
5272 (macro_source_file): ...this.
5273 (count_ada_macro): Move around.
5274 (store_ada_macro): Likewise.
5275 (compare_macro): Likewise.
5276 (print_ada_macros): Merge in...
5277 (dump_ada_macros): ...this.
5278 (source_file_base): Rename into...
5279 (current_source_file): ...this.
5280 (print_comment): Move around.
5281 (dump_ada_nodes): Call dump_ada_declaration directly.
5282 (struct with): Change type of limited field to bool.
5283 (append_withs): Change type of limited_access parameter to bool.
5284 (pp_ada_tree_identifie): Likewise.
5285 (dump_ada_decl_nam): Likewise.
5286 (dump_generic_ada_node): Likewise. Do not print the return type.
5287 (to_ada_name): Change type of space_found parameter to bool.
5288 (dump_ada_function_declaration): Return void and change type of
5289 parameters to bool. Also print the return type for a function.
5290 (print_ada_methods): Rename into...
5291 (dump_ada_methods): ...this.
5292 (print_ada_declaration): Rename into ...
5293 (dump_ada_declaration): ...this. Do not print the return type.
5294 (print_ada_struct_decl): Rename into...
5295 (dump_ada_struct_decl): ...this.
5297 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5299 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5300 rather than DECL_INITIAL.
5301 (common_handle_aligned_attribute): Likewise.
5303 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5305 * c.opt (gen-decls): Add RejectNegative.
5307 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5308 Jakub Jelinek <jakub@redhat.com>
5310 Add support for -std=c++2a.
5311 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5312 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5313 * c-opts.c (set_std_cxx2a): New.
5314 (c_common_handle_option): Set options when -std=c++2a is enabled.
5315 (c_common_post_options): Adjust comments.
5316 (set_std_cxx14, set_std_cxx17): Likewise.
5318 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5320 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5321 message for non-uniform endianness and issue a warning in C++.
5323 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5325 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5326 (Wc++17-compat): Change from undocumented alias to option.
5327 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5328 change C++1z to C++17 in description.
5329 (std=c++1z, std=gnu++1z): Change from option to undocumented
5331 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5333 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5334 * c-opts.c (set_std_cxx1z): Rename to ...
5335 (set_std_cxx17): ... this.
5336 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5337 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5339 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5342 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5344 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5345 function alignment if warn_if_not_aligned_p is true.
5347 2017-09-12 Nathan Sidwell <nathan@acm.org>
5349 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5350 resort_sorted_fields): Move to c/c-decl.c.
5351 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5352 (struct sorted_fields_type): Move to c/c-lang.h.
5354 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5357 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5359 2017-09-04 Marek Polacek <polacek@redhat.com>
5362 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5363 (warn_tautological_cmp): Call it.
5365 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5367 * c-opts.c (c_common_finish): Write dependency information even if
5370 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5373 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5374 (omp_pragmas_simd): ... here.
5375 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5376 create new clauses list containing just simd clause.
5378 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5379 Alan Hayward <alan.hayward@arm.com>
5380 David Sherwood <david.sherwood@arm.com>
5382 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5383 into scalar_mode_supported_p call.
5384 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5386 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5387 Alan Hayward <alan.hayward@arm.com>
5388 David Sherwood <david.sherwood@arm.com>
5390 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5391 for the mode iterator.
5393 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5394 Alan Hayward <alan.hayward@arm.com>
5395 David Sherwood <david.sherwood@arm.com>
5397 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5398 * c-common.c (c_build_vec_perm_expr): Likewise.
5400 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5401 Alan Hayward <alan.hayward@arm.com>
5402 David Sherwood <david.sherwood@arm.com>
5404 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5406 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5407 Alan Hayward <alan.hayward@arm.com>
5408 David Sherwood <david.sherwood@arm.com>
5410 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5411 before calling targetm.addr_space.valid_pointer_mode.
5413 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5414 Alan Hayward <alan.hayward@arm.com>
5415 David Sherwood <david.sherwood@arm.com>
5417 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5419 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5420 Alan Hayward <alan.hayward@arm.com>
5421 David Sherwood <david.sherwood@arm.com>
5423 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5425 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5427 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5428 Alan Hayward <alan.hayward@arm.com>
5429 David Sherwood <david.sherwood@arm.com>
5431 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5434 2017-08-29 Martin Liska <mliska@suse.cz>
5437 * c-common.c (parse_optimize_options): Add argument to function
5439 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5441 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5443 * c-lex.c (interpret_float): Use token location
5444 when building an EXCESS_PRECISION_EXPR.
5446 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5448 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5449 it to check_function_format.
5450 * c-common.h (check_function_arguments): Add vec<location_t> *
5452 (check_function_format): Likewise.
5453 * c-format.c (struct format_check_context): Add field "arglocs".
5454 (check_function_format): Add param "arglocs"; pass it to
5456 (check_format_info): Add param "arglocs"; use it to initialize
5457 new field of format_ctx.
5458 (check_format_arg): Pass format_ctx->arglocs to new param of
5459 check_format_info_main.
5460 (class argument_parser): New field "arglocs".
5461 (argument_parser::argument_parser): Add "arglocs_" param and use
5462 it to initialize new field.
5463 (argument_parser::check_argument_type): Pass new arglocs field to
5465 (check_format_info_main): Add param "arglocs", and use it when
5466 constructing arg_parser.
5467 (check_format_types): Add param "arglocs"; use it if non-NULL when
5468 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5470 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5473 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5474 (c_common_attribute_table): Add warn_if_not_aligned.
5475 (handle_aligned_attribute): Renamed to ...
5476 (common_handle_aligned_attribute): Remove argument, name, and add
5477 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5478 (handle_aligned_attribute): New.
5479 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5481 2017-08-14 Martin Sebor <msebor@redhat.com>
5484 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5485 (handle_nonstring_attribute): New function.
5487 2017-08-14 Martin Sebor <msebor@redhat.com>
5490 * c-format.h (T89_G): New macro.
5491 * c-format.c (local_gcall_ptr_node): New variable.
5492 (init_dynamic_diag_info): Initialize it.
5494 2017-08-11 Martin Liska <mliska@suse.cz>
5496 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5497 TARGET_SUPPORTS_ALIASES.
5499 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5501 * c-common.c (c_parse_error): Add rich_location * param, using it
5502 rather implicitly using input_location.
5503 * c-common.h (c_parse_error): Add rich_location * param.
5505 2017-08-09 Marek Polacek <polacek@redhat.com>
5507 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5508 (c_common_truthvalue_conversion): Likewise.
5509 * c-omp.c (c_finish_omp_atomic): Likewise.
5510 * c-common.h (build_binary_op): Update declaration.
5512 2017-08-08 Martin Liska <mliska@suse.cz>
5514 * c-ada-spec.c: Include header files.
5515 * c-ubsan.c: Likewise.
5516 * c-warn.c: Likewise.
5518 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5521 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5523 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5525 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5526 (print_ada_methods): Likewise.
5527 (print_ada_declaration): Likewise.
5529 2017-08-07 Martin Liska <mliska@suse.cz>
5531 * array-notation-common.c: Add new includes.
5532 * c-format.c( handle_format_attribute): Canonicalize a format
5534 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5536 * c-pretty-print.c: Add new include.
5538 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5540 * c-ada-spec.c (has_static_fields): Look only into variables.
5541 (print_constructor): Add TYPE parameter and use it for the name.
5542 (print_destructor): Likewise.
5543 (print_ada_declaration): Adjust to new constructor/destructor names.
5544 Adjust calls to print_constructor and print_destructor.
5545 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5546 Look only into variables in the final loop.
5548 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5550 * c-ada-spec.c (has_static_fields): Look only into fields.
5551 (dump_generic_ada_node): Small tweak.
5552 (dump_nested_types): Look only into fields.
5553 (print_ada_declaration): Look only into methods. Small tweak.
5554 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5556 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5558 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5559 (dump_ada_function_declaration): Likewise.
5560 (dump_generic_ada_node): Likewise.
5561 (print_ada_declaration): Add support for const-qualified variables.
5563 2017-07-31 Martin Liska <mliska@suse.cz>
5566 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5567 Guard condition with flag_sanitize_p also with current_function_decl
5569 (ubsan_maybe_instrument_reference_or_call): Likewise.
5571 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
5573 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5575 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5577 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5579 (print_ada_declaration): Add missing guard for record types.
5581 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5584 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5585 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5586 new COMPOUND_EXPRs around the rhs of the comparison.
5588 2017-07-27 Marek Polacek <polacek@redhat.com>
5591 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5594 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5596 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5597 (handle_noipa_attribute): New function.
5599 2017-07-07 Torsten Duwe <duwe@suse.de>
5601 * c-attribs.c (c_common_attribute_table): Add entry for
5602 "patchable_function_entry".
5604 2017-07-20 Nathan Sidwell <nathan@acm.org>
5606 Remove TYPE_METHODS.
5607 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5608 dump_ada_template, print_ada_methods,
5609 print_ada_declaration): Member fns are on TYPE_FIELDS.
5611 2017-07-18 Nathan Sidwell <nathan@acm.org>
5613 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5615 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5617 * c-common.c (try_to_locate_new_include_insertion_point): New
5619 (per_file_includes_t): New typedef.
5620 (added_includes_t): New typedef.
5621 (added_includes): New variable.
5622 (maybe_add_include_fixit): New function.
5623 * c-common.h (maybe_add_include_fixit): New decl.
5625 2017-07-10 Martin Sebor <msebor@redhat.com>
5628 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5630 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5632 * c-common.c (selftest::c_family_tests): New.
5633 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5634 (selftest::c_family_tests): New decl.
5636 2017-07-04 Marek Polacek <polacek@redhat.com>
5639 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5642 2017-07-04 Marek Polacek <polacek@redhat.com>
5644 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5646 2017-06-28 Martin Liska <mliska@suse.cz>
5649 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5650 to a function declaration.
5652 2017-06-28 Martin Liska <mliska@suse.cz>
5655 * c.opt: Add IntegerRange to various options.
5657 2017-06-26 Marek Polacek <polacek@redhat.com>
5660 * c-common.h (warn_for_multistatement_macros): Declare.
5661 * c-warn.c: Include "c-family/c-indentation.h".
5662 (warn_for_multistatement_macros): New function.
5663 * c.opt (Wmultistatement-macros): New option.
5664 * c-indentation.c (guard_tinfo_to_string): No longer static.
5665 Change the parameter type to "enum rid". Handle RID_SWITCH.
5666 * c-indentation.h (guard_tinfo_to_string): Declare.
5668 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5670 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5672 2017-06-15 Martin Sebor <msebor@redhat.com>
5675 * c.opt (-Wclass-memaccess): New option.
5677 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5679 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5681 2017-06-13 Marek Polacek <polacek@redhat.com>
5684 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5687 2017-06-13 Martin Liska <mliska@suse.cz>
5690 * c-attribs.c (add_no_sanitize_value): New function.
5691 (handle_no_sanitize_attribute): Likewise.
5692 (handle_no_sanitize_address_attribute): Use the function.
5693 (handle_no_sanitize_thread_attribute): New function.
5694 (handle_no_address_safety_analysis_attribute): Use
5695 add_no_sanitize_value.
5696 (handle_no_sanitize_undefined_attribute): Likewise.
5697 * c-common.h: Declare new functions.
5698 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5699 (ubsan_instrument_shift): Likewise.
5700 (ubsan_instrument_bounds): Likewise.
5701 (ubsan_maybe_instrument_array_ref): Likewise.
5702 (ubsan_maybe_instrument_reference_or_call): Likewise.
5704 2017-06-11 Jason Merrill <jason@redhat.com>
5706 * c-ada-spec.c, c-pragma.c: Use id_equal.
5708 2017-06-04 Marek Polacek <polacek@redhat.com>
5711 * c-format.c (matching_type_p): Return false if any of the types
5712 requires structural equality.
5714 2017-06-02 Martin Sebor <msebor@redhat.com>
5717 * c-warn.c (conversion_warning): Use -Wconversion for integer
5718 conversion and -Wfloat-conversion for floating one.
5720 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5722 * c.opt (Wsizeof-pointer-div): New warning option.
5724 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5726 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5727 (Wcatch-value=1): Enable by -Wall.
5729 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5731 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5733 * c.opt (fdiagnostics-show-template-tree): New option.
5734 (felide-type): New option.
5736 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5738 * c.opt (Wcatch-value=): New C++ warning flag.
5740 2017-05-24 Nathan Sidwell <nathan@acm.org>
5742 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5743 const casts to avoid warning.
5745 2017-05-24 Martin Sebor <msebor@redhat.com>
5748 * c-common.h (unsafe_conversion_p): Add a function argument.
5749 * c-common.c (unsafe_conversion_p): Same.
5750 Add type names and values to diagnostics.
5751 (scalar_to_vector): Adjust.
5752 * c-warn.c (constant_expression_error): Add a function argument.
5753 Add type names and values to diagnostics.
5754 (conversion_warning): Add a function argument.
5755 Add type names and values to diagnostics.
5756 (warnings_for_convert_and_check): Same.
5758 2017-05-19 Jason Merrill <jason@redhat.com>
5760 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5763 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5765 * c-format.c (locus): Move out of function scope,
5768 2017-05-19 Nathan Sidwell <nathan@acm.org>
5770 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5771 (c_common_parse_file): Remove class dump handling.
5772 (get_dump_info): Likewise.
5774 2017-05-19 Richard Biener <rguenther@suse.de>
5777 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5778 to alias-set zero memory.
5780 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5782 * c-format.c (local_tree_type_node): Add GTY attribute.
5784 2017-05-18 Marek Polacek <polacek@redhat.com>
5786 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5787 (c_common_fixed_point_type_for_size): Likewise.
5788 (c_common_type_for_mode): Likewise.
5789 (shorten_compare): Likewise.
5790 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5791 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5793 2017-05-18 Marek Polacek <polacek@redhat.com>
5795 * c-common.c (self_promoting_args_p): Change the return type to bool.
5796 Use false/true instead of 0/1.
5797 * c-common.h (self_promoting_args_p): Update.
5799 2017-05-17 Marek Polacek <polacek@redhat.com>
5801 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5802 * c-warn.c: Likewise.
5804 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5806 Implement new C++ intrinsics __is_assignable and __is_constructible.
5807 * c-common.c (__is_assignable, __is_constructible): New.
5808 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5810 2017-05-17 Martin Liska <mliska@suse.cz>
5812 * c-common.h: Introduce dump_flags_t type and
5813 use it instead of int type.
5814 * c-gimplify.c (c_genericize): Likewise.
5815 * c-opts.c: Likewise.
5817 2017-05-17 Marek Polacek <polacek@redhat.com>
5819 * c-common.c (c_save_expr): Remove.
5820 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5821 * c-common.h (c_save_expr): Remove declaration.
5823 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5826 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5827 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5828 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5829 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5831 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5833 2017-05-09 Marek Polacek <polacek@redhat.com>
5836 * c-warn.c (unwrap_c_maybe_const): New.
5837 (warn_logical_operator): Call it.
5839 2017-05-09 Nathan Sidwell <nathan@acm.org>
5841 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5842 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5844 2017-05-08 Martin Sebor <msebor@redhat.com>
5846 PR translation/80280
5847 * c-format.h (struct format_flag_spec): Add new member.
5849 * c-format.c (local_tree_type_node): New global.
5850 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5851 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5852 (strfmon_flag_specs): Likewise.
5853 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5854 with distinct quoting properties.
5855 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5856 (flag_chars_t::validate): Add argument and handle bad quoting.
5857 (check_format_info_main): Handle quoting problems.
5858 (init_dynamic_diag_info): Simplify.
5860 2017-05-08 Jason Merrill <jason@redhat.com>
5862 * c-opts.c (c_common_post_options): Update defaults for
5863 flag_abi_version and flag_abi_compat_version.
5865 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5867 * c-common.c (c_cpp_error): Replace report_diagnostic
5868 with diagnostic_report_diagnostic.
5870 2017-05-04 Martin Sebor <msebor@redhat.com>
5872 PR translation/80280
5873 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5874 (handle_weakref_attribute): Same.
5876 2017-05-03 Nathan Sidwell <nathan@acm.org>
5878 Canonicalize canonical type hashing
5879 * c-common.c (complete_array_type): Use type_hash_canon.
5881 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5884 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5886 (cilk_install_body_pedigree_operations): Likewise.
5887 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5889 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5890 (cilk_install_body_pedigree_operations): Likewise.
5891 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5894 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5897 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5898 flag on non-aggregate element types.
5900 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5902 * c-common.c (c_type_hasher, type_hash_table): Remove.
5903 (c_common_get_alias_set): Remove unreachable code.
5904 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5906 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5908 * c.opt (Wextra-semi): New C++ warning flag.
5910 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5913 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5915 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5919 * c-common.c (c_common_type_for_mode): Don't handle
5920 widest_*_literal_type_node here.
5921 c_common_signed_or_unsigned_type): Likewise.
5922 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5923 to *intTI_type_node or *intDI_type_node depending on whether
5924 TImode is supported by the target or not.
5926 2017-04-10 Martin Liska <mliska@suse.cz>
5929 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5930 doing an UBSAN check.
5932 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5934 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5936 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5939 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5941 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5942 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5945 2017-03-31 David Malcolm <dmalcolm@redhat.com>
5947 PR documentation/78732
5948 * c.opt (Wendif-labels): Fix description to refer to
5949 #else rather than #elif.
5951 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5954 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5955 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5957 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5960 * c-common.c (c_common_mark_addressable_vec): Don't set
5961 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5963 2017-03-21 Martin Sebor <msebor@redhat.com>
5966 * c-common.c (set_underlying_type): Mark type used only when
5967 original del is declared unused.
5969 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5971 PR translation/79848
5972 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5975 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5978 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5979 from inform's message, so that xgettext can locate it.
5981 2017-03-09 Marek Polacek <polacek@redhat.com>
5985 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5986 conversion to the attribute list.
5988 2017-03-09 Martin Liska <mliska@suse.cz>
5990 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5992 2017-03-03 Jason Merrill <jason@redhat.com>
5994 * c.opt (Wnoexcept-type): New.
5996 2017-03-02 Richard Biener <rguenther@suse.de>
5999 * c-common.c (c_common_mark_addressable_vec): Look through
6002 2017-02-28 Martin Liska <mliska@suse.cz>
6004 * c.opt: Replace space with tabular for options of <number>
6007 2017-02-28 Martin Liska <mliska@suse.cz>
6009 * c.opt: Fix --help=option -Q for options which are of
6012 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6015 * c-common.c (check_function_restrict): New function.
6016 (check_function_arguments): Add FNDECL argument. Call
6017 check_function_restrict if -Wrestrict.
6018 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6019 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6020 * c-common.h (check_function_arguments): Add FNDECL argument.
6021 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6023 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6025 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6026 treatment of parameters with pointer-to-tagged type and tidy up.
6027 (print_ada_methods): Remove the special treatment of C++ static member
6030 2017-02-22 Martin Liska <mliska@suse.cz>
6032 * c.opt: Replace inequality signs with square brackets
6035 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6038 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6041 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6043 * c-cppbuiltin.c (builtin_define_float_constants): Define
6044 __DECIMAL_DIG__ to the value for long double.
6046 2017-02-15 Marek Polacek <polacek@redhat.com>
6049 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6050 conversion has occured.
6052 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6054 * c-common.c (c_common_reswords): Add "__RTL".
6055 * c-common.h (enum rid): Add RID_RTL.
6057 2017-01-20 Marek Polacek <polacek@redhat.com>
6060 * c-common.h (do_warn_duplicated_branches_r): Declare.
6061 * c-gimplify.c (c_genericize): Walk the function tree calling
6062 do_warn_duplicated_branches_r.
6063 * c-warn.c (expr_from_macro_expansion_r): New.
6064 (do_warn_duplicated_branches): New.
6065 (do_warn_duplicated_branches_r): New.
6066 * c.opt (Wduplicated-branches): New option.
6068 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6071 * c-indentation.c (warn_for_misleading_indentation): Use the past
6072 subjunctive in the note.
6074 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6077 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6078 start type to integer_type.
6080 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6083 * c.opt (gen-decls): Add Driver flag.
6085 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6088 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6091 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6093 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6096 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6098 2017-01-12 Martin Sebor <msebor@redhat.com>
6100 (-Wformat-overflow): ...to this.
6102 2017-01-11 Martin Sebor <msebor@redhat.com>
6105 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6106 Also enable for LTO.
6108 2017-01-10 Jason Merrill <jason@redhat.com>
6110 Implement P0195R2, C++17 variadic using.
6111 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6113 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6115 PR translation/79019
6116 PR translation/79020
6117 * c.opt (Wnormalized=): Fix typo in description.
6119 2017-01-08 Martin Sebor <msebor@redhat.com>
6122 * c.opt (-Wformat-truncation): New option.
6124 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6126 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6127 value to unsigned short to fit in 4 hex digits without
6130 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6132 * c.opt (fsso-struct): Add 'native' value.
6134 2017-01-05 Martin Liska <mliska@suse.cz>
6137 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6140 2017-01-04 Marek Polacek <polacek@redhat.com>
6143 * c.opt (Wpointer-compare): New option.
6145 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6148 * c.opt (fsso-struct=): Add RejectNegative.
6150 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6152 Update copyright years.
6154 2016-12-29 Martin Liska <mliska@suse.cz>
6157 * c.opt (strong-eval-order): Add RejectNegative keyword.
6159 2016-12-22 Jason Merrill <jason@redhat.com>
6161 Implement P0522R0, matching of template template arguments.
6162 * c-cppbuiltin.c (c_cpp_builtins): Define
6163 __cpp_template_template_args.
6165 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6168 * c-common.c (struct nonnull_arg_ctx): New type.
6169 (check_function_nonnull): Return bool instead of void. Use
6170 nonnull_arg_ctx as context rather than just location_t.
6171 (check_nonnull_arg): Adjust for the new context type, set
6172 warned_p to true if a warning has been diagnosed.
6173 (check_function_arguments): Return bool instead of void.
6174 * c-common.h (check_function_arguments): Adjust prototype.
6176 2016-12-21 Jason Merrill <jason@redhat.com>
6178 * c.opt (-fnew-ttp-matching): New flag.
6179 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6181 2016-12-14 Martin Jambor <mjambor@suse.cz>
6183 * c-omp.c: Include omp-general.h instead of omp-low.h.
6184 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6187 2016-12-14 Martin Sebor <msebor@redhat.com>
6190 * c-common.c (check_nonnull_arg): Disable when optimization
6193 2016-12-12 Marek Polacek <polacek@redhat.com>
6196 * c-common.c (attribute_fallthrough_p): Return false for
6199 2016-12-08 Martin Sebor <msebor@redhat.com>
6202 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6204 2016-12-08 Martin Sebor <msebor@redhat.com>
6207 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6210 2016-12-07 Martin Sebor <msebor@redhat.com>
6216 * c.opt (-Wstringop-overflow): New option.
6218 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6220 * c-attribs.c (asan odr indicator): New attribute.
6221 (handle_asan_odr_indicator_attribute): New function.
6223 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6225 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6228 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6230 * c-common.c (excess_precision_mode_join): New.
6231 (c_ts18661_flt_eval_method): New.
6232 (c_c11_flt_eval_method): Likewise.
6233 (c_flt_eval_method): Likewise.
6234 * c-common.h (excess_precision_mode_join): New.
6235 (c_flt_eval_method): Likewise.
6236 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6237 (cpp_iec_559_value): Call it.
6238 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6239 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6240 __FLT_EVAL_METHOD_TS_18661_3__.
6242 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6244 * c-opts.c (c_common_post_options): Add logic to handle the default
6245 case for -fpermitted-flt-eval-methods.
6247 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6249 * c.opt (Wexpansion-to-defined): New.
6251 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6254 * c-pragma.c (handle_pragma_target): Don't replace
6255 current_target_pragma, but chainon the new args to the current one.
6257 2016-11-22 Nathan Sidwell <nathan@acm.org>
6259 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6260 indentation and formatting.
6262 2016-11-21 Martin Sebor <msebor@redhat.com>
6264 * c.opt (-fprintf-return-value): Enable by default.
6266 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6269 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6270 * c-common.c (c_common_nodes_and_builtins): Initialize
6271 const_tm_ptr_type_node.
6273 2016-11-16 Marek Polacek <polacek@redhat.com>
6276 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6278 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6280 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6282 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6283 Richard Biener <rguenther@suse.de>
6285 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6286 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6287 * c.opt (fgimple): New option.
6289 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6292 * c-common.h (warn_for_restrict): Declare.
6293 * c-warn.c: Include gcc-rich-location.h.
6294 (warn_for_restrict): New function.
6295 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6296 (gcc_cdiag_char_table): Likewise.
6297 (gcc_cxxdiag_char_table): Likewise.
6298 * c.opt (Wrestrict): New option.
6300 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6302 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6303 for nested types only if the type is a record or union and dump SLOC.
6305 2016-11-09 Jason Merrill <jason@redhat.com>
6307 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6309 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6311 * c-ubsan.c (ubsan_instrument_shift): Handle split
6312 -fsanitize=shift-base and -fsanitize=shift-exponent.
6314 2016-11-07 Jason Merrill <jason@redhat.com>
6316 * c.opt (Wc++1z-compat): New.
6317 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6319 2016-11-07 Martin Liska <mliska@suse.cz>
6321 * c-warn.c (warn_for_unused_label): Save all labels used
6322 in goto or in &label.
6324 2016-11-03 Jason Merrill <jason@redhat.com>
6326 * c-cppbuiltin.c (c_cpp_builtins): Correct
6327 __cpp_inheriting_constructors.
6329 2016-11-01 Jason Merrill <jason@redhat.com>
6331 * c-cppbuiltin.c (c_cpp_builtins): Update
6332 __cpp_inheriting_constructors.
6334 * c.opt (-fnew-inheriting-ctors): New.
6335 * c-opts.c: Default to on for ABI 11+.
6337 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6340 * c.opt (fext-numeric-literals): Add Var and Init.
6341 * c-opts.c (c_common_handle_option): Don't clear
6342 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6343 (c_common_post_options): Clear it here if not set
6346 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6349 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6352 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6354 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6355 * c-common.c (c_common_reswords): Add __builtin_launder.
6357 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6359 * c-common.c (c_common_truthvalue_conversion): Warn for
6360 multiplications in boolean context. Fix the quoting of '<<' and '<'
6361 in the shift warning.
6363 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6365 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6367 2016-10-20 Jason Merrill <jason@redhat.com>
6369 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6371 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6373 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6374 integer shift ops in boolean context.
6376 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
6378 * c.opt (Walloca): New.
6379 (Walloca-larger-than=): New.
6380 (Wvla-larger-than=): New.
6382 2016-10-17 Marek Polacek <polacek@redhat.com>
6384 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6385 Return immediately when finding a match.
6386 (warn_tautological_cmp): Remove a boolean variable that is no longer
6389 2016-10-17 Marek Polacek <polacek@redhat.com>
6391 * c-attribs.c: New file.
6392 * c-common.c: Move attributes handling to c-attribs.c.
6393 (get_nonnull_operand): No longer static.
6394 * c-common.h: Move the declarations from c-attribs.c to its own section.
6396 2016-10-14 Jason Merrill <jason@redhat.com>
6398 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6399 and __cpp_deduction_guides.
6401 2016-10-13 Jason Merrill <jason@redhat.com>
6403 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6405 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6407 * c-cppbuiltin.c: Include memmodel.h.
6408 * c-opts.c: Likewise.
6409 * c-pragma.c: Likewise.
6410 * c-warn.c: Likewise.
6412 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6414 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6415 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6416 * c-opts.c (sanitize_cpp_opts): Initialize
6417 cpp_opts->cpp_warn_implicit_fallthrough.
6419 2016-10-11 Marek Polacek <polacek@redhat.com>
6421 * c-common.c (warning_candidate_p): Change the return type to bool
6422 and return true/false instead of 1/0.
6423 (vector_mode_valid_p): Likewise.
6425 2016-10-11 Marek Polacek <polacek@redhat.com>
6427 * c-common.c (fold_for_warn): No longer static.
6428 (bool_promoted_to_int_p): Likewise.
6429 (c_common_get_narrower): Likewise.
6430 (constant_expression_warning): Move to c-warn.c.
6431 (constant_expression_error): Likewise.
6432 (overflow_warning): Likewise.
6433 (warn_logical_operator): Likewise.
6434 (find_array_ref_with_const_idx_r): Likewise.
6435 (warn_tautological_cmp): Likewise.
6436 (expr_has_boolean_operands_p): Likewise.
6437 (warn_logical_not_parentheses): Likewise.
6438 (warn_if_unused_value): Likewise.
6439 (strict_aliasing_warning): Likewise.
6440 (sizeof_pointer_memaccess_warning): Likewise.
6441 (check_main_parameter_types): Likewise.
6442 (conversion_warning): Likewise.
6443 (warnings_for_convert_and_check): Likewise.
6444 (match_case_to_enum_1): Likewise.
6445 (match_case_to_enum): Likewise.
6446 (c_do_switch_warnings): Likewise.
6447 (warn_for_omitted_condop): Likewise.
6448 (readonly_error): Likewise.
6449 (lvalue_error): Likewise.
6450 (invalid_indirection_error): Likewise.
6451 (warn_array_subscript_with_type_char): Likewise.
6452 (warn_about_parentheses): Likewise.
6453 (warn_for_unused_label): Likewise.
6454 (warn_for_div_by_zero): Likewise.
6455 (warn_for_memset): Likewise.
6456 (warn_for_sign_compare): Likewise.
6457 (do_warn_double_promotion): Likewise.
6458 (do_warn_unused_parameter): Likewise.
6459 (record_locally_defined_typedef): Likewise.
6460 (maybe_record_typedef_use): Likewise.
6461 (maybe_warn_unused_local_typedefs): Likewise.
6462 (maybe_warn_bool_compare): Likewise.
6463 (maybe_warn_shift_overflow): Likewise.
6464 (warn_duplicated_cond_add_or_warn): Likewise.
6465 (diagnose_mismatched_attributes): Likewise.
6466 * c-common.h: Move the declarations from c-warn.c to its own section.
6467 * c-warn.c: New file.
6469 2016-10-08 Jason Merrill <jason@redhat.com>
6471 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6472 into COND_EXPR in C++.
6474 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6476 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6477 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6478 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6480 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6482 Implement LWG2296 helper intrinsic
6483 * c-common.h (enum rid): Add RID_ADDRESSOF.
6484 * c-common.c (c_common_reswords): Add __builtin_addressof.
6486 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6489 * c-common.c (c_common_truthvalue_conversion): Warn also for
6490 suspicious enum values in boolean context.
6492 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6494 Implement P0258R2 - helper for C++17
6495 std::has_unique_object_representations trait
6496 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6497 * c-common.c (c_common_reswords): Add
6498 __has_unique_object_representations.
6500 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6503 * c-ubsan.c (ubsan_instrument_return): Don't call
6504 initialize_sanitizer_builtins here.
6506 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6508 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6509 conditional expression in boolean context when only one arm is
6512 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6515 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6518 * c-common.c (c_common_reswords): Update comment for C++11.
6520 2016-10-04 Jason Merrill <jason@redhat.com>
6522 * c-common.c (make_tree_vector_from_ctor): New.
6523 * c-common.h: Declare it.
6525 2016-10-04 Jakub Jelinek <jakub@redhat.com>
6527 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6528 __LIBGCC_JCR_SECTION_NAME__.
6530 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6532 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6533 left shift in boolean context.
6535 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6537 Implement P0001R1 - C++17 removal of register storage class specifier
6538 * c.opt (Wregister): New warning.
6539 * c-opts.c (c_common_post_options): Enable -Wregister by
6542 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6544 * c-opts.c (c_common_post_options): Remove special case for
6545 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6548 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6550 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6553 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6555 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6557 * c-common.c: Include memmodel.h.
6559 2016-09-26 Marek Polacek <polacek@redhat.com>
6561 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6563 2016-09-26 Marek Polacek <polacek@redhat.com>
6566 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6567 (handle_fallthrough_attribute): New function.
6568 (attribute_fallthrough_p): New function.
6569 * c-common.h (attribute_fallthrough_p): Declare.
6571 2016-09-24 Marek Polacek <polacek@redhat.com>
6574 * c.opt (Wbool-operation): New.
6576 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6578 * c-common.c (c_common_truthvalue_conversion): Inhibit
6579 Wint-in-bool-context warning with from_macro_definition_at.
6580 Mention the expression will always evaluate to true.
6582 2016-09-21 Martin Sebor <msebor@redhat.com>
6585 * c.opt (fprintf-return-value): Temporarily initialize to zero
6586 to unblock bootstrap failures.
6588 2016-09-21 Jakub Jelinek <jakub@redhat.com>
6591 * c.opt (Waligned-new=): Add RejectNegative.
6592 (faligned-new=): Likewise. Spelling fix - change
6593 aligned_new_threshhold to aligned_new_threshold.
6594 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6595 to aligned_new_threshold.
6597 2016-09-20 Martin Sebor <msebor@redhat.com>
6600 * c.opt: Add -Wformat-length and -fprintf-return-value.
6602 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6605 * c.opt (Wint-in-bool-context): New warning.
6606 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6607 constants in boolean context.
6609 2016-09-19 Joseph Myers <joseph@codesourcery.com>
6611 * c-common.c (max_align_t_align): Also consider alignment of
6614 2016-09-15 Jason Merrill <jason@redhat.com>
6616 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6619 2016-09-14 Jason Merrill <jason@redhat.com>
6621 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6622 limit FIELD_DECL, either.
6624 2016-09-14 Marek Polacek <polacek@redhat.com>
6626 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6627 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6628 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6630 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6632 * c-common.c (warn_logical_not_parentheses): Replace
6633 rich_location::add_fixit_insert calls with add_fixit_insert_before
6634 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6636 2016-09-13 Jason Merrill <jason@redhat.com>
6637 Tom de Vries <tom@codesourcery.com>
6640 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6642 2016-09-13 Jason Merrill <jason@redhat.com>
6644 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6647 2016-09-12 Jason Merrill <jason@redhat.com>
6649 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6650 bit/byte confusion, allow large alignment for types.
6652 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6655 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6657 2016-09-12 David Malcolm <dmalcolm@redhat.com>
6660 * c-format.c (argument_parser::check_argument_type): Add params
6661 "type_start" and "conversion_char". Use the former to generate
6662 offset_to_type_start and pass it and conversion_char to
6664 (check_format_info_main): Capture the start of the type
6665 information as "type_start", and pass it an format_char
6666 to arg_parser.check_argument_type.
6667 (check_format_types): Provide an example in the leading comment.
6668 Add params "offset_to_type_start" and "conversion_char"; pass
6669 them to format_type_warning calls.
6670 (test_get_modifier_for_format_len): Likewise.
6671 (matching_type_p): New function.
6672 (get_format_for_type): Add param "conversion_char" and move
6673 implementation into...
6674 (get_format_for_type_1): ...new function, called twice.
6675 Use new function matching_type_p rather than checking for
6676 TYPE_CANONICAL equality.
6677 (get_corrected_substring): New function.
6678 (format_type_warning): Provide an example in the leading comment.
6679 Add params "offset_to_type_start" and "conversion_char". Replace
6680 call to get_format_for_type with call to get_corrected_substring
6681 and move rejection of hints for widths/precisions there.
6682 (assert_format_for_type_streq): Add param "conversion_char".
6683 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6684 (test_get_format_for_type_printf): Add conversion chars to the
6685 tests, adding coverage for various combinations of integer
6686 vs double conversions, and for preserving octal and hexadecimal
6688 (test_get_format_for_type_scanf): Add conversion chars to the
6691 2016-09-10 Tom de Vries <tom@codesourcery.com>
6694 * c-common.c (build_va_arg): Handle more strict
6695 targetm.canonical_va_list_type. Replace first argument type error with
6698 2016-09-09 Martin Sebor <msebor@redhat.com>
6702 * c-format.c (argument_parser::find_format_char_info): Use %qc
6703 format directive unconditionally.
6705 2016-09-09 Jason Merrill <jason@redhat.com>
6707 Implement C++17 new of over-aligned types.
6708 * c.opt: Add -faligned-new and -Waligned-new.
6709 * c-common.c (max_align_t_align): Split out from...
6710 (cxx_fundamental_alignment_p): ...here.
6711 * c-common.h: Declare it.
6712 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6714 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6716 * c-cppbuiltin.c (builtin_define_type_width): New function.
6717 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6720 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6722 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6724 (substring_loc::get_location): Move to substring-locations.c,
6725 keeping implementation as...
6726 (c_get_substring_location): New function, from the above, reworked
6727 to use accessors rather than member lookup.
6728 * c-common.h (class substring_loc): Move to substring-locations.h,
6729 replacing with a forward decl.
6730 (c_get_substring_location): New decl.
6731 * c-format.c: Include "substring-locations.h".
6732 (format_warning_va): Move to substring-locations.c.
6733 (format_warning_at_substring): Likewise.
6735 2016-09-06 Martin Sebor <msebor@redhat.com>
6738 * c-format.c (check_function_format): Avoid issuing warnings for
6739 functions unless they call format functions with non-constant
6742 2016-09-06 Richard Biener <rguenther@suse.de>
6745 * c-common.c (c_common_mark_addressable_vec): Handle
6746 COMPOUND_LITERAL_EXPR.
6748 2016-09-05 Marek Polacek <polacek@redhat.com>
6751 * c-common.c (bool_promoted_to_int_p): New function.
6752 (expr_has_boolean_operands_p): New function.
6753 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6754 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6756 2016-09-04 Tom de Vries <tom@codesourcery.com>
6759 2016-08-29 Tom de Vries <tom@codesourcery.com>
6761 * c-common.c (build_va_arg): Replace first argument type error
6764 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6767 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6768 (c_finish_omp_for): Reject _Atomic qualified iterators.
6770 2016-09-01 Martin Sebor <msebor@redhat.com>
6772 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6773 size to guarantee it fits the output of the formatted function
6774 regardless of its arguments.
6776 2016-09-01 Marek Polacek <polacek@redhat.com>
6779 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6782 2016-08-29 Marek Polacek <polacek@redhat.com>
6785 * c-common.c (warn_logical_not_parentheses): Don't warn for
6786 a comparison or a logical operator.
6788 2016-08-29 Tom de Vries <tom@codesourcery.com>
6790 * c-common.c (build_va_arg): Fix type comparison assert.
6792 2016-08-29 Tom de Vries <tom@codesourcery.com>
6794 * c-common.c (build_va_arg): Replace first argument type error
6797 2016-08-29 Tom de Vries <tom@codesourcery.com>
6800 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6801 with error_mark_node as va_list instead of with illegal va_list.
6803 2016-08-25 Marek Polacek <polacek@redhat.com>
6804 David Malcolm <dmalcolm@redhat.com>
6806 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6807 * c-common.h (warn_logical_not_parentheses): Update declaration.
6809 2016-08-22 Marek Polacek <polacek@redhat.com>
6812 * c-common.c (warn_for_memset): Check type for null.
6814 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6816 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6817 _FloatNx types for suffixes for built-in functions.
6819 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6822 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6823 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6824 (RID_FLOAT128X): New enum rid values.
6825 (CASE_RID_FLOATN_NX): New macro.
6826 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6828 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6829 corresponding complex types.
6830 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6831 _FloatNx and corresponding complex types.
6832 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6833 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6834 and _FloatNx types for the widest type for determining
6835 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6836 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6837 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6839 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6841 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6844 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6846 * c-opts.c (c_diagnostic_finalizer): Update for change to
6847 diagnostic_show_locus.
6849 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6851 * c-common.c: Include "spellcheck.h".
6852 (cb_get_suggestion): New function.
6853 * c-common.h (cb_get_suggestion): New decl.
6854 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6857 2016-08-18 Marek Polacek <polacek@redhat.com>
6860 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6863 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6866 * c-common.c (substring_loc::get_range): Rename to...
6867 (substring_loc::get_location): ...this, converting param from a
6868 source_range * to a location_t *. Call
6869 get_source_location_for_substring rather than
6870 get_source_range_for_substring, and pass in m_caret_idx.
6871 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6872 (substring_loc::get_range): Replace with...
6873 (substring_loc::get_location): ...this.
6874 (substring_loc::set_caret_index): New method.
6875 (substring_loc): Add field m_caret_idx.
6876 * c-format.c (format_warning_va): Update for above changes.
6877 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6878 clashing with type name.
6879 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6880 (check_argument_type): Likewise.
6881 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6882 Use a copy when emitting warnings, setting the caret index from TYPE.
6884 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6885 Arnaud Charlet <charlet@adacore.com>
6887 * c-ada-spec.c (dump_number): New function.
6888 (handle_escape_character): Likewise.
6889 (print_ada_macros): Add handling of constant integers and strings.
6891 2016-08-12 Marek Polacek <polacek@redhat.com>
6894 * c-common.c (scalar_to_vector): Adjust fall through comment.
6895 * c-opts.c (c_common_handle_option): Likewise.
6896 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6897 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6898 fall through comment.
6899 * cilk.c (extract_free_variables): Add FALLTHRU.
6901 2016-08-10 Jason Merrill <jason@redhat.com>
6903 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6905 2016-08-09 Jason Merrill <jason@redhat.com>
6907 * c-common.c (c_common_attribute_table): vector_size affects type
6910 2016-08-09 Marek Polacek <polacek@redhat.com>
6913 * c-ada-spec.c (dump_generic_ada_node): Add return.
6915 2016-08-09 Jason Merrill <jason@redhat.com>
6917 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6918 C++17 constexpr lambdas.
6920 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6923 * c-common.h (selftest::c_format_c_tests): New declaration.
6924 (selftest::run_c_tests): New declaration.
6925 * c-format.c: Include "selftest.h.
6926 (format_warning_va): Add param "corrected_substring" and use
6927 it to add a replacement fix-it hint.
6928 (format_warning_at_substring): Likewise.
6929 (format_warning_at_char): Update for new param of
6931 (argument_parser::check_argument_type): Pass "fki" to
6933 (check_format_types): Add param "fki" and pass it to
6934 format_type_warning.
6935 (deref_n_times): New function.
6936 (get_modifier_for_format_len): New function.
6937 (selftest::test_get_modifier_for_format_len): New function.
6938 (get_format_for_type): New function.
6939 (format_type_warning): Add param "fki" and use it to attempt
6940 to provide hints for argument types when calling
6941 format_warning_at_substring.
6942 (selftest::get_info): New function.
6943 (selftest::assert_format_for_type_streq): New function.
6944 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6945 (selftest::test_get_format_for_type_printf): New function.
6946 (selftest::test_get_format_for_type_scanf): New function.
6947 (selftest::c_format_c_tests): New function.
6949 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6952 * c-format.c: Include "diagnostic.h".
6953 (location_column_from_byte_offset): Delete.
6954 (location_from_offset): Delete.
6955 (format_warning_va): New function.
6956 (format_warning_at_substring): New function.
6957 (format_warning_at_char): New function.
6958 (check_format_arg): Capture location of format_tree and pass to
6959 check_format_info_main.
6960 (argument_parser): Add fields "start_of_this_format" and
6961 "format_string_cst".
6962 (flag_chars_t::validate): Add param "format_string_cst". Convert
6963 warning_at call using location_from_offset to call to
6964 format_warning_at_char.
6965 (argument_parser::argument_parser): Add param "format_string_cst_"
6966 and use use it to initialize field "format_string_cst".
6967 Initialize new field "start_of_this_format".
6968 (argument_parser::read_format_flags): Convert warning_at call
6969 using location_from_offset to a call to format_warning_at_char.
6970 (argument_parser::read_any_format_left_precision): Likewise.
6971 (argument_parser::read_any_format_precision): Likewise.
6972 (argument_parser::read_any_other_modifier): Likewise.
6973 (argument_parser::find_format_char_info): Likewise, in three places.
6974 (argument_parser::parse_any_scan_set): Likewise, in one place.
6975 (argument_parser::handle_conversions): Likewise, in two places.
6976 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6977 and use it to make a substring_loc. Pass the latter to
6979 (check_format_info_main): Add params "fmt_param_loc" and
6980 "format_string_cst". Convert warning_at calls using
6981 location_from_offset to calls to format_warning_at_char. Pass the
6982 new params to the arg_parser ctor. Pass "format_string_cst" to
6983 flag_chars.validate. Pass "fmt_param_loc" to
6984 arg_parser.check_argument_type.
6985 (check_format_types): Convert first param from a location_t
6986 to a const substring_loc & and rename to "fmt_loc". Attempt
6987 to extract the range of the relevant parameter and pass it
6988 to format_type_warning.
6989 (format_type_warning): Convert first param from a location_t
6990 to a const substring_loc & and rename to "fmt_loc". Add
6991 params "param_range" and "type". Replace calls to warning_at
6992 with calls to format_warning_at_substring.
6994 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6996 * c-format.c (class flag_chars_t): New class.
6997 (struct length_modifier): New struct.
6998 (class argument_parser): New class.
6999 (flag_chars_t::flag_chars_t): New ctor.
7000 (flag_chars_t::has_char_p): New method.
7001 (flag_chars_t::add_char): New method.
7002 (flag_chars_t::validate): New method.
7003 (flag_chars_t::get_alloc_flag): New method.
7004 (flag_chars_t::assignment_suppression_p): New method.
7005 (argument_parser::argument_parser): New ctor.
7006 (argument_parser::read_any_dollar): New method.
7007 (argument_parser::read_format_flags): New method.
7008 (argument_parser::read_any_format_width): New method.
7009 (argument_parser::read_any_format_left_precision): New method.
7010 (argument_parser::read_any_format_precision): New method.
7011 (argument_parser::handle_alloc_chars): New method.
7012 (argument_parser::read_any_length_modifier): New method.
7013 (argument_parser::read_any_other_modifier): New method.
7014 (argument_parser::find_format_char_info): New method.
7015 (argument_parser::validate_flag_pairs): New method.
7016 (argument_parser::give_y2k_warnings): New method.
7017 (argument_parser::parse_any_scan_set): New method.
7018 (argument_parser::handle_conversions): New method.
7019 (argument_parser::check_argument_type): New method.
7020 (check_format_info_main): Introduce classes argument_parser
7021 and flag_chars_t, moving the code within the loop into methods
7022 of these classes. Make various locals "const".
7024 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7026 * c-common.c: Include "substring-locations.h".
7027 (get_cpp_ttype_from_string_type): New function.
7028 (g_string_concat_db): New global.
7029 (substring_loc::get_range): New method.
7030 * c-common.h (g_string_concat_db): New declaration.
7031 (class substring_loc): New class.
7032 * c-lex.c (lex_string): When concatenating strings, capture the
7033 locations of all tokens using a new obstack, and record the
7034 concatenation locations within g_string_concat_db.
7035 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7038 2016-07-29 Marek Polacek <polacek@redhat.com>
7041 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7042 parentheses warning.
7045 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7047 2016-07-28 Martin Liska <mliska@suse.cz>
7049 PR gcov-profile/68025
7050 * c-common.c (handle_no_profile_instrument_function_attribute):
7052 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7054 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7057 2016-07-25 Jason Merrill <jason@redhat.com>
7060 * c.opt (fconstexpr-loop-limit): New.
7062 2016-07-22 Martin Sebor <msebor@redhat.com>
7065 * c-common.c (resolve_overloaded_builtin): Avoid converting
7066 __atomic_compare_exchange_n return type to that of what its
7067 first argument points to.
7069 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7071 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7072 ~(unsigned HOST_WIDE_INT) 0.
7074 2016-07-22 Martin Liska <mliska@suse.cz>
7076 PR gcov-profile/69028
7077 PR gcov-profile/62047
7078 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7079 to the current_function_decl.
7081 2016-07-21 Jason Merrill <jason@redhat.com>
7084 * c-common.c (c_common_truthvalue_conversion): Check
7085 c_inhibit_evaluation_warnings for warning about address of
7088 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7090 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7093 2016-07-15 Jason Merrill <jason@redhat.com>
7095 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7097 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7100 * c-common.h (enum lookup_name_fuzzy_kind): Add
7101 FUZZY_LOOKUP_FUNCTION_NAME.
7103 2016-07-08 Jason Merrill <jason@redhat.com>
7105 P0145: Refining Expression Order for C++.
7106 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7109 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7112 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7114 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7116 * c-pragma.h (enum pragma_kind): Rename
7117 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7120 2016-06-29 Richard Biener <rguenther@suse.de>
7123 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7125 2016-06-24 Jason Merrill <jason@redhat.com>
7127 P0145R2: Refining Expression Order for C++.
7128 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7131 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7133 * c-common.c (check_builtin_function_arguments): Require last
7134 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7135 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7136 if the last argument is pointer to enumerated or boolean type.
7138 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7141 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7142 (lookup_name_fuzzy): New prototype.
7144 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7146 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7148 2016-06-14 Jason Merrill <jason@redhat.com>
7150 P0145R2: Refining Expression Order for C++.
7151 * c.opt (fargs-in-order): New.
7152 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7154 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7157 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7158 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7160 PR preprocessor/71183
7161 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7162 to cb_get_source_date_epoch.
7164 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7167 * c.opt (Wpsabi): Add Warning flag.
7169 2016-06-10 Martin Sebor <msebor@redhat.com>
7172 * c-common.c (handle_nonnull_attribute): Accept
7173 the nonnull attribute in type-generic builtins.
7175 2016-06-09 Martin Sebor <msebor@redhat.com>
7178 * c-common.c (builtin_function_validate_nargs): Make text of error
7179 message consistent with others like it.
7181 2016-06-08 Martin Sebor <msebor@redhat.com>
7182 Jakub Jelinek <jakub@redhat.com>
7186 * c-common.c (check_builtin_function_arguments): Handle
7187 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7189 2016-06-08 Richard Biener <rguenther@suse.de>
7191 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7193 2016-06-07 Richard Biener <rguenther@suse.de>
7196 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7197 options and warn about others.
7199 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7201 * c-common.c (get_source_date_epoch): Rename to
7202 cb_get_source_date_epoch.
7203 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7204 message when the parsing fails. Use error_at instead of fatal_error.
7205 * c-common.h (get_source_date_epoch): Rename to
7206 cb_get_source_date_epoch.
7207 * c-common.h (cb_get_source_date_epoch): Prototype.
7208 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7209 * c-common.h (c_omp_region_type): Remove trailing comma.
7210 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7211 * c-lex.c (c_lex_with_flags): Remove initialization of
7212 pfile->source_date_epoch.
7214 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7217 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7218 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7219 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7220 instead of C_OMP_CLAUSE_SPLIT_FOR.
7222 2016-05-24 Richard Biener <rguenther@suse.de>
7226 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7227 (convert_vector_to_array_for_subscript): ... this.
7228 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7229 VIEW_CONVERT_EXPR to an array type. Rename to ...
7230 (convert_vector_to_array_for_subscript): ... this.
7232 2016-05-12 Marek Polacek <polacek@redhat.com>
7235 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7236 size_in_bytes and pass LOC to it.
7238 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7241 * c.opt (Wduplicate-decl-specifier): New option.
7243 2016-05-11 Marek Polacek <polacek@redhat.com>
7246 * c-common.c (diagnose_mismatched_attributes): New function.
7247 * c-common.h (diagnose_mismatched_attributes): Declare.
7249 2016-05-04 Marek Polacek <polacek@redhat.com>
7251 * c.opt (Wdangling-else): New option.
7253 2016-05-03 Marek Polacek <polacek@redhat.com>
7256 * c-common.c (builtin_function_validate_nargs): Add location
7258 (check_builtin_function_arguments): Add location and arguments
7259 parameters. Use them.
7260 * c-common.h (check_builtin_function_arguments): Update declaration.
7262 2016-05-03 Richard Biener <rguenther@suse.de>
7264 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7265 allow call args to gimplify to SSA names.
7267 2016-05-03 Marek Polacek <polacek@redhat.com>
7269 * c-common.h (enum c_omp_region_type): Remove stray comma.
7271 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7273 * c-common.h (enum c_omp_region_type): Define.
7275 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7277 * c-common.c (shorten_compare): Use wi::to_wide.
7279 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7282 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7283 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7284 reduction clauses in acc parallel loops.
7286 2016-04-29 Marek Polacek <polacek@redhat.com>
7289 * c-common.c (warn_for_memset): Check domain before accessing it.
7291 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7294 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7295 "aligned" attribute.
7297 2016-04-28 Jason Merrill <jason@redhat.com>
7299 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7301 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7302 Matthias Klose <doko@debian.org>
7304 * c-common.c (get_source_date_epoch): New function, gets the environment
7305 variable SOURCE_DATE_EPOCH and parses it as long long with error
7307 * c-common.h (get_source_date_epoch): Prototype.
7308 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7310 2015-04-27 Ryan Burn <contact@rnburn.com>
7314 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7315 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7317 (cilk_detect_and_unwrap): Corresponding changes.
7318 (extract_free_variables): Don't extract free variables from
7319 AGGR_INIT_EXPR slot.
7320 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7321 (cilk_recognize_spawn): Likewise.
7323 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7325 * c.opt (Wmemset-elt-size): New option.
7326 * c-common.c (warn_for_memset): New function.
7327 * c-common.h (warn_for_memset): Declare.
7329 2016-04-25 Jason Merrill <jason@redhat.com>
7331 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7333 * c-common.h: Declare it.
7334 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7336 2016-04-22 Jason Merrill <jason@redhat.com>
7338 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7340 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7343 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7344 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7346 2016-04-18 Michael Matz <matz@suse.de>
7348 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7351 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7353 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7354 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7355 to incomplete types.
7356 (dump_nested_type): Remove redundant tests and tidy up.
7357 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7358 a type which is the typedef of an original type.
7360 2016-04-15 Marek Polacek <polacek@redhat.com>
7363 * c-common.c (build_va_arg): Change two asserts into errors and return
7366 2016-04-13 Marek Polacek <polacek@redhat.com>
7369 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7370 for switch statements, too.
7372 2016-03-28 Jason Merrill <jason@redhat.com>
7374 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7376 2016-03-23 Marek Polacek <polacek@redhat.com>
7379 * c.opt (Wignored-attributes): New option.
7381 2016-03-22 David Malcolm <dmalcolm@redhat.com>
7384 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7385 diagnostic text, reversing the order of the warning and note so
7386 that they appear in source order.
7388 2016-03-17 Marek Polacek <polacek@redhat.com>
7391 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7394 2016-03-14 Jason Merrill <jason@redhat.com>
7396 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7398 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7400 2016-03-09 Richard Biener <rguenther@suse.de>
7403 * c-common.c (strict_aliasing_warning): Add back
7404 alias_sets_conflict_p check.
7406 2016-03-08 Jason Merrill <jason@redhat.com>
7408 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7410 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7413 * c-indentation.c (get_visual_column): Move code to determine next
7415 (next_tab_stop): ...this new function.
7416 (line_contains_hash_if): Delete function.
7417 (detect_preprocessor_logic): Delete function.
7418 (get_first_nws_vis_column): New function.
7419 (detect_intervening_unindent): New function.
7420 (should_warn_for_misleading_indentation): Replace call to
7421 detect_preprocessor_logic with a call to
7422 detect_intervening_unindent.
7424 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7427 * c-indentation.c (should_warn_for_misleading_indentation): When
7428 suppressing warnings about cases where the guard and body are on
7429 the same column, only use the first non-whitespace column in place
7430 of the guard token column when dealing with "else" clauses.
7431 When rejecting aligned BODY and NEXT, loosen the requirement
7432 from equality with the first non-whitespace of guard to simply
7433 that they not be indented relative to it.
7435 2016-03-04 Richard Biener <rguenther@suse.de>
7438 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7439 instead of alias_sets_conflict_p.
7441 2016-03-01 Marek Polacek <polacek@redhat.com>
7444 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7447 2016-02-22 Martin Sebor <msebor@redhat.com>
7450 * c-common.c (check_builtin_function_arguments): Validate and
7451 reject invalid arguments to __builtin_alloca_with_align.
7453 2016-02-20 Mark Wielaard <mjw@redhat.com>
7456 * c.opt (Wunused-const-variable): Turn into Alias for...
7457 (Wunused-const-variable=): New option.
7459 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7462 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7464 (c_common_init_options): ...to here.
7465 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7467 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7470 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7471 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7472 flag_preprocess_only.
7474 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7477 * c.opt (Wnonnull-compare): Enable for -Wall.
7479 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7482 * c-common.c (sync_resolve_size): Diagnose too few arguments
7483 even when params is non-NULL empty vector.
7485 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7488 * c.opt (fshort-double): Remove.
7490 2016-02-05 Martin Sebor <msebor@redhat.com>
7493 * c.opt (Warning options): Update -Wplacement-new to take
7494 an optional argument.
7496 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7498 PR preprocessor/69543
7500 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7501 instead of loc to control_warning_option.
7503 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7505 * c.opt (fopenacc-dim=): New option.
7507 2016-01-27 Ryan Burn <contact@rnburn.com>
7510 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7511 gimplify_arg. Removed superfluous post_p argument.
7512 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7513 superfluous post_p argument.
7514 * c-gimplify.c (c_gimplify_expr): Likewise.
7516 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7519 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7520 pp_newline_and_flush with pp_flush.
7522 2016-01-20 Martin Sebor <msebor@redhat.com>
7525 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7526 an incompatible argument when the argument isn't a valid tree node.
7528 2016-01-18 Jason Merrill <jason@redhat.com>
7531 * c-common.c (check_function_arguments_recurse): Fold the whole
7532 COND_EXPR, not just the condition.
7534 2016-01-18 Tom de Vries <tom@codesourcery.com>
7536 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7537 classify as loop clause.
7539 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7542 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7543 C++ FE no longer has limit on number of pragmas.
7545 2015-01-14 Ryan Burn <contact@rnburn.com>
7548 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7549 to add missing cleanup point.
7551 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7554 * c-indentation.c (get_visual_column): Add location_t param.
7555 Handle the column number being zero by effectively disabling the
7556 warning, with an "inform".
7557 (should_warn_for_misleading_indentation): Add location_t argument
7558 for all uses of get_visual_column.
7560 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7563 * c-indentation.c (should_warn_for_misleading_indentation):
7564 Don't warn about do-while statements.
7566 2016-01-07 Martin Sebor <msebor@redhat.com>
7569 * c-common.c (sync_resolve_size): Reject first argument when it's
7572 2016-01-05 David Malcolm <dmalcolm@redhat.com>
7575 * c-indentation.c (get_visual_column): Remove default argument.
7576 (should_warn_for_misleading_indentation): For the multiline case,
7577 update call to get_visual_column for next_stmt_exploc so that it
7578 captures the location of the first non-whitespace character in the
7579 relevant line. Don't issue warnings if there is non-whitespace
7580 before the next statement.
7582 2016-01-04 Jakub Jelinek <jakub@redhat.com>
7584 Update copyright years.
7586 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7588 * c-common.c (binary_op_error): Convert first param from
7589 location_t to rich_location * and use it when emitting an error.
7590 * c-common.h (binary_op_error): Convert first param from
7591 location_t to rich_location *.
7593 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7595 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7596 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7598 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7600 * c-common.c (c_common_attribute_table): Handle "omp declare target
7603 2015-12-14 Jakub Jelinek <jakub@redhat.com>
7606 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7608 2014-12-12 Tobias Burnus <burnus@net-b.de>
7611 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7612 specifiers (%d, %i,%u and %c).
7614 2015-12-10 David Malcolm <dmalcolm@redhat.com>
7616 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7618 2015-12-08 Jakub Jelinek <jakub@redhat.com>
7622 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7623 * c-pragma.c (handle_pragma_diagnostic): Adjust
7624 control_warning_option caller.
7626 2015-12-07 David Malcolm <dmalcolm@redhat.com>
7628 * c-common.c (c_cpp_error): Update for change to
7629 rich_location::set_range.
7631 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
7633 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7634 shifting 1 out of the sign bit.
7636 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7638 * c-common.c (c_common_attribute_table[]): Update max arguments
7639 count for "simd" attribute.
7640 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7642 2015-12-03 Jakub Jelinek <jakub@redhat.com>
7644 PR preprocessor/57580
7645 * c-ppoutput.c (print): Change printed field to bool.
7646 Move src_file last for smaller padding.
7647 (init_pp_output): Set print.printed to false instead of 0.
7648 (scan_translation_unit): Fix up formatting. Set print.printed
7649 to true after printing something other than newline.
7650 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7651 (maybe_print_line_1): Set print.printed to false instead of 0.
7652 (print_line_1): Likewise.
7653 (do_line_change): Set print.printed to true instead of 1.
7654 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7655 dump_macro): Set print.printed to false after printing newline.
7657 2015-12-02 Jason Merrill <jason@redhat.com>
7659 * c-common.c (fold_for_warn): New.
7660 (warn_logical_operator, warn_tautological_cmp)
7661 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7663 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7664 (c_fully_fold_internal, decl_constant_value_for_optimization):
7666 * c-common.h: Don't declare decl_constant_value_for_optimization.
7668 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7671 * c-common.h (c_build_qualified_type): Add extra default
7674 2015-12-01 Julian Brown <julian@codesourcery.com>
7675 Cesar Philippidis <cesar@codesourcery.com>
7676 James Norris <James_Norris@mentor.com>
7678 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7679 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7680 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7682 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7684 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7685 (decl_sloc_common): Delete and move bulk of processing to...
7686 (decl_sloc): ...here.
7687 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7688 (dump_ada_double_name): Remove S parameter and compute the suffix.
7689 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7690 element type and deal with an anonymous one.
7691 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7692 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7693 and remove reference to QUAL_UNION_TYPE.
7694 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7695 (dump_nested_type): ...here. New function extracted from above.
7696 Generate a full declaration for anonymous element type of arrays.
7697 (print_ada_declaration): Really skip anonymous declarations. Remove
7698 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7699 Clean up processing of declarations of array types and objects.
7700 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7701 Remove obsolete code and tidy up.
7703 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7706 * c-common.c (handle_transparent_union_attribute): Update
7709 2015-11-27 Martin Liska <mliska@suse.cz>
7712 * array-notation-common.c (cilkplus_extract_an_triplets):
7713 Release vector of vectors.
7714 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7716 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7719 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7720 (print_ada_struct_decl): Likewise.
7722 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7725 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7726 * cilk.c (recognize_spawn): Determine location in a more precise
7729 2015-11-19 Jason Merrill <jason@redhat.com>
7731 * c-common.c (shorten_compare): But look through macros from
7734 2015-11-18 Jason Merrill <jason@redhat.com>
7736 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7737 non-constant operand comes from a macro.
7739 2015-11-17 Jason Merrill <jason@redhat.com>
7742 * c-common.c (warn_tautological_cmp): Fold before checking for
7745 2015-11-16 Marek Polacek <polacek@redhat.com>
7748 * c-common.c (check_case_bounds): Fold low and high cases.
7750 2015-11-16 Marek Polacek <polacek@redhat.com>
7752 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7753 * c-common.c (c_common_get_alias_set): Likewise.
7754 (handle_visibility_attribute): Likewise.
7756 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7758 * c-common.c (handle_simd_attribute): New.
7759 (struct attribute_spec): Add entry for "simd".
7760 (handle_simd_attribute): New.
7762 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7764 * c-lex.c (interpret_float): Use fold_convert.
7766 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7768 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7769 and store it on the result.
7770 * c-opts.c (c_common_init_options): Set
7771 global_dc->colorize_source_p.
7773 2015-11-12 James Norris <jnorris@codesourcery.com>
7774 Joseph Myers <joseph@codesourcery.com>
7776 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7777 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7778 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7779 PRAGMA_OACC_CLAUSE_LINK.
7781 2015-11-11 Marek Polacek <polacek@redhat.com>
7785 * c-common.c (valid_array_size_p): New function.
7786 * c-common.h (valid_array_size_p): Declare.
7788 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7791 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7793 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7795 * array-notation-common.c: Remove unused header files.
7796 * c-ada-spec.c: Likewise.
7797 * c-cilkplus.c: Likewise.
7798 * c-common.c: Likewise.
7799 * c-cppbuiltin.c: Likewise.
7800 * c-dump.c: Likewise.
7801 * c-format.c: Likewise.
7802 * c-gimplify.c: Likewise.
7803 * c-indentation.c: Likewise.
7804 * c-lex.c: Likewise.
7805 * c-omp.c: Likewise.
7806 * c-opts.c: Likewise.
7807 * c-pch.c: Likewise.
7808 * c-ppoutput.c: Likewise.
7809 * c-pragma.c: Likewise.
7810 * c-pretty-print.c: Likewise.
7811 * c-semantics.c: Likewise.
7812 * c-ubsan.c: Likewise.
7814 * stub-objc.c: Likewise.
7816 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7817 Cesar Philippidis <cesar@codesourcery.com>
7818 James Norris <jnorris@codesourcery.com>
7819 Julian Brown <julian@codesourcery.com>
7820 Nathan Sidwell <nathan@codesourcery.com>
7822 * c-pragma.c (oacc_pragmas): Add "routine".
7823 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7825 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7827 * c-common.c (c_common_attributes): Add scalar_storage_order.
7828 (handle_scalar_storage_order_attribute): New function.
7829 * c-pragma.c (global_sso): New variable.
7830 (maybe_apply_pragma_scalar_storage_order): New function.
7831 (handle_pragma_scalar_storage_order): Likewise.
7832 (init_pragma): Register scalar_storage_order.
7833 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7834 * c.opt (Wscalar-storage-order): New warning.
7835 (fsso-struct=): New option.
7837 2015-11-08 Martin Sebor <msebor@redhat.com>
7839 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7841 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7843 * c-common.c: Don't undef DEF_BUILTIN.
7845 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7847 * c-common.c (c_cpp_error): Convert parameter from location_t to
7848 rich_location *. Eliminate the "column_override" parameter and
7849 the call to diagnostic_override_column.
7850 Update the "done_lexing" clause to set range 0
7851 on the rich_location, rather than overwriting a location_t.
7852 * c-common.h (c_cpp_error): Convert parameter from location_t to
7853 rich_location *. Eliminate the "column_override" parameter.
7855 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7856 Thomas Schwinge <thomas@codesourcery.com>
7857 James Norris <jnorris@codesourcery.com>
7859 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7860 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7861 clauses with parallel and kernels and loops.
7862 * c-pragma.h (enum pragma_omp_clause): Add entries for
7863 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7864 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7865 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7867 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7869 2015-11-05 Martin Sebor <msebor@redhat.com>
7872 * c.opt (-Wplacement-new): New option.
7874 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7876 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7877 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7878 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7879 save_expr or create_tmp_var* if TEST is true.
7880 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7881 Don't call add_stmt here.
7882 (struct c_omp_check_loop_iv_data): New type.
7883 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7884 c_omp_check_loop_iv_exprs): New functions.
7885 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7887 (c_omp_declare_simd_clauses_to_numbers): Change
7888 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7889 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7890 from numbers to PARM_DECLs.
7892 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7894 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7897 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7900 * c-common.h (fold_offsetof_1): Add argument.
7901 * c-common.c (fold_offsetof_1): Diagnose more invalid
7902 offsetof expressions that reference elements past the end of
7905 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7906 Chung-Lin Tang <cltang@codesourcery.com>
7908 * c-pragma.c (oacc_pragmas): Add "atomic".
7909 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7911 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7913 * c-common.c (handle_target_clones_attribute): New.
7914 (c_common_attribute_table): Add handle_target_clones_attribute.
7915 (handle_always_inline_attribute): Add check on target_clones attribute.
7916 (handle_target_attribute): Ditto.
7918 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7920 * array-notation-common.c: Reorder #include's and remove duplicates.
7921 * c-ada-spec.c: Likewise.
7922 * c-cilkplus.c: Likewise.
7923 * c-common.c: Likewise.
7924 * c-cppbuiltin.c: Likewise.
7925 * c-dump.c: Likewise.
7926 * c-format.c: Likewise.
7927 * c-gimplify.c: Likewise.
7928 * c-indentation.c: Likewise.
7929 * c-lex.c: Likewise.
7930 * c-omp.c: Likewise.
7931 * c-opts.c: Likewise.
7932 * c-pch.c: Likewise.
7933 * c-ppoutput.c: Likewise.
7934 * c-pragma.c: Likewise.
7935 * c-pretty-print.c: Likewise.
7936 * c-semantics.c: Likewise.
7937 * c-ubsan.c: Likewise.
7939 * stub-objc.c: Likewise.
7941 2015-10-28 Jason Merrill <jason@redhat.com>
7943 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7945 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7946 James Norris <jnorris@codesourcery.com>
7947 Cesar Philippidis <cesar@codesourcery.com>
7951 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7952 * c-omp.c (c_oacc_split_loop_clauses): New function.
7954 2015-10-21 Martin Sebor <msebor@redhat.com>
7957 * c.opt: End each sentence that describes an option with a period.
7959 2015-10-20 Marek Polacek <polacek@redhat.com>
7961 * array-notation-common.c (is_cilkplus_vector_p): Define.
7962 * c-common.h (is_cilkplus_vector_p): Declare.
7964 2015-10-20 Marek Polacek <polacek@redhat.com>
7966 * c.opt (std=gnu++11): Do not describe as experimental.
7967 (std=gnu++14): Likewise.
7969 2015-10-19 Jason Merrill <jason@redhat.com>
7971 * c-cppbuiltin.c (c_cpp_builtins): Define
7972 __cpp_nontype_template_args.
7974 2015-10-19 Jason Merrill <jason@redhat.com>
7976 * c-cppbuiltin.c (c_cpp_builtins): Define
7977 __cpp_enumerator_attributes, __cpp_fold_expressions,
7978 __cpp_unicode_characters.
7980 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7981 Aldy Hernandez <aldyh@redhat.com>
7983 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7984 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7985 (c_define_builtins): Likewise.
7986 * c-common.h (enum c_omp_clause_split): Add
7987 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7988 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7989 (c_finish_omp_for): Add ORIG_DECLV argument.
7990 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7991 201511 instead of 201307.
7992 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7993 OMP_CRITICAL_CLAUSES to it.
7994 (c_finish_omp_ordered): Add CLAUSES argument, set
7995 OMP_ORDERED_CLAUSES to it.
7996 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7997 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7998 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7999 constructs and new OpenMP 4.5 clauses. Clear
8000 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8002 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8003 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8004 (enum pragma_omp_clause): Add
8005 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8006 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8008 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8010 * c-lex.c (interpret_float): Use real_equal instead of
8013 2015-10-04 Jason Merrill <jason@redhat.com>
8015 Implement N4514, C++ Extensions for Transactional Memory.
8016 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8017 (c_common_attribute_table): Add transaction_safe_dynamic.
8018 transaction_safe now affects type identity.
8019 (handle_tm_attribute): Handle transaction_safe_dynamic.
8020 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8021 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8022 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8024 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8025 * c-pretty-print.c (pp_c_attributes_display): Don't print
8026 transaction_safe in C++.
8028 2015-10-02 Marek Polacek <polacek@redhat.com>
8030 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8032 2015-10-02 Marek Polacek <polacek@redhat.com>
8035 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8036 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8037 * c.opt (Wduplicated-cond): New option.
8039 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8041 * c.opt (std=c11): Do not describe as experimental.
8042 (std=gnu11): Likewise.
8043 (std=iso9899:2011): Likewise.
8045 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8047 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8048 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8050 2015-09-25 Marek Polacek <polacek@redhat.com>
8052 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8053 (ubsan_instrument_shift): Likewise.
8055 2015-09-25 Marek Polacek <polacek@redhat.com>
8058 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8060 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8062 * c-indentation.c (should_warn_for_misleading_indentation):
8063 Compare next_stmt_vis_column with guard_line_first_nws instead
8064 of with guard_line_vis_column.
8066 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8070 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8071 options and options not valid for the current language.
8073 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8075 * c-indentation.c (should_warn_for_misleading_indentation):
8076 Float out and consolidate the calls to get_visual_column that
8077 are passed guard_exploc as an argument. Compare
8078 next_stmt_vis_column with guard_line_first_nws instead of with
8079 body_line_first_nws.
8081 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8083 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8084 Wnamespaces): New C++ warnings.
8086 2015-09-22 Jason Merrill <jason@redhat.com>
8088 * c-common.h (abi_compat_version_crosses): New.
8089 (warn_abi_version): Declare.
8090 * c-common.c: Define it.
8091 * c-opts.c (c_common_post_options): Handle it.
8092 flag_abi_compat_version defaults to 8.
8094 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8096 Complete the implementation of N4230, Nested namespace definition.
8097 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8098 __cpp_nested_namespace_definitions.
8100 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8102 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8104 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8106 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8108 * c-pragma.h (pragma_lex): Add optional loc argument.
8110 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8112 * c-format.c (check_format_arg): Adjust to use common block size in all
8115 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8117 * c-format.c (location_from_offset): Update for change in
8118 signature of location_get_source_line.
8119 * c-indentation.c (get_visual_column): Likewise.
8120 (line_contains_hash_if): Likewise.
8122 2015-09-14 Marek Polacek <polacek@redhat.com>
8124 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8125 setting various warnings.
8127 2015-09-14 Marek Polacek <polacek@redhat.com>
8129 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8132 2015-09-11 Mark Wielaard <mjw@redhat.com>
8135 * c.opt (Wunused-variable): Option from common.opt.
8136 (Wunused-const-variable): New option.
8138 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8141 * c.opt ([Wsubobject-linkage]): Add.
8143 2015-09-03 Martin Sebor <msebor@redhat.com>
8146 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8148 * c-common.c (reject_gcc_builtin): Define.
8150 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8153 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8155 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8156 cilk_gimplify_call_params_in_spawned_fn.
8157 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8158 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8161 2015-08-25 Marek Polacek <polacek@redhat.com>
8164 * c-common.c (handle_weak_attribute): Don't check whether the
8165 visibility can be changed here.
8167 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8169 * c-lex.c (c_lex_with_flags): Use explicit locations.
8171 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8173 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8174 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8176 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8179 * c-common.c (check_builtin_function_arguments): Add check
8180 for BUILT_IN_SIGNBIT argument.
8182 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8185 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8188 2015-08-17 Marek Polacek <polacek@redhat.com>
8190 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8191 with whitespaces before qualifier names.
8193 2015-08-12 Marek Polacek <polacek@redhat.com>
8196 * c-common.c (maybe_warn_shift_overflow): Properly handle
8197 left-shifting 1 into the sign bit.
8199 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8201 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8203 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8204 Braden Obrzut <admin@maniacsvault.net>
8205 Jason Merrill <jason@redhat.com>
8207 Add C++ Concepts TS support.
8208 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8209 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8210 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8211 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8212 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8213 * c.opt (fconcepts): New.
8215 2015-08-02 Martin Sebor <msebor@redhat.com>
8217 * c.opt (-Wframe-address): New warning option.
8219 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8221 * c-indentation.c (should_warn_for_misleading_indentation):
8224 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8226 * c-indentation.c (get_visual_column): Add parameter first_nws,
8227 use it. Update comment documenting the function.
8228 (is_first_nonwhitespace_on_line): Remove.
8229 (should_warn_for_misleading_indentation): Replace usage of
8230 of is_first_nonwhitespace_on_line with get_visual_column.
8232 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8234 * c-indentation.h (struct token_indent_info): Define.
8235 (get_token_indent_info): Define.
8236 (warn_for_misleading_information): Declare.
8237 * c-common.h (warn_for_misleading_information): Remove.
8238 * c-identation.c (warn_for_misleading_indentation):
8239 Change declaration to take three token_indent_infos. Adjust
8241 * c-identation.c (should_warn_for_misleading_indentation):
8242 Likewise. Bail out early if the body is a compound statement.
8243 (guard_tinfo_to_string): Define.
8245 2015-07-30 Jason Merrill <jason@redhat.com>
8247 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8248 '*' for reference decay.
8250 2015-07-30 Marek Polacek <polacek@redhat.com>
8252 * c-common.c (warn_tautological_cmp): Bail for float types.
8254 2015-07-27 Marek Polacek <polacek@redhat.com>
8257 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8259 2015-07-27 Marek Polacek <polacek@redhat.com>
8263 * c-common.c (find_array_ref_with_const_idx_r): New function.
8264 (warn_tautological_cmp): New function.
8265 * c-common.h (warn_tautological_cmp): Declare.
8266 * c.opt (Wtautological-compare): New option.
8268 2015-07-23 Marek Polacek <polacek@redhat.com>
8270 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8271 (ubsan_instrument_shift): Likewise.
8273 2015-07-23 Marek Polacek <polacek@redhat.com>
8276 * c-ubsan.c: Include gimplify.h.
8277 (ubsan_instrument_division): Unshare OP0 and OP1.
8278 (ubsan_instrument_shift): Likewise.
8280 2015-07-20 Marek Polacek <polacek@redhat.com>
8281 Richard Sandiford <richard.sandiford@arm.com>
8284 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8285 Use EXPR_LOC_OR_LOC.
8286 (maybe_warn_shift_overflow): New function.
8287 * c-common.h (maybe_warn_shift_overflow): Declare.
8288 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8289 * c.opt (Wshift-overflow): New option.
8291 2015-07-16 Martin Liska <mliska@suse.cz>
8293 * c-format.c (static void check_format_info_main): Use
8294 object_allocator instead of pool_allocator.
8295 (check_format_arg): Likewise.
8296 (check_format_info_main): Likewise.
8298 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8300 * c-opts.c: Remove multiline #include comment.
8302 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8304 * c-common.c: Fix double word typos.
8306 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8308 * c-ada-spec.h (cpp_operation): Revert latest change.
8309 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8310 constructors and destructors.
8312 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8314 * c-common.h: Adjust includes for flags.h changes.
8315 * stub-objc.c: Likewise.
8317 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8319 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8320 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8322 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8324 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8325 are to be removed, return NULL rather than original clauses list.
8327 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8329 * array-notation-common.c: Adjust includes.
8330 * c-ada-spec.c: Likewise.
8331 * c-cilkplus.c: Likewise.
8332 * c-common.h: Likewise.
8333 * c-cppbuiltin.c: Likewise.
8334 * c-dump.c: Likewise.
8335 * c-format.c: Likewise.
8336 * c-gimplify.c: Likewise.
8337 * c-indentation.c: Likewise.
8338 * c-lex.c: Likewise.
8339 * c-omp.c: Likewise.
8340 * c-opts.c: Likewise.
8341 * c-pch.c: Likewise.
8342 * c-ppoutput.c: Likewise.
8343 * c-pragma.c: Likewise.
8344 * c-pretty-print.c: Likewise.
8345 * c-semantics.c: Likewise.
8346 * c-ubsan.c: Likewise.
8348 * stub-objc.c: Likewise.
8350 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8352 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8353 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8355 2015-07-01 Jason Merrill <jason@redhat.com>
8357 * c-common.h (D_CXX11): Rename from D_CXX0X.
8358 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8359 * c-common.c: Adjust.
8361 * c-opts.c (c_common_post_options): Default to C++14.
8363 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8365 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8367 Implement N4197 - Adding u8 character literals
8368 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
8370 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
8371 CPP_UTF8CHAR_USERDEF tokens.
8372 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
8373 and CPP_UTF8CHAR tokens.
8374 (lex_charconst): Treat CPP_UTF8CHAR token.
8376 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8379 * c-common.c (do_warn_unused_parameter): Move here.
8380 * c-common.h (do_warn_unused_parameter): Declare.
8382 2015-06-29 Marek Polacek <polacek@redhat.com>
8385 * c-common.c (check_case_bounds): Add bool * parameter. Set
8387 (c_add_case_label): Add bool * parameter. Pass it down to
8389 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8391 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8394 2015-06-27 Marek Polacek <polacek@redhat.com>
8396 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8397 or VECTOR_INTEGER_TYPE_P throughout.
8398 * c-gimplify.c: Likewise.
8400 2015-06-26 Marek Polacek <polacek@redhat.com>
8402 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8403 * c-common.c (c_fully_fold_internal): Likewise.
8404 (c_alignof_expr): Likewise.
8405 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8406 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8407 * cilk.c (create_parm_list): Likewise.
8409 2015-06-26 Marek Polacek <polacek@redhat.com>
8411 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8413 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8415 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8416 * c-gimplify.c: Likewise.
8417 * c-pragma.c: Likewise.
8418 * c-ubsan.c: Likewise.
8421 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8423 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8426 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8428 * cilk.c: Move calls.h after tm.h in the include chain.
8430 2015-06-25 Marek Polacek <polacek@redhat.com>
8432 * array-notation-common.c: Use VAR_P throughout.
8433 * c-ada-spec.c: Likewise.
8434 * c-common.c: Likewise.
8435 * c-format.c: Likewise.
8436 * c-gimplify.c: Likewise.
8437 * c-omp.c: Likewise.
8438 * c-pragma.c: Likewise.
8439 * c-pretty-print.c: Likewise.
8442 2015-06-25 Marek Polacek <polacek@redhat.com>
8444 * cilk.c (extract_free_variables): Use is_global_var.
8446 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8448 * c-common.c: Don't include target-def.h.
8450 2015-06-23 Marek Polacek <polacek@redhat.com>
8452 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8453 when comparing INTEGER_CSTs.
8455 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8457 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8458 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8459 (dump_ada_template): Skip partially specialized types.
8461 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8463 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8466 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8468 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8469 * c-ada-spec.c: Likewise.
8470 * c-cilkplus.c: Likewise.
8471 * c-common.c: Likewise.
8472 * c-common.h: Likewise.
8473 * c-cppbuiltin.c: Likewise.
8474 * c-dump.c: Likewise.
8475 * c-format.c: Likewise.
8476 * c-gimplify.c: Likewise.
8477 * c-indentation.c: Likewise.
8478 * c-lex.c: Likewise.
8479 * c-omp.c: Likewise.
8480 * c-opts.c: Likewise.
8481 * c-pch.c: Likewise.
8482 * c-ppoutput.c: Likewise.
8483 * c-pragma.c: Likewise.
8484 * c-pretty-print.c: Likewise.
8485 * c-semantics.c: Likewise.
8486 * c-ubsan.c: Likewise.
8488 * stub-objc.c: Likewise.
8490 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8493 * c-common.c (c_common_truthvalue_conversion): Warn when
8494 converting an address of a reference to a truth value.
8496 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8498 * array-notation-common.c : Adjust include files.
8499 * c-ada-spec.c : Likewise.
8500 * c-cilkplus.c : Likewise.
8501 * c-common.c : Likewise.
8502 * c-common.h : Likewise.
8503 * c-cppbuiltin.c : Likewise.
8504 * c-dump.c : Likewise.
8505 * c-format.c : Likewise.
8506 * c-gimplify.c : Likewise.
8507 * c-indentation.c : Likewise.
8508 * c-lex.c : Likewise.
8509 * c-omp.c : Likewise.
8510 * c-opts.c : Likewise.
8511 * c-pch.c : Likewise.
8512 * c-ppoutput.c : Likewise.
8513 * c-pragma.c : Likewise.
8514 * c-pretty-print.c : Likewise.
8515 * c-semantics.c : Likewise.
8516 * c-ubsan.c : Likewise.
8517 * cilk.c : Likewise.
8518 * stub-objc.c : Likewise.
8520 2015-06-08 Marek Polacek <polacek@redhat.com>
8523 * c-format.c (location_from_offset): Return LOC if LINE is null.
8525 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
8527 * c-common.h (c_parse_final_cleanups): New prototype.
8528 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8530 2015-06-04 Sriraman Tallam <tmsriram@google.com>
8532 * c-common.c (noplt): New attribute.
8533 (handle_noplt_attribute): New handler.
8535 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8537 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8538 * c-ada-spec.c: Likewise.
8539 * c-cilkplus.c: Likewise.
8540 * c-common.c: Likewise.
8541 * c-common.h: Likewise.
8542 * c-cppbuiltin.c: Likewise.
8543 * c-dump.c: Likewise.
8544 * c-format.c: Likewise.
8545 * c-gimplify.c: Likewise.
8546 * c-indentation.c: Likewise.
8547 * c-lex.c: Likewise.
8548 * c-omp.c: Likewise.
8549 * c-opts.c: Likewise.
8550 * c-pch.c: Likewise.
8551 * c-ppoutput.c: Likewise.
8552 * c-pragma.c: Likewise.
8553 * c-pretty-print.c: Likewise.
8554 * c-semantics.c: Likewise.
8555 * c-ubsan.c: Likewise.
8557 * stub-objc.c: Likewise.
8559 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8562 * c-indentation.c (should_warn_for_misleading_indentation): Use
8563 expand_location rather than expand_location_to_spelling_point.
8564 Don't warn if the guarding statement is more indented than the
8567 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8569 * c-indentation.c (warn_for_misleading_indentation): Bail out
8570 immediately if -Wmisleading-indentation isn't enabled.
8572 2015-06-01 Martin Liska <mliska@suse.cz>
8574 * c-format.c (check_format_arg):Use new type-based pool allocator.
8575 (check_format_info_main) Likewise.
8577 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8579 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8580 (has_nontrivial_methods): Likewise.
8582 2015-05-25 Marek Polacek <polacek@redhat.com>
8584 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8586 2015-05-22 Marek Polacek <polacek@redhat.com>
8589 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8591 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8593 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8594 STACK_GROWS_DOWNWARD.
8596 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8598 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8599 STACK_GROWS_DOWNWARD rather than if it is defined.
8601 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8604 * c-format.c (location_column_from_byte_offset): New.
8605 (location_from_offset): New.
8606 (struct format_wanted_type): Add offset_loc field.
8607 (check_format_info): Move handling of location for extra arguments
8608 closer to the point of warning.
8609 (check_format_info_main): Pass the result of location_from_offset
8611 (format_type_warning): Pass the result of location_from_offset
8614 2015-05-20 Marek Polacek <polacek@redhat.com>
8616 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8618 2015-05-20 Marek Polacek <polacek@redhat.com>
8620 * c-ada-spec.c (dump_sloc): Use DECL_P.
8622 2015-05-20 Marek Polacek <polacek@redhat.com>
8624 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8625 * c-common.c: Likewise.
8627 2015-05-19 David Malcolm <dmalcolm@redhat.com>
8629 * c-common.h (fe_file_change): Strengthen param from
8630 const line_map * to const line_map_ordinary *.
8631 (pp_file_change): Likewise.
8632 * c-lex.c (fe_file_change): Likewise.
8633 (cb_define): Use linemap_check_ordinary when invoking
8635 (cb_undef): Likewise.
8636 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8637 invoking cb_file_change.
8638 (c_finish_options): Likewise.
8639 (push_command_line_include): Likewise.
8640 (cb_file_change): Strengthen param "new_map" from
8641 const line_map * to const line_map_ordinary *.
8642 * c-ppoutput.c (cb_define): Likewise for local "map".
8643 (pp_file_change): Likewise for param "map" and local "from".
8645 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8647 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8649 2015-05-18 Tom de Vries <tom@codesourcery.com>
8651 * c-common.c (build_va_arg_1): New function.
8652 (build_va_arg): Add address operator to va_list operand if necessary.
8654 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8657 * c-common.c (int_safely_convertible_to_real_p): Define.
8658 (unsafe_conversion_p): Check conversions involving complex types.
8659 (conversion_warning): Add new warning message for conversions which
8660 discard imaginary component.
8661 * c-common.h: (enum conversion_safety): Add new enumerator for such
8664 2015-05-14 Marek Polacek <polacek@redhat.com>
8668 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8669 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8670 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8671 use it. If FOR_INT_CONST, require that all evaluated operands be
8674 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8676 * c-common.h (warn_for_misleading_indentation): New prototype.
8677 * c-indentation.c: New file.
8678 * c.opt (Wmisleading-indentation): New option.
8680 2015-05-12 Tom de Vries <tom@codesourcery.com>
8682 PR tree-optimization/66010
8683 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8685 2015-05-09 Jason Merrill <jason@redhat.com>
8687 * c-opts.c (c_common_post_options): Also clear
8688 cpp_opts->cpp_warn_cxx11_compat.
8690 * c-common.h (enum cxx_dialect): Add cxx_unset.
8691 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8692 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8694 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8695 (std=gnu++0x): Mark as Undocumented.
8696 (std=gnu++1y): Add deprecated message.
8698 2015-05-08 Jason Merrill <jason@redhat.com>
8700 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8703 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8705 2015-05-08 Marek Polacek <polacek@redhat.com>
8708 * c.opt (Woverride-init-side-effects): New option.
8710 2015-05-07 Marek Polacek <polacek@redhat.com>
8713 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8715 * c.opt (Wshift-negative-value): New option.
8716 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8717 when -Wextra and C99/C++11 mode.
8719 2015-05-07 Marek Polacek <polacek@redhat.com>
8720 Martin Uecker <uecker@eecs.berkeley.edu>
8722 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8723 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8725 2015-05-05 Jason Merrill <jason@redhat.com>
8727 * c.opt (Wterminate): New.
8729 2015-04-30 Marek Polacek <polacek@redhat.com>
8731 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8732 require that the non-constant be of a boolean type.
8734 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8736 * c-common.c (handle_section_attribute): Refactor to reduce
8737 nesting and distinguish between error cases.
8739 2015-04-29 Marek Polacek <polacek@redhat.com>
8742 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8745 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8747 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8748 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8749 HOST_BITS_PER_WIDE_INT.
8751 2015-04-28 Tom de Vries <tom@codesourcery.com>
8753 PR tree-optimization/65887
8754 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8756 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8757 Pierre-Marie de Rodat <derodat@adacore.com>
8759 * c-ada-spec.c (in_function): Delete.
8760 (dump_generic_ada_node): Do not change in_function and remove the
8761 redundant code dealing with it.
8762 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8763 (print_ada_methods): Output the static member functions in a nested
8764 package after the regular methods as well as associated renamings.
8766 2015-04-24 Marek Polacek <polacek@redhat.com>
8769 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8770 and OPT_Wshift_count_overflow.
8773 * c-common.c (warn_logical_operator): Warn if the operands have the
8776 2015-04-24 Marek Polacek <polacek@redhat.com>
8779 * c-common.c (warn_logical_operator): Bail if either operand comes
8780 from a macro expansion.
8782 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8785 * c-common.c (c_default_pointer_mode): Add definition.
8786 * c-common.h (c_default_pointer_mode): Add declaration.
8788 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8790 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8791 on record_builtin_type argument.
8793 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8796 * c-common.c (warn_logical_not_parentheses): Don't warn for
8799 2015-03-07 Marek Polacek <polacek@redhat.com>
8802 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8803 before trying to figure out whether we have a flexible array member.
8805 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8806 Jonathan Wakely <jwakely.gcc@gmail.com>
8808 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8810 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8813 * c-ada-spec.c (print_destructor): Remove obsolete code.
8815 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8817 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8818 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8819 DECL_TEMPLATE_RESULT emulations.
8820 (dump_ada_template)): Add guard for TYPE_METHODS.
8822 2015-02-27 Marek Polacek <polacek@redhat.com>
8825 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8827 2015-02-27 Kai Tietz <ktietz@redhat.com>
8830 * c-pragma.c (handle_pragma_weak): Do not try to create
8831 weak/alias of declarations not being function, or variable
8834 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8837 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8839 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8841 2015-02-16 Marek Polacek <polacek@redhat.com>
8844 * c-format.c (check_format_types): Handle null param.
8846 2015-02-13 Marek Polacek <polacek@redhat.com>
8849 * c-format.c (check_format_types): Don't warn about different
8850 signedness if the original value is in the range of WANTED_TYPE.
8852 2015-02-12 Jason Merrill <jason@redhat.com>
8855 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8856 to the current highest version.
8857 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8859 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8863 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8864 instead of RDIV_EXPR. Use build_binary_op instead of
8867 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8869 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8870 to pass input_location as first argument.
8872 2015-01-23 Tom de Vries <tom@codesourcery.com>
8875 * c.opt (fopenacc): Mark as LTO option.
8877 2015-01-23 Tom de Vries <tom@codesourcery.com>
8880 * c.opt (fopenmp): Mark as LTO option.
8882 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8885 * cilk.c (fill_decls_vec): Only put decls into vector v.
8886 (compare_decls): Fix up formatting.
8888 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8891 * cilk.c: Include vec.h.
8892 (struct cilk_decls): New structure.
8893 (wrapper_parm_cb): Split this function to...
8894 (fill_decls_vec): ...this...
8895 (create_parm_list): ...and this.
8896 (compare_decls): New function.
8897 (for_local_cb): Remove.
8898 (wrapper_local_cb): Ditto.
8899 (build_wrapper_type): For now first traverse and fill vector of
8900 declarations then sort it and then deal with sorted vector.
8901 (cilk_outline): Ditto.
8902 (declare_one_free_variable): Ditto.
8904 2015-01-21 Jason Merrill <jason@redhat.com>
8907 * c-format.c (check_format_arg): Call decl_constant_value.
8909 2015-01-19 Martin Liska <mliska@suse.cz>
8911 * c-common.c (handle_noicf_attribute): New function.
8913 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8914 Bernd Schmidt <bernds@codesourcery.com>
8915 James Norris <jnorris@codesourcery.com>
8916 Cesar Philippidis <cesar@codesourcery.com>
8917 Ilmir Usmanov <i.usmanov@samsung.com>
8918 Jakub Jelinek <jakub@redhat.com>
8920 * c.opt (fopenacc): New option.
8921 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8922 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8924 * c-common.h (c_finish_oacc_wait): New prototype.
8925 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8926 (c_finish_oacc_wait): New function.
8927 * c-pragma.c (oacc_pragmas): New variable.
8928 (c_pp_lookup_pragma, init_pragma): Handle it.
8929 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8930 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8931 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8932 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8933 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8934 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8935 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8936 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8937 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8938 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8939 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8940 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8941 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8942 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8943 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8944 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8945 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8946 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8947 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8948 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8949 PRAGMA_OACC_CLAUSE_WORKER.
8951 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
8953 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8954 for the new option fstack-protector_explicit.
8955 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8956 (handle_stack_protect_attribute): New function.
8958 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
8960 * c.opt: New option -Warray-bounds=.
8962 2015-01-09 Michael Collison <michael.collison@linaro.org>
8964 * array-notation-common.c: Include hash-set.h, machmode.h,
8965 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8966 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8967 * c-ada-spec.c: Ditto.
8968 * c-cilkplus.c: Ditto.
8969 * c-common.c: Include input.h due to flattening of tree.h.
8970 Define macro GCC_C_COMMON_C.
8971 * c-common.h: Flatten tree.h header files into c-common.h.
8972 Remove include of tree-core.h.
8973 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8974 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8975 fold-const.h, wide-int.h, and inchash.h due to
8976 flattening of tree.h.
8978 * c-format.c: Flatten tree.h header files into c-common.h.
8979 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8980 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8981 fold-const.h, wide-int.h, and inchash.h due to
8982 flattening of tree.h.
8983 * c-dump.c: Include hash-set.h, machmode.h,
8984 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8985 fold-const.h, wide-int.h, and inchash.h due to
8986 flattening of tree.h.
8987 * c-format.c: Include hash-set.h, machmode.h,
8988 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8989 fold-const.h, wide-int.h, inchash.h and real.h due to
8990 flattening of tree.h.
8991 * c-gimplify.c: Include hash-set.h, machmode.h,
8992 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8993 fold-const.h, wide-int.h, and inchash.h due to
8994 flattening of tree.h.
9000 * c-ppoutput.c: Ditto.
9001 * c-pragma.c: Ditto.
9002 * c-pretty-print.c: Ditto.
9003 * c-semantics.c: Ditto.
9005 * stub-objc.c: Ditto.
9007 2015-01-08 Jason Merrill <jason@redhat.com>
9009 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9010 do_ubsan_in_current_function.
9011 (ubsan_maybe_instrument_reference_or_call): Likewise.
9012 * c-ubsan.h: Declare it.
9014 2015-01-08 Mike Stump <mikestump@comcast.net>
9016 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9018 2015-01-07 Marek Polacek <polacek@redhat.com>
9021 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9022 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9024 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9027 * c.opt (Wsuggest-override): New option.
9029 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9031 Update copyright years.
9033 2015-01-05 Marek Polacek <polacek@redhat.com>
9036 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9038 * c-common.h (warn_array_subscript_with_type_char): Update
9041 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9043 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9044 Control macro with flag_sized_deallocation.
9046 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9048 * c.opt (Wdiscarded-array-qualifiers): New option.
9050 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9052 PR preprocessor/63831
9053 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9054 and __has_cpp_attribute here.
9055 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9056 c_common_has_attribute.
9057 * c-common.h (c_common_has_attribute): New prototype.
9058 * c-lex.c (init_c_lex): Set cb->has_attribute to
9059 c_common_has_attribute instead of cb_has_attribute.
9060 (get_token_no_padding): New function.
9061 (cb_has_attribute): Renamed to ...
9062 (c_common_has_attribute): ... this. No longer static. Use
9063 get_token_no_padding, require ()s, don't build TREE_LIST
9064 unnecessarily, fix up formatting, adjust diagnostics, call
9067 2014-12-15 Jason Merrill <jason@redhat.com>
9069 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9070 (-Wsized-deallocation): New.
9071 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9072 to on in C++14 and up.
9074 2014-12-11 Jason Merrill <jason@redhat.com>
9076 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9078 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9079 we aren't complaining about VLAs.
9081 2014-12-06 Marek Polacek <polacek@redhat.com>
9083 PR tree-optimization/64183
9084 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9085 shift-expression if it is integer_type_node. Use types_compatible_p.
9087 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9089 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9090 last argument from create_tmp_var_raw and create_tmp_var calls.
9091 * cilk.c (gimplify_cilk_spawn): Likewise.
9092 * c-omp.c (c_finish_omp_atomic): Likewise.
9094 2014-11-28 Marek Polacek <polacek@redhat.com>
9096 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9097 instead of unsigned_type_node.
9099 2014-11-28 Marek Polacek <polacek@redhat.com>
9102 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9104 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9105 expression to unsigned_type_node.
9107 2014-11-20 Mark Wielaard <mjw@redhat.com>
9110 * c-opts.c (set_std_c89): Set lang_hooks.name.
9111 (set_std_c99): Likewise.
9112 (set_std_c11): Likewise.
9113 (set_std_cxx98): Likewise.
9114 (set_std_cxx11): Likewise.
9115 (set_std_cxx14): Likewise.
9116 (set_std_cxx1z): Likewise.
9118 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9121 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9122 return type to bool.
9123 * c-common.c: Include gimple-expr.h.
9124 (convert_vector_to_pointer_for_subscript): Change return type to
9125 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9126 and copy it into a TARGET_EXPR and use that instead of *vecp
9129 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9131 Merger of git branch "gimple-classes-v2-option-3".
9132 * ChangeLog.gimple-classes: New.
9133 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9134 from being just a vec<gimple> to a vec<gbind *>.
9136 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9139 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9140 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9141 get_pointer_alignment for non-pointers. Use ptype, or if it is
9142 reference type, corresponding pointer type, as type of kind
9144 (ubsan_maybe_instrument_reference,
9145 ubsan_maybe_instrument_member_call): Adjust callers.
9147 2014-11-15 Marek Polacek <polacek@redhat.com>
9150 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9152 (extract_array_notation_exprs): Return for NULL node.
9154 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9156 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9157 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9159 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9162 * c-common.c (check_builtin_function_arguments): Handle
9163 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9165 2014-11-10 Andi Kleen <ak@linux.intel.com>
9168 * c-common.h (check_no_cilk): Declare.
9169 * cilk.c (get_error_location): New function.
9170 (check_no_cilk): Dito.
9172 2014-11-10 Andi Kleen <ak@linux.intel.com>
9174 * cilk.c (recognize_spawn): Use expression location
9177 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9179 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9181 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9183 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9184 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9185 (__cpp_range_based_for, __cpp_initializer_lists,
9186 __cpp_delegating_constructors, __cpp_nsdmi,
9187 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9188 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9189 __has_cpp_attribute.
9190 * c-lex.c (cb_has_attribute): New callback CPP function;
9191 (init_c_lex): Set has_attribute callback.
9193 2014-11-04 Richard Biener <rguenther@suse.de>
9195 * c-common.c (shorten_compare): Do not shorten mixed
9196 DFP and non-DFP compares.
9198 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9200 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9201 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9202 Commentary and rearrangement of tests.
9203 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9204 Commentary and rearrangement of tests.
9205 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9206 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9208 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9210 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9211 enum from machine_mode.
9213 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9215 * c-common.c: Adjust include files.
9216 * c-gimplify.c: Ditto.
9218 * c-pragma.c: Ditto.
9221 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9223 * c-gimplify.c: Adjust include files.
9225 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9228 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9229 c_common_initialize_diagnostics.
9230 * c-common.h: Likewise.
9232 2014-10-24 Marek Polacek <polacek@redhat.com>
9235 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9236 print "struct"/"union"/"enum" for typedefed names.
9238 2014-10-23 Marek Polacek <polacek@redhat.com>
9240 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9243 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9244 Yury Gribov <y.gribov@samsung.com>
9246 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9247 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9248 instead of flag_sanitize_recover as bool flag.
9250 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9252 * cilk.c: Revert previous change.
9254 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9257 * cilk.c: Include vec.h.
9258 (struct cilk_decls): New structure.
9259 (wrapper_parm_cb): Split this function to...
9260 (fill_decls_vec): ...this...
9261 (create_parm_list): ...and this.
9262 (compare_decls): New function.
9263 (for_local_cb): Remove.
9264 (wrapper_local_cb): Ditto.
9265 (build_wrapper_type): For now first traverse and fill vector of
9266 declarations then sort it and then deal with sorted vector.
9267 (cilk_outline): Ditto.
9268 (declare_one_free_variable): Ditto.
9270 2014-10-17 Marek Polacek <polacek@redhat.com>
9272 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9273 * c.opt (Wimplicit-int): Initialize to -1.
9275 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9277 * c-pragma.c: Adjust include files.
9278 * c-semantics.c: Likewise.
9280 2014-10-16 DJ Delorie <dj@redhat.com>
9282 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9285 2014-10-14 Jason Merrill <jason@redhat.com>
9288 * c-common.h (CPP_PREPARSED_EXPR): New.
9289 (N_CP_TTYPES): Adjust.
9291 2014-10-15 Marek Polacek <polacek@redhat.com>
9293 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9295 2014-10-14 DJ Delorie <dj@redhat.com>
9297 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9298 types, not just __int128.
9299 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9300 types, not just __int128.
9301 (cpp_atomic_builtins): Round pointer sizes up.
9302 (type_suffix): Use type precision, not specific types.
9303 * c-common.c (c_common_reswords): Remove __int128 special case.
9304 (c_common_type_for_size): Check for all __intN types, not just
9306 (c_common_type_for_mode): Likewise.
9307 (c_common_signed_or_unsigned_type): Likewise.
9308 (c_build_bitfield_integer_type): Likewise.
9309 (c_common_nodes_and_builtins): Likewise.
9310 (keyword_begins_type_specifier): Likewise.
9311 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9314 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9316 * c-common.c: Use hash_table instead of hashtab.
9318 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9320 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9323 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9328 * c-common.c (warn_logical_operator): Punt for vectors.
9330 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9332 Implement SD-6: SG10 Feature Test Recommendations
9333 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9334 macros and the __has_header macro.
9336 2014-09-30 Jason Merrill <jason@redhat.com>
9338 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9339 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9340 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9342 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9343 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9345 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9346 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9348 2014-09-24 Marek Polacek <polacek@redhat.com>
9352 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9354 2014-09-23 Andi Kleen <ak@linux.intel.com>
9356 * c-common.c (handle_no_reorder_attribute): New function.
9357 (c_common_attribute_table): Add no_reorder attribute.
9359 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9361 * c-cppbuiltin.c (c_cpp_builtins): Define
9362 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9365 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9367 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9368 for supported floating-point modes.
9370 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9372 * c.opt (Wpsabi): Use LangEnabledBy.
9373 * c-opts.c (c_common_handle_option): Do not handle here.
9375 2014-09-12 Joseph Myers <joseph@codesourcery.com>
9377 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9378 macros for floating-point modes.
9380 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
9383 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9384 __*_DENORM_MIN__ without denormals.
9386 2014-09-10 Jakub Jelinek <jakub@redhat.com>
9388 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9389 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9390 ubsan_create_data callers.
9391 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9392 index is constant or BIT_AND_EXPR with constant mask and is
9393 small enough for the bound.
9394 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9395 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9397 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9399 * c.opt: Add CppReason to various flags.
9400 (Wdate-time): Re-sort.
9401 * c-common.c: Include c-common.h earlier.
9402 (struct reason_option_codes_t): Delete.
9403 (c_option_controlling_cpp_error): Prefix global type and struct
9406 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9408 * c.opt (Wnormalized): New.
9409 (Wnormalized=): Use Enum and Reject Negative.
9410 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9412 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9414 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9415 digits of floating-point modes if -fbuilding-libgcc.
9417 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9419 * c-cppbuiltin.c (c_cpp_builtins): Also define
9420 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9421 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9422 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9423 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9424 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9425 __LIBGCC_STACK_GROWS_DOWNWARD__,
9426 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9427 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9428 __LIBGCC_DWARF_FRAME_REGISTERS__,
9429 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9430 __LIBGCC_STACK_POINTER_REGNUM__ and
9431 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9432 (builtin_define_with_value): Handle backslash-escaping in string
9435 2014-09-05 Richard Biener <rguenther@suse.de>
9438 * c-format.c (check_format_arg): Properly handle
9439 effectively signed POINTER_PLUS_EXPR offset.
9441 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9443 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9444 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9445 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9447 * c-opts.c (c_common_handle_option): Do not handle here.
9448 (sanitize_cpp_opts): Likewise.
9449 * c-common.c (struct reason_option_codes_t): Handle
9450 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9452 2014-09-03 Marek Polacek <polacek@redhat.com>
9454 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9456 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9457 Balaji V. Iyer <balaji.v.iyer@intel.com>
9458 Igor Zamyatin <igor.zamyatin@intel.com>
9460 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9461 * c-common.c (c_common_reswords): Added _Cilk_for.
9462 * c-common.h (enum rid): Added RID_CILK_FOR.
9463 (cilk_for_number_of_iterations): Add declaration.
9464 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9466 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9467 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9469 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9471 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9472 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9473 Wundef): Use CPP, Var and Init.
9474 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9476 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9478 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9479 * c-opts.c (c_common_handle_option): Do not handle here.
9481 2014-08-25 Jason Merrill <jason@redhat.com>
9483 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9484 -std=c++14 and -std=gnu++14, rather than the reverse.
9485 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9486 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9487 * c-common.h (cxx_dialect): Remove cxx1y.
9489 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9491 * c-common.h (enum cxx_dialect): Add cxx14.
9492 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9493 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9494 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9496 2014-08-22 Jason Merrill <jason@redhat.com>
9498 * c.opt (std=gnu++17): Fix alias.
9500 2014-08-22 Marek Polacek <polacek@redhat.com>
9503 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9504 check for vector types. Drop LHS argument.
9505 * c-common.h (warn_logical_not_parentheses): Adjust.
9507 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9509 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9510 (Wmultichar): Likewise.
9511 (Wdate-time): Use C-family languages instead of Common. Use CPP
9513 * c-opts.c (c_common_handle_option): Do not handle the above
9515 (sanitize_cpp_opts): Likewise.
9517 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9520 * c-opts.c: Include tree-diagnostics.h.
9521 (c_diagnostic_finalizer): New.
9522 (c_common_initialize_diagnostics): Use it.
9524 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9526 PR preprocessor/51303
9527 * c-common.c (struct reason_option_codes_t option_codes):
9528 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9530 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9534 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9535 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9536 (c_common_post_options): Call init_global_opts_from_cpp.
9537 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9539 2014-08-19 Marek Polacek <polacek@redhat.com>
9542 * c-common.c (maybe_warn_bool_compare): New function.
9543 * c-common.h (maybe_warn_bool_compare): Declare.
9544 * c.opt (Wbool-compare): New option.
9546 2014-08-19 Marek Polacek <polacek@redhat.com>
9548 * c.opt (Wc99-c11-compat): New option.
9550 2014-08-19 Marek Polacek <polacek@redhat.com>
9552 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9553 to warn_c90_c99_compat.
9554 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9557 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9558 Steven Bosscher <steven@gcc.gnu.org>
9561 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9562 format_check_results.
9563 (check_function_format): Use true and add comment for boolean
9565 (finish_dollar_format_checking): Use explicit location when warning.
9566 (check_format_info): Likewise.
9567 (check_format_arg): Set extra_arg_loc and format_string_loc.
9568 (check_format_info_main): Use explicit location when warning.
9569 (check_format_types): Pass explicit location.
9570 (format_type_warning): Likewise.
9572 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9575 * c-format.c: Handle Fortran flags.
9577 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9580 * array-notation-common.c (find_rank): Added handling for other
9581 types of references.
9583 2014-08-10 Marek Polacek <polacek@redhat.com>
9586 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9587 * c.opt (Wc90-c99-compat): Add option.
9589 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9591 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9593 2014-08-03 Marek Polacek <polacek@redhat.com>
9595 * c-common.c (check_case_value): Add location_t parameter. Use it.
9596 (c_add_case_label): Pass loc to check_case_value.
9598 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9600 * cilk.c: Use hash_map instead of pointer_map.
9602 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9604 * c-gimplify.c: Use hash_set instead of pointer_set.
9606 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9609 * array-notation-common.c (extract_array_notation_exprs): Handling
9612 2014-08-01 Jakub Jelinek <jakub@redhat.com>
9614 * c-common.h (min_align_of_type): Removed prototype.
9615 * c-common.c (min_align_of_type): Removed.
9616 * c-ubsan.h (ubsan_maybe_instrument_reference,
9617 ubsan_maybe_instrument_member_call): New prototypes.
9618 * c-ubsan.c: Include stor-layout.h and builtins.h.
9619 (ubsan_maybe_instrument_reference_or_call,
9620 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9623 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
9626 * c.opt (-Wreturn-local-addr): Move to common.opt.
9628 2014-07-30 Jason Merrill <jason@redhat.com>
9633 * c.opt (-fuse-all-virtuals): New.
9635 2014-07-30 Tom Tromey <tromey@redhat.com>
9638 * c.opt (Wdesignated-init): New option.
9639 * c-common.c (c_common_attribute_table): Add "designated_init".
9640 (handle_designated_init): New function.
9642 2014-07-24 Marek Polacek <polacek@redhat.com>
9645 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9647 2014-07-16 Dodji Seketeli <dodji@redhat.com>
9649 PR preprocessor/60723 - missing system-ness marks for macro tokens
9650 * c-ppoutput.c (struct print::prev_was_system_token): New data
9652 (init_pp_output): Initialize it.
9653 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9654 (do_line_change): Return a flag saying if a line marker was
9656 (scan_translation_unit): Detect if the system-ness of the token we
9657 are about to emit is different from the one of the previously
9658 emitted token. If so, emit a line marker. Avoid emitting useless
9659 adjacent line markers. Avoid emitting line markers for tokens
9660 originating from the expansion of built-in macros.
9661 (scan_translation_unit_directives_only): Adjust.
9663 2014-07-15 Marek Polacek <polacek@redhat.com>
9665 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9666 TYPE_MAX_VALUE is NULL.
9668 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9671 * c.opt (Wmemset-transposed-args): New warning.
9673 2014-07-10 Jason Merrill <jason@redhat.com>
9677 * c.opt (-fuse-all-virtuals): New.
9679 2014-07-09 Richard Biener <rguenther@suse.de>
9682 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9683 using unsigned arithmetic if overflow does not wrap instead of
9684 if overflow is undefined.
9686 2014-07-06 Marek Polacek <polacek@redhat.com>
9689 * c.opt (Wsizeof-array-argument): New option.
9691 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9693 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9694 comments->count <= 1, as comments->entries might be NULL.
9696 2014-07-01 Marek Polacek <polacek@redhat.com>
9698 * c.opt (Wint-conversion): New option.
9700 2014-07-01 Marek Polacek <polacek@redhat.com>
9703 * c.opt (Wincompatible-pointer-types): New option.
9705 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9708 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9709 Do not discard TYPE_QUALS of type.
9711 2014-06-26 Jason Merrill <jason@redhat.com>
9713 * c-common.h (enum cxx_dialect): Add cxx1z.
9714 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9715 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9717 2014-06-26 Teresa Johnson <tejohnson@google.com>
9719 * c-common.h (get_dump_info): Declare.
9720 * c-gimplify.c (c_genericize): Use saved dump files.
9721 * c-opts.c (c_common_parse_file): Begin and end dumps
9722 once around parsing invocation.
9723 (get_dump_info): New function.
9725 2014-06-23 Marek Polacek <polacek@redhat.com>
9726 Andrew MacLeod <amacleod@redhat.com>
9729 * c-common.c (get_atomic_generic_size): Don't segfault if the
9730 type doesn't have a size.
9732 2014-06-20 Marek Polacek <polacek@redhat.com>
9734 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9735 (ubsan_walk_array_refs_r): New function.
9736 (c_genericize): Instrument array bounds.
9737 * c-ubsan.c: Include "internal-fn.h".
9738 (ubsan_instrument_division): Mark instrumented arrays as having
9739 side effects. Adjust ubsan_type_descriptor call.
9740 (ubsan_instrument_shift): Likewise.
9741 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9742 (ubsan_instrument_bounds): New function.
9743 (ubsan_array_ref_instrumented_p): New function.
9744 (ubsan_maybe_instrument_array_ref): New function.
9745 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9746 (ubsan_array_ref_instrumented_p): Declare.
9747 (ubsan_maybe_instrument_array_ref): Declare.
9749 2014-06-20 Hale Wang <hale.wang@arm.com>
9752 * c.opt (fshort-enums): Add to LTO.
9753 * c.opt (fshort-wchar): Likewise.
9755 2014-06-16 Marek Polacek <polacek@redhat.com>
9758 * c.opt (Wswitch-bool): Add Var.
9760 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9763 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9764 #pragma omp target teams or
9765 #pragma omp {,target }teams distribute simd.
9767 2014-06-12 Jason Merrill <jason@redhat.com>
9769 * c.opt (Wabi=, fabi-compat-version): New.
9770 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9771 (c_common_post_options): Handle flag_abi_compat_version default.
9772 Disallow -fabi-compat-version=1.
9773 * c-common.h (abi_version_crosses): New.
9775 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9777 * c-common.c (handle_section_attribute): Update handling for
9778 section names that are no longer trees.
9780 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9783 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9784 (omp_pragmas): ... back here.
9786 2014-06-05 Marek Polacek <polacek@redhat.com>
9789 * c-common.c (warn_logical_not_parentheses): New function.
9790 * c-common.h (warn_logical_not_parentheses): Declare.
9791 * c.opt (Wlogical-not-parentheses): New option.
9793 2014-06-04 Marek Polacek <polacek@redhat.com>
9796 * c-common.c (check_case_bounds): Add location parameter.
9798 (c_add_case_label): Pass loc to check_case_bounds.
9800 2014-06-03 Marek Polacek <polacek@redhat.com>
9803 * c.opt (Wswitch-bool): New option.
9805 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9807 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9809 (record_types_used_by_current_var_decl): Move prototype to where
9812 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9813 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9814 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9816 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9818 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9819 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9821 * c-pretty-print.c (pp_c_void_constant): New function.
9822 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9823 (c_pretty_printer::expression): Handle VOID_CST.
9824 * cilk.c (extract_free_variables): Likewise.
9825 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9826 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9828 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9830 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9831 * c-pragma.c (push_alignment): Adjust.
9832 (handle_pragma_push_options): Likewise.
9834 2014-05-09 Marek Polacek <polacek@redhat.com>
9837 * c-common.c (check_user_alignment): Return -1 if alignment is error
9839 (handle_aligned_attribute): Don't call default_conversion on
9841 (handle_vector_size_attribute): Likewise.
9842 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9843 (handle_sentinel_attribute): Call default_conversion and allow even
9844 integral types as an argument.
9846 2014-05-08 Marek Polacek <polacek@redhat.com>
9849 * c-common.c (min_align_of_type): New function factored out from...
9850 (c_sizeof_or_alignof_type): ...here.
9851 * c-common.h (min_align_of_type): Declare.
9853 2014-05-08 Marek Polacek <polacek@redhat.com>
9856 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9857 parameter type of main.
9859 2014-05-07 DJ Delorie <dj@redhat.com>
9861 * c-cppbuiltin.c (print_bits_of_hex): New.
9862 (builtin_define_type_minmax): Print values using hex so as not to
9863 require a pre-computed list of string values.
9865 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9866 Mike Stump <mikestump@comcast.net>
9867 Richard Sandiford <rdsandiford@googlemail.com>
9869 * c-ada-spec.c: Include wide-int.h.
9870 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9871 (dump_generic_ada_node): Use wide-int interfaces.
9872 * c-common.c: Include wide-int-print.h.
9873 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9874 (pointer_int_sum): Use wide-int interfaces.
9875 (c_common_nodes_and_builtins): Use make_int_cst.
9876 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9877 (handle_alloc_size_attribute): Use wide-int interfaces.
9878 (get_nonnull_operand): Likewise.
9879 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9880 * c-lex.c: Include wide-int.h.
9881 (narrowest_unsigned_type): Take a widest_int rather than two
9883 (narrowest_signed_type): Likewise.
9884 (interpret_integer): Update accordingly. Use wide-int interfaces.
9885 (lex_charconst): Use wide-int interfaces.
9886 * c-pretty-print.c: Include wide-int.h.
9887 (pp_c_integer_constant): Use wide-int interfaces.
9888 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9889 INT_CST_LT_UNSIGNED.
9891 2014-05-06 Richard Biener <rguenther@suse.de>
9893 * c-opts.c (c_common_post_options): For -freestanding,
9894 -fno-hosted and -fno-builtin disable pattern recognition
9895 if not enabled explicitely.
9897 2014-05-02 Marek Polacek <polacek@redhat.com>
9899 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9901 2014-05-01 Marek Polacek <polacek@redhat.com>
9904 * c.opt (Wdiscarded-qualifiers): Add.
9906 2014-04-30 Marek Polacek <polacek@redhat.com>
9908 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9909 INT_MIN / -1 sanitization only for integer types.
9911 2014-04-25 Marek Polacek <polacek@redhat.com>
9914 * c-common.c (handle_noinline_attribute): Warn if the attribute
9915 conflicts with always_inline attribute.
9916 (handle_always_inline_attribute): Warn if the attribute conflicts
9917 with noinline attribute.
9919 2014-04-25 Marek Polacek <polacek@redhat.com>
9922 * c-common.c (check_main_parameter_types): Warn about variadic main.
9924 2014-04-24 Mike Stump <mikestump@comcast.net>
9926 * c.opt (Wshadow-ivar): Default to on.
9928 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9930 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9932 2014-04-23 Marek Polacek <polacek@redhat.com>
9934 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9936 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9939 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9940 if flag_sanitize_undefined_trap_on_error.
9941 (ubsan_instrument_division, ubsan_instrument_shift,
9942 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9943 if !flag_sanitize_recover.
9945 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
9948 * c-common.c (registered_builtin_types): Make non-static.
9949 * c-common.h (registered_builtin_types): Declare.
9951 2014-04-14 Richard Biener <rguenther@suse.de>
9952 Marc Glisse <marc.glisse@inria.fr>
9955 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9956 apply may-alias the scalar pointer type when applicable.
9958 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9961 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9962 as possible argument for Cilk_spawn.
9964 2014-04-11 Tobias Burnus <burnus@net-b.de>
9967 * c.opt (Wformat-signedness): Add
9968 * c-format.c(check_format_types): Use it.
9970 2014-04-11 Jason Merrill <jason@redhat.com>
9973 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9974 default_conversion for an array argument.
9976 2014-04-08 Marek Polacek <polacek@redhat.com>
9979 * c-ubsan.c: Include asan.h.
9980 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9982 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9984 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9986 2014-04-02 Marek Polacek <polacek@redhat.com>
9988 * c-common.h (c_expand_expr): Remove declaration.
9990 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9993 * c-common.c (add_atomic_size_parameter): When creating new
9994 params vector, push the size argument first.
9996 2014-03-26 Jakub Jelinek <jakub@redhat.com>
9998 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9999 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10000 ubsan_create_data callers.
10002 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10005 * c-opts.c (c_finish_options): Restore cb_file_change call to
10008 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10010 PR middle-end/36282
10011 * c-pragma.c (apply_pragma_weak): Only look at
10012 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10013 DECL_ASSEMBLER_NAME_SET_P (decl).
10014 (maybe_apply_pending_pragma_weaks): Exit early if
10015 vec_safe_is_empty (pending_weaks) rather than only when
10017 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10018 set assembler name back to NULL afterwards.
10020 2014-03-11 Jason Merrill <jason@redhat.com>
10022 * c.opt: Add -std=gnu++14.
10024 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10026 * c-opts.c (c_common_post_options): Don't override
10027 -ffp-contract=fast if unsafe-math-optimizations is on.
10029 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10031 * c.opt: Enable LTO FE for fshort-double.
10033 2014-03-07 Jason Merrill <jason@redhat.com>
10035 * c.opt: Add -std=c++14.
10037 2014-03-06 Marek Polacek <polacek@redhat.com>
10040 * cilk.c (contains_cilk_spawn_stmt): New function.
10041 (contains_cilk_spawn_stmt_walker): Likewise.
10042 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10043 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10045 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10047 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10048 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10049 even when flag_preprocess_only.
10051 2014-02-26 Jason Merrill <jason@redhat.com>
10055 * c-common.c (shorten_compare): Don't check
10056 c_inhibit_evaluation_warnings.
10058 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10061 * c-common.c (c_common_nodes_and_builtins): When initializing
10062 c_uint{16,32,64}_type_node, also set corresponding
10063 uint{16,32,64}_type_node to the same value.
10066 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10067 for PRAGMA_IVDEP if flag_preprocess_only.
10069 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10072 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10073 if false, add ADD itself, rather than vice versa.
10074 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10075 copy. For SAVE_EXPR, only call merge_tlist once.
10077 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10079 PR middle-end/60092
10080 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10082 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10084 (c_common_attribute_table): Add alloc_align and assume_aligned
10087 2014-02-06 Marek Polacek <polacek@redhat.com>
10090 * c-common.c (warn_for_sign_compare): Call warning_at with location
10091 instead of warning.
10093 2014-02-05 Marek Polacek <polacek@redhat.com>
10096 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10099 2014-02-04 Marek Polacek <polacek@redhat.com>
10102 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10105 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10109 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10110 handle_vector_size_attribute, handle_nonnull_attribute): Call
10111 default_conversion on the attribute argument.
10112 (handle_nonnull_attribute): Increment the argument number.
10114 2014-01-31 Marek Polacek <polacek@redhat.com>
10117 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10118 build_function_call_vec.
10119 (resolve_overloaded_builtin): Likewise.
10120 * c-common.h (build_function_call_vec): Adjust declaration.
10122 2014-01-30 Marek Polacek <polacek@redhat.com>
10125 * c-common.h (unsafe_conversion_p): Adjust declaration.
10126 (warnings_for_convert_and_check): Likewise.
10127 (convert_and_check): Likewise.
10128 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10129 expansion_point_location_if_in_system_header on it.
10130 (warnings_for_convert_and_check): Add location parameter. Call
10131 expansion_point_location_if_in_system_header on it. Use it.
10132 (convert_and_check): Add location parameter. Use it.
10133 (conversion_warning): Likewise.
10134 (c_add_case_label): Adjust convert_and_check calls.
10135 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10137 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10139 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10141 * c-pragma.c (init_pragma): Likewise.
10144 2014-01-23 Marek Polacek <polacek@redhat.com>
10147 * c-common.c (shorten_compare): Add location_t parameter.
10148 * c-common.h (shorten_binary_op): Adjust declaration.
10150 2014-01-23 Marek Polacek <polacek@redhat.com>
10153 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10154 * c-common.h: Declare it.
10156 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10158 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10159 * c-ada-spec.c (dump_ads): Likewise.
10160 (cpp_check): Likewise.
10161 (dump_ada_specs): Likewise.
10163 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10166 * c-common.c (handle_no_instrument_function_attribute): Allow
10167 no_instrument_function attribute in class member
10168 definition/declaration.
10170 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10173 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10174 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10175 being COMPOUND_EXPR.
10176 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10177 operand a SAVE_EXPR and second MODIFY_EXPR.
10179 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10182 * c-pch.c (c_common_write_pch): Call
10183 prepare_target_option_nodes_for_pch.
10185 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10187 Update copyright years
10189 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10191 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10192 the copyright notice.
10194 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10196 * c-ada-spec.c (print_constructor): New function.
10197 (print_destructor): Retrieve the origin of the destructor.
10198 (print_ada_declaration): Revamp handling of constructors/destructors.
10200 2013-12-23 Stuart Hastings <stuart@apple.com>
10201 Bill Maddox <maddox@google.com>
10202 Jason Merrill <jason@redhat.com>
10204 * c.opt: Add -fdeclone-ctor-dtor.
10205 * c-opts.c (c_common_post_options): Default to on iff -Os.
10207 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10209 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10211 * c-pragma.h (enum pragma_cilk_clause): Remove.
10212 (enum pragma_omp_clause): Added the following fields:
10213 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10214 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10215 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10216 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10217 PRAGMA_CILK_CLAUSE_UNIFORM.
10220 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10222 * cilk.c (cilk_outline): Made this function non-static.
10223 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10224 (create_cilk_wrapper): Added a new parameter: a function pointer.
10225 (c_install_body_w_frame_cleanup): Remove
10226 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10227 * c-common.h (cilk_outline): New prototype.
10228 (gimplify_cilk_spawn): Removed two parameters.
10229 (cilk_install_body_with_frame_cleanup): New prototype.
10230 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10231 CILK_SPAWN_STMT case.
10233 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10235 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10237 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10238 (int_array_type_node): Remove.
10239 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10241 2013-12-05 Marek Polacek <polacek@redhat.com>
10244 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10245 [ADJUST_FIELD_ALIGN].
10247 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10250 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10251 and check field alignment if set.
10252 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10253 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10255 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10256 Marek Polacek <polacek@redhat.com>
10258 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10259 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10261 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10264 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10267 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10270 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10271 goto invalid. If it is error_mark_node, don't issue further
10274 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10276 * c.opt (Wopenmp-simd): New.
10278 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10280 * c-ubsan.h (ubsan_instrument_return): New prototype.
10281 * c-ubsan.c (ubsan_instrument_return): New function.
10283 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10285 * c-common.c: Add required include files from gimple.h.
10286 * c-gimplify.c: Likewise.
10287 * cilk.c: Likewise.
10289 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10291 * c-common.c (unsafe_conversion_p): Remove use of
10292 EXPR_LOC_OR_HERE macro.
10293 (conversion_warning): Likewise.
10294 (warnings_for_convert_and_check): Likewise.
10295 (warn_for_collisions_1): Likewise.
10296 (shorten_compare): Likewise, and remove use of in_system_header
10297 macro, using the location from the former.
10298 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10299 (cb_def_pragma): Remove use of in_system_header macro.
10300 (lex_string): Likewise.
10301 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10303 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10304 Mike Stump <mikestump@comcast.net>
10305 Richard Sandiford <rdsandiford@googlemail.com>
10307 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10308 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10309 tree_fits_shwi_p or tree_fits_uhwi_p.
10310 (dump_generic_ada_node): Likewise.
10311 * c-format.c (check_format_arg): Likewise.
10312 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10314 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10316 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10318 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10321 * c-common.c (unsafe_conversion_p): Make this function
10322 return an enumeration with more detail.
10323 (conversion_warning): Use the new return type of
10324 unsafe_conversion_p to separately warn either about conversions
10325 that lower floating point number precision or about the other
10326 kinds of conversions.
10327 * c-common.h (enum conversion_safety): New enumeration.
10328 (unsafe_conversion_p): switching return type to
10329 conversion_safety enumeration.
10330 * c.opt: Adding new warning -Wfloat-conversion and
10331 enabling it with -Wconversion.
10333 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10335 * c-opts.c: Include plugin.h.
10336 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10338 2013-11-19 Marek Polacek <polacek@redhat.com>
10340 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10342 (ubsan_instrument_shift): Likewise.
10343 (ubsan_instrument_vla): Likewise.
10345 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10347 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10348 cast to unsigned type.
10350 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10352 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10354 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10355 rather than tree_low_cst.
10357 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10359 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10360 tree_to_uhwi throughout.
10362 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10364 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10365 tree_low_cst (..., 0) with tree_to_shwi throughout.
10367 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10369 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10370 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10372 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10374 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10375 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10377 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
10379 * c-cilkplus.c: New file.
10380 * c-common.c (readonly_error): Add location argument.
10381 * c-common.h (readonly_error): Same.
10382 (c_finish_cilk_clauses): Protoize.
10383 (c_check_cilk_loop): Same.
10384 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10385 Do not fail on error_mark_node.
10386 Abstract increment canonicalization to here...
10387 (c_omp_for_incr_canonicalize_ptr): New.
10388 c-pragma.c (init_pragma): Register "simd" pragma.
10389 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10390 (enum pragma_cilk_clause): New.
10392 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10394 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10395 wchar_type and host_integerp checks.
10397 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10399 * c-common.c: Likewise.
10400 * c-gimplify.c: Likewise.
10401 * cilk.c: Likewise.
10403 2013-11-14 Diego Novillo <dnovillo@google.com>
10405 * c-common.c: Include fold-const.h.
10406 Include stor-layout.h.
10408 Include stringpool.h.
10411 Include trans-mem.h.
10412 * c-cppbuiltin.c: Include stor-layout.h.
10413 Include stringpool.h.
10414 * c-format.c: Include stringpool.h.
10415 * c-lex.c: Include stringpool.h.
10416 Include stor-layout.h.
10417 * c-pragma.c: Include stringpool.h.
10420 Include gcc-symtab.h.
10421 * c-pretty-print.c: Include stor-layout.h.
10423 * cilk.c: Include stringpool.h.
10426 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10428 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10429 * c-common.c (c_common_reswords): Add __auto_type.
10430 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10432 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10434 * c-common.c: Include gimplify.h.
10435 * c-gimplify.c: Likewise.
10436 * cilk.c: Likewise.
10437 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10438 * c-ubsan.c: Don't include gimple.h.
10440 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10442 * c-common.c (c_common_reswords): Add _Thread_local.
10444 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10446 * c-common.c (atomic_size_supported_p): New function.
10447 (resolve_overloaded_atomic_exchange)
10448 (resolve_overloaded_atomic_compare_exchange)
10449 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10450 Use it instead of comparing size with a local list of sizes.
10452 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10453 Joseph Myers <joseph@codesourcery.com>
10455 * c-common.h (enum rid): Add RID_ATOMIC.
10456 * c-common.c (c_common_reswords): Add _Atomic.
10457 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10458 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10459 * c-format.c (check_format_types): Check for extra _Atomic
10460 qualifiers in format argument.
10461 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10462 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10464 2013-11-06 Tobias Burnus <burnus@net-b.de>
10466 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10468 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10470 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10472 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10473 to mean lack of IEEE 754 support.
10475 2013-11-05 Tobias Burnus <burnus@net-b.de>
10477 * c.opt (-Wdate-time): New option
10478 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10480 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10482 * c-cppbuiltin.c (cpp_iec_559_value): Test
10483 flag_excess_precision_cmdline not flag_excess_precision.
10485 2013-11-05 Tobias Burnus <burnus@net-b.de>
10487 * c.opt (fopenmp-simd): New option.
10488 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10489 (omp_pragmas): ... this new struct.
10490 (c_pp_lookup_pragma): Also walk omp_pragmas.
10491 (init_pragma): Init pragmas for -fopenmp-simd.
10493 2013-11-04 Marek Polacek <polacek@redhat.com>
10496 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10498 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10500 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10502 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10504 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10506 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10507 (dump_ada_specs): Adjust prototype of second callback.
10508 * c-ada-spec.c (cpp_check): New global variable.
10509 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10510 (print_generic_ada_decl): Likewise.
10511 (has_static_fields): Change return type to bool and add guard.
10512 (has_nontrivial_methods): New predicate.
10513 (is_tagged_type): Change return type to bool.
10514 (separate_class_package): Call has_nontrivial_methods.
10515 (pp_ada_tree_identifier): Minor tweaks.
10516 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10517 (dump_ada_array_domains): Likewise.
10518 (dump_ada_array_type): Likewise.
10519 (dump_template_types): Remove cpp_check parameter and do not pass it to
10520 dump_generic_ada_node.
10521 (dump_ada_template): Likewise.
10522 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10524 (print_ada_methods): Change return type to integer. Remove cpp_check
10525 parameter and do not pass it down.
10526 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10527 dump_generic_ada_node.
10528 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10530 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10531 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10532 value of print_ada_methods.
10533 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10534 Set cpp_check to it before invoking dump_ada_nodes.
10535 (dump_ada_specs): Likewise.
10537 2013-11-03 Marek Polacek <polacek@redhat.com>
10539 * c-ubsan.c: Don't include hash-table.h.
10540 (ubsan_instrument_vla): New function.
10541 * c-ubsan.h: Declare it.
10543 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10545 Automated part of renaming of symtab_node_base to symtab_node.
10547 Patch autogenerated by rename_symtab.py from
10548 https://github.com/davidmalcolm/gcc-refactoring-scripts
10549 revision 58bb219cc090b2f4516a9297d868c245495ee622
10551 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10552 symtab_node_base to symtab_node.
10554 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10556 Implement C++14 digit separators.
10557 * c-lex.c (interpret_float): Remove digit separators from scratch string
10558 before building real literal.
10560 2013-10-30 Jakub Jelinek <jakub@redhat.com>
10562 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10564 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10566 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10568 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10570 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10571 (insert_cilk_frame): New prototype.
10572 (cilk_init_builtins): Likewise.
10573 (gimplify_cilk_spawn): Likewise.
10574 (c_cilk_install_body_w_frame_cleanup): Likewise.
10575 (cilk_detect_spawn_and_unwrap): Likewise.
10576 (cilk_set_spawn_marker): Likewise.
10577 (build_cilk_sync): Likewise.
10578 (build_cilk_spawn): Likewise.
10579 * cilk.c: New file.
10581 2013-10-29 David Malcolm <dmalcolm@redhat.com>
10583 Patch autogenerated by refactor_symtab.py from
10584 https://github.com/davidmalcolm/gcc-refactoring-scripts
10585 revision 58bb219cc090b2f4516a9297d868c245495ee622
10587 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10588 to a true class hierarchy.
10589 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10591 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10593 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10595 2013-10-26 Jeff Law <law@redhat.com>
10597 * c-common.c (c_define_builtins): Remove mudflap support.
10598 * c.opt: Ignore and warn for mudflap options.
10600 2013-10-24 Tobias Burnus <burnus@net-b.de>
10603 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10604 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10606 2013-10-23 Jason Merrill <jason@redhat.com>
10608 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10610 2013-10-11 Jakub Jelinek <jakub@redhat.com>
10612 * c-common.h (omp_clause_mask::operator !=): New method.
10613 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10614 instead of if (mask & something) tests everywhere.
10616 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10617 201307 instead of 201107.
10618 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10619 (c_common_attribute_table): Add "omp declare target" and
10620 "omp declare simd" attributes.
10621 (handle_omp_declare_target_attribute,
10622 handle_omp_declare_simd_attribute): New functions.
10623 * c-omp.c: Include c-pragma.h.
10624 (c_finish_omp_taskgroup): New function.
10625 (c_finish_omp_atomic): Add swapped argument, if true,
10626 build the operation first with rhs, lhs arguments and use NOP_EXPR
10628 (c_finish_omp_for): Add code argument, pass it down to make_code.
10629 (c_omp_split_clauses): New function.
10630 (c_split_parallel_clauses): Removed.
10631 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10632 c_omp_declare_simd_clauses_to_decls): New functions.
10633 * c-common.h (omp_clause_mask): New type.
10634 (OMP_CLAUSE_MASK_1): Define.
10635 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10636 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10637 omp_clause_mask::operator |, omp_clause_mask::operator &,
10638 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10639 omp_clause_mask::operator ==): New methods.
10640 (enum c_omp_clause_split): New.
10641 (c_finish_omp_taskgroup): New prototype.
10642 (c_finish_omp_atomic): Add swapped argument.
10643 (c_finish_omp_for): Add code argument.
10644 (c_omp_split_clauses): New prototype.
10645 (c_split_parallel_clauses): Removed.
10646 (c_omp_declare_simd_clauses_to_numbers,
10647 c_omp_declare_simd_clauses_to_decls): New prototypes.
10648 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10649 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10650 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10651 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10652 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10653 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10654 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10655 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10656 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10657 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10658 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10659 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10660 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10661 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10662 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10663 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10664 PRAGMA_OMP_CLAUSE_UNIFORM.
10666 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10668 PR tree-optimization/20318
10669 * c-common.c (handle_returns_nonnull_attribute): New function.
10670 (c_common_attribute_table): Add returns_nonnull.
10672 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10675 * c.opt (fcheck-new): Move to common.opt.
10677 2013-09-25 Marek Polacek <polacek@redhat.com>
10678 Jakub Jelinek <jakub@redhat.com>
10681 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10682 an expression if we can prove it is correct.
10683 (ubsan_instrument_division): Likewise. Remove unnecessary
10686 2013-09-18 Marek Polacek <polacek@redhat.com>
10689 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10691 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10693 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10696 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10697 fobjc-gc, freplace-objc-classes): Accept for LTO.
10699 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10701 * c-target.def: New hook
10703 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10706 * c.opt (Wdelete-incomplete): Add.
10708 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10710 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10711 (vector_types_compatible_elements_p): New function.
10712 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10714 (vector_types_compatible_elements_p): Declare.
10716 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10718 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10719 a virtual member function.
10720 (pp_simple_type_specifier): Remove.
10721 (pp_c_type_specifier): Likewise.
10722 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10723 Rename from pp_c_type_specifier. Adjust.
10724 (c_pretty_printer::c_pretty_printer): Do not assign to
10725 simple_type_specifier.
10727 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10729 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10731 (c_pretty_printer::storage_class_specifier): Likewise.
10732 (c_pretty_printer::initializer): Likewise.
10733 (pp_declaration): Remove.
10734 (pp_declaration_specifiers): Likewise.
10735 (pp_abstract_declarator): Likewise.
10736 (pp_declarator): Likewise.
10737 (pp_type_id): Likewise.
10738 (pp_statement): Likewise.
10739 (pp_constant): Likewise.
10740 (pp_id_expression): Likewise.
10741 (pp_primary_expression): Likewise.
10742 (pp_unary_expression): Likewise.
10743 (pp_multiplicative_expression): Likewise.
10744 (pp_conditional_expression): Likewise.
10745 (pp_assignment_expression): Likewise.
10746 (pp_expression): Likewise.
10747 (pp_c_type_id): Likewise.
10748 (pp_c_storage_class_specifier): Likewise.
10749 * c-pretty-print.c (pp_c_type_cast): Tidy.
10750 (pp_c_pointer): Likewise.
10751 (pp_c_type_specifier): Likewise.
10752 (pp_c_parameter_type_list): Likewise.
10753 (pp_c_function_definition): Likewise.
10754 (pp_c_init_declarator): Likewise.
10755 (pp_c_initializer_list): Likewise.
10756 (pp_c_constructor_elts): Likewise.
10757 (c_pretty_printer::direct_abstract_declarator): Likewise.
10758 (c_pretty_printer::declaration_specifiers): Likewise.
10759 (c_pretty_printer::primary_expression): Likewise.
10760 (c_pretty_printer::postfix_expression): Likewise.
10761 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10762 (c_pretty_printer::storage_class_specifier): Rename from
10763 pp_c_storage_class_specifier.
10764 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10765 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10766 storage_class_specifier, initializer, offset_list, flags.
10768 2013-08-30 Marek Polacek <polacek@redhat.com>
10770 * c-ubsan.c: New file.
10771 * c-ubsan.h: New file.
10773 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10775 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10777 (c_pretty_printer::declaration_specifiers): Likewise.
10778 (c_pretty_printer::declarator): Likewise.
10779 (c_pretty_printer::abstract_declarator): Likewise.
10780 (c_pretty_printer::direct_abstract_declarator): Likewise.
10781 (c_pretty_printer::direct_declarator): Likewise.
10782 (c_pretty_printer::function_specifier): Likewise.
10783 (pp_declaration): Adjust.
10784 (pp_declaration_specifiers): Likewise.
10785 (pp_abstract_declarator): Likewise.
10786 (pp_direct_declarator): Likewise.
10787 (pp_function_specifier): Likewise.
10788 (pp_direct_abstract_declarator): Remove as unused.
10789 (pp_c_declaration): Remove.
10790 (pp_c_declaration_specifiers): Likewise.
10791 (pp_c_declarator): Likewise.
10792 (pp_c_direct_declarator): Likewise.
10793 (pp_c_function_specifier): Likewise.
10794 (pp_c_direct_abstract_declarator): Likewise.
10795 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10796 from pp_c_abstract_declarator. Adjust.
10797 (c_pretty_printer::direct_abstract_declarator): Rename from
10798 pp_c_direct_abstract_declarator. Adjust.
10799 (c_pretty_printer::function_specifier): Rename from
10800 pp_c_function_specifier. Adjust.
10801 (c_pretty_printer::declaration_specifiers): Rename from
10802 pp_c_declaration_specifiers. Adjust.
10803 (c_pretty_printer::direct_declarator): Rename from
10804 pp_c_direct_declarator. Adjust.
10805 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10806 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10807 (c_pretty_printer::c_pretty_printer): Do not assign to
10808 declaration, declaration_specifiers, declarator,
10809 direct_declarator, direct_abstract_declarator, function_specifier.
10811 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10813 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10814 virtual member function.
10815 (c_pretty_printer::multiplicative_expression): Likewise.
10816 (c_pretty_printer::conditional_expression): Likewise.
10817 (c_pretty_printer::assignment_expression): Likewise.
10818 (c_pretty_printer::expression): Likewise.
10819 (pp_unary_expression): Adjust.
10820 (pp_multiplicative_expression): Likewise.
10821 (pp_assignment_expression): Likewise.
10822 (pp_conditional_expression): Likewise.
10823 (pp_expression): Likewise.
10824 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10825 from pp_c_unary_expression. Adjust.
10826 (c_pretty_printer::multiplicative_expression): Rename from
10827 pp_c_multiplicative_expression. Adjust.
10828 (c_pretty_printer::conditional_expression): Rename from
10829 pp_c_conditional_expression. Adjust.
10830 (c_pretty_printer::assignment_expression): Rename from
10831 pp_c_assignment_expression. Adjust.
10832 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10833 (c_pretty_printer::c_pretty_printer): Do not assign to
10834 unary_expression, multiplicative_expression,
10835 conditional_expression, expression.
10837 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10839 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10840 virtual member function.
10841 (pp_postfix_expression): Adjust.
10842 (pp_c_postfix_expression): Remove.
10843 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10844 from pp_c_postfix_expression. Adjust.
10845 (c_pretty_printer::c_pretty_printer): Do not assign to
10846 postfix_expression.
10848 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10850 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10851 virtua member function.
10852 (pp_primary_expression): Adjust.
10853 (pp_c_primary_expression): Remove.
10854 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10855 from pp_c_primary_expression. Adjust.
10856 (pp_c_initializer_list): Use pp_primary_expression.
10857 (c_pretty_printer::c_pretty_printer): Do not assign to
10858 primary_expression.
10860 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10862 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10863 * c-pretty-print.c (M_): Remove.
10864 (c_pretty_printer::translate_string): Define.
10865 (pp_c_type_specifier): Use it.
10866 (pp_c_primary_expression): Likewise.
10867 (pp_c_expression): Likewise.
10869 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10871 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10873 (pp_c_id_expression): Remove.
10874 (pp_id_expression): Adjust.
10875 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10876 pp_c_id_expression. Adjust.
10877 (pp_c_postfix_expression): Use pp_id_expression.
10878 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10880 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10882 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10884 (pp_constant): Adjust.
10885 (pp_c_constant): Remove.
10886 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10887 pp_c_constant. Adjust.
10889 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10890 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10892 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10894 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10895 (c_pretty_printer::c_pretty_printer): Declare.
10896 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10897 c_pretty_printer_init. Adjust.
10898 (print_c_tree): Do not call c_pretty_printer_init.
10899 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10901 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10903 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10905 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10908 * c-common.c (pointer_int_sum): Add bool parameter.
10909 * c-common.h (pointer_int_sum): Adjust declaration.
10911 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10913 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10914 c_pretty_printer variable.
10916 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10918 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10920 (pp_c_base): Likewise. Adjust users.
10921 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10922 (pp_c_whitespace): Do not call pp_base.
10923 (pp_c_left_paren): Likewise.
10924 (pp_c_right_paren): Likewise.
10925 (pp_c_left_brace): Likewise.
10926 (pp_c_right_brace): Likewise.
10927 (pp_c_left_bracket): Likewise.
10928 (pp_c_right_bracket): Likewise.
10929 (pp_c_dot): Likewise.
10930 (pp_c_ampersand): Likewise.
10931 (pp_c_star): Likewise.
10932 (pp_c_arrow): Likewise.
10933 (pp_c_semicolon): Likewise.
10934 (pp_c_complement): Likewise.
10935 (pp_c_exclamation): Likewise.
10936 (pp_c_direct_declarator): Likewise.
10937 (pp_c_ws_string): Likewise.
10938 (pp_c_identifier): Likewise.
10939 (pp_c_statement): Likewise.
10940 (print_c_tree): Likewise.
10942 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10945 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10946 provide useful error strings.
10948 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10950 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10951 printer functions instead of pp_string or operators and punctuators.
10952 (dump_generic_ada_node): Likewise.
10953 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10954 (pp_c_relational_expression): Likewise.
10955 (pp_c_logical_or_expression): Likewise.
10957 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10959 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10960 functions instead of pp_character.
10961 (pp_ada_tree_identifier): Likewise.
10962 (dump_ada_double_name): Likewise.
10963 (dump_ada_function_declaration): Likewise.
10964 (dump_ada_array_domains): Likewise.
10965 (dump_template_types): Likewise.
10966 (dump_generic_ada_node): Likewise.
10967 (print_ada_declaration): Likewise.
10968 (print_ada_struct_decl): Likewise.
10969 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10971 2013-07-23 Tom Tromey <tromey@redhat.com>
10973 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10974 * c-common.c (c_common_reswords): Add _Generic.
10976 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
10978 * c-common.c: Fix typos.
10979 * c-common.h: Likewise.
10981 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
10984 * c-common.c (c_common_attribute_table): Add warn_unused.
10985 (handle_warn_unused_attribute): New.
10987 2013-07-10 Jakub Jelinek <jakub@redhat.com>
10989 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10990 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10992 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10995 * c.opt: Add Wconditionally-supported.
10997 2013-07-08 Graham Stott <graham.stott@btinternet.com>
10999 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11000 unused variables l_length and l_node.
11002 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11005 * c-common.c (complete_array_type): Delay folding first index
11006 like other indices. When folding, check for index overflow.
11008 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11011 * c-common.h (c_build_vec_perm_expr): New complain argument.
11012 * c-common.c (c_build_vec_perm_expr): Likewise.
11013 Use save_expr also in C++.
11015 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11017 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11018 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11019 * c-opts.c (c_common_post_options): Likewise.
11021 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11023 * array-notation-common.c (length_mismatch_in_expr): Changed the
11024 parameter type's from a dynamic array to a vec_tree. Also removed
11025 the size parameters.
11026 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11029 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11031 * c-common.h (struct cilkplus_an_parts): New structure.
11032 (struct cilkplus_an_loop_parts): Likewise.
11033 (cilkplus_extract_an_triplets): New prototype.
11034 (fix_sec_implicit_args): Likewise.
11035 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11036 (fix_sec_implicit_args): Likewise.
11038 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11040 * array-notation-common.c (find_inv_trees): Removed an unwanted
11042 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11043 enum rid to enum tree_code.
11045 2013-06-11 Jan Hubicka <jh@suse.cz>
11047 * c-common.c (handle_alias_ifunc_attribute): Do not set
11048 DECL_EXTERNAL for weakref variables.
11049 * c-pragma.c (handle_pragma_weak): Make sure aliases
11050 are not declared as external.
11052 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11054 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11055 function from c/c-array-notation.c.
11056 (is_cilkplus_reduce_builtin): Likewise.
11057 (find_rank): Likewise.
11058 (extract_array_notation_exprs): Likewise.
11059 (replace_array_notations): Likewise.
11060 (find_inv_trees): Likewise.
11061 (replace_inv_trees): Likewise.
11062 (contains_array_notation_expr): Likewise.
11063 (find_correct_array_notation_type): Likewise.
11064 * c-common.h (struct inv_list): Moved this struct from the file
11065 c/c-array-notation.c and added a new field called additional tcodes.
11066 (length_mismatch_in_expr_p): New prototype.
11067 (is_cilkplus_reduce_builtin): Likewise.
11068 (find_rank): Likewise.
11069 (extract_array_notation_exprs): Likewise.
11070 (replace_array_notation): Likewise.
11071 (find_inv_trees): Likewise.
11072 (replace_inv_trees): Likewise.
11073 (find_correct_array_notation_type): Likewise.
11075 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11077 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11078 function array_notation_init_builtins is called.
11079 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11080 * c-common.def (ARRAY_NOTATION_REF): New tree.
11081 * c-common.h (build_array_notation_expr): New function declaration.
11082 (build_array_notation_ref): Likewise.
11083 (extract_sec_implicit_index_arg): New extern declaration.
11084 (is_sec_implicit_index_fn): Likewise.
11085 (ARRAY_NOTATION_CHECK): New define.
11086 (ARRAY_NOTATION_ARRAY): Likewise.
11087 (ARRAY_NOTATION_START): Likewise.
11088 (ARRAY_NOTATION_LENGTH): Likewise.
11089 (ARRAY_NOTATION_STRIDE): Likewise.
11090 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11091 ARRAY_NOTATION_REF.
11092 (pp_c_expression): Likewise.
11093 * c.opt (flag_enable_cilkplus): New flag.
11094 * array-notation-common.c: New file.
11096 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11099 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11101 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11103 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11106 2013-05-07 Han Shen <shenhan@google.com>
11108 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11110 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11112 * c-common.c (check_user_alignment): Emit error for negative values.
11114 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11116 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11118 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11120 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11121 __GXX_EXPERIMENTAL_CXX1Y__.
11123 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11124 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11126 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11127 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11128 to simply use OPT_Wpointer_arith.
11129 (c_sizeof_or_alignof_type): Likewise.
11131 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11133 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11135 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11137 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11138 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11141 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11143 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11145 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11147 * c-common.c (pointer_int_sum): Remove dead code.
11149 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11151 PR middle-end/56524
11152 * c-common.c (handle_optimize_attribute): Don't call
11153 save_optabs_if_changed.
11155 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11157 PR middle-end/56461
11158 * c-pch.c (pch_init): Free target_validity at the end.
11160 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11162 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11164 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11165 Jakub Jelinek <jakub@redhat.com>
11168 * c-common.c (handle_no_sanitize_address_attribute): New function.
11169 (c_common_attribute_table): Add no_sanitize_address attribute.
11170 (handle_no_address_safety_analysis_attribute): Add
11171 no_sanitize_address attribute, not no_address_safety_analysis
11174 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11177 * c-common.c (handle_optimize_attribute): Call
11178 save_optabs_if_changed.
11180 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11181 Steven Bosscher <steven@gcc.gnu.org>
11184 * c-opts.c (c_common_post_options): If debug info is enabled
11185 and non-dwarf*, refuse to load PCH files and when writing PCH
11188 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11190 PR middle-end/56167
11191 * c-common.c (handle_error_attribute): Fix condition.
11193 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11196 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11198 2013-01-18 Jason Merrill <jason@redhat.com>
11201 * c.opt (-fextern-tls-init): New.
11202 * c-opts.c (c_common_post_options): Handle it.
11204 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11207 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11208 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11209 and is either negative or bigger or equal to type precision
11210 of the first operand.
11212 2012-12-03 Marek Polacek <polacek@redhat.com>
11215 * c-common.c (check_user_alignment): Swap order of tests,
11216 check TREE_CODE first.
11218 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11221 * c-common.h (overflow_type): New enum.
11222 (build_userdef_literal): Add overflow_type argument.
11223 (tree_userdef_literal): Add overflow_type.
11224 (USERDEF_LITERAL_OVERFLOW): New access macro.
11225 * c-common.c (build_userdef_literal): Add overflow_type
11227 * c-lex.c (c_lex_with_flags): Add overflow_type to
11228 build_userdef_literal calls.
11229 (interpret_integer, interpret_float): Add overflow_type argument.
11231 2012-11-28 Richard Biener <rguenther@suse.de>
11234 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11235 here and use a type with proper overflow behavior for types that would
11236 need to be promoted for the arithmetic.
11238 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11241 * c-common.c (handle_no_address_safety_analysis_attribute): New
11243 (c_common_attribute_table): Add no_address_safety_analysis.
11245 2012-11-16 Simon Baldwin <simonb@google.com>
11247 * c.opt: Add f[no-]canonical-system-headers.
11248 * c-opts.c (c_common_handle_option): Handle
11249 OPT_fcanonical_system_headers.
11251 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11254 * c-opts.c (c_common_handle_option): Set new flags.
11255 * c.opt: Describe new flags.
11257 2012-11-09 Jason Merrill <jason@redhat.com>
11259 * c.opt (Wabi-tag): New.
11261 2012-11-09 Andi Kleen <ak@linux.intel.com>
11264 * c-common.c (get_atomic_generic_size): Mask with
11267 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11270 * c.opt (Wformat): Make it Alias Wformat=1.
11271 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11272 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11274 (Wformat=): RejectNegative. Use LangEnabledBy.
11275 (Wnonnull): Use LangEnabledBy.
11276 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11277 * c-format.c (set_Wformat): Delete.
11278 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11279 (maybe_read_dollar_number): Likewise.
11280 (avoid_dollar_number): Likewise.
11281 (finish_dollar_format_checking): Likewise.
11282 (check_format_info): Likewise.
11283 (check_format_info_main): Likewise.
11284 (check_format_types): Likewise.
11285 (format_type_warning): Likewise.
11286 * c-common.c (int): Likewise.
11287 (check_function_sentinel): Likewise.
11288 * c-common.h (warn_format,set_Wformat): Do not declare here.
11290 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11293 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11294 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11296 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11298 (Wvariadic-macros): Init(1).
11299 * c-opts.c (c_common_handle_option): Do not handle them
11301 (c_common_post_options): Likewise.
11302 (sanitize_cpp_opts): warn_unused_macros is now
11303 cpp_warn_unused_macros.
11304 (push_command_line_include): Likewise.
11305 * c-common.c (warn_unknown_pragmas): Do not define.
11306 * c-common.h (warn_unknown_pragmas): Do not declare.
11308 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11311 * c-common.c (conversion_warning): Handle conditional expressions.
11313 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11316 * c.opt (Wreturn_local_addr): Define new option.
11318 2012-10-25 Jason Merrill <jason@redhat.com>
11320 * c.opt (Wvirtual-move-assign): New.
11322 * c.opt (Winherited-variadic-ctor): New.
11324 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11327 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11329 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11331 * c-common.h (pch_cpp_save_state): Declare.
11332 * c-target.def (c_preinclude): New hook.
11333 * c-opts.c (done_preinclude): New.
11334 (push_command_line_include): Handle default preincluded header.
11335 (cb_file_change): Call pch_cpp_save_state when calling
11336 push_command_line_include.
11337 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11338 (pch_cpp_save_state): New.
11339 (pch_init): Call pch_cpp_save_state conditionally, instead of
11340 calling cpp_save_state.
11342 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11346 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11347 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11348 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11349 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11350 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11351 * c-opts.c (c_common_handle_option): Remove explicit handling from
11353 (c_common_post_options): Likewise.
11355 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11357 * c-ada-spec.c (LOCATION_COL): Delete.
11358 (compare_location): New function.
11359 (compare_node): Use it.
11360 (compare_comment): Likewise.
11362 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11366 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11367 * c-opts.c (c_common_handle_option): Do not set them here. Add
11369 (c_common_post_options): Likewise.
11371 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11373 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11374 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11375 Remove POINTER_TYPE handling, add large unsigned handling and use
11376 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11378 2012-10-12 Jakub Jelinek <jakub@redhat.com>
11381 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11382 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11383 locs and array of 3 trees instead of just single loc and single
11384 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11385 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11386 For *cmp* builtins that take two sources strings report warnings
11387 about first and second source, not about destination and source.
11389 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
11392 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11394 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11396 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11397 declaring something coming from another file.
11399 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11402 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11404 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11407 * c-common.c (warn_about_parentheses): Add location_t parameter;
11408 use EXPR_LOC_OR_LOC.
11409 * c-common.h: Update declaration.
11411 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11414 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11415 more operations. Make error messages optional.
11416 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11417 (scalar_to_vector): Declare.
11419 2012-10-08 Jason Merrill <jason@redhat.com>
11421 * c-common.c (c_common_reswords): Add thread_local.
11423 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11425 PR c++/53528 C++11 attribute support
11426 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11428 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11430 (handle_aligned_attribute): In choose strictest alignment
11431 among many. Use new check_cxx_fundamental_alignment_constraints.
11432 (handle_transparent_union_attribute): In c++11 attribute syntax,
11433 don't look through typedefs.
11435 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11437 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11438 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11441 2012-09-25 Dehao Chen <dehao@google.com>
11443 PR middle-end/54645
11444 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11445 map when read in the pch.
11447 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11449 * c-ada-spec.c: Style fixes.
11451 2012-09-18 Thomas Quinot <quinot@adacore.com>
11453 * c.opt (-fada-spec-parent): Define new command line switch.
11454 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11455 is specified, generate binding spec as a child of the specified unit.
11457 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11458 Manuel López-Ibáñez <manu@gcc.gnu.org>
11461 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11463 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11465 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11466 for pointers, and add missing Convention C pragma.
11467 (print_ada_struct_decl): Add missing aliased keyword.
11468 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11470 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11472 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11473 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11474 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11475 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11476 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11478 2012-08-10 Richard Guenther <rguenther@suse.de>
11480 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11482 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11484 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11485 instead of separate pp_newline and pp_flush.
11486 (print_c_tree): Likewise.
11488 2012-07-26 Richard Henderson <rth@redhat.com>
11490 * c-common.c (handle_hot_attribute): Allow labels.
11491 (handle_cold_attribute): Likewise.
11493 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11496 * c-common.c (check_function_nonnull): Handle multiple nonnull
11497 attributes properly.
11499 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11501 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11502 * c-ada-spec.c: Likewise.
11503 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11505 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11507 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11508 Remove code conditional on it.
11510 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11512 * c-gimplify.c: Do not include basic-block.h.
11513 * c-common.c: Do not include linfuncs.h.
11515 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11517 * c-common.h: Include tree.h.
11519 2012-07-02 Jason Merrill <jason@redhat.com>
11522 * c-common.c (get_priority): Call default_conversion.
11524 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
11526 * c-pch.c (c_common_write_pch): Remove unused variables.
11528 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11530 * cppspec.c: Moved from gcc/ to here.
11532 2012-06-27 Kai Tietz <ktietz@redhat.com>
11534 PR preprocessor/37215
11535 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11537 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11539 * c-common.h (c_common_print_pch_checksum): Remove.
11540 * c-pch.c: Do not include output.h.
11541 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11542 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11543 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11544 (struct c_pch_header): Remove.
11545 (get_ident): Update gpch version.
11546 (pch_init): Do not print executable_checksum to asm_out_file.
11547 Do not fail if there is no asm_out_file to read back from. Set
11548 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11549 (c_common_write_pch): Verify that nothing was written to asm_out_file
11550 since pch_init was called. Do not write a c_pch_header, and do not
11551 copy from asm_out_file to the PCH.
11552 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11553 the content of asm_out_file from the PCH.
11554 (c_common_print_pch_checksum): Remove.
11555 * c-opts.c (c_common_init): Print out executable_checksum directly.
11557 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11559 * c-target.def (objc_declare_unresolved_class_reference,
11560 objc_declare_class_definition): Add new hooks.
11562 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11564 * c-lex.c: Do not include output.h.
11565 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11566 Remove uses of ASM_OUTPUT_IDENT.
11568 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
11571 * c-common.h (c_build_vec_perm_expr): Move decl here.
11572 * c-common.c (c_build_vec_perm_expr): Move definition
11575 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11577 * c.opt (fconserve-space): Turn into a no-op.
11579 2012-06-04 Sterling Augustine <saugustine@google.com>
11581 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11582 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11583 both the start and end of the function.
11585 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11587 * c-common.c: Do not include output.h.
11588 * c-pragma.c: Likewise.
11590 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11592 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11593 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11594 (lang_decl_name): Handle namespace decls.
11596 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11598 * c-ada-spec.c: Do not include output.h.
11599 * c-semantics.c: Likewise.
11601 2012-05-29 Joseph Myers <joseph@codesourcery.com>
11603 * c-common.c: Fix typo.
11605 2012-05-29 Michael Matz <matz@suse.de>
11607 * c-common.h (c_expand_decl): Remove prototype.
11609 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11611 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11612 * c-opts.c (c_common_handle_option): Remove code handling
11613 warn_missing_braces.
11615 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11618 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11621 2012-05-22 Dodji Seketeli <dodji@redhat.com>
11624 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11626 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11628 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11629 * c-opts.c (c_common_handle_option): Do not handle explicitly
11630 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11632 2012-05-16 Dodji Seketeli <dodji@redhat.com>
11634 PR preprocessor/7263
11635 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
11636 to cpp_classify_number. For diagnostics, use the precise location
11637 instead of the global input_location.
11639 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11642 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11644 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11646 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
11648 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11651 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11652 Wreorder): Use LangEnabledBy.
11653 * c-opts.c (c_common_handle_option): Do not enable them
11654 explicitly. Call lang-specific generated functions.
11655 (c_common_post_options): Do not set them here.
11657 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11659 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11660 Wmissing-field-initializers,Wmissing-parameter-type,
11661 Wold-style-declaration,Woverride-init): Use EnabledBy.
11662 * c-opts.c (c_common_post_options): Do not set here explicitly.
11664 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11667 * c-opts.c (c_common_handle_option): Use handle_generated_option
11668 to enable sub-options.
11670 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11673 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11675 2012-05-10 Richard Guenther <rguenther@suse.de>
11677 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11678 adjust commentary about TYPE_IS_SIZETYPE types.
11680 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11683 * c-common.c (warn_logical_operator): Check that argument of
11684 integer_zerop is not NULL.
11686 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11689 * c-common.c (warn_logical_operator): Do not warn if either side
11690 is already true or false.
11692 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11695 * c-common.c (expr_original_type): New.
11696 (shorten_compare): Do not warn for enumeration types.
11698 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11700 * c.opt (fpermissive): Add Var(flag_permissive).
11702 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11705 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11706 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11708 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11710 Add -Wvarargs option
11711 * c.opt (Wvarargs): Define new option.
11713 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11715 * c-common.c (check_function_arguments): Replace
11716 Wmissing-format-attribute with Wsuggest-attribute=format.
11718 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11720 * c.opt (Wsuggest-attribute=format): New. Alias of
11721 Wmissing-format-attribute.
11722 * c-format.c (decode_format_type): Replace
11723 Wmissing-format-attribute with Wsuggest-attribute=format.
11724 (check_function_format): Likewise.
11726 2012-04-27 Ollie Wild <aaw@google.com>
11728 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11729 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11730 * c.opt: Add Wliteral-suffix.
11732 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11735 * c.opt (Wpedantic): New.
11736 (pedantic): Alias Wpedantic.
11737 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11738 (c_common_post_options): Likewise.
11739 (sanitize_cpp_opts): Likewise.
11740 * c-lex.c (interpret_float): Likewise.
11741 * c-format.c (check_format_types): Likewise.
11742 * c-common.c (pointer_int_sum): Likewise.
11743 (c_sizeof_or_alignof_type): Likewise.
11744 (c_add_case_label): Likewise.
11745 (c_do_switch_warnings): Likewise.
11746 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11748 2012-04-15 Jason Merrill <jason@redhat.com>
11751 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11752 (C_STD_NAME): Distinguish between C++98 and C++11.
11754 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11757 * c-common.h (uint16_type_node): Rename into...
11758 (c_uint16_type_node): ...this.
11759 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11760 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11762 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11764 * c-common.c (warn_if_unused_value): Move definition to here.
11765 * c-common.h (warn_if_unused_value): Move declaration to here.
11767 2012-03-23 William Bader <williambader@hotmail.com>
11769 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11771 2012-03-20 Jason Merrill <jason@redhat.com>
11773 * c-common.h (enum cxx_dialect): Add cxx1y.
11774 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11776 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11777 * c-opts.c (c_common_post_options): Likewise.
11778 (set_std_cxx1y): New.
11779 (c_common_handle_option): Call it.
11780 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11782 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11785 * c.opt ([Wuseless-cast]): Add.
11787 2012-03-16 Richard Guenther <rguenther@suse.de>
11789 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11791 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11794 * c.opt (ftemplate-backtrace-limit) Add.
11796 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11798 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11800 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11801 (init_pragma): Don't register extern_prefix.
11803 2012-03-12 Richard Guenther <rguenther@suse.de>
11805 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11806 (builtin_type_for_size): Likewise.
11808 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11811 * c-common.c (sync_resolve_params): Don't decide whether to convert
11812 or not based on TYPE_SIZE comparison, convert whenever arg_type
11813 is unsigned INTEGER_TYPE.
11815 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11818 * c.opt ([Wunused-local-typedefs]): Fix description.
11820 2012-01-24 Mike Stump <mikestump@comcast.net>
11822 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11825 2012-01-18 Richard Guenther <rguenther@suse.de>
11827 * c-opts.c (c_common_post_options): Reset LTO flags if
11828 we are about to generate a PCH.
11830 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11833 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11834 use pp_unsigned_wide_integer.
11836 2012-01-10 Richard Guenther <rguenther@suse.de>
11838 PR middle-end/51806
11839 * c-opts.c (c_common_handle_option): Move -Werror handling
11840 to language independent code.
11842 2012-01-05 Richard Guenther <rguenther@suse.de>
11844 PR middle-end/51764
11845 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11848 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11851 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11852 of array types with an unknown bound.
11854 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11856 * c-common.c (flag_isoc99): Update comment to refer to C11.
11857 (flag_isoc1x): Change to flag_isoc11.
11858 * c-common.h (flag_isoc99): Update comment to refer to C11.
11859 (flag_isoc1x): Change to flag_isoc11.
11860 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11862 * c-opts.c (set_std_c1x): Change to set_std_c11.
11863 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11865 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11866 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11867 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11869 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11870 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11871 (std=gnu1x): Make alias of std=gnu11.
11873 2011-12-19 Jason Merrill <jason@redhat.com>
11876 * c-common.c (handle_transparent_union_attribute): Check the first
11877 field if the type is complete.
11879 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11882 * c-common.c (RID_IS_FINAL): Add.
11883 * c-common.h (RID_IS_FINAL): Add.
11885 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11887 * c.opt (fgnu-runtime): Provide full description.
11888 (fnext-runtime): Likewise.
11889 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11891 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11893 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11894 predefines in one place. Add LOCK_FREE predefines.
11895 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11898 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11901 * c-common.c (get_atomic_generic_size): Check for various error
11903 (resolve_overloaded_atomic_exchange,
11904 resolve_overloaded_atomic_compare_exchange,
11905 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11906 error_mark_node for error conditions.
11908 2011-11-08 Richard Guenther <rguenther@suse.de>
11910 PR middle-end/51010
11911 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11913 2011-11-07 Richard Henderson <rth@redhat.com>
11914 Aldy Hernandez <aldyh@redhat.com>
11915 Torvald Riegel <triegel@redhat.com>
11917 Merged from transactional-memory.
11919 * c-common.c (handle_tm_wrap_attribute,
11920 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11921 (struct c_common_reswords): Added __transaction* keywords.
11922 (struct c_common_attribute_table): Added transaction* and tm_regparm
11924 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11926 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11927 find_tm_attribute): Declare.
11929 2011-11-07 Jason Merrill <jason@redhat.com>
11932 * c-common.c, c-common.h: Revert yesterday's changes.
11934 2011-11-06 Jason Merrill <jason@redhat.com>
11937 * c-common.c (decl_has_visibility_attr): Split out from...
11938 (c_determine_visibility): ...here.
11939 * c-common.h: Declare it.
11941 2011-11-06 Joseph Myers <joseph@codesourcery.com>
11943 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11944 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11946 (check_user_alignment): New. Split out of
11947 handle_aligned_attribute. Disallow integer constants with
11948 noninteger types. Conditionally allow zero.
11949 (handle_aligned_attribute): Use check_user_alignment.
11950 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11952 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
11953 Richard Henderson <rth@redhat.com>
11955 Merged from cxx-mem-model.
11957 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11958 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11959 parameters that are the same type size.
11960 (get_atomic_generic_size): New. Find size of generic
11961 atomic function parameters and do typechecking.
11962 (add_atomic_size_parameter): New. Insert size into parameter list.
11963 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11964 either __atomic_exchange_n or external library call.
11965 (resolve_overloaded_atomic_compare_exchange): Restructure
11966 __atomic_compare_exchange to either _n variant or external library call.
11967 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11968 __atomic_load_n or an external library call.
11969 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11970 __atomic_store_n or an external library call.
11971 (resolve_overloaded_builtin): Handle new __atomic builtins.
11973 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11976 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11977 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11978 <INDIRECT_REF>: Return the argument.
11979 <ARRAY_REF>: Remove special code for negative offset.
11980 Call fold_build_pointer_plus instead of size_binop.
11981 (fold_offsetof): Remove STOP_REF argument and adjust.
11982 * c-common.h (fold_offsetof_1): Declare.
11983 (fold_offsetof): Remove STOP_REF argument.
11985 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11988 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11989 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11990 Wnarrowing for C++0x and C++98.
11991 * c.opt ([Wnarrowing]): Update.
11993 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11996 * c.opt: Add Wzero-as-null-pointer-constant.
11998 2011-10-31 Jason Merrill <jason@redhat.com>
12000 * c.opt (-fdeduce-init-list): Off by default.
12003 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12004 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12005 and -Wc++11-compat.
12006 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12008 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12011 * c.opt (fvisibility-inlines-hidden): Description change.
12013 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12015 Implement C++11 user-defined literals.
12016 * c-common.c (build_userdef_literal): New.
12017 * c-common.def: New tree code.
12018 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12019 * c-lex.c (interpret_float): Add suffix parm.
12020 (c_lex_with_flags): Build literal tokens.
12022 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12026 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12029 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12030 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12031 Wnarrowing for C++0x and C++98.
12032 * c.opt ([Wnarrowing]): Update.
12034 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12037 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12038 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12039 Wnarrowing for C++0x and C++98.
12040 * c.opt ([Wnarrowing]): Update.
12042 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12045 * c-common.c (conversion_warning): Remove code looking for
12046 artificial operands.
12048 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12051 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12052 !NO_IMPLICIT_EXTERN_C.
12054 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12056 * c-common.c (c_common_reswords): Add __bases,
12058 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12060 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12063 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12065 2011-10-15 Tom Tromey <tromey@redhat.com>
12066 Dodji Seketeli <dodji@redhat.com>
12068 * c.opt (fdebug-cpp): New option.
12069 * c-opts.c (c_common_handle_option): Handle the option.
12070 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12071 output stream in parameter. Factorized from ...
12072 (maybe_print_line): ... this. Dump location debug information when
12073 -fdebug-cpp is in effect.
12074 (print_line_1): New static function. Takes an output stream in
12075 parameter. Factorized from ...
12076 (print_line): ... here. Dump location information when -fdebug-cpp
12078 (scan_translation_unit): Dump location information when
12079 -fdebug-cpp is in effect.
12081 2011-10-15 Tom Tromey <tromey@redhat.com>
12082 Dodji Seketeli <dodji@redhat.com>
12084 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12086 * c-opts.c (c_common_handle_option)<case
12087 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12088 cases. Handle -ftrack-macro-expansion with and without argument.
12090 2011-10-15 Tom Tromey <tromey@redhat.com>
12091 Dodji Seketeli <dodji@redhat.com>
12093 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12094 (print_line, cb_define, do_line_change): Adjust to avoid touching
12095 the internals of struct line_map. Use the public API instead.
12096 * c-pch.c (c_common_read_pch): Likewise.
12097 * c-lex.c (fe_file_change): Likewise.
12099 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12102 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12104 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12107 * c-pretty-print.c (pp_c_floating_constant): Output
12108 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12110 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12112 * c-common.c (def_builtin_1): Delete old interface with two
12113 parallel arrays to hold standard builtin declarations, and replace
12114 it with a function based interface that can support creating
12115 builtins on the fly in the future. Change all uses, and poison
12116 the old names. Make sure 0 is not a legitimate builtin index.
12117 * c-omp.c (c_finish_omp_barrier): Ditto.
12118 (c_finish_omp_taskwait): Ditto.
12119 (c_finish_omp_flush): Ditto.
12121 2011-10-11 Tristan Gingold <gingold@adacore.com>
12123 * c.opt: (fallow-parameterless-variadic-functions): New.
12125 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12127 PR c++/33255 - Support -Wunused-local-typedefs warning
12128 * c-common.h (struct c_language_function::local_typedefs): New
12130 (record_locally_defined_typedef, maybe_record_typedef_use)
12131 (maybe_warn_unused_local_typedefs): Declare new functions.
12132 * c-common.c (record_locally_defined_typedef)
12133 (maybe_record_typedef_use)
12134 (maybe_warn_unused_local_typedefs): Define new functions.
12135 * c.opt: Declare new -Wunused-local-typedefs flag.
12137 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12139 PR middle-end/50266
12140 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12143 2011-09-05 Richard Guenther <rguenther@suse.de>
12145 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12146 of integer_minus_one_node for empty array upper bounds.
12148 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12150 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12151 it's the first time it's being called on this main TU.
12153 2011-08-24 Richard Guenther <rguenther@suse.de>
12156 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12158 2011-08-22 Gabriel Charette <gchare@google.com>
12160 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12161 defined in cpp_init_builtins and c_cpp_builtins.
12163 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12165 * c-common.c (c_common_reswords): Add __builtin_complex.
12166 * c-common.h (RID_BUILTIN_COMPLEX): New.
12168 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12170 * c-common.c (c_common_reswords): Add _Noreturn.
12171 (keyword_is_function_specifier): Handle RID_NORETURN.
12172 * c-common.h (RID_NORETURN): New.
12174 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12176 * c-common.c (unsafe_conversion_p): New function. Check if it is
12177 unsafe to convert an expression to the type.
12178 (conversion_warning): Adjust, use unsafe_conversion_p.
12179 * c-common.h (unsafe_conversion_p): New function declaration.
12181 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12183 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12184 (c_finish_omp_taskyield): New prototype.
12185 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12186 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12187 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12188 or RHS1 have side-effects, evaluate those too in the right spot,
12189 if it is a decl and LHS is also a decl, error out if they
12191 (c_finish_omp_taskyield): New function.
12192 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12193 * c-pragma.c (omp_pragmas): Add taskyield.
12194 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12195 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12196 PRAGMA_OMP_CLAUSE_MERGEABLE.
12198 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12200 * c-common.h (set_underlying_type): Remove parm name from
12203 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12205 * c-pretty-print.h: Search c-common.h in c-family.
12207 2011-07-22 Jason Merrill <jason@redhat.com>
12210 * c.opt (Wnarrowing): New.
12213 * c-common.h: Declare c_linkage_bindings.
12214 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12217 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12218 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12219 as flag_isoc99 for 'restrict'.
12220 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12222 2011-07-21 Ian Lance Taylor <iant@google.com>
12224 PR middle-end/49705
12225 * c-common.c (c_disable_warnings): New static function.
12226 (c_enable_warnings): New static function.
12227 (c_fully_fold_internal): Change local unused_p to bool. Call
12228 c_disable_warnings and c_enable_warnings rather than change
12229 c_inhibit_evaluation_warnings.
12231 2011-07-20 Jason Merrill <jason@redhat.com>
12233 PR c++/6709 (DR 743)
12234 PR c++/42603 (DR 950)
12235 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12236 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12237 (CPP_DECLTYPE): New.
12238 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12240 2011-07-19 Richard Guenther <rguenther@suse.de>
12242 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12243 * c-omp.c (c_finish_omp_for): Likewise.
12245 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12247 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12248 body on the next line.
12250 2011-07-08 Jason Merrill <jason@redhat.com>
12253 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12256 * c-common.c (c_apply_type_quals_to_decl): Don't check
12257 TYPE_NEEDS_CONSTRUCTING.
12259 2011-07-06 Richard Guenther <rguenther@suse.de>
12261 * c-common.c (c_common_nodes_and_builtins):
12262 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12264 2011-07-05 Richard Guenther <rguenther@suse.de>
12266 * c-common.c (c_common_nodes_and_builtins): Build all common
12269 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12271 * c-common.h (c_tree_chain_next): New static inline function.
12273 * c-common.c (check_builtin_function_arguments): Handle
12274 BUILT_IN_ASSUME_ALIGNED.
12276 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12278 * c-common.c: Add sync_ or SYNC__ to builtin names.
12279 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12281 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12283 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12285 (gen_pragma_handler): New union.
12286 (internal_pragma_handler): New type.
12287 (c_register_pragma_with_data)
12288 (c_register_pragma_with_expansion_and_data): New functions.
12290 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12291 (c_register_pragma, c_register_pragma_with_expansion)
12292 (c_invoke_pragma_handler): Changed to work with
12293 internal_pragma_handler.
12294 (c_register_pragma_with_data)
12295 (c_register_pragma_with_expansion_and_data): New functions.
12297 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12299 * c-common.c: Include common/common-target.h.
12300 (handle_section_attribute): Use
12301 targetm_common.have_named_sections.
12302 * c-cppbuiltin.c: Include common/common-target.h.
12303 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12305 2011-06-10 Richard Guenther <rguenther@suse.de>
12307 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12308 to print a IDENTIFIER_NODE.
12310 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12311 Joseph Myers <joseph@codesourcery.com>
12313 * c.opt (fbuilding-libgcc): New option.
12314 * c-cppbuiltin.c (c_cpp_builtins): Define
12315 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12317 2011-06-07 Jason Merrill <jason@redhat.com>
12319 * c-common.c (max_tinst_depth): Lower default to 900.
12321 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12323 2011-06-07 Richard Guenther <rguenther@suse.de>
12325 * c-common.c (c_common_nodes_and_builtins): Do not set
12326 size_type_node or call set_sizetype.
12328 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12331 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12332 type when using pointer comparison to compare types.
12334 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12336 * c.opt: Add -Wdelete-non-virtual-dtor.
12337 * c-opts.c (c_common_handle_option): Include it in -Wall.
12339 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12344 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12346 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12349 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12352 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12353 C++ don't call c_common_truthvalue_conversion on void type arms.
12355 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12357 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12358 (stmt_list_stack): Define.
12359 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12360 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12362 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12364 * c-common.c (warning_candidate_p): Check for BLOCKs.
12366 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12368 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12371 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12373 * c-common.c (def_fn_type): Remove extra va_end.
12375 2011-05-23 Jason Merrill <jason@redhat.com>
12378 * c-common.c (c_common_get_narrower): New.
12379 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12381 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12383 * c-common.h (check_function_arguments): Tweak prototype of
12384 check_function_arguments.
12385 * c-common.c (check_function_arguments): Likewise. Adjust
12386 calls to check_function_nonnull, check_function_format, and
12387 check_function_sentinel.
12388 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12389 separate attributes and typelist arguments. Use
12390 FOREACH_FUNCTION_ARGS to iterate over argument types.
12392 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12394 * c-common.c (c_common_reswords): Reorder.
12395 * c-common.h (rid): Likewise.
12397 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12399 * c-common.c (def_fn_type): Don't call build_function_type, call
12400 build_function_type_array or build_varargs_function_type_array
12402 (c_common_nodes_and_builtins): Likewise.
12404 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12406 * c-common.c (c_add_case_label): Omit the loc argument to
12408 * c-common.h (build_case_label): Remove.
12409 * c-semantics.c (build_case_label): Remove.
12411 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12413 * c-objc.h (objc_start_method_definition): Update prototype.
12414 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12416 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12418 * c-common.c (check_main_parameter_types): Reindent. Don't use
12419 TYPE_ARG_TYPES directly.
12420 (handle_nonnull_attribute): Likewise.
12421 (sync_resolve_params): Likewise.
12422 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12423 to check_format_string.
12424 (handle_format_attribute): Likewise.
12425 (check_format_string): Take a function type to examine instead of
12426 a type list. Use a function_arg_iterator to step through argument
12429 2011-05-04 Richard Guenther <rguenther@suse.de>
12431 * c-common.c (fix_string_type): Use size_int for index type bounds.
12432 (start_fname_decls): Do not pass NULL to build_int_cst.
12433 (c_init_attributes): Likewise.
12434 * c-lex.c (c_lex_with_flags): Likewise.
12436 2011-04-27 Jason Merrill <jason@redhat.com>
12438 * c-common.c (make_tree_vector_from_list): New.
12439 * c-common.h: Declare it.
12441 2011-04-26 Richard Guenther <rguenther@suse.de>
12443 PR preprocessor/48248
12444 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12445 for output size with -P.
12447 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12449 * c-common.c (struct c_common_resword): Add __underlying_type.
12450 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12452 2011-04-20 Jim Meyering <meyering@redhat.com>
12454 * c-format.c (init_dollar_format_checking): Remove useless
12457 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12459 * c-objc.h (objc_get_interface_ivars): Removed.
12460 (objc_detect_field_duplicates): New.
12461 * stub-objc.c: Likewise.
12463 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12465 * stub-objc.c (objc_declare_protocols): Renamed to
12466 objc_declare_protocol.
12467 * c-objc.h: Likewise.
12469 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12471 * stub-objc.c (objc_declare_class): Updated argument name.
12473 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12475 * c-common.h (c_common_init_ts): Declare.
12476 * c-common.c (c_common_init_ts): Define.
12478 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12480 * c-objc.h (objc_build_message_expr): Updated prototype.
12481 * stub-objc.c (objc_build_message_expr): Likewise.
12483 2011-04-12 Martin Jambor <mjambor@suse.cz>
12485 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12488 2011-04-11 Richard Guenther <rguenther@suse.de>
12490 * c-common.c (complete_array_type): Build a range type of
12493 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12495 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12496 (handle_type_generic_attribute): Likewise.
12498 2011-04-07 Jason Merrill <jason@redhat.com>
12501 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12502 conversion from C++0x scoped enum.
12504 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12506 * c-target-def.h: New file.
12507 * c-target.def: New file.
12508 * c-target.h: New file.
12509 * c-common.c (targetcm): Don't define here.
12510 * c-common.h (default_handle_c_option): Declare.
12511 * c-format.c: Include c-target.h instead of target.h.
12512 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12514 (default_handle_c_option): Move from targhooks.c.
12516 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12518 PR preprocessor/48248
12519 * c-ppoutput.c (print): Add src_file field.
12520 (init_pp_output): Initialize it.
12521 (maybe_print_line): Don't optimize by adding up to 8 newlines
12522 if map->to_file and print.src_file are different file.
12523 (print_line): Update print.src_file.
12525 2011-03-25 Kai Tietz <ktietz@redhat.com>
12527 * c-ada-spec.c (compare_comment): Use filename_cmp
12528 instead of strcmp for filename.
12530 2011-03-25 Jeff Law <law@redhat.com>
12532 * c-common.c (def_fn_type): Add missing va_end.
12534 2011-03-25 Jason Merrill <jason@redhat.com>
12536 * c.opt: Add -std=c++03.
12538 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12540 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12542 2011-03-17 Kai Tietz <ktietz@redhat.com>
12545 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12546 Display allowed attributes for function pointer types.
12547 (pp_c_attributes_display): New function to display
12548 attributes having affects_type_identity flag set to true.
12549 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12551 * c-common.c (c_common_attribute_table):
12553 (c_common_format_attribute_table): Likewise.
12555 2011-03-18 Jason Merrill <jason@redhat.com>
12557 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12558 * c-common.h: Don't declare it here.
12559 * c-common.c: Or define it here.
12560 * c-opts.c (c_common_handle_option): Or set it here.
12563 * c-common.c (handle_transparent_union_attribute): Don't
12564 make a duplicate type in C++.
12566 2011-03-15 Jason Merrill <jason@redhat.com>
12568 * c-common.c (max_constexpr_depth): New.
12569 * c-common.h: Declare it.
12570 * c-opts.c (c_common_handle_option): Set it.
12571 * c.opt (fconstexpr-depth): New option.
12573 2011-03-11 Jason Merrill <jason@redhat.com>
12575 * c-common.c (attribute_takes_identifier_p): Add missing const.
12578 * c-common.c (attribute_takes_identifier_p): Assume that an
12579 unknown attribute takes an identifier.
12581 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12584 * c-common.c (c_type_hash): Call list_length instead of iterating
12585 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12587 2011-02-19 Jakub Jelinek <jakub@redhat.com>
12590 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12592 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12594 * c.opt (fobjc-abi-version=) New.
12595 (fobjc-nilcheck): New.
12597 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12600 * c-common.h (keyword_is_decl_specifier): Declare.
12601 * c-common.c (keyword_is_decl_specifier): Define.
12602 (keyword_is_function_specifier): New function.
12604 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12607 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12608 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12611 2011-01-26 Arnaud Charlet <charlet@adacore.com>
12613 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12615 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12618 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12619 after init_c_lex if pch_file is set.
12621 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12624 * c.opt (-fkeep-inline-dllexport): New switch.
12626 2011-01-12 Richard Guenther <rguenther@suse.de>
12628 PR middle-end/32511
12629 * c-common.c (handle_weak_attribute): Warn instead of error
12630 on declaring an inline function weak.
12632 2011-01-05 Tom Tromey <tromey@redhat.com>
12634 * c-common.h (lvalue_error): Update.
12635 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12638 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
12641 * c-objc.h (objc_finish_message_expr): Added argument to
12644 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12646 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12649 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12651 * c-objc.h (objc_maybe_warn_exceptions): New.
12652 * stub-objc.c (objc_maybe_warn_exceptions): New.
12654 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12656 * c-common.h (readonly_error): Declare.
12657 * c-common.c (readonly_error): Define.
12659 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12661 * c-common.h (invalid_indirection_error): Declare.
12662 * c-common.c (invalid_indirection_error): Define.
12664 2010-12-03 Richard Guenther <rguenther@suse.de>
12667 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12668 (pp_c_unary_expression): Likewise.
12669 (pp_c_expression): Likewise.
12671 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12673 * c-common.h (objc_finish_function): New.
12674 (objc_non_volatilized_type): Removed.
12675 (objc_type_quals_match): Removed.
12676 * stub-objc.c (objc_finish_function): New.
12677 (objc_non_volatilized_type): Removed.
12678 (objc_type_quals_match): Removed.
12680 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12682 * c-common.h (parse_optimize_options): Declare.
12683 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12684 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12686 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12688 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12690 * c-pch.c (O_BINARY): Don't define here.
12691 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12693 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12695 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12696 targetm.except_unwind_info.
12698 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12700 * c-opts.c (c_common_handle_option): Pass location to
12701 set_struct_debug_option.
12703 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12705 * c-common.c (visibility_options): Move from ../opts.c.
12706 * c-common.h (struct visibility_flags, visibility_options):
12708 * c-opts.c (finish_options): Rename to c_finish_options.
12709 (c_common_init): Update call to finish_options.
12711 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12714 * c-lex.c (lex_string): Check that each string in an Objective-C
12715 string concat sequence starts with either one or zero '@', and
12716 that there are no spurious '@' signs at the end.
12718 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12720 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12721 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12722 HANDLE_PRAGMA_VISIBILITY.
12723 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12724 HANDLE_PRAGMA_VISIBILITY): Don't define.
12725 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12727 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12732 * c-common.h (keyword_begins_type_specifier): Declare.
12733 (keyword_is_storage_class_specifier): Declare.
12734 (keyword_is_type_qualifier): Declare.
12735 * c-common.c (keyword_begins_type_specifier): New function.
12736 (keyword_is_storage_class_specifier): New function.
12737 (keyword_is_type_qualifier): Declare.
12739 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12742 * c-common.c (in_late_binary_op): Define.
12743 (c_common_truthvalue_conversion): Check in_late_binary_op before
12744 calling c_save_expr.
12745 * c-common.h (in_late_binary_op): Declare.
12747 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12749 * c-opts.c (c_common_handle_option): Update calls to
12750 set_struct_debug_option.
12752 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12754 * c-common.h (objc_declare_protocols): Added additional argument.
12755 * stub-objc.c (objc_declare_protocol): Same change.
12757 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12760 * c-common.h (build_real_imag_expr): Declare.
12761 * c-semantics.c (build_real_imag_expr): Define.
12763 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12765 * c-opts.c (c_common_parse_file): Take no arguments.
12766 * c-common.h (c_common_parse_file): Update prototype.
12768 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12771 * c-common.c (warning_candidate_p): Don't track non-const calls
12774 2010-11-15 Ian Lance Taylor <iant@google.com>
12776 * c-lex.c (init_c_lex): Set macro debug callbacks if
12777 flag_dump_go_spec is set.
12779 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12781 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12782 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12784 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12786 PR preprocessor/45038
12787 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12790 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12792 * c-common.h (c_family_lang_mask): Declare.
12793 * c-opts.c (c_family_lang_mask): Make extern.
12794 * c-pragma.c (handle_pragma_diagnostic): Use
12795 control_warning_option.
12797 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12799 * c-common.c (parse_optimize_options): Update call to
12801 * c-common.h (c_common_handle_option): Update prototype.
12802 * c-opts.c (c_common_handle_option): Take location_t parameter and
12803 pass it to other functions.
12805 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12807 * c-opts.c (warning_as_error_callback): Remove.
12808 (c_common_initialize_diagnostics): Don't call
12809 register_warning_as_error_callback.
12810 (c_common_handle_option): Handle -Werror=normalized= here.
12812 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12814 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12816 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12818 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12819 Remove trailing '.' from diagnostics.
12820 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12822 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12824 * c-common.c (parse_optimize_options): Pass global_dc to
12826 * c-opts.c (c_common_handle_option): Pass &global_options to
12827 set_Wstrict_aliasing.
12828 * c.opt (v): Don't mark Common or document here.
12830 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12833 * c-format.c (format_type): New type gcc_objc_string_format_type.
12834 (valid_stringptr_type_p): New.
12835 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12836 (check_format_string): Pass expected type, use
12837 valid_stringptr_type_p (), check that the format string types are
12838 consistent with the format specification.
12839 (decode_format_attr): Warn if NSString is used outside objective-c.
12840 (format_types_orig): Add NSString.
12841 (format_name): New.
12842 (format_flags): New.
12843 (check_format_arg): Handle format strings requiring an external parser.
12844 first_target_format_type: New variable.
12845 (handle_format_attribute): Set up first_target_format_type, pass the
12846 expected format arg string type to check_format_string().
12847 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12848 * stub-objc.c (objc_string_ref_type_p): New.
12849 (objc_check_format_arg): New.
12851 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12853 Fixed using the Objective-C 2.0 dot-syntax with class names.
12854 * c-common.h (objc_build_class_component_ref): New.
12855 * stub-objc.c (objc_build_class_component_ref): New.
12857 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12859 * c.opt (Wproperty-assign-default): New option.
12861 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12863 Implemented -fobjc-std=objc1 flag.
12864 * c.opt (fobjc-std=objc1): New option.
12866 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12868 Implemented format and noreturn attributes for Objective-C methods.
12869 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12870 attribute for Objective-C methods.
12872 2010-10-31 Jason Merrill <jason@redhat.com>
12874 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12877 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12879 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12880 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12881 (objc_add_property_declaration): Removed arguments for copies and
12883 (objc_build_getter_call): Renamed to
12884 objc_maybe_build_component_ref.
12885 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12886 (objc_is_property_ref): New.
12887 * c-common.c (c_common_reswords): Removed copies and ivar.
12888 * stub-objc.c (objc_add_property_declaration): Removed arguments
12889 for copies and ivar.
12890 (objc_build_getter_call): Renamed to
12891 objc_maybe_build_component_ref.
12892 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12893 (objc_is_property_ref): New.
12895 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12896 Matthew Gingell <gingell@adacore.com>
12898 * c-ada-spec.c (separate_class_package): New function.
12899 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12900 name of their enclosing package.
12901 (print_ada_declaration): Use separate_class_package.
12903 2010-10-27 Jason Merrill <jason@redhat.com>
12905 * c-common.c (c_common_reswords): Add __is_literal_type.
12906 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12908 * c-common.c (check_case_value): Remove special C++ code.
12910 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12912 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12913 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12914 and RID_LAST_PATTR.
12915 (objc_add_property_declaration): Added additional arguments.
12916 (objc_property_attribute_kind): Removed.
12917 (objc_set_property_attr): Removed.
12918 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12919 copy and nonatomic.
12920 * stub-objc.c (objc_add_property_declaration): Added additional
12922 (objc_set_property_attr): Removed.
12924 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12926 * c-common.h (objc_add_property_variable): Renamed to
12927 objc_add_property_declaration. Added location argument.
12928 * stub-objc.c (objc_add_property_variable): Same change.
12930 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12932 * c-common.h (objc_maybe_printable_name): New.
12933 * stub-objc.c (objc_maybe_printable_name): New.
12935 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12936 Andrew Pinski <pinskia@gmail.com>
12938 * c-common.h (c_common_mark_addressable_vec): Declare.
12939 * c-common.c (c_common_mark_addressable_vec): New function.
12941 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12943 * c-common.h (objc_set_method_type): Removed.
12944 (objc_add_method_declaration): Added boolean argument.
12945 (objc_start_method_definition): Same change.
12946 (objc_build_method_signature): Same change.
12947 * stub-objc.c (objc_set_method_type): Removed.
12948 (objc_add_method_declaration): Added boolean argument.
12949 (objc_start_method_definition): Same change.
12950 (objc_build_method_signature): Same change.
12952 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12954 * c-common.h (finish_file): Removed.
12955 (objc_write_global_declarations): New.
12956 * c-opts.c (c_common_parse_file): Do not call finish_file.
12957 * stub-objc.c (objc_write_global_declarations): New.
12959 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12961 Implemented parsing @synthesize and @dynamic for
12962 Objective-C/Objective-C++.
12963 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12964 (objc_add_synthesize_declaration): New.
12965 (objc_add_dynamic_declaration): New.
12966 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12967 * stub-objc.c (objc_add_synthesize_declaration): New.
12968 (objc_add_dynamic_declaration): New.
12970 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12973 * c-cppbuiltin.c (mode_has_fma): Move function here from
12974 builtins.c. Don't use the fma optab, instead just use the
12975 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12978 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12980 Merge from 'apple/trunk' branch on FSF servers.
12982 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
12985 * c-common.h (objc_non_volatilized_type): New declaration
12986 * stub-objc.c (objc_non_volatilized_type): New stub.
12988 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12990 Merge from 'apple/trunk' branch on FSF servers.
12992 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
12995 * c-common.h (objc_diagnose_private_ivar): New decl.
12996 * stub-objc.c (objc_diagnose_private_ivar): New stub.
12998 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13000 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13001 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13002 (objc_ivar_visibility_kind): New enum.
13003 (objc_set_visibility): Adjust prototype to use visibility enum.
13004 * stub-objc.c (objc_set_visibility): Adjust stub to use
13007 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13009 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13010 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13011 has the appropriate fma builtins.
13012 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13014 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13016 merge from FSF apple 'trunk' branch.
13017 2006 Fariborz Jahanian <fjahanian@apple.com>
13019 Radars 4436866, 4505126, 4506903, 4517826
13020 * c-common.c (c_common_resword): Define @property and its attributes.
13021 * c-common.h: Define property attribute enum entries.
13022 (OBJC_IS_PATTR_KEYWORD): New.
13023 (objc_property_attribute_kind): New enum.
13024 Declare objc_set_property_attr (), objc_add_property_variable (),
13025 objc_build_getter_call () and objc_build_setter_call ().
13026 * stub-objc.c (objc_set_property_attr): New stub.
13027 (objc_add_property_variable): Likewise.
13028 (objc_build_getter_call): Likewise.
13029 (objc_build_setter_call) Likewise.
13031 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13033 merge from FSF apple 'trunk' branch.
13034 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13036 Radar 3803157 (method attributes)
13037 * c-common.c (handle_deprecated_attribute): Recognize
13038 objc methods as valid declarations.
13039 * c-common.h: Declare objc_method_decl ().
13040 * stub-objc.c (objc_method_decl): New stub.
13042 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13044 * c-common.c (parse_optimize_options): Call
13045 decode_cmdline_options_to_array_default_mask before
13046 decode_options. Update arguments to decode_options.
13047 * c-common.h (c_common_init_options_struct): Declare.
13048 * c-opts.c (c_common_init_options_struct): New. Split out from
13049 c_common_init_options.
13051 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13053 Implemented fast enumeration for Objective-C.
13054 * c-common.h (objc_finish_foreach_loop): New.
13055 * stub-objc.c (objc_finish_foreach_loop): New.
13057 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13059 * c-common.h (struct diagnostic_context): Don't declare here.
13060 (c_common_initialize_diagnostics): Declare using
13061 diagnostic_context typedef.
13062 * c-opts.c (c_common_handle_option): Pass global_dc to
13063 handle_generated_option.
13065 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13067 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13068 handle_generated_option.
13070 2010-10-03 Ian Lance Taylor <iant@google.com>
13072 * c.opt (-fplan9-extensions): New option.
13074 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13076 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13078 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13079 of duplicating code.
13081 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13083 * c-common.c: Add two new entries for @optional
13084 and @required keywords.
13086 merge from FSF 'apple/trunk' branch.
13087 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13090 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13091 objective-c keywords.
13092 (objc_set_method_opt): New declaration.
13093 * stub-objc.c (objc_set_method_opt): New stub.
13095 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13097 * c-common.c (handle_optimize_attribute): Pass &global_options to
13098 cl_optimization_save and cl_optimization_restore.
13099 * c-opts.c (c_common_handle_option): Pass &global_options to
13100 handle_generated_option.
13101 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13102 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13103 &global_options to cl_optimization_restore.
13105 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13107 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13108 Objective-C/Objective-C++ keywords.
13110 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13112 Merge from 'apple/trunk' branch on FSF servers.
13114 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13117 * c-common.h (objc_check_global_decl): New declaration.
13118 * stub-objc.c (objc_check_global_decl): New stub.
13120 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13122 * c.opt: Don't use VarExists.
13124 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13126 * c-common.c (c_cpp_error): Update names of diagnostic_context
13128 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13129 cl_optimization members.
13130 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13131 sanitize_cpp_opts, finish_options): Update names of cpp_options
13134 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13136 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13137 (objc_is_reserved_word): Removed.
13138 * c-common.c: Updated comments.
13139 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13140 objc_is_reserved_word.
13141 * stub-objc.c (objc_is_reserved_word): Removed.
13143 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13145 * c-common.h (objc_add_method_declaration): Adjust prototype to
13146 include attributes.
13147 (objc_start_method_definition): Likewise.
13148 (objc_build_keyword_decl): Likewise.
13149 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13150 (objc_start_method_definition): Likewise.
13151 (objc_build_keyword_decl): Likewise.
13153 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13155 * c-common.h (objc_start_class_interface): Adjust prototype.
13156 (objc_start_category_interface): Likewise.
13157 (objc_start_protocol): Likewise.
13158 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13159 (objc_start_class_interface): Likewise.
13160 (objc_start_category_interface): Likewise.
13162 2010-09-27 Ian Lance Taylor <iant@google.com>
13164 * c-common.c (c_common_attribute_table): Add no_split_stack.
13165 (handle_no_split_stack_attribute): New static function.
13167 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13169 Merge from 'apple/trunk' branch on FSF servers.
13171 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13174 * c-common.h (objc_have_common_type): New declaration.
13175 * stub-objc.c (objc_have_common_type): New stub.
13177 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13180 * c-common.h (objc_common_type): New prototype.
13181 * stub-objc.c (objc_common_type): New stub.
13183 2010-09-24 Jan Hubicka <jh@suse.cz>
13185 * c-common.c (handle_leaf_attribute): New function.
13186 (struct attribute_spec c_common_att): Add leaf.
13188 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13190 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13191 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13192 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13193 -include-barrier, -include-directory, -include-directory=,
13194 -include-directory-after, -include-directory-after=,
13195 -include-prefix, -include-prefix=, -include-with-prefix,
13196 -include-with-prefix=, -include-with-prefix-after,
13197 -include-with-prefix-after=, -include-with-prefix-before,
13198 -include-with-prefix-before=, -no-integrated-cpp,
13199 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13200 -output=, -pedantic, -pedantic-errors, -preprocess,
13201 -print-missing-file-dependencies, -trace-includes, -traditional,
13202 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13203 -user-dependencies, -verbose, -write-dependencies,
13204 -write-user-dependencies, no-integrated-cpp, traditional): New.
13206 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13209 * c-common.h (objc_start_method_definition): Return bool instead
13211 * stub-objc.c (objc_start_method_definition): Return bool instead
13214 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13217 * c-common.h (objc_get_interface_ivars): New declaration.
13218 * stub-objc.c (objc_get_interface_ivars): New stub.
13220 2010-09-15 Ian Lance Taylor <iant@google.com>
13222 * c-common.c (parse_optimize_options): Do not capitalize warning
13223 messages. Remove period at end of warning message.
13225 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13227 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13228 (handle_alias_attribute): ... here.
13229 (handle_ifunc_attribute): New.
13231 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13233 * c-common.h (do_warn_double_promotion): Declare.
13234 * c-common.c (do_warn_double_promotion): Define.
13236 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13238 * c.opt (Wdouble-promotion): New.
13240 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13242 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13243 fvtable-thunks, fxref): Mark no longer supported in help text.
13245 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13247 * c.opt (Wimport, fall-virtual, falt-external-templates,
13248 fdefault-inline, fenum-int-equiv, fexternal-templates,
13249 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13250 fname-mangling-version-, fnew-abi, fnonnull-objects,
13251 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13252 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13254 (fhandle-exceptions): Mark with Alias and Warn.
13255 * c-opts.c (c_common_handle_option): Don't handle options marked
13258 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13260 * c.opt (Wcomments, Werror-implicit-function-declaration,
13261 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13262 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13264 * c-common.c (option_codes): Use OPT_Wcomment instead of
13266 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13267 Don't handle options marked as aliases.
13269 2010-08-25 Richard Guenther <rguenther@suse.de>
13271 * c-common.c (c_common_get_alias_set): Remove special
13272 handling for pointers.
13274 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13276 * c-common.c: Use FOR_EACH_VEC_ELT.
13277 * c-gimplify.c: Likewise.
13278 * c-pragma.c: Likewise.
13280 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13282 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13284 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13286 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13287 instead of OPT_MDX and OPT_MMDX.
13289 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13291 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13293 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13295 * c.opt (MD, MMD): Change to MDX and MMDX.
13296 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13298 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13300 * c-opts.c (c_common_handle_option): Call handle_generated_option
13301 instead of handle_option.
13303 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13305 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13306 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13308 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13310 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13311 (pending_redefine_extname): Change type to a VEC.
13312 (add_to_renaming_pragma_list): Update for new type of
13313 pending_redefine_extname.
13314 (maybe_apply_renaming_pragma): Likewise.
13316 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13318 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13320 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13321 decide whether a type has already been declared/seen.
13322 Do not go to the original type.
13323 (dump_nested_types): New parameter forward.
13324 Generate forward declaration if needed and mark type as visited.
13325 (print_ada_declaration): Call dump_nested_types if not already done.
13326 Mark types as visited.
13328 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13330 * c.opt (-print-pch-checksum): Remove option.
13331 * c-opts.c (c_common_handle_option): Don't handle
13332 OPT_print_pch_checksum.
13334 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13336 * c-common.h (c_common_handle_option): Update prototype and return
13338 * c-opts.c (c_common_handle_option): Update prototype and return
13339 value type. Update calls to handle_option and
13340 enable_warning_as_error.
13342 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13345 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13347 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13349 * c-common.h (c_common_missing_argument): Remove.
13350 * c-opts.c (c_common_missing_argument): Remove.
13351 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13352 idirafter, imacros, include, isysroot, isystem, iquote): Add
13354 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13356 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13358 * c-common.h (c_common_option_lang_mask,
13359 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13361 (c_common_init_options): Update prototype.
13362 * c-opts.c (c_common_option_lang_mask): New.
13363 (c_common_initialize_diagnostics): Split out of
13364 c_common_init_options.
13365 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13367 (c_common_init_options): Update prototype. Use decoded options in
13368 search for -lang-asm.
13370 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13372 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13373 * c-format.c: Likewise.
13375 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13377 * c-common.h: Include diagnostic-core.h. Error if already
13379 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13381 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13383 * c-common.c (IN_GCC_FRONTEND): Do not undef.
13384 Do not include expr.h
13385 (vector_mode_valid_p): Move here.
13387 2010-06-21 DJ Delorie <dj@redhat.com>
13389 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13390 allow these pragmas anywhere.
13392 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13395 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13396 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13397 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13398 ggc_strdup instead of xstrdup.
13400 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13402 * c-cppbuiltin.c: Include cpp-id-data.h.
13403 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13404 (lazy_hex_fp_value): New function.
13405 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13407 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13409 * c-gimplify.c: Do not include tree-flow.h
13411 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13414 * c-common.c: Rename targetm member:
13415 targetm.enum_va_list -> targetm.enum_va_list_p
13417 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13419 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13421 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13423 * c-cppbuiltin.c: Do not include except.h.
13425 2010-06-24 Andi Kleen <ak@linux.intel.com>
13427 * c-common.c (warn_for_omitted_condop): New.
13428 * c-common.h (warn_for_omitted_condop): Add prototype.
13430 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13432 * c.opt (lang-objc): Remove.
13433 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13435 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13437 * c-opts.c: Include "tm_p.h".
13439 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13441 * c-common.c (parse_optimize_options): Update call to
13444 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13446 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13447 new type of types_used_by_cur_var_decl.
13449 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13452 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13453 for C++ standard compliance.
13455 2010-06-16 Jason Merrill <jason@redhat.com>
13457 * c.opt: Add -Wnoexcept.
13459 2010-06-16 Richard Guenther <rguenther@suse.de>
13462 * c-common.c (c_common_truthvalue_conversion): Remove
13463 premature and wrong optimization concering ADDR_EXPRs.
13465 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13467 * c-ada-spec.c (dump_sloc): Remove column info.
13468 (is_simple_enum): New function.
13469 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13470 enum types when relevant.
13472 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13474 * c-common.c (conversion_warning): Warn at expression
13477 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13479 * c-opts.c (c_common_handle_option): Don't handle
13482 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13484 * c-pragma.c (push_alignment): Use typed GC allocation.
13485 (handle_pragma_push_options): Likewise.
13487 * c-common.c (parse_optimize_options): Likewise.
13489 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13492 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13494 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13495 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13496 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13497 flag_signed_bitfields, warn_strict_null_sentinel,
13498 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13499 flag_gen_declaration, flag_no_gnu_keywords,
13500 flag_implement_inlines, flag_implicit_templates,
13501 flag_implicit_inline_templates, flag_optional_diags,
13502 flag_elide_constructors, flag_default_inline, flag_rtti,
13503 flag_conserve_space, flag_access_control, flag_check_new,
13504 flag_new_for_scope, flag_weak, flag_working_directory,
13505 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13506 flag_enforce_eh_specs, flag_threadsafe_statics,
13507 flag_pretty_templates): Remove.
13508 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13509 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13510 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13511 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13512 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13513 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13514 flag_no_gnu_keywords, flag_implement_inlines,
13515 flag_implicit_templates, flag_implicit_inline_templates,
13516 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13517 flag_rtti, flag_conserve_space, flag_access_control,
13518 flag_check_new, flag_new_for_scope, flag_weak,
13519 flag_working_directory, flag_use_cxa_atexit,
13520 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13521 flag_threadsafe_statics, flag_pretty_templates,
13522 warn_strict_null_sentinel): Remove.
13523 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13524 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13525 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13526 fimplicit-inline-templates, fimplicit-templates,
13527 flax-vector-conversions, fms-extensions, fnil-receivers,
13528 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13529 frtti, fshort-double, fshort-enums, fshort-wchar,
13530 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13531 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13532 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13533 gen-decls, undef): Use Var.
13534 (fdefault-inline, foptional-diags): Document as doing nothing.
13535 * c-opts.c (c_common_handle_option): Remove cases for options now
13536 using Var. Mark ignored options as such.
13538 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13540 * c-common.c: Moved to here from parent directory.
13541 * c-common.def: Likewise.
13542 * c-common.h: Likewise.
13543 * c-cppbuiltin.c: Likewise.
13544 * c-dump.c: Likewise.
13545 * c-format.c: Likewise.
13546 * c-format.h : Likewise.
13547 * c-gimplify.c: Likewise.
13548 * c-lex.c: Likewise.
13549 * c-omp.c: Likewise.
13551 * c-opts.c: Likewise.
13552 * c-pch.c: Likewise.
13553 * c-ppoutput.c: Likewise.
13554 * c-pragma.c: Likewise.
13555 * c-pragma.h: Likewise.
13556 * c-pretty-print.c: Likewise.
13557 * c-pretty-print.h: Likewise.
13558 * c-semantics.c: Likewise.
13559 * stub-objc.c: Likewise.
13561 * c-common.c: Include gt-c-family-c-common.h.
13562 * c-pragma.c: Include gt-c-family-c-pragma.h.
13564 Copyright (C) 2010-2022 Free Software Foundation, Inc.
13566 Copying and distribution of this file, with or without modification,
13567 are permitted in any medium without royalty provided the copyright
13568 notice and this notice are preserved.