1 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4 table entries for gcc_diag_char_table, and the 'Z' entry from
5 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
6 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
7 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
8 adding missing "Z" for this table. Remove erroneous "G" and "K"
10 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
11 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
12 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
14 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
16 * c-common.c (speculation_safe_resolve_call): New function.
17 (speculation_safe_resolve_params): New function.
18 (speculation_safe_resolve_return): New function.
19 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
20 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
21 __HAVE_SPECULATION_SAFE_VALUE.
23 2018-07-20 David Malcolm <dmalcolm@redhat.com>
25 * c-common.c (c_cpp_error): Remove redundant "line_table"
26 parameter from call to rich_location::set_range.
27 (maybe_suggest_missing_token_insertion): Likewise.
29 2018-07-20 Martin Sebor <msebor@redhat.com>
32 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
34 2018-07-20 Martin Sebor <msebor@redhat.com>
37 * c-common.h (c_common_handle_option): Change function argument
39 * c-opts.c (c_common_init_options): Same.
40 (c_common_handle_option): Same. Remove special handling of
41 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
42 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
43 options to take a HOST_WIDE_INT argument and accept a byte-size
45 (-Wvla-larger-than): Same.
46 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
47 (-Wno-vla-larger-than): Same.
49 2018-07-12 Jakub Jelinek <jakub@redhat.com>
51 * c-attribs.c (c_common_attribute_table): Add
52 "omp declare target implicit" attribute.
54 2018-07-12 Richard Biener <rguenther@suse.de>
57 * c-attribs.c (handle_packed_attribute): Do not build a variant
58 type with TYPE_PACKED, instead ignore the attribute if we may
59 not apply to the original type.
61 2018-07-10 Jakub Jelinek <jakub@redhat.com>
64 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
65 to contain TREE_LIST for both the original class iterator and the
68 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
70 * c-ada-spec.c (to_ada_name): Remove index parameter.
71 (pp_ada_tree_identifier): Likewise.
72 (dump_ada_macros): Adjust call to to_ada_name.
73 (struct overloaded_name_hash): Delete.
74 (struct overloaded_name_hasher): Likewise.
75 (overloaded_names): Likewise.
76 (compute_overloading_index): Likewise.
77 (dump_ada_decl_name): Do not call compute_overloading_index and
78 adjust calls to pp_ada_tree_identifier.
79 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
80 (dump_ada_import): Add spc parameter and switch to aspect syntax.
81 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
82 (dump_ada_enum_type): Remove type and display_convention parameters.
83 Adjust calls to pp_ada_tree_identifier.
84 (dump_ada_node): Likewise and for dump_ada_structure.
85 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
87 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
89 (print_constructor): Adjust call to pp_ada_tree_identifier.
90 (print_destructor): Likewise.
91 (dump_ada_declaration): Switch to aspect syntax.
92 (dump_ada_structure): Likewise and tidy up. Replace display_convention
93 parameter with nested parameter.
94 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
95 (dump_ada_specs): Do not delete overloaded_names table.
97 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
100 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
103 2018-07-05 Nathan Sidwell <nathan@acm.org>
105 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
106 NO_IMPLICIT_EXTERN_C.
108 2018-06-28 Martin Liska <mliska@suse.cz>
110 * cppspec.c: Include opt-suggestions.h.
112 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
113 Thomas Schwinge <thomas@codesourcery.com>
114 Cesar Philippidis <cesar@codesourcery.com>
116 * c-pragma.h (enum pragma_omp_clause): Add
117 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
118 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
120 2018-06-20 Jakub Jelinek <jakub@redhat.com>
123 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
126 2018-06-18 Martin Sebor <msebor@redhat.com>
129 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
132 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
134 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
136 2018-06-13 Jason Merrill <jason@redhat.com>
138 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
139 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
142 PR c++/86094 - wrong code with defaulted move ctor.
143 * c-opts.c (c_common_post_options): Bump the current ABI version to
144 13. Set warn_abi_version and flag_abi_compat_version to the current
145 version rather than 0. Fix defaulting flag_abi_compat_version from
148 2018-06-12 Martin Sebor <msebor@redhat.com>
151 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
152 sizeof source and destination yields the same value.
154 2018-06-12 Martin Liska <mliska@suse.cz>
156 * c.opt: Make MPX-related options as Deprecated.
158 2018-06-08 David Malcolm <dmalcolm@redhat.com>
160 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
163 2018-06-08 Martin Liska <mliska@suse.cz>
165 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
166 for MPX (macros, related functions, fields in cgraph_node, ...).
167 (handle_bnd_legacy): Likewise.
168 (handle_bnd_instrument): Likewise.
171 2018-06-06 Jakub Jelinek <jakub@redhat.com>
174 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
175 __cpp_transactional_memory to 201500 instead of 210500.
177 2018-06-06 Jason Merrill <jason@redhat.com>
179 PR c++/85710 - ICE with -Wmemset-elt-size.
180 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
182 2018-06-01 Jason Merrill <jason@redhat.com>
184 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
187 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
189 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
190 declaration for a typedef independently of whether the declaration of
191 the subtype is generated.
193 2018-05-31 Martin Sebor <msebor@redhat.com>
196 * c.opt (-Wno-alloc-size-larger-than): New option.
198 2018-04-22 David Pagan <dave.pagan@oracle.com>
201 * c-opts.c (c_common_post_options): Set default for warn_return_type
202 for C++/C++ with ObjC extensions only. For C, makes it possible to
203 differentiate between default (no option), -Wreturn-type, and
206 2018-05-29 Jason Merrill <jason@redhat.com>
208 * c.opt (Winit-list-lifetime): New flag.
210 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
212 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
213 splay_tree_delete_pointers.
215 2018-05-26 Jakub Jelinek <jakub@redhat.com>
218 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
219 noinline variable to workaround broken kernel headers.
221 2018-05-18 Jason Merrill <jason@redhat.com>
223 * c.opt (Wdeprecated-copy): New flag.
225 2018-05-17 Martin Liska <mliska@suse.cz>
227 * c-warn.c (overflow_warning): Do not use
228 space in between 'G_' and '('.
230 2018-05-09 Jason Merrill <jason@redhat.com>
232 * c-common.c (valid_array_size_p): Add complain parameter.
233 * c-common.h: ...which defaults to true.
235 2018-05-11 Jakub Jelinek <jakub@redhat.com>
238 * c-omp.c (c_omp_predetermined_sharing): Return
239 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
241 2018-05-11 Martin Liska <mliska@suse.cz>
244 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
247 2018-05-10 Jakub Jelinek <jakub@redhat.com>
250 * c-common.h (fold_offsetof_1): Removed.
251 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
252 CTX argument defaulted to ERROR_MARK.
253 * c-common.c (fold_offsetof_1): Renamed to ...
254 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
255 argument, convert the pointer constant to TYPE and use size_binop
256 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
257 a pointer type. Adjust recursive calls.
259 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
262 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
264 2018-05-07 Nathan Sidwell <nathan@acm.org>
266 * c.opt (ffor-scope): Remove functionality, issue warning.
268 2018-05-03 Nathan Sidwell <nathan@acm.org>
270 * c.opt (ffriend-injection): Remove functionality, issue warning.
272 2018-05-01 David Malcolm <dmalcolm@redhat.com>
275 * c-format.c (struct format_check_results): Add field
277 (check_format_info): Initialize it, and warn if encountered.
278 (check_format_arg): Distinguish between wide char and
279 everything else when detecting arrays of non-char.
281 2018-04-30 David Malcolm <dmalcolm@redhat.com>
283 * c-format.c (get_corrected_substring): Update for
284 location_get_source_line returning a char_span. Use a char_span
285 when handling the prefix of the correction.
286 * c-indentation.c (get_visual_column): Update for
287 location_get_source_line returning a char_span.
288 (get_first_nws_vis_column): Likewise.
290 2018-03-29 David Malcolm <dmalcolm@redhat.com>
293 * known-headers.cc (get_stdlib_header_for_name): Add various names
294 from <assert.h>, <string.h>, and <memory.h>; add more names from
297 2018-03-27 Jakub Jelinek <jakub@redhat.com>
300 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
301 get_base_address of the second operand is a VAR_P, rather than the
302 operand itself, and use gcc_checking_assert instead of gcc_assert.
304 2018-03-23 Marek Polacek <polacek@redhat.com>
307 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
308 <case RDIV_EXPR>: Tweak condition.
310 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
312 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
314 2018-03-16 Jakub Jelinek <jakub@redhat.com>
317 * c-warn.c (conversion_warning): Replace "to to" with "to" in
321 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
324 2018-03-16 Richard Biener <rguenther@suse.de>
327 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
328 unshare the possibly folded expression.
330 2018-03-15 Richard Biener <rguenther@suse.de>
333 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
335 2018-03-13 Martin Sebor <msebor@redhat.com>
337 PR tree-optimization/84725
338 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
339 with all three narrow character types, including their qualified forms.
341 2018-03-12 Martin Sebor <msebor@redhat.com>
343 PR tree-optimization/83456
344 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
345 Restore checking of bounded built-in functions.
346 (check_function_arguments): Also return the result
347 of warn_for_restrict.
348 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
349 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
351 2018-03-02 Marek Polacek <polacek@redhat.com>
354 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
357 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
359 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
362 2018-03-01 Marek Polacek <polacek@redhat.com>
365 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
366 alignment in computation.
368 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
370 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
371 <REAL_TYPE>: Deal specifically with _Float128/__float128.
373 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
375 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
376 (is_char_array): Take a type instead of a declaration.
377 (dump_ada_array_type): Likewise.
378 (is_simple_enum): Minor tweak.
379 (dump_ada_enum_type): New function extracted from...
380 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
381 <INTEGER_TYPE>: Remove unreachable code.
382 <RECORD_TYPE>: Likewise. Minor tweaks.
383 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
384 <ENUMERAL_TYPE>: New case.
385 <RECORD_TYPE>: Factor out common code.
386 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
387 Minor tweaks. Deal with enumeral types.
388 (dump_ada_structure): Minor tweaks.
390 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
392 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
393 address for incomplete structures.
394 (dump_forward_type): Do not bail out for incomplete structures.
395 (dump_ada_declaration): Do not special-case incomplete structures
396 for subtypes. Dump them as null records for types.
398 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
400 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
401 (is_char_array): Fix formatting.
402 (dump_template_types): Likewise.
403 (dump_generic_ada_node): Rename into...
404 (dump_ada_node): ...this.
405 <POINTER_TYPE>: Remove superfluous space. Use generic address for
406 incomplete structures and not for empty structures. Do not use it
407 when forward declarations are needed.
408 (dump_forward_type): New function.
409 (dump_nested_types): Remove FORWARD parameter. Do not consider
410 TREE_VISITED and do not generate a forward declaration. Only dump
411 original nested types for nested declaration.
412 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
413 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
414 <RECORD_TYPE>: Do not consider TREE_VISITED.
415 (dump_ada_declaration): Use booleans and fix formatting throughout.
416 <TYPE_DECL>: Skip incomplete structures and not empty structures.
417 Call dump_forward_type instead of dump_nested_types for a typedef.
418 Remove superfluous check and adjust call to dump_nested_types.
419 <POINTER_TYPE>: Call dump_forward_type and fall through.
420 (dump_ada_struct_decl): Rename into...
421 (dump_ada_structure): ...this. Do not special-case empty structures.
423 2018-02-27 Martin Sebor <msebor@redhat.com>
426 * c.opt (-Wmissing-attributes): New option.
428 2018-02-21 Martin Liska <mliska@suse.cz>
430 * c.opt (Wcatch-value=): Add IntegerRange.
432 2018-02-15 Jason Merrill <jason@redhat.com>
434 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
436 2018-02-09 Nathan Sidwell <nathan@acm.org>
439 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
441 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
444 2018-02-09 Martin Sebor <msebor@redhat.com>
447 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
448 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
449 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
450 (-Wstrict-overflow, -Wsuggest-attribute): Same.
451 (-Wuninitialized): Same.
453 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
455 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
456 keyword for components.
458 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
460 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
462 2018-02-02 Julia Koval <julia.koval@intel.com>
464 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
466 2018-01-29 Marek Polacek <polacek@redhat.com>
469 * c-format.c (check_function_format): Check current_function_decl.
471 2018-01-27 Jakub Jelinek <jakub@redhat.com>
473 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
475 (LAZY_HEX_FP_VALUES_CNT): Define.
476 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
477 values rather than just 12.
478 (builtin_define_with_hex_fp_value): Likewise.
480 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
483 * c.opt (-fmacro-prefix-map): New option.
484 * c-opts.c (c_common_handle_option): Handle it.
485 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
486 * c-ppoutput.c (init_pp_output): Likewise.
488 2018-01-17 David Malcolm <dmalcolm@redhat.com>
491 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
493 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
495 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
496 Skip 'f' and 'F' characters if it is true.
497 (store_ada_macro): Minor tweak.
498 (dump_ada_macros) <CPP_COMMENT>: Likewise.
499 <CPP_WSTRING>: Likewise.
500 <CPP_STRING>: Output '&' in the buffer if not the first string.
501 <CPP_NUMBER>: Adjust calls to dump_number.
503 2018-01-10 David Malcolm <dmalcolm@redhat.com>
506 * c-common.c: Include "selftest.h".
507 (get_atomic_generic_size): Perform the test for integral type
508 before the range test for any integer constant, fixing indentation
509 of braces. Call fold_for_warn before testing for an INTEGER_CST.
510 (reject_gcc_builtin): Strip any location wrapper from EXPR.
511 (selftest::test_fold_for_warn): New function.
512 (selftest::c_common_c_tests): New function.
513 (selftest::c_family_tests): Call it, and
514 selftest::c_pretty_print_c_tests.
515 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
516 * c-format.c (check_format_arg): Convert VAR_P check to a
518 * c-pretty-print.c: Include "selftest.h".
519 (pp_c_cast_expression): Don't print casts for location wrappers.
520 (selftest::assert_c_pretty_printer_output): New function.
521 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
522 (selftest::test_location_wrappers): New function.
523 (selftest::c_pretty_print_c_tests): New function.
524 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
526 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
527 Alan Hayward <alan.hayward@arm.com>
528 David Sherwood <david.sherwood@arm.com>
530 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
533 Alan Hayward <alan.hayward@arm.com>
534 David Sherwood <david.sherwood@arm.com>
536 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
540 Alan Hayward <alan.hayward@arm.com>
541 David Sherwood <david.sherwood@arm.com>
543 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
544 (convert_vector_to_array_for_subscript): Handle polynomial
545 TYPE_VECTOR_SUBPARTS.
546 (c_common_type_for_mode): Check valid_vector_subparts_p.
547 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
550 2018-01-03 Jakub Jelinek <jakub@redhat.com>
552 Update copyright years.
554 2017-12-22 Mike Stump <mikestump@comcast.net>
555 Eric Botcazou <ebotcazou@adacore.com>
557 * c-pragma.c (init_pragma): Register pragma GCC unroll.
558 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
560 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
564 * c-semantics.c (only_debug_stmts_after_p): New.
565 (pop_stmt_list): Clear side effects in debug-only stmt list.
566 Check for single nondebug stmt followed by debug stmts only.
568 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
571 * c-semantics.c (pop_stmt_list): Propagate side effects from
572 single nondebug stmt to container list.
574 2017-12-19 Jakub Jelinek <jakub@redhat.com>
576 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
577 conditions with typical order conditions.
579 2017-12-18 Marek Polacek <polacek@redhat.com>
581 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
584 2017-12-17 Martin Sebor <msebor@redhat.com>
586 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
587 an error for attribute warn_if_not_aligned.
589 2017-12-16 Martin Sebor <msebor@redhat.com>
591 PR tree-optimization/78918
592 * c-common.c (check_function_restrict): Avoid checking built-ins.
593 * c.opt (-Wrestrict): Include in -Wall.
595 2017-12-15 Jakub Jelinek <jakub@redhat.com>
597 * c-attribs.c (c_common_attribute_table,
598 c_common_format_attribute_table): Swap affects_type_identity
599 and handler fields, adjust comments.
601 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
603 * c.opt (Wcast-function-type): New warning option.
604 * c-lex.c (get_fileinfo): Avoid warning.
605 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
607 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
610 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
611 Adjust the size of buf1 and buf2, add a new buf to avoid
612 format-overflow warning.
614 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
616 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
617 subsequent statement list.
619 2017-12-07 Martin Sebor <msebor@redhat.com>
623 * c-attribs.c (attr_aligned_exclusions): New array.
624 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
625 (attr_common_exclusions, attr_const_pure_exclusions): Same.
626 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
627 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
628 (attr_warn_unused_result_exclusions): Same.
629 (handle_hot_attribute, handle_cold_attribute): Simplify.
630 (handle_const_attribute): Warn on function returning void.
631 (handle_pure_attribute): Same.
632 (handle_aligned_attribute): Diagnose conflicting attribute
634 * c-warn.c (diagnose_mismatched_attributes): Simplify.
636 2017-12-06 David Malcolm <dmalcolm@redhat.com>
639 * c-common.c (selftest::c_family_tests): Call
640 selftest::c_spellcheck_cc_tests.
641 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
642 * c-spellcheck.cc: Include "selftest.h".
643 (name_reserved_for_implementation_p): New function.
644 (should_suggest_as_macro_p): New function.
645 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
646 should_suggest_as_macro_p and call it.
647 (selftest::test_name_reserved_for_implementation_p): New function.
648 (selftest::c_spellcheck_cc_tests): New function.
649 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
651 2017-12-06 David Malcolm <dmalcolm@redhat.com>
653 * c-spellcheck.cc: New file, taken from macro-handling code in
655 * c-spellcheck.h: New file, taken from macro-handling code in
658 2017-12-01 Jakub Jelinek <jakub@redhat.com>
660 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
662 (handle_simd_attribute): Don't check for "cilk simd function"
663 attribute. Reindent, formatting changes.
665 2017-11-30 Julia Koval <julia.koval@intel.com>
667 * c-common.h (inv_list): Remove.
669 2017-11-28 Jakub Jelinek <jakub@redhat.com>
672 * c-common.c (c_switch_covers_all_cases_p_1,
673 c_switch_covers_all_cases_p): New functions.
674 * c-common.h (c_switch_covers_all_cases_p): Declare.
676 2017-11-28 Julia Koval <julia.koval@intel.com>
677 Sebastian Peryt <sebastian.peryt@intel.com>
679 * array-notation-common.c: Delete.
680 * c-cilkplus.c: Ditto.
681 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
682 * c-common.def (ARRAY_NOTATION_REF): Remove.
683 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
684 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
685 c_validate_cilk_plus_loop, cilkplus_an_parts,
686 cilk_ignorable_spawn_rhs_op,
687 cilk_recognize_spawn): Remove.
688 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
689 * c-omp.c: Remove CILK_SIMD check.
691 * c-pragma.h: Remove CILK related pragmas.
692 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
693 ARRAY_NOTATION_REF condition.
694 (c_pretty_printer::expression): Ditto.
695 * c.opt (fcilkplus): Remove.
698 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
700 * c-pretty-print.c (pp_c_additive_expression,
701 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
703 2017-11-21 Jakub Jelinek <jakub@redhat.com>
705 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
708 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
709 instead of tree_to_uhwi, formatting fix.
711 2017-11-20 David Malcolm <dmalcolm@redhat.com>
714 * known-headers.cc: New file, based on material from c/c-decl.c.
715 (suggest_missing_header): Copied as-is.
716 (get_stdlib_header_for_name): New, based on get_c_name_hint but
717 heavily edited to add C++ support. Add some knowledge about
718 <limits.h>, <stdint.h>, and <wchar.h>.
719 * known-headers.h: Likewise.
721 2017-11-20 David Malcolm <dmalcolm@redhat.com>
723 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
724 (lookup_name_fuzzy): Likewise. Convert return type from
725 const char * to name_hint. Add location_t param.
726 * name-hint.h: New header.
728 2017-11-19 Jakub Jelinek <jakub@redhat.com>
732 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
734 2017-11-16 Joseph Myers <joseph@codesourcery.com>
736 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
737 expected publication date of C17.
738 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
740 2017-11-15 Joseph Myers <joseph@codesourcery.com>
743 * c-common.c (c_common_reswords): Add __builtin_tgmath.
744 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
746 2017-11-10 Martin Sebor <msebor@redhat.com>
749 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
750 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
751 * c.opt (-Wstringop-truncation): New option.
753 2017-11-06 Martin Liska <mliska@suse.cz>
756 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
758 * c.opt: Set default value of warn_return_type.
760 2017-10-31 David Malcolm <dmalcolm@redhat.com>
762 * c-common.c (binary_op_error): Update for renaming of
764 (c_parse_error): Likewise.
765 * c-warn.c (warn_logical_not_parentheses): Likewise for
766 renaming of inform_at_rich_loc.
767 (warn_for_restrict): Likewise for renaming of
768 warning_at_rich_loc_n.
770 2017-10-30 Joseph Myers <joseph@codesourcery.com>
772 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
773 * c-opts.c (set_std_c17): New function.
774 (c_common_init_options): Use gnu17 as default C version.
775 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
777 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
779 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
780 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
781 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
784 2017-10-23 Marek Polacek <polacek@redhat.com>
787 * c-warn.c (warnings_for_convert_and_check): Fix typos.
789 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
791 * c-common.c (check_builtin_function_arguments): Also check arguments
792 of __builtin_alloca_with_align_and_max.
794 2017-10-17 David Malcolm <dmalcolm@redhat.com>
796 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
797 rather than NULL to format_warning_va.
798 (check_format_types): Likewise when calling format_type_warning.
799 Remove code to extract source_ranges and source_range * in favor
800 of just a location_t.
801 (format_type_warning): Convert source_range * param to a
804 2017-10-13 Jakub Jelinek <jakub@redhat.com>
806 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
809 2017-10-12 David Malcolm <dmalcolm@redhat.com>
811 * c-common.c (enum missing_token_insertion_kind): New enum.
812 (get_missing_token_insertion_kind): New function.
813 (maybe_suggest_missing_token_insertion): New function.
814 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
816 2017-10-11 Nathan Sidwell <nathan@acm.org>
818 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
819 (c_common_handle_option): Update incpath_kind names.
821 2017-10-11 Martin Liska <mliska@suse.cz>
824 * c-attribs.c (handle_no_sanitize_attribute): Report directly
827 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
829 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
830 operating on trees as wide_ints.
831 * c-common.c (pointer_int_sum): Likewise.
832 * c-pretty-print.c (pp_c_integer_constant): Likewise.
833 * c-warn.c (match_case_to_enum_1): Likewise.
834 (c_do_switch_warnings): Likewise.
835 (maybe_warn_shift_overflow): Likewise.
837 2017-10-10 Jakub Jelinek <jakub@redhat.com>
840 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
841 instead of wide_int::from.
843 2017-10-06 Jakub Jelinek <jakub@redhat.com>
846 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
847 using to_widest use wide_int with the larger of the two precisions.
849 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
851 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
854 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
856 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
857 when combining the original unconverted comparison operands.
859 2017-09-29 Jakub Jelinek <jakub@redhat.com>
861 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
864 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
866 * c-ada-spec.c (to_ada_name): Add index parameter.
867 (pp_ada_tree_identifier): Likewise.
868 (dump_ada_macros): Adjust call to to_ada_name.
869 (struct overloaded_name_hash): New type.
870 (struct overloaded_name_hasher): Likewise.
871 (overloaded_names): New hash table.
872 (compute_overloading_index): New function.
873 (dump_ada_decl_name): Call it and pass the result to
874 pp_ada_tree_identifier.
875 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
876 (dump_ada_function_declaration): Likewise.
877 (dump_generic_ada_node): Likewise.
878 (print_constructor): Likewise.
879 (print_destructor): Likewise.
880 (dump_ada_specs): Delete overloaded_names table.
882 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
884 * c-ada-spec.c (max_ada_macros): Move around.
885 (store_ada_macro_index): Likewise.
886 (source_file): Rename into...
887 (macro_source_file): ...this.
888 (count_ada_macro): Move around.
889 (store_ada_macro): Likewise.
890 (compare_macro): Likewise.
891 (print_ada_macros): Merge in...
892 (dump_ada_macros): ...this.
893 (source_file_base): Rename into...
894 (current_source_file): ...this.
895 (print_comment): Move around.
896 (dump_ada_nodes): Call dump_ada_declaration directly.
897 (struct with): Change type of limited field to bool.
898 (append_withs): Change type of limited_access parameter to bool.
899 (pp_ada_tree_identifie): Likewise.
900 (dump_ada_decl_nam): Likewise.
901 (dump_generic_ada_node): Likewise. Do not print the return type.
902 (to_ada_name): Change type of space_found parameter to bool.
903 (dump_ada_function_declaration): Return void and change type of
904 parameters to bool. Also print the return type for a function.
905 (print_ada_methods): Rename into...
906 (dump_ada_methods): ...this.
907 (print_ada_declaration): Rename into ...
908 (dump_ada_declaration): ...this. Do not print the return type.
909 (print_ada_struct_decl): Rename into...
910 (dump_ada_struct_decl): ...this.
912 2017-09-29 Jakub Jelinek <jakub@redhat.com>
914 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
915 rather than DECL_INITIAL.
916 (common_handle_aligned_attribute): Likewise.
918 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
920 * c.opt (gen-decls): Add RejectNegative.
922 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
923 Jakub Jelinek <jakub@redhat.com>
925 Add support for -std=c++2a.
926 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
927 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
928 * c-opts.c (set_std_cxx2a): New.
929 (c_common_handle_option): Set options when -std=c++2a is enabled.
930 (c_common_post_options): Adjust comments.
931 (set_std_cxx14, set_std_cxx17): Likewise.
933 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
935 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
936 message for non-uniform endianness and issue a warning in C++.
938 2017-09-15 Jakub Jelinek <jakub@redhat.com>
940 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
941 (Wc++17-compat): Change from undocumented alias to option.
942 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
943 change C++1z to C++17 in description.
944 (std=c++1z, std=gnu++1z): Change from option to undocumented
946 (std=c++17, std=gnu++17): Change from undocumented alias to option.
948 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
949 * c-opts.c (set_std_cxx1z): Rename to ...
950 (set_std_cxx17): ... this.
951 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
952 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
954 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
957 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
959 * c-attribs.c (common_handle_aligned_attribute): Don't warn
960 function alignment if warn_if_not_aligned_p is true.
962 2017-09-12 Nathan Sidwell <nathan@acm.org>
964 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
965 resort_sorted_fields): Move to c/c-decl.c.
966 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
967 (struct sorted_fields_type): Move to c/c-lang.h.
969 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
972 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
974 2017-09-04 Marek Polacek <polacek@redhat.com>
977 * c-warn.c (warn_tautological_bitwise_comparison): New function.
978 (warn_tautological_cmp): Call it.
980 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
982 * c-opts.c (c_common_finish): Write dependency information even if
985 2017-09-01 Jakub Jelinek <jakub@redhat.com>
988 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
989 (omp_pragmas_simd): ... here.
990 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
991 create new clauses list containing just simd clause.
993 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
994 Alan Hayward <alan.hayward@arm.com>
995 David Sherwood <david.sherwood@arm.com>
997 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
998 into scalar_mode_supported_p call.
999 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1001 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1002 Alan Hayward <alan.hayward@arm.com>
1003 David Sherwood <david.sherwood@arm.com>
1005 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1006 for the mode iterator.
1008 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1009 Alan Hayward <alan.hayward@arm.com>
1010 David Sherwood <david.sherwood@arm.com>
1012 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1013 * c-common.c (c_build_vec_perm_expr): Likewise.
1015 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1016 Alan Hayward <alan.hayward@arm.com>
1017 David Sherwood <david.sherwood@arm.com>
1019 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1021 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1022 Alan Hayward <alan.hayward@arm.com>
1023 David Sherwood <david.sherwood@arm.com>
1025 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1026 before calling targetm.addr_space.valid_pointer_mode.
1028 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1029 Alan Hayward <alan.hayward@arm.com>
1030 David Sherwood <david.sherwood@arm.com>
1032 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1034 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1035 Alan Hayward <alan.hayward@arm.com>
1036 David Sherwood <david.sherwood@arm.com>
1038 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1040 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1042 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1043 Alan Hayward <alan.hayward@arm.com>
1044 David Sherwood <david.sherwood@arm.com>
1046 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1049 2017-08-29 Martin Liska <mliska@suse.cz>
1052 * c-common.c (parse_optimize_options): Add argument to function
1054 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1056 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1058 * c-lex.c (interpret_float): Use token location
1059 when building an EXCESS_PRECISION_EXPR.
1061 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1063 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1064 it to check_function_format.
1065 * c-common.h (check_function_arguments): Add vec<location_t> *
1067 (check_function_format): Likewise.
1068 * c-format.c (struct format_check_context): Add field "arglocs".
1069 (check_function_format): Add param "arglocs"; pass it to
1071 (check_format_info): Add param "arglocs"; use it to initialize
1072 new field of format_ctx.
1073 (check_format_arg): Pass format_ctx->arglocs to new param of
1074 check_format_info_main.
1075 (class argument_parser): New field "arglocs".
1076 (argument_parser::argument_parser): Add "arglocs_" param and use
1077 it to initialize new field.
1078 (argument_parser::check_argument_type): Pass new arglocs field to
1080 (check_format_info_main): Add param "arglocs", and use it when
1081 constructing arg_parser.
1082 (check_format_types): Add param "arglocs"; use it if non-NULL when
1083 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1085 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1088 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1089 (c_common_attribute_table): Add warn_if_not_aligned.
1090 (handle_aligned_attribute): Renamed to ...
1091 (common_handle_aligned_attribute): Remove argument, name, and add
1092 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1093 (handle_aligned_attribute): New.
1094 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1096 2017-08-14 Martin Sebor <msebor@redhat.com>
1099 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1100 (handle_nonstring_attribute): New function.
1102 2017-08-14 Martin Sebor <msebor@redhat.com>
1105 * c-format.h (T89_G): New macro.
1106 * c-format.c (local_gcall_ptr_node): New variable.
1107 (init_dynamic_diag_info): Initialize it.
1109 2017-08-11 Martin Liska <mliska@suse.cz>
1111 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1112 TARGET_SUPPORTS_ALIASES.
1114 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1116 * c-common.c (c_parse_error): Add rich_location * param, using it
1117 rather implicitly using input_location.
1118 * c-common.h (c_parse_error): Add rich_location * param.
1120 2017-08-09 Marek Polacek <polacek@redhat.com>
1122 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1123 (c_common_truthvalue_conversion): Likewise.
1124 * c-omp.c (c_finish_omp_atomic): Likewise.
1125 * c-common.h (build_binary_op): Update declaration.
1127 2017-08-08 Martin Liska <mliska@suse.cz>
1129 * c-ada-spec.c: Include header files.
1130 * c-ubsan.c: Likewise.
1131 * c-warn.c: Likewise.
1133 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1136 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1138 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1140 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1141 (print_ada_methods): Likewise.
1142 (print_ada_declaration): Likewise.
1144 2017-08-07 Martin Liska <mliska@suse.cz>
1146 * array-notation-common.c: Add new includes.
1147 * c-format.c( handle_format_attribute): Canonicalize a format
1149 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1151 * c-pretty-print.c: Add new include.
1153 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1155 * c-ada-spec.c (has_static_fields): Look only into variables.
1156 (print_constructor): Add TYPE parameter and use it for the name.
1157 (print_destructor): Likewise.
1158 (print_ada_declaration): Adjust to new constructor/destructor names.
1159 Adjust calls to print_constructor and print_destructor.
1160 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1161 Look only into variables in the final loop.
1163 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1165 * c-ada-spec.c (has_static_fields): Look only into fields.
1166 (dump_generic_ada_node): Small tweak.
1167 (dump_nested_types): Look only into fields.
1168 (print_ada_declaration): Look only into methods. Small tweak.
1169 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1171 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1173 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1174 (dump_ada_function_declaration): Likewise.
1175 (dump_generic_ada_node): Likewise.
1176 (print_ada_declaration): Add support for const-qualified variables.
1178 2017-07-31 Martin Liska <mliska@suse.cz>
1181 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1182 Guard condition with flag_sanitize_p also with current_function_decl
1184 (ubsan_maybe_instrument_reference_or_call): Likewise.
1186 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1188 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1190 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1192 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1194 (print_ada_declaration): Add missing guard for record types.
1196 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1199 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1200 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1201 new COMPOUND_EXPRs around the rhs of the comparison.
1203 2017-07-27 Marek Polacek <polacek@redhat.com>
1206 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1209 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1211 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1212 (handle_noipa_attribute): New function.
1214 2017-07-07 Torsten Duwe <duwe@suse.de>
1216 * c-attribs.c (c_common_attribute_table): Add entry for
1217 "patchable_function_entry".
1219 2017-07-20 Nathan Sidwell <nathan@acm.org>
1221 Remove TYPE_METHODS.
1222 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1223 dump_ada_template, print_ada_methods,
1224 print_ada_declaration): Member fns are on TYPE_FIELDS.
1226 2017-07-18 Nathan Sidwell <nathan@acm.org>
1228 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1230 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1232 * c-common.c (try_to_locate_new_include_insertion_point): New
1234 (per_file_includes_t): New typedef.
1235 (added_includes_t): New typedef.
1236 (added_includes): New variable.
1237 (maybe_add_include_fixit): New function.
1238 * c-common.h (maybe_add_include_fixit): New decl.
1240 2017-07-10 Martin Sebor <msebor@redhat.com>
1243 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1245 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1247 * c-common.c (selftest::c_family_tests): New.
1248 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1249 (selftest::c_family_tests): New decl.
1251 2017-07-04 Marek Polacek <polacek@redhat.com>
1254 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1257 2017-07-04 Marek Polacek <polacek@redhat.com>
1259 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1261 2017-06-28 Martin Liska <mliska@suse.cz>
1264 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1265 to a function declaration.
1267 2017-06-28 Martin Liska <mliska@suse.cz>
1270 * c.opt: Add IntegerRange to various options.
1272 2017-06-26 Marek Polacek <polacek@redhat.com>
1275 * c-common.h (warn_for_multistatement_macros): Declare.
1276 * c-warn.c: Include "c-family/c-indentation.h".
1277 (warn_for_multistatement_macros): New function.
1278 * c.opt (Wmultistatement-macros): New option.
1279 * c-indentation.c (guard_tinfo_to_string): No longer static.
1280 Change the parameter type to "enum rid". Handle RID_SWITCH.
1281 * c-indentation.h (guard_tinfo_to_string): Declare.
1283 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1285 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1287 2017-06-15 Martin Sebor <msebor@redhat.com>
1290 * c.opt (-Wclass-memaccess): New option.
1292 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1294 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1296 2017-06-13 Marek Polacek <polacek@redhat.com>
1299 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1302 2017-06-13 Martin Liska <mliska@suse.cz>
1305 * c-attribs.c (add_no_sanitize_value): New function.
1306 (handle_no_sanitize_attribute): Likewise.
1307 (handle_no_sanitize_address_attribute): Use the function.
1308 (handle_no_sanitize_thread_attribute): New function.
1309 (handle_no_address_safety_analysis_attribute): Use
1310 add_no_sanitize_value.
1311 (handle_no_sanitize_undefined_attribute): Likewise.
1312 * c-common.h: Declare new functions.
1313 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1314 (ubsan_instrument_shift): Likewise.
1315 (ubsan_instrument_bounds): Likewise.
1316 (ubsan_maybe_instrument_array_ref): Likewise.
1317 (ubsan_maybe_instrument_reference_or_call): Likewise.
1319 2017-06-11 Jason Merrill <jason@redhat.com>
1321 * c-ada-spec.c, c-pragma.c: Use id_equal.
1323 2017-06-04 Marek Polacek <polacek@redhat.com>
1326 * c-format.c (matching_type_p): Return false if any of the types
1327 requires structural equality.
1329 2017-06-02 Martin Sebor <msebor@redhat.com>
1332 * c-warn.c (conversion_warning): Use -Wconversion for integer
1333 conversion and -Wfloat-conversion for floating one.
1335 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1337 * c.opt (Wsizeof-pointer-div): New warning option.
1339 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1341 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1342 (Wcatch-value=1): Enable by -Wall.
1344 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1346 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1348 * c.opt (fdiagnostics-show-template-tree): New option.
1349 (felide-type): New option.
1351 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1353 * c.opt (Wcatch-value=): New C++ warning flag.
1355 2017-05-24 Nathan Sidwell <nathan@acm.org>
1357 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1358 const casts to avoid warning.
1360 2017-05-24 Martin Sebor <msebor@redhat.com>
1363 * c-common.h (unsafe_conversion_p): Add a function argument.
1364 * c-common.c (unsafe_conversion_p): Same.
1365 Add type names and values to diagnostics.
1366 (scalar_to_vector): Adjust.
1367 * c-warn.c (constant_expression_error): Add a function argument.
1368 Add type names and values to diagnostics.
1369 (conversion_warning): Add a function argument.
1370 Add type names and values to diagnostics.
1371 (warnings_for_convert_and_check): Same.
1373 2017-05-19 Jason Merrill <jason@redhat.com>
1375 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1378 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1380 * c-format.c (locus): Move out of function scope,
1383 2017-05-19 Nathan Sidwell <nathan@acm.org>
1385 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1386 (c_common_parse_file): Remove class dump handling.
1387 (get_dump_info): Likewise.
1389 2017-05-19 Richard Biener <rguenther@suse.de>
1392 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1393 to alias-set zero memory.
1395 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1397 * c-format.c (local_tree_type_node): Add GTY attribute.
1399 2017-05-18 Marek Polacek <polacek@redhat.com>
1401 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1402 (c_common_fixed_point_type_for_size): Likewise.
1403 (c_common_type_for_mode): Likewise.
1404 (shorten_compare): Likewise.
1405 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1406 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1408 2017-05-18 Marek Polacek <polacek@redhat.com>
1410 * c-common.c (self_promoting_args_p): Change the return type to bool.
1411 Use false/true instead of 0/1.
1412 * c-common.h (self_promoting_args_p): Update.
1414 2017-05-17 Marek Polacek <polacek@redhat.com>
1416 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1417 * c-warn.c: Likewise.
1419 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1421 Implement new C++ intrinsics __is_assignable and __is_constructible.
1422 * c-common.c (__is_assignable, __is_constructible): New.
1423 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1425 2017-05-17 Martin Liska <mliska@suse.cz>
1427 * c-common.h: Introduce dump_flags_t type and
1428 use it instead of int type.
1429 * c-gimplify.c (c_genericize): Likewise.
1430 * c-opts.c: Likewise.
1432 2017-05-17 Marek Polacek <polacek@redhat.com>
1434 * c-common.c (c_save_expr): Remove.
1435 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1436 * c-common.h (c_save_expr): Remove declaration.
1438 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1441 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1442 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1443 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1444 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1446 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1448 2017-05-09 Marek Polacek <polacek@redhat.com>
1451 * c-warn.c (unwrap_c_maybe_const): New.
1452 (warn_logical_operator): Call it.
1454 2017-05-09 Nathan Sidwell <nathan@acm.org>
1456 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1457 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1459 2017-05-08 Martin Sebor <msebor@redhat.com>
1461 PR translation/80280
1462 * c-format.h (struct format_flag_spec): Add new member.
1464 * c-format.c (local_tree_type_node): New global.
1465 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1466 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1467 (strfmon_flag_specs): Likewise.
1468 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1469 with distinct quoting properties.
1470 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1471 (flag_chars_t::validate): Add argument and handle bad quoting.
1472 (check_format_info_main): Handle quoting problems.
1473 (init_dynamic_diag_info): Simplify.
1475 2017-05-08 Jason Merrill <jason@redhat.com>
1477 * c-opts.c (c_common_post_options): Update defaults for
1478 flag_abi_version and flag_abi_compat_version.
1480 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1482 * c-common.c (c_cpp_error): Replace report_diagnostic
1483 with diagnostic_report_diagnostic.
1485 2017-05-04 Martin Sebor <msebor@redhat.com>
1487 PR translation/80280
1488 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1489 (handle_weakref_attribute): Same.
1491 2017-05-03 Nathan Sidwell <nathan@acm.org>
1493 Canonicalize canonical type hashing
1494 * c-common.c (complete_array_type): Use type_hash_canon.
1496 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1499 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1501 (cilk_install_body_pedigree_operations): Likewise.
1502 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1504 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1505 (cilk_install_body_pedigree_operations): Likewise.
1506 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1509 2017-04-27 Jakub Jelinek <jakub@redhat.com>
1512 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1513 flag on non-aggregate element types.
1515 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1517 * c-common.c (c_type_hasher, type_hash_table): Remove.
1518 (c_common_get_alias_set): Remove unreachable code.
1519 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1521 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1523 * c.opt (Wextra-semi): New C++ warning flag.
1525 2017-04-20 Jakub Jelinek <jakub@redhat.com>
1528 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1530 2017-04-18 Jakub Jelinek <jakub@redhat.com>
1534 * c-common.c (c_common_type_for_mode): Don't handle
1535 widest_*_literal_type_node here.
1536 c_common_signed_or_unsigned_type): Likewise.
1537 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1538 to *intTI_type_node or *intDI_type_node depending on whether
1539 TImode is supported by the target or not.
1541 2017-04-10 Martin Liska <mliska@suse.cz>
1544 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1545 doing an UBSAN check.
1547 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1549 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1551 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1554 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1556 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1557 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1560 2017-03-31 David Malcolm <dmalcolm@redhat.com>
1562 PR documentation/78732
1563 * c.opt (Wendif-labels): Fix description to refer to
1564 #else rather than #elif.
1566 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1569 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1570 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1572 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1575 * c-common.c (c_common_mark_addressable_vec): Don't set
1576 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1578 2017-03-21 Martin Sebor <msebor@redhat.com>
1581 * c-common.c (set_underlying_type): Mark type used only when
1582 original del is declared unused.
1584 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1586 PR translation/79848
1587 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1590 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1593 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1594 from inform's message, so that xgettext can locate it.
1596 2017-03-09 Marek Polacek <polacek@redhat.com>
1600 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1601 conversion to the attribute list.
1603 2017-03-09 Martin Liska <mliska@suse.cz>
1605 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1607 2017-03-03 Jason Merrill <jason@redhat.com>
1609 * c.opt (Wnoexcept-type): New.
1611 2017-03-02 Richard Biener <rguenther@suse.de>
1614 * c-common.c (c_common_mark_addressable_vec): Look through
1617 2017-02-28 Martin Liska <mliska@suse.cz>
1619 * c.opt: Replace space with tabular for options of <number>
1622 2017-02-28 Martin Liska <mliska@suse.cz>
1624 * c.opt: Fix --help=option -Q for options which are of
1627 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1630 * c-common.c (check_function_restrict): New function.
1631 (check_function_arguments): Add FNDECL argument. Call
1632 check_function_restrict if -Wrestrict.
1633 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1634 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1635 * c-common.h (check_function_arguments): Add FNDECL argument.
1636 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1638 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1640 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1641 treatment of parameters with pointer-to-tagged type and tidy up.
1642 (print_ada_methods): Remove the special treatment of C++ static member
1645 2017-02-22 Martin Liska <mliska@suse.cz>
1647 * c.opt: Replace inequality signs with square brackets
1650 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1653 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1656 2017-02-17 Joseph Myers <joseph@codesourcery.com>
1658 * c-cppbuiltin.c (builtin_define_float_constants): Define
1659 __DECIMAL_DIG__ to the value for long double.
1661 2017-02-15 Marek Polacek <polacek@redhat.com>
1664 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1665 conversion has occured.
1667 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1669 * c-common.c (c_common_reswords): Add "__RTL".
1670 * c-common.h (enum rid): Add RID_RTL.
1672 2017-01-20 Marek Polacek <polacek@redhat.com>
1675 * c-common.h (do_warn_duplicated_branches_r): Declare.
1676 * c-gimplify.c (c_genericize): Walk the function tree calling
1677 do_warn_duplicated_branches_r.
1678 * c-warn.c (expr_from_macro_expansion_r): New.
1679 (do_warn_duplicated_branches): New.
1680 (do_warn_duplicated_branches_r): New.
1681 * c.opt (Wduplicated-branches): New option.
1683 2017-01-17 David Malcolm <dmalcolm@redhat.com>
1686 * c-indentation.c (warn_for_misleading_indentation): Use the past
1687 subjunctive in the note.
1689 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1692 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1693 start type to integer_type.
1695 2017-01-16 Jakub Jelinek <jakub@redhat.com>
1698 * c.opt (gen-decls): Add Driver flag.
1700 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1703 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1706 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1708 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1711 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1713 2017-01-12 Martin Sebor <msebor@redhat.com>
1715 (-Wformat-overflow): ...to this.
1717 2017-01-11 Martin Sebor <msebor@redhat.com>
1720 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1721 Also enable for LTO.
1723 2017-01-10 Jason Merrill <jason@redhat.com>
1725 Implement P0195R2, C++17 variadic using.
1726 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1728 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1730 PR translation/79019
1731 PR translation/79020
1732 * c.opt (Wnormalized=): Fix typo in description.
1734 2017-01-08 Martin Sebor <msebor@redhat.com>
1737 * c.opt (-Wformat-truncation): New option.
1739 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1741 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1742 value to unsigned short to fit in 4 hex digits without
1745 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1747 * c.opt (fsso-struct): Add 'native' value.
1749 2017-01-05 Martin Liska <mliska@suse.cz>
1752 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1755 2017-01-04 Marek Polacek <polacek@redhat.com>
1758 * c.opt (Wpointer-compare): New option.
1760 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1763 * c.opt (fsso-struct=): Add RejectNegative.
1765 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1767 Update copyright years.
1769 2016-12-29 Martin Liska <mliska@suse.cz>
1772 * c.opt (strong-eval-order): Add RejectNegative keyword.
1774 2016-12-22 Jason Merrill <jason@redhat.com>
1776 Implement P0522R0, matching of template template arguments.
1777 * c-cppbuiltin.c (c_cpp_builtins): Define
1778 __cpp_template_template_args.
1780 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1783 * c-common.c (struct nonnull_arg_ctx): New type.
1784 (check_function_nonnull): Return bool instead of void. Use
1785 nonnull_arg_ctx as context rather than just location_t.
1786 (check_nonnull_arg): Adjust for the new context type, set
1787 warned_p to true if a warning has been diagnosed.
1788 (check_function_arguments): Return bool instead of void.
1789 * c-common.h (check_function_arguments): Adjust prototype.
1791 2016-12-21 Jason Merrill <jason@redhat.com>
1793 * c.opt (-fnew-ttp-matching): New flag.
1794 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1796 2016-12-14 Martin Jambor <mjambor@suse.cz>
1798 * c-omp.c: Include omp-general.h instead of omp-low.h.
1799 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1802 2016-12-14 Martin Sebor <msebor@redhat.com>
1805 * c-common.c (check_nonnull_arg): Disable when optimization
1808 2016-12-12 Marek Polacek <polacek@redhat.com>
1811 * c-common.c (attribute_fallthrough_p): Return false for
1814 2016-12-08 Martin Sebor <msebor@redhat.com>
1817 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
1819 2016-12-08 Martin Sebor <msebor@redhat.com>
1822 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
1825 2016-12-07 Martin Sebor <msebor@redhat.com>
1831 * c.opt (-Wstringop-overflow): New option.
1833 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
1835 * c-attribs.c (asan odr indicator): New attribute.
1836 (handle_asan_odr_indicator_attribute): New function.
1838 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1840 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
1843 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1845 * c-common.c (excess_precision_mode_join): New.
1846 (c_ts18661_flt_eval_method): New.
1847 (c_c11_flt_eval_method): Likewise.
1848 (c_flt_eval_method): Likewise.
1849 * c-common.h (excess_precision_mode_join): New.
1850 (c_flt_eval_method): Likewise.
1851 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
1852 (cpp_iec_559_value): Call it.
1853 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
1854 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
1855 __FLT_EVAL_METHOD_TS_18661_3__.
1857 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1859 * c-opts.c (c_common_post_options): Add logic to handle the default
1860 case for -fpermitted-flt-eval-methods.
1862 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
1864 * c.opt (Wexpansion-to-defined): New.
1866 2016-11-23 Jakub Jelinek <jakub@redhat.com>
1869 * c-pragma.c (handle_pragma_target): Don't replace
1870 current_target_pragma, but chainon the new args to the current one.
1872 2016-11-22 Nathan Sidwell <nathan@acm.org>
1874 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
1875 indentation and formatting.
1877 2016-11-21 Martin Sebor <msebor@redhat.com>
1879 * c.opt (-fprintf-return-value): Enable by default.
1881 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1884 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
1885 * c-common.c (c_common_nodes_and_builtins): Initialize
1886 const_tm_ptr_type_node.
1888 2016-11-16 Marek Polacek <polacek@redhat.com>
1891 * c-common.c (c_add_case_label): Turn error_at calls into inform.
1893 2016-11-14 Jakub Jelinek <jakub@redhat.com>
1895 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
1897 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1898 Richard Biener <rguenther@suse.de>
1900 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
1901 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
1902 * c.opt (fgimple): New option.
1904 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1907 * c-common.h (warn_for_restrict): Declare.
1908 * c-warn.c: Include gcc-rich-location.h.
1909 (warn_for_restrict): New function.
1910 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
1911 (gcc_cdiag_char_table): Likewise.
1912 (gcc_cxxdiag_char_table): Likewise.
1913 * c.opt (Wrestrict): New option.
1915 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
1917 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
1918 for nested types only if the type is a record or union and dump SLOC.
1920 2016-11-09 Jason Merrill <jason@redhat.com>
1922 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
1924 2016-11-09 Jakub Jelinek <jakub@redhat.com>
1926 * c-ubsan.c (ubsan_instrument_shift): Handle split
1927 -fsanitize=shift-base and -fsanitize=shift-exponent.
1929 2016-11-07 Jason Merrill <jason@redhat.com>
1931 * c.opt (Wc++1z-compat): New.
1932 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
1934 2016-11-07 Martin Liska <mliska@suse.cz>
1936 * c-warn.c (warn_for_unused_label): Save all labels used
1937 in goto or in &label.
1939 2016-11-03 Jason Merrill <jason@redhat.com>
1941 * c-cppbuiltin.c (c_cpp_builtins): Correct
1942 __cpp_inheriting_constructors.
1944 2016-11-01 Jason Merrill <jason@redhat.com>
1946 * c-cppbuiltin.c (c_cpp_builtins): Update
1947 __cpp_inheriting_constructors.
1949 * c.opt (-fnew-inheriting-ctors): New.
1950 * c-opts.c: Default to on for ABI 11+.
1952 2016-10-31 Jakub Jelinek <jakub@redhat.com>
1955 * c.opt (fext-numeric-literals): Add Var and Init.
1956 * c-opts.c (c_common_handle_option): Don't clear
1957 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
1958 (c_common_post_options): Clear it here if not set
1961 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
1964 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
1967 2016-10-25 Jakub Jelinek <jakub@redhat.com>
1969 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
1970 * c-common.c (c_common_reswords): Add __builtin_launder.
1972 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
1974 * c-common.c (c_common_truthvalue_conversion): Warn for
1975 multiplications in boolean context. Fix the quoting of '<<' and '<'
1976 in the shift warning.
1978 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1980 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
1982 2016-10-20 Jason Merrill <jason@redhat.com>
1984 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
1986 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1988 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
1989 integer shift ops in boolean context.
1991 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
1993 * c.opt (Walloca): New.
1994 (Walloca-larger-than=): New.
1995 (Wvla-larger-than=): New.
1997 2016-10-17 Marek Polacek <polacek@redhat.com>
1999 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2000 Return immediately when finding a match.
2001 (warn_tautological_cmp): Remove a boolean variable that is no longer
2004 2016-10-17 Marek Polacek <polacek@redhat.com>
2006 * c-attribs.c: New file.
2007 * c-common.c: Move attributes handling to c-attribs.c.
2008 (get_nonnull_operand): No longer static.
2009 * c-common.h: Move the declarations from c-attribs.c to its own section.
2011 2016-10-14 Jason Merrill <jason@redhat.com>
2013 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2014 and __cpp_deduction_guides.
2016 2016-10-13 Jason Merrill <jason@redhat.com>
2018 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2020 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2022 * c-cppbuiltin.c: Include memmodel.h.
2023 * c-opts.c: Likewise.
2024 * c-pragma.c: Likewise.
2025 * c-warn.c: Likewise.
2027 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2029 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2030 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2031 * c-opts.c (sanitize_cpp_opts): Initialize
2032 cpp_opts->cpp_warn_implicit_fallthrough.
2034 2016-10-11 Marek Polacek <polacek@redhat.com>
2036 * c-common.c (warning_candidate_p): Change the return type to bool
2037 and return true/false instead of 1/0.
2038 (vector_mode_valid_p): Likewise.
2040 2016-10-11 Marek Polacek <polacek@redhat.com>
2042 * c-common.c (fold_for_warn): No longer static.
2043 (bool_promoted_to_int_p): Likewise.
2044 (c_common_get_narrower): Likewise.
2045 (constant_expression_warning): Move to c-warn.c.
2046 (constant_expression_error): Likewise.
2047 (overflow_warning): Likewise.
2048 (warn_logical_operator): Likewise.
2049 (find_array_ref_with_const_idx_r): Likewise.
2050 (warn_tautological_cmp): Likewise.
2051 (expr_has_boolean_operands_p): Likewise.
2052 (warn_logical_not_parentheses): Likewise.
2053 (warn_if_unused_value): Likewise.
2054 (strict_aliasing_warning): Likewise.
2055 (sizeof_pointer_memaccess_warning): Likewise.
2056 (check_main_parameter_types): Likewise.
2057 (conversion_warning): Likewise.
2058 (warnings_for_convert_and_check): Likewise.
2059 (match_case_to_enum_1): Likewise.
2060 (match_case_to_enum): Likewise.
2061 (c_do_switch_warnings): Likewise.
2062 (warn_for_omitted_condop): Likewise.
2063 (readonly_error): Likewise.
2064 (lvalue_error): Likewise.
2065 (invalid_indirection_error): Likewise.
2066 (warn_array_subscript_with_type_char): Likewise.
2067 (warn_about_parentheses): Likewise.
2068 (warn_for_unused_label): Likewise.
2069 (warn_for_div_by_zero): Likewise.
2070 (warn_for_memset): Likewise.
2071 (warn_for_sign_compare): Likewise.
2072 (do_warn_double_promotion): Likewise.
2073 (do_warn_unused_parameter): Likewise.
2074 (record_locally_defined_typedef): Likewise.
2075 (maybe_record_typedef_use): Likewise.
2076 (maybe_warn_unused_local_typedefs): Likewise.
2077 (maybe_warn_bool_compare): Likewise.
2078 (maybe_warn_shift_overflow): Likewise.
2079 (warn_duplicated_cond_add_or_warn): Likewise.
2080 (diagnose_mismatched_attributes): Likewise.
2081 * c-common.h: Move the declarations from c-warn.c to its own section.
2082 * c-warn.c: New file.
2084 2016-10-08 Jason Merrill <jason@redhat.com>
2086 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2087 into COND_EXPR in C++.
2089 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2091 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2092 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2093 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2095 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2097 Implement LWG2296 helper intrinsic
2098 * c-common.h (enum rid): Add RID_ADDRESSOF.
2099 * c-common.c (c_common_reswords): Add __builtin_addressof.
2101 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2104 * c-common.c (c_common_truthvalue_conversion): Warn also for
2105 suspicious enum values in boolean context.
2107 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2109 Implement P0258R2 - helper for C++17
2110 std::has_unique_object_representations trait
2111 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2112 * c-common.c (c_common_reswords): Add
2113 __has_unique_object_representations.
2115 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2118 * c-ubsan.c (ubsan_instrument_return): Don't call
2119 initialize_sanitizer_builtins here.
2121 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2123 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2124 conditional expression in boolean context when only one arm is
2127 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2130 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2133 * c-common.c (c_common_reswords): Update comment for C++11.
2135 2016-10-04 Jason Merrill <jason@redhat.com>
2137 * c-common.c (make_tree_vector_from_ctor): New.
2138 * c-common.h: Declare it.
2140 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2142 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2143 __LIBGCC_JCR_SECTION_NAME__.
2145 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2147 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2148 left shift in boolean context.
2150 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2152 Implement P0001R1 - C++17 removal of register storage class specifier
2153 * c.opt (Wregister): New warning.
2154 * c-opts.c (c_common_post_options): Enable -Wregister by
2157 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2159 * c-opts.c (c_common_post_options): Remove special case for
2160 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2163 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2165 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2168 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2170 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2172 * c-common.c: Include memmodel.h.
2174 2016-09-26 Marek Polacek <polacek@redhat.com>
2176 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2178 2016-09-26 Marek Polacek <polacek@redhat.com>
2181 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2182 (handle_fallthrough_attribute): New function.
2183 (attribute_fallthrough_p): New function.
2184 * c-common.h (attribute_fallthrough_p): Declare.
2186 2016-09-24 Marek Polacek <polacek@redhat.com>
2189 * c.opt (Wbool-operation): New.
2191 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2193 * c-common.c (c_common_truthvalue_conversion): Inhibit
2194 Wint-in-bool-context warning with from_macro_definition_at.
2195 Mention the expression will always evaluate to true.
2197 2016-09-21 Martin Sebor <msebor@redhat.com>
2200 * c.opt (fprintf-return-value): Temporarily initialize to zero
2201 to unblock bootstrap failures.
2203 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2206 * c.opt (Waligned-new=): Add RejectNegative.
2207 (faligned-new=): Likewise. Spelling fix - change
2208 aligned_new_threshhold to aligned_new_threshold.
2209 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2210 to aligned_new_threshold.
2212 2016-09-20 Martin Sebor <msebor@redhat.com>
2215 * c.opt: Add -Wformat-length and -fprintf-return-value.
2217 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2220 * c.opt (Wint-in-bool-context): New warning.
2221 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2222 constants in boolean context.
2224 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2226 * c-common.c (max_align_t_align): Also consider alignment of
2229 2016-09-15 Jason Merrill <jason@redhat.com>
2231 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2234 2016-09-14 Jason Merrill <jason@redhat.com>
2236 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2237 limit FIELD_DECL, either.
2239 2016-09-14 Marek Polacek <polacek@redhat.com>
2241 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2242 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2243 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2245 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2247 * c-common.c (warn_logical_not_parentheses): Replace
2248 rich_location::add_fixit_insert calls with add_fixit_insert_before
2249 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2251 2016-09-13 Jason Merrill <jason@redhat.com>
2252 Tom de Vries <tom@codesourcery.com>
2255 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2257 2016-09-13 Jason Merrill <jason@redhat.com>
2259 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2262 2016-09-12 Jason Merrill <jason@redhat.com>
2264 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2265 bit/byte confusion, allow large alignment for types.
2267 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2270 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2272 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2275 * c-format.c (argument_parser::check_argument_type): Add params
2276 "type_start" and "conversion_char". Use the former to generate
2277 offset_to_type_start and pass it and conversion_char to
2279 (check_format_info_main): Capture the start of the type
2280 information as "type_start", and pass it an format_char
2281 to arg_parser.check_argument_type.
2282 (check_format_types): Provide an example in the leading comment.
2283 Add params "offset_to_type_start" and "conversion_char"; pass
2284 them to format_type_warning calls.
2285 (test_get_modifier_for_format_len): Likewise.
2286 (matching_type_p): New function.
2287 (get_format_for_type): Add param "conversion_char" and move
2288 implementation into...
2289 (get_format_for_type_1): ...new function, called twice.
2290 Use new function matching_type_p rather than checking for
2291 TYPE_CANONICAL equality.
2292 (get_corrected_substring): New function.
2293 (format_type_warning): Provide an example in the leading comment.
2294 Add params "offset_to_type_start" and "conversion_char". Replace
2295 call to get_format_for_type with call to get_corrected_substring
2296 and move rejection of hints for widths/precisions there.
2297 (assert_format_for_type_streq): Add param "conversion_char".
2298 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2299 (test_get_format_for_type_printf): Add conversion chars to the
2300 tests, adding coverage for various combinations of integer
2301 vs double conversions, and for preserving octal and hexadecimal
2303 (test_get_format_for_type_scanf): Add conversion chars to the
2306 2016-09-10 Tom de Vries <tom@codesourcery.com>
2309 * c-common.c (build_va_arg): Handle more strict
2310 targetm.canonical_va_list_type. Replace first argument type error with
2313 2016-09-09 Martin Sebor <msebor@redhat.com>
2317 * c-format.c (argument_parser::find_format_char_info): Use %qc
2318 format directive unconditionally.
2320 2016-09-09 Jason Merrill <jason@redhat.com>
2322 Implement C++17 new of over-aligned types.
2323 * c.opt: Add -faligned-new and -Waligned-new.
2324 * c-common.c (max_align_t_align): Split out from...
2325 (cxx_fundamental_alignment_p): ...here.
2326 * c-common.h: Declare it.
2327 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2329 2016-09-09 Joseph Myers <joseph@codesourcery.com>
2331 * c-cppbuiltin.c (builtin_define_type_width): New function.
2332 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2335 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2337 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2339 (substring_loc::get_location): Move to substring-locations.c,
2340 keeping implementation as...
2341 (c_get_substring_location): New function, from the above, reworked
2342 to use accessors rather than member lookup.
2343 * c-common.h (class substring_loc): Move to substring-locations.h,
2344 replacing with a forward decl.
2345 (c_get_substring_location): New decl.
2346 * c-format.c: Include "substring-locations.h".
2347 (format_warning_va): Move to substring-locations.c.
2348 (format_warning_at_substring): Likewise.
2350 2016-09-06 Martin Sebor <msebor@redhat.com>
2353 * c-format.c (check_function_format): Avoid issuing warnings for
2354 functions unless they call format functions with non-constant
2357 2016-09-06 Richard Biener <rguenther@suse.de>
2360 * c-common.c (c_common_mark_addressable_vec): Handle
2361 COMPOUND_LITERAL_EXPR.
2363 2016-09-05 Marek Polacek <polacek@redhat.com>
2366 * c-common.c (bool_promoted_to_int_p): New function.
2367 (expr_has_boolean_operands_p): New function.
2368 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2369 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2371 2016-09-04 Tom de Vries <tom@codesourcery.com>
2374 2016-08-29 Tom de Vries <tom@codesourcery.com>
2376 * c-common.c (build_va_arg): Replace first argument type error
2379 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2382 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2383 (c_finish_omp_for): Reject _Atomic qualified iterators.
2385 2016-09-01 Martin Sebor <msebor@redhat.com>
2387 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2388 size to guarantee it fits the output of the formatted function
2389 regardless of its arguments.
2391 2016-09-01 Marek Polacek <polacek@redhat.com>
2394 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2397 2016-08-29 Marek Polacek <polacek@redhat.com>
2400 * c-common.c (warn_logical_not_parentheses): Don't warn for
2401 a comparison or a logical operator.
2403 2016-08-29 Tom de Vries <tom@codesourcery.com>
2405 * c-common.c (build_va_arg): Fix type comparison assert.
2407 2016-08-29 Tom de Vries <tom@codesourcery.com>
2409 * c-common.c (build_va_arg): Replace first argument type error
2412 2016-08-29 Tom de Vries <tom@codesourcery.com>
2415 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2416 with error_mark_node as va_list instead of with illegal va_list.
2418 2016-08-25 Marek Polacek <polacek@redhat.com>
2419 David Malcolm <dmalcolm@redhat.com>
2421 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2422 * c-common.h (warn_logical_not_parentheses): Update declaration.
2424 2016-08-22 Marek Polacek <polacek@redhat.com>
2427 * c-common.c (warn_for_memset): Check type for null.
2429 2016-08-22 Joseph Myers <joseph@codesourcery.com>
2431 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2432 _FloatNx types for suffixes for built-in functions.
2434 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2437 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2438 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2439 (RID_FLOAT128X): New enum rid values.
2440 (CASE_RID_FLOATN_NX): New macro.
2441 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2443 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2444 corresponding complex types.
2445 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2446 _FloatNx and corresponding complex types.
2447 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2448 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2449 and _FloatNx types for the widest type for determining
2450 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2451 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2452 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2454 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2456 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2459 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2461 * c-opts.c (c_diagnostic_finalizer): Update for change to
2462 diagnostic_show_locus.
2464 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2466 * c-common.c: Include "spellcheck.h".
2467 (cb_get_suggestion): New function.
2468 * c-common.h (cb_get_suggestion): New decl.
2469 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2472 2016-08-18 Marek Polacek <polacek@redhat.com>
2475 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2478 2016-08-16 David Malcolm <dmalcolm@redhat.com>
2481 * c-common.c (substring_loc::get_range): Rename to...
2482 (substring_loc::get_location): ...this, converting param from a
2483 source_range * to a location_t *. Call
2484 get_source_location_for_substring rather than
2485 get_source_range_for_substring, and pass in m_caret_idx.
2486 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2487 (substring_loc::get_range): Replace with...
2488 (substring_loc::get_location): ...this.
2489 (substring_loc::set_caret_index): New method.
2490 (substring_loc): Add field m_caret_idx.
2491 * c-format.c (format_warning_va): Update for above changes.
2492 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2493 clashing with type name.
2494 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2495 (check_argument_type): Likewise.
2496 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2497 Use a copy when emitting warnings, setting the caret index from TYPE.
2499 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
2500 Arnaud Charlet <charlet@adacore.com>
2502 * c-ada-spec.c (dump_number): New function.
2503 (handle_escape_character): Likewise.
2504 (print_ada_macros): Add handling of constant integers and strings.
2506 2016-08-12 Marek Polacek <polacek@redhat.com>
2509 * c-common.c (scalar_to_vector): Adjust fall through comment.
2510 * c-opts.c (c_common_handle_option): Likewise.
2511 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2512 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2513 fall through comment.
2514 * cilk.c (extract_free_variables): Add FALLTHRU.
2516 2016-08-10 Jason Merrill <jason@redhat.com>
2518 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2520 2016-08-09 Jason Merrill <jason@redhat.com>
2522 * c-common.c (c_common_attribute_table): vector_size affects type
2525 2016-08-09 Marek Polacek <polacek@redhat.com>
2528 * c-ada-spec.c (dump_generic_ada_node): Add return.
2530 2016-08-09 Jason Merrill <jason@redhat.com>
2532 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2533 C++17 constexpr lambdas.
2535 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2538 * c-common.h (selftest::c_format_c_tests): New declaration.
2539 (selftest::run_c_tests): New declaration.
2540 * c-format.c: Include "selftest.h.
2541 (format_warning_va): Add param "corrected_substring" and use
2542 it to add a replacement fix-it hint.
2543 (format_warning_at_substring): Likewise.
2544 (format_warning_at_char): Update for new param of
2546 (argument_parser::check_argument_type): Pass "fki" to
2548 (check_format_types): Add param "fki" and pass it to
2549 format_type_warning.
2550 (deref_n_times): New function.
2551 (get_modifier_for_format_len): New function.
2552 (selftest::test_get_modifier_for_format_len): New function.
2553 (get_format_for_type): New function.
2554 (format_type_warning): Add param "fki" and use it to attempt
2555 to provide hints for argument types when calling
2556 format_warning_at_substring.
2557 (selftest::get_info): New function.
2558 (selftest::assert_format_for_type_streq): New function.
2559 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2560 (selftest::test_get_format_for_type_printf): New function.
2561 (selftest::test_get_format_for_type_scanf): New function.
2562 (selftest::c_format_c_tests): New function.
2564 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2567 * c-format.c: Include "diagnostic.h".
2568 (location_column_from_byte_offset): Delete.
2569 (location_from_offset): Delete.
2570 (format_warning_va): New function.
2571 (format_warning_at_substring): New function.
2572 (format_warning_at_char): New function.
2573 (check_format_arg): Capture location of format_tree and pass to
2574 check_format_info_main.
2575 (argument_parser): Add fields "start_of_this_format" and
2576 "format_string_cst".
2577 (flag_chars_t::validate): Add param "format_string_cst". Convert
2578 warning_at call using location_from_offset to call to
2579 format_warning_at_char.
2580 (argument_parser::argument_parser): Add param "format_string_cst_"
2581 and use use it to initialize field "format_string_cst".
2582 Initialize new field "start_of_this_format".
2583 (argument_parser::read_format_flags): Convert warning_at call
2584 using location_from_offset to a call to format_warning_at_char.
2585 (argument_parser::read_any_format_left_precision): Likewise.
2586 (argument_parser::read_any_format_precision): Likewise.
2587 (argument_parser::read_any_other_modifier): Likewise.
2588 (argument_parser::find_format_char_info): Likewise, in three places.
2589 (argument_parser::parse_any_scan_set): Likewise, in one place.
2590 (argument_parser::handle_conversions): Likewise, in two places.
2591 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2592 and use it to make a substring_loc. Pass the latter to
2594 (check_format_info_main): Add params "fmt_param_loc" and
2595 "format_string_cst". Convert warning_at calls using
2596 location_from_offset to calls to format_warning_at_char. Pass the
2597 new params to the arg_parser ctor. Pass "format_string_cst" to
2598 flag_chars.validate. Pass "fmt_param_loc" to
2599 arg_parser.check_argument_type.
2600 (check_format_types): Convert first param from a location_t
2601 to a const substring_loc & and rename to "fmt_loc". Attempt
2602 to extract the range of the relevant parameter and pass it
2603 to format_type_warning.
2604 (format_type_warning): Convert first param from a location_t
2605 to a const substring_loc & and rename to "fmt_loc". Add
2606 params "param_range" and "type". Replace calls to warning_at
2607 with calls to format_warning_at_substring.
2609 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2611 * c-format.c (class flag_chars_t): New class.
2612 (struct length_modifier): New struct.
2613 (class argument_parser): New class.
2614 (flag_chars_t::flag_chars_t): New ctor.
2615 (flag_chars_t::has_char_p): New method.
2616 (flag_chars_t::add_char): New method.
2617 (flag_chars_t::validate): New method.
2618 (flag_chars_t::get_alloc_flag): New method.
2619 (flag_chars_t::assignment_suppression_p): New method.
2620 (argument_parser::argument_parser): New ctor.
2621 (argument_parser::read_any_dollar): New method.
2622 (argument_parser::read_format_flags): New method.
2623 (argument_parser::read_any_format_width): New method.
2624 (argument_parser::read_any_format_left_precision): New method.
2625 (argument_parser::read_any_format_precision): New method.
2626 (argument_parser::handle_alloc_chars): New method.
2627 (argument_parser::read_any_length_modifier): New method.
2628 (argument_parser::read_any_other_modifier): New method.
2629 (argument_parser::find_format_char_info): New method.
2630 (argument_parser::validate_flag_pairs): New method.
2631 (argument_parser::give_y2k_warnings): New method.
2632 (argument_parser::parse_any_scan_set): New method.
2633 (argument_parser::handle_conversions): New method.
2634 (argument_parser::check_argument_type): New method.
2635 (check_format_info_main): Introduce classes argument_parser
2636 and flag_chars_t, moving the code within the loop into methods
2637 of these classes. Make various locals "const".
2639 2016-08-05 David Malcolm <dmalcolm@redhat.com>
2641 * c-common.c: Include "substring-locations.h".
2642 (get_cpp_ttype_from_string_type): New function.
2643 (g_string_concat_db): New global.
2644 (substring_loc::get_range): New method.
2645 * c-common.h (g_string_concat_db): New declaration.
2646 (class substring_loc): New class.
2647 * c-lex.c (lex_string): When concatenating strings, capture the
2648 locations of all tokens using a new obstack, and record the
2649 concatenation locations within g_string_concat_db.
2650 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2653 2016-07-29 Marek Polacek <polacek@redhat.com>
2656 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2657 parentheses warning.
2660 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2662 2016-07-28 Martin Liska <mliska@suse.cz>
2664 PR gcov-profile/68025
2665 * c-common.c (handle_no_profile_instrument_function_attribute):
2667 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2669 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2672 2016-07-25 Jason Merrill <jason@redhat.com>
2675 * c.opt (fconstexpr-loop-limit): New.
2677 2016-07-22 Martin Sebor <msebor@redhat.com>
2680 * c-common.c (resolve_overloaded_builtin): Avoid converting
2681 __atomic_compare_exchange_n return type to that of what its
2682 first argument points to.
2684 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2686 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2687 ~(unsigned HOST_WIDE_INT) 0.
2689 2016-07-22 Martin Liska <mliska@suse.cz>
2691 PR gcov-profile/69028
2692 PR gcov-profile/62047
2693 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2694 to the current_function_decl.
2696 2016-07-21 Jason Merrill <jason@redhat.com>
2699 * c-common.c (c_common_truthvalue_conversion): Check
2700 c_inhibit_evaluation_warnings for warning about address of
2703 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2705 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2708 2016-07-15 Jason Merrill <jason@redhat.com>
2710 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2712 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2715 * c-common.h (enum lookup_name_fuzzy_kind): Add
2716 FUZZY_LOOKUP_FUNCTION_NAME.
2718 2016-07-08 Jason Merrill <jason@redhat.com>
2720 P0145: Refining Expression Order for C++.
2721 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2724 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2727 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2729 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2731 * c-pragma.h (enum pragma_kind): Rename
2732 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2735 2016-06-29 Richard Biener <rguenther@suse.de>
2738 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2740 2016-06-24 Jason Merrill <jason@redhat.com>
2742 P0145R2: Refining Expression Order for C++.
2743 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2746 2016-06-24 Jakub Jelinek <jakub@redhat.com>
2748 * c-common.c (check_builtin_function_arguments): Require last
2749 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2750 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2751 if the last argument is pointer to enumerated or boolean type.
2753 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2756 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2757 (lookup_name_fuzzy): New prototype.
2759 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
2761 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2763 2016-06-14 Jason Merrill <jason@redhat.com>
2765 P0145R2: Refining Expression Order for C++.
2766 * c.opt (fargs-in-order): New.
2767 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2769 2016-06-13 Jakub Jelinek <jakub@redhat.com>
2772 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2773 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2775 PR preprocessor/71183
2776 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2777 to cb_get_source_date_epoch.
2779 2016-06-10 Jakub Jelinek <jakub@redhat.com>
2782 * c.opt (Wpsabi): Add Warning flag.
2784 2016-06-10 Martin Sebor <msebor@redhat.com>
2787 * c-common.c (handle_nonnull_attribute): Accept
2788 the nonnull attribute in type-generic builtins.
2790 2016-06-09 Martin Sebor <msebor@redhat.com>
2793 * c-common.c (builtin_function_validate_nargs): Make text of error
2794 message consistent with others like it.
2796 2016-06-08 Martin Sebor <msebor@redhat.com>
2797 Jakub Jelinek <jakub@redhat.com>
2801 * c-common.c (check_builtin_function_arguments): Handle
2802 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2804 2016-06-08 Richard Biener <rguenther@suse.de>
2806 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2808 2016-06-07 Richard Biener <rguenther@suse.de>
2811 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2812 options and warn about others.
2814 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
2816 * c-common.c (get_source_date_epoch): Rename to
2817 cb_get_source_date_epoch.
2818 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
2819 message when the parsing fails. Use error_at instead of fatal_error.
2820 * c-common.h (get_source_date_epoch): Rename to
2821 cb_get_source_date_epoch.
2822 * c-common.h (cb_get_source_date_epoch): Prototype.
2823 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
2824 * c-common.h (c_omp_region_type): Remove trailing comma.
2825 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
2826 * c-lex.c (c_lex_with_flags): Remove initialization of
2827 pfile->source_date_epoch.
2829 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2832 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
2833 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
2834 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
2835 instead of C_OMP_CLAUSE_SPLIT_FOR.
2837 2016-05-24 Richard Biener <rguenther@suse.de>
2841 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
2842 (convert_vector_to_array_for_subscript): ... this.
2843 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
2844 VIEW_CONVERT_EXPR to an array type. Rename to ...
2845 (convert_vector_to_array_for_subscript): ... this.
2847 2016-05-12 Marek Polacek <polacek@redhat.com>
2850 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
2851 size_in_bytes and pass LOC to it.
2853 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2856 * c.opt (Wduplicate-decl-specifier): New option.
2858 2016-05-11 Marek Polacek <polacek@redhat.com>
2861 * c-common.c (diagnose_mismatched_attributes): New function.
2862 * c-common.h (diagnose_mismatched_attributes): Declare.
2864 2016-05-04 Marek Polacek <polacek@redhat.com>
2866 * c.opt (Wdangling-else): New option.
2868 2016-05-03 Marek Polacek <polacek@redhat.com>
2871 * c-common.c (builtin_function_validate_nargs): Add location
2873 (check_builtin_function_arguments): Add location and arguments
2874 parameters. Use them.
2875 * c-common.h (check_builtin_function_arguments): Update declaration.
2877 2016-05-03 Richard Biener <rguenther@suse.de>
2879 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
2880 allow call args to gimplify to SSA names.
2882 2016-05-03 Marek Polacek <polacek@redhat.com>
2884 * c-common.h (enum c_omp_region_type): Remove stray comma.
2886 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2888 * c-common.h (enum c_omp_region_type): Define.
2890 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
2892 * c-common.c (shorten_compare): Use wi::to_wide.
2894 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2897 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
2898 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
2899 reduction clauses in acc parallel loops.
2901 2016-04-29 Marek Polacek <polacek@redhat.com>
2904 * c-common.c (warn_for_memset): Check domain before accessing it.
2906 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
2909 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
2910 "aligned" attribute.
2912 2016-04-28 Jason Merrill <jason@redhat.com>
2914 * c-lex.c (c_common_has_attribute): Handle nodiscard.
2916 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
2917 Matthias Klose <doko@debian.org>
2919 * c-common.c (get_source_date_epoch): New function, gets the environment
2920 variable SOURCE_DATE_EPOCH and parses it as long long with error
2922 * c-common.h (get_source_date_epoch): Prototype.
2923 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
2925 2015-04-27 Ryan Burn <contact@rnburn.com>
2929 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
2930 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
2932 (cilk_detect_and_unwrap): Corresponding changes.
2933 (extract_free_variables): Don't extract free variables from
2934 AGGR_INIT_EXPR slot.
2935 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
2936 (cilk_recognize_spawn): Likewise.
2938 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2940 * c.opt (Wmemset-elt-size): New option.
2941 * c-common.c (warn_for_memset): New function.
2942 * c-common.h (warn_for_memset): Declare.
2944 2016-04-25 Jason Merrill <jason@redhat.com>
2946 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
2948 * c-common.h: Declare it.
2949 * c-lex.c (c_common_has_attribute): Add maybe_unused.
2951 2016-04-22 Jason Merrill <jason@redhat.com>
2953 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
2955 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2958 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
2959 * c-common.h (c_finish_cilk_clauses): Remove declaration.
2961 2016-04-18 Michael Matz <matz@suse.de>
2963 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
2966 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
2968 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
2969 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
2970 to incomplete types.
2971 (dump_nested_type): Remove redundant tests and tidy up.
2972 (print_ada_declaration): Also set TREE_VISITED on the declaration of
2973 a type which is the typedef of an original type.
2975 2016-04-15 Marek Polacek <polacek@redhat.com>
2978 * c-common.c (build_va_arg): Change two asserts into errors and return
2981 2016-04-13 Marek Polacek <polacek@redhat.com>
2984 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
2985 for switch statements, too.
2987 2016-03-28 Jason Merrill <jason@redhat.com>
2989 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
2991 2016-03-23 Marek Polacek <polacek@redhat.com>
2994 * c.opt (Wignored-attributes): New option.
2996 2016-03-22 David Malcolm <dmalcolm@redhat.com>
2999 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3000 diagnostic text, reversing the order of the warning and note so
3001 that they appear in source order.
3003 2016-03-17 Marek Polacek <polacek@redhat.com>
3006 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3009 2016-03-14 Jason Merrill <jason@redhat.com>
3011 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3013 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3015 2016-03-09 Richard Biener <rguenther@suse.de>
3018 * c-common.c (strict_aliasing_warning): Add back
3019 alias_sets_conflict_p check.
3021 2016-03-08 Jason Merrill <jason@redhat.com>
3023 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3025 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3028 * c-indentation.c (get_visual_column): Move code to determine next
3030 (next_tab_stop): ...this new function.
3031 (line_contains_hash_if): Delete function.
3032 (detect_preprocessor_logic): Delete function.
3033 (get_first_nws_vis_column): New function.
3034 (detect_intervening_unindent): New function.
3035 (should_warn_for_misleading_indentation): Replace call to
3036 detect_preprocessor_logic with a call to
3037 detect_intervening_unindent.
3039 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3042 * c-indentation.c (should_warn_for_misleading_indentation): When
3043 suppressing warnings about cases where the guard and body are on
3044 the same column, only use the first non-whitespace column in place
3045 of the guard token column when dealing with "else" clauses.
3046 When rejecting aligned BODY and NEXT, loosen the requirement
3047 from equality with the first non-whitespace of guard to simply
3048 that they not be indented relative to it.
3050 2016-03-04 Richard Biener <rguenther@suse.de>
3053 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3054 instead of alias_sets_conflict_p.
3056 2016-03-01 Marek Polacek <polacek@redhat.com>
3059 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3062 2016-02-22 Martin Sebor <msebor@redhat.com>
3065 * c-common.c (check_builtin_function_arguments): Validate and
3066 reject invalid arguments to __builtin_alloca_with_align.
3068 2016-02-20 Mark Wielaard <mjw@redhat.com>
3071 * c.opt (Wunused-const-variable): Turn into Alias for...
3072 (Wunused-const-variable=): New option.
3074 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3077 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3079 (c_common_init_options): ...to here.
3080 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3082 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3085 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3086 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3087 flag_preprocess_only.
3089 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3092 * c.opt (Wnonnull-compare): Enable for -Wall.
3094 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3097 * c-common.c (sync_resolve_size): Diagnose too few arguments
3098 even when params is non-NULL empty vector.
3100 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3103 * c.opt (fshort-double): Remove.
3105 2016-02-05 Martin Sebor <msebor@redhat.com>
3108 * c.opt (Warning options): Update -Wplacement-new to take
3109 an optional argument.
3111 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3113 PR preprocessor/69543
3115 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3116 instead of loc to control_warning_option.
3118 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3120 * c.opt (fopenacc-dim=): New option.
3122 2016-01-27 Ryan Burn <contact@rnburn.com>
3125 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3126 gimplify_arg. Removed superfluous post_p argument.
3127 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3128 superfluous post_p argument.
3129 * c-gimplify.c (c_gimplify_expr): Likewise.
3131 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3134 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3135 pp_newline_and_flush with pp_flush.
3137 2016-01-20 Martin Sebor <msebor@redhat.com>
3140 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3141 an incompatible argument when the argument isn't a valid tree node.
3143 2016-01-18 Jason Merrill <jason@redhat.com>
3146 * c-common.c (check_function_arguments_recurse): Fold the whole
3147 COND_EXPR, not just the condition.
3149 2016-01-18 Tom de Vries <tom@codesourcery.com>
3151 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3152 classify as loop clause.
3154 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3157 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3158 C++ FE no longer has limit on number of pragmas.
3160 2015-01-14 Ryan Burn <contact@rnburn.com>
3163 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3164 to add missing cleanup point.
3166 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3169 * c-indentation.c (get_visual_column): Add location_t param.
3170 Handle the column number being zero by effectively disabling the
3171 warning, with an "inform".
3172 (should_warn_for_misleading_indentation): Add location_t argument
3173 for all uses of get_visual_column.
3175 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3178 * c-indentation.c (should_warn_for_misleading_indentation):
3179 Don't warn about do-while statements.
3181 2016-01-07 Martin Sebor <msebor@redhat.com>
3184 * c-common.c (sync_resolve_size): Reject first argument when it's
3187 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3190 * c-indentation.c (get_visual_column): Remove default argument.
3191 (should_warn_for_misleading_indentation): For the multiline case,
3192 update call to get_visual_column for next_stmt_exploc so that it
3193 captures the location of the first non-whitespace character in the
3194 relevant line. Don't issue warnings if there is non-whitespace
3195 before the next statement.
3197 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3199 Update copyright years.
3201 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3203 * c-common.c (binary_op_error): Convert first param from
3204 location_t to rich_location * and use it when emitting an error.
3205 * c-common.h (binary_op_error): Convert first param from
3206 location_t to rich_location *.
3208 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3210 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3211 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3213 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3215 * c-common.c (c_common_attribute_table): Handle "omp declare target
3218 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3221 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3223 2014-12-12 Tobias Burnus <burnus@net-b.de>
3226 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3227 specifiers (%d, %i,%u and %c).
3229 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3231 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3233 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3237 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3238 * c-pragma.c (handle_pragma_diagnostic): Adjust
3239 control_warning_option caller.
3241 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3243 * c-common.c (c_cpp_error): Update for change to
3244 rich_location::set_range.
3246 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3248 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3249 shifting 1 out of the sign bit.
3251 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3253 * c-common.c (c_common_attribute_table[]): Update max arguments
3254 count for "simd" attribute.
3255 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3257 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3259 PR preprocessor/57580
3260 * c-ppoutput.c (print): Change printed field to bool.
3261 Move src_file last for smaller padding.
3262 (init_pp_output): Set print.printed to false instead of 0.
3263 (scan_translation_unit): Fix up formatting. Set print.printed
3264 to true after printing something other than newline.
3265 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3266 (maybe_print_line_1): Set print.printed to false instead of 0.
3267 (print_line_1): Likewise.
3268 (do_line_change): Set print.printed to true instead of 1.
3269 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3270 dump_macro): Set print.printed to false after printing newline.
3272 2015-12-02 Jason Merrill <jason@redhat.com>
3274 * c-common.c (fold_for_warn): New.
3275 (warn_logical_operator, warn_tautological_cmp)
3276 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3278 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3279 (c_fully_fold_internal, decl_constant_value_for_optimization):
3281 * c-common.h: Don't declare decl_constant_value_for_optimization.
3283 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3286 * c-common.h (c_build_qualified_type): Add extra default
3289 2015-12-01 Julian Brown <julian@codesourcery.com>
3290 Cesar Philippidis <cesar@codesourcery.com>
3291 James Norris <James_Norris@mentor.com>
3293 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3294 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3295 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3297 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3299 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3300 (decl_sloc_common): Delete and move bulk of processing to...
3301 (decl_sloc): ...here.
3302 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3303 (dump_ada_double_name): Remove S parameter and compute the suffix.
3304 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3305 element type and deal with an anonymous one.
3306 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3307 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3308 and remove reference to QUAL_UNION_TYPE.
3309 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3310 (dump_nested_type): ...here. New function extracted from above.
3311 Generate a full declaration for anonymous element type of arrays.
3312 (print_ada_declaration): Really skip anonymous declarations. Remove
3313 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3314 Clean up processing of declarations of array types and objects.
3315 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3316 Remove obsolete code and tidy up.
3318 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3321 * c-common.c (handle_transparent_union_attribute): Update
3324 2015-11-27 Martin Liska <mliska@suse.cz>
3327 * array-notation-common.c (cilkplus_extract_an_triplets):
3328 Release vector of vectors.
3329 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3331 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3334 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3335 (print_ada_struct_decl): Likewise.
3337 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3340 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3341 * cilk.c (recognize_spawn): Determine location in a more precise
3344 2015-11-19 Jason Merrill <jason@redhat.com>
3346 * c-common.c (shorten_compare): But look through macros from
3349 2015-11-18 Jason Merrill <jason@redhat.com>
3351 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3352 non-constant operand comes from a macro.
3354 2015-11-17 Jason Merrill <jason@redhat.com>
3357 * c-common.c (warn_tautological_cmp): Fold before checking for
3360 2015-11-16 Marek Polacek <polacek@redhat.com>
3363 * c-common.c (check_case_bounds): Fold low and high cases.
3365 2015-11-16 Marek Polacek <polacek@redhat.com>
3367 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3368 * c-common.c (c_common_get_alias_set): Likewise.
3369 (handle_visibility_attribute): Likewise.
3371 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3373 * c-common.c (handle_simd_attribute): New.
3374 (struct attribute_spec): Add entry for "simd".
3375 (handle_simd_attribute): New.
3377 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
3379 * c-lex.c (interpret_float): Use fold_convert.
3381 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3383 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3384 and store it on the result.
3385 * c-opts.c (c_common_init_options): Set
3386 global_dc->colorize_source_p.
3388 2015-11-12 James Norris <jnorris@codesourcery.com>
3389 Joseph Myers <joseph@codesourcery.com>
3391 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3392 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3393 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3394 PRAGMA_OACC_CLAUSE_LINK.
3396 2015-11-11 Marek Polacek <polacek@redhat.com>
3400 * c-common.c (valid_array_size_p): New function.
3401 * c-common.h (valid_array_size_p): Declare.
3403 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
3406 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3408 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3410 * array-notation-common.c: Remove unused header files.
3411 * c-ada-spec.c: Likewise.
3412 * c-cilkplus.c: Likewise.
3413 * c-common.c: Likewise.
3414 * c-cppbuiltin.c: Likewise.
3415 * c-dump.c: Likewise.
3416 * c-format.c: Likewise.
3417 * c-gimplify.c: Likewise.
3418 * c-indentation.c: Likewise.
3419 * c-lex.c: Likewise.
3420 * c-omp.c: Likewise.
3421 * c-opts.c: Likewise.
3422 * c-pch.c: Likewise.
3423 * c-ppoutput.c: Likewise.
3424 * c-pragma.c: Likewise.
3425 * c-pretty-print.c: Likewise.
3426 * c-semantics.c: Likewise.
3427 * c-ubsan.c: Likewise.
3429 * stub-objc.c: Likewise.
3431 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3432 Cesar Philippidis <cesar@codesourcery.com>
3433 James Norris <jnorris@codesourcery.com>
3434 Julian Brown <julian@codesourcery.com>
3435 Nathan Sidwell <nathan@codesourcery.com>
3437 * c-pragma.c (oacc_pragmas): Add "routine".
3438 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3440 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3442 * c-common.c (c_common_attributes): Add scalar_storage_order.
3443 (handle_scalar_storage_order_attribute): New function.
3444 * c-pragma.c (global_sso): New variable.
3445 (maybe_apply_pragma_scalar_storage_order): New function.
3446 (handle_pragma_scalar_storage_order): Likewise.
3447 (init_pragma): Register scalar_storage_order.
3448 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3449 * c.opt (Wscalar-storage-order): New warning.
3450 (fsso-struct=): New option.
3452 2015-11-08 Martin Sebor <msebor@redhat.com>
3454 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3456 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3458 * c-common.c: Don't undef DEF_BUILTIN.
3460 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3462 * c-common.c (c_cpp_error): Convert parameter from location_t to
3463 rich_location *. Eliminate the "column_override" parameter and
3464 the call to diagnostic_override_column.
3465 Update the "done_lexing" clause to set range 0
3466 on the rich_location, rather than overwriting a location_t.
3467 * c-common.h (c_cpp_error): Convert parameter from location_t to
3468 rich_location *. Eliminate the "column_override" parameter.
3470 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3471 Thomas Schwinge <thomas@codesourcery.com>
3472 James Norris <jnorris@codesourcery.com>
3474 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3475 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3476 clauses with parallel and kernels and loops.
3477 * c-pragma.h (enum pragma_omp_clause): Add entries for
3478 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3479 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3480 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3482 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3484 2015-11-05 Martin Sebor <msebor@redhat.com>
3487 * c.opt (-Wplacement-new): New option.
3489 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3491 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3492 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3493 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3494 save_expr or create_tmp_var* if TEST is true.
3495 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3496 Don't call add_stmt here.
3497 (struct c_omp_check_loop_iv_data): New type.
3498 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3499 c_omp_check_loop_iv_exprs): New functions.
3500 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3502 (c_omp_declare_simd_clauses_to_numbers): Change
3503 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3504 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3505 from numbers to PARM_DECLs.
3507 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3509 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3512 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
3515 * c-common.h (fold_offsetof_1): Add argument.
3516 * c-common.c (fold_offsetof_1): Diagnose more invalid
3517 offsetof expressions that reference elements past the end of
3520 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3521 Chung-Lin Tang <cltang@codesourcery.com>
3523 * c-pragma.c (oacc_pragmas): Add "atomic".
3524 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3526 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3528 * c-common.c (handle_target_clones_attribute): New.
3529 (c_common_attribute_table): Add handle_target_clones_attribute.
3530 (handle_always_inline_attribute): Add check on target_clones attribute.
3531 (handle_target_attribute): Ditto.
3533 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3535 * array-notation-common.c: Reorder #include's and remove duplicates.
3536 * c-ada-spec.c: Likewise.
3537 * c-cilkplus.c: Likewise.
3538 * c-common.c: Likewise.
3539 * c-cppbuiltin.c: Likewise.
3540 * c-dump.c: Likewise.
3541 * c-format.c: Likewise.
3542 * c-gimplify.c: Likewise.
3543 * c-indentation.c: Likewise.
3544 * c-lex.c: Likewise.
3545 * c-omp.c: Likewise.
3546 * c-opts.c: Likewise.
3547 * c-pch.c: Likewise.
3548 * c-ppoutput.c: Likewise.
3549 * c-pragma.c: Likewise.
3550 * c-pretty-print.c: Likewise.
3551 * c-semantics.c: Likewise.
3552 * c-ubsan.c: Likewise.
3554 * stub-objc.c: Likewise.
3556 2015-10-28 Jason Merrill <jason@redhat.com>
3558 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3560 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3561 James Norris <jnorris@codesourcery.com>
3562 Cesar Philippidis <cesar@codesourcery.com>
3566 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3567 * c-omp.c (c_oacc_split_loop_clauses): New function.
3569 2015-10-21 Martin Sebor <msebor@redhat.com>
3572 * c.opt: End each sentence that describes an option with a period.
3574 2015-10-20 Marek Polacek <polacek@redhat.com>
3576 * array-notation-common.c (is_cilkplus_vector_p): Define.
3577 * c-common.h (is_cilkplus_vector_p): Declare.
3579 2015-10-20 Marek Polacek <polacek@redhat.com>
3581 * c.opt (std=gnu++11): Do not describe as experimental.
3582 (std=gnu++14): Likewise.
3584 2015-10-19 Jason Merrill <jason@redhat.com>
3586 * c-cppbuiltin.c (c_cpp_builtins): Define
3587 __cpp_nontype_template_args.
3589 2015-10-19 Jason Merrill <jason@redhat.com>
3591 * c-cppbuiltin.c (c_cpp_builtins): Define
3592 __cpp_enumerator_attributes, __cpp_fold_expressions,
3593 __cpp_unicode_characters.
3595 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3596 Aldy Hernandez <aldyh@redhat.com>
3598 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3599 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3600 (c_define_builtins): Likewise.
3601 * c-common.h (enum c_omp_clause_split): Add
3602 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3603 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3604 (c_finish_omp_for): Add ORIG_DECLV argument.
3605 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3606 201511 instead of 201307.
3607 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3608 OMP_CRITICAL_CLAUSES to it.
3609 (c_finish_omp_ordered): Add CLAUSES argument, set
3610 OMP_ORDERED_CLAUSES to it.
3611 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3612 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3613 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3614 constructs and new OpenMP 4.5 clauses. Clear
3615 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3617 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3618 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3619 (enum pragma_omp_clause): Add
3620 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3621 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3623 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3625 * c-lex.c (interpret_float): Use real_equal instead of
3628 2015-10-04 Jason Merrill <jason@redhat.com>
3630 Implement N4514, C++ Extensions for Transactional Memory.
3631 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3632 (c_common_attribute_table): Add transaction_safe_dynamic.
3633 transaction_safe now affects type identity.
3634 (handle_tm_attribute): Handle transaction_safe_dynamic.
3635 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3636 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3637 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3639 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3640 * c-pretty-print.c (pp_c_attributes_display): Don't print
3641 transaction_safe in C++.
3643 2015-10-02 Marek Polacek <polacek@redhat.com>
3645 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3647 2015-10-02 Marek Polacek <polacek@redhat.com>
3650 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3651 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3652 * c.opt (Wduplicated-cond): New option.
3654 2015-10-01 Joseph Myers <joseph@codesourcery.com>
3656 * c.opt (std=c11): Do not describe as experimental.
3657 (std=gnu11): Likewise.
3658 (std=iso9899:2011): Likewise.
3660 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3662 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3663 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3665 2015-09-25 Marek Polacek <polacek@redhat.com>
3667 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3668 (ubsan_instrument_shift): Likewise.
3670 2015-09-25 Marek Polacek <polacek@redhat.com>
3673 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3675 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3677 * c-indentation.c (should_warn_for_misleading_indentation):
3678 Compare next_stmt_vis_column with guard_line_first_nws instead
3679 of with guard_line_vis_column.
3681 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3685 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3686 options and options not valid for the current language.
3688 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3690 * c-indentation.c (should_warn_for_misleading_indentation):
3691 Float out and consolidate the calls to get_visual_column that
3692 are passed guard_exploc as an argument. Compare
3693 next_stmt_vis_column with guard_line_first_nws instead of with
3694 body_line_first_nws.
3696 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3698 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3699 Wnamespaces): New C++ warnings.
3701 2015-09-22 Jason Merrill <jason@redhat.com>
3703 * c-common.h (abi_compat_version_crosses): New.
3704 (warn_abi_version): Declare.
3705 * c-common.c: Define it.
3706 * c-opts.c (c_common_post_options): Handle it.
3707 flag_abi_compat_version defaults to 8.
3709 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3711 Complete the implementation of N4230, Nested namespace definition.
3712 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3713 __cpp_nested_namespace_definitions.
3715 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3717 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3719 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3721 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3723 * c-pragma.h (pragma_lex): Add optional loc argument.
3725 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3727 * c-format.c (check_format_arg): Adjust to use common block size in all
3730 2015-09-15 David Malcolm <dmalcolm@redhat.com>
3732 * c-format.c (location_from_offset): Update for change in
3733 signature of location_get_source_line.
3734 * c-indentation.c (get_visual_column): Likewise.
3735 (line_contains_hash_if): Likewise.
3737 2015-09-14 Marek Polacek <polacek@redhat.com>
3739 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3740 setting various warnings.
3742 2015-09-14 Marek Polacek <polacek@redhat.com>
3744 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3747 2015-09-11 Mark Wielaard <mjw@redhat.com>
3750 * c.opt (Wunused-variable): Option from common.opt.
3751 (Wunused-const-variable): New option.
3753 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3756 * c.opt ([Wsubobject-linkage]): Add.
3758 2015-09-03 Martin Sebor <msebor@redhat.com>
3761 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3763 * c-common.c (reject_gcc_builtin): Define.
3765 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3768 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3770 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3771 cilk_gimplify_call_params_in_spawned_fn.
3772 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3773 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3776 2015-08-25 Marek Polacek <polacek@redhat.com>
3779 * c-common.c (handle_weak_attribute): Don't check whether the
3780 visibility can be changed here.
3782 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3784 * c-lex.c (c_lex_with_flags): Use explicit locations.
3786 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3788 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3789 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3791 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3794 * c-common.c (check_builtin_function_arguments): Add check
3795 for BUILT_IN_SIGNBIT argument.
3797 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3800 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3803 2015-08-17 Marek Polacek <polacek@redhat.com>
3805 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3806 with whitespaces before qualifier names.
3808 2015-08-12 Marek Polacek <polacek@redhat.com>
3811 * c-common.c (maybe_warn_shift_overflow): Properly handle
3812 left-shifting 1 into the sign bit.
3814 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3816 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3818 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
3819 Braden Obrzut <admin@maniacsvault.net>
3820 Jason Merrill <jason@redhat.com>
3822 Add C++ Concepts TS support.
3823 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
3824 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
3825 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
3826 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
3827 * c-opts.c (set_std_cxx1z): Set flag_concepts.
3828 * c.opt (fconcepts): New.
3830 2015-08-02 Martin Sebor <msebor@redhat.com>
3832 * c.opt (-Wframe-address): New warning option.
3834 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3836 * c-indentation.c (should_warn_for_misleading_indentation):
3839 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3841 * c-indentation.c (get_visual_column): Add parameter first_nws,
3842 use it. Update comment documenting the function.
3843 (is_first_nonwhitespace_on_line): Remove.
3844 (should_warn_for_misleading_indentation): Replace usage of
3845 of is_first_nonwhitespace_on_line with get_visual_column.
3847 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3849 * c-indentation.h (struct token_indent_info): Define.
3850 (get_token_indent_info): Define.
3851 (warn_for_misleading_information): Declare.
3852 * c-common.h (warn_for_misleading_information): Remove.
3853 * c-identation.c (warn_for_misleading_indentation):
3854 Change declaration to take three token_indent_infos. Adjust
3856 * c-identation.c (should_warn_for_misleading_indentation):
3857 Likewise. Bail out early if the body is a compound statement.
3858 (guard_tinfo_to_string): Define.
3860 2015-07-30 Jason Merrill <jason@redhat.com>
3862 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
3863 '*' for reference decay.
3865 2015-07-30 Marek Polacek <polacek@redhat.com>
3867 * c-common.c (warn_tautological_cmp): Bail for float types.
3869 2015-07-27 Marek Polacek <polacek@redhat.com>
3872 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
3874 2015-07-27 Marek Polacek <polacek@redhat.com>
3878 * c-common.c (find_array_ref_with_const_idx_r): New function.
3879 (warn_tautological_cmp): New function.
3880 * c-common.h (warn_tautological_cmp): Declare.
3881 * c.opt (Wtautological-compare): New option.
3883 2015-07-23 Marek Polacek <polacek@redhat.com>
3885 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
3886 (ubsan_instrument_shift): Likewise.
3888 2015-07-23 Marek Polacek <polacek@redhat.com>
3891 * c-ubsan.c: Include gimplify.h.
3892 (ubsan_instrument_division): Unshare OP0 and OP1.
3893 (ubsan_instrument_shift): Likewise.
3895 2015-07-20 Marek Polacek <polacek@redhat.com>
3896 Richard Sandiford <richard.sandiford@arm.com>
3899 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
3900 Use EXPR_LOC_OR_LOC.
3901 (maybe_warn_shift_overflow): New function.
3902 * c-common.h (maybe_warn_shift_overflow): Declare.
3903 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
3904 * c.opt (Wshift-overflow): New option.
3906 2015-07-16 Martin Liska <mliska@suse.cz>
3908 * c-format.c (static void check_format_info_main): Use
3909 object_allocator instead of pool_allocator.
3910 (check_format_arg): Likewise.
3911 (check_format_info_main): Likewise.
3913 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
3915 * c-opts.c: Remove multiline #include comment.
3917 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
3919 * c-common.c: Fix double word typos.
3921 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
3923 * c-ada-spec.h (cpp_operation): Revert latest change.
3924 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
3925 constructors and destructors.
3927 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3929 * c-common.h: Adjust includes for flags.h changes.
3930 * stub-objc.c: Likewise.
3932 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
3934 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
3935 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
3937 2015-07-08 Jakub Jelinek <jakub@redhat.com>
3939 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
3940 are to be removed, return NULL rather than original clauses list.
3942 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3944 * array-notation-common.c: Adjust includes.
3945 * c-ada-spec.c: Likewise.
3946 * c-cilkplus.c: Likewise.
3947 * c-common.h: Likewise.
3948 * c-cppbuiltin.c: Likewise.
3949 * c-dump.c: Likewise.
3950 * c-format.c: Likewise.
3951 * c-gimplify.c: Likewise.
3952 * c-indentation.c: Likewise.
3953 * c-lex.c: Likewise.
3954 * c-omp.c: Likewise.
3955 * c-opts.c: Likewise.
3956 * c-pch.c: Likewise.
3957 * c-ppoutput.c: Likewise.
3958 * c-pragma.c: Likewise.
3959 * c-pretty-print.c: Likewise.
3960 * c-semantics.c: Likewise.
3961 * c-ubsan.c: Likewise.
3963 * stub-objc.c: Likewise.
3965 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
3967 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
3968 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
3970 2015-07-01 Jason Merrill <jason@redhat.com>
3972 * c-common.h (D_CXX11): Rename from D_CXX0X.
3973 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
3974 * c-common.c: Adjust.
3976 * c-opts.c (c_common_post_options): Default to C++14.
3978 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
3980 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
3982 Implement N4197 - Adding u8 character literals
3983 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
3985 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
3986 CPP_UTF8CHAR_USERDEF tokens.
3987 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
3988 and CPP_UTF8CHAR tokens.
3989 (lex_charconst): Treat CPP_UTF8CHAR token.
3991 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3994 * c-common.c (do_warn_unused_parameter): Move here.
3995 * c-common.h (do_warn_unused_parameter): Declare.
3997 2015-06-29 Marek Polacek <polacek@redhat.com>
4000 * c-common.c (check_case_bounds): Add bool * parameter. Set
4002 (c_add_case_label): Add bool * parameter. Pass it down to
4004 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4006 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4009 2015-06-27 Marek Polacek <polacek@redhat.com>
4011 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4012 or VECTOR_INTEGER_TYPE_P throughout.
4013 * c-gimplify.c: Likewise.
4015 2015-06-26 Marek Polacek <polacek@redhat.com>
4017 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4018 * c-common.c (c_fully_fold_internal): Likewise.
4019 (c_alignof_expr): Likewise.
4020 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4021 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4022 * cilk.c (create_parm_list): Likewise.
4024 2015-06-26 Marek Polacek <polacek@redhat.com>
4026 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4028 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4030 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4031 * c-gimplify.c: Likewise.
4032 * c-pragma.c: Likewise.
4033 * c-ubsan.c: Likewise.
4036 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4038 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4041 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4043 * cilk.c: Move calls.h after tm.h in the include chain.
4045 2015-06-25 Marek Polacek <polacek@redhat.com>
4047 * array-notation-common.c: Use VAR_P throughout.
4048 * c-ada-spec.c: Likewise.
4049 * c-common.c: Likewise.
4050 * c-format.c: Likewise.
4051 * c-gimplify.c: Likewise.
4052 * c-omp.c: Likewise.
4053 * c-pragma.c: Likewise.
4054 * c-pretty-print.c: Likewise.
4057 2015-06-25 Marek Polacek <polacek@redhat.com>
4059 * cilk.c (extract_free_variables): Use is_global_var.
4061 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4063 * c-common.c: Don't include target-def.h.
4065 2015-06-23 Marek Polacek <polacek@redhat.com>
4067 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4068 when comparing INTEGER_CSTs.
4070 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4072 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4073 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4074 (dump_ada_template): Skip partially specialized types.
4076 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4078 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4081 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4083 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4084 * c-ada-spec.c: Likewise.
4085 * c-cilkplus.c: Likewise.
4086 * c-common.c: Likewise.
4087 * c-common.h: Likewise.
4088 * c-cppbuiltin.c: Likewise.
4089 * c-dump.c: Likewise.
4090 * c-format.c: Likewise.
4091 * c-gimplify.c: Likewise.
4092 * c-indentation.c: Likewise.
4093 * c-lex.c: Likewise.
4094 * c-omp.c: Likewise.
4095 * c-opts.c: Likewise.
4096 * c-pch.c: Likewise.
4097 * c-ppoutput.c: Likewise.
4098 * c-pragma.c: Likewise.
4099 * c-pretty-print.c: Likewise.
4100 * c-semantics.c: Likewise.
4101 * c-ubsan.c: Likewise.
4103 * stub-objc.c: Likewise.
4105 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4108 * c-common.c (c_common_truthvalue_conversion): Warn when
4109 converting an address of a reference to a truth value.
4111 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4113 * array-notation-common.c : Adjust include files.
4114 * c-ada-spec.c : Likewise.
4115 * c-cilkplus.c : Likewise.
4116 * c-common.c : Likewise.
4117 * c-common.h : Likewise.
4118 * c-cppbuiltin.c : Likewise.
4119 * c-dump.c : Likewise.
4120 * c-format.c : Likewise.
4121 * c-gimplify.c : Likewise.
4122 * c-indentation.c : Likewise.
4123 * c-lex.c : Likewise.
4124 * c-omp.c : Likewise.
4125 * c-opts.c : Likewise.
4126 * c-pch.c : Likewise.
4127 * c-ppoutput.c : Likewise.
4128 * c-pragma.c : Likewise.
4129 * c-pretty-print.c : Likewise.
4130 * c-semantics.c : Likewise.
4131 * c-ubsan.c : Likewise.
4132 * cilk.c : Likewise.
4133 * stub-objc.c : Likewise.
4135 2015-06-08 Marek Polacek <polacek@redhat.com>
4138 * c-format.c (location_from_offset): Return LOC if LINE is null.
4140 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4142 * c-common.h (c_parse_final_cleanups): New prototype.
4143 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4145 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4147 * c-common.c (noplt): New attribute.
4148 (handle_noplt_attribute): New handler.
4150 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4152 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4153 * c-ada-spec.c: Likewise.
4154 * c-cilkplus.c: Likewise.
4155 * c-common.c: Likewise.
4156 * c-common.h: Likewise.
4157 * c-cppbuiltin.c: Likewise.
4158 * c-dump.c: Likewise.
4159 * c-format.c: Likewise.
4160 * c-gimplify.c: Likewise.
4161 * c-indentation.c: Likewise.
4162 * c-lex.c: Likewise.
4163 * c-omp.c: Likewise.
4164 * c-opts.c: Likewise.
4165 * c-pch.c: Likewise.
4166 * c-ppoutput.c: Likewise.
4167 * c-pragma.c: Likewise.
4168 * c-pretty-print.c: Likewise.
4169 * c-semantics.c: Likewise.
4170 * c-ubsan.c: Likewise.
4172 * stub-objc.c: Likewise.
4174 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4177 * c-indentation.c (should_warn_for_misleading_indentation): Use
4178 expand_location rather than expand_location_to_spelling_point.
4179 Don't warn if the guarding statement is more indented than the
4182 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4184 * c-indentation.c (warn_for_misleading_indentation): Bail out
4185 immediately if -Wmisleading-indentation isn't enabled.
4187 2015-06-01 Martin Liska <mliska@suse.cz>
4189 * c-format.c (check_format_arg):Use new type-based pool allocator.
4190 (check_format_info_main) Likewise.
4192 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4194 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4195 (has_nontrivial_methods): Likewise.
4197 2015-05-25 Marek Polacek <polacek@redhat.com>
4199 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4201 2015-05-22 Marek Polacek <polacek@redhat.com>
4204 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4206 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4208 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4209 STACK_GROWS_DOWNWARD.
4211 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4213 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4214 STACK_GROWS_DOWNWARD rather than if it is defined.
4216 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4219 * c-format.c (location_column_from_byte_offset): New.
4220 (location_from_offset): New.
4221 (struct format_wanted_type): Add offset_loc field.
4222 (check_format_info): Move handling of location for extra arguments
4223 closer to the point of warning.
4224 (check_format_info_main): Pass the result of location_from_offset
4226 (format_type_warning): Pass the result of location_from_offset
4229 2015-05-20 Marek Polacek <polacek@redhat.com>
4231 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4233 2015-05-20 Marek Polacek <polacek@redhat.com>
4235 * c-ada-spec.c (dump_sloc): Use DECL_P.
4237 2015-05-20 Marek Polacek <polacek@redhat.com>
4239 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4240 * c-common.c: Likewise.
4242 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4244 * c-common.h (fe_file_change): Strengthen param from
4245 const line_map * to const line_map_ordinary *.
4246 (pp_file_change): Likewise.
4247 * c-lex.c (fe_file_change): Likewise.
4248 (cb_define): Use linemap_check_ordinary when invoking
4250 (cb_undef): Likewise.
4251 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4252 invoking cb_file_change.
4253 (c_finish_options): Likewise.
4254 (push_command_line_include): Likewise.
4255 (cb_file_change): Strengthen param "new_map" from
4256 const line_map * to const line_map_ordinary *.
4257 * c-ppoutput.c (cb_define): Likewise for local "map".
4258 (pp_file_change): Likewise for param "map" and local "from".
4260 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4262 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4264 2015-05-18 Tom de Vries <tom@codesourcery.com>
4266 * c-common.c (build_va_arg_1): New function.
4267 (build_va_arg): Add address operator to va_list operand if necessary.
4269 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4272 * c-common.c (int_safely_convertible_to_real_p): Define.
4273 (unsafe_conversion_p): Check conversions involving complex types.
4274 (conversion_warning): Add new warning message for conversions which
4275 discard imaginary component.
4276 * c-common.h: (enum conversion_safety): Add new enumerator for such
4279 2015-05-14 Marek Polacek <polacek@redhat.com>
4283 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4284 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4285 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4286 use it. If FOR_INT_CONST, require that all evaluated operands be
4289 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4291 * c-common.h (warn_for_misleading_indentation): New prototype.
4292 * c-indentation.c: New file.
4293 * c.opt (Wmisleading-indentation): New option.
4295 2015-05-12 Tom de Vries <tom@codesourcery.com>
4297 PR tree-optimization/66010
4298 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4300 2015-05-09 Jason Merrill <jason@redhat.com>
4302 * c-opts.c (c_common_post_options): Also clear
4303 cpp_opts->cpp_warn_cxx11_compat.
4305 * c-common.h (enum cxx_dialect): Add cxx_unset.
4306 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4307 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4309 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4310 (std=gnu++0x): Mark as Undocumented.
4311 (std=gnu++1y): Add deprecated message.
4313 2015-05-08 Jason Merrill <jason@redhat.com>
4315 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4318 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4320 2015-05-08 Marek Polacek <polacek@redhat.com>
4323 * c.opt (Woverride-init-side-effects): New option.
4325 2015-05-07 Marek Polacek <polacek@redhat.com>
4328 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4330 * c.opt (Wshift-negative-value): New option.
4331 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4332 when -Wextra and C99/C++11 mode.
4334 2015-05-07 Marek Polacek <polacek@redhat.com>
4335 Martin Uecker <uecker@eecs.berkeley.edu>
4337 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4338 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4340 2015-05-05 Jason Merrill <jason@redhat.com>
4342 * c.opt (Wterminate): New.
4344 2015-04-30 Marek Polacek <polacek@redhat.com>
4346 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4347 require that the non-constant be of a boolean type.
4349 2015-04-29 Josh Triplett <josh@joshtriplett.org>
4351 * c-common.c (handle_section_attribute): Refactor to reduce
4352 nesting and distinguish between error cases.
4354 2015-04-29 Marek Polacek <polacek@redhat.com>
4357 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4360 2015-04-29 Jakub Jelinek <jakub@redhat.com>
4362 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4363 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4364 HOST_BITS_PER_WIDE_INT.
4366 2015-04-28 Tom de Vries <tom@codesourcery.com>
4368 PR tree-optimization/65887
4369 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4371 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
4372 Pierre-Marie de Rodat <derodat@adacore.com>
4374 * c-ada-spec.c (in_function): Delete.
4375 (dump_generic_ada_node): Do not change in_function and remove the
4376 redundant code dealing with it.
4377 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4378 (print_ada_methods): Output the static member functions in a nested
4379 package after the regular methods as well as associated renamings.
4381 2015-04-24 Marek Polacek <polacek@redhat.com>
4384 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4385 and OPT_Wshift_count_overflow.
4388 * c-common.c (warn_logical_operator): Warn if the operands have the
4391 2015-04-24 Marek Polacek <polacek@redhat.com>
4394 * c-common.c (warn_logical_operator): Bail if either operand comes
4395 from a macro expansion.
4397 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4400 * c-common.c (c_default_pointer_mode): Add definition.
4401 * c-common.h (c_default_pointer_mode): Add declaration.
4403 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4405 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4406 on record_builtin_type argument.
4408 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4411 * c-common.c (warn_logical_not_parentheses): Don't warn for
4414 2015-03-07 Marek Polacek <polacek@redhat.com>
4417 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4418 before trying to figure out whether we have a flexible array member.
4420 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
4421 Jonathan Wakely <jwakely.gcc@gmail.com>
4423 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4425 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4428 * c-ada-spec.c (print_destructor): Remove obsolete code.
4430 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4432 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4433 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4434 DECL_TEMPLATE_RESULT emulations.
4435 (dump_ada_template)): Add guard for TYPE_METHODS.
4437 2015-02-27 Marek Polacek <polacek@redhat.com>
4440 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4442 2015-02-27 Kai Tietz <ktietz@redhat.com>
4445 * c-pragma.c (handle_pragma_weak): Do not try to create
4446 weak/alias of declarations not being function, or variable
4449 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4452 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4454 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4456 2015-02-16 Marek Polacek <polacek@redhat.com>
4459 * c-format.c (check_format_types): Handle null param.
4461 2015-02-13 Marek Polacek <polacek@redhat.com>
4464 * c-format.c (check_format_types): Don't warn about different
4465 signedness if the original value is in the range of WANTED_TYPE.
4467 2015-02-12 Jason Merrill <jason@redhat.com>
4470 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4471 to the current highest version.
4472 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4474 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4478 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4479 instead of RDIV_EXPR. Use build_binary_op instead of
4482 2015-01-30 Joseph Myers <joseph@codesourcery.com>
4484 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4485 to pass input_location as first argument.
4487 2015-01-23 Tom de Vries <tom@codesourcery.com>
4490 * c.opt (fopenacc): Mark as LTO option.
4492 2015-01-23 Tom de Vries <tom@codesourcery.com>
4495 * c.opt (fopenmp): Mark as LTO option.
4497 2015-01-21 Jakub Jelinek <jakub@redhat.com>
4500 * cilk.c (fill_decls_vec): Only put decls into vector v.
4501 (compare_decls): Fix up formatting.
4503 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4506 * cilk.c: Include vec.h.
4507 (struct cilk_decls): New structure.
4508 (wrapper_parm_cb): Split this function to...
4509 (fill_decls_vec): ...this...
4510 (create_parm_list): ...and this.
4511 (compare_decls): New function.
4512 (for_local_cb): Remove.
4513 (wrapper_local_cb): Ditto.
4514 (build_wrapper_type): For now first traverse and fill vector of
4515 declarations then sort it and then deal with sorted vector.
4516 (cilk_outline): Ditto.
4517 (declare_one_free_variable): Ditto.
4519 2015-01-21 Jason Merrill <jason@redhat.com>
4522 * c-format.c (check_format_arg): Call decl_constant_value.
4524 2015-01-19 Martin Liska <mliska@suse.cz>
4526 * c-common.c (handle_noicf_attribute): New function.
4528 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4529 Bernd Schmidt <bernds@codesourcery.com>
4530 James Norris <jnorris@codesourcery.com>
4531 Cesar Philippidis <cesar@codesourcery.com>
4532 Ilmir Usmanov <i.usmanov@samsung.com>
4533 Jakub Jelinek <jakub@redhat.com>
4535 * c.opt (fopenacc): New option.
4536 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4537 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4539 * c-common.h (c_finish_oacc_wait): New prototype.
4540 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4541 (c_finish_oacc_wait): New function.
4542 * c-pragma.c (oacc_pragmas): New variable.
4543 (c_pp_lookup_pragma, init_pragma): Handle it.
4544 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4545 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4546 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4547 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4548 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4549 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4550 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4551 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4552 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4553 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4554 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4555 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4556 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4557 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4558 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4559 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4560 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4561 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4562 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4563 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4564 PRAGMA_OACC_CLAUSE_WORKER.
4566 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
4568 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4569 for the new option fstack-protector_explicit.
4570 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4571 (handle_stack_protect_attribute): New function.
4573 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
4575 * c.opt: New option -Warray-bounds=.
4577 2015-01-09 Michael Collison <michael.collison@linaro.org>
4579 * array-notation-common.c: Include hash-set.h, machmode.h,
4580 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4581 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4582 * c-ada-spec.c: Ditto.
4583 * c-cilkplus.c: Ditto.
4584 * c-common.c: Include input.h due to flattening of tree.h.
4585 Define macro GCC_C_COMMON_C.
4586 * c-common.h: Flatten tree.h header files into c-common.h.
4587 Remove include of tree-core.h.
4588 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4589 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4590 fold-const.h, wide-int.h, and inchash.h due to
4591 flattening of tree.h.
4593 * c-format.c: Flatten tree.h header files into c-common.h.
4594 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4595 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4596 fold-const.h, wide-int.h, and inchash.h due to
4597 flattening of tree.h.
4598 * c-dump.c: Include hash-set.h, machmode.h,
4599 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4600 fold-const.h, wide-int.h, and inchash.h due to
4601 flattening of tree.h.
4602 * c-format.c: Include hash-set.h, machmode.h,
4603 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4604 fold-const.h, wide-int.h, inchash.h and real.h due to
4605 flattening of tree.h.
4606 * c-gimplify.c: Include hash-set.h, machmode.h,
4607 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4608 fold-const.h, wide-int.h, and inchash.h due to
4609 flattening of tree.h.
4615 * c-ppoutput.c: Ditto.
4616 * c-pragma.c: Ditto.
4617 * c-pretty-print.c: Ditto.
4618 * c-semantics.c: Ditto.
4620 * stub-objc.c: Ditto.
4622 2015-01-08 Jason Merrill <jason@redhat.com>
4624 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4625 do_ubsan_in_current_function.
4626 (ubsan_maybe_instrument_reference_or_call): Likewise.
4627 * c-ubsan.h: Declare it.
4629 2015-01-08 Mike Stump <mikestump@comcast.net>
4631 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4633 2015-01-07 Marek Polacek <polacek@redhat.com>
4636 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4637 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4639 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4642 * c.opt (Wsuggest-override): New option.
4644 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4646 Update copyright years.
4648 2015-01-05 Marek Polacek <polacek@redhat.com>
4651 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4653 * c-common.h (warn_array_subscript_with_type_char): Update
4656 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4658 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4659 Control macro with flag_sized_deallocation.
4661 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4663 * c.opt (Wdiscarded-array-qualifiers): New option.
4665 2014-12-19 Jakub Jelinek <jakub@redhat.com>
4667 PR preprocessor/63831
4668 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4669 and __has_cpp_attribute here.
4670 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4671 c_common_has_attribute.
4672 * c-common.h (c_common_has_attribute): New prototype.
4673 * c-lex.c (init_c_lex): Set cb->has_attribute to
4674 c_common_has_attribute instead of cb_has_attribute.
4675 (get_token_no_padding): New function.
4676 (cb_has_attribute): Renamed to ...
4677 (c_common_has_attribute): ... this. No longer static. Use
4678 get_token_no_padding, require ()s, don't build TREE_LIST
4679 unnecessarily, fix up formatting, adjust diagnostics, call
4682 2014-12-15 Jason Merrill <jason@redhat.com>
4684 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4685 (-Wsized-deallocation): New.
4686 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4687 to on in C++14 and up.
4689 2014-12-11 Jason Merrill <jason@redhat.com>
4691 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4693 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4694 we aren't complaining about VLAs.
4696 2014-12-06 Marek Polacek <polacek@redhat.com>
4698 PR tree-optimization/64183
4699 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4700 shift-expression if it is integer_type_node. Use types_compatible_p.
4702 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4704 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4705 last argument from create_tmp_var_raw and create_tmp_var calls.
4706 * cilk.c (gimplify_cilk_spawn): Likewise.
4707 * c-omp.c (c_finish_omp_atomic): Likewise.
4709 2014-11-28 Marek Polacek <polacek@redhat.com>
4711 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4712 instead of unsigned_type_node.
4714 2014-11-28 Marek Polacek <polacek@redhat.com>
4717 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4719 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4720 expression to unsigned_type_node.
4722 2014-11-20 Mark Wielaard <mjw@redhat.com>
4725 * c-opts.c (set_std_c89): Set lang_hooks.name.
4726 (set_std_c99): Likewise.
4727 (set_std_c11): Likewise.
4728 (set_std_cxx98): Likewise.
4729 (set_std_cxx11): Likewise.
4730 (set_std_cxx14): Likewise.
4731 (set_std_cxx1z): Likewise.
4733 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4736 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4737 return type to bool.
4738 * c-common.c: Include gimple-expr.h.
4739 (convert_vector_to_pointer_for_subscript): Change return type to
4740 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4741 and copy it into a TARGET_EXPR and use that instead of *vecp
4744 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4746 Merger of git branch "gimple-classes-v2-option-3".
4747 * ChangeLog.gimple-classes: New.
4748 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4749 from being just a vec<gimple> to a vec<gbind *>.
4751 2014-11-18 Jakub Jelinek <jakub@redhat.com>
4754 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4755 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4756 get_pointer_alignment for non-pointers. Use ptype, or if it is
4757 reference type, corresponding pointer type, as type of kind
4759 (ubsan_maybe_instrument_reference,
4760 ubsan_maybe_instrument_member_call): Adjust callers.
4762 2014-11-15 Marek Polacek <polacek@redhat.com>
4765 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4767 (extract_array_notation_exprs): Return for NULL node.
4769 2014-11-12 Joseph Myers <joseph@codesourcery.com>
4771 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4772 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4774 2014-11-12 Jakub Jelinek <jakub@redhat.com>
4777 * c-common.c (check_builtin_function_arguments): Handle
4778 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4780 2014-11-10 Andi Kleen <ak@linux.intel.com>
4783 * c-common.h (check_no_cilk): Declare.
4784 * cilk.c (get_error_location): New function.
4785 (check_no_cilk): Dito.
4787 2014-11-10 Andi Kleen <ak@linux.intel.com>
4789 * cilk.c (recognize_spawn): Use expression location
4792 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4794 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4796 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4798 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4799 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4800 (__cpp_range_based_for, __cpp_initializer_lists,
4801 __cpp_delegating_constructors, __cpp_nsdmi,
4802 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4803 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4804 __has_cpp_attribute.
4805 * c-lex.c (cb_has_attribute): New callback CPP function;
4806 (init_c_lex): Set has_attribute callback.
4808 2014-11-04 Richard Biener <rguenther@suse.de>
4810 * c-common.c (shorten_compare): Do not shorten mixed
4811 DFP and non-DFP compares.
4813 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4815 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4816 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4817 Commentary and rearrangement of tests.
4818 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
4819 Commentary and rearrangement of tests.
4820 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
4821 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
4823 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4825 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
4826 enum from machine_mode.
4828 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
4830 * c-common.c: Adjust include files.
4831 * c-gimplify.c: Ditto.
4833 * c-pragma.c: Ditto.
4836 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
4838 * c-gimplify.c: Adjust include files.
4840 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4843 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
4844 c_common_initialize_diagnostics.
4845 * c-common.h: Likewise.
4847 2014-10-24 Marek Polacek <polacek@redhat.com>
4850 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
4851 print "struct"/"union"/"enum" for typedefed names.
4853 2014-10-23 Marek Polacek <polacek@redhat.com>
4855 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
4858 2014-10-22 Jakub Jelinek <jakub@redhat.com>
4859 Yury Gribov <y.gribov@samsung.com>
4861 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4862 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
4863 instead of flag_sanitize_recover as bool flag.
4865 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
4867 * cilk.c: Revert previous change.
4869 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
4872 * cilk.c: Include vec.h.
4873 (struct cilk_decls): New structure.
4874 (wrapper_parm_cb): Split this function to...
4875 (fill_decls_vec): ...this...
4876 (create_parm_list): ...and this.
4877 (compare_decls): New function.
4878 (for_local_cb): Remove.
4879 (wrapper_local_cb): Ditto.
4880 (build_wrapper_type): For now first traverse and fill vector of
4881 declarations then sort it and then deal with sorted vector.
4882 (cilk_outline): Ditto.
4883 (declare_one_free_variable): Ditto.
4885 2014-10-17 Marek Polacek <polacek@redhat.com>
4887 * c-opts.c (c_common_post_options): Set warn_implicit_int.
4888 * c.opt (Wimplicit-int): Initialize to -1.
4890 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
4892 * c-pragma.c: Adjust include files.
4893 * c-semantics.c: Likewise.
4895 2014-10-16 DJ Delorie <dj@redhat.com>
4897 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
4900 2014-10-14 Jason Merrill <jason@redhat.com>
4903 * c-common.h (CPP_PREPARSED_EXPR): New.
4904 (N_CP_TTYPES): Adjust.
4906 2014-10-15 Marek Polacek <polacek@redhat.com>
4908 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
4910 2014-10-14 DJ Delorie <dj@redhat.com>
4912 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
4913 types, not just __int128.
4914 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
4915 types, not just __int128.
4916 (cpp_atomic_builtins): Round pointer sizes up.
4917 (type_suffix): Use type precision, not specific types.
4918 * c-common.c (c_common_reswords): Remove __int128 special case.
4919 (c_common_type_for_size): Check for all __intN types, not just
4921 (c_common_type_for_mode): Likewise.
4922 (c_common_signed_or_unsigned_type): Likewise.
4923 (c_build_bitfield_integer_type): Likewise.
4924 (c_common_nodes_and_builtins): Likewise.
4925 (keyword_begins_type_specifier): Likewise.
4926 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
4929 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
4931 * c-common.c: Use hash_table instead of hashtab.
4933 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4935 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
4938 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
4943 * c-common.c (warn_logical_operator): Punt for vectors.
4945 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4947 Implement SD-6: SG10 Feature Test Recommendations
4948 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
4949 macros and the __has_header macro.
4951 2014-09-30 Jason Merrill <jason@redhat.com>
4953 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
4954 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
4955 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4957 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
4958 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4960 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
4961 * c-common.c (c_common_reswords): Remove __is_convertible_to.
4963 2014-09-24 Marek Polacek <polacek@redhat.com>
4967 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
4969 2014-09-23 Andi Kleen <ak@linux.intel.com>
4971 * c-common.c (handle_no_reorder_attribute): New function.
4972 (c_common_attribute_table): Add no_reorder attribute.
4974 2014-09-22 Joseph Myers <joseph@codesourcery.com>
4976 * c-cppbuiltin.c (c_cpp_builtins): Define
4977 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
4980 2014-09-18 Joseph Myers <joseph@codesourcery.com>
4982 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
4983 for supported floating-point modes.
4985 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4987 * c.opt (Wpsabi): Use LangEnabledBy.
4988 * c-opts.c (c_common_handle_option): Do not handle here.
4990 2014-09-12 Joseph Myers <joseph@codesourcery.com>
4992 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
4993 macros for floating-point modes.
4995 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
4998 * c-cppbuiltin.c (builtin_define_float_constants): Correct
4999 __*_DENORM_MIN__ without denormals.
5001 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5003 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5004 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5005 ubsan_create_data callers.
5006 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5007 index is constant or BIT_AND_EXPR with constant mask and is
5008 small enough for the bound.
5009 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5010 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5012 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5014 * c.opt: Add CppReason to various flags.
5015 (Wdate-time): Re-sort.
5016 * c-common.c: Include c-common.h earlier.
5017 (struct reason_option_codes_t): Delete.
5018 (c_option_controlling_cpp_error): Prefix global type and struct
5021 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5023 * c.opt (Wnormalized): New.
5024 (Wnormalized=): Use Enum and Reject Negative.
5025 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5027 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5029 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5030 digits of floating-point modes if -fbuilding-libgcc.
5032 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5034 * c-cppbuiltin.c (c_cpp_builtins): Also define
5035 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5036 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5037 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5038 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5039 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5040 __LIBGCC_STACK_GROWS_DOWNWARD__,
5041 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5042 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5043 __LIBGCC_DWARF_FRAME_REGISTERS__,
5044 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5045 __LIBGCC_STACK_POINTER_REGNUM__ and
5046 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5047 (builtin_define_with_value): Handle backslash-escaping in string
5050 2014-09-05 Richard Biener <rguenther@suse.de>
5053 * c-format.c (check_format_arg): Properly handle
5054 effectively signed POINTER_PLUS_EXPR offset.
5056 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5058 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5059 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5060 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5062 * c-opts.c (c_common_handle_option): Do not handle here.
5063 (sanitize_cpp_opts): Likewise.
5064 * c-common.c (struct reason_option_codes_t): Handle
5065 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5067 2014-09-03 Marek Polacek <polacek@redhat.com>
5069 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5071 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5072 Balaji V. Iyer <balaji.v.iyer@intel.com>
5073 Igor Zamyatin <igor.zamyatin@intel.com>
5075 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5076 * c-common.c (c_common_reswords): Added _Cilk_for.
5077 * c-common.h (enum rid): Added RID_CILK_FOR.
5078 (cilk_for_number_of_iterations): Add declaration.
5079 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5081 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5082 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5084 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5086 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5087 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5088 Wundef): Use CPP, Var and Init.
5089 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5091 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5093 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5094 * c-opts.c (c_common_handle_option): Do not handle here.
5096 2014-08-25 Jason Merrill <jason@redhat.com>
5098 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5099 -std=c++14 and -std=gnu++14, rather than the reverse.
5100 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5101 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5102 * c-common.h (cxx_dialect): Remove cxx1y.
5104 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5106 * c-common.h (enum cxx_dialect): Add cxx14.
5107 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5108 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5109 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5111 2014-08-22 Jason Merrill <jason@redhat.com>
5113 * c.opt (std=gnu++17): Fix alias.
5115 2014-08-22 Marek Polacek <polacek@redhat.com>
5118 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5119 check for vector types. Drop LHS argument.
5120 * c-common.h (warn_logical_not_parentheses): Adjust.
5122 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5124 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5125 (Wmultichar): Likewise.
5126 (Wdate-time): Use C-family languages instead of Common. Use CPP
5128 * c-opts.c (c_common_handle_option): Do not handle the above
5130 (sanitize_cpp_opts): Likewise.
5132 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5135 * c-opts.c: Include tree-diagnostics.h.
5136 (c_diagnostic_finalizer): New.
5137 (c_common_initialize_diagnostics): Use it.
5139 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5141 PR preprocessor/51303
5142 * c-common.c (struct reason_option_codes_t option_codes):
5143 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5145 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5149 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5150 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5151 (c_common_post_options): Call init_global_opts_from_cpp.
5152 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5154 2014-08-19 Marek Polacek <polacek@redhat.com>
5157 * c-common.c (maybe_warn_bool_compare): New function.
5158 * c-common.h (maybe_warn_bool_compare): Declare.
5159 * c.opt (Wbool-compare): New option.
5161 2014-08-19 Marek Polacek <polacek@redhat.com>
5163 * c.opt (Wc99-c11-compat): New option.
5165 2014-08-19 Marek Polacek <polacek@redhat.com>
5167 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5168 to warn_c90_c99_compat.
5169 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5172 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5173 Steven Bosscher <steven@gcc.gnu.org>
5176 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5177 format_check_results.
5178 (check_function_format): Use true and add comment for boolean
5180 (finish_dollar_format_checking): Use explicit location when warning.
5181 (check_format_info): Likewise.
5182 (check_format_arg): Set extra_arg_loc and format_string_loc.
5183 (check_format_info_main): Use explicit location when warning.
5184 (check_format_types): Pass explicit location.
5185 (format_type_warning): Likewise.
5187 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5190 * c-format.c: Handle Fortran flags.
5192 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5195 * array-notation-common.c (find_rank): Added handling for other
5196 types of references.
5198 2014-08-10 Marek Polacek <polacek@redhat.com>
5201 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5202 * c.opt (Wc90-c99-compat): Add option.
5204 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5206 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5208 2014-08-03 Marek Polacek <polacek@redhat.com>
5210 * c-common.c (check_case_value): Add location_t parameter. Use it.
5211 (c_add_case_label): Pass loc to check_case_value.
5213 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5215 * cilk.c: Use hash_map instead of pointer_map.
5217 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5219 * c-gimplify.c: Use hash_set instead of pointer_set.
5221 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5224 * array-notation-common.c (extract_array_notation_exprs): Handling
5227 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5229 * c-common.h (min_align_of_type): Removed prototype.
5230 * c-common.c (min_align_of_type): Removed.
5231 * c-ubsan.h (ubsan_maybe_instrument_reference,
5232 ubsan_maybe_instrument_member_call): New prototypes.
5233 * c-ubsan.c: Include stor-layout.h and builtins.h.
5234 (ubsan_maybe_instrument_reference_or_call,
5235 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5238 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5241 * c.opt (-Wreturn-local-addr): Move to common.opt.
5243 2014-07-30 Jason Merrill <jason@redhat.com>
5248 * c.opt (-fuse-all-virtuals): New.
5250 2014-07-30 Tom Tromey <tromey@redhat.com>
5253 * c.opt (Wdesignated-init): New option.
5254 * c-common.c (c_common_attribute_table): Add "designated_init".
5255 (handle_designated_init): New function.
5257 2014-07-24 Marek Polacek <polacek@redhat.com>
5260 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5262 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5264 PR preprocessor/60723 - missing system-ness marks for macro tokens
5265 * c-ppoutput.c (struct print::prev_was_system_token): New data
5267 (init_pp_output): Initialize it.
5268 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5269 (do_line_change): Return a flag saying if a line marker was
5271 (scan_translation_unit): Detect if the system-ness of the token we
5272 are about to emit is different from the one of the previously
5273 emitted token. If so, emit a line marker. Avoid emitting useless
5274 adjacent line markers. Avoid emitting line markers for tokens
5275 originating from the expansion of built-in macros.
5276 (scan_translation_unit_directives_only): Adjust.
5278 2014-07-15 Marek Polacek <polacek@redhat.com>
5280 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5281 TYPE_MAX_VALUE is NULL.
5283 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5286 * c.opt (Wmemset-transposed-args): New warning.
5288 2014-07-10 Jason Merrill <jason@redhat.com>
5292 * c.opt (-fuse-all-virtuals): New.
5294 2014-07-09 Richard Biener <rguenther@suse.de>
5297 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5298 using unsigned arithmetic if overflow does not wrap instead of
5299 if overflow is undefined.
5301 2014-07-06 Marek Polacek <polacek@redhat.com>
5304 * c.opt (Wsizeof-array-argument): New option.
5306 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5308 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5309 comments->count <= 1, as comments->entries might be NULL.
5311 2014-07-01 Marek Polacek <polacek@redhat.com>
5313 * c.opt (Wint-conversion): New option.
5315 2014-07-01 Marek Polacek <polacek@redhat.com>
5318 * c.opt (Wincompatible-pointer-types): New option.
5320 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5323 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5324 Do not discard TYPE_QUALS of type.
5326 2014-06-26 Jason Merrill <jason@redhat.com>
5328 * c-common.h (enum cxx_dialect): Add cxx1z.
5329 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5330 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5332 2014-06-26 Teresa Johnson <tejohnson@google.com>
5334 * c-common.h (get_dump_info): Declare.
5335 * c-gimplify.c (c_genericize): Use saved dump files.
5336 * c-opts.c (c_common_parse_file): Begin and end dumps
5337 once around parsing invocation.
5338 (get_dump_info): New function.
5340 2014-06-23 Marek Polacek <polacek@redhat.com>
5341 Andrew MacLeod <amacleod@redhat.com>
5344 * c-common.c (get_atomic_generic_size): Don't segfault if the
5345 type doesn't have a size.
5347 2014-06-20 Marek Polacek <polacek@redhat.com>
5349 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5350 (ubsan_walk_array_refs_r): New function.
5351 (c_genericize): Instrument array bounds.
5352 * c-ubsan.c: Include "internal-fn.h".
5353 (ubsan_instrument_division): Mark instrumented arrays as having
5354 side effects. Adjust ubsan_type_descriptor call.
5355 (ubsan_instrument_shift): Likewise.
5356 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5357 (ubsan_instrument_bounds): New function.
5358 (ubsan_array_ref_instrumented_p): New function.
5359 (ubsan_maybe_instrument_array_ref): New function.
5360 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5361 (ubsan_array_ref_instrumented_p): Declare.
5362 (ubsan_maybe_instrument_array_ref): Declare.
5364 2014-06-20 Hale Wang <hale.wang@arm.com>
5367 * c.opt (fshort-enums): Add to LTO.
5368 * c.opt (fshort-wchar): Likewise.
5370 2014-06-16 Marek Polacek <polacek@redhat.com>
5373 * c.opt (Wswitch-bool): Add Var.
5375 2014-06-12 Jakub Jelinek <jakub@redhat.com>
5378 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5379 #pragma omp target teams or
5380 #pragma omp {,target }teams distribute simd.
5382 2014-06-12 Jason Merrill <jason@redhat.com>
5384 * c.opt (Wabi=, fabi-compat-version): New.
5385 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5386 (c_common_post_options): Handle flag_abi_compat_version default.
5387 Disallow -fabi-compat-version=1.
5388 * c-common.h (abi_version_crosses): New.
5390 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
5392 * c-common.c (handle_section_attribute): Update handling for
5393 section names that are no longer trees.
5395 2014-06-10 Jakub Jelinek <jakub@redhat.com>
5398 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5399 (omp_pragmas): ... back here.
5401 2014-06-05 Marek Polacek <polacek@redhat.com>
5404 * c-common.c (warn_logical_not_parentheses): New function.
5405 * c-common.h (warn_logical_not_parentheses): Declare.
5406 * c.opt (Wlogical-not-parentheses): New option.
5408 2014-06-04 Marek Polacek <polacek@redhat.com>
5411 * c-common.c (check_case_bounds): Add location parameter.
5413 (c_add_case_label): Pass loc to check_case_bounds.
5415 2014-06-03 Marek Polacek <polacek@redhat.com>
5418 * c.opt (Wswitch-bool): New option.
5420 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5422 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5424 (record_types_used_by_current_var_decl): Move prototype to where
5427 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5428 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5429 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5431 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5433 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5434 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5436 * c-pretty-print.c (pp_c_void_constant): New function.
5437 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5438 (c_pretty_printer::expression): Handle VOID_CST.
5439 * cilk.c (extract_free_variables): Likewise.
5440 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5441 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5443 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5445 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5446 * c-pragma.c (push_alignment): Adjust.
5447 (handle_pragma_push_options): Likewise.
5449 2014-05-09 Marek Polacek <polacek@redhat.com>
5452 * c-common.c (check_user_alignment): Return -1 if alignment is error
5454 (handle_aligned_attribute): Don't call default_conversion on
5456 (handle_vector_size_attribute): Likewise.
5457 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5458 (handle_sentinel_attribute): Call default_conversion and allow even
5459 integral types as an argument.
5461 2014-05-08 Marek Polacek <polacek@redhat.com>
5464 * c-common.c (min_align_of_type): New function factored out from...
5465 (c_sizeof_or_alignof_type): ...here.
5466 * c-common.h (min_align_of_type): Declare.
5468 2014-05-08 Marek Polacek <polacek@redhat.com>
5471 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5472 parameter type of main.
5474 2014-05-07 DJ Delorie <dj@redhat.com>
5476 * c-cppbuiltin.c (print_bits_of_hex): New.
5477 (builtin_define_type_minmax): Print values using hex so as not to
5478 require a pre-computed list of string values.
5480 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5481 Mike Stump <mikestump@comcast.net>
5482 Richard Sandiford <rdsandiford@googlemail.com>
5484 * c-ada-spec.c: Include wide-int.h.
5485 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5486 (dump_generic_ada_node): Use wide-int interfaces.
5487 * c-common.c: Include wide-int-print.h.
5488 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5489 (pointer_int_sum): Use wide-int interfaces.
5490 (c_common_nodes_and_builtins): Use make_int_cst.
5491 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5492 (handle_alloc_size_attribute): Use wide-int interfaces.
5493 (get_nonnull_operand): Likewise.
5494 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5495 * c-lex.c: Include wide-int.h.
5496 (narrowest_unsigned_type): Take a widest_int rather than two
5498 (narrowest_signed_type): Likewise.
5499 (interpret_integer): Update accordingly. Use wide-int interfaces.
5500 (lex_charconst): Use wide-int interfaces.
5501 * c-pretty-print.c: Include wide-int.h.
5502 (pp_c_integer_constant): Use wide-int interfaces.
5503 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5504 INT_CST_LT_UNSIGNED.
5506 2014-05-06 Richard Biener <rguenther@suse.de>
5508 * c-opts.c (c_common_post_options): For -freestanding,
5509 -fno-hosted and -fno-builtin disable pattern recognition
5510 if not enabled explicitely.
5512 2014-05-02 Marek Polacek <polacek@redhat.com>
5514 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5516 2014-05-01 Marek Polacek <polacek@redhat.com>
5519 * c.opt (Wdiscarded-qualifiers): Add.
5521 2014-04-30 Marek Polacek <polacek@redhat.com>
5523 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5524 INT_MIN / -1 sanitization only for integer types.
5526 2014-04-25 Marek Polacek <polacek@redhat.com>
5529 * c-common.c (handle_noinline_attribute): Warn if the attribute
5530 conflicts with always_inline attribute.
5531 (handle_always_inline_attribute): Warn if the attribute conflicts
5532 with noinline attribute.
5534 2014-04-25 Marek Polacek <polacek@redhat.com>
5537 * c-common.c (check_main_parameter_types): Warn about variadic main.
5539 2014-04-24 Mike Stump <mikestump@comcast.net>
5541 * c.opt (Wshadow-ivar): Default to on.
5543 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5545 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5547 2014-04-23 Marek Polacek <polacek@redhat.com>
5549 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5551 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5554 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5555 if flag_sanitize_undefined_trap_on_error.
5556 (ubsan_instrument_division, ubsan_instrument_shift,
5557 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5558 if !flag_sanitize_recover.
5560 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
5563 * c-common.c (registered_builtin_types): Make non-static.
5564 * c-common.h (registered_builtin_types): Declare.
5566 2014-04-14 Richard Biener <rguenther@suse.de>
5567 Marc Glisse <marc.glisse@inria.fr>
5570 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5571 apply may-alias the scalar pointer type when applicable.
5573 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5576 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5577 as possible argument for Cilk_spawn.
5579 2014-04-11 Tobias Burnus <burnus@net-b.de>
5582 * c.opt (Wformat-signedness): Add
5583 * c-format.c(check_format_types): Use it.
5585 2014-04-11 Jason Merrill <jason@redhat.com>
5588 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5589 default_conversion for an array argument.
5591 2014-04-08 Marek Polacek <polacek@redhat.com>
5594 * c-ubsan.c: Include asan.h.
5595 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5597 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5599 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5601 2014-04-02 Marek Polacek <polacek@redhat.com>
5603 * c-common.h (c_expand_expr): Remove declaration.
5605 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5608 * c-common.c (add_atomic_size_parameter): When creating new
5609 params vector, push the size argument first.
5611 2014-03-26 Jakub Jelinek <jakub@redhat.com>
5613 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5614 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5615 ubsan_create_data callers.
5617 2014-03-22 Jakub Jelinek <jakub@redhat.com>
5620 * c-opts.c (c_finish_options): Restore cb_file_change call to
5623 2014-03-13 Jakub Jelinek <jakub@redhat.com>
5626 * c-pragma.c (apply_pragma_weak): Only look at
5627 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5628 DECL_ASSEMBLER_NAME_SET_P (decl).
5629 (maybe_apply_pending_pragma_weaks): Exit early if
5630 vec_safe_is_empty (pending_weaks) rather than only when
5632 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5633 set assembler name back to NULL afterwards.
5635 2014-03-11 Jason Merrill <jason@redhat.com>
5637 * c.opt: Add -std=gnu++14.
5639 2014-03-11 Ian Bolton <ian.bolton@arm.com>
5641 * c-opts.c (c_common_post_options): Don't override
5642 -ffp-contract=fast if unsafe-math-optimizations is on.
5644 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
5646 * c.opt: Enable LTO FE for fshort-double.
5648 2014-03-07 Jason Merrill <jason@redhat.com>
5650 * c.opt: Add -std=c++14.
5652 2014-03-06 Marek Polacek <polacek@redhat.com>
5655 * cilk.c (contains_cilk_spawn_stmt): New function.
5656 (contains_cilk_spawn_stmt_walker): Likewise.
5657 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5658 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5660 2014-03-03 Jakub Jelinek <jakub@redhat.com>
5662 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5663 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5664 even when flag_preprocess_only.
5666 2014-02-26 Jason Merrill <jason@redhat.com>
5670 * c-common.c (shorten_compare): Don't check
5671 c_inhibit_evaluation_warnings.
5673 2014-02-19 Jakub Jelinek <jakub@redhat.com>
5676 * c-common.c (c_common_nodes_and_builtins): When initializing
5677 c_uint{16,32,64}_type_node, also set corresponding
5678 uint{16,32,64}_type_node to the same value.
5681 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5682 for PRAGMA_IVDEP if flag_preprocess_only.
5684 2014-02-12 Jakub Jelinek <jakub@redhat.com>
5687 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5688 if false, add ADD itself, rather than vice versa.
5689 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5690 copy. For SAVE_EXPR, only call merge_tlist once.
5692 2014-02-08 Jakub Jelinek <jakub@redhat.com>
5695 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5697 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5699 (c_common_attribute_table): Add alloc_align and assume_aligned
5702 2014-02-06 Marek Polacek <polacek@redhat.com>
5705 * c-common.c (warn_for_sign_compare): Call warning_at with location
5708 2014-02-05 Marek Polacek <polacek@redhat.com>
5711 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5714 2014-02-04 Marek Polacek <polacek@redhat.com>
5717 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5720 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
5724 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5725 handle_vector_size_attribute, handle_nonnull_attribute): Call
5726 default_conversion on the attribute argument.
5727 (handle_nonnull_attribute): Increment the argument number.
5729 2014-01-31 Marek Polacek <polacek@redhat.com>
5732 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5733 build_function_call_vec.
5734 (resolve_overloaded_builtin): Likewise.
5735 * c-common.h (build_function_call_vec): Adjust declaration.
5737 2014-01-30 Marek Polacek <polacek@redhat.com>
5740 * c-common.h (unsafe_conversion_p): Adjust declaration.
5741 (warnings_for_convert_and_check): Likewise.
5742 (convert_and_check): Likewise.
5743 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5744 expansion_point_location_if_in_system_header on it.
5745 (warnings_for_convert_and_check): Add location parameter. Call
5746 expansion_point_location_if_in_system_header on it. Use it.
5747 (convert_and_check): Add location parameter. Use it.
5748 (conversion_warning): Likewise.
5749 (c_add_case_label): Adjust convert_and_check calls.
5750 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5752 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5754 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5756 * c-pragma.c (init_pragma): Likewise.
5759 2014-01-23 Marek Polacek <polacek@redhat.com>
5762 * c-common.c (shorten_compare): Add location_t parameter.
5763 * c-common.h (shorten_binary_op): Adjust declaration.
5765 2014-01-23 Marek Polacek <polacek@redhat.com>
5768 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5769 * c-common.h: Declare it.
5771 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5773 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5774 * c-ada-spec.c (dump_ads): Likewise.
5775 (cpp_check): Likewise.
5776 (dump_ada_specs): Likewise.
5778 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
5781 * c-common.c (handle_no_instrument_function_attribute): Allow
5782 no_instrument_function attribute in class member
5783 definition/declaration.
5785 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5788 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5789 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5790 being COMPOUND_EXPR.
5791 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5792 operand a SAVE_EXPR and second MODIFY_EXPR.
5794 2014-01-09 Jakub Jelinek <jakub@redhat.com>
5797 * c-pch.c (c_common_write_pch): Call
5798 prepare_target_option_nodes_for_pch.
5800 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5802 Update copyright years
5804 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5806 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5807 the copyright notice.
5809 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5811 * c-ada-spec.c (print_constructor): New function.
5812 (print_destructor): Retrieve the origin of the destructor.
5813 (print_ada_declaration): Revamp handling of constructors/destructors.
5815 2013-12-23 Stuart Hastings <stuart@apple.com>
5816 Bill Maddox <maddox@google.com>
5817 Jason Merrill <jason@redhat.com>
5819 * c.opt: Add -fdeclone-ctor-dtor.
5820 * c-opts.c (c_common_post_options): Default to on iff -Os.
5822 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5824 * c-common.c (c_common_attribute_table): Added "cilk simd function"
5826 * c-pragma.h (enum pragma_cilk_clause): Remove.
5827 (enum pragma_omp_clause): Added the following fields:
5828 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
5829 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
5830 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
5831 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
5832 PRAGMA_CILK_CLAUSE_UNIFORM.
5835 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5837 * cilk.c (cilk_outline): Made this function non-static.
5838 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
5839 (create_cilk_wrapper): Added a new parameter: a function pointer.
5840 (c_install_body_w_frame_cleanup): Remove
5841 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
5842 * c-common.h (cilk_outline): New prototype.
5843 (gimplify_cilk_spawn): Removed two parameters.
5844 (cilk_install_body_with_frame_cleanup): New prototype.
5845 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
5846 CILK_SPAWN_STMT case.
5848 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
5850 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
5852 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
5853 (int_array_type_node): Remove.
5854 * c-common.c (c_common_nodes_and_builtins): Don't build it.
5856 2013-12-05 Marek Polacek <polacek@redhat.com>
5859 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
5860 [ADJUST_FIELD_ALIGN].
5862 2013-12-04 Joseph Myers <joseph@codesourcery.com>
5865 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
5866 and check field alignment if set.
5867 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
5868 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
5870 2013-12-04 Jakub Jelinek <jakub@redhat.com>
5871 Marek Polacek <polacek@redhat.com>
5873 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
5874 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
5876 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
5879 * cilk.c (gimplify_cilk_spawn): Properly handle function without
5882 2013-11-29 Jakub Jelinek <jakub@redhat.com>
5885 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
5886 goto invalid. If it is error_mark_node, don't issue further
5889 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
5891 * c.opt (Wopenmp-simd): New.
5893 2013-11-22 Jakub Jelinek <jakub@redhat.com>
5895 * c-ubsan.h (ubsan_instrument_return): New prototype.
5896 * c-ubsan.c (ubsan_instrument_return): New function.
5898 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
5900 * c-common.c: Add required include files from gimple.h.
5901 * c-gimplify.c: Likewise
5904 2013-11-22 David Malcolm <dmalcolm@redhat.com>
5906 * c-common.c (unsafe_conversion_p): Remove use of
5907 EXPR_LOC_OR_HERE macro.
5908 (conversion_warning): Likewise.
5909 (warnings_for_convert_and_check): Likewise.
5910 (warn_for_collisions_1): Likewise.
5911 (shorten_compare): Likewise, and remove use of in_system_header
5912 macro, using the location from the former.
5913 * c-lex.c (dump_one_header): Remove use of input_filename macro.
5914 (cb_def_pragma): Remove use of in_system_header macro.
5915 (lex_string): Likewise.
5916 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
5918 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5919 Mike Stump <mikestump@comcast.net>
5920 Richard Sandiford <rdsandiford@googlemail.com>
5922 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
5923 instead of TREE_INT_CST_LOW, in cases where there is a protecting
5924 tree_fits_shwi_p or tree_fits_uhwi_p.
5925 (dump_generic_ada_node): Likewise.
5926 * c-format.c (check_format_arg): Likewise.
5927 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5929 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5931 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
5933 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
5936 * c-common.c (unsafe_conversion_p): Make this function
5937 return an enumeration with more detail.
5938 (conversion_warning): Use the new return type of
5939 unsafe_conversion_p to separately warn either about conversions
5940 that lower floating point number precision or about the other
5941 kinds of conversions.
5942 * c-common.h (enum conversion_safety): New enumeration.
5943 (unsafe_conversion_p): switching return type to
5944 conversion_safety enumeration.
5945 * c.opt: Adding new warning -Wfloat-conversion and
5946 enabling it with -Wconversion.
5948 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
5950 * c-opts.c: Include plugin.h.
5951 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
5953 2013-11-19 Marek Polacek <polacek@redhat.com>
5955 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
5957 (ubsan_instrument_shift): Likewise.
5958 (ubsan_instrument_vla): Likewise.
5960 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5962 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
5963 cast to unsigned type.
5965 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5967 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
5969 (complete_array_type): Update comment to refer to tree_to_[su]hwi
5970 rather than tree_low_cst.
5972 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5974 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
5975 tree_to_uhwi throughout.
5977 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5979 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
5980 tree_low_cst (..., 0) with tree_to_shwi throughout.
5982 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5984 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
5985 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
5987 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5989 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
5990 host_integerp (..., 0) with tree_fits_shwi_p throughout.
5992 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
5994 * c-cilkplus.c: New file.
5995 * c-common.c (readonly_error): Add location argument.
5996 * c-common.h (readonly_error): Same.
5997 (c_finish_cilk_clauses): Protoize.
5998 (c_check_cilk_loop): Same.
5999 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6000 Do not fail on error_mark_node.
6001 Abstract increment canonicalization to here...
6002 (c_omp_for_incr_canonicalize_ptr): New.
6003 c-pragma.c (init_pragma): Register "simd" pragma.
6004 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6005 (enum pragma_cilk_clause): New.
6007 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6009 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6010 wchar_type and host_integerp checks.
6012 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6014 * c-common.c: Likewise.
6015 * c-gimplify.c: Likewise.
6018 2013-11-14 Diego Novillo <dnovillo@google.com>
6020 * c-common.c: Include fold-const.h.
6021 Include stor-layout.h.
6023 Include stringpool.h.
6026 Include trans-mem.h.
6027 * c-cppbuiltin.c: Include stor-layout.h.
6028 Include stringpool.h.
6029 * c-format.c: Include stringpool.h.
6030 * c-lex.c: Include stringpool.h.
6031 Include stor-layout.h.
6032 * c-pragma.c: Include stringpool.h.
6035 Include gcc-symtab.h.
6036 * c-pretty-print.c: Include stor-layout.h.
6038 * cilk.c: Include stringpool.h.
6041 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6043 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6044 * c-common.c (c_common_reswords): Add __auto_type.
6045 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6047 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6049 * c-common.c: Include gimplify.h.
6050 * c-gimplify.c: Likewise.
6052 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6053 * c-ubsan.c: Don't include gimple.h.
6055 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6057 * c-common.c (c_common_reswords): Add _Thread_local.
6059 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6061 * c-common.c (atomic_size_supported_p): New function.
6062 (resolve_overloaded_atomic_exchange)
6063 (resolve_overloaded_atomic_compare_exchange)
6064 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6065 Use it instead of comparing size with a local list of sizes.
6067 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6068 Joseph Myers <joseph@codesourcery.com>
6070 * c-common.h (enum rid): Add RID_ATOMIC.
6071 * c-common.c (c_common_reswords): Add _Atomic.
6072 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6073 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6074 * c-format.c (check_format_types): Check for extra _Atomic
6075 qualifiers in format argument.
6076 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6077 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6079 2013-11-06 Tobias Burnus <burnus@net-b.de>
6081 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6083 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6085 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6087 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6088 to mean lack of IEEE 754 support.
6090 2013-11-05 Tobias Burnus <burnus@net-b.de>
6092 * c.opt (-Wdate-time): New option
6093 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6095 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6097 * c-cppbuiltin.c (cpp_iec_559_value): Test
6098 flag_excess_precision_cmdline not flag_excess_precision.
6100 2013-11-05 Tobias Burnus <burnus@net-b.de>
6102 * c.opt (fopenmp-simd): New option.
6103 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6104 (omp_pragmas): ... this new struct.
6105 (c_pp_lookup_pragma): Also walk omp_pragmas.
6106 (init_pragma): Init pragmas for -fopenmp-simd.
6108 2013-11-04 Marek Polacek <polacek@redhat.com>
6111 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6113 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6115 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6117 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6119 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6121 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6122 (dump_ada_specs): Adjust prototype of second callback.
6123 * c-ada-spec.c (cpp_check): New global variable.
6124 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6125 (print_generic_ada_decl): Likewise.
6126 (has_static_fields): Change return type to bool and add guard.
6127 (has_nontrivial_methods): New predicate.
6128 (is_tagged_type): Change return type to bool.
6129 (separate_class_package): Call has_nontrivial_methods.
6130 (pp_ada_tree_identifier): Minor tweaks.
6131 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6132 (dump_ada_array_domains): Likewise.
6133 (dump_ada_array_type): Likewise.
6134 (dump_template_types): Remove cpp_check parameter and do not pass it to
6135 dump_generic_ada_node.
6136 (dump_ada_template): Likewise.
6137 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6139 (print_ada_methods): Change return type to integer. Remove cpp_check
6140 parameter and do not pass it down.
6141 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6142 dump_generic_ada_node.
6143 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6145 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6146 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6147 value of print_ada_methods.
6148 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6149 Set cpp_check to it before invoking dump_ada_nodes.
6150 (dump_ada_specs): Likewise.
6152 2013-11-03 Marek Polacek <polacek@redhat.com>
6154 * c-ubsan.c: Don't include hash-table.h.
6155 (ubsan_instrument_vla): New function.
6156 * c-ubsan.h: Declare it.
6158 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6160 Automated part of renaming of symtab_node_base to symtab_node.
6162 Patch autogenerated by rename_symtab.py from
6163 https://github.com/davidmalcolm/gcc-refactoring-scripts
6164 revision 58bb219cc090b2f4516a9297d868c245495ee622
6166 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6167 symtab_node_base to symtab_node.
6169 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6171 Implement C++14 digit separators.
6172 * c-lex.c (interpret_float): Remove digit separators from scratch string
6173 before building real literal.
6175 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6177 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6179 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6181 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6183 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6185 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6186 (insert_cilk_frame): New prototype.
6187 (cilk_init_builtins): Likewise.
6188 (gimplify_cilk_spawn): Likewise.
6189 (c_cilk_install_body_w_frame_cleanup): Likewise.
6190 (cilk_detect_spawn_and_unwrap): Likewise.
6191 (cilk_set_spawn_marker): Likewise.
6192 (build_cilk_sync): Likewise.
6193 (build_cilk_spawn): Likewise.
6196 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6198 Patch autogenerated by refactor_symtab.py from
6199 https://github.com/davidmalcolm/gcc-refactoring-scripts
6200 revision 58bb219cc090b2f4516a9297d868c245495ee622
6202 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6203 to a true class hierarchy.
6204 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6206 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6208 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6210 2013-10-26 Jeff Law <law@redhat.com>
6212 * c-common.c (c_define_builtins): Remove mudflap support.
6213 * c.opt: Ignore and warn for mudflap options.
6215 2013-10-24 Tobias Burnus <burnus@net-b.de>
6218 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6219 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6221 2013-10-23 Jason Merrill <jason@redhat.com>
6223 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6225 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6227 * c-common.h (omp_clause_mask::operator !=): New method.
6228 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6229 instead of if (mask & something) tests everywhere.
6231 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6232 201307 instead of 201107.
6233 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6234 (c_common_attribute_table): Add "omp declare target" and
6235 "omp declare simd" attributes.
6236 (handle_omp_declare_target_attribute,
6237 handle_omp_declare_simd_attribute): New functions.
6238 * c-omp.c: Include c-pragma.h.
6239 (c_finish_omp_taskgroup): New function.
6240 (c_finish_omp_atomic): Add swapped argument, if true,
6241 build the operation first with rhs, lhs arguments and use NOP_EXPR
6243 (c_finish_omp_for): Add code argument, pass it down to make_code.
6244 (c_omp_split_clauses): New function.
6245 (c_split_parallel_clauses): Removed.
6246 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6247 c_omp_declare_simd_clauses_to_decls): New functions.
6248 * c-common.h (omp_clause_mask): New type.
6249 (OMP_CLAUSE_MASK_1): Define.
6250 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6251 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6252 omp_clause_mask::operator |, omp_clause_mask::operator &,
6253 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6254 omp_clause_mask::operator ==): New methods.
6255 (enum c_omp_clause_split): New.
6256 (c_finish_omp_taskgroup): New prototype.
6257 (c_finish_omp_atomic): Add swapped argument.
6258 (c_finish_omp_for): Add code argument.
6259 (c_omp_split_clauses): New prototype.
6260 (c_split_parallel_clauses): Removed.
6261 (c_omp_declare_simd_clauses_to_numbers,
6262 c_omp_declare_simd_clauses_to_decls): New prototypes.
6263 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6264 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6265 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6266 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6267 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6268 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6269 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6270 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6271 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6272 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6273 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6274 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6275 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6276 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6277 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6278 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6279 PRAGMA_OMP_CLAUSE_UNIFORM.
6281 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6283 PR tree-optimization/20318
6284 * c-common.c (handle_returns_nonnull_attribute): New function.
6285 (c_common_attribute_table): Add returns_nonnull.
6287 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6290 * c.opt (fcheck-new): Move to common.opt.
6292 2013-09-25 Marek Polacek <polacek@redhat.com>
6293 Jakub Jelinek <jakub@redhat.com>
6296 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6297 an expression if we can prove it is correct.
6298 (ubsan_instrument_division): Likewise. Remove unnecessary
6301 2013-09-18 Marek Polacek <polacek@redhat.com>
6304 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6306 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6308 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6311 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6312 fobjc-gc, freplace-objc-classes): Accept for LTO.
6314 2013-09-13 Jacek Caban <jacek@codeweavers.com>
6316 * c-target.def: New hook
6318 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6321 * c.opt (Wdelete-incomplete): Add.
6323 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6325 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6326 (vector_types_compatible_elements_p): New function.
6327 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6329 (vector_types_compatible_elements_p): Declare.
6331 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6333 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6334 a virtual member function.
6335 (pp_simple_type_specifier): Remove.
6336 (pp_c_type_specifier): Likewise.
6337 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6338 Rename from pp_c_type_specifier. Adjust.
6339 (c_pretty_printer::c_pretty_printer): Do not assign to
6340 simple_type_specifier.
6342 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6344 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6346 (c_pretty_printer::storage_class_specifier): Likewise.
6347 (c_pretty_printer::initializer): Likewise.
6348 (pp_declaration): Remove.
6349 (pp_declaration_specifiers): Likewise.
6350 (pp_abstract_declarator): Likewise.
6351 (pp_declarator): Likewise.
6352 (pp_type_id): Likewise.
6353 (pp_statement): Likewise.
6354 (pp_constant): Likewise.
6355 (pp_id_expression): Likewise.
6356 (pp_primary_expression): Likewise.
6357 (pp_unary_expression): Likewise.
6358 (pp_multiplicative_expression): Likewise.
6359 (pp_conditional_expression): Likewise.
6360 (pp_assignment_expression): Likewise.
6361 (pp_expression): Likewise.
6362 (pp_c_type_id): Likewise.
6363 (pp_c_storage_class_specifier): Likewise.
6364 * c-pretty-print.c (pp_c_type_cast): Tidy.
6365 (pp_c_pointer): Likewise.
6366 (pp_c_type_specifier): Likewise.
6367 (pp_c_parameter_type_list): Likewise.
6368 (pp_c_function_definition): Likewise.
6369 (pp_c_init_declarator): Likewise.
6370 (pp_c_initializer_list): Likewise.
6371 (pp_c_constructor_elts): Likewise.
6372 (c_pretty_printer::direct_abstract_declarator): Likewise.
6373 (c_pretty_printer::declaration_specifiers): Likewise.
6374 (c_pretty_printer::primary_expression): Likewise.
6375 (c_pretty_printer::postfix_expression): Likewise.
6376 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6377 (c_pretty_printer::storage_class_specifier): Rename from
6378 pp_c_storage_class_specifier.
6379 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6380 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6381 storage_class_specifier, initializer, offset_list, flags.
6383 2013-08-30 Marek Polacek <polacek@redhat.com>
6385 * c-ubsan.c: New file.
6386 * c-ubsan.h: New file.
6388 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6390 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6392 (c_pretty_printer::declaration_specifiers): Likewise.
6393 (c_pretty_printer::declarator): Likewise.
6394 (c_pretty_printer::abstract_declarator): Likewise.
6395 (c_pretty_printer::direct_abstract_declarator): Likewise.
6396 (c_pretty_printer::direct_declarator): Likewise.
6397 (c_pretty_printer::function_specifier): Likewise.
6398 (pp_declaration): Adjust.
6399 (pp_declaration_specifiers): Likewise.
6400 (pp_abstract_declarator): Likewise.
6401 (pp_direct_declarator): Likewise.
6402 (pp_function_specifier): Likewise.
6403 (pp_direct_abstract_declarator): Remove as unused.
6404 (pp_c_declaration): Remove.
6405 (pp_c_declaration_specifiers): Likewise.
6406 (pp_c_declarator): Likewise.
6407 (pp_c_direct_declarator): Likewise.
6408 (pp_c_function_specifier): Likewise.
6409 (pp_c_direct_abstract_declarator): Likewise.
6410 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6411 from pp_c_abstract_declarator. Adjust.
6412 (c_pretty_printer::direct_abstract_declarator): Rename from
6413 pp_c_direct_abstract_declarator. Adjust.
6414 (c_pretty_printer::function_specifier): Rename from
6415 pp_c_function_specifier. Adjust.
6416 (c_pretty_printer::declaration_specifiers): Rename from
6417 pp_c_declaration_specifiers. Adjust.
6418 (c_pretty_printer::direct_declarator): Rename from
6419 pp_c_direct_declarator. Adjust.
6420 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6421 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6422 (c_pretty_printer::c_pretty_printer): Do not assign to
6423 declaration, declaration_specifiers, declarator,
6424 direct_declarator, direct_abstract_declarator, function_specifier.
6426 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6428 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6429 virtual member function.
6430 (c_pretty_printer::multiplicative_expression): Likewise.
6431 (c_pretty_printer::conditional_expression): Likewise.
6432 (c_pretty_printer::assignment_expression): Likewise.
6433 (c_pretty_printer::expression): Likewise.
6434 (pp_unary_expression): Adjust.
6435 (pp_multiplicative_expression): Likewise.
6436 (pp_assignment_expression): Likewise.
6437 (pp_conditional_expression): Likewise.
6438 (pp_expression): Likewise.
6439 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6440 from pp_c_unary_expression. Adjust.
6441 (c_pretty_printer::multiplicative_expression): Rename from
6442 pp_c_multiplicative_expression. Adjust.
6443 (c_pretty_printer::conditional_expression): Rename from
6444 pp_c_conditional_expression. Adjust.
6445 (c_pretty_printer::assignment_expression): Rename from
6446 pp_c_assignment_expression. Adjust.
6447 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6448 (c_pretty_printer::c_pretty_printer): Do not assign to
6449 unary_expression, multiplicative_expression,
6450 conditional_expression, expression.
6452 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6454 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6455 virtual member function.
6456 (pp_postfix_expression): Adjust.
6457 (pp_c_postfix_expression): Remove.
6458 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6459 from pp_c_postfix_expression. Adjust.
6460 (c_pretty_printer::c_pretty_printer): Do not assign to
6463 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6465 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6466 virtua member function.
6467 (pp_primary_expression): Adjust.
6468 (pp_c_primary_expression): Remove.
6469 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6470 from pp_c_primary_expression. Adjust.
6471 (pp_c_initializer_list): Use pp_primary_expression.
6472 (c_pretty_printer::c_pretty_printer): Do not assign to
6475 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6477 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6478 * c-pretty-print.c (M_): Remove.
6479 (c_pretty_printer::translate_string): Define.
6480 (pp_c_type_specifier): Use it.
6481 (pp_c_primary_expression): Likewise.
6482 (pp_c_expression): Likewise.
6484 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6486 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6488 (pp_c_id_expression): Remove.
6489 (pp_id_expression): Adjust.
6490 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6491 pp_c_id_expression. Adjust.
6492 (pp_c_postfix_expression): Use pp_id_expression.
6493 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6495 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6497 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6499 (pp_constant): Adjust.
6500 (pp_c_constant): Remove.
6501 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6502 pp_c_constant. Adjust.
6504 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6505 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6507 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6509 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6510 (c_pretty_printer::c_pretty_printer): Declare.
6511 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6512 c_pretty_printer_init. Adjust.
6513 (print_c_tree): Do not call c_pretty_printer_init.
6514 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6516 2013-08-09 Arnaud Charlet <charlet@adacore.com>
6518 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6520 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6523 * c-common.c (pointer_int_sum): Add bool parameter.
6524 * c-common.h (pointer_int_sum): Adjust declaration.
6526 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6528 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6529 c_pretty_printer variable.
6531 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6533 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6535 (pp_c_base): Likewise. Adjust users.
6536 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6537 (pp_c_whitespace): Do not call pp_base.
6538 (pp_c_left_paren): Likewise.
6539 (pp_c_right_paren): Likewise.
6540 (pp_c_left_brace): Likewise.
6541 (pp_c_right_brace): Likewise.
6542 (pp_c_left_bracket): Likewise.
6543 (pp_c_right_bracket): Likewise.
6544 (pp_c_dot): Likewise.
6545 (pp_c_ampersand): Likewise.
6546 (pp_c_star): Likewise.
6547 (pp_c_arrow): Likewise.
6548 (pp_c_semicolon): Likewise.
6549 (pp_c_complement): Likewise.
6550 (pp_c_exclamation): Likewise.
6551 (pp_c_direct_declarator): Likewise.
6552 (pp_c_ws_string): Likewise.
6553 (pp_c_identifier): Likewise.
6554 (pp_c_statement): Likewise.
6555 (print_c_tree): Likewise.
6557 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6560 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6561 provide useful error strings.
6563 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6565 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6566 printer functions instead of pp_string or operators and punctuators.
6567 (dump_generic_ada_node): Likewise.
6568 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6569 (pp_c_relational_expression): Likewise.
6570 (pp_c_logical_or_expression): Likewise.
6572 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6574 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6575 functions instead of pp_character.
6576 (pp_ada_tree_identifier): Likewise.
6577 (dump_ada_double_name): Likewise.
6578 (dump_ada_function_declaration): Likewise.
6579 (dump_ada_array_domains): Likewise.
6580 (dump_template_types): Likewise.
6581 (dump_generic_ada_node): Likewise.
6582 (print_ada_declaration): Likewise.
6583 (print_ada_struct_decl): Likewise.
6584 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6586 2013-07-23 Tom Tromey <tromey@redhat.com>
6588 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6589 * c-common.c (c_common_reswords): Add _Generic.
6591 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
6593 * c-common.c: Fix typos.
6594 * c-common.h: Likewise.
6596 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
6599 * c-common.c (c_common_attribute_table): Add warn_unused.
6600 (handle_warn_unused_attribute): New.
6602 2013-07-10 Jakub Jelinek <jakub@redhat.com>
6604 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6605 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6607 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6610 * c.opt: Add Wconditionally-supported.
6612 2013-07-08 Graham Stott <graham.stott@btinternet.com>
6614 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6615 unused variables l_length and l_node.
6617 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6620 * c-common.c (complete_array_type): Delay folding first index
6621 like other indices. When folding, check for index overflow.
6623 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
6626 * c-common.h (c_build_vec_perm_expr): New complain argument.
6627 * c-common.c (c_build_vec_perm_expr): Likewise.
6628 Use save_expr also in C++.
6630 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6632 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6633 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6634 * c-opts.c (c_common_post_options): Likewise.
6636 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6638 * array-notation-common.c (length_mismatch_in_expr): Changed the
6639 parameter type's from a dynamic array to a vec_tree. Also removed
6640 the size parameters.
6641 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6644 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6646 * c-common.h (struct cilkplus_an_parts): New structure.
6647 (struct cilkplus_an_loop_parts): Likewise.
6648 (cilkplus_extract_an_triplets): New prototype.
6649 (fix_sec_implicit_args): Likewise.
6650 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6651 (fix_sec_implicit_args): Likewise.
6653 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6655 * array-notation-common.c (find_inv_trees): Removed an unwanted
6657 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6658 enum rid to enum tree_code.
6660 2013-06-11 Jan Hubicka <jh@suse.cz>
6662 * c-common.c (handle_alias_ifunc_attribute): Do not set
6663 DECL_EXTERNAL for weakref variables.
6664 * c-pragma.c (handle_pragma_weak): Make sure aliases
6665 are not declared as external.
6667 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6669 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6670 function from c/c-array-notation.c.
6671 (is_cilkplus_reduce_builtin): Likewise.
6672 (find_rank): Likewise.
6673 (extract_array_notation_exprs): Likewise.
6674 (replace_array_notations): Likewise.
6675 (find_inv_trees): Likewise.
6676 (replace_inv_trees): Likewise.
6677 (contains_array_notation_expr): Likewise.
6678 (find_correct_array_notation_type): Likewise.
6679 * c-common.h (struct inv_list): Moved this struct from the file
6680 c/c-array-notation.c and added a new field called additional tcodes.
6681 (length_mismatch_in_expr_p): New prototype.
6682 (is_cilkplus_reduce_builtin): Likewise.
6683 (find_rank): Likewise.
6684 (extract_array_notation_exprs): Likewise.
6685 (replace_array_notation): Likewise.
6686 (find_inv_trees): Likewise.
6687 (replace_inv_trees): Likewise.
6688 (find_correct_array_notation_type): Likewise.
6690 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6692 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6693 function array_notation_init_builtins is called.
6694 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6695 * c-common.def (ARRAY_NOTATION_REF): New tree.
6696 * c-common.h (build_array_notation_expr): New function declaration.
6697 (build_array_notation_ref): Likewise.
6698 (extract_sec_implicit_index_arg): New extern declaration.
6699 (is_sec_implicit_index_fn): Likewise.
6700 (ARRAY_NOTATION_CHECK): New define.
6701 (ARRAY_NOTATION_ARRAY): Likewise.
6702 (ARRAY_NOTATION_START): Likewise.
6703 (ARRAY_NOTATION_LENGTH): Likewise.
6704 (ARRAY_NOTATION_STRIDE): Likewise.
6705 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6707 (pp_c_expression): Likewise.
6708 * c.opt (flag_enable_cilkplus): New flag.
6709 * array-notation-common.c: New file.
6711 2013-05-14 Jakub Jelinek <jakub@redhat.com>
6714 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6716 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
6718 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6721 2013-05-07 Han Shen <shenhan@google.com>
6723 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6725 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6727 * c-common.c (check_user_alignment): Emit error for negative values.
6729 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6731 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6733 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6735 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6736 __GXX_EXPERIMENTAL_CXX1Y__.
6738 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6739 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6741 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6742 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6743 to simply use OPT_Wpointer_arith.
6744 (c_sizeof_or_alignof_type): Likewise.
6746 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6748 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6750 2013-04-12 Jakub Jelinek <jakub@redhat.com>
6752 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6753 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6756 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6758 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6760 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6762 * c-common.c (pointer_int_sum): Remove dead code.
6764 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6767 * c-common.c (handle_optimize_attribute): Don't call
6768 save_optabs_if_changed.
6770 2013-03-05 Jakub Jelinek <jakub@redhat.com>
6773 * c-pch.c (pch_init): Free target_validity at the end.
6775 2013-03-04 Jakub Jelinek <jakub@redhat.com>
6777 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6779 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6780 Jakub Jelinek <jakub@redhat.com>
6783 * c-common.c (handle_no_sanitize_address_attribute): New function.
6784 (c_common_attribute_table): Add no_sanitize_address attribute.
6785 (handle_no_address_safety_analysis_attribute): Add
6786 no_sanitize_address attribute, not no_address_safety_analysis
6789 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
6792 * c-common.c (handle_optimize_attribute): Call
6793 save_optabs_if_changed.
6795 2013-02-18 Jakub Jelinek <jakub@redhat.com>
6796 Steven Bosscher <steven@gcc.gnu.org>
6799 * c-opts.c (c_common_post_options): If debug info is enabled
6800 and non-dwarf*, refuse to load PCH files and when writing PCH
6803 2013-02-05 Jakub Jelinek <jakub@redhat.com>
6806 * c-common.c (handle_error_attribute): Fix condition.
6808 2013-01-30 Jakub Jelinek <jakub@redhat.com>
6811 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6813 2013-01-18 Jason Merrill <jason@redhat.com>
6816 * c.opt (-fextern-tls-init): New.
6817 * c-opts.c (c_common_post_options): Handle it.
6819 2013-01-09 Jakub Jelinek <jakub@redhat.com>
6822 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
6823 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
6824 and is either negative or bigger or equal to type precision
6825 of the first operand.
6827 2012-12-03 Marek Polacek <polacek@redhat.com>
6830 * c-common.c (check_user_alignment): Swap order of tests,
6831 check TREE_CODE first.
6833 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
6836 * c-common.h (overflow_type): New enum.
6837 (build_userdef_literal): Add overflow_type argument.
6838 (tree_userdef_literal): Add overflow_type.
6839 (USERDEF_LITERAL_OVERFLOW): New access macro.
6840 * c-common.c (build_userdef_literal): Add overflow_type
6842 * c-lex.c (c_lex_with_flags): Add overflow_type to
6843 build_userdef_literal calls.
6844 (interpret_integer, interpret_float): Add overflow_type argument.
6846 2012-11-28 Richard Biener <rguenther@suse.de>
6849 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6850 here and use a type with proper overflow behavior for types that would
6851 need to be promoted for the arithmetic.
6853 2012-11-23 Jakub Jelinek <jakub@redhat.com>
6856 * c-common.c (handle_no_address_safety_analysis_attribute): New
6858 (c_common_attribute_table): Add no_address_safety_analysis.
6860 2012-11-16 Simon Baldwin <simonb@google.com>
6862 * c.opt: Add f[no-]canonical-system-headers.
6863 * c-opts.c (c_common_handle_option): Handle
6864 OPT_fcanonical_system_headers.
6866 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
6869 * c-opts.c (c_common_handle_option): Set new flags.
6870 * c.opt: Describe new flags.
6872 2012-11-09 Jason Merrill <jason@redhat.com>
6874 * c.opt (Wabi-tag): New.
6876 2012-11-09 Andi Kleen <ak@linux.intel.com>
6879 * c-common.c (get_atomic_generic_size): Mask with
6882 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6885 * c.opt (Wformat): Make it Alias Wformat=1.
6886 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
6887 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
6889 (Wformat=): RejectNegative. Use LangEnabledBy.
6890 (Wnonnull): Use LangEnabledBy.
6891 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
6892 * c-format.c (set_Wformat): Delete.
6893 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
6894 (maybe_read_dollar_number): Likewise.
6895 (avoid_dollar_number): Likewise.
6896 (finish_dollar_format_checking): Likewise.
6897 (check_format_info): Likewise.
6898 (check_format_info_main): Likewise.
6899 (check_format_types): Likewise.
6900 (format_type_warning): Likewise.
6901 * c-common.c (int): Likewise.
6902 (check_function_sentinel): Likewise.
6903 * c-common.h (warn_format,set_Wformat): Do not declare here.
6905 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6908 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
6909 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
6911 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
6913 (Wvariadic-macros): Init(1).
6914 * c-opts.c (c_common_handle_option): Do not handle them
6916 (c_common_post_options): Likewise.
6917 (sanitize_cpp_opts): warn_unused_macros is now
6918 cpp_warn_unused_macros.
6919 (push_command_line_include): Likewise.
6920 * c-common.c (warn_unknown_pragmas): Do not define.
6921 * c-common.h (warn_unknown_pragmas): Do not declare.
6923 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6926 * c-common.c (conversion_warning): Handle conditional expressions.
6928 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6931 * c.opt (Wreturn_local_addr): Define new option.
6933 2012-10-25 Jason Merrill <jason@redhat.com>
6935 * c.opt (Wvirtual-move-assign): New.
6937 * c.opt (Winherited-variadic-ctor): New.
6939 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
6942 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
6944 2012-10-23 Joseph Myers <joseph@codesourcery.com>
6946 * c-common.h (pch_cpp_save_state): Declare.
6947 * c-target.def (c_preinclude): New hook.
6948 * c-opts.c (done_preinclude): New.
6949 (push_command_line_include): Handle default preincluded header.
6950 (cb_file_change): Call pch_cpp_save_state when calling
6951 push_command_line_include.
6952 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
6953 (pch_cpp_save_state): New.
6954 (pch_init): Call pch_cpp_save_state conditionally, instead of
6955 calling cpp_save_state.
6957 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6961 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
6962 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
6963 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
6964 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
6965 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
6966 * c-opts.c (c_common_handle_option): Remove explicit handling from
6968 (c_common_post_options): Likewise.
6970 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
6972 * c-ada-spec.c (LOCATION_COL): Delete.
6973 (compare_location): New function.
6974 (compare_node): Use it.
6975 (compare_comment): Likewise.
6977 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6981 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
6982 * c-opts.c (c_common_handle_option): Do not set them here. Add
6984 (c_common_post_options): Likewise.
6986 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
6988 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
6989 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
6990 Remove POINTER_TYPE handling, add large unsigned handling and use
6991 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
6993 2012-10-12 Jakub Jelinek <jakub@redhat.com>
6996 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
6997 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
6998 locs and array of 3 trees instead of just single loc and single
6999 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7000 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7001 For *cmp* builtins that take two sources strings report warnings
7002 about first and second source, not about destination and source.
7004 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7007 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7009 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7011 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7012 declaring something coming from another file.
7014 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7017 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7019 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7022 * c-common.c (warn_about_parentheses): Add location_t parameter;
7023 use EXPR_LOC_OR_LOC.
7024 * c-common.h: Update declaration.
7026 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7029 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7030 more operations. Make error messages optional.
7031 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7032 (scalar_to_vector): Declare.
7034 2012-10-08 Jason Merrill <jason@redhat.com>
7036 * c-common.c (c_common_reswords): Add thread_local.
7038 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7040 PR c++/53528 C++11 attribute support
7041 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7043 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7045 (handle_aligned_attribute): In choose strictest alignment
7046 among many. Use new check_cxx_fundamental_alignment_constraints.
7047 (handle_transparent_union_attribute): In c++11 attribute syntax,
7048 don't look through typedefs.
7050 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7052 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7053 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7056 2012-09-25 Dehao Chen <dehao@google.com>
7059 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7060 map when read in the pch.
7062 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7064 * c-ada-spec.c: Style fixes.
7066 2012-09-18 Thomas Quinot <quinot@adacore.com>
7068 * c.opt (-fada-spec-parent): Define new command line switch.
7069 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7070 is specified, generate binding spec as a child of the specified unit.
7072 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7073 Manuel López-Ibáñez <manu@gcc.gnu.org>
7076 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7078 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7080 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7081 for pointers, and add missing Convention C pragma.
7082 (print_ada_struct_decl): Add missing aliased keyword.
7083 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7085 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7087 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7088 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7089 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7090 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7091 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7093 2012-08-10 Richard Guenther <rguenther@suse.de>
7095 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7097 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7099 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7100 instead of separate pp_newline and pp_flush.
7101 (print_c_tree): Likewise.
7103 2012-07-26 Richard Henderson <rth@redhat.com>
7105 * c-common.c (handle_hot_attribute): Allow labels.
7106 (handle_cold_attribute): Likewise.
7108 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7111 * c-common.c (check_function_nonnull): Handle multiple nonnull
7112 attributes properly.
7114 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7116 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7117 * c-ada-spec.c: Likewise.
7118 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7120 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7122 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7123 Remove code conditional on it.
7125 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7127 * c-gimplify.c: Do not include basic-block.h.
7128 * c-common.c: Do not include linfuncs.h.
7130 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7132 * c-common.h: Include tree.h.
7134 2012-07-02 Jason Merrill <jason@redhat.com>
7137 * c-common.c (get_priority): Call default_conversion.
7139 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7141 * c-pch.c (c_common_write_pch): Remove unused variables.
7143 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7145 * cppspec.c: Moved from gcc/ to here.
7147 2012-06-27 Kai Tietz <ktietz@redhat.com>
7149 PR preprocessor/37215
7150 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7152 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7154 * c-common.h (c_common_print_pch_checksum): Remove.
7155 * c-pch.c: Do not include output.h.
7156 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7157 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7158 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7159 (struct c_pch_header): Remove.
7160 (get_ident): Update gpch version.
7161 (pch_init): Do not print executable_checksum to asm_out_file.
7162 Do not fail if there is no asm_out_file to read back from. Set
7163 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7164 (c_common_write_pch): Verify that nothing was written to asm_out_file
7165 since pch_init was called. Do not write a c_pch_header, and do not
7166 copy from asm_out_file to the PCH.
7167 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7168 the content of asm_out_file from the PCH.
7169 (c_common_print_pch_checksum): Remove.
7170 * c-opts.c (c_common_init): Print out executable_checksum directly.
7172 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7174 * c-target.def (objc_declare_unresolved_class_reference,
7175 objc_declare_class_definition): Add new hooks.
7177 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7179 * c-lex.c: Do not include output.h.
7180 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7181 Remove uses of ASM_OUTPUT_IDENT.
7183 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7186 * c-common.h (c_build_vec_perm_expr): Move decl here.
7187 * c-common.c (c_build_vec_perm_expr): Move definition
7190 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7192 * c.opt (fconserve-space): Turn into a no-op.
7194 2012-06-04 Sterling Augustine <saugustine@google.com>
7196 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7197 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7198 both the start and end of the function.
7200 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7202 * c-common.c: Do not include output.h.
7203 * c-pragma.c: Likewise.
7205 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7207 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7208 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7209 (lang_decl_name): Handle namespace decls.
7211 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7213 * c-ada-spec.c: Do not include output.h.
7214 * c-semantics.c: Likewise.
7216 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7218 * c-common.c: Fix typo.
7220 2012-05-29 Michael Matz <matz@suse.de>
7222 * c-common.h (c_expand_decl): Remove prototype.
7224 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7226 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7227 * c-opts.c (c_common_handle_option): Remove code handling
7228 warn_missing_braces.
7230 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7233 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7236 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7239 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7241 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7243 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7244 * c-opts.c (c_common_handle_option): Do not handle explicitly
7245 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7247 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7249 PR preprocessor/7263
7250 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7251 to cpp_classify_number. For diagnostics, use the precise location
7252 instead of the global input_location.
7254 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7257 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7259 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7261 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7263 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7266 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7267 Wreorder): Use LangEnabledBy.
7268 * c-opts.c (c_common_handle_option): Do not enable them
7269 explicitly. Call lang-specific generated functions.
7270 (c_common_post_options): Do not set them here.
7272 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7274 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7275 Wmissing-field-initializers,Wmissing-parameter-type,
7276 Wold-style-declaration,Woverride-init): Use EnabledBy.
7277 * c-opts.c (c_common_post_options): Do not set here explicitly.
7279 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7282 * c-opts.c (c_common_handle_option): Use handle_generated_option
7283 to enable sub-options.
7285 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7288 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7290 2012-05-10 Richard Guenther <rguenther@suse.de>
7292 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7293 adjust commentary about TYPE_IS_SIZETYPE types.
7295 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7298 * c-common.c (warn_logical_operator): Check that argument of
7299 integer_zerop is not NULL.
7301 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7304 * c-common.c (warn_logical_operator): Do not warn if either side
7305 is already true or false.
7307 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7310 * c-common.c (expr_original_type): New.
7311 (shorten_compare): Do not warn for enumeration types.
7313 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7315 * c.opt (fpermissive): Add Var(flag_permissive).
7317 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
7320 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7321 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7323 2012-04-30 Dodji Seketeli <dodji@redhat.com>
7325 Add -Wvarargs option
7326 * c.opt (Wvarargs): Define new option.
7328 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7330 * c-common.c (check_function_arguments): Replace
7331 Wmissing-format-attribute with Wsuggest-attribute=format.
7333 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7335 * c.opt (Wsuggest-attribute=format): New. Alias of
7336 Wmissing-format-attribute.
7337 * c-format.c (decode_format_type): Replace
7338 Wmissing-format-attribute with Wsuggest-attribute=format.
7339 (check_function_format): Likewise.
7341 2012-04-27 Ollie Wild <aaw@google.com>
7343 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7344 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7345 * c.opt: Add Wliteral-suffix.
7347 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7350 * c.opt (Wpedantic): New.
7351 (pedantic): Alias Wpedantic.
7352 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7353 (c_common_post_options): Likewise.
7354 (sanitize_cpp_opts): Likewise.
7355 * c-lex.c (interpret_float): Likewise.
7356 * c-format.c (check_format_types): Likewise.
7357 * c-common.c (pointer_int_sum): Likewise.
7358 (c_sizeof_or_alignof_type): Likewise.
7359 (c_add_case_label): Likewise.
7360 (c_do_switch_warnings): Likewise.
7361 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7363 2012-04-15 Jason Merrill <jason@redhat.com>
7366 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7367 (C_STD_NAME): Distinguish between C++98 and C++11.
7369 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7372 * c-common.h (uint16_type_node): Rename into...
7373 (c_uint16_type_node): ...this.
7374 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7375 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7377 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7379 * c-common.c (warn_if_unused_value): Move definition to here.
7380 * c-common.h (warn_if_unused_value): Move declaration to here.
7382 2012-03-23 William Bader <williambader@hotmail.com>
7384 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7386 2012-03-20 Jason Merrill <jason@redhat.com>
7388 * c-common.h (enum cxx_dialect): Add cxx1y.
7389 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7391 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7392 * c-opts.c (c_common_post_options): Likewise.
7393 (set_std_cxx1y): New.
7394 (c_common_handle_option): Call it.
7395 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7397 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7400 * c.opt ([Wuseless-cast]): Add.
7402 2012-03-16 Richard Guenther <rguenther@suse.de>
7404 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7406 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7409 * c.opt (ftemplate-backtrace-limit) Add.
7411 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7413 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7415 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7416 (init_pragma): Don't register extern_prefix.
7418 2012-03-12 Richard Guenther <rguenther@suse.de>
7420 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7421 (builtin_type_for_size): Likewise.
7423 2012-02-13 Jakub Jelinek <jakub@redhat.com>
7426 * c-common.c (sync_resolve_params): Don't decide whether to convert
7427 or not based on TYPE_SIZE comparison, convert whenever arg_type
7428 is unsigned INTEGER_TYPE.
7430 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7433 * c.opt ([Wunused-local-typedefs]): Fix description.
7435 2012-01-24 Mike Stump <mikestump@comcast.net>
7437 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7440 2012-01-18 Richard Guenther <rguenther@suse.de>
7442 * c-opts.c (c_common_post_options): Reset LTO flags if
7443 we are about to generate a PCH.
7445 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7448 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7449 use pp_unsigned_wide_integer.
7451 2012-01-10 Richard Guenther <rguenther@suse.de>
7454 * c-opts.c (c_common_handle_option): Move -Werror handling
7455 to language independent code.
7457 2012-01-05 Richard Guenther <rguenther@suse.de>
7460 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7463 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7466 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7467 of array types with an unknown bound.
7469 2011-12-20 Joseph Myers <joseph@codesourcery.com>
7471 * c-common.c (flag_isoc99): Update comment to refer to C11.
7472 (flag_isoc1x): Change to flag_isoc11.
7473 * c-common.h (flag_isoc99): Update comment to refer to C11.
7474 (flag_isoc1x): Change to flag_isoc11.
7475 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7477 * c-opts.c (set_std_c1x): Change to set_std_c11.
7478 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7480 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7481 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7482 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7484 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7485 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7486 (std=gnu1x): Make alias of std=gnu11.
7488 2011-12-19 Jason Merrill <jason@redhat.com>
7491 * c-common.c (handle_transparent_union_attribute): Check the first
7492 field if the type is complete.
7494 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7497 * c-common.c (RID_IS_FINAL): Add.
7498 * c-common.h (RID_IS_FINAL): Add.
7500 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7502 * c.opt (fgnu-runtime): Provide full description.
7503 (fnext-runtime): Likewise.
7504 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7506 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
7508 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7509 predefines in one place. Add LOCK_FREE predefines.
7510 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7513 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
7516 * c-common.c (get_atomic_generic_size): Check for various error
7518 (resolve_overloaded_atomic_exchange,
7519 resolve_overloaded_atomic_compare_exchange,
7520 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7521 error_mark_node for error conditions.
7523 2011-11-08 Richard Guenther <rguenther@suse.de>
7528 2011-11-07 Richard Henderson <rth@redhat.com>
7529 Aldy Hernandez <aldyh@redhat.com>
7530 Torvald Riegel <triegel@redhat.com>
7532 Merged from transactional-memory.
7534 * c-common.c (handle_tm_wrap_attribute,
7535 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7536 (struct c_common_reswords): Added __transaction* keywords.
7537 (struct c_common_attribute_table): Added transaction* and tm_regparm
7539 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7541 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7542 find_tm_attribute): Declare.
7544 2011-11-07 Jason Merrill <jason@redhat.com>
7547 * c-common.c, c-common.h: Revert yesterday's changes.
7549 2011-11-06 Jason Merrill <jason@redhat.com>
7552 * c-common.c (decl_has_visibility_attr): Split out from...
7553 (c_determine_visibility): ...here.
7554 * c-common.h: Declare it.
7556 2011-11-06 Joseph Myers <joseph@codesourcery.com>
7558 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7559 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7561 (check_user_alignment): New. Split out of
7562 handle_aligned_attribute. Disallow integer constants with
7563 noninteger types. Conditionally allow zero.
7564 (handle_aligned_attribute): Use check_user_alignment.
7565 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7567 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
7568 Richard Henderson <rth@redhat.com>
7570 Merged from cxx-mem-model.
7572 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
7573 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
7574 parameters that are the same type size.
7575 (get_atomic_generic_size): New. Find size of generic
7576 atomic function parameters and do typechecking.
7577 (add_atomic_size_parameter): New. Insert size into parameter list.
7578 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7579 either __atomic_exchange_n or external library call.
7580 (resolve_overloaded_atomic_compare_exchange): Restructure
7581 __atomic_compare_exchange to either _n variant or external library call.
7582 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
7583 __atomic_load_n or an external library call.
7584 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7585 __atomic_store_n or an external library call.
7586 (resolve_overloaded_builtin): Handle new __atomic builtins.
7588 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7591 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7592 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7593 <INDIRECT_REF>: Return the argument.
7594 <ARRAY_REF>: Remove special code for negative offset.
7595 Call fold_build_pointer_plus instead of size_binop.
7596 (fold_offsetof): Remove STOP_REF argument and adjust.
7597 * c-common.h (fold_offsetof_1): Declare.
7598 (fold_offsetof): Remove STOP_REF argument.
7600 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7603 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7604 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7605 Wnarrowing for C++0x and C++98.
7606 * c.opt ([Wnarrowing]): Update.
7608 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7611 * c.opt: Add Wzero-as-null-pointer-constant.
7613 2011-10-31 Jason Merrill <jason@redhat.com>
7615 * c.opt (-fdeduce-init-list): Off by default.
7618 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7619 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7621 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7623 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7626 * c.opt (fvisibility-inlines-hidden): Description change.
7628 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7630 Implement C++11 user-defined literals.
7631 * c-common.c (build_userdef_literal): New.
7632 * c-common.def: New tree code.
7633 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7634 * c-lex.c (interpret_float): Add suffix parm.
7635 (c_lex_with_flags): Build literal tokens.
7637 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7641 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7644 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7645 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7646 Wnarrowing for C++0x and C++98.
7647 * c.opt ([Wnarrowing]): Update.
7649 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7652 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7653 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7654 Wnarrowing for C++0x and C++98.
7655 * c.opt ([Wnarrowing]): Update.
7657 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7660 * c-common.c (conversion_warning): Remove code looking for
7661 artificial operands.
7663 2011-10-18 Dodji Seketeli <dodji@redhat.com>
7666 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
7667 !NO_IMPLICIT_EXTERN_C.
7669 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
7671 * c-common.c (c_common_reswords): Add __bases,
7673 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7675 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7678 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7680 2011-10-15 Tom Tromey <tromey@redhat.com>
7681 Dodji Seketeli <dodji@redhat.com>
7683 * c.opt (fdebug-cpp): New option.
7684 * c-opts.c (c_common_handle_option): Handle the option.
7685 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7686 output stream in parameter. Factorized from ...
7687 (maybe_print_line): ... this. Dump location debug information when
7688 -fdebug-cpp is in effect.
7689 (print_line_1): New static function. Takes an output stream in
7690 parameter. Factorized from ...
7691 (print_line): ... here. Dump location information when -fdebug-cpp
7693 (scan_translation_unit): Dump location information when
7694 -fdebug-cpp is in effect.
7696 2011-10-15 Tom Tromey <tromey@redhat.com>
7697 Dodji Seketeli <dodji@redhat.com>
7699 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7701 * c-opts.c (c_common_handle_option)<case
7702 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7703 cases. Handle -ftrack-macro-expansion with and without argument.
7705 2011-10-15 Tom Tromey <tromey@redhat.com>
7706 Dodji Seketeli <dodji@redhat.com>
7708 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7709 (print_line, cb_define, do_line_change): Adjust to avoid touching
7710 the internals of struct line_map. Use the public API instead.
7711 * c-pch.c (c_common_read_pch): Likewise.
7712 * c-lex.c (fe_file_change): Likewise.
7714 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7717 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7719 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7722 * c-pretty-print.c (pp_c_floating_constant): Output
7723 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7725 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7727 * c-common.c (def_builtin_1): Delete old interface with two
7728 parallel arrays to hold standard builtin declarations, and replace
7729 it with a function based interface that can support creating
7730 builtins on the fly in the future. Change all uses, and poison
7731 the old names. Make sure 0 is not a legitimate builtin index.
7732 * c-omp.c (c_finish_omp_barrier): Ditto.
7733 (c_finish_omp_taskwait): Ditto.
7734 (c_finish_omp_flush): Ditto.
7736 2011-10-11 Tristan Gingold <gingold@adacore.com>
7738 * c.opt: (fallow-parameterless-variadic-functions): New.
7740 2011-09-08 Dodji Seketeli <dodji@redhat.com>
7742 PR c++/33255 - Support -Wunused-local-typedefs warning
7743 * c-common.h (struct c_language_function::local_typedefs): New
7745 (record_locally_defined_typedef, maybe_record_typedef_use)
7746 (maybe_warn_unused_local_typedefs): Declare new functions.
7747 * c-common.c (record_locally_defined_typedef)
7748 (maybe_record_typedef_use)
7749 (maybe_warn_unused_local_typedefs): Define new functions.
7750 * c.opt: Declare new -Wunused-local-typedefs flag.
7752 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7755 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7758 2011-09-05 Richard Guenther <rguenther@suse.de>
7760 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7761 of integer_minus_one_node for empty array upper bounds.
7763 2011-08-28 Dodji Seketeli <dodji@redhat.com>
7765 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7766 it's the first time it's being called on this main TU.
7768 2011-08-24 Richard Guenther <rguenther@suse.de>
7771 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7773 2011-08-22 Gabriel Charette <gchare@google.com>
7775 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7776 defined in cpp_init_builtins and c_cpp_builtins.
7778 2011-08-19 Joseph Myers <joseph@codesourcery.com>
7780 * c-common.c (c_common_reswords): Add __builtin_complex.
7781 * c-common.h (RID_BUILTIN_COMPLEX): New.
7783 2011-08-18 Joseph Myers <joseph@codesourcery.com>
7785 * c-common.c (c_common_reswords): Add _Noreturn.
7786 (keyword_is_function_specifier): Handle RID_NORETURN.
7787 * c-common.h (RID_NORETURN): New.
7789 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7791 * c-common.c (unsafe_conversion_p): New function. Check if it is
7792 unsafe to convert an expression to the type.
7793 (conversion_warning): Adjust, use unsafe_conversion_p.
7794 * c-common.h (unsafe_conversion_p): New function declaration.
7796 2011-08-02 Jakub Jelinek <jakub@redhat.com>
7798 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7799 (c_finish_omp_taskyield): New prototype.
7800 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7801 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7802 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7803 or RHS1 have side-effects, evaluate those too in the right spot,
7804 if it is a decl and LHS is also a decl, error out if they
7806 (c_finish_omp_taskyield): New function.
7807 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7808 * c-pragma.c (omp_pragmas): Add taskyield.
7809 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7810 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7811 PRAGMA_OMP_CLAUSE_MERGEABLE.
7813 2011-07-25 Dodji Seketeli <dodji@redhat.com>
7815 * c-common.h (set_underlying_type): Remove parm name from
7818 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
7820 * c-pretty-print.h: Search c-common.h in c-family.
7822 2011-07-22 Jason Merrill <jason@redhat.com>
7825 * c.opt (Wnarrowing): New.
7828 * c-common.h: Declare c_linkage_bindings.
7829 * c-pragma.c (handle_pragma_redefine_extname): Use it.
7832 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
7833 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
7834 as flag_isoc99 for 'restrict'.
7835 (pp_c_specifier_qualifier_list): Likewise for _Complex.
7837 2011-07-21 Ian Lance Taylor <iant@google.com>
7840 * c-common.c (c_disable_warnings): New static function.
7841 (c_enable_warnings): New static function.
7842 (c_fully_fold_internal): Change local unused_p to bool. Call
7843 c_disable_warnings and c_enable_warnings rather than change
7844 c_inhibit_evaluation_warnings.
7846 2011-07-20 Jason Merrill <jason@redhat.com>
7848 PR c++/6709 (DR 743)
7849 PR c++/42603 (DR 950)
7850 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
7851 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
7852 (CPP_DECLTYPE): New.
7853 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
7855 2011-07-19 Richard Guenther <rguenther@suse.de>
7857 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
7858 * c-omp.c (c_finish_omp_for): Likewise.
7860 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
7862 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
7863 body on the next line.
7865 2011-07-08 Jason Merrill <jason@redhat.com>
7868 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
7871 * c-common.c (c_apply_type_quals_to_decl): Don't check
7872 TYPE_NEEDS_CONSTRUCTING.
7874 2011-07-06 Richard Guenther <rguenther@suse.de>
7876 * c-common.c (c_common_nodes_and_builtins):
7877 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
7879 2011-07-05 Richard Guenther <rguenther@suse.de>
7881 * c-common.c (c_common_nodes_and_builtins): Build all common
7884 2011-06-27 Jakub Jelinek <jakub@redhat.com>
7886 * c-common.h (c_tree_chain_next): New static inline function.
7888 * c-common.c (check_builtin_function_arguments): Handle
7889 BUILT_IN_ASSUME_ALIGNED.
7891 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
7893 * c-common.c: Add sync_ or SYNC__ to builtin names.
7894 * c-omp.c: Add sync_ or SYNC__ to builtin names.
7896 2011-06-20 Pierre Vittet <piervit@pvittet.com>
7898 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
7900 (gen_pragma_handler): New union.
7901 (internal_pragma_handler): New type.
7902 (c_register_pragma_with_data)
7903 (c_register_pragma_with_expansion_and_data): New functions.
7905 * c-pragma.c (registered_pragmas, c_register_pragma_1)
7906 (c_register_pragma, c_register_pragma_with_expansion)
7907 (c_invoke_pragma_handler): Changed to work with
7908 internal_pragma_handler.
7909 (c_register_pragma_with_data)
7910 (c_register_pragma_with_expansion_and_data): New functions.
7912 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7914 * c-common.c: Include common/common-target.h.
7915 (handle_section_attribute): Use
7916 targetm_common.have_named_sections.
7917 * c-cppbuiltin.c: Include common/common-target.h.
7918 (c_cpp_builtins): Use targetm_common.except_unwind_info.
7920 2011-06-10 Richard Guenther <rguenther@suse.de>
7922 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
7923 to print a IDENTIFIER_NODE.
7925 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7926 Joseph Myers <joseph@codesourcery.com>
7928 * c.opt (fbuilding-libgcc): New option.
7929 * c-cppbuiltin.c (c_cpp_builtins): Define
7930 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
7932 2011-06-07 Jason Merrill <jason@redhat.com>
7934 * c-common.c (max_tinst_depth): Lower default to 900.
7936 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
7938 2011-06-07 Richard Guenther <rguenther@suse.de>
7940 * c-common.c (c_common_nodes_and_builtins): Do not set
7941 size_type_node or call set_sizetype.
7943 2011-06-07 Dodji Seketeli <dodji@redhat.com>
7946 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
7947 type when using pointer comparison to compare types.
7949 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
7951 * c.opt: Add -Wdelete-non-virtual-dtor.
7952 * c-opts.c (c_common_handle_option): Include it in -Wall.
7954 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
7959 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7961 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7964 2011-05-27 Jakub Jelinek <jakub@redhat.com>
7967 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
7968 C++ don't call c_common_truthvalue_conversion on void type arms.
7970 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
7972 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
7973 (stmt_list_stack): Define.
7974 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
7975 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
7977 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7979 * c-common.c (warning_candidate_p): Check for BLOCKs.
7981 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7983 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7986 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7988 * c-common.c (def_fn_type): Remove extra va_end.
7990 2011-05-23 Jason Merrill <jason@redhat.com>
7993 * c-common.c (c_common_get_narrower): New.
7994 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
7996 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
7998 * c-common.h (check_function_arguments): Tweak prototype of
7999 check_function_arguments.
8000 * c-common.c (check_function_arguments): Likewise. Adjust
8001 calls to check_function_nonnull, check_function_format, and
8002 check_function_sentinel.
8003 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8004 separate attributes and typelist arguments. Use
8005 FOREACH_FUNCTION_ARGS to iterate over argument types.
8007 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8009 * c-common.c (c_common_reswords): Reorder.
8010 * c-common.h (rid): Likewise.
8012 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8014 * c-common.c (def_fn_type): Don't call build_function_type, call
8015 build_function_type_array or build_varargs_function_type_array
8017 (c_common_nodes_and_builtins): Likewise.
8019 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8021 * c-common.c (c_add_case_label): Omit the loc argument to
8023 * c-common.h (build_case_label): Remove.
8024 * c-semantics.c (build_case_label): Remove.
8026 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8028 * c-objc.h (objc_start_method_definition): Update prototype.
8029 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8031 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8033 * c-common.c (check_main_parameter_types): Reindent. Don't use
8034 TYPE_ARG_TYPES directly.
8035 (handle_nonnull_attribute): Likewise.
8036 (sync_resolve_params): Likewise.
8037 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8038 to check_format_string.
8039 (handle_format_attribute): Likewise.
8040 (check_format_string): Take a function type to examine instead of
8041 a type list. Use a function_arg_iterator to step through argument
8044 2011-05-04 Richard Guenther <rguenther@suse.de>
8046 * c-common.c (fix_string_type): Use size_int for index type bounds.
8047 (start_fname_decls): Do not pass NULL to build_int_cst.
8048 (c_init_attributes): Likewise.
8049 * c-lex.c (c_lex_with_flags): Likewise.
8051 2011-04-27 Jason Merrill <jason@redhat.com>
8053 * c-common.c (make_tree_vector_from_list): New.
8054 * c-common.h: Declare it.
8056 2011-04-26 Richard Guenther <rguenther@suse.de>
8058 PR preprocessor/48248
8059 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8060 for output size with -P.
8062 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8064 * c-common.c (struct c_common_resword): Add __underlying_type.
8065 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8067 2011-04-20 Jim Meyering <meyering@redhat.com>
8069 * c-format.c (init_dollar_format_checking): Remove useless
8072 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8074 * c-objc.h (objc_get_interface_ivars): Removed.
8075 (objc_detect_field_duplicates): New.
8076 * stub-objc.c: Likewise.
8078 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8080 * stub-objc.c (objc_declare_protocols): Renamed to
8081 objc_declare_protocol.
8082 * c-objc.h: Likewise.
8084 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8086 * stub-objc.c (objc_declare_class): Updated argument name.
8088 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8090 * c-common.h (c_common_init_ts): Declare.
8091 * c-common.c (c_common_init_ts): Define.
8093 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8095 * c-objc.h (objc_build_message_expr): Updated prototype.
8096 * stub-objc.c (objc_build_message_expr): Likewise.
8098 2011-04-12 Martin Jambor <mjambor@suse.cz>
8100 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8103 2011-04-11 Richard Guenther <rguenther@suse.de>
8105 * c-common.c (complete_array_type): Build a range type of
8108 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8110 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8111 (handle_type_generic_attribute): Likewise.
8113 2011-04-07 Jason Merrill <jason@redhat.com>
8116 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8117 conversion from C++0x scoped enum.
8119 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8121 * c-target-def.h: New file.
8122 * c-target.def: New file.
8123 * c-target.h: New file.
8124 * c-common.c (targetcm): Don't define here.
8125 * c-common.h (default_handle_c_option): Declare.
8126 * c-format.c: Include c-target.h instead of target.h.
8127 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8129 (default_handle_c_option): Move from targhooks.c.
8131 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8133 PR preprocessor/48248
8134 * c-ppoutput.c (print): Add src_file field.
8135 (init_pp_output): Initialize it.
8136 (maybe_print_line): Don't optimize by adding up to 8 newlines
8137 if map->to_file and print.src_file are different file.
8138 (print_line): Update print.src_file.
8140 2011-03-25 Kai Tietz <ktietz@redhat.com>
8142 * c-ada-spec.c (compare_comment): Use filename_cmp
8143 instead of strcmp for filename.
8145 2011-03-25 Jeff Law <law@redhat.com>
8147 * c-common.c (def_fn_type): Add missing va_end.
8149 2011-03-25 Jason Merrill <jason@redhat.com>
8151 * c.opt: Add -std=c++03.
8153 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8155 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8157 2011-03-17 Kai Tietz <ktietz@redhat.com>
8160 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8161 Display allowed attributes for function pointer types.
8162 (pp_c_attributes_display): New function to display
8163 attributes having affects_type_identity flag set to true.
8164 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8166 * c-common.c (c_common_attribute_table):
8168 (c_common_format_attribute_table): Likewise.
8170 2011-03-18 Jason Merrill <jason@redhat.com>
8172 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8173 * c-common.h: Don't declare it here.
8174 * c-common.c: Or define it here.
8175 * c-opts.c (c_common_handle_option): Or set it here.
8178 * c-common.c (handle_transparent_union_attribute): Don't
8179 make a duplicate type in C++.
8181 2011-03-15 Jason Merrill <jason@redhat.com>
8183 * c-common.c (max_constexpr_depth): New.
8184 * c-common.h: Declare it.
8185 * c-opts.c (c_common_handle_option): Set it.
8186 * c.opt (fconstexpr-depth): New option.
8188 2011-03-11 Jason Merrill <jason@redhat.com>
8190 * c-common.c (attribute_takes_identifier_p): Add missing const.
8193 * c-common.c (attribute_takes_identifier_p): Assume that an
8194 unknown attribute takes an identifier.
8196 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8199 * c-common.c (c_type_hash): Call list_length instead of iterating
8200 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8202 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8205 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8207 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8209 * c.opt (fobjc-abi-version=) New.
8210 (fobjc-nilcheck): New.
8212 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8215 * c-common.h (keyword_is_decl_specifier): Declare.
8216 * c-common.c (keyword_is_decl_specifier): Define.
8217 (keyword_is_function_specifier): New function.
8219 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8222 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8223 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8226 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8228 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8230 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8233 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8234 after init_c_lex if pch_file is set.
8236 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8239 * c.opt (-fkeep-inline-dllexport): New switch.
8241 2011-01-12 Richard Guenther <rguenther@suse.de>
8244 * c-common.c (handle_weak_attribute): Warn instead of error
8245 on declaring an inline function weak.
8247 2011-01-05 Tom Tromey <tromey@redhat.com>
8249 * c-common.h (lvalue_error): Update.
8250 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8253 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8256 * c-objc.h (objc_finish_message_expr): Added argument to
8259 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8261 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8264 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8266 * c-objc.h (objc_maybe_warn_exceptions): New.
8267 * stub-objc.c (objc_maybe_warn_exceptions): New.
8269 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8271 * c-common.h (readonly_error): Declare.
8272 * c-common.c (readonly_error): Define.
8274 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8276 * c-common.h (invalid_indirection_error): Declare.
8277 * c-common.c (invalid_indirection_error): Define.
8279 2010-12-03 Richard Guenther <rguenther@suse.de>
8282 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8283 (pp_c_unary_expression): Likewise.
8284 (pp_c_expression): Likewise.
8286 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8288 * c-common.h (objc_finish_function): New.
8289 (objc_non_volatilized_type): Removed.
8290 (objc_type_quals_match): Removed.
8291 * stub-objc.c (objc_finish_function): New.
8292 (objc_non_volatilized_type): Removed.
8293 (objc_type_quals_match): Removed.
8295 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8297 * c-common.h (parse_optimize_options): Declare.
8298 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8299 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8301 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8303 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8305 * c-pch.c (O_BINARY): Don't define here.
8306 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8308 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8310 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8311 targetm.except_unwind_info.
8313 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8315 * c-opts.c (c_common_handle_option): Pass location to
8316 set_struct_debug_option.
8318 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8320 * c-common.c (visibility_options): Move from ../opts.c.
8321 * c-common.h (struct visibility_flags, visibility_options):
8323 * c-opts.c (finish_options): Rename to c_finish_options.
8324 (c_common_init): Update call to finish_options.
8326 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8329 * c-lex.c (lex_string): Check that each string in an Objective-C
8330 string concat sequence starts with either one or zero '@', and
8331 that there are no spurious '@' signs at the end.
8333 2010-11-20 Joseph Myers <joseph@codesourcery.com>
8335 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8336 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8337 HANDLE_PRAGMA_VISIBILITY.
8338 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8339 HANDLE_PRAGMA_VISIBILITY): Don't define.
8340 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8342 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8347 * c-common.h (keyword_begins_type_specifier): Declare.
8348 (keyword_is_storage_class_specifier): Declare.
8349 (keyword_is_type_qualifier): Declare.
8350 * c-common.c (keyword_begins_type_specifier): New function.
8351 (keyword_is_storage_class_specifier): New function.
8352 (keyword_is_type_qualifier): Declare.
8354 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8357 * c-common.c (in_late_binary_op): Define.
8358 (c_common_truthvalue_conversion): Check in_late_binary_op before
8359 calling c_save_expr.
8360 * c-common.h (in_late_binary_op): Declare.
8362 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8364 * c-opts.c (c_common_handle_option): Update calls to
8365 set_struct_debug_option.
8367 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8369 * c-common.h (objc_declare_protocols): Added additional argument.
8370 * stub-objc.c (objc_declare_protocol): Same change.
8372 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8375 * c-common.h (build_real_imag_expr): Declare.
8376 * c-semantics.c (build_real_imag_expr): Define.
8378 2010-11-17 Joseph Myers <joseph@codesourcery.com>
8380 * c-opts.c (c_common_parse_file): Take no arguments.
8381 * c-common.h (c_common_parse_file): Update prototype.
8383 2010-11-16 Jakub Jelinek <jakub@redhat.com>
8386 * c-common.c (warning_candidate_p): Don't track non-const calls
8389 2010-11-15 Ian Lance Taylor <iant@google.com>
8391 * c-lex.c (init_c_lex): Set macro debug callbacks if
8392 flag_dump_go_spec is set.
8394 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8396 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8397 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8399 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8401 PR preprocessor/45038
8402 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8405 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8407 * c-common.h (c_family_lang_mask): Declare.
8408 * c-opts.c (c_family_lang_mask): Make extern.
8409 * c-pragma.c (handle_pragma_diagnostic): Use
8410 control_warning_option.
8412 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8414 * c-common.c (parse_optimize_options): Update call to
8416 * c-common.h (c_common_handle_option): Update prototype.
8417 * c-opts.c (c_common_handle_option): Take location_t parameter and
8418 pass it to other functions.
8420 2010-11-11 Joseph Myers <joseph@codesourcery.com>
8422 * c-opts.c (warning_as_error_callback): Remove.
8423 (c_common_initialize_diagnostics): Don't call
8424 register_warning_as_error_callback.
8425 (c_common_handle_option): Handle -Werror=normalized= here.
8427 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8429 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8431 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8433 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8434 Remove trailing '.' from diagnostics.
8435 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8437 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8439 * c-common.c (parse_optimize_options): Pass global_dc to
8441 * c-opts.c (c_common_handle_option): Pass &global_options to
8442 set_Wstrict_aliasing.
8443 * c.opt (v): Don't mark Common or document here.
8445 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8448 * c-format.c (format_type): New type gcc_objc_string_format_type.
8449 (valid_stringptr_type_p): New.
8450 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
8451 (check_format_string): Pass expected type, use
8452 valid_stringptr_type_p (), check that the format string types are
8453 consistent with the format specification.
8454 (decode_format_attr): Warn if NSString is used outside objective-c.
8455 (format_types_orig): Add NSString.
8457 (format_flags): New.
8458 (check_format_arg): Handle format strings requiring an external parser.
8459 first_target_format_type: New variable.
8460 (handle_format_attribute): Set up first_target_format_type, pass the
8461 expected format arg string type to check_format_string().
8462 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8463 * stub-objc.c (objc_string_ref_type_p): New.
8464 (objc_check_format_arg): New.
8466 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8468 Fixed using the Objective-C 2.0 dot-syntax with class names.
8469 * c-common.h (objc_build_class_component_ref): New.
8470 * stub-objc.c (objc_build_class_component_ref): New.
8472 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8474 * c.opt (Wproperty-assign-default): New option.
8476 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8478 Implemented -fobjc-std=objc1 flag.
8479 * c.opt (fobjc-std=objc1): New option.
8481 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8483 Implemented format and noreturn attributes for Objective-C methods.
8484 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8485 attribute for Objective-C methods.
8487 2010-10-31 Jason Merrill <jason@redhat.com>
8489 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8492 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8494 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8495 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8496 (objc_add_property_declaration): Removed arguments for copies and
8498 (objc_build_getter_call): Renamed to
8499 objc_maybe_build_component_ref.
8500 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8501 (objc_is_property_ref): New.
8502 * c-common.c (c_common_reswords): Removed copies and ivar.
8503 * stub-objc.c (objc_add_property_declaration): Removed arguments
8504 for copies and ivar.
8505 (objc_build_getter_call): Renamed to
8506 objc_maybe_build_component_ref.
8507 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8508 (objc_is_property_ref): New.
8510 2010-10-29 Arnaud Charlet <charlet@adacore.com>
8511 Matthew Gingell <gingell@adacore.com>
8513 * c-ada-spec.c (separate_class_package): New function.
8514 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8515 name of their enclosing package.
8516 (print_ada_declaration): Use separate_class_package.
8518 2010-10-27 Jason Merrill <jason@redhat.com>
8520 * c-common.c (c_common_reswords): Add __is_literal_type.
8521 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8523 * c-common.c (check_case_value): Remove special C++ code.
8525 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8527 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8528 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8530 (objc_add_property_declaration): Added additional arguments.
8531 (objc_property_attribute_kind): Removed.
8532 (objc_set_property_attr): Removed.
8533 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8535 * stub-objc.c (objc_add_property_declaration): Added additional
8537 (objc_set_property_attr): Removed.
8539 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8541 * c-common.h (objc_add_property_variable): Renamed to
8542 objc_add_property_declaration. Added location argument.
8543 * stub-objc.c (objc_add_property_variable): Same change.
8545 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8547 * c-common.h (objc_maybe_printable_name): New.
8548 * stub-objc.c (objc_maybe_printable_name): New.
8550 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8551 Andrew Pinski <pinskia@gmail.com>
8553 * c-common.h (c_common_mark_addressable_vec): Declare.
8554 * c-common.c (c_common_mark_addressable_vec): New function.
8556 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8558 * c-common.h (objc_set_method_type): Removed.
8559 (objc_add_method_declaration): Added boolean argument.
8560 (objc_start_method_definition): Same change.
8561 (objc_build_method_signature): Same change.
8562 * stub-objc.c (objc_set_method_type): Removed.
8563 (objc_add_method_declaration): Added boolean argument.
8564 (objc_start_method_definition): Same change.
8565 (objc_build_method_signature): Same change.
8567 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8569 * c-common.h (finish_file): Removed.
8570 (objc_write_global_declarations): New.
8571 * c-opts.c (c_common_parse_file): Do not call finish_file.
8572 * stub-objc.c (objc_write_global_declarations): New.
8574 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8576 Implemented parsing @synthesize and @dynamic for
8577 Objective-C/Objective-C++.
8578 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8579 (objc_add_synthesize_declaration): New.
8580 (objc_add_dynamic_declaration): New.
8581 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8582 * stub-objc.c (objc_add_synthesize_declaration): New.
8583 (objc_add_dynamic_declaration): New.
8585 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8588 * c-cppbuiltin.c (mode_has_fma): Move function here from
8589 builtins.c. Don't use the fma optab, instead just use the
8590 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8593 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8595 Merge from 'apple/trunk' branch on FSF servers.
8597 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
8600 * c-common.h (objc_non_volatilized_type): New declaration
8601 * stub-objc.c (objc_non_volatilized_type): New stub.
8603 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8605 Merge from 'apple/trunk' branch on FSF servers.
8607 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
8610 * c-common.h (objc_diagnose_private_ivar): New decl.
8611 * stub-objc.c (objc_diagnose_private_ivar): New stub.
8613 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8615 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8616 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8617 (objc_ivar_visibility_kind): New enum.
8618 (objc_set_visibility): Adjust prototype to use visibility enum.
8619 * stub-objc.c (objc_set_visibility): Adjust stub to use
8622 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8624 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8625 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8626 has the appropriate fma builtins.
8627 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8629 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8631 merge from FSF apple 'trunk' branch.
8632 2006 Fariborz Jahanian <fjahanian@apple.com>
8634 Radars 4436866, 4505126, 4506903, 4517826
8635 * c-common.c (c_common_resword): Define @property and its attributes.
8636 * c-common.h: Define property attribute enum entries.
8637 (OBJC_IS_PATTR_KEYWORD): New.
8638 (objc_property_attribute_kind): New enum.
8639 Declare objc_set_property_attr (), objc_add_property_variable (),
8640 objc_build_getter_call () and objc_build_setter_call ().
8641 * stub-objc.c (objc_set_property_attr): New stub.
8642 (objc_add_property_variable): Likewise.
8643 (objc_build_getter_call): Likewise.
8644 (objc_build_setter_call) Likewise.
8646 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8648 merge from FSF apple 'trunk' branch.
8649 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
8651 Radar 3803157 (method attributes)
8652 * c-common.c (handle_deprecated_attribute): Recognize
8653 objc methods as valid declarations.
8654 * c-common.h: Declare objc_method_decl ().
8655 * stub-objc.c (objc_method_decl): New stub.
8657 2010-10-08 Joseph Myers <joseph@codesourcery.com>
8659 * c-common.c (parse_optimize_options): Call
8660 decode_cmdline_options_to_array_default_mask before
8661 decode_options. Update arguments to decode_options.
8662 * c-common.h (c_common_init_options_struct): Declare.
8663 * c-opts.c (c_common_init_options_struct): New. Split out from
8664 c_common_init_options.
8666 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8668 Implemented fast enumeration for Objective-C.
8669 * c-common.h (objc_finish_foreach_loop): New.
8670 * stub-objc.c (objc_finish_foreach_loop): New.
8672 2010-10-05 Joseph Myers <joseph@codesourcery.com>
8674 * c-common.h (struct diagnostic_context): Don't declare here.
8675 (c_common_initialize_diagnostics): Declare using
8676 diagnostic_context typedef.
8677 * c-opts.c (c_common_handle_option): Pass global_dc to
8678 handle_generated_option.
8680 2010-10-04 Joseph Myers <joseph@codesourcery.com>
8682 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8683 handle_generated_option.
8685 2010-10-03 Ian Lance Taylor <iant@google.com>
8687 * c.opt (-fplan9-extensions): New option.
8689 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8691 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8693 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8694 of duplicating code.
8696 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8698 * c-common.c: Add two new entries for @optional
8699 and @required keywords.
8701 merge from FSF 'apple/trunk' branch.
8702 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
8705 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8706 objective-c keywords.
8707 (objc_set_method_opt): New declaration.
8708 * stub-objc.c (objc_set_method_opt): New stub.
8710 2010-09-30 Joseph Myers <joseph@codesourcery.com>
8712 * c-common.c (handle_optimize_attribute): Pass &global_options to
8713 cl_optimization_save and cl_optimization_restore.
8714 * c-opts.c (c_common_handle_option): Pass &global_options to
8715 handle_generated_option.
8716 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8717 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8718 &global_options to cl_optimization_restore.
8720 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8722 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8723 Objective-C/Objective-C++ keywords.
8725 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8727 Merge from 'apple/trunk' branch on FSF servers.
8729 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
8732 * c-common.h (objc_check_global_decl): New declaration.
8733 * stub-objc.c (objc_check_global_decl): New stub.
8735 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8737 * c.opt: Don't use VarExists.
8739 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8741 * c-common.c (c_cpp_error): Update names of diagnostic_context
8743 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8744 cl_optimization members.
8745 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8746 sanitize_cpp_opts, finish_options): Update names of cpp_options
8749 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8751 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8752 (objc_is_reserved_word): Removed.
8753 * c-common.c: Updated comments.
8754 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8755 objc_is_reserved_word.
8756 * stub-objc.c (objc_is_reserved_word): Removed.
8758 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8760 * c-common.h (objc_add_method_declaration): Adjust prototype to
8762 (objc_start_method_definition): Likewise.
8763 (objc_build_keyword_decl): Likewise.
8764 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8765 (objc_start_method_definition): Likewise.
8766 (objc_build_keyword_decl): Likewise.
8768 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8770 * c-common.h (objc_start_class_interface): Adjust prototype.
8771 (objc_start_category_interface): Likewise.
8772 (objc_start_protocol): Likewise.
8773 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8774 (objc_start_class_interface): Likewise.
8775 (objc_start_category_interface): Likewise.
8777 2010-09-27 Ian Lance Taylor <iant@google.com>
8779 * c-common.c (c_common_attribute_table): Add no_split_stack.
8780 (handle_no_split_stack_attribute): New static function.
8782 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8784 Merge from 'apple/trunk' branch on FSF servers.
8786 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
8789 * c-common.h (objc_have_common_type): New declaration.
8790 * stub-objc.c (objc_have_common_type): New stub.
8792 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8795 * c-common.h (objc_common_type): New prototype.
8796 * stub-objc.c (objc_common_type): New stub.
8798 2010-09-24 Jan Hubicka <jh@suse.cz>
8800 * c-common.c (handle_leaf_attribute): New function.
8801 (struct attribute_spec c_common_att): Add leaf.
8803 2010-09-22 Joseph Myers <joseph@codesourcery.com>
8805 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8806 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8807 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8808 -include-barrier, -include-directory, -include-directory=,
8809 -include-directory-after, -include-directory-after=,
8810 -include-prefix, -include-prefix=, -include-with-prefix,
8811 -include-with-prefix=, -include-with-prefix-after,
8812 -include-with-prefix-after=, -include-with-prefix-before,
8813 -include-with-prefix-before=, -no-integrated-cpp,
8814 -no-line-commands, -no-standard-includes, -no-warnings, -output,
8815 -output=, -pedantic, -pedantic-errors, -preprocess,
8816 -print-missing-file-dependencies, -trace-includes, -traditional,
8817 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8818 -user-dependencies, -verbose, -write-dependencies,
8819 -write-user-dependencies, no-integrated-cpp, traditional): New.
8821 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8824 * c-common.h (objc_start_method_definition): Return bool instead
8826 * stub-objc.c (objc_start_method_definition): Return bool instead
8829 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8832 * c-common.h (objc_get_interface_ivars): New declaration.
8833 * stub-objc.c (objc_get_interface_ivars): New stub.
8835 2010-09-15 Ian Lance Taylor <iant@google.com>
8837 * c-common.c (parse_optimize_options): Do not capitalize warning
8838 messages. Remove period at end of warning message.
8840 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8842 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
8843 (handle_alias_attribute): ... here.
8844 (handle_ifunc_attribute): New.
8846 2010-09-06 Mark Mitchell <mark@codesourcery.com>
8848 * c-common.h (do_warn_double_promotion): Declare.
8849 * c-common.c (do_warn_double_promotion): Define.
8851 2010-09-05 Mark Mitchell <mark@codesourcery.com>
8853 * c.opt (Wdouble-promotion): New.
8855 2010-09-02 Joseph Myers <joseph@codesourcery.com>
8857 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
8858 fvtable-thunks, fxref): Mark no longer supported in help text.
8860 2010-09-02 Joseph Myers <joseph@codesourcery.com>
8862 * c.opt (Wimport, fall-virtual, falt-external-templates,
8863 fdefault-inline, fenum-int-equiv, fexternal-templates,
8864 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
8865 fname-mangling-version-, fnew-abi, fnonnull-objects,
8866 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
8867 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
8869 (fhandle-exceptions): Mark with Alias and Warn.
8870 * c-opts.c (c_common_handle_option): Don't handle options marked
8873 2010-09-02 Joseph Myers <joseph@codesourcery.com>
8875 * c.opt (Wcomments, Werror-implicit-function-declaration,
8876 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
8877 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
8879 * c-common.c (option_codes): Use OPT_Wcomment instead of
8881 * c-opts.c (warning_as_error_callback, c_common_handle_option):
8882 Don't handle options marked as aliases.
8884 2010-08-25 Richard Guenther <rguenther@suse.de>
8886 * c-common.c (c_common_get_alias_set): Remove special
8887 handling for pointers.
8889 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
8891 * c-common.c: Use FOR_EACH_VEC_ELT.
8892 * c-gimplify.c: Likewise.
8893 * c-pragma.c: Likewise.
8895 2010-08-16 Joseph Myers <joseph@codesourcery.com>
8897 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
8899 (MMDX): Change back to MMD. Mark NoDriverArg instead of
8901 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
8902 instead of OPT_MDX and OPT_MMDX.
8904 2010-08-16 Joseph Myers <joseph@codesourcery.com>
8906 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
8908 2010-08-12 Joseph Myers <joseph@codesourcery.com>
8910 * c.opt (MD, MMD): Change to MDX and MMDX.
8911 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
8913 2010-08-11 Joseph Myers <joseph@codesourcery.com>
8915 * c-opts.c (c_common_handle_option): Call handle_generated_option
8916 instead of handle_option.
8918 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
8920 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
8921 (maybe_apply_renaming_pragma): Delete unneeded declarations.
8923 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
8925 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
8926 (pending_redefine_extname): Change type to a VEC.
8927 (add_to_renaming_pragma_list): Update for new type of
8928 pending_redefine_extname.
8929 (maybe_apply_renaming_pragma): Likewise.
8931 2010-08-04 Arnaud Charlet <charlet@adacore.com>
8933 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
8935 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
8936 decide whether a type has already been declared/seen.
8937 Do not go to the original type.
8938 (dump_nested_types): New parameter forward.
8939 Generate forward declaration if needed and mark type as visited.
8940 (print_ada_declaration): Call dump_nested_types if not already done.
8941 Mark types as visited.
8943 2010-08-03 Joseph Myers <joseph@codesourcery.com>
8945 * c.opt (-print-pch-checksum): Remove option.
8946 * c-opts.c (c_common_handle_option): Don't handle
8947 OPT_print_pch_checksum.
8949 2010-07-27 Joseph Myers <joseph@codesourcery.com>
8951 * c-common.h (c_common_handle_option): Update prototype and return
8953 * c-opts.c (c_common_handle_option): Update prototype and return
8954 value type. Update calls to handle_option and
8955 enable_warning_as_error.
8957 2010-07-27 Jakub Jelinek <jakub@redhat.com>
8960 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
8962 2010-07-27 Joseph Myers <joseph@codesourcery.com>
8964 * c-common.h (c_common_missing_argument): Remove.
8965 * c-opts.c (c_common_missing_argument): Remove.
8966 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
8967 idirafter, imacros, include, isysroot, isystem, iquote): Add
8969 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
8971 2010-07-27 Joseph Myers <joseph@codesourcery.com>
8973 * c-common.h (c_common_option_lang_mask,
8974 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
8976 (c_common_init_options): Update prototype.
8977 * c-opts.c (c_common_option_lang_mask): New.
8978 (c_common_initialize_diagnostics): Split out of
8979 c_common_init_options.
8980 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
8982 (c_common_init_options): Update prototype. Use decoded options in
8983 search for -lang-asm.
8985 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
8987 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
8988 * c-format.c: Likewise.
8990 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
8992 * c-common.h: Include diagnostic-core.h. Error if already
8994 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
8996 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8998 * c-common.c (IN_GCC_FRONTEND): Do not undef.
8999 Do not include expr.h
9000 (vector_mode_valid_p): Move here.
9002 2010-06-21 DJ Delorie <dj@redhat.com>
9004 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9005 allow these pragmas anywhere.
9007 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9010 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9011 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9012 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9013 ggc_strdup instead of xstrdup.
9015 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9017 * c-cppbuiltin.c: Include cpp-id-data.h.
9018 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9019 (lazy_hex_fp_value): New function.
9020 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9022 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9024 * c-gimplify.c: Do not include tree-flow.h
9026 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9029 * c-common.c: Rename targetm member:
9030 targetm.enum_va_list -> targetm.enum_va_list_p
9032 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9034 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9036 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9038 * c-cppbuiltin.c: Do not include except.h.
9040 2010-06-24 Andi Kleen <ak@linux.intel.com>
9042 * c-common.c (warn_for_omitted_condop): New.
9043 * c-common.h (warn_for_omitted_condop): Add prototype.
9045 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9047 * c.opt (lang-objc): Remove.
9048 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9050 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9052 * c-opts.c: Include "tm_p.h".
9054 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9056 * c-common.c (parse_optimize_options): Update call to
9059 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9061 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9062 new type of types_used_by_cur_var_decl.
9064 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9067 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9068 for C++ standard compliance.
9070 2010-06-16 Jason Merrill <jason@redhat.com>
9072 * c.opt: Add -Wnoexcept.
9074 2010-06-16 Richard Guenther <rguenther@suse.de>
9077 * c-common.c (c_common_truthvalue_conversion): Remove
9078 premature and wrong optimization concering ADDR_EXPRs.
9080 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9082 * c-ada-spec.c (dump_sloc): Remove column info.
9083 (is_simple_enum): New function.
9084 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9085 enum types when relevant.
9087 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9089 * c-common.c (conversion_warning): Warn at expression
9092 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9094 * c-opts.c (c_common_handle_option): Don't handle
9097 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9099 * c-pragma.c (push_alignment): Use typed GC allocation.
9100 (handle_pragma_push_options): Likewise.
9102 * c-common.c (parse_optimize_options): Likewise.
9104 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9107 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9109 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9110 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9111 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9112 flag_signed_bitfields, warn_strict_null_sentinel,
9113 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9114 flag_gen_declaration, flag_no_gnu_keywords,
9115 flag_implement_inlines, flag_implicit_templates,
9116 flag_implicit_inline_templates, flag_optional_diags,
9117 flag_elide_constructors, flag_default_inline, flag_rtti,
9118 flag_conserve_space, flag_access_control, flag_check_new,
9119 flag_new_for_scope, flag_weak, flag_working_directory,
9120 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9121 flag_enforce_eh_specs, flag_threadsafe_statics,
9122 flag_pretty_templates): Remove.
9123 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9124 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9125 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9126 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9127 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9128 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9129 flag_no_gnu_keywords, flag_implement_inlines,
9130 flag_implicit_templates, flag_implicit_inline_templates,
9131 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9132 flag_rtti, flag_conserve_space, flag_access_control,
9133 flag_check_new, flag_new_for_scope, flag_weak,
9134 flag_working_directory, flag_use_cxa_atexit,
9135 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9136 flag_threadsafe_statics, flag_pretty_templates,
9137 warn_strict_null_sentinel): Remove.
9138 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9139 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9140 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9141 fimplicit-inline-templates, fimplicit-templates,
9142 flax-vector-conversions, fms-extensions, fnil-receivers,
9143 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9144 frtti, fshort-double, fshort-enums, fshort-wchar,
9145 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9146 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9147 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9148 gen-decls, undef): Use Var.
9149 (fdefault-inline, foptional-diags): Document as doing nothing.
9150 * c-opts.c (c_common_handle_option): Remove cases for options now
9151 using Var. Mark ignored options as such.
9153 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9155 * c-common.c: Moved to here from parent directory.
9156 * c-common.def: Likewise.
9157 * c-common.h: Likewise.
9158 * c-cppbuiltin.c: Likewise.
9159 * c-dump.c: Likewise.
9160 * c-format.c: Likewise.
9161 * c-format.h : Likewise.
9162 * c-gimplify.c: Likewise.
9163 * c-lex.c: Likewise.
9164 * c-omp.c: Likewise.
9166 * c-opts.c: Likewise.
9167 * c-pch.c: Likewise.
9168 * c-ppoutput.c: Likewise.
9169 * c-pragma.c: Likewise.
9170 * c-pragma.h: Likewise.
9171 * c-pretty-print.c: Likewise.
9172 * c-pretty-print.h: Likewise.
9173 * c-semantics.c: Likewise.
9174 * stub-objc.c: Likewise.
9176 * c-common.c: Include gt-c-family-c-common.h.
9177 * c-pragma.c: Include gt-c-family-c-pragma.h.
9179 Copyright (C) 2010-2018 Free Software Foundation, Inc.
9181 Copying and distribution of this file, with or without modification,
9182 are permitted in any medium without royalty provided the copyright
9183 notice and this notice are preserved.