PR tree-optimization/83456 - -Wrestrict false positive on a non-overlapping memcpy...
[official-gcc.git] / gcc / c-family / ChangeLog
blob259445365c4232171407cede8bb1a0d292e35482
1 2018-03-12  Martin Sebor  <msebor@redhat.com>
3         PR tree-optimization/83456
4         * gcc/c-family/c-common.c (check_function_restrict): Return bool.
5         Restore checking of bounded built-in functions.
6         (check_function_arguments): Also return the result
7         of warn_for_restrict.
8         * gcc/c-family/c-common.c (check_function_restrict): Return bool.
9         * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
11 2018-03-02  Marek Polacek  <polacek@redhat.com>
13         PR c++/84171
14         * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
15         is erroneous.
17 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
19         * c-attribs.c (c_common_attribute_table): Remove "cilk simd
20         function".
22 2018-03-01  Marek Polacek  <polacek@redhat.com>
24         PR c++/84639
25         * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
26         alignment in computation.
28 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
30         * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
31         <REAL_TYPE>: Deal specifically with _Float128/__float128.
33 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
35         * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
36         (is_char_array): Take a type instead of a declaration.
37         (dump_ada_array_type): Likewise.
38         (is_simple_enum): Minor tweak.
39         (dump_ada_enum_type): New function extracted from...
40         (dump_ada_node) <ENUMERAL_TYPE>: ...here.  Invoke it.
41         <INTEGER_TYPE>: Remove unreachable code.
42         <RECORD_TYPE>: Likewise.  Minor tweaks.
43         (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
44         <ENUMERAL_TYPE>: New case.
45         <RECORD_TYPE>: Factor out common code.
46         (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
47         Minor tweaks.  Deal with enumeral types.
48         (dump_ada_structure): Minor tweaks.
50 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
52         * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
53         address for incomplete structures.
54         (dump_forward_type): Do not bail out for incomplete structures.
55         (dump_ada_declaration): Do not special-case incomplete structures
56         for subtypes.  Dump them as null records for types.
58 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
60         * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
61         (is_char_array): Fix formatting.
62         (dump_template_types): Likewise.
63         (dump_generic_ada_node): Rename into...
64         (dump_ada_node): ...this.
65         <POINTER_TYPE>: Remove superfluous space.  Use generic address for
66         incomplete structures and not for empty structures.  Do not use it
67         when forward declarations are needed.
68         (dump_forward_type): New function.
69         (dump_nested_types): Remove FORWARD parameter.  Do not consider
70         TREE_VISITED and do not generate a forward declaration.  Only dump
71         original nested types for nested declaration.
72         (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
73         <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
74         <RECORD_TYPE>: Do not consider TREE_VISITED.
75         (dump_ada_declaration): Use booleans and fix formatting throughout.
76         <TYPE_DECL>: Skip incomplete structures and not empty structures.
77         Call dump_forward_type instead of dump_nested_types for a typedef.
78         Remove superfluous check and adjust call to dump_nested_types.
79         <POINTER_TYPE>: Call dump_forward_type and fall through.
80         (dump_ada_struct_decl): Rename into...
81         (dump_ada_structure): ...this.  Do not special-case empty structures.
83 2018-02-27  Martin Sebor  <msebor@redhat.com>
85         PR c++/83871
86         * c.opt (-Wmissing-attributes): New option.
88 2018-02-21  Martin Liska  <mliska@suse.cz>
90         * c.opt (Wcatch-value=): Add IntegerRange.
92 2018-02-15  Jason Merrill  <jason@redhat.com>
94         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
96 2018-02-09  Nathan Sidwell  <nathan@acm.org>
98         PR c/84293
99         * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
100         arg.
101         * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
102         arg.  Adjust.
104 2018-02-09  Martin Sebor  <msebor@redhat.com>
106         PR lto/84212
107         * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
108         (-Walloc-size-larger-than, -Wformat-truncation=): Same.
109         (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
110         (-Wstrict-overflow, -Wsuggest-attribute): Same.
111         (-Wuninitialized): Same.
113 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
115         * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
116         keyword for components.
118 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
120         * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
122 2018-02-02  Julia Koval  <julia.koval@intel.com>
124         * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
126 2018-01-29  Marek Polacek  <polacek@redhat.com>
128         PR c/83966
129         * c-format.c (check_function_format): Check current_function_decl.
131 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
133         * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
134         argument.
135         (LAZY_HEX_FP_VALUES_CNT): Define.
136         (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
137         values rather than just 12.
138         (builtin_define_with_hex_fp_value): Likewise.
140 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
142         PR other/70268
143         * c.opt (-fmacro-prefix-map): New option.
144         * c-opts.c (c_common_handle_option): Handle it.
145         * c-lex.c (init_c_lex): Set remap_filename cpp callback.
146         * c-ppoutput.c (init_pp_output): Likewise.
148 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
150         PR c++/83814
151         * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
153 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
155         * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
156         Skip 'f' and 'F' characters if it is true.
157         (store_ada_macro): Minor tweak.
158         (dump_ada_macros) <CPP_COMMENT>: Likewise.
159         <CPP_WSTRING>: Likewise.
160         <CPP_STRING>: Output '&' in the buffer if not the first string.
161         <CPP_NUMBER>: Adjust calls to dump_number.
163 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
165         PR c++/43486
166         * c-common.c: Include "selftest.h".
167         (get_atomic_generic_size): Perform the test for integral type
168         before the range test for any integer constant, fixing indentation
169         of braces.  Call fold_for_warn before testing for an INTEGER_CST.
170         (reject_gcc_builtin): Strip any location wrapper from EXPR.
171         (selftest::test_fold_for_warn): New function.
172         (selftest::c_common_c_tests): New function.
173         (selftest::c_family_tests): Call it, and
174         selftest::c_pretty_print_c_tests.
175         * c-common.h (selftest::c_pretty_print_c_tests): New decl.
176         * c-format.c (check_format_arg): Convert VAR_P check to a
177         fold_for_warn.
178         * c-pretty-print.c: Include "selftest.h".
179         (pp_c_cast_expression): Don't print casts for location wrappers.
180         (selftest::assert_c_pretty_printer_output): New function.
181         (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
182         (selftest::test_location_wrappers): New function.
183         (selftest::c_pretty_print_c_tests): New function.
184         * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
186 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
187             Alan Hayward  <alan.hayward@arm.com>
188             David Sherwood  <david.sherwood@arm.com>
190         * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
192 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
193             Alan Hayward  <alan.hayward@arm.com>
194             David Sherwood  <david.sherwood@arm.com>
196         * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
197         as polynomial.
199 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
200             Alan Hayward  <alan.hayward@arm.com>
201             David Sherwood  <david.sherwood@arm.com>
203         * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
204         (convert_vector_to_array_for_subscript): Handle polynomial
205         TYPE_VECTOR_SUBPARTS.
206         (c_common_type_for_mode): Check valid_vector_subparts_p.
207         * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
208         VECTOR_CST_NELTS.
210 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
212         Update copyright years.
214 2017-12-22  Mike Stump  <mikestump@comcast.net>
215             Eric Botcazou  <ebotcazou@adacore.com>
217         * c-pragma.c (init_pragma): Register pragma GCC unroll.
218         * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
220 2017-12-22  Alexandre Oliva <aoliva@redhat.com>
222         PR debug/83527
223         PR debug/83419
224         * c-semantics.c (only_debug_stmts_after_p): New.
225         (pop_stmt_list): Clear side effects in debug-only stmt list.
226         Check for single nondebug stmt followed by debug stmts only.
228 2017-12-21  Alexandre Oliva  <aoliva@redhat.com>
230         PR debug/83419
231         * c-semantics.c (pop_stmt_list): Propagate side effects from
232         single nondebug stmt to container list.
234 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
236         * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
237         conditions with typical order conditions.
239 2017-12-18  Marek Polacek  <polacek@redhat.com>
241         * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
242         not in effect.
244 2017-12-17  Martin Sebor  <msebor@redhat.com>
246         * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
247         an error for attribute warn_if_not_aligned.
249 2017-12-16  Martin Sebor  <msebor@redhat.com>
251         PR tree-optimization/78918
252         * c-common.c (check_function_restrict): Avoid checking built-ins.
253         * c.opt (-Wrestrict): Include in -Wall.
255 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
257         * c-attribs.c (c_common_attribute_table,
258         c_common_format_attribute_table): Swap affects_type_identity
259         and handler fields, adjust comments.
261 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
263         * c.opt (Wcast-function-type): New warning option.
264         * c-lex.c (get_fileinfo): Avoid warning.
265         * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
267 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
269         PR middle_end/79538
270         * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
271         Adjust the size of buf1 and buf2, add a new buf to avoid
272         format-overflow warning.
274 2017-12-12  Alexandre Oliva <aoliva@redhat.com>
276         * c-semantics.c (pop_stmt_list): Move begin stmt marker into
277         subsequent statement list.
279 2017-12-07  Martin Sebor  <msebor@redhat.com>
281         PR c/81544
282         PR c/81566
283         * c-attribs.c (attr_aligned_exclusions): New array.
284         (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
285         (attr_common_exclusions, attr_const_pure_exclusions): Same.
286         (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
287         (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
288         (attr_warn_unused_result_exclusions): Same.
289         (handle_hot_attribute, handle_cold_attribute): Simplify.
290         (handle_const_attribute): Warn on function returning void.
291         (handle_pure_attribute): Same.
292         (handle_aligned_attribute): Diagnose conflicting attribute
293         specifications.
294         * c-warn.c (diagnose_mismatched_attributes): Simplify.
296 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
298         PR c/83236
299         * c-common.c (selftest::c_family_tests): Call
300         selftest::c_spellcheck_cc_tests.
301         * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
302         * c-spellcheck.cc: Include "selftest.h".
303         (name_reserved_for_implementation_p): New function.
304         (should_suggest_as_macro_p): New function.
305         (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
306         should_suggest_as_macro_p and call it.
307         (selftest::test_name_reserved_for_implementation_p): New function.
308         (selftest::c_spellcheck_cc_tests): New function.
309         * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
311 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
313         * c-spellcheck.cc: New file, taken from macro-handling code in
314         spellcheck-tree.c.
315         * c-spellcheck.h: New file, taken from macro-handling code in
316         spellcheck-tree.h.
318 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
320         * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
321         attribute.
322         (handle_simd_attribute): Don't check for "cilk simd function"
323         attribute.  Reindent, formatting changes.
325 2017-11-30  Julia Koval  <julia.koval@intel.com>
327         * c-common.h (inv_list): Remove.
329 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
331         PR sanitizer/81275
332         * c-common.c (c_switch_covers_all_cases_p_1,
333         c_switch_covers_all_cases_p): New functions.
334         * c-common.h (c_switch_covers_all_cases_p): Declare.
336 2017-11-28  Julia Koval  <julia.koval@intel.com>
337             Sebastian Peryt  <sebastian.peryt@intel.com>
339         * array-notation-common.c: Delete.
340         * c-cilkplus.c: Ditto.
341         * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
342         * c-common.def (ARRAY_NOTATION_REF): Remove.
343         * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
344         build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
345         c_validate_cilk_plus_loop, cilkplus_an_parts,
346         cilk_ignorable_spawn_rhs_op,
347         cilk_recognize_spawn): Remove.
348         * c-gimplify.c (CILK_SPAWN_STMT): Remove.
349         * c-omp.c: Remove CILK_SIMD check.
350         * c-pragma.c: Ditto.
351         * c-pragma.h: Remove CILK related pragmas.
352         * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
353         ARRAY_NOTATION_REF condition.
354         (c_pretty_printer::expression): Ditto.
355         * c.opt (fcilkplus): Remove.
356         * cilk.c: Delete.
358 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
360         * c-pretty-print.c (pp_c_additive_expression,
361         c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
363 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
365         * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
367         PR c++/83059
368         * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
369         instead of tree_to_uhwi, formatting fix.
371 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
373         PR c/81404
374         * known-headers.cc: New file, based on material from c/c-decl.c.
375         (suggest_missing_header): Copied as-is.
376         (get_stdlib_header_for_name): New, based on get_c_name_hint but
377         heavily edited to add C++ support.  Add some knowledge about
378         <limits.h>, <stdint.h>, and <wchar.h>.
379         * known-headers.h: Likewise.
381 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
383         * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
384         (lookup_name_fuzzy): Likewise.  Convert return type from
385         const char * to name_hint.  Add location_t param.
386         * name-hint.h: New header.
388 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
390         PR c/66618
391         PR c/69960
392         * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
394 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
396         * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
397         expected publication date of C17.
398         (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
400 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
402         PR c/81156
403         * c-common.c (c_common_reswords): Add __builtin_tgmath.
404         * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
406 2017-11-10  Martin Sebor  <msebor@redhat.com>
408         PR c/81117
409         * c-common.c (catenate_strings): Use memcpy instead of strncpy.
410         * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
411         * c.opt (-Wstringop-truncation): New option.
413 2017-11-06  Martin Liska  <mliska@suse.cz>
415         PR middle-end/82404
416         * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
417         FE.
418         * c.opt: Set default value of warn_return_type.
420 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
422         * c-common.c (binary_op_error): Update for renaming of
423         error_at_rich_loc.
424         (c_parse_error): Likewise.
425         * c-warn.c (warn_logical_not_parentheses): Likewise for
426         renaming of inform_at_rich_loc.
427         (warn_for_restrict): Likewise for renaming of
428         warning_at_rich_loc_n.
430 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
432         * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
433         * c-opts.c (set_std_c17): New function.
434         (c_common_init_options): Use gnu17 as default C version.
435         (c_common_handle_option): Handle -std=c17 and -std=gnu17.
437 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
439         * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
440         (c_cpp_builtins): If a machine has a fast fma _Float<N> and
441         _Float<N>X variant, define __FP_FAST_FMA<N> and/or
442         __FP_FAST_FMA<N>X.
444 2017-10-23  Marek Polacek  <polacek@redhat.com>
446         PR c/82681
447         * c-warn.c (warnings_for_convert_and_check): Fix typos.
449 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
451         * c-common.c (check_builtin_function_arguments): Also check arguments
452         of __builtin_alloca_with_align_and_max.
454 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
456         * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
457         rather than NULL to format_warning_va.
458         (check_format_types): Likewise when calling format_type_warning.
459         Remove code to extract source_ranges and source_range * in favor
460         of just a location_t.
461         (format_type_warning): Convert source_range * param to a
462         location_t.
464 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
466         * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
467         [LR]SHIFT_EXPR.
469 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
471         * c-common.c (enum missing_token_insertion_kind): New enum.
472         (get_missing_token_insertion_kind): New function.
473         (maybe_suggest_missing_token_insertion): New function.
474         * c-common.h (maybe_suggest_missing_token_insertion): New decl.
476 2017-10-11  Nathan Sidwell  <nathan@acm.org>
478         * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
479         (c_common_handle_option): Update incpath_kind names.
481 2017-10-11  Martin Liska  <mliska@suse.cz>
483         PR sanitizer/82490
484         * c-attribs.c (handle_no_sanitize_attribute): Report directly
485         Wattributes warning.
487 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
489         * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
490         operating on trees as wide_ints.
491         * c-common.c (pointer_int_sum): Likewise.
492         * c-pretty-print.c (pp_c_integer_constant): Likewise.
493         * c-warn.c (match_case_to_enum_1): Likewise.
494         (c_do_switch_warnings): Likewise.
495         (maybe_warn_shift_overflow): Likewise.
497 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
499         PR c/82437
500         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
501         instead of wide_int::from.
503 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
505         PR c/82437
506         * c-warn.c (warn_tautological_bitwise_comparison): Instead of
507         using to_widest use wide_int with the larger of the two precisions.
509 2017-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
511         * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
512         functions.
514 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
516         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
517         when combining the original unconverted comparison operands.
519 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
521         * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
522         attribute.
524 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
526         * c-ada-spec.c (to_ada_name): Add index parameter.
527         (pp_ada_tree_identifier): Likewise.
528         (dump_ada_macros): Adjust call to to_ada_name.
529         (struct overloaded_name_hash): New type.
530         (struct overloaded_name_hasher): Likewise.
531         (overloaded_names): New hash table.
532         (compute_overloading_index): New function.
533         (dump_ada_decl_name): Call it and pass the result to
534         pp_ada_tree_identifier.
535         (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
536         (dump_ada_function_declaration): Likewise.
537         (dump_generic_ada_node): Likewise.
538         (print_constructor): Likewise.
539         (print_destructor): Likewise.
540         (dump_ada_specs): Delete overloaded_names table.
542 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
544         * c-ada-spec.c (max_ada_macros): Move around.
545         (store_ada_macro_index): Likewise.
546         (source_file): Rename into...
547         (macro_source_file): ...this.
548         (count_ada_macro): Move around.
549         (store_ada_macro): Likewise.
550         (compare_macro): Likewise.
551         (print_ada_macros): Merge in...
552         (dump_ada_macros): ...this.
553         (source_file_base): Rename into...
554         (current_source_file): ...this.
555         (print_comment): Move around.
556         (dump_ada_nodes): Call dump_ada_declaration directly.
557         (struct with): Change type of limited field to bool.
558         (append_withs): Change type of limited_access parameter to bool.
559         (pp_ada_tree_identifie): Likewise.
560         (dump_ada_decl_nam): Likewise.
561         (dump_generic_ada_node): Likewise.  Do not print the return type.
562         (to_ada_name): Change type of space_found parameter to bool.
563         (dump_ada_function_declaration): Return void and change type of
564         parameters to bool.  Also print the return type for a function.
565         (print_ada_methods): Rename into...
566         (dump_ada_methods): ...this.
567         (print_ada_declaration): Rename into ...
568         (dump_ada_declaration): ...this.  Do not print the return type.
569         (print_ada_struct_decl): Rename into...
570         (dump_ada_struct_decl): ...this.
572 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
574         * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
575         rather than DECL_INITIAL.
576         (common_handle_aligned_attribute): Likewise.
578 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
580         * c.opt (gen-decls): Add RejectNegative.
582 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
583             Jakub Jelinek  <jakub@redhat.com>
585         Add support for -std=c++2a.
586         * c-common.h (cxx_dialect): Add cxx2a as a dialect.
587         * opt.c: Add options for -std=c++2a and -std=gnu++2a.
588         * c-opts.c (set_std_cxx2a): New.
589         (c_common_handle_option): Set options when -std=c++2a is enabled.
590         (c_common_post_options): Adjust comments.
591         (set_std_cxx14, set_std_cxx17): Likewise.
593 2017-09-15  Eric Botcazou  <ebotcazou@adacore.com>
595         * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
596         message for non-uniform endianness and issue a warning in C++.
598 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
600         * c.opt (Wc++1z-compat): Change from option to undocumented alias.
601         (Wc++17-compat): Change from undocumented alias to option.
602         (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
603         change C++1z to C++17 in description.
604         (std=c++1z, std=gnu++1z): Change from option to undocumented
605         deprecated alias.
606         (std=c++17, std=gnu++17): Change from undocumented alias to option.
607         Adjust description.
608         * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
609         * c-opts.c (set_std_cxx1z): Rename to ...
610         (set_std_cxx17): ... this.
611         (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
612         and OPT_std_gnu__1z to OPT_std_gnu__17.  Adjust set_std_cxx1z
613         caller.
614         (c_common_post_options): Use cxx17 instead of cxx1z.  Adjust
615         comments.
617 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
619         * c-attribs.c (common_handle_aligned_attribute): Don't warn
620         function alignment if warn_if_not_aligned_p is true.
622 2017-09-12  Nathan Sidwell  <nathan@acm.org>
624         * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
625         resort_sorted_fields): Move to c/c-decl.c.
626         * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
627         (struct sorted_fields_type): Move to c/c-lang.h.
629 2017-09-09  Jonathan Wakely  <jwakely@redhat.com>
631         PR c++/81852
632         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
634 2017-09-04  Marek Polacek  <polacek@redhat.com>
636         PR c/81783
637         * c-warn.c (warn_tautological_bitwise_comparison): New function.
638         (warn_tautological_cmp): Call it.
640 2017-09-01  Boris Kolpackov <boris@codesynthesis.com>
642         * c-opts.c (c_common_finish): Write dependency information even if
643         there are errors.
645 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
647         PR c/81887
648         * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
649         (omp_pragmas_simd): ... here.
650         * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
651         create new clauses list containing just simd clause.
653 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
654             Alan Hayward  <alan.hayward@arm.com>
655             David Sherwood  <david.sherwood@arm.com>
657         * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
658         into scalar_mode_supported_p call.
659         (handle_mode_attribute): Update call to scalar_mode_supported_p.
661 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
662             Alan Hayward  <alan.hayward@arm.com>
663             David Sherwood  <david.sherwood@arm.com>
665         * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
666         for the mode iterator.
668 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
669             Alan Hayward  <alan.hayward@arm.com>
670             David Sherwood  <david.sherwood@arm.com>
672         * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
673         * c-common.c (c_build_vec_perm_expr): Likewise.
675 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
676             Alan Hayward  <alan.hayward@arm.com>
677             David Sherwood  <david.sherwood@arm.com>
679         * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
681 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
682             Alan Hayward  <alan.hayward@arm.com>
683             David Sherwood  <david.sherwood@arm.com>
685         * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
686         before calling targetm.addr_space.valid_pointer_mode.
688 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
689             Alan Hayward  <alan.hayward@arm.com>
690             David Sherwood  <david.sherwood@arm.com>
692         * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
694 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
695             Alan Hayward  <alan.hayward@arm.com>
696             David Sherwood  <david.sherwood@arm.com>
698         * c-common.c (c_common_fixed_point_type_for_size): Use new mode
699         iterators.
700         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
702 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
703             Alan Hayward  <alan.hayward@arm.com>
704             David Sherwood  <david.sherwood@arm.com>
706         * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
707         case statements.
709 2017-08-29  Martin Liska  <mliska@suse.cz>
711         PR other/39851
712         * c-common.c (parse_optimize_options): Add argument to function
713         call.
714         * c-pragma.c (handle_pragma_diagnostic): Likewise.
716 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
718         * c-lex.c (interpret_float): Use token location
719         when building an EXCESS_PRECISION_EXPR.
721 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
723         * c-common.c (check_function_arguments): Add "arglogs" param; pass
724         it to check_function_format.
725         * c-common.h (check_function_arguments): Add vec<location_t> *
726         param.
727         (check_function_format): Likewise.
728         * c-format.c (struct format_check_context): Add field "arglocs".
729         (check_function_format): Add param "arglocs"; pass it to
730         check_format_info.
731         (check_format_info):  Add param "arglocs"; use it to initialize
732         new field of format_ctx.
733         (check_format_arg): Pass format_ctx->arglocs to new param of
734         check_format_info_main.
735         (class argument_parser): New field "arglocs".
736         (argument_parser::argument_parser): Add "arglocs_" param and use
737         it to initialize new field.
738         (argument_parser::check_argument_type): Pass new arglocs field to
739         check_format_types.
740         (check_format_info_main): Add param "arglocs", and use it when
741         constructing arg_parser.
742         (check_format_types): Add param "arglocs"; use it if non-NULL when
743         !EXPR_HAS_LOCATION (cur_param) to get at location information.
745 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
747         PR c/53037
748         * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
749         (c_common_attribute_table): Add warn_if_not_aligned.
750         (handle_aligned_attribute): Renamed to ...
751         (common_handle_aligned_attribute): Remove argument, name, and add
752         argument, warn_if_not_aligned.  Handle warn_if_not_aligned.
753         (handle_aligned_attribute): New.
754         * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
756 2017-08-14  Martin Sebor  <msebor@redhat.com>
758         PR c/81117
759         * c-attribs.c (c_common_attribute_table): Add nonstring entry.
760         (handle_nonstring_attribute): New function.
762 2017-08-14  Martin Sebor  <msebor@redhat.com>
764         PR c/81117
765         * c-format.h (T89_G): New macro.
766         * c-format.c (local_gcall_ptr_node): New variable.
767         (init_dynamic_diag_info): Initialize it.
769 2017-08-11  Martin Liska  <mliska@suse.cz>
771         * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
772         TARGET_SUPPORTS_ALIASES.
774 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
776         * c-common.c (c_parse_error): Add rich_location * param, using it
777         rather implicitly using input_location.
778         * c-common.h (c_parse_error): Add rich_location * param.
780 2017-08-09  Marek Polacek  <polacek@redhat.com>
782         * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
783         (c_common_truthvalue_conversion): Likewise.
784         * c-omp.c (c_finish_omp_atomic): Likewise.
785         * c-common.h (build_binary_op): Update declaration.
787 2017-08-08  Martin Liska  <mliska@suse.cz>
789         * c-ada-spec.c: Include header files.
790         * c-ubsan.c: Likewise.
791         * c-warn.c: Likewise.
793 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
795         PR c/69389
796         * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
798 2017-08-07  Eric Botcazou  <ebotcazou@adacore.com>
800         * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
801         (print_ada_methods): Likewise.
802         (print_ada_declaration): Likewise.
804 2017-08-07  Martin Liska  <mliska@suse.cz>
806         * array-notation-common.c: Add new includes.
807         * c-format.c( handle_format_attribute): Canonicalize a format
808         function name.
809         * c-lex.c (c_common_has_attribute): Canonicalize name of an
810         attribute.
811         * c-pretty-print.c: Add new include.
813 2017-08-05  Eric Botcazou  <ebotcazou@adacore.com>
815         * c-ada-spec.c (has_static_fields): Look only into variables.
816         (print_constructor): Add TYPE parameter and use it for the name.
817         (print_destructor): Likewise.
818         (print_ada_declaration): Adjust to new constructor/destructor names.
819         Adjust calls to print_constructor and print_destructor.
820         (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
821         Look only into variables in the final loop.
823 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
825         * c-ada-spec.c (has_static_fields): Look only into fields.
826         (dump_generic_ada_node): Small tweak.
827         (dump_nested_types): Look only into fields.
828         (print_ada_declaration): Look only into methods.  Small tweak.
829         (print_ada_struct_decl): Look only into fields.  Use DECL_VIRTUAL_P.
831 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
833         * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
834         (dump_ada_function_declaration): Likewise.
835         (dump_generic_ada_node): Likewise.
836         (print_ada_declaration): Add support for const-qualified variables.
838 2017-07-31  Martin Liska  <mliska@suse.cz>
840         PR sanitize/81530
841         * c-ubsan.c (ubsan_maybe_instrument_array_ref):
842         Guard condition with flag_sanitize_p also with current_function_decl
843         non-null equality.
844         (ubsan_maybe_instrument_reference_or_call): Likewise.
846 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
848         * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
850 2017-07-29  Eric Botcazou  <ebotcazou@adacore.com>
852         * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
853         for enumeral types.
854         (print_ada_declaration): Add missing guard for record types.
856 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
858         PR c/45784
859         * c-omp.c (c_finish_omp_for): If the condition is wrapped in
860         rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
861         new COMPOUND_EXPRs around the rhs of the comparison.
863 2017-07-27  Marek Polacek  <polacek@redhat.com>
865         PR c/81417
866         * c-warn.c (warn_for_sign_compare): Tweak the warning message.  Print
867         the types.
869 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
871         * c-attribs.c (c_common_attribute_table): Add noipa attribute.
872         (handle_noipa_attribute): New function.
874 2017-07-07  Torsten Duwe  <duwe@suse.de>
876         * c-attribs.c (c_common_attribute_table): Add entry for
877         "patchable_function_entry".
879 2017-07-20  Nathan Sidwell  <nathan@acm.org>
881         Remove TYPE_METHODS.
882         * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
883         dump_ada_template, print_ada_methods,
884         print_ada_declaration): Member fns are on TYPE_FIELDS.
886 2017-07-18  Nathan Sidwell  <nathan@acm.org>
888         * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
890 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
892         * c-common.c (try_to_locate_new_include_insertion_point): New
893         function.
894         (per_file_includes_t): New typedef.
895         (added_includes_t): New typedef.
896         (added_includes): New variable.
897         (maybe_add_include_fixit): New function.
898         * c-common.h (maybe_add_include_fixit): New decl.
900 2017-07-10  Martin Sebor  <msebor@redhat.com>
902         PR other/81345
903         * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
905 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
907         * c-common.c (selftest::c_family_tests): New.
908         * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
909         (selftest::c_family_tests): New decl.
911 2017-07-04  Marek Polacek  <polacek@redhat.com>
913         PR c/81231
914         * c-common.c (sync_resolve_size): Give error for pointers to incomplete
915         types.
917 2017-07-04  Marek Polacek  <polacek@redhat.com>
919         * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
921 2017-06-28  Martin Liska  <mliska@suse.cz>
923         PR ipa/81128
924         * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
925         to a function declaration.
927 2017-06-28  Martin Liska  <mliska@suse.cz>
929         PR driver/79659
930         * c.opt: Add IntegerRange to various options.
932 2017-06-26  Marek Polacek  <polacek@redhat.com>
934         PR c/80116
935         * c-common.h (warn_for_multistatement_macros): Declare.
936         * c-warn.c: Include "c-family/c-indentation.h".
937         (warn_for_multistatement_macros): New function.
938         * c.opt (Wmultistatement-macros): New option.
939         * c-indentation.c (guard_tinfo_to_string): No longer static.
940         Change the parameter type to "enum rid".  Handle RID_SWITCH.
941         * c-indentation.h (guard_tinfo_to_string): Declare.
943 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
945         * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
947 2017-06-15  Martin Sebor  <msebor@redhat.com>
949         PR c++/80560
950         * c.opt (-Wclass-memaccess): New option.
952 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
954         * c-opts.c (c_common_finish): Handle '-' special value to -MF.
956 2017-06-13  Marek Polacek  <polacek@redhat.com>
958         PR objc/80949
959         * c-warn.c (do_warn_duplicated_branches): Return if any of the
960         branches is null.
962 2017-06-13  Martin Liska  <mliska@suse.cz>
964         PR sanitize/78204
965         * c-attribs.c (add_no_sanitize_value): New function.
966         (handle_no_sanitize_attribute): Likewise.
967         (handle_no_sanitize_address_attribute): Use the function.
968         (handle_no_sanitize_thread_attribute): New function.
969         (handle_no_address_safety_analysis_attribute): Use
970         add_no_sanitize_value.
971         (handle_no_sanitize_undefined_attribute): Likewise.
972         * c-common.h: Declare new functions.
973         * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
974         (ubsan_instrument_shift): Likewise.
975         (ubsan_instrument_bounds): Likewise.
976         (ubsan_maybe_instrument_array_ref): Likewise.
977         (ubsan_maybe_instrument_reference_or_call): Likewise.
979 2017-06-11  Jason Merrill  <jason@redhat.com>
981         * c-ada-spec.c, c-pragma.c: Use id_equal.
983 2017-06-04  Marek Polacek  <polacek@redhat.com>
985         PR c/80919
986         * c-format.c (matching_type_p): Return false if any of the types
987         requires structural equality.
989 2017-06-02  Martin Sebor  <msebor@redhat.com>
991         PR c/80892
992         * c-warn.c (conversion_warning): Use -Wconversion for integer
993         conversion and -Wfloat-conversion for floating one.
995 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
997         * c.opt (Wsizeof-pointer-div): New warning option.
999 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
1001         * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1002         (Wcatch-value=1): Enable by -Wall.
1004 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
1006         * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1007         format_chars.
1008         * c.opt (fdiagnostics-show-template-tree): New option.
1009         (felide-type): New option.
1011 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
1013         * c.opt (Wcatch-value=): New C++ warning flag.
1015 2017-05-24  Nathan Sidwell  <nathan@acm.org>
1017         * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1018         const casts to avoid warning.
1020 2017-05-24  Martin Sebor  <msebor@redhat.com>
1022         PR c/80731
1023         * c-common.h (unsafe_conversion_p): Add a function argument.
1024         * c-common.c (unsafe_conversion_p): Same.
1025         Add type names and values to diagnostics.
1026         (scalar_to_vector): Adjust.
1027         * c-warn.c (constant_expression_error): Add a function argument.
1028         Add type names and values to diagnostics.
1029         (conversion_warning): Add a function argument.
1030         Add type names and values to diagnostics.
1031         (warnings_for_convert_and_check): Same.
1033 2017-05-19  Jason Merrill  <jason@redhat.com>
1035         * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1036         enumerators.
1038 2017-05-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1040         * c-format.c (locus): Move out of function scope,
1041         add GTY attribute.
1043 2017-05-19  Nathan Sidwell  <nathan@acm.org>
1045         * c-opts.c (class_dump_file, class_dump_flags): Delete.
1046         (c_common_parse_file): Remove class dump handling.
1047         (get_dump_info): Likewise.
1049 2017-05-19  Richard Biener  <rguenther@suse.de>
1051         PR c++/80593
1052         * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1053         to alias-set zero memory.
1055 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1057         * c-format.c (local_tree_type_node): Add GTY attribute.
1059 2017-05-18  Marek Polacek  <polacek@redhat.com>
1061         * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1062         (c_common_fixed_point_type_for_size): Likewise.
1063         (c_common_type_for_mode): Likewise.
1064         (shorten_compare): Likewise.
1065         (c_promoting_integer_type_p): Use false/true instead of 0/1.
1066         * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1068 2017-05-18  Marek Polacek  <polacek@redhat.com>
1070         * c-common.c (self_promoting_args_p): Change the return type to bool.
1071         Use false/true instead of 0/1.
1072         * c-common.h (self_promoting_args_p): Update.
1074 2017-05-17  Marek Polacek  <polacek@redhat.com>
1076         * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1077         * c-warn.c: Likewise.
1079 2017-05-17  Ville Voutilainen  <ville.voutilainen@gmail.com>
1081         Implement new C++ intrinsics __is_assignable and __is_constructible.
1082         * c-common.c (__is_assignable, __is_constructible): New.
1083         * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1085 2017-05-17  Martin Liska  <mliska@suse.cz>
1087         * c-common.h: Introduce dump_flags_t type and
1088         use it instead of int type.
1089         * c-gimplify.c (c_genericize): Likewise.
1090         * c-opts.c: Likewise.
1092 2017-05-17  Marek Polacek  <polacek@redhat.com>
1094         * c-common.c (c_save_expr): Remove.
1095         (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1096         * c-common.h (c_save_expr): Remove declaration.
1098 2017-05-09  Volker Reichelt  <v.reichelt@netcologne.de>
1100         PR c/35441
1101         * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1102         MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1103         (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1104         (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1105         RDIV_EXPR.
1106         (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1108 2017-05-09  Marek Polacek  <polacek@redhat.com>
1110         PR c/80525
1111         * c-warn.c (unwrap_c_maybe_const): New.
1112         (warn_logical_operator): Call it.
1114 2017-05-09  Nathan Sidwell  <nathan@acm.org>
1116         * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1117         * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1119 2017-05-08  Martin Sebor  <msebor@redhat.com>
1121         PR translation/80280
1122         * c-format.h (struct format_flag_spec): Add new member.
1123         (T89_T): New macro.
1124         * c-format.c (local_tree_type_node): New global.
1125         (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1126         (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1127         (strfmon_flag_specs): Likewise.
1128         (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1129         with distinct quoting properties.
1130         (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1131         (flag_chars_t::validate): Add argument and handle bad quoting.
1132         (check_format_info_main): Handle quoting problems.
1133         (init_dynamic_diag_info): Simplify.
1135 2017-05-08  Jason Merrill  <jason@redhat.com>
1137         * c-opts.c (c_common_post_options): Update defaults for
1138         flag_abi_version and flag_abi_compat_version.
1140 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
1142         * c-common.c (c_cpp_error): Replace report_diagnostic
1143         with diagnostic_report_diagnostic.
1145 2017-05-04  Martin Sebor  <msebor@redhat.com>
1147         PR translation/80280
1148         * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1149         (handle_weakref_attribute): Same.
1151 2017-05-03  Nathan Sidwell  <nathan@acm.org>
1153         Canonicalize canonical type hashing
1154         * c-common.c (complete_array_type): Use type_hash_canon.
1156 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
1158         PR c++/80038
1159         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1160         prototype.
1161         (cilk_install_body_pedigree_operations): Likewise.
1162         * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1163         detatched.
1164         (cilk_gimplify_call_params_in_spawned_fn): Remove.
1165         (cilk_install_body_pedigree_operations): Likewise.
1166         (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1167         unwrapping.
1169 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
1171         PR c++/80534
1172         * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1173         flag on non-aggregate element types.
1175 2017-04-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1177         * c-common.c (c_type_hasher, type_hash_table): Remove.
1178         (c_common_get_alias_set): Remove unreachable code.
1179         * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1181 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
1183         * c.opt (Wextra-semi): New C++ warning flag.
1185 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
1187         PR middle-end/80423
1188         * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1190 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
1192         PR middle-end/79788
1193         PR middle-end/80375
1194         * c-common.c (c_common_type_for_mode): Don't handle
1195         widest_*_literal_type_node here.
1196         c_common_signed_or_unsigned_type): Likewise.
1197         (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1198         to *intTI_type_node or *intDI_type_node depending on whether
1199         TImode is supported by the target or not.
1201 2017-04-10  Martin Liska  <mliska@suse.cz>
1203         PR sanitizer/80350
1204         * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1205         doing an UBSAN check.
1207 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
1209         * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1211 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
1213         PR c++/79572
1214         * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1215         tree *.
1216         * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise.  Handle
1217         not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1218         REFERENCE_TYPE.
1220 2017-03-31  David Malcolm  <dmalcolm@redhat.com>
1222         PR documentation/78732
1223         * c.opt (Wendif-labels): Fix description to refer to
1224         #else rather than #elif.
1226 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
1228         PR libstdc++/80251
1229         * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1230         * c-common.c (c_common_reswords): Add __is_aggregate trait.
1232 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
1234         PR middle-end/80162
1235         * c-common.c (c_common_mark_addressable_vec): Don't set
1236         TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1238 2017-03-21  Martin Sebor  <msebor@redhat.com>
1240         PR c++/79548
1241         * c-common.c (set_underlying_type): Mark type used only when
1242         original del is declared unused.
1244 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
1246         PR translation/79848
1247         * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1248         "%qs".
1250 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
1252         PR c/79921
1253         * c-indentation.c (warn_for_misleading_indentation): Remove parens
1254         from inform's message, so that xgettext can locate it.
1256 2017-03-09  Marek Polacek  <polacek@redhat.com>
1258         PR c++/79962
1259         PR c++/79984
1260         * c-attribs.c (handle_nonnull_attribute): Save the result of default
1261         conversion to the attribute list.
1263 2017-03-09  Martin Liska  <mliska@suse.cz>
1265         * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1267 2017-03-03  Jason Merrill  <jason@redhat.com>
1269         * c.opt (Wnoexcept-type): New.
1271 2017-03-02  Richard Biener  <rguenther@suse.de>
1273         PR c/79756
1274         * c-common.c (c_common_mark_addressable_vec): Look through
1275         C_MAYBE_CONST_EXPR.
1277 2017-02-28  Martin Liska  <mliska@suse.cz>
1279         * c.opt: Replace space with tabular for options of <number>
1280         type.
1282 2017-02-28  Martin Liska  <mliska@suse.cz>
1284         * c.opt: Fix --help=option -Q for options which are of
1285         an enum type.
1287 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
1289         PR c++/79588
1290         * c-common.c (check_function_restrict): New function.
1291         (check_function_arguments): Add FNDECL argument.  Call
1292         check_function_restrict if -Wrestrict.
1293         * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1294         and NARGS.  Use auto_vec for ARG_POSITIONS, simplify.
1295         * c-common.h (check_function_arguments): Add FNDECL argument.
1296         (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1298 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
1300         * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1301         treatment of parameters with pointer-to-tagged type and tidy up.
1302         (print_ada_methods): Remove the special treatment of C++ static member
1303         functions.
1305 2017-02-22  Martin Liska  <mliska@suse.cz>
1307         * c.opt: Replace inequality signs with square brackets
1308         for -Wnornalized.
1310 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
1312         PR c++/79641
1313         * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1314         preserve quals.
1316 2017-02-17  Joseph Myers  <joseph@codesourcery.com>
1318         * c-cppbuiltin.c (builtin_define_float_constants): Define
1319         __DECIMAL_DIG__ to the value for long double.
1321 2017-02-15  Marek Polacek  <polacek@redhat.com>
1323         PR c/79515
1324         * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1325         conversion has occured.
1327 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
1329         * c-common.c (c_common_reswords): Add "__RTL".
1330         * c-common.h (enum rid): Add RID_RTL.
1332 2017-01-20  Marek Polacek  <polacek@redhat.com>
1334         PR c/64279
1335         * c-common.h (do_warn_duplicated_branches_r): Declare.
1336         * c-gimplify.c (c_genericize): Walk the function tree calling
1337         do_warn_duplicated_branches_r.
1338         * c-warn.c (expr_from_macro_expansion_r): New.
1339         (do_warn_duplicated_branches): New.
1340         (do_warn_duplicated_branches_r): New.
1341         * c.opt (Wduplicated-branches): New option.
1343 2017-01-17  David Malcolm  <dmalcolm@redhat.com>
1345         PR c++/71497
1346         * c-indentation.c (warn_for_misleading_indentation): Use the past
1347         subjunctive in the note.
1349 2017-01-17  Aldy Hernandez  <aldyh@redhat.com>
1351         PR c/79116
1352         * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1353         start type to integer_type.
1355 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
1357         PR driver/49726
1358         * c.opt (gen-decls): Add Driver flag.
1360 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1362         Revert:
1363         2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1365         PR c++/71737
1366         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1368 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
1370         PR c++/71737
1371         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1373 2017-01-12  Martin Sebor  <msebor@redhat.com>
1375         (-Wformat-overflow): ...to this.
1377 2017-01-11  Martin Sebor  <msebor@redhat.com>
1379         PR c/78768
1380         * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1381         Also enable for LTO.
1383 2017-01-10  Jason Merrill  <jason@redhat.com>
1385         Implement P0195R2, C++17 variadic using.
1386         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1388 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
1390         PR translation/79019
1391         PR translation/79020
1392         * c.opt (Wnormalized=): Fix typo in description.
1394 2017-01-08  Martin Sebor  <msebor@redhat.com>
1396         PR middle-end/77708
1397         * c.opt (-Wformat-truncation): New option.
1399 2017-01-06  Alexandre Oliva <aoliva@redhat.com>
1401         * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1402         value to unsigned short to fit in 4 hex digits without
1403         warnings.
1405 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
1407         * c.opt (fsso-struct): Add 'native' value.
1409 2017-01-05  Martin Liska  <mliska@suse.cz>
1411         PR pch/78970
1412         * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1413         header.
1415 2017-01-04  Marek Polacek  <polacek@redhat.com>
1417         PR c++/64767
1418         * c.opt (Wpointer-compare): New option.
1420 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
1422         PR driver/78957
1423         * c.opt (fsso-struct=): Add RejectNegative.
1425 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1427         Update copyright years.
1429 2016-12-29  Martin Liska  <mliska@suse.cz>
1431         PR c/78933
1432         * c.opt (strong-eval-order): Add RejectNegative keyword.
1434 2016-12-22  Jason Merrill  <jason@redhat.com>
1436         Implement P0522R0, matching of template template arguments.
1437         * c-cppbuiltin.c (c_cpp_builtins): Define
1438         __cpp_template_template_args.
1440 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
1442         PR bootstrap/78817
1443         * c-common.c (struct nonnull_arg_ctx): New type.
1444         (check_function_nonnull): Return bool instead of void.  Use
1445         nonnull_arg_ctx as context rather than just location_t.
1446         (check_nonnull_arg): Adjust for the new context type, set
1447         warned_p to true if a warning has been diagnosed.
1448         (check_function_arguments): Return bool instead of void.
1449         * c-common.h (check_function_arguments): Adjust prototype.
1451 2016-12-21  Jason Merrill  <jason@redhat.com>
1453         * c.opt (-fnew-ttp-matching): New flag.
1454         * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1456 2016-12-14  Martin Jambor  <mjambor@suse.cz>
1458         * c-omp.c: Include omp-general.h instead of omp-low.h.
1459         (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1460         name.
1462 2016-12-14  Martin Sebor  <msebor@redhat.com>
1464         PR c/17308
1465         * c-common.c (check_nonnull_arg): Disable when optimization
1466         is enabled.
1468 2016-12-12  Marek Polacek  <polacek@redhat.com>
1470         PR c++/78647
1471         * c-common.c (attribute_fallthrough_p): Return false for
1472         error_mark_node.
1474 2016-12-08  Martin Sebor  <msebor@redhat.com>
1476         PR c/78284
1477         * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
1479 2016-12-08  Martin Sebor  <msebor@redhat.com>
1481         PR c/78165
1482         * c-pretty-print (pp_c_integer_constant): Avoid formatting type
1483         suffix.
1485 2016-12-07  Martin Sebor  <msebor@redhat.com>
1487         PR c/53562
1488         PR middle-end/77784
1489         PR middle-end/78149
1490         PR middle-end/78138
1491         * c.opt (-Wstringop-overflow): New option.
1493 2016-12-02  Maxim Ostapenko  <m.ostapenko@samsung.com>
1495         * c-attribs.c (asan odr indicator): New attribute.
1496         (handle_asan_odr_indicator_attribute): New function.
1498 2016-11-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1500         * c-common.c (c_common_nodes_and_builtins): Remove initialization of
1501         ptrdiff_type_node;
1503 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
1505         * c-common.c (excess_precision_mode_join): New.
1506         (c_ts18661_flt_eval_method): New.
1507         (c_c11_flt_eval_method): Likewise.
1508         (c_flt_eval_method): Likewise.
1509         * c-common.h (excess_precision_mode_join): New.
1510         (c_flt_eval_method): Likewise.
1511         * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
1512         (cpp_iec_559_value): Call it.
1513         (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
1514         call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
1515         __FLT_EVAL_METHOD_TS_18661_3__.
1517 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
1519         * c-opts.c (c_common_post_options): Add logic to handle the default
1520         case for -fpermitted-flt-eval-methods.
1522 2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
1524         * c.opt (Wexpansion-to-defined): New.
1526 2016-11-23  Jakub Jelinek  <jakub@redhat.com>
1528         PR target/78451
1529         * c-pragma.c (handle_pragma_target): Don't replace
1530         current_target_pragma, but chainon the new args to the current one.
1532 2016-11-22  Nathan Sidwell  <nathan@acm.org>
1534         * array-notation-common.c (cilkplus_extract_an_trplets): Fix
1535         indentation and formatting.
1537 2016-11-21  Martin Sebor  <msebor@redhat.com>
1539         * c.opt (-fprintf-return-value): Enable by default.
1541 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1543         PR c++/71973
1544         * c.opt (-Wbuiltin-declaration-mismatch): New warning.
1545         * c-common.c (c_common_nodes_and_builtins): Initialize
1546         const_tm_ptr_type_node.
1548 2016-11-16  Marek Polacek  <polacek@redhat.com>
1550         PR c/78285
1551         * c-common.c (c_add_case_label): Turn error_at calls into inform.
1553 2016-11-14  Jakub Jelinek  <jakub@redhat.com>
1555         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
1557 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
1558             Richard Biener  <rguenther@suse.de>
1560         * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
1561         * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
1562         * c.opt (fgimple): New option.
1564 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1566         PR c/35503
1567         * c-common.h (warn_for_restrict): Declare.
1568         * c-warn.c: Include gcc-rich-location.h.
1569         (warn_for_restrict): New function.
1570         * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
1571         (gcc_cdiag_char_table): Likewise.
1572         (gcc_cxxdiag_char_table): Likewise.
1573         * c.opt (Wrestrict): New option.
1575 2016-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1577         * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
1578         for nested types only if the type is a record or union and dump SLOC.
1580 2016-11-09  Jason Merrill  <jason@redhat.com>
1582         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
1584 2016-11-09  Jakub Jelinek  <jakub@redhat.com>
1586         * c-ubsan.c (ubsan_instrument_shift): Handle split
1587         -fsanitize=shift-base and -fsanitize=shift-exponent.
1589 2016-11-07  Jason Merrill  <jason@redhat.com>
1591         * c.opt (Wc++1z-compat): New.
1592         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
1594 2016-11-07  Martin Liska  <mliska@suse.cz>
1596         * c-warn.c (warn_for_unused_label): Save all labels used
1597         in goto or in &label.
1599 2016-11-03  Jason Merrill  <jason@redhat.com>
1601         * c-cppbuiltin.c (c_cpp_builtins): Correct
1602         __cpp_inheriting_constructors.
1604 2016-11-01  Jason Merrill  <jason@redhat.com>
1606         * c-cppbuiltin.c (c_cpp_builtins): Update
1607         __cpp_inheriting_constructors.
1609         * c.opt (-fnew-inheriting-ctors): New.
1610         * c-opts.c: Default to on for ABI 11+.
1612 2016-10-31  Jakub Jelinek  <jakub@redhat.com>
1614         PR c++/77948
1615         * c.opt (fext-numeric-literals): Add Var and Init.
1616         * c-opts.c (c_common_handle_option): Don't clear
1617         cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
1618         (c_common_post_options): Clear it here if not set
1619         explicitly.
1621 2016-10-28  Aldy Hernandez  <aldyh@redhat.com>
1623         PR debug/77773
1624         * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
1625         if NULL.
1627 2016-10-25  Jakub Jelinek  <jakub@redhat.com>
1629         * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
1630         * c-common.c (c_common_reswords): Add __builtin_launder.
1632 2016-10-24  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1634         * c-common.c (c_common_truthvalue_conversion): Warn for
1635         multiplications in boolean context.  Fix the quoting of '<<' and '<'
1636         in the shift warning.
1638 2016-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1640         * c-common.c (c_common_truthvalue_conversion): Fix the comment.
1642 2016-10-20  Jason Merrill  <jason@redhat.com>
1644         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
1646 2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1648         * c-common.c (c_common_truthvalue_conversion): Warn only for signed
1649         integer shift ops in boolean context.
1651 2016-10-18  Aldy Hernandez  <aldyh@redhat.com>
1653         * c.opt (Walloca): New.
1654         (Walloca-larger-than=): New.
1655         (Wvla-larger-than=): New.
1657 2016-10-17  Marek Polacek  <polacek@redhat.com>
1659         * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
1660         Return immediately when finding a match.
1661         (warn_tautological_cmp): Remove a boolean variable that is no longer
1662         needed.
1664 2016-10-17  Marek Polacek  <polacek@redhat.com>
1666         * c-attribs.c: New file.
1667         * c-common.c: Move attributes handling to c-attribs.c.
1668         (get_nonnull_operand): No longer static.
1669         * c-common.h: Move the declarations from c-attribs.c to its own section.
1671 2016-10-14  Jason Merrill  <jason@redhat.com>
1673         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
1674         and __cpp_deduction_guides.
1676 2016-10-13  Jason Merrill  <jason@redhat.com>
1678         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
1680 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1682         * c-cppbuiltin.c: Include memmodel.h.
1683         * c-opts.c: Likewise.
1684         * c-pragma.c: Likewise.
1685         * c-warn.c: Likewise.
1687 2016-10-12  Jakub Jelinek  <jakub@redhat.com>
1689         * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
1690         (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
1691         * c-opts.c (sanitize_cpp_opts): Initialize
1692         cpp_opts->cpp_warn_implicit_fallthrough.
1694 2016-10-11  Marek Polacek  <polacek@redhat.com>
1696         * c-common.c (warning_candidate_p): Change the return type to bool
1697         and return true/false instead of 1/0.
1698         (vector_mode_valid_p): Likewise.
1700 2016-10-11  Marek Polacek  <polacek@redhat.com>
1702         * c-common.c (fold_for_warn): No longer static.
1703         (bool_promoted_to_int_p): Likewise.
1704         (c_common_get_narrower): Likewise.
1705         (constant_expression_warning): Move to c-warn.c.
1706         (constant_expression_error): Likewise.
1707         (overflow_warning): Likewise.
1708         (warn_logical_operator): Likewise.
1709         (find_array_ref_with_const_idx_r): Likewise.
1710         (warn_tautological_cmp): Likewise.
1711         (expr_has_boolean_operands_p): Likewise.
1712         (warn_logical_not_parentheses): Likewise.
1713         (warn_if_unused_value): Likewise.
1714         (strict_aliasing_warning): Likewise.
1715         (sizeof_pointer_memaccess_warning): Likewise.
1716         (check_main_parameter_types): Likewise.
1717         (conversion_warning): Likewise.
1718         (warnings_for_convert_and_check): Likewise.
1719         (match_case_to_enum_1): Likewise.
1720         (match_case_to_enum): Likewise.
1721         (c_do_switch_warnings): Likewise.
1722         (warn_for_omitted_condop): Likewise.
1723         (readonly_error): Likewise.
1724         (lvalue_error): Likewise.
1725         (invalid_indirection_error): Likewise.
1726         (warn_array_subscript_with_type_char): Likewise.
1727         (warn_about_parentheses): Likewise.
1728         (warn_for_unused_label): Likewise.
1729         (warn_for_div_by_zero): Likewise.
1730         (warn_for_memset): Likewise.
1731         (warn_for_sign_compare): Likewise.
1732         (do_warn_double_promotion): Likewise.
1733         (do_warn_unused_parameter): Likewise.
1734         (record_locally_defined_typedef): Likewise.
1735         (maybe_record_typedef_use): Likewise.
1736         (maybe_warn_unused_local_typedefs): Likewise.
1737         (maybe_warn_bool_compare): Likewise.
1738         (maybe_warn_shift_overflow): Likewise.
1739         (warn_duplicated_cond_add_or_warn): Likewise.
1740         (diagnose_mismatched_attributes): Likewise.
1741         * c-common.h: Move the declarations from c-warn.c to its own section.
1742         * c-warn.c: New file.
1744 2016-10-08  Jason Merrill  <jason@redhat.com>
1746         * c-common.c (c_common_truthvalue_conversion): Don't distribute
1747         into COND_EXPR in C++.
1749 2016-10-08  Jakub Jelinek  <jakub@redhat.com>
1751         * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
1752         token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
1753         CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
1755 2016-10-07  Jakub Jelinek  <jakub@redhat.com>
1757         Implement LWG2296 helper intrinsic
1758         * c-common.h (enum rid): Add RID_ADDRESSOF.
1759         * c-common.c (c_common_reswords): Add __builtin_addressof.
1761 2016-10-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1763         PR c++/77700
1764         * c-common.c (c_common_truthvalue_conversion): Warn also for
1765         suspicious enum values in boolean context.
1767 2016-10-06  Jakub Jelinek  <jakub@redhat.com>
1769         Implement P0258R2 - helper for C++17
1770         std::has_unique_object_representations trait
1771         * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
1772         * c-common.c (c_common_reswords): Add
1773         __has_unique_object_representations.
1775 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
1777         PR sanitizer/66343
1778         * c-ubsan.c (ubsan_instrument_return): Don't call
1779         initialize_sanitizer_builtins here.
1781 2016-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1783         * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
1784         conditional expression in boolean context when only one arm is
1785         non-boolean.
1787 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
1789         PR sanitizer/77823
1790         * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
1791         is not integral.
1793         * c-common.c (c_common_reswords): Update comment for C++11.
1795 2016-10-04  Jason Merrill  <jason@redhat.com>
1797         * c-common.c (make_tree_vector_from_ctor): New.
1798         * c-common.h: Declare it.
1800 2016-10-04  Jakub Jelinek  <jakub@redhat.com>
1802         * c-cppbuiltin.c (c_cpp_builtins): Don't define
1803         __LIBGCC_JCR_SECTION_NAME__.
1805 2016-10-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1807         * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
1808         left shift in boolean context.
1810 2016-09-29  Jakub Jelinek  <jakub@redhat.com>
1812         Implement P0001R1 - C++17 removal of register storage class specifier
1813         * c.opt (Wregister): New warning.
1814         * c-opts.c (c_common_post_options): Enable -Wregister by
1815         default for C++17.
1817 2016-09-29  James Greenhalgh  <james.greenhalgh@arm.com>
1819         * c-opts.c (c_common_post_options): Remove special case for
1820         TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
1821         in C++.
1823 2016-09-27  Jakub Jelinek  <jakub@redhat.com>
1825         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
1826         -std=c++1z.
1828         * c-ada-spec.c (print_ada_declaration): Remove break after return.
1830 2016-09-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1832         * c-common.c: Include memmodel.h.
1834 2016-09-26  Marek Polacek  <polacek@redhat.com>
1836         * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
1838 2016-09-26  Marek Polacek  <polacek@redhat.com>
1840         PR c/7652
1841         * c-common.c (c_common_attribute_table): Add fallthrough attribute.
1842         (handle_fallthrough_attribute): New function.
1843         (attribute_fallthrough_p): New function.
1844         * c-common.h (attribute_fallthrough_p): Declare.
1846 2016-09-24  Marek Polacek  <polacek@redhat.com>
1848         PR c/77490
1849         * c.opt (Wbool-operation): New.
1851 2016-09-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1853         * c-common.c (c_common_truthvalue_conversion): Inhibit
1854         Wint-in-bool-context warning with from_macro_definition_at.
1855         Mention the expression will always evaluate to true.
1857 2016-09-21  Martin Sebor  <msebor@redhat.com>
1859         PR bootstrap/77676
1860         * c.opt (fprintf-return-value): Temporarily initialize to zero
1861         to unblock bootstrap failures.
1863 2016-09-21  Jakub Jelinek  <jakub@redhat.com>
1865         PR c++/77651
1866         * c.opt (Waligned-new=): Add RejectNegative.
1867         (faligned-new=): Likewise.  Spelling fix - change
1868         aligned_new_threshhold to aligned_new_threshold.
1869         * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
1870         to aligned_new_threshold.
1872 2016-09-20  Martin Sebor  <msebor@redhat.com>
1874         PR middle-end/49905
1875         * c.opt: Add -Wformat-length and -fprintf-return-value.
1877 2016-09-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1879         PR c++/77434
1880         * c.opt (Wint-in-bool-context): New warning.
1881         * c-common.c (c_common_truthvalue_conversion): Warn on integer
1882         constants in boolean context.
1884 2016-09-19  Joseph Myers  <joseph@codesourcery.com>
1886         * c-common.c (max_align_t_align): Also consider alignment of
1887         float128_type_node.
1889 2016-09-15  Jason Merrill  <jason@redhat.com>
1891         * c-common.c (check_cxx_fundamental_alignment_constraints): Check
1892         DECL_EXTERNAL.
1894 2016-09-14  Jason Merrill  <jason@redhat.com>
1896         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1897         limit FIELD_DECL, either.
1899 2016-09-14  Marek Polacek  <polacek@redhat.com>
1901         * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
1902         * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
1903         * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
1905 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
1907         * c-common.c (warn_logical_not_parentheses): Replace
1908         rich_location::add_fixit_insert calls with add_fixit_insert_before
1909         and add_fixit_insert_after, eliminating the "next_loc" calculation.
1911 2016-09-13  Jason Merrill  <jason@redhat.com>
1912             Tom de Vries  <tom@codesourcery.com>
1914         PR c++/77427
1915         * c-common.c (set_underlying_type): Don't treat array as builtin type.
1917 2016-09-13  Jason Merrill  <jason@redhat.com>
1919         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1920         limit types at all.
1922 2016-09-12  Jason Merrill  <jason@redhat.com>
1924         * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
1925         bit/byte confusion, allow large alignment for types.
1927 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1929         PR c++/77496
1930         * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
1932 2016-09-12  David Malcolm  <dmalcolm@redhat.com>
1934         PR c/72858
1935         * c-format.c (argument_parser::check_argument_type): Add params
1936         "type_start" and "conversion_char".  Use the former to generate
1937         offset_to_type_start and pass it and conversion_char to
1938         check_format_types.
1939         (check_format_info_main): Capture the start of the type
1940         information as "type_start", and pass it an format_char
1941         to arg_parser.check_argument_type.
1942         (check_format_types): Provide an example in the leading comment.
1943         Add params "offset_to_type_start" and "conversion_char"; pass
1944         them to format_type_warning calls.
1945         (test_get_modifier_for_format_len): Likewise.
1946         (matching_type_p): New function.
1947         (get_format_for_type): Add param "conversion_char" and move
1948         implementation into...
1949         (get_format_for_type_1): ...new function, called twice.
1950         Use new function matching_type_p rather than checking for
1951         TYPE_CANONICAL equality.
1952         (get_corrected_substring): New function.
1953         (format_type_warning): Provide an example in the leading comment.
1954         Add params "offset_to_type_start" and "conversion_char".  Replace
1955         call to get_format_for_type with call to get_corrected_substring
1956         and move rejection of hints for widths/precisions there.
1957         (assert_format_for_type_streq): Add param "conversion_char".
1958         (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
1959         (test_get_format_for_type_printf): Add conversion chars to the
1960         tests, adding coverage for various combinations of integer
1961         vs double conversions, and for preserving octal and hexadecimal
1962         conversions.
1963         (test_get_format_for_type_scanf): Add conversion chars to the
1964         tests.
1966 2016-09-10  Tom de Vries  <tom@codesourcery.com>
1968         PR C/71602
1969         * c-common.c (build_va_arg): Handle more strict
1970         targetm.canonical_va_list_type.  Replace first argument type error with
1971         assert.
1973 2016-09-09  Martin Sebor  <msebor@redhat.com>
1975         PR c/77520
1976         PR c/77521
1977         * c-format.c (argument_parser::find_format_char_info): Use %qc
1978         format directive unconditionally.
1980 2016-09-09  Jason Merrill  <jason@redhat.com>
1982         Implement C++17 new of over-aligned types.
1983         * c.opt: Add -faligned-new and -Waligned-new.
1984         * c-common.c (max_align_t_align): Split out from...
1985         (cxx_fundamental_alignment_p): ...here.
1986         * c-common.h: Declare it.
1987         * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
1989 2016-09-09  Joseph Myers  <joseph@codesourcery.com>
1991         * c-cppbuiltin.c (builtin_define_type_width): New function.
1992         (builtin_define_stdint_macros, c_cpp_builtins): Define type width
1993         macros.
1995 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
1997         * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
1998         a POINTER_TYPE.
1999         (substring_loc::get_location): Move to substring-locations.c,
2000         keeping implementation as...
2001         (c_get_substring_location): New function, from the above, reworked
2002         to use accessors rather than member lookup.
2003         * c-common.h (class substring_loc): Move to substring-locations.h,
2004         replacing with a forward decl.
2005         (c_get_substring_location): New decl.
2006         * c-format.c: Include "substring-locations.h".
2007         (format_warning_va): Move to substring-locations.c.
2008         (format_warning_at_substring): Likewise.
2010 2016-09-06 Martin Sebor  <msebor@redhat.com>
2012         PR c/77336
2013         * c-format.c (check_function_format): Avoid issuing warnings for
2014         functions unless they call format functions with non-constant
2015         format strings.
2017 2016-09-06  Richard Biener  <rguenther@suse.de>
2019         PR c/77450
2020         * c-common.c (c_common_mark_addressable_vec): Handle
2021         COMPOUND_LITERAL_EXPR.
2023 2016-09-05  Marek Polacek  <polacek@redhat.com>
2025         PR c/77423
2026         * c-common.c (bool_promoted_to_int_p): New function.
2027         (expr_has_boolean_operands_p): New function.
2028         (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2029         (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2031 2016-09-04  Tom de Vries  <tom@codesourcery.com>
2033         revert:
2034         2016-08-29  Tom de Vries  <tom@codesourcery.com>
2036         * c-common.c (build_va_arg): Replace first argument type error
2037         with assert.
2039 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
2041         PR c/65467
2042         * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2043         (c_finish_omp_for): Reject _Atomic qualified iterators.
2045 2016-09-01  Martin Sebor  <msebor@redhat.com>
2047         * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2048         size to guarantee it fits the output of the formatted function
2049         regardless of its arguments.
2051 2016-09-01  Marek Polacek  <polacek@redhat.com>
2053         PR c/7652
2054         * c-common.c (resolve_overloaded_builtin): Fix formatting.  Add
2055         FALLTHRU comments.
2057 2016-08-29  Marek Polacek  <polacek@redhat.com>
2059         PR c/77292
2060         * c-common.c (warn_logical_not_parentheses): Don't warn for
2061         a comparison or a logical operator.
2063 2016-08-29  Tom de Vries  <tom@codesourcery.com>
2065         * c-common.c (build_va_arg): Fix type comparison assert.
2067 2016-08-29  Tom de Vries  <tom@codesourcery.com>
2069         * c-common.c (build_va_arg): Replace first argument type error
2070         with assert.
2072 2016-08-29  Tom de Vries  <tom@codesourcery.com>
2074         PR c/77398
2075         * c-common.c (build_va_arg): Add first argument error.  Build va_arg
2076         with error_mark_node as va_list instead of with illegal va_list.
2078 2016-08-25  Marek Polacek  <polacek@redhat.com>
2079             David Malcolm  <dmalcolm@redhat.com>
2081         * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2082         * c-common.h (warn_logical_not_parentheses): Update declaration.
2084 2016-08-22  Marek Polacek  <polacek@redhat.com>
2086         PR c++/77321
2087         * c-common.c (warn_for_memset): Check type for null.
2089 2016-08-22  Joseph Myers  <joseph@codesourcery.com>
2091         * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2092         _FloatNx types for suffixes for built-in functions.
2094 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
2096         PR c/32187
2097         * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2098         (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2099         (RID_FLOAT128X): New enum rid values.
2100         (CASE_RID_FLOATN_NX): New macro.
2101         * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2102         keywords.
2103         (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2104         corresponding complex types.
2105         (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2106         _FloatNx and corresponding complex types.
2107         (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2108         * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2109         and _FloatNx types for the widest type for determining
2110         DECIMAL_DIG.  Define __LDBL_DECIMAL_DIG__ as well as
2111         __DECIMAL_DIG__ for long double.  Handle FMA_SUFFIX being NULL.
2112         (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2113         and _FloatNx types.
2114         * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2115         constants.
2116         * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2117         _FloatNx types.
2119 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
2121         * c-opts.c (c_diagnostic_finalizer): Update for change to
2122         diagnostic_show_locus.
2124 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
2126         * c-common.c: Include "spellcheck.h".
2127         (cb_get_suggestion): New function.
2128         * c-common.h (cb_get_suggestion): New decl.
2129         * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2130         cb_get_suggestion.
2132 2016-08-18  Marek Polacek  <polacek@redhat.com>
2134         PR c/71514
2135         * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2136         and pointer-to-VLA.
2138 2016-08-16  David Malcolm  <dmalcolm@redhat.com>
2140         PR c/72857
2141         * c-common.c (substring_loc::get_range): Rename to...
2142         (substring_loc::get_location): ...this, converting param from a
2143         source_range * to a location_t *.  Call
2144         get_source_location_for_substring rather than
2145         get_source_range_for_substring, and pass in m_caret_idx.
2146         * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2147         (substring_loc::get_range): Replace with...
2148         (substring_loc::get_location): ...this.
2149         (substring_loc::set_caret_index): New method.
2150         (substring_loc): Add field m_caret_idx.
2151         * c-format.c (format_warning_va): Update for above changes.
2152         Rename local "substring_loc" to "fmt_substring_loc" to avoid
2153         clashing with type name.
2154         (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2155         (check_argument_type): Likewise.
2156         (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2157         Use a copy when emitting warnings, setting the caret index from TYPE.
2159 2016-08-16  Eric Botcazou  <ebotcazou@adacore.com>
2160             Arnaud Charlet  <charlet@adacore.com>
2162         * c-ada-spec.c (dump_number): New function.
2163         (handle_escape_character): Likewise.
2164         (print_ada_macros): Add handling of constant integers and strings.
2166 2016-08-12  Marek Polacek  <polacek@redhat.com>
2168         PR c/7652
2169         * c-common.c (scalar_to_vector): Adjust fall through comment.
2170         * c-opts.c (c_common_handle_option): Likewise.
2171         * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2172         * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2173         fall through comment.
2174         * cilk.c (extract_free_variables): Add FALLTHRU.
2176 2016-08-10  Jason Merrill  <jason@redhat.com>
2178         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2180 2016-08-09  Jason Merrill  <jason@redhat.com>
2182         * c-common.c (c_common_attribute_table): vector_size affects type
2183         identity.
2185 2016-08-09  Marek Polacek  <polacek@redhat.com>
2187         PR c/7652
2188         * c-ada-spec.c (dump_generic_ada_node): Add return.
2190 2016-08-09  Jason Merrill  <jason@redhat.com>
2192         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2193         C++17 constexpr lambdas.
2195 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
2197         PR c/64955
2198         * c-common.h (selftest::c_format_c_tests): New declaration.
2199         (selftest::run_c_tests): New declaration.
2200         * c-format.c: Include "selftest.h.
2201         (format_warning_va): Add param "corrected_substring" and use
2202         it to add a replacement fix-it hint.
2203         (format_warning_at_substring): Likewise.
2204         (format_warning_at_char): Update for new param of
2205         format_warning_va.
2206         (argument_parser::check_argument_type): Pass "fki" to
2207         check_format_types.
2208         (check_format_types): Add param "fki" and pass it to
2209         format_type_warning.
2210         (deref_n_times): New function.
2211         (get_modifier_for_format_len): New function.
2212         (selftest::test_get_modifier_for_format_len): New function.
2213         (get_format_for_type): New function.
2214         (format_type_warning): Add param "fki" and use it to attempt
2215         to provide hints for argument types when calling
2216         format_warning_at_substring.
2217         (selftest::get_info): New function.
2218         (selftest::assert_format_for_type_streq): New function.
2219         (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2220         (selftest::test_get_format_for_type_printf): New function.
2221         (selftest::test_get_format_for_type_scanf): New function.
2222         (selftest::c_format_c_tests): New function.
2224 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
2226         PR c/52952
2227         * c-format.c: Include "diagnostic.h".
2228         (location_column_from_byte_offset): Delete.
2229         (location_from_offset): Delete.
2230         (format_warning_va): New function.
2231         (format_warning_at_substring): New function.
2232         (format_warning_at_char): New function.
2233         (check_format_arg): Capture location of format_tree and pass to
2234         check_format_info_main.
2235         (argument_parser): Add fields "start_of_this_format" and
2236         "format_string_cst".
2237         (flag_chars_t::validate): Add param "format_string_cst".  Convert
2238         warning_at call using location_from_offset to call to
2239         format_warning_at_char.
2240         (argument_parser::argument_parser): Add param "format_string_cst_"
2241         and use use it to initialize field "format_string_cst".
2242         Initialize new field "start_of_this_format".
2243         (argument_parser::read_format_flags): Convert warning_at call
2244         using location_from_offset to a call to format_warning_at_char.
2245         (argument_parser::read_any_format_left_precision): Likewise.
2246         (argument_parser::read_any_format_precision): Likewise.
2247         (argument_parser::read_any_other_modifier): Likewise.
2248         (argument_parser::find_format_char_info): Likewise, in three places.
2249         (argument_parser::parse_any_scan_set): Likewise, in one place.
2250         (argument_parser::handle_conversions): Likewise, in two places.
2251         (argument_parser::check_argument_type): Add param "fmt_param_loc"
2252         and use it to make a substring_loc.  Pass the latter to
2253         check_format_types.
2254         (check_format_info_main): Add params "fmt_param_loc" and
2255         "format_string_cst".  Convert warning_at calls using
2256         location_from_offset to calls to format_warning_at_char.  Pass the
2257         new params to the arg_parser ctor.  Pass "format_string_cst" to
2258         flag_chars.validate.  Pass "fmt_param_loc" to
2259         arg_parser.check_argument_type.
2260         (check_format_types): Convert first param from a location_t
2261         to a const substring_loc & and rename to "fmt_loc".  Attempt
2262         to extract the range of the relevant parameter and pass it
2263         to format_type_warning.
2264         (format_type_warning): Convert first param from a location_t
2265         to a const substring_loc & and rename to "fmt_loc".  Add
2266         params "param_range" and "type".  Replace calls to warning_at
2267         with calls to format_warning_at_substring.
2269 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
2271         * c-format.c (class flag_chars_t): New class.
2272         (struct length_modifier): New struct.
2273         (class argument_parser): New class.
2274         (flag_chars_t::flag_chars_t): New ctor.
2275         (flag_chars_t::has_char_p): New method.
2276         (flag_chars_t::add_char): New method.
2277         (flag_chars_t::validate): New method.
2278         (flag_chars_t::get_alloc_flag): New method.
2279         (flag_chars_t::assignment_suppression_p): New method.
2280         (argument_parser::argument_parser): New ctor.
2281         (argument_parser::read_any_dollar): New method.
2282         (argument_parser::read_format_flags): New method.
2283         (argument_parser::read_any_format_width): New method.
2284         (argument_parser::read_any_format_left_precision): New method.
2285         (argument_parser::read_any_format_precision): New method.
2286         (argument_parser::handle_alloc_chars): New method.
2287         (argument_parser::read_any_length_modifier): New method.
2288         (argument_parser::read_any_other_modifier): New method.
2289         (argument_parser::find_format_char_info): New method.
2290         (argument_parser::validate_flag_pairs): New method.
2291         (argument_parser::give_y2k_warnings): New method.
2292         (argument_parser::parse_any_scan_set): New method.
2293         (argument_parser::handle_conversions): New method.
2294         (argument_parser::check_argument_type): New method.
2295         (check_format_info_main): Introduce classes argument_parser
2296         and flag_chars_t, moving the code within the loop into methods
2297         of these classes.  Make various locals "const".
2299 2016-08-05  David Malcolm  <dmalcolm@redhat.com>
2301         * c-common.c: Include "substring-locations.h".
2302         (get_cpp_ttype_from_string_type): New function.
2303         (g_string_concat_db): New global.
2304         (substring_loc::get_range): New method.
2305         * c-common.h (g_string_concat_db): New declaration.
2306         (class substring_loc): New class.
2307         * c-lex.c (lex_string): When concatenating strings, capture the
2308         locations of all tokens using a new obstack, and record the
2309         concatenation locations within g_string_concat_db.
2310         * c-opts.c (c_common_init_options): Construct g_string_concat_db
2311         on the ggc-heap.
2313 2016-07-29  Marek Polacek  <polacek@redhat.com>
2315         PR c/71926
2316         * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2317         parentheses warning.
2319         PR c/71574
2320         * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2322 2016-07-28  Martin Liska  <mliska@suse.cz>
2324         PR gcov-profile/68025
2325         * c-common.c (handle_no_profile_instrument_function_attribute):
2327 2016-07-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2329         * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2330         BITS_PER_UNIT_LOG.
2332 2016-07-25  Jason Merrill  <jason@redhat.com>
2334         PR c++/65970
2335         * c.opt (fconstexpr-loop-limit): New.
2337 2016-07-22  Martin Sebor  <msebor@redhat.com>
2339         PR c++/71675
2340         * c-common.c (resolve_overloaded_builtin): Avoid converting
2341         __atomic_compare_exchange_n return type to that of what its
2342         first argument points to.
2344 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
2346         * c-common.c: Use HOST_WIDE_INT_M1U instead of
2347         ~(unsigned HOST_WIDE_INT) 0.
2349 2016-07-22  Martin Liska  <mliska@suse.cz>
2351         PR gcov-profile/69028
2352         PR gcov-profile/62047
2353         * cilk.c (create_cilk_helper_decl): Set location of a new decl
2354         to the current_function_decl.
2356 2016-07-21  Jason Merrill  <jason@redhat.com>
2358         PR c++/65168
2359         * c-common.c (c_common_truthvalue_conversion): Check
2360         c_inhibit_evaluation_warnings for warning about address of
2361         reference.
2363 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
2365         * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2366         const char *.
2368 2016-07-15  Jason Merrill  <jason@redhat.com>
2370         * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2372 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
2374         PR c/71858
2375         * c-common.h (enum lookup_name_fuzzy_kind): Add
2376         FUZZY_LOOKUP_FUNCTION_NAME.
2378 2016-07-08  Jason Merrill  <jason@redhat.com>
2380         P0145: Refining Expression Order for C++.
2381         * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2382         * c-opts.c: Adjust.
2384 2016-07-05  Markus Trippelsdorf  <markus@trippelsdorf.de>
2386         PR c++/71214
2387         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2389 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
2391         * c-pragma.h (enum pragma_kind): Rename
2392         PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE.  Adjust all
2393         users.
2395 2016-06-29  Richard Biener  <rguenther@suse.de>
2397         PR middle-end/71002
2398         * c-common.c (c_common_get_alias_set): Remove union type punning case.
2400 2016-06-24  Jason Merrill  <jason@redhat.com>
2402         P0145R2: Refining Expression Order for C++.
2403         * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2404         MODIFY_EXPR.
2406 2016-06-24  Jakub Jelinek  <jakub@redhat.com>
2408         * c-common.c (check_builtin_function_arguments): Require last
2409         argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2410         Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2411         if the last argument is pointer to enumerated or boolean type.
2413 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
2415         PR c/70339
2416         * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2417         (lookup_name_fuzzy): New prototype.
2419 2016-06-21  John David Anglin  <danglin@gcc.gnu.org>
2421         * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2423 2016-06-14  Jason Merrill  <jason@redhat.com>
2425         P0145R2: Refining Expression Order for C++.
2426         * c.opt (fargs-in-order): New.
2427         * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2429 2016-06-13  Jakub Jelinek  <jakub@redhat.com>
2431         PR sanitizer/71498
2432         * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2433         all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2435         PR preprocessor/71183
2436         * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2437         to cb_get_source_date_epoch.
2439 2016-06-10  Jakub Jelinek  <jakub@redhat.com>
2441         PR c/68657
2442         * c.opt (Wpsabi): Add Warning flag.
2444 2016-06-10  Martin Sebor  <msebor@redhat.com>
2446         PR c/71392
2447         * c-common.c (handle_nonnull_attribute): Accept
2448         the nonnull attribute in type-generic builtins.
2450 2016-06-09  Martin Sebor  <msebor@redhat.com>
2452         PR c/70883
2453         * c-common.c (builtin_function_validate_nargs): Make text of error
2454         message consistent with others like it.
2456 2016-06-08  Martin Sebor  <msebor@redhat.com>
2457             Jakub Jelinek  <jakub@redhat.com>
2459         PR c++/70507
2460         PR c/68120
2461         * c-common.c (check_builtin_function_arguments): Handle
2462         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2464 2016-06-08  Richard Biener  <rguenther@suse.de>
2466         * c-common.c (parse_optimize_options): Improve diagnostic messages.
2468 2016-06-07  Richard Biener  <rguenther@suse.de>
2470         PR c/61564
2471         * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2472         options and warn about others.
2474 2016-06-01  Eduard Sanou  <dhole@openmailbox.org>
2476         * c-common.c (get_source_date_epoch): Rename to
2477         cb_get_source_date_epoch.
2478         * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
2479         message when the parsing fails.  Use error_at instead of fatal_error.
2480         * c-common.h (get_source_date_epoch): Rename to
2481         cb_get_source_date_epoch.
2482         * c-common.h (cb_get_source_date_epoch): Prototype.
2483         * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
2484         * c-common.h (c_omp_region_type): Remove trailing comma.
2485         * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
2486         * c-lex.c (c_lex_with_flags): Remove initialization of
2487         pfile->source_date_epoch.
2489 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
2491         PR c++/71349
2492         * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
2493         C_OMP_CLAUSE_SPLIT_TARGET.  Put OMP_CLAUSE_NOWAIT to
2494         C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
2495         instead of C_OMP_CLAUSE_SPLIT_FOR.
2497 2016-05-24  Richard Biener  <rguenther@suse.de>
2499         PR middle-end/70434
2500         PR c/69504
2501         * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
2502         (convert_vector_to_array_for_subscript): ... this.
2503         * c-common.c (convert_vector_to_pointer_for_subscript): Use a
2504         VIEW_CONVERT_EXPR to an array type.  Rename to ...
2505         (convert_vector_to_array_for_subscript): ... this.
2507 2016-05-12  Marek Polacek  <polacek@redhat.com>
2509         PR c/70756
2510         * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
2511         size_in_bytes and pass LOC to it.
2513 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
2515         PR c/43651
2516         * c.opt (Wduplicate-decl-specifier): New option.
2518 2016-05-11  Marek Polacek  <polacek@redhat.com>
2520         PR c++/71024
2521         * c-common.c (diagnose_mismatched_attributes): New function.
2522         * c-common.h (diagnose_mismatched_attributes): Declare.
2524 2016-05-04  Marek Polacek  <polacek@redhat.com>
2526         * c.opt (Wdangling-else): New option.
2528 2016-05-03  Marek Polacek  <polacek@redhat.com>
2530         PR c/70859
2531         * c-common.c (builtin_function_validate_nargs): Add location
2532         parameter.  Use it.
2533         (check_builtin_function_arguments): Add location and arguments
2534         parameters.  Use them.
2535         * c-common.h (check_builtin_function_arguments): Update declaration.
2537 2016-05-03  Richard Biener  <rguenther@suse.de>
2539         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
2540         allow call args to gimplify to SSA names.
2542 2016-05-03  Marek Polacek  <polacek@redhat.com>
2544         * c-common.h (enum c_omp_region_type): Remove stray comma.
2546 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
2548         * c-common.h (enum c_omp_region_type): Define.
2550 2016-05-02  Richard Sandiford  <richard.sandiford@arm.com>
2552         * c-common.c (shorten_compare): Use wi::to_wide.
2554 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
2556         PR middle-end/70626
2557         * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
2558         * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
2559         reduction clauses in acc parallel loops.
2561 2016-04-29  Marek Polacek  <polacek@redhat.com>
2563         PR c/70852
2564         * c-common.c (warn_for_memset): Check domain before accessing it.
2566 2016-04-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
2568         PR/69089
2569         * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
2570         "aligned" attribute.
2572 2016-04-28  Jason Merrill  <jason@redhat.com>
2574         * c-lex.c (c_common_has_attribute): Handle nodiscard.
2576 2016-04-28  Eduard Sanou  <dhole@openmailbox.org>
2577             Matthias Klose  <doko@debian.org>
2579         * c-common.c (get_source_date_epoch): New function, gets the environment
2580         variable SOURCE_DATE_EPOCH and parses it as long long with error
2581         handling.
2582         * c-common.h (get_source_date_epoch): Prototype.
2583         * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
2585 2015-04-27  Ryan Burn  <contact@rnburn.com>
2587         PR c++/69024
2588         PR c++/68997
2589         * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
2590         (cilk_recognize_spawn): Renamed from recognize_spawn and change to
2591         external linkage.
2592         (cilk_detect_and_unwrap): Corresponding changes.
2593         (extract_free_variables): Don't extract free variables from
2594         AGGR_INIT_EXPR slot.
2595         * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
2596         (cilk_recognize_spawn): Likewise.
2598 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
2600         * c.opt (Wmemset-elt-size): New option.
2601         * c-common.c (warn_for_memset): New function.
2602         * c-common.h (warn_for_memset): Declare.
2604 2016-04-25  Jason Merrill  <jason@redhat.com>
2606         * c-common.c (handle_unused_attribute): Accept CONST_DECL.
2607         No longer static.
2608         * c-common.h: Declare it.
2609         * c-lex.c (c_common_has_attribute): Add maybe_unused.
2611 2016-04-22  Jason Merrill  <jason@redhat.com>
2613         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
2615 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
2617         PR c++/69363
2618         * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
2619         * c-common.h (c_finish_cilk_clauses): Remove declaration.
2621 2016-04-18  Michael Matz  <matz@suse.de>
2623         * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
2624         and SET_DECL_ALIGN.
2626 2016-04-17  Eric Botcazou  <ebotcazou@adacore.com>
2628         * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
2629         (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
2630         to incomplete types.
2631         (dump_nested_type): Remove redundant tests and tidy up.
2632         (print_ada_declaration): Also set TREE_VISITED on the declaration of
2633         a type which is the typedef of an original type.
2635 2016-04-15  Marek Polacek  <polacek@redhat.com>
2637         PR c/70651
2638         * c-common.c (build_va_arg): Change two asserts into errors and return
2639         error_mark_node.
2641 2016-04-13  Marek Polacek  <polacek@redhat.com>
2643         PR c++/70639
2644         * c-indentation.c (should_warn_for_misleading_indentation): Bail out
2645         for switch statements, too.
2647 2016-03-28  Jason Merrill  <jason@redhat.com>
2649         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
2651 2016-03-23  Marek Polacek  <polacek@redhat.com>
2653         PR c++/69884
2654         * c.opt (Wignored-attributes): New option.
2656 2016-03-22  David Malcolm  <dmalcolm@redhat.com>
2658         PR c/69993
2659         * c-indentation.c (warn_for_misleading_indentation): Rewrite the
2660         diagnostic text, reversing the order of the warning and note so
2661         that they appear in source order.
2663 2016-03-17  Marek Polacek  <polacek@redhat.com>
2665         PR c/69407
2666         * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
2667         operations.
2669 2016-03-14  Jason Merrill  <jason@redhat.com>
2671         * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
2673         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
2675 2016-03-09  Richard Biener  <rguenther@suse.de>
2677         PR c/70143
2678         * c-common.c (strict_aliasing_warning): Add back
2679         alias_sets_conflict_p check.
2681 2016-03-08  Jason Merrill  <jason@redhat.com>
2683         * c-opts.c (set_std_cxx1z): Don't enable concepts.
2685 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
2687         PR c/68187
2688         * c-indentation.c (get_visual_column): Move code to determine next
2689         tab stop to...
2690         (next_tab_stop): ...this new function.
2691         (line_contains_hash_if): Delete function.
2692         (detect_preprocessor_logic): Delete function.
2693         (get_first_nws_vis_column): New function.
2694         (detect_intervening_unindent): New function.
2695         (should_warn_for_misleading_indentation): Replace call to
2696         detect_preprocessor_logic with a call to
2697         detect_intervening_unindent.
2699 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
2701         PR c/68187
2702         * c-indentation.c (should_warn_for_misleading_indentation): When
2703         suppressing warnings about cases where the guard and body are on
2704         the same column, only use the first non-whitespace column in place
2705         of the guard token column when dealing with "else" clauses.
2706         When rejecting aligned BODY and NEXT, loosen the requirement
2707         from equality with the first non-whitespace of guard to simply
2708         that they not be indented relative to it.
2710 2016-03-04  Richard Biener  <rguenther@suse.de>
2712         PR c++/70054
2713         * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
2714         instead of alias_sets_conflict_p.
2716 2016-03-01  Marek Polacek  <polacek@redhat.com>
2718         PR c++/69795
2719         * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
2720         any DECL.
2722 2016-02-22  Martin Sebor  <msebor@redhat.com>
2724         PR middle-end/69780
2725         * c-common.c (check_builtin_function_arguments): Validate and
2726         reject invalid arguments to __builtin_alloca_with_align.
2728 2016-02-20  Mark Wielaard  <mjw@redhat.com>
2730         PR c/28901
2731         * c.opt (Wunused-const-variable): Turn into Alias for...
2732         (Wunused-const-variable=): New option.
2734 2016-02-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2736         PR c++/69865
2737         * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
2738         here...
2739         (c_common_init_options): ...to here.
2740         (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
2742 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
2744         PR c++/69826
2745         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
2746         (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
2747         flag_preprocess_only.
2749 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
2751         PR c/69835
2752         * c.opt (Wnonnull-compare): Enable for -Wall.
2754 2016-02-15  Jakub Jelinek  <jakub@redhat.com>
2756         PR c++/69797
2757         * c-common.c (sync_resolve_size): Diagnose too few arguments
2758         even when params is non-NULL empty vector.
2760 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
2762         PR target/60410
2763         * c.opt (fshort-double): Remove.
2765 2016-02-05  Martin Sebor  <msebor@redhat.com>
2767         PR c++/69662
2768         * c.opt (Warning options): Update -Wplacement-new to take
2769         an optional argument.
2771 2016-02-01  Jakub Jelinek  <jakub@redhat.com>
2773         PR preprocessor/69543
2774         PR c/69558
2775         * c-pragma.c (handle_pragma_diagnostic): Pass input_location
2776         instead of loc to control_warning_option.
2778 2016-02-01  Nathan Sidwell  <nathan@codesourcery.com>
2780         * c.opt (fopenacc-dim=): New option.
2782 2016-01-27  Ryan Burn  <contact@rnburn.com>
2784         PR cilkplus/69267
2785         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
2786         gimplify_arg. Removed superfluous post_p argument.
2787         * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
2788         superfluous post_p argument.
2789         * c-gimplify.c (c_gimplify_expr): Likewise.
2791 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
2793         PR other/69006
2794         * c-opts.c (c_diagnostic_finalizer): Replace invocation of
2795         pp_newline_and_flush with pp_flush.
2797 2016-01-20  Martin Sebor  <msebor@redhat.com>
2799         PR c/69405
2800         * c-common.c (sync_resolve_size): Avoid printing diagnostic about
2801         an incompatible argument when the argument isn't a valid tree node.
2803 2016-01-18  Jason Merrill  <jason@redhat.com>
2805         PR c++/68767
2806         * c-common.c (check_function_arguments_recurse): Fold the whole
2807         COND_EXPR, not just the condition.
2809 2016-01-18  Tom de Vries  <tom@codesourcery.com>
2811         * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
2812         classify as loop clause.
2814 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
2816         PR bootstrap/68271
2817         * c-pragma.c (c_register_pragma_1): Adjust comment to note that
2818         C++ FE no longer has limit on number of pragmas.
2820 2015-01-14  Ryan Burn  <contact@rnburn.com>
2822         PR c++/69048
2823         * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
2824         to add missing cleanup point.
2826 2016-01-14  David Malcolm  <dmalcolm@redhat.com>
2828         PR c++/68819
2829         * c-indentation.c (get_visual_column): Add location_t param.
2830         Handle the column number being zero by effectively disabling the
2831         warning, with an "inform".
2832         (should_warn_for_misleading_indentation): Add location_t argument
2833         for all uses of get_visual_column.
2835 2016-01-10  Patrick Palka  <ppalka@gcc.gnu.org>
2837         PR c++/69029
2838         * c-indentation.c (should_warn_for_misleading_indentation):
2839         Don't warn about do-while statements.
2841 2016-01-07  Martin Sebor  <msebor@redhat.com>
2843         PR c/68966
2844         * c-common.c (sync_resolve_size): Reject first argument when it's
2845         a pointer to _Bool.
2847 2016-01-05  David Malcolm  <dmalcolm@redhat.com>
2849         PR c/69122
2850         * c-indentation.c (get_visual_column): Remove default argument.
2851         (should_warn_for_misleading_indentation): For the multiline case,
2852         update call to get_visual_column for next_stmt_exploc so that it
2853         captures the location of the first non-whitespace character in the
2854         relevant line.  Don't issue warnings if there is non-whitespace
2855         before the next statement.
2857 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
2859         Update copyright years.
2861 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
2863         * c-common.c (binary_op_error): Convert first param from
2864         location_t to rich_location * and use it when emitting an error.
2865         * c-common.h (binary_op_error): Convert first param from
2866         location_t to rich_location *.
2868 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
2870         * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
2871         * c-lex.c (conflict_marker_get_final_tok_kind): New function.
2873 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
2875         * c-common.c (c_common_attribute_table): Handle "omp declare target
2876         link" attribute.
2878 2015-12-14  Jakub Jelinek  <jakub@redhat.com>
2880         PR c/68833
2881         * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
2883 2014-12-12  Tobias Burnus  <burnus@net-b.de>
2885         PR fortran/68815
2886         * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
2887         specifiers (%d, %i,%u and %c).
2889 2015-12-10  David Malcolm  <dmalcolm@redhat.com>
2891         * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
2893 2015-12-08  Jakub Jelinek  <jakub@redhat.com>
2895         PR c/48088
2896         PR c/68657
2897         * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
2898         * c-pragma.c (handle_pragma_diagnostic): Adjust
2899         control_warning_option caller.
2901 2015-12-07  David Malcolm  <dmalcolm@redhat.com>
2903         * c-common.c (c_cpp_error): Update for change to
2904         rich_location::set_range.
2906 2015-12-04  Paolo Bonzini  <bonzini@gnu.org>
2908         * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
2909         shifting 1 out of the sign bit.
2911 2015-12-04  Kirill Yukhin  <kirill.yukhin@intel.com>
2913         * c-common.c (c_common_attribute_table[]): Update max arguments
2914         count for "simd" attribute.
2915         (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
2917 2015-12-03  Jakub Jelinek  <jakub@redhat.com>
2919         PR preprocessor/57580
2920         * c-ppoutput.c (print): Change printed field to bool.
2921         Move src_file last for smaller padding.
2922         (init_pp_output): Set print.printed to false instead of 0.
2923         (scan_translation_unit): Fix up formatting.  Set print.printed
2924         to true after printing something other than newline.
2925         (scan_translation_unit_trad): Set print.printed to true instead of 1.
2926         (maybe_print_line_1): Set print.printed to false instead of 0.
2927         (print_line_1): Likewise.
2928         (do_line_change): Set print.printed to true instead of 1.
2929         (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
2930         dump_macro): Set print.printed to false after printing newline.
2932 2015-12-02  Jason Merrill  <jason@redhat.com>
2934         * c-common.c (fold_for_warn): New.
2935         (warn_logical_operator, warn_tautological_cmp)
2936         (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
2938         * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2939         (c_fully_fold_internal, decl_constant_value_for_optimization):
2940         Move to c/c-fold.c.
2941         * c-common.h: Don't declare decl_constant_value_for_optimization.
2943 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
2945         PR c/68162
2946         * c-common.h (c_build_qualified_type): Add extra default
2947         arguments.
2949 2015-12-01  Julian Brown  <julian@codesourcery.com>
2950             Cesar Philippidis  <cesar@codesourcery.com>
2951             James Norris  <James_Norris@mentor.com>
2953         * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
2954         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
2955         (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
2957 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
2959         * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
2960         (decl_sloc_common): Delete and move bulk of processing to...
2961         (decl_sloc): ...here.
2962         (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
2963         (dump_ada_double_name): Remove S parameter and compute the suffix.
2964         (dump_ada_array_type): Add PARENT parameter.  Simplify computation of
2965         element type and deal with an anonymous one.
2966         (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
2967         (dump_generic_ada_node): Tweak.  Adjust call to dump_ada_array_type
2968         and remove reference to QUAL_UNION_TYPE.
2969         (dump_nested_types): Make 2 passes on the fields and move bulk to...
2970         (dump_nested_type): ...here.  New function extracted from above.
2971         Generate a full declaration for anonymous element type of arrays.
2972         (print_ada_declaration): Really skip anonymous declarations.  Remove
2973         references to QUAL_UNION_TYPE.  Adjust call to dump_ada_array_type.
2974         Clean up processing of declarations of array types and objects.
2975         (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
2976         Remove obsolete code and tidy up.
2978 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
2980         PR c/67581
2981         * c-common.c (handle_transparent_union_attribute): Update
2982         also type variants.
2984 2015-11-27  Martin Liska  <mliska@suse.cz>
2986         PR c++/68312
2987         * array-notation-common.c (cilkplus_extract_an_triplets):
2988         Release vector of vectors.
2989         * cilk.c (gimplify_cilk_spawn): Free allocated memory.
2991 2015-11-26  Eric Botcazou  <ebotcazou@adacore.com>
2993         PR c++/68527
2994         * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
2995         (print_ada_struct_decl): Likewise.
2997 2015-11-23  Igor Zamyatin  <igor.zamyatin@intel.com>
2999         PR c++/68001
3000         * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3001         * cilk.c (recognize_spawn): Determine location in a more precise
3002         way.
3004 2015-11-19  Jason Merrill  <jason@redhat.com>
3006         * c-common.c (shorten_compare): But look through macros from
3007         system headers.
3009 2015-11-18  Jason Merrill  <jason@redhat.com>
3011         * c-common.c (shorten_compare): Don't -Wtype-limits if the
3012         non-constant operand comes from a macro.
3014 2015-11-17  Jason Merrill  <jason@redhat.com>
3016         PR bootstrap/68346
3017         * c-common.c (warn_tautological_cmp): Fold before checking for
3018         constants.
3020 2015-11-16  Marek Polacek  <polacek@redhat.com>
3022         PR c++/68362
3023         * c-common.c (check_case_bounds): Fold low and high cases.
3025 2015-11-16  Marek Polacek  <polacek@redhat.com>
3027         * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3028         * c-common.c (c_common_get_alias_set): Likewise.
3029         (handle_visibility_attribute): Likewise.
3031 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
3033         * c-common.c (handle_simd_attribute): New.
3034         (struct attribute_spec): Add entry for "simd".
3035         (handle_simd_attribute): New.
3037 2015-11-13  Kai Tietz  <ktietz70@googlemail.com>
3039         * c-lex.c (interpret_float): Use fold_convert.
3041 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
3043         * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3044         and store it on the result.
3045         * c-opts.c (c_common_init_options): Set
3046         global_dc->colorize_source_p.
3048 2015-11-12  James Norris  <jnorris@codesourcery.com>
3049             Joseph Myers  <joseph@codesourcery.com>
3051         * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3052         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3053         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3054         PRAGMA_OACC_CLAUSE_LINK.
3056 2015-11-11  Marek Polacek  <polacek@redhat.com>
3058         PR c/68107
3059         PR c++/68266
3060         * c-common.c (valid_array_size_p): New function.
3061         * c-common.h (valid_array_size_p): Declare.
3063 2015-11-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
3065         PR bootstrap/68271
3066         * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3068 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
3070         * array-notation-common.c: Remove unused header files.
3071         * c-ada-spec.c: Likewise.
3072         * c-cilkplus.c: Likewise.
3073         * c-common.c: Likewise.
3074         * c-cppbuiltin.c: Likewise.
3075         * c-dump.c: Likewise.
3076         * c-format.c: Likewise.
3077         * c-gimplify.c: Likewise.
3078         * c-indentation.c: Likewise.
3079         * c-lex.c: Likewise.
3080         * c-omp.c: Likewise.
3081         * c-opts.c: Likewise.
3082         * c-pch.c: Likewise.
3083         * c-ppoutput.c: Likewise.
3084         * c-pragma.c: Likewise.
3085         * c-pretty-print.c: Likewise.
3086         * c-semantics.c: Likewise.
3087         * c-ubsan.c: Likewise.
3088         * cilk.c: Likewise.
3089         * stub-objc.c: Likewise.
3091 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
3092             Cesar Philippidis  <cesar@codesourcery.com>
3093             James Norris  <jnorris@codesourcery.com>
3094             Julian Brown  <julian@codesourcery.com>
3095             Nathan Sidwell  <nathan@codesourcery.com>
3097         * c-pragma.c (oacc_pragmas): Add "routine".
3098         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3100 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
3102         * c-common.c (c_common_attributes): Add scalar_storage_order.
3103         (handle_scalar_storage_order_attribute): New function.
3104         * c-pragma.c (global_sso): New variable.
3105         (maybe_apply_pragma_scalar_storage_order): New function.
3106         (handle_pragma_scalar_storage_order): Likewise.
3107         (init_pragma): Register scalar_storage_order.
3108         * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3109         * c.opt (Wscalar-storage-order): New warning.
3110         (fsso-struct=): New option.
3112 2015-11-08  Martin Sebor  <msebor@redhat.com>
3114         * c.opt (Wplacement-new): Add a period to the end of a sentence.
3116 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
3118         * c-common.c: Don't undef DEF_BUILTIN.
3120 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
3122         * c-common.c (c_cpp_error): Convert parameter from location_t to
3123         rich_location *.  Eliminate the "column_override" parameter and
3124         the call to diagnostic_override_column.
3125         Update the "done_lexing" clause to set range 0
3126         on the rich_location, rather than overwriting a location_t.
3127         * c-common.h (c_cpp_error): Convert parameter from location_t to
3128         rich_location *.  Eliminate the "column_override" parameter.
3130 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
3131             Thomas Schwinge  <thomas@codesourcery.com>
3132             James Norris  <jnorris@codesourcery.com>
3134         * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3135         AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses.  Associate REDUCTION
3136         clauses with parallel and kernels and loops.
3137         * c-pragma.h (enum pragma_omp_clause): Add entries for
3138         PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3139         * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3140         NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3141         INDEPENDENT,SEQ}.
3142         (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3144 2015-11-05  Martin Sebor  <msebor@redhat.com>
3146         PR c++/67942
3147         * c.opt (-Wplacement-new): New option.
3149 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
3151         * c-common.h (c_finish_omp_atomic): Add TEST argument.
3152         (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3153         * c-omp.c (c_finish_omp_atomic): Add TEST argument.  Don't call
3154         save_expr or create_tmp_var* if TEST is true.
3155         (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3156         Don't call add_stmt here.
3157         (struct c_omp_check_loop_iv_data): New type.
3158         (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3159         c_omp_check_loop_iv_exprs): New functions.
3160         (c_omp_split_clauses): Adjust for lastprivate being allowed on
3161         distribute.
3162         (c_omp_declare_simd_clauses_to_numbers): Change
3163         OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3164         (c_omp_declare_simd_clauses_to_decls): Similarly change those
3165         from numbers to PARM_DECLs.
3167 2015-11-04  Mikhail Maltsev  <maltsevm@gmail.com>
3169         * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3170         flag_checking.
3172 2015-11-03  Bernd Schmidt  <bschmidt@redhat.com>
3174         PR c++-common/67882
3175         * c-common.h (fold_offsetof_1): Add argument.
3176         * c-common.c (fold_offsetof_1): Diagnose more invalid
3177         offsetof expressions that reference elements past the end of
3178         an array.
3180 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
3181             Chung-Lin Tang  <cltang@codesourcery.com>
3183         * c-pragma.c (oacc_pragmas): Add "atomic".
3184         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3186 2015-10-30  Evgeny Stupachenko  <evstupac@gmail.com>
3188         * c-common.c (handle_target_clones_attribute): New.
3189         (c_common_attribute_table): Add handle_target_clones_attribute.
3190         (handle_always_inline_attribute): Add check on target_clones attribute.
3191         (handle_target_attribute): Ditto.
3193 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
3195         * array-notation-common.c: Reorder #include's and remove duplicates.
3196         * c-ada-spec.c: Likewise.
3197         * c-cilkplus.c: Likewise.
3198         * c-common.c: Likewise.
3199         * c-cppbuiltin.c: Likewise.
3200         * c-dump.c: Likewise.
3201         * c-format.c: Likewise.
3202         * c-gimplify.c: Likewise.
3203         * c-indentation.c: Likewise.
3204         * c-lex.c: Likewise.
3205         * c-omp.c: Likewise.
3206         * c-opts.c: Likewise.
3207         * c-pch.c: Likewise.
3208         * c-ppoutput.c: Likewise.
3209         * c-pragma.c: Likewise.
3210         * c-pretty-print.c: Likewise.
3211         * c-semantics.c: Likewise.
3212         * c-ubsan.c: Likewise.
3213         * cilk.c: Likewise.
3214         * stub-objc.c: Likewise.
3216 2015-10-28  Jason Merrill  <jason@redhat.com>
3218         * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3220 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
3221             James Norris  <jnorris@codesourcery.com>
3222             Cesar Philippidis  <cesar@codesourcery.com>
3224         PR c/64765
3225         PR c/64880
3226         * c-common.h (c_oacc_split_loop_clauses): Declare function.
3227         * c-omp.c (c_oacc_split_loop_clauses): New function.
3229 2015-10-21  Martin Sebor  <msebor@redhat.com>
3231         PR driver/68043
3232         * c.opt: End each sentence that describes an option with a period.
3234 2015-10-20  Marek Polacek  <polacek@redhat.com>
3236         * array-notation-common.c (is_cilkplus_vector_p): Define.
3237         * c-common.h (is_cilkplus_vector_p): Declare.
3239 2015-10-20  Marek Polacek  <polacek@redhat.com>
3241         * c.opt (std=gnu++11): Do not describe as experimental.
3242         (std=gnu++14): Likewise.
3244 2015-10-19  Jason Merrill  <jason@redhat.com>
3246         * c-cppbuiltin.c (c_cpp_builtins): Define
3247         __cpp_nontype_template_args.
3249 2015-10-19  Jason Merrill  <jason@redhat.com>
3251         * c-cppbuiltin.c (c_cpp_builtins): Define
3252         __cpp_enumerator_attributes, __cpp_fold_expressions,
3253         __cpp_unicode_characters.
3255 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
3256             Aldy Hernandez  <aldyh@redhat.com>
3258         * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3259         DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3260         (c_define_builtins): Likewise.
3261         * c-common.h (enum c_omp_clause_split): Add
3262         C_OMP_CLAUSE_SPLIT_TASKLOOP.
3263         (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3264         (c_finish_omp_for): Add ORIG_DECLV argument.
3265         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3266         201511 instead of 201307.
3267         * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3268         OMP_CRITICAL_CLAUSES to it.
3269         (c_finish_omp_ordered): Add CLAUSES argument, set
3270         OMP_ORDERED_CLAUSES to it.
3271         (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3272         to it if OMP_FOR.  Clear DECL_INITIAL on the IVs.
3273         (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3274         constructs and new OpenMP 4.5 clauses.  Clear
3275         OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD.  Add
3276         verification code.
3277         * c-pragma.c (omp_pragmas_simd): Add taskloop.
3278         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3279         (enum pragma_omp_clause): Add
3280         PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3281         and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3283 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
3285         * c-lex.c (interpret_float): Use real_equal instead of
3286         REAL_VALUES_EQUAL.
3288 2015-10-04  Jason Merrill  <jason@redhat.com>
3290         Implement N4514, C++ Extensions for Transactional Memory.
3291         * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3292         (c_common_attribute_table): Add transaction_safe_dynamic.
3293         transaction_safe now affects type identity.
3294         (handle_tm_attribute): Handle transaction_safe_dynamic.
3295         * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3296         RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3297         (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3298         (D_TRANSMEM): New.
3299         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3300         * c-pretty-print.c (pp_c_attributes_display): Don't print
3301         transaction_safe in C++.
3303 2015-10-02  Marek Polacek  <polacek@redhat.com>
3305         * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3307 2015-10-02  Marek Polacek  <polacek@redhat.com>
3309         PR c/64249
3310         * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3311         * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3312         * c.opt (Wduplicated-cond): New option.
3314 2015-10-01  Joseph Myers  <joseph@codesourcery.com>
3316         * c.opt (std=c11): Do not describe as experimental.
3317         (std=gnu11): Likewise.
3318         (std=iso9899:2011): Likewise.
3320 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
3322         * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3323         (DEF_FUNCTION_TYPE_VAR_11): Delete.
3325 2015-09-25  Marek Polacek  <polacek@redhat.com>
3327         * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3328         (ubsan_instrument_shift): Likewise.
3330 2015-09-25  Marek Polacek  <polacek@redhat.com>
3332         PR sanitizer/64906
3333         * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3335 2015-09-24  Patrick Palka  <ppalka@gcc.gnu.org>
3337         * c-indentation.c (should_warn_for_misleading_indentation):
3338         Compare next_stmt_vis_column with guard_line_first_nws instead
3339         of with guard_line_vis_column.
3341 2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3343         PR c/49654
3344         PR c/49655
3345         * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3346         options and options not valid for the current language.
3348 2015-09-22  Patrick Palka  <ppalka@gcc.gnu.org>
3350         * c-indentation.c (should_warn_for_misleading_indentation):
3351         Float out and consolidate the calls to get_visual_column that
3352         are passed guard_exploc as an argument.  Compare
3353         next_stmt_vis_column with guard_line_first_nws instead of with
3354         body_line_first_nws.
3356 2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>
3358         * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3359         Wnamespaces): New C++ warnings.
3361 2015-09-22  Jason Merrill  <jason@redhat.com>
3363         * c-common.h (abi_compat_version_crosses): New.
3364         (warn_abi_version): Declare.
3365         * c-common.c: Define it.
3366         * c-opts.c (c_common_post_options): Handle it.
3367         flag_abi_compat_version defaults to 8.
3369 2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
3371         Complete the implementation of N4230, Nested namespace definition.
3372         * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3373         __cpp_nested_namespace_definitions.
3375 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3377         * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3379 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3381         * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3382         when warning.
3383         * c-pragma.h (pragma_lex): Add optional loc argument.
3385 2015-09-16  Mikhail Maltsev  <maltsevm@gmail.com>
3387         * c-format.c (check_format_arg): Adjust to use common block size in all
3388         object pools.
3390 2015-09-15  David Malcolm  <dmalcolm@redhat.com>
3392         * c-format.c (location_from_offset): Update for change in
3393         signature of location_get_source_line.
3394         * c-indentation.c (get_visual_column): Likewise.
3395         (line_contains_hash_if): Likewise.
3397 2015-09-14  Marek Polacek  <polacek@redhat.com>
3399         * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3400         setting various warnings.
3402 2015-09-14  Marek Polacek  <polacek@redhat.com>
3404         * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3405         a negative value.
3407 2015-09-11  Mark Wielaard  <mjw@redhat.com>
3409         PR c/28901
3410         * c.opt (Wunused-variable): Option from common.opt.
3411         (Wunused-const-variable): New option.
3413 2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
3415         PR c++/53184
3416         * c.opt ([Wsubobject-linkage]): Add.
3418 2015-09-03  Martin Sebor  <msebor@redhat.com>
3420         PR c/66516
3421         * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3422         functions.
3423         * c-common.c (reject_gcc_builtin): Define.
3425 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
3427         PR middle-end/60586
3428         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3429         prototype.
3430         * c-gimplify.c (c_gimplify_expr): Added a call to the function
3431         cilk_gimplify_call_params_in_spawned_fn.
3432         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3433         (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3434         unwrapping.
3436 2015-08-25  Marek Polacek  <polacek@redhat.com>
3438         PR middle-end/67330
3439         * c-common.c (handle_weak_attribute): Don't check whether the
3440         visibility can be changed here.
3442 2015-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3444         * c-lex.c (c_lex_with_flags): Use explicit locations.
3446 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
3448         * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3449         c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3451 2015-08-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3453         PR middle-end/36757
3454         * c-common.c (check_builtin_function_arguments): Add check
3455         for BUILT_IN_SIGNBIT argument.
3457 2015-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
3459         PR c++/67160
3460         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3461         in c++1z mode.
3463 2015-08-17  Marek Polacek  <polacek@redhat.com>
3465         * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3466         with whitespaces before qualifier names.
3468 2015-08-12  Marek Polacek  <polacek@redhat.com>
3470         PR c++/55095
3471         * c-common.c (maybe_warn_shift_overflow): Properly handle
3472         left-shifting 1 into the sign bit.
3474 2015-08-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3476         * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3478 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
3479             Braden Obrzut  <admin@maniacsvault.net>
3480             Jason Merrill  <jason@redhat.com>
3482         Add C++ Concepts TS support.
3483         * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
3484         * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
3485         (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
3486         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
3487         * c-opts.c (set_std_cxx1z): Set flag_concepts.
3488         * c.opt (fconcepts): New.
3490 2015-08-02  Martin Sebor  <msebor@redhat.com>
3492         * c.opt (-Wframe-address): New warning option.
3494 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
3496         * c-indentation.c (should_warn_for_misleading_indentation):
3497         Improve heuristics.
3499 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
3501         * c-indentation.c (get_visual_column): Add parameter first_nws,
3502         use it.  Update comment documenting the function.
3503         (is_first_nonwhitespace_on_line): Remove.
3504         (should_warn_for_misleading_indentation): Replace usage of
3505         of is_first_nonwhitespace_on_line with get_visual_column.
3507 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
3509         * c-indentation.h (struct token_indent_info): Define.
3510         (get_token_indent_info): Define.
3511         (warn_for_misleading_information): Declare.
3512         * c-common.h (warn_for_misleading_information): Remove.
3513         * c-identation.c (warn_for_misleading_indentation):
3514         Change declaration to take three token_indent_infos.  Adjust
3515         accordingly.
3516         * c-identation.c (should_warn_for_misleading_indentation):
3517         Likewise.  Bail out early if the body is a compound statement.
3518         (guard_tinfo_to_string): Define.
3520 2015-07-30  Jason Merrill  <jason@redhat.com>
3522         * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
3523         '*' for reference decay.
3525 2015-07-30  Marek Polacek  <polacek@redhat.com>
3527         * c-common.c (warn_tautological_cmp): Bail for float types.
3529 2015-07-27  Marek Polacek  <polacek@redhat.com>
3531         PR bootstrap/67030
3532         * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
3534 2015-07-27  Marek Polacek  <polacek@redhat.com>
3536         PR c++/66555
3537         PR c/54979
3538         * c-common.c (find_array_ref_with_const_idx_r): New function.
3539         (warn_tautological_cmp): New function.
3540         * c-common.h (warn_tautological_cmp): Declare.
3541         * c.opt (Wtautological-compare): New option.
3543 2015-07-23  Marek Polacek  <polacek@redhat.com>
3545         * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
3546         (ubsan_instrument_shift): Likewise.
3548 2015-07-23  Marek Polacek  <polacek@redhat.com>
3550         PR sanitizer/66908
3551         * c-ubsan.c: Include gimplify.h.
3552         (ubsan_instrument_division): Unshare OP0 and OP1.
3553         (ubsan_instrument_shift): Likewise.
3555 2015-07-20  Marek Polacek  <polacek@redhat.com>
3556             Richard Sandiford  <richard.sandiford@arm.com>
3558         PR c++/55095
3559         * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
3560         Use EXPR_LOC_OR_LOC.
3561         (maybe_warn_shift_overflow): New function.
3562         * c-common.h (maybe_warn_shift_overflow): Declare.
3563         * c-opts.c (c_common_post_options): Set warn_shift_overflow.
3564         * c.opt (Wshift-overflow): New option.
3566 2015-07-16  Martin Liska  <mliska@suse.cz>
3568         * c-format.c (static void check_format_info_main): Use
3569         object_allocator instead of pool_allocator.
3570         (check_format_arg): Likewise.
3571         (check_format_info_main): Likewise.
3573 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
3575         * c-opts.c: Remove multiline #include comment.
3577 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
3579         * c-common.c: Fix double word typos.
3581 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
3583         * c-ada-spec.h (cpp_operation): Revert latest change.
3584         * c-ada-spec.c (print_ada_declaration): Likewise.  Skip implicit
3585         constructors and destructors.
3587 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
3589         * c-common.h: Adjust includes for flags.h changes.
3590         * stub-objc.c: Likewise.
3592 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
3594         * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
3595         * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
3597 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
3599         * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
3600         are to be removed, return NULL rather than original clauses list.
3602 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
3604         * array-notation-common.c: Adjust includes.
3605         * c-ada-spec.c: Likewise.
3606         * c-cilkplus.c: Likewise.
3607         * c-common.h: Likewise.
3608         * c-cppbuiltin.c: Likewise.
3609         * c-dump.c: Likewise.
3610         * c-format.c: Likewise.
3611         * c-gimplify.c: Likewise.
3612         * c-indentation.c: Likewise.
3613         * c-lex.c: Likewise.
3614         * c-omp.c: Likewise.
3615         * c-opts.c: Likewise.
3616         * c-pch.c: Likewise.
3617         * c-ppoutput.c: Likewise.
3618         * c-pragma.c: Likewise.
3619         * c-pretty-print.c: Likewise.
3620         * c-semantics.c: Likewise.
3621         * c-ubsan.c: Likewise.
3622         * cilk.c: Likewise.
3623         * stub-objc.c: Likewise.
3625 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
3627         * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
3628         * c-ada-spec.c (print_ada_declaration): Skip move constructors.
3630 2015-07-01  Jason Merrill  <jason@redhat.com>
3632         * c-common.h (D_CXX11): Rename from D_CXX0X.
3633         (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
3634         * c-common.c: Adjust.
3636         * c-opts.c (c_common_post_options): Default to C++14.
3638         * c-opts.c (c_common_post_options): Highest ABI level is now 10.
3640 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
3642         Implement N4197 - Adding u8 character literals
3643         * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
3644         CPP_CHAR.
3645         * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
3646         CPP_UTF8CHAR_USERDEF tokens.
3647         * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
3648         and CPP_UTF8CHAR tokens.
3649         (lex_charconst): Treat CPP_UTF8CHAR token.
3651 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3653         PR fortran/66605
3654         * c-common.c (do_warn_unused_parameter): Move here.
3655         * c-common.h (do_warn_unused_parameter): Declare.
3657 2015-06-29  Marek Polacek  <polacek@redhat.com>
3659         PR c/66322
3660         * c-common.c (check_case_bounds): Add bool * parameter.  Set
3661         OUTSIDE_RANGE_P.
3662         (c_add_case_label): Add bool * parameter.  Pass it down to
3663         check_case_bounds.
3664         (c_do_switch_warnings): Add bool parameters.  Implement -Wswitch-bool
3665         warning here.
3666         * c-common.h (c_add_case_label, c_do_switch_warnings): Update
3667         declarations.
3669 2015-06-27  Marek Polacek  <polacek@redhat.com>
3671         * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
3672         or VECTOR_INTEGER_TYPE_P throughout.
3673         * c-gimplify.c: Likewise.
3675 2015-06-26  Marek Polacek  <polacek@redhat.com>
3677         * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
3678         * c-common.c (c_fully_fold_internal): Likewise.
3679         (c_alignof_expr): Likewise.
3680         * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
3681         * c-ubsan.c (ubsan_instrument_bounds): Likewise.
3682         * cilk.c (create_parm_list): Likewise.
3684 2015-06-26  Marek Polacek  <polacek@redhat.com>
3686         * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
3688 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
3690         * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
3691         * c-gimplify.c: Likewise.
3692         * c-pragma.c: Likewise.
3693         * c-ubsan.c: Likewise.
3694         * cilk.c: Likewise.
3696 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
3698         * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
3699         ggc_hasher.
3701 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
3703         * cilk.c: Move calls.h after tm.h in the include chain.
3705 2015-06-25  Marek Polacek  <polacek@redhat.com>
3707         * array-notation-common.c: Use VAR_P throughout.
3708         * c-ada-spec.c: Likewise.
3709         * c-common.c: Likewise.
3710         * c-format.c: Likewise.
3711         * c-gimplify.c: Likewise.
3712         * c-omp.c: Likewise.
3713         * c-pragma.c: Likewise.
3714         * c-pretty-print.c: Likewise.
3715         * cilk.c: Likewise.
3717 2015-06-25  Marek Polacek  <polacek@redhat.com>
3719         * cilk.c (extract_free_variables): Use is_global_var.
3721 2015-06-23  Richard Sandiford  <richard.sandiford@arm.com>
3723         * c-common.c: Don't include target-def.h.
3725 2015-06-23  Marek Polacek  <polacek@redhat.com>
3727         * c-common.c (warn_logical_operator): Use tree_int_cst_equal
3728         when comparing INTEGER_CSTs.
3730 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
3732         * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
3733         * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
3734         (dump_ada_template): Skip partially specialized types.
3736 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
3738         * c-common.c (scalar_to_vector): Use std::swap instead of manually
3739         swapping.
3741 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
3743         * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
3744         * c-ada-spec.c: Likewise.
3745         * c-cilkplus.c: Likewise.
3746         * c-common.c: Likewise.
3747         * c-common.h: Likewise.
3748         * c-cppbuiltin.c: Likewise.
3749         * c-dump.c: Likewise.
3750         * c-format.c: Likewise.
3751         * c-gimplify.c: Likewise.
3752         * c-indentation.c: Likewise.
3753         * c-lex.c: Likewise.
3754         * c-omp.c: Likewise.
3755         * c-opts.c: Likewise.
3756         * c-pch.c: Likewise.
3757         * c-ppoutput.c: Likewise.
3758         * c-pragma.c: Likewise.
3759         * c-pretty-print.c: Likewise.
3760         * c-semantics.c: Likewise.
3761         * c-ubsan.c: Likewise.
3762         * cilk.c: Likewise.
3763         * stub-objc.c: Likewise.
3765 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
3767         PR c++/65168
3768         * c-common.c (c_common_truthvalue_conversion): Warn when
3769         converting an address of a reference to a truth value.
3771 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
3773         * array-notation-common.c : Adjust include files.
3774         * c-ada-spec.c : Likewise.
3775         * c-cilkplus.c : Likewise.
3776         * c-common.c : Likewise.
3777         * c-common.h : Likewise.
3778         * c-cppbuiltin.c : Likewise.
3779         * c-dump.c : Likewise.
3780         * c-format.c : Likewise.
3781         * c-gimplify.c : Likewise.
3782         * c-indentation.c : Likewise.
3783         * c-lex.c : Likewise.
3784         * c-omp.c : Likewise.
3785         * c-opts.c : Likewise.
3786         * c-pch.c : Likewise.
3787         * c-ppoutput.c : Likewise.
3788         * c-pragma.c : Likewise.
3789         * c-pretty-print.c : Likewise.
3790         * c-semantics.c : Likewise.
3791         * c-ubsan.c : Likewise.
3792         * cilk.c : Likewise.
3793         * stub-objc.c : Likewise.
3795 2015-06-08  Marek Polacek  <polacek@redhat.com>
3797         PR c/66415
3798         * c-format.c (location_from_offset): Return LOC if LINE is null.
3800 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
3802         * c-common.h (c_parse_final_cleanups): New prototype.
3803         * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
3805 2015-06-04  Sriraman Tallam  <tmsriram@google.com>
3807         * c-common.c (noplt): New attribute.
3808         (handle_noplt_attribute): New handler.
3810 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
3812         * array-notation-common.c: Adjust includes for restructured coretypes.h.
3813         * c-ada-spec.c: Likewise.
3814         * c-cilkplus.c: Likewise.
3815         * c-common.c: Likewise.
3816         * c-common.h: Likewise.
3817         * c-cppbuiltin.c: Likewise.
3818         * c-dump.c: Likewise.
3819         * c-format.c: Likewise.
3820         * c-gimplify.c: Likewise.
3821         * c-indentation.c: Likewise.
3822         * c-lex.c: Likewise.
3823         * c-omp.c: Likewise.
3824         * c-opts.c: Likewise.
3825         * c-pch.c: Likewise.
3826         * c-ppoutput.c: Likewise.
3827         * c-pragma.c: Likewise.
3828         * c-pretty-print.c: Likewise.
3829         * c-semantics.c: Likewise.
3830         * c-ubsan.c: Likewise.
3831         * cilk.c: Likewise.
3832         * stub-objc.c: Likewise.
3834 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
3836         PR c/66220:
3837         * c-indentation.c (should_warn_for_misleading_indentation): Use
3838         expand_location rather than expand_location_to_spelling_point.
3839         Don't warn if the guarding statement is more indented than the
3840         next/body stmts.
3842 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
3844         * c-indentation.c (warn_for_misleading_indentation): Bail out
3845         immediately if -Wmisleading-indentation isn't enabled.
3847 2015-06-01  Martin Liska  <mliska@suse.cz>
3849         * c-format.c (check_format_arg):Use new type-based pool allocator.
3850         (check_format_info_main) Likewise.
3852 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
3854         * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
3855         (has_nontrivial_methods): Likewise.
3857 2015-05-25  Marek Polacek  <polacek@redhat.com>
3859         * c-ubsan.c (ubsan_instrument_shift): Use type0.
3861 2015-05-22  Marek Polacek  <polacek@redhat.com>
3863         PR c/47043
3864         * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
3866 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
3868         * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
3869         STACK_GROWS_DOWNWARD.
3871 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
3873         * c-cppbuiltin.c (c_cpp_builtins): Check the value of
3874         STACK_GROWS_DOWNWARD rather than if it is defined.
3876 2015-05-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3878         PR c/52952
3879         * c-format.c (location_column_from_byte_offset): New.
3880         (location_from_offset): New.
3881         (struct format_wanted_type): Add offset_loc field.
3882         (check_format_info): Move handling of location for extra arguments
3883         closer to the point of warning.
3884         (check_format_info_main): Pass the result of location_from_offset
3885         to warning_at.
3886         (format_type_warning): Pass the result of location_from_offset
3887         to warning_at.
3889 2015-05-20  Marek Polacek  <polacek@redhat.com>
3891         * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
3893 2015-05-20  Marek Polacek  <polacek@redhat.com>
3895         * c-ada-spec.c (dump_sloc): Use DECL_P.
3897 2015-05-20  Marek Polacek  <polacek@redhat.com>
3899         * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3900         * c-common.c: Likewise.
3902 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
3904         * c-common.h (fe_file_change): Strengthen param from
3905         const line_map * to const line_map_ordinary *.
3906         (pp_file_change): Likewise.
3907         * c-lex.c (fe_file_change): Likewise.
3908         (cb_define): Use linemap_check_ordinary when invoking
3909         SOURCE_LINE.
3910         (cb_undef): Likewise.
3911         * c-opts.c (c_finish_options): Use linemap_check_ordinary when
3912         invoking cb_file_change.
3913         (c_finish_options): Likewise.
3914         (push_command_line_include): Likewise.
3915         (cb_file_change): Strengthen param "new_map" from
3916         const line_map * to const line_map_ordinary *.
3917         * c-ppoutput.c (cb_define): Likewise for local "map".
3918         (pp_file_change): Likewise for param "map" and local "from".
3920 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
3922         * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
3924 2015-05-18  Tom de Vries  <tom@codesourcery.com>
3926         * c-common.c (build_va_arg_1): New function.
3927         (build_va_arg): Add address operator to va_list operand if necessary.
3929 2015-05-15  Mikhail Maltsev  <maltsevm@gmail.com>
3931         PR c/48956
3932         * c-common.c (int_safely_convertible_to_real_p): Define.
3933         (unsafe_conversion_p): Check conversions involving complex types.
3934         (conversion_warning): Add new warning message for conversions which
3935         discard imaginary component.
3936         * c-common.h: (enum conversion_safety): Add new enumerator for such
3937         conversions.
3939 2015-05-14  Marek Polacek  <polacek@redhat.com>
3941         PR c/66066
3942         PR c/66127
3943         * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
3944         (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
3945         C_MAYBE_CONST_EXPR_INT_OPERANDS set.  Add FOR_INT_CONST argument and
3946         use it.  If FOR_INT_CONST, require that all evaluated operands be
3947         INTEGER_CSTs.
3949 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
3951         * c-common.h (warn_for_misleading_indentation): New prototype.
3952         * c-indentation.c: New file.
3953         * c.opt (Wmisleading-indentation): New option.
3955 2015-05-12  Tom de Vries  <tom@codesourcery.com>
3957         PR tree-optimization/66010
3958         * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
3960 2015-05-09  Jason Merrill  <jason@redhat.com>
3962         * c-opts.c (c_common_post_options): Also clear
3963         cpp_opts->cpp_warn_cxx11_compat.
3965         * c-common.h (enum cxx_dialect): Add cxx_unset.
3966         * c-common.c (cxx_dialect): Initialize to cxx_unset.
3967         * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
3969         * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
3970         (std=gnu++0x): Mark as Undocumented.
3971         (std=gnu++1y): Add deprecated message.
3973 2015-05-08  Jason Merrill  <jason@redhat.com>
3975         * c.opt (Wc++11-compat): Make primary.  Rename var warn_cxx11_compat.
3976         * c-opts.c: Adjust.
3978         * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
3980 2015-05-08  Marek Polacek  <polacek@redhat.com>
3982         PR c/64918
3983         * c.opt (Woverride-init-side-effects): New option.
3985 2015-05-07  Marek Polacek  <polacek@redhat.com>
3987         PR c/65179
3988         * c-common.c (c_fully_fold_internal): Warn when left shifting a
3989         negative value.
3990         * c.opt (Wshift-negative-value): New option.
3991         * c-opts.c (c_common_post_options): Set warn_shift_negative_value
3992         when -Wextra and C99/C++11 mode.
3994 2015-05-07  Marek Polacek  <polacek@redhat.com>
3995             Martin Uecker  <uecker@eecs.berkeley.edu>
3997         * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
3998         flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4000 2015-05-05  Jason Merrill  <jason@redhat.com>
4002         * c.opt (Wterminate): New.
4004 2015-04-30  Marek Polacek  <polacek@redhat.com>
4006         * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4007         require that the non-constant be of a boolean type.
4009 2015-04-29  Josh Triplett  <josh@joshtriplett.org>
4011         * c-common.c (handle_section_attribute): Refactor to reduce
4012         nesting and distinguish between error cases.
4014 2015-04-29  Marek Polacek  <polacek@redhat.com>
4016         PR c/64610
4017         * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4018         with 0/1.
4020 2015-04-29  Jakub Jelinek  <jakub@redhat.com>
4022         * c-common.h (omp_clause_mask): Unconditionally define as a class.
4023         Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4024         HOST_BITS_PER_WIDE_INT.
4026 2015-04-28  Tom de Vries  <tom@codesourcery.com>
4028         PR tree-optimization/65887
4029         * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4031 2015-04-28  Eric Botcazou  <ebotcazou@adacore.com>
4032             Pierre-Marie de Rodat  <derodat@adacore.com>
4034         * c-ada-spec.c (in_function): Delete.
4035         (dump_generic_ada_node): Do not change in_function and remove the
4036         redundant code dealing with it.
4037         (print_ada_declaration): Do not change in_function.  Use INDENT_INCR.
4038         (print_ada_methods): Output the static member functions in a nested
4039         package after the regular methods as well as associated renamings.
4041 2015-04-24  Marek Polacek  <polacek@redhat.com>
4043         PR c/65830
4044         * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4045         and OPT_Wshift_count_overflow.
4047         PR c/63357
4048         * c-common.c (warn_logical_operator): Warn if the operands have the
4049         same expressions.
4051 2015-04-24  Marek Polacek  <polacek@redhat.com>
4053         PR c/61534
4054         * c-common.c (warn_logical_operator): Bail if either operand comes
4055         from a macro expansion.
4057 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
4059         PR target/55143
4060         * c-common.c (c_default_pointer_mode): Add definition.
4061         * c-common.h (c_default_pointer_mode): Add declaration.
4063 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
4065         * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4066         on record_builtin_type argument.
4068 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
4070         PR c/65120
4071         * c-common.c (warn_logical_not_parentheses): Don't warn for
4072         !x == 0 or !x != 0.
4074 2015-03-07  Marek Polacek  <polacek@redhat.com>
4076         PR sanitizer/65280
4077         * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4078         before trying to figure out whether we have a flexible array member.
4080 2015-03-06  Eric Botcazou  <ebotcazou@adacore.com>
4081             Jonathan Wakely  <jwakely.gcc@gmail.com>
4083         * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4085 2015-03-05  Eric Botcazou  <ebotcazou@adacore.com>
4087         PR ada/65319
4088         * c-ada-spec.c (print_destructor): Remove obsolete code.
4090 2015-03-01  Eric Botcazou  <ebotcazou@adacore.com>
4092         * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4093         (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4094         DECL_TEMPLATE_RESULT emulations.
4095         (dump_ada_template)): Add guard for TYPE_METHODS.
4097 2015-02-27  Marek Polacek  <polacek@redhat.com>
4099         PR c/65040
4100         * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4102 2015-02-27  Kai Tietz  <ktietz@redhat.com>
4104         PR c/35330
4105         * c-pragma.c (handle_pragma_weak): Do not try to create
4106         weak/alias of declarations not being function, or variable
4107         declarations.
4109 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
4111         PR libgomp/64625
4112         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4113         Remove macros.
4114         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4116 2015-02-16  Marek Polacek  <polacek@redhat.com>
4118         PR c/65066
4119         * c-format.c (check_format_types): Handle null param.
4121 2015-02-13  Marek Polacek  <polacek@redhat.com>
4123         PR c/65040
4124         * c-format.c (check_format_types): Don't warn about different
4125         signedness if the original value is in the range of WANTED_TYPE.
4127 2015-02-12  Jason Merrill  <jason@redhat.com>
4129         PR c++/64956
4130         * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4131         to the current highest version.
4132         * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4134 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
4136         PR c/64824
4137         PR c/64868
4138         * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4139         instead of RDIV_EXPR.  Use build_binary_op instead of
4140         build2_loc.
4142 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
4144         * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4145         to pass input_location as first argument.
4147 2015-01-23  Tom de Vries  <tom@codesourcery.com>
4149         PR libgomp/64672
4150         * c.opt (fopenacc): Mark as LTO option.
4152 2015-01-23  Tom de Vries  <tom@codesourcery.com>
4154         PR libgomp/64707
4155         * c.opt (fopenmp): Mark as LTO option.
4157 2015-01-21  Jakub Jelinek  <jakub@redhat.com>
4159         PR c/63307
4160         * cilk.c (fill_decls_vec): Only put decls into vector v.
4161         (compare_decls): Fix up formatting.
4163 2015-01-21  Igor Zamyatin  <igor.zamyatin@intel.com>
4165         PR c/63307
4166         * cilk.c: Include vec.h.
4167         (struct cilk_decls): New structure.
4168         (wrapper_parm_cb): Split this function to...
4169         (fill_decls_vec): ...this...
4170         (create_parm_list): ...and this.
4171         (compare_decls): New function.
4172         (for_local_cb): Remove.
4173         (wrapper_local_cb): Ditto.
4174         (build_wrapper_type): For now first traverse and fill vector of
4175         declarations then sort it and then deal with sorted vector.
4176         (cilk_outline): Ditto.
4177         (declare_one_free_variable): Ditto.
4179 2015-01-21  Jason Merrill  <jason@redhat.com>
4181         PR c++/64629
4182         * c-format.c (check_format_arg): Call decl_constant_value.
4184 2015-01-19  Martin Liska  <mliska@suse.cz>
4186         * c-common.c (handle_noicf_attribute): New function.
4188 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
4189             Bernd Schmidt  <bernds@codesourcery.com>
4190             James Norris  <jnorris@codesourcery.com>
4191             Cesar Philippidis  <cesar@codesourcery.com>
4192             Ilmir Usmanov  <i.usmanov@samsung.com>
4193             Jakub Jelinek  <jakub@redhat.com>
4195         * c.opt (fopenacc): New option.
4196         * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4197         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4198         New macros.
4199         * c-common.h (c_finish_oacc_wait): New prototype.
4200         * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4201         (c_finish_oacc_wait): New function.
4202         * c-pragma.c (oacc_pragmas): New variable.
4203         (c_pp_lookup_pragma, init_pragma): Handle it.
4204         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4205         PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4206         PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4207         PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4208         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4209         PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4210         PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4211         PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4212         PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4213         PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4214         PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4215         PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4216         PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4217         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4218         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4219         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4220         PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4221         PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4222         PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4223         PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4224         PRAGMA_OACC_CLAUSE_WORKER.
4226 2015-01-14  Marcos Diaz  <marcos.diaz@tallertechnologies.com>
4228         * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4229         for the new option fstack-protector_explicit.
4230         * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4231         (handle_stack_protect_attribute): New function.
4233 2015-01-13  Martin Uecker  <uecker@eecs.berkeley.edu>
4235         * c.opt: New option -Warray-bounds=.
4237 2015-01-09  Michael Collison  <michael.collison@linaro.org>
4239         * array-notation-common.c: Include hash-set.h, machmode.h,
4240         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4241         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4242         * c-ada-spec.c: Ditto.
4243         * c-cilkplus.c: Ditto.
4244         * c-common.c: Include input.h due to flattening of tree.h.
4245         Define macro GCC_C_COMMON_C.
4246         * c-common.h: Flatten tree.h header files into c-common.h.
4247         Remove include of tree-core.h.
4248         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4249         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4250         fold-const.h, wide-int.h, and inchash.h due to
4251         flattening of tree.h.
4252         * c-dump.c: Ditto.
4253         * c-format.c: Flatten tree.h header files into c-common.h.
4254         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4255         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4256         fold-const.h, wide-int.h, and inchash.h due to
4257         flattening of tree.h.
4258         * c-dump.c: Include hash-set.h, machmode.h,
4259         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4260         fold-const.h, wide-int.h, and inchash.h due to
4261         flattening of tree.h.
4262         * c-format.c: Include hash-set.h, machmode.h,
4263         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4264         fold-const.h, wide-int.h, inchash.h and real.h due to
4265         flattening of tree.h.
4266         * c-gimplify.c: Include hash-set.h, machmode.h,
4267         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4268         fold-const.h, wide-int.h, and inchash.h due to
4269         flattening of tree.h.
4270         * cilk.c: Ditto.
4271         * c-lex.c: Ditto.
4272         * c-omp.c: Ditto.
4273         * c-opts.c: Ditto.
4274         * c-pch.c: Ditto.
4275         * c-ppoutput.c: Ditto.
4276         * c-pragma.c: Ditto.
4277         * c-pretty-print.c: Ditto.
4278         * c-semantics.c: Ditto.
4279         * c-ubsan.c: Ditto.
4280         * stub-objc.c: Ditto.
4282 2015-01-08  Jason Merrill  <jason@redhat.com>
4284         * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4285         do_ubsan_in_current_function.
4286         (ubsan_maybe_instrument_reference_or_call): Likewise.
4287         * c-ubsan.h: Declare it.
4289 2015-01-08  Mike Stump  <mikestump@comcast.net>
4291         * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4293 2015-01-07  Marek Polacek  <polacek@redhat.com>
4295         PR c/64440
4296         * c-common.c (c_fully_fold_internal): Warn for division and modulo
4297         if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4299 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
4301         PR c++/31397
4302         * c.opt (Wsuggest-override): New option.
4304 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
4306         Update copyright years.
4308 2015-01-05  Marek Polacek  <polacek@redhat.com>
4310         PR c/64423
4311         * c-common.c (warn_array_subscript_with_type_char): Add location_t
4312         parameter.  Use it.
4313         * c-common.h (warn_array_subscript_with_type_char): Update
4314         declaration.
4316 2014-12-20  Edward Smith-Rowland  <3dw4rd@verizon.net>
4318         * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4319         Control macro with flag_sized_deallocation.
4321 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
4323         * c.opt (Wdiscarded-array-qualifiers): New option.
4325 2014-12-19  Jakub Jelinek  <jakub@redhat.com>
4327         PR preprocessor/63831
4328         * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4329         and __has_cpp_attribute here.
4330         * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4331         c_common_has_attribute.
4332         * c-common.h (c_common_has_attribute): New prototype.
4333         * c-lex.c (init_c_lex): Set cb->has_attribute to
4334         c_common_has_attribute instead of cb_has_attribute.
4335         (get_token_no_padding): New function.
4336         (cb_has_attribute): Renamed to ...
4337         (c_common_has_attribute): ... this.  No longer static.  Use
4338         get_token_no_padding, require ()s, don't build TREE_LIST
4339         unnecessarily, fix up formatting, adjust diagnostics, call
4340         init_attributes.
4342 2014-12-15  Jason Merrill  <jason@redhat.com>
4344         * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4345         (-Wsized-deallocation): New.
4346         * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4347         to on in C++14 and up.
4349 2014-12-11  Jason Merrill  <jason@redhat.com>
4351         * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4353         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4354         we aren't complaining about VLAs.
4356 2014-12-06  Marek Polacek  <polacek@redhat.com>
4358         PR tree-optimization/64183
4359         * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4360         shift-expression if it is integer_type_node.  Use types_compatible_p.
4362 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
4364         * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4365         last argument from create_tmp_var_raw and create_tmp_var calls.
4366         * cilk.c (gimplify_cilk_spawn): Likewise.
4367         * c-omp.c (c_finish_omp_atomic): Likewise.
4369 2014-11-28  Marek Polacek  <polacek@redhat.com>
4371         * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4372         instead of unsigned_type_node.
4374 2014-11-28  Marek Polacek  <polacek@redhat.com>
4376         PR c/63862
4377         * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4378         to op1_utype.
4379         * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4380         expression to unsigned_type_node.
4382 2014-11-20  Mark Wielaard  <mjw@redhat.com>
4384         PR debug/38757
4385         * c-opts.c (set_std_c89): Set lang_hooks.name.
4386         (set_std_c99): Likewise.
4387         (set_std_c11): Likewise.
4388         (set_std_cxx98): Likewise.
4389         (set_std_cxx11): Likewise.
4390         (set_std_cxx14): Likewise.
4391         (set_std_cxx1z): Likewise.
4393 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
4395         PR target/63764
4396         * c-common.h (convert_vector_to_pointer_for_subscript): Change
4397         return type to bool.
4398         * c-common.c: Include gimple-expr.h.
4399         (convert_vector_to_pointer_for_subscript): Change return type to
4400         bool.  If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4401         and copy it into a TARGET_EXPR and use that instead of *vecp
4402         directly.
4404 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
4406         Merger of git branch "gimple-classes-v2-option-3".
4407         * ChangeLog.gimple-classes: New.
4408         * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4409         from being just a vec<gimple> to a vec<gbind *>.
4411 2014-11-18  Jakub Jelinek  <jakub@redhat.com>
4413         PR sanitizer/63813
4414         * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4415         argument to ptype, set type to TREE_TYPE (ptype).  Don't call
4416         get_pointer_alignment for non-pointers.  Use ptype, or if it is
4417         reference type, corresponding pointer type, as type of kind
4418         argument.
4419         (ubsan_maybe_instrument_reference,
4420         ubsan_maybe_instrument_member_call): Adjust callers.
4422 2014-11-15  Marek Polacek  <polacek@redhat.com>
4424         PR middle-end/63884
4425         * array-notation-common.c (is_sec_implicit_index_fn): Return false
4426         for NULL fndecl.
4427         (extract_array_notation_exprs): Return for NULL node.
4429 2014-11-12  Joseph Myers  <joseph@codesourcery.com>
4431         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4432         undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4434 2014-11-12  Jakub Jelinek  <jakub@redhat.com>
4436         PR c/59708
4437         * c-common.c (check_builtin_function_arguments): Handle
4438         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4440 2014-11-10  Andi Kleen  <ak@linux.intel.com>
4442         PR c/60804
4443         * c-common.h (check_no_cilk): Declare.
4444         * cilk.c (get_error_location): New function.
4445         (check_no_cilk): Dito.
4447 2014-11-10  Andi Kleen  <ak@linux.intel.com>
4449         * cilk.c (recognize_spawn): Use expression location
4450         for error message.
4452 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
4454         * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4456 2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
4458         * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4459         (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4460         (__cpp_range_based_for, __cpp_initializer_lists,
4461         __cpp_delegating_constructors, __cpp_nsdmi,
4462         __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4463         for C++11; (__cpp_attribute_deprecated): Remove in favor of
4464         __has_cpp_attribute.
4465         * c-lex.c (cb_has_attribute): New callback CPP function;
4466         (init_c_lex): Set has_attribute callback.
4468 2014-11-04  Richard Biener  <rguenther@suse.de>
4470         * c-common.c (shorten_compare): Do not shorten mixed
4471         DFP and non-DFP compares.
4473 2014-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
4475         * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4476         * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4477         Commentary and rearrangement of tests.
4478         * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
4479         Commentary and rearrangement of tests.
4480         * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
4481         * g++.dg/cpp1y/feat-cxx98.C: Commentary.
4483 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
4485         * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
4486         enum from machine_mode.
4488 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
4490         * c-common.c: Adjust include files.
4491         * c-gimplify.c: Ditto.
4492         * cilk.c: Ditto.
4493         * c-pragma.c: Ditto.
4494         * c-ubsan.c: Ditto.
4496 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
4498         * c-gimplify.c: Adjust include files.
4500 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4502         PR c++/53061
4503         * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
4504         c_common_initialize_diagnostics.
4505         * c-common.h: Likewise.
4507 2014-10-24  Marek Polacek  <polacek@redhat.com>
4509         PR c/56980
4510         * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
4511         print "struct"/"union"/"enum" for typedefed names.
4513 2014-10-23  Marek Polacek  <polacek@redhat.com>
4515         * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
4516         in unsigned type.
4518 2014-10-22  Jakub Jelinek  <jakub@redhat.com>
4519             Yury Gribov  <y.gribov@samsung.com>
4521         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4522         ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
4523         instead of flag_sanitize_recover as bool flag.
4525 2014-10-21  Kirill Yukhin  <kirill.yukhin@intel.com>
4527         * cilk.c: Revert previous change.
4529 2014-10-20  Igor Zamyatin  <igor.zamyatin@intel.com>
4531         PR c/63307
4532         * cilk.c: Include vec.h.
4533         (struct cilk_decls): New structure.
4534         (wrapper_parm_cb): Split this function to...
4535         (fill_decls_vec): ...this...
4536         (create_parm_list): ...and this.
4537         (compare_decls): New function.
4538         (for_local_cb): Remove.
4539         (wrapper_local_cb): Ditto.
4540         (build_wrapper_type): For now first traverse and fill vector of
4541         declarations then sort it and then deal with sorted vector.
4542         (cilk_outline): Ditto.
4543         (declare_one_free_variable): Ditto.
4545 2014-10-17  Marek Polacek  <polacek@redhat.com>
4547         * c-opts.c (c_common_post_options): Set warn_implicit_int.
4548         * c.opt (Wimplicit-int): Initialize to -1.
4550 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
4552         * c-pragma.c: Adjust include files.
4553         * c-semantics.c: Likewise.
4555 2014-10-16  DJ Delorie  <dj@redhat.com>
4557         * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
4558         multiples of bytes.
4560 2014-10-14  Jason Merrill  <jason@redhat.com>
4562         PR c++/63455
4563         * c-common.h (CPP_PREPARSED_EXPR): New.
4564         (N_CP_TTYPES): Adjust.
4566 2014-10-15  Marek Polacek  <polacek@redhat.com>
4568         * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
4570 2014-10-14  DJ Delorie  <dj@redhat.com>
4572         * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
4573         types, not just __int128.
4574         * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
4575         types, not just __int128.
4576         (cpp_atomic_builtins): Round pointer sizes up.
4577         (type_suffix): Use type precision, not specific types.
4578         * c-common.c (c_common_reswords): Remove __int128 special case.
4579         (c_common_type_for_size): Check for all __intN types, not just
4580         __int128.
4581         (c_common_type_for_mode): Likewise.
4582         (c_common_signed_or_unsigned_type): Likewise.
4583         (c_build_bitfield_integer_type): Likewise.
4584         (c_common_nodes_and_builtins): Likewise.
4585         (keyword_begins_type_specifier): Likewise.
4586         * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
4587         __intN variants.
4589 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
4591         * c-common.c: Use hash_table instead of hashtab.
4593 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
4595         * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
4596         C++11 section.
4598 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
4600         PR c++/54427
4601         PR c++/57198
4602         PR c++/58845
4603         * c-common.c (warn_logical_operator): Punt for vectors.
4605 2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
4607         Implement SD-6: SG10 Feature Test Recommendations
4608         * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
4609         macros and the __has_header macro.
4611 2014-09-30  Jason Merrill  <jason@redhat.com>
4613         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
4614         RID_IS_TRIVIALLY_CONSTRUCTIBLE.
4615         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4617         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
4618         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4620         * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
4621         * c-common.c (c_common_reswords): Remove __is_convertible_to.
4623 2014-09-24  Marek Polacek  <polacek@redhat.com>
4625         PR c/61405
4626         PR c/53874
4627         * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
4629 2014-09-23  Andi Kleen  <ak@linux.intel.com>
4631         * c-common.c (handle_no_reorder_attribute): New function.
4632         (c_common_attribute_table): Add no_reorder attribute.
4634 2014-09-22  Joseph Myers  <joseph@codesourcery.com>
4636         * c-cppbuiltin.c (c_cpp_builtins): Define
4637         __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
4638         modes.
4640 2014-09-18  Joseph Myers  <joseph@codesourcery.com>
4642         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
4643         for supported floating-point modes.
4645 2014-09-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4647         * c.opt (Wpsabi): Use LangEnabledBy.
4648         * c-opts.c (c_common_handle_option): Do not handle here.
4650 2014-09-12  Joseph Myers  <joseph@codesourcery.com>
4652         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
4653         macros for floating-point modes.
4655 2014-09-11  Marc Glisse  <marc.glisse@inria.fr>
4657         PR target/58757
4658         * c-cppbuiltin.c (builtin_define_float_constants): Correct
4659         __*_DENORM_MIN__ without denormals.
4661 2014-09-10  Jakub Jelinek  <jakub@redhat.com>
4663         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4664         ubsan_instrument_vla, ubsan_instrument_return): Adjust
4665         ubsan_create_data callers.
4666         (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
4667         index is constant or BIT_AND_EXPR with constant mask and is
4668         small enough for the bound.
4669         * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
4670         ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
4672 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4674         * c.opt: Add CppReason to various flags.
4675         (Wdate-time): Re-sort.
4676         * c-common.c: Include c-common.h earlier.
4677         (struct reason_option_codes_t): Delete.
4678         (c_option_controlling_cpp_error): Prefix global type and struct
4679         with cpp_.
4681 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4683         * c.opt (Wnormalized): New.
4684         (Wnormalized=): Use Enum and Reject Negative.
4685         * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
4687 2014-09-08  Joseph Myers  <joseph@codesourcery.com>
4689         * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
4690         digits of floating-point modes if -fbuilding-libgcc.
4692 2014-09-05  Joseph Myers  <joseph@codesourcery.com>
4694         * c-cppbuiltin.c (c_cpp_builtins): Also define
4695         __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
4696         __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
4697         __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
4698         __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
4699         __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
4700         __LIBGCC_STACK_GROWS_DOWNWARD__,
4701         __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
4702         __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
4703         __LIBGCC_DWARF_FRAME_REGISTERS__,
4704         __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
4705         __LIBGCC_STACK_POINTER_REGNUM__ and
4706         __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
4707         (builtin_define_with_value): Handle backslash-escaping in string
4708         macro values.
4710 2014-09-05  Richard Biener  <rguenther@suse.de>
4712         PR middle-end/63148
4713         * c-format.c (check_format_arg): Properly handle
4714         effectively signed POINTER_PLUS_EXPR offset.
4716 2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4718         * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
4719         Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
4720         (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
4721         and Init.
4722         * c-opts.c (c_common_handle_option): Do not handle here.
4723         (sanitize_cpp_opts): Likewise.
4724         * c-common.c (struct reason_option_codes_t): Handle
4725         CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
4727 2014-09-03  Marek Polacek  <polacek@redhat.com>
4729         * c.opt (Wlogical-not-parentheses): Enable by -Wall.
4731 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
4732             Balaji V. Iyer  <balaji.v.iyer@intel.com>
4733             Igor Zamyatin  <igor.zamyatin@intel.com>
4735         * c-cilkplus.c (cilk_for_number_of_iterations): New function.
4736         * c-common.c (c_common_reswords): Added _Cilk_for.
4737         * c-common.h (enum rid): Added RID_CILK_FOR.
4738         (cilk_for_number_of_iterations): Add declaration.
4739         * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
4740         CILK_FOR.
4741         * c-pragma.c (init_pragma): Register "grainsize" pragma.
4742         * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
4744 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4746         * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
4747         Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
4748         Wundef): Use CPP, Var and Init.
4749         * c-opts.c (c_common_handle_option): Do not handle the above flags here.
4751 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4753         * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
4754         * c-opts.c (c_common_handle_option): Do not handle here.
4756 2014-08-25  Jason Merrill  <jason@redhat.com>
4758         * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
4759         -std=c++14 and -std=gnu++14, rather than the reverse.
4760         * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
4761         OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
4762         * c-common.h (cxx_dialect): Remove cxx1y.
4764 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
4766         * c-common.h (enum cxx_dialect): Add cxx14.
4767         * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
4768         * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
4769         cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
4771 2014-08-22  Jason Merrill  <jason@redhat.com>
4773         * c.opt (std=gnu++17): Fix alias.
4775 2014-08-22  Marek Polacek  <polacek@redhat.com>
4777         PR c++/62199
4778         * c-common.c (warn_logical_not_parentheses): Don't check LHS.  Don't
4779         check for vector types.  Drop LHS argument.
4780         * c-common.h (warn_logical_not_parentheses): Adjust.
4782 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4784         * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
4785         (Wmultichar): Likewise.
4786         (Wdate-time): Use C-family languages instead of Common. Use CPP
4787         and Var.
4788         * c-opts.c (c_common_handle_option): Do not handle the above
4789         options here.
4790         (sanitize_cpp_opts): Likewise.
4792 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4794         PR fortran/44054
4795         * c-opts.c: Include tree-diagnostics.h.
4796         (c_diagnostic_finalizer): New.
4797         (c_common_initialize_diagnostics): Use it.
4799 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4801         PR preprocessor/51303
4802         * c-common.c (struct reason_option_codes_t option_codes):
4803         Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
4805 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4807         PR c/60975
4808         PR c/53063
4809         * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
4810         * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
4811         (c_common_post_options): Call init_global_opts_from_cpp.
4812         (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
4814 2014-08-19  Marek Polacek  <polacek@redhat.com>
4816         PR c++/62153
4817         * c-common.c (maybe_warn_bool_compare): New function.
4818         * c-common.h (maybe_warn_bool_compare): Declare.
4819         * c.opt (Wbool-compare): New option.
4821 2014-08-19  Marek Polacek  <polacek@redhat.com>
4823         * c.opt (Wc99-c11-compat): New option.
4825 2014-08-19  Marek Polacek  <polacek@redhat.com>
4827         * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
4828         to warn_c90_c99_compat.
4829         * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
4830         to -1.
4832 2014-08-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4833             Steven Bosscher  <steven@gcc.gnu.org>
4835         PR c/52952
4836         * c-format.c: Add extra_arg_loc and format_string_loc to struct
4837         format_check_results.
4838         (check_function_format): Use true and add comment for boolean
4839         argument.
4840         (finish_dollar_format_checking): Use explicit location when warning.
4841         (check_format_info): Likewise.
4842         (check_format_arg): Set extra_arg_loc and format_string_loc.
4843         (check_format_info_main): Use explicit location when warning.
4844         (check_format_types): Pass explicit location.
4845         (format_type_warning): Likewise.
4847 2014-08-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4849         PR fortran/44054
4850         * c-format.c: Handle Fortran flags.
4852 2014-08-12  Igor Zamyatin  <igor.zamyatin@intel.com>
4854         PR other/61962
4855         * array-notation-common.c (find_rank): Added handling for other
4856         types of references.
4858 2014-08-10  Marek Polacek  <polacek@redhat.com>
4860         PR c/51849
4861         * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
4862         * c.opt (Wc90-c99-compat): Add option.
4864 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
4866         * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
4868 2014-08-03  Marek Polacek  <polacek@redhat.com>
4870         * c-common.c (check_case_value):  Add location_t parameter.  Use it.
4871         (c_add_case_label): Pass loc to check_case_value.
4873 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4875         * cilk.c: Use hash_map instead of pointer_map.
4877 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
4879         * c-gimplify.c: Use hash_set instead of pointer_set.
4881 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
4883         PR middle-end/61455
4884         * array-notation-common.c (extract_array_notation_exprs): Handling
4885         of DECL_EXPR added.
4887 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
4889         * c-common.h (min_align_of_type): Removed prototype.
4890         * c-common.c (min_align_of_type): Removed.
4891         * c-ubsan.h (ubsan_maybe_instrument_reference,
4892         ubsan_maybe_instrument_member_call): New prototypes.
4893         * c-ubsan.c: Include stor-layout.h and builtins.h.
4894         (ubsan_maybe_instrument_reference_or_call,
4895         ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
4896         functions.
4898 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
4900         PR c++/60517
4901         * c.opt (-Wreturn-local-addr): Move to common.opt.
4903 2014-07-30  Jason Merrill  <jason@redhat.com>
4905         PR c++/61659
4906         PR c++/61687
4907         Revert:
4908         * c.opt (-fuse-all-virtuals): New.
4910 2014-07-30  Tom Tromey  <tromey@redhat.com>
4912         PR c/59855
4913         * c.opt (Wdesignated-init): New option.
4914         * c-common.c (c_common_attribute_table): Add "designated_init".
4915         (handle_designated_init): New function.
4917 2014-07-24  Marek Polacek  <polacek@redhat.com>
4919         PR c/57653
4920         * c-opts.c (c_finish_options): If -imacros is in effect, return.
4922 2014-07-16  Dodji Seketeli  <dodji@redhat.com>
4924         PR preprocessor/60723 - missing system-ness marks for macro tokens
4925         * c-ppoutput.c (struct print::prev_was_system_token): New data
4926         member.
4927         (init_pp_output): Initialize it.
4928         (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
4929         (do_line_change): Return a flag saying if a line marker was
4930         emitted or not.
4931         (scan_translation_unit): Detect if the system-ness of the token we
4932         are about to emit is different from the one of the previously
4933         emitted token.  If so, emit a line marker.  Avoid emitting useless
4934         adjacent line markers.  Avoid emitting line markers for tokens
4935         originating from the expansion of built-in macros.
4936         (scan_translation_unit_directives_only): Adjust.
4938 2014-07-15  Marek Polacek  <polacek@redhat.com>
4940         * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
4941         TYPE_MAX_VALUE is NULL.
4943 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
4945         PR middle-end/61294
4946         * c.opt (Wmemset-transposed-args): New warning.
4948 2014-07-10  Jason Merrill  <jason@redhat.com>
4950         PR c++/61659
4951         PR c++/61687
4952         * c.opt (-fuse-all-virtuals): New.
4954 2014-07-09  Richard Biener  <rguenther@suse.de>
4956         PR c-family/61741
4957         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
4958         using unsigned arithmetic if overflow does not wrap instead of
4959         if overflow is undefined.
4961 2014-07-06  Marek Polacek  <polacek@redhat.com>
4963         PR c/6940
4964         * c.opt (Wsizeof-array-argument): New option.
4966 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
4968         * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
4969         comments->count <= 1, as comments->entries might be NULL.
4971 2014-07-01  Marek Polacek  <polacek@redhat.com>
4973         * c.opt (Wint-conversion): New option.
4975 2014-07-01  Marek Polacek  <polacek@redhat.com>
4977         PR c/58286
4978         * c.opt (Wincompatible-pointer-types): New option.
4980 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
4982         PR c++/51400
4983         * c-common.c (handle_noreturn_attribute, handle_const_attribute):
4984         Do not discard TYPE_QUALS of type.
4986 2014-06-26  Jason Merrill  <jason@redhat.com>
4988         * c-common.h (enum cxx_dialect): Add cxx1z.
4989         * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
4990         * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
4992 2014-06-26  Teresa Johnson  <tejohnson@google.com>
4994         * c-common.h (get_dump_info): Declare.
4995         * c-gimplify.c (c_genericize): Use saved dump files.
4996         * c-opts.c (c_common_parse_file): Begin and end dumps
4997         once around parsing invocation.
4998         (get_dump_info): New function.
5000 2014-06-23  Marek Polacek  <polacek@redhat.com>
5001             Andrew MacLeod  <amacleod@redhat.com>
5003         PR c/61553
5004         * c-common.c (get_atomic_generic_size): Don't segfault if the
5005         type doesn't have a size.
5007 2014-06-20  Marek Polacek  <polacek@redhat.com>
5009         * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5010         (ubsan_walk_array_refs_r): New function.
5011         (c_genericize): Instrument array bounds.
5012         * c-ubsan.c: Include "internal-fn.h".
5013         (ubsan_instrument_division): Mark instrumented arrays as having
5014         side effects.  Adjust ubsan_type_descriptor call.
5015         (ubsan_instrument_shift): Likewise.
5016         (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5017         (ubsan_instrument_bounds): New function.
5018         (ubsan_array_ref_instrumented_p): New function.
5019         (ubsan_maybe_instrument_array_ref): New function.
5020         * c-ubsan.h (ubsan_instrument_bounds): Declare.
5021         (ubsan_array_ref_instrumented_p): Declare.
5022         (ubsan_maybe_instrument_array_ref): Declare.
5024 2014-06-20  Hale Wang  <hale.wang@arm.com>
5026         PR lto/61123
5027         * c.opt (fshort-enums): Add to LTO.
5028         * c.opt (fshort-wchar): Likewise.
5030 2014-06-16  Marek Polacek  <polacek@redhat.com>
5032         PR c/60439
5033         * c.opt (Wswitch-bool): Add Var.
5035 2014-06-12  Jakub Jelinek  <jakub@redhat.com>
5037         PR middle-end/61486
5038         * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5039         #pragma omp target teams or
5040         #pragma omp {,target }teams distribute simd.
5042 2014-06-12  Jason Merrill  <jason@redhat.com>
5044         * c.opt (Wabi=, fabi-compat-version): New.
5045         * c-opts.c (c_common_handle_option): Handle -Wabi=.
5046         (c_common_post_options): Handle flag_abi_compat_version default.
5047         Disallow -fabi-compat-version=1.
5048         * c-common.h (abi_version_crosses): New.
5050 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
5052         * c-common.c (handle_section_attribute): Update handling for
5053         section names that are no longer trees.
5055 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
5057         PR fortran/60928
5058         * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5059         (omp_pragmas): ... back here.
5061 2014-06-05  Marek Polacek  <polacek@redhat.com>
5063         PR c/49706
5064         * c-common.c (warn_logical_not_parentheses): New function.
5065         * c-common.h (warn_logical_not_parentheses): Declare.
5066         * c.opt (Wlogical-not-parentheses): New option.
5068 2014-06-04  Marek Polacek  <polacek@redhat.com>
5070         PR c/30020
5071         * c-common.c (check_case_bounds): Add location parameter.
5072         Use it.
5073         (c_add_case_label): Pass loc to check_case_bounds.
5075 2014-06-03  Marek Polacek  <polacek@redhat.com>
5077         PR c/60439
5078         * c.opt (Wswitch-bool): New option.
5080 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
5082         * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5083         Remove prototypes.
5084         (record_types_used_by_current_var_decl): Move prototype to where
5085         it belongs.
5087         * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5088         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5089         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5091 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
5093         * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5094         * c-common.c (c_common_nodes_and_builtins): Don't initialize
5095         void_zero_node.
5096         * c-pretty-print.c (pp_c_void_constant): New function.
5097         (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5098         (c_pretty_printer::expression): Handle VOID_CST.
5099         * cilk.c (extract_free_variables): Likewise.
5100         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5101         (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5103 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
5105         * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5106         * c-pragma.c (push_alignment): Adjust.
5107         (handle_pragma_push_options): Likewise.
5109 2014-05-09  Marek Polacek  <polacek@redhat.com>
5111         PR c/50459
5112         * c-common.c (check_user_alignment): Return -1 if alignment is error
5113         node.
5114         (handle_aligned_attribute): Don't call default_conversion on
5115         FUNCTION_DECLs.
5116         (handle_vector_size_attribute): Likewise.
5117         (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5118         (handle_sentinel_attribute): Call default_conversion and allow even
5119         integral types as an argument.
5121 2014-05-08  Marek Polacek  <polacek@redhat.com>
5123         PR c/61053
5124         * c-common.c (min_align_of_type): New function factored out from...
5125         (c_sizeof_or_alignof_type): ...here.
5126         * c-common.h (min_align_of_type): Declare.
5128 2014-05-08  Marek Polacek  <polacek@redhat.com>
5130         PR c/61077
5131         * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5132         parameter type of main.
5134 2014-05-07  DJ Delorie  <dj@redhat.com>
5136         * c-cppbuiltin.c (print_bits_of_hex): New.
5137         (builtin_define_type_minmax): Print values using hex so as not to
5138         require a pre-computed list of string values.
5140 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
5141             Mike Stump  <mikestump@comcast.net>
5142             Richard Sandiford  <rdsandiford@googlemail.com>
5144         * c-ada-spec.c: Include wide-int.h.
5145         (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5146         (dump_generic_ada_node): Use wide-int interfaces.
5147         * c-common.c: Include wide-int-print.h.
5148         (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5149         (pointer_int_sum): Use wide-int interfaces.
5150         (c_common_nodes_and_builtins): Use make_int_cst.
5151         (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5152         (handle_alloc_size_attribute): Use wide-int interfaces.
5153         (get_nonnull_operand): Likewise.
5154         * c-format.c (get_constant): Use tree_fits_uhwi_p.
5155         * c-lex.c: Include wide-int.h.
5156         (narrowest_unsigned_type): Take a widest_int rather than two
5157         HOST_WIDE_INTs.
5158         (narrowest_signed_type): Likewise.
5159         (interpret_integer): Update accordingly.  Use wide-int interfaces.
5160         (lex_charconst): Use wide-int interfaces.
5161         * c-pretty-print.c: Include wide-int.h.
5162         (pp_c_integer_constant): Use wide-int interfaces.
5163         * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5164         INT_CST_LT_UNSIGNED.
5166 2014-05-06  Richard Biener  <rguenther@suse.de>
5168         * c-opts.c (c_common_post_options): For -freestanding,
5169         -fno-hosted and -fno-builtin disable pattern recognition
5170         if not enabled explicitely.
5172 2014-05-02  Marek Polacek  <polacek@redhat.com>
5174         * c.opt (Wsizeof-pointer-memaccess): Describe option.
5176 2014-05-01  Marek Polacek  <polacek@redhat.com>
5178         PR c/43245
5179         * c.opt (Wdiscarded-qualifiers): Add.
5181 2014-04-30  Marek Polacek  <polacek@redhat.com>
5183         * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs.  Perform
5184         INT_MIN / -1 sanitization only for integer types.
5186 2014-04-25  Marek Polacek  <polacek@redhat.com>
5188         PR c/18079
5189         * c-common.c (handle_noinline_attribute): Warn if the attribute
5190         conflicts with always_inline attribute.
5191         (handle_always_inline_attribute): Warn if the attribute conflicts
5192         with noinline attribute.
5194 2014-04-25  Marek Polacek  <polacek@redhat.com>
5196         PR c/60156
5197         * c-common.c (check_main_parameter_types): Warn about variadic main.
5199 2014-04-24  Mike Stump  <mikestump@comcast.net>
5201         * c.opt (Wshadow-ivar): Default to on.
5203 2014-04-24  Dimitris Papavasiliou  <dpapavas@gmail.com>
5205         * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5207 2014-04-23  Marek Polacek  <polacek@redhat.com>
5209         * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5211 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
5213         PR sanitizer/60275
5214         * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5215         if flag_sanitize_undefined_trap_on_error.
5216         (ubsan_instrument_division, ubsan_instrument_shift,
5217         ubsan_instrument_vla): Likewise.  Use __ubsan_handle_*_abort ()
5218         if !flag_sanitize_recover.
5220 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
5222         PR libstdc++/43622
5223         * c-common.c (registered_builtin_types): Make non-static.
5224         * c-common.h (registered_builtin_types): Declare.
5226 2014-04-14  Richard Biener  <rguenther@suse.de>
5227         Marc Glisse  <marc.glisse@inria.fr>
5229         PR c/60819
5230         * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5231         apply may-alias the scalar pointer type when applicable.
5233 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
5235         PR middle-end/60467
5236         * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5237         as possible argument for Cilk_spawn.
5239 2014-04-11  Tobias Burnus  <burnus@net-b.de>
5241         PR c/60194
5242         * c.opt (Wformat-signedness): Add
5243         * c-format.c(check_format_types): Use it.
5245 2014-04-11  Jason Merrill  <jason@redhat.com>
5247         PR c++/57926
5248         * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5249         default_conversion for an array argument.
5251 2014-04-08  Marek Polacek  <polacek@redhat.com>
5253         PR sanitizer/60745
5254         * c-ubsan.c: Include asan.h.
5255         (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5257 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
5259         * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5261 2014-04-02  Marek Polacek  <polacek@redhat.com>
5263         * c-common.h (c_expand_expr): Remove declaration.
5265 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
5267         PR c++/60689
5268         * c-common.c (add_atomic_size_parameter): When creating new
5269         params vector, push the size argument first.
5271 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
5273         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5274         ubsan_instrument_vla, ubsan_instrument_return): Adjust
5275         ubsan_create_data callers.
5277 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
5279         PR debug/60603
5280         * c-opts.c (c_finish_options): Restore cb_file_change call to
5281         <built-in>.
5283 2014-03-13  Jakub Jelinek  <jakub@redhat.com>
5285         PR middle-end/36282
5286         * c-pragma.c (apply_pragma_weak): Only look at
5287         TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5288         DECL_ASSEMBLER_NAME_SET_P (decl).
5289         (maybe_apply_pending_pragma_weaks): Exit early if
5290         vec_safe_is_empty (pending_weaks) rather than only when
5291         !pending_weaks.
5292         (maybe_apply_pragma_weak): Likewise.  If !DECL_ASSEMBLER_NAME_SET_P,
5293         set assembler name back to NULL afterwards.
5295 2014-03-11  Jason Merrill  <jason@redhat.com>
5297         * c.opt: Add -std=gnu++14.
5299 2014-03-11  Ian Bolton  <ian.bolton@arm.com>
5301         * c-opts.c (c_common_post_options): Don't override
5302         -ffp-contract=fast if unsafe-math-optimizations is on.
5304 2014-03-08  Paulo Matos  <paulo@matos-sorge.com>
5306         * c.opt: Enable LTO FE for fshort-double.
5308 2014-03-07  Jason Merrill  <jason@redhat.com>
5310         * c.opt: Add -std=c++14.
5312 2014-03-06  Marek Polacek  <polacek@redhat.com>
5314         PR c/60197
5315         * cilk.c (contains_cilk_spawn_stmt): New function.
5316         (contains_cilk_spawn_stmt_walker): Likewise.
5317         (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5318         * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5320 2014-03-03  Jakub Jelinek  <jakub@redhat.com>
5322         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5323         (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5324         even when flag_preprocess_only.
5326 2014-02-26  Jason Merrill  <jason@redhat.com>
5328         PR c++/59231
5329         PR c++/11586
5330         * c-common.c (shorten_compare): Don't check
5331         c_inhibit_evaluation_warnings.
5333 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
5335         PR c/37743
5336         * c-common.c (c_common_nodes_and_builtins): When initializing
5337         c_uint{16,32,64}_type_node, also set corresponding
5338         uint{16,32,64}_type_node to the same value.
5340         PR c++/60267
5341         * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5342         for PRAGMA_IVDEP if flag_preprocess_only.
5344 2014-02-12  Jakub Jelinek  <jakub@redhat.com>
5346         PR c/60101
5347         * c-common.c (merge_tlist): If copy is true, call new_tlist,
5348         if false, add ADD itself, rather than vice versa.
5349         (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5350         copy.  For SAVE_EXPR, only call merge_tlist once.
5352 2014-02-08  Jakub Jelinek  <jakub@redhat.com>
5354         PR middle-end/60092
5355         * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5356         and tree_to_uhwi.
5357         (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5358         functions.
5359         (c_common_attribute_table): Add alloc_align and assume_aligned
5360         attributes.
5362 2014-02-06  Marek Polacek  <polacek@redhat.com>
5364         PR c/60087
5365         * c-common.c (warn_for_sign_compare): Call warning_at with location
5366         instead of warning.
5368 2014-02-05  Marek Polacek  <polacek@redhat.com>
5370         PR c/53123
5371         * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5372         statement.
5374 2014-02-04  Marek Polacek  <polacek@redhat.com>
5376         PR c/60036
5377         * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5378         SAVE_EXPR.
5380 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
5382         PR c++/53017
5383         PR c++/59211
5384         * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5385         handle_vector_size_attribute, handle_nonnull_attribute): Call
5386         default_conversion on the attribute argument.
5387         (handle_nonnull_attribute): Increment the argument number.
5389 2014-01-31  Marek Polacek  <polacek@redhat.com>
5391         PR c/59963
5392         * c-common.c (add_atomic_size_parameter): Pass vNULL to
5393         build_function_call_vec.
5394         (resolve_overloaded_builtin): Likewise.
5395         * c-common.h (build_function_call_vec): Adjust declaration.
5397 2014-01-30  Marek Polacek  <polacek@redhat.com>
5399         PR c/59940
5400         * c-common.h (unsafe_conversion_p): Adjust declaration.
5401         (warnings_for_convert_and_check): Likewise.
5402         (convert_and_check): Likewise.
5403         * c-common.c (unsafe_conversion_p): Add location parameter.  Call
5404         expansion_point_location_if_in_system_header on it.
5405         (warnings_for_convert_and_check): Add location parameter.  Call
5406         expansion_point_location_if_in_system_header on it.  Use it.
5407         (convert_and_check): Add location parameter.  Use it.
5408         (conversion_warning): Likewise.
5409         (c_add_case_label): Adjust convert_and_check calls.
5410         (scalar_to_vector): Adjust unsafe_conversion_p calls.
5412 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5414         * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5415         flag_cilkplus.
5416         * c-pragma.c (init_pragma): Likewise.
5417         * c.opt: Likewise.
5419 2014-01-23  Marek Polacek  <polacek@redhat.com>
5421         PR c/59846
5422         * c-common.c (shorten_compare): Add location_t parameter.
5423         * c-common.h (shorten_binary_op): Adjust declaration.
5425 2014-01-23  Marek Polacek  <polacek@redhat.com>
5427         PR c/58346
5428         * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5429         * c-common.h: Declare it.
5431 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
5433         * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5434         * c-ada-spec.c (dump_ads): Likewise.
5435         (cpp_check): Likewise.
5436         (dump_ada_specs): Likewise.
5438 2014-01-15  Laurent Alfonsi  <laurent.alfonsi@st.com>
5440         PR c++/49718
5441         * c-common.c (handle_no_instrument_function_attribute): Allow
5442         no_instrument_function attribute in class member
5443         definition/declaration.
5445 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
5447         PR c/58943
5448         * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5449         build_modify_expr with non-NOP_EXPR opcode.  Handle return from it
5450         being COMPOUND_EXPR.
5451         (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5452         operand a SAVE_EXPR and second MODIFY_EXPR.
5454 2014-01-09  Jakub Jelinek  <jakub@redhat.com>
5456         PR target/58115
5457         * c-pch.c (c_common_write_pch): Call
5458         prepare_target_option_nodes_for_pch.
5460 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
5462         Update copyright years
5464 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
5466         * array-notation-common.c, c-cilkplus.c: Use the standard form for
5467         the copyright notice.
5469 2013-12-28  Eric Botcazou  <ebotcazou@adacore.com>
5471         * c-ada-spec.c (print_constructor): New function.
5472         (print_destructor): Retrieve the origin of the destructor.
5473         (print_ada_declaration): Revamp handling of constructors/destructors.
5475 2013-12-23  Stuart Hastings  <stuart@apple.com>
5476             Bill Maddox  <maddox@google.com>
5477             Jason Merrill  <jason@redhat.com>
5479         * c.opt: Add -fdeclone-ctor-dtor.
5480         * c-opts.c (c_common_post_options): Default to on iff -Os.
5482 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5484         * c-common.c (c_common_attribute_table): Added "cilk simd function"
5485         attribute.
5486         * c-pragma.h (enum pragma_cilk_clause): Remove.
5487         (enum pragma_omp_clause):  Added the following fields:
5488         PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
5489         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
5490         PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
5491         PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
5492         PRAGMA_CILK_CLAUSE_UNIFORM.
5495 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5497         * cilk.c (cilk_outline): Made this function non-static.
5498         (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
5499         (create_cilk_wrapper): Added a new parameter: a function pointer.
5500         (c_install_body_w_frame_cleanup): Remove
5501         (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
5502         * c-common.h (cilk_outline): New prototype.
5503         (gimplify_cilk_spawn): Removed two parameters.
5504         (cilk_install_body_with_frame_cleanup): New prototype.
5505         * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
5506         CILK_SPAWN_STMT case.
5508 2013-12-11  Bernd Schmidt  <bernds@codesourcery.com>
5510         * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
5512         * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
5513         (int_array_type_node): Remove.
5514         * c-common.c (c_common_nodes_and_builtins): Don't build it.
5516 2013-12-05  Marek Polacek  <polacek@redhat.com>
5518         PR c/52023
5519         * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
5520         [ADJUST_FIELD_ALIGN].
5522 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
5524         PR c/52023
5525         * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
5526         and check field alignment if set.
5527         * c-common.h (c_sizeof_or_alignof_type): Update prototype.
5528         (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
5530 2013-12-04  Jakub Jelinek  <jakub@redhat.com>
5531             Marek Polacek  <polacek@redhat.com>
5533         * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
5534         sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
5536 2013-11-29   H.J. Lu  <hongjiu.lu@intel.com>
5538         PR c/59309
5539         * cilk.c (gimplify_cilk_spawn): Properly handle function without
5540         arguments.
5542 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
5544         PR c/59280
5545         * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
5546         goto invalid.  If it is error_mark_node, don't issue further
5547         diagnostics.
5549 2013-11-28  Sergey Ostanevich  <sergos.gnu@gmail.com>
5551         * c.opt (Wopenmp-simd): New.
5553 2013-11-22  Jakub Jelinek  <jakub@redhat.com>
5555         * c-ubsan.h (ubsan_instrument_return): New prototype.
5556         * c-ubsan.c (ubsan_instrument_return): New function.
5558 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
5560         * c-common.c: Add required include files from gimple.h.
5561         * c-gimplify.c: Likewise
5562         * cilk.c: Likewise
5564 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
5566         * c-common.c (unsafe_conversion_p): Remove use of
5567         EXPR_LOC_OR_HERE macro.
5568         (conversion_warning): Likewise.
5569         (warnings_for_convert_and_check): Likewise.
5570         (warn_for_collisions_1): Likewise.
5571         (shorten_compare): Likewise, and remove use of in_system_header
5572         macro, using the location from the former.
5573         * c-lex.c (dump_one_header): Remove use of input_filename macro.
5574         (cb_def_pragma): Remove use of in_system_header macro.
5575         (lex_string): Likewise.
5576         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
5578 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
5579             Mike Stump  <mikestump@comcast.net>
5580             Richard Sandiford  <rdsandiford@googlemail.com>
5582         * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
5583         instead of TREE_INT_CST_LOW, in cases where there is a protecting
5584         tree_fits_shwi_p or tree_fits_uhwi_p.
5585         (dump_generic_ada_node): Likewise.
5586         * c-format.c (check_format_arg): Likewise.
5587         * c-pretty-print.c (pp_c_integer_constant): Likewise.
5589 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
5591         * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
5593 2013-11-19  Joshua J Cogliati  <jrincayc@yahoo.com>
5595         PR c/53001
5596         * c-common.c (unsafe_conversion_p): Make this function
5597         return an enumeration with more detail.
5598         (conversion_warning): Use the new return type of
5599         unsafe_conversion_p to separately warn either about conversions
5600         that lower floating point number precision or about the other
5601         kinds of conversions.
5602         * c-common.h (enum conversion_safety): New enumeration.
5603         (unsafe_conversion_p): switching return type to
5604         conversion_safety enumeration.
5605         * c.opt: Adding new warning -Wfloat-conversion and
5606         enabling it with -Wconversion.
5608 2013-11-19  Basile Starynkevitch  <basile@starynkevitch.net>
5610         * c-opts.c: Include plugin.h.
5611         (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
5613 2013-11-19  Marek Polacek  <polacek@redhat.com>
5615         * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
5616         call.
5617         (ubsan_instrument_shift): Likewise.
5618         (ubsan_instrument_vla): Likewise.
5620 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5622         * c-common.c (convert_vector_to_pointer_for_subscript): Remove
5623         cast to unsigned type.
5625 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5627         * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
5628         tree_low_cst.
5629         (complete_array_type): Update comment to refer to tree_to_[su]hwi
5630         rather than tree_low_cst.
5632 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5634         * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
5635         tree_to_uhwi throughout.
5637 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5639         * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
5640         tree_low_cst (..., 0) with tree_to_shwi throughout.
5642 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5644         * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
5645         host_integerp (..., 1) with tree_fits_uhwi_p throughout.
5647 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
5649         * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
5650         host_integerp (..., 0) with tree_fits_shwi_p throughout.
5652 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
5654         * c-cilkplus.c: New file.
5655         * c-common.c (readonly_error): Add location argument.
5656         * c-common.h (readonly_error): Same.
5657         (c_finish_cilk_clauses): Protoize.
5658         (c_check_cilk_loop): Same.
5659         c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
5660         Do not fail on error_mark_node.
5661         Abstract increment canonicalization to here...
5662         (c_omp_for_incr_canonicalize_ptr): New.
5663         c-pragma.c (init_pragma): Register "simd" pragma.
5664         c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
5665         (enum pragma_cilk_clause): New.
5667 2013-11-15  Richard Sandiford  <rdsandiford@googlemail.com>
5669         * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
5670         wchar_type and host_integerp checks.
5672 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
5674         * c-common.c: Likewise.
5675         * c-gimplify.c: Likewise.
5676         * cilk.c: Likewise.
5678 2013-11-14  Diego Novillo  <dnovillo@google.com>
5680         * c-common.c: Include fold-const.h.
5681         Include stor-layout.h.
5682         Include calls.h.
5683         Include stringpool.h.
5684         Include attribs.h.
5685         Include varasm.h.
5686         Include trans-mem.h.
5687         * c-cppbuiltin.c: Include stor-layout.h.
5688         Include stringpool.h.
5689         * c-format.c: Include stringpool.h.
5690         * c-lex.c: Include stringpool.h.
5691         Include stor-layout.h.
5692         * c-pragma.c: Include stringpool.h.
5693         Include attribs.h.
5694         Include varasm.h.
5695         Include gcc-symtab.h.
5696         * c-pretty-print.c: Include stor-layout.h.
5697         Include attribs.h.
5698         * cilk.c: Include stringpool.h.
5699         Include calls.h.
5701 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
5703         * c-common.h (enum rid): Add RID_AUTO_TYPE.
5704         * c-common.c (c_common_reswords): Add __auto_type.
5705         (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
5707 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
5709         * c-common.c: Include gimplify.h.
5710         * c-gimplify.c: Likewise.
5711         * cilk.c: Likewise.
5712         * c-omp.c: Include gimple-expr.h instead of gimple.h.
5713         * c-ubsan.c: Don't include gimple.h.
5715 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
5717         * c-common.c (c_common_reswords): Add _Thread_local.
5719 2013-11-09  Joseph Myers  <joseph@codesourcery.com>
5721         * c-common.c (atomic_size_supported_p): New function.
5722         (resolve_overloaded_atomic_exchange)
5723         (resolve_overloaded_atomic_compare_exchange)
5724         (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
5725         Use it instead of comparing size with a local list of sizes.
5727 2013-11-07  Andrew MacLeod  <amacleod@redhat.com>
5728             Joseph Myers  <joseph@codesourcery.com>
5730         * c-common.h (enum rid): Add RID_ATOMIC.
5731         * c-common.c (c_common_reswords): Add _Atomic.
5732         (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
5733         (keyword_is_type_qualifier): Accept RID_ATOMIC.
5734         * c-format.c (check_format_types): Check for extra _Atomic
5735         qualifiers in format argument.
5736         * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
5737         (pp_c_type_qualifier_list): Mention _Atomic in comment.
5739 2013-11-06  Tobias Burnus  <burnus@net-b.de>
5741         * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
5743 2013-11-06  Joseph Myers  <joseph@codesourcery.com>
5745         * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
5746         standards modes.
5747         * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
5748         to mean lack of IEEE 754 support.
5750 2013-11-05  Tobias Burnus  <burnus@net-b.de>
5752         * c.opt (-Wdate-time): New option
5753         * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
5755 2013-11-05  Joseph Myers  <joseph@codesourcery.com>
5757         * c-cppbuiltin.c (cpp_iec_559_value): Test
5758         flag_excess_precision_cmdline not flag_excess_precision.
5760 2013-11-05  Tobias Burnus  <burnus@net-b.de>
5762         * c.opt (fopenmp-simd): New option.
5763         * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
5764         (omp_pragmas): ... this new struct.
5765         (c_pp_lookup_pragma): Also walk omp_pragmas.
5766         (init_pragma): Init pragmas for -fopenmp-simd.
5768 2013-11-04  Marek Polacek  <polacek@redhat.com>
5770         PR c++/58979
5771         * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
5773 2013-11-04  Joseph Myers  <joseph@codesourcery.com>
5775         * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
5776         New functions.
5777         (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
5779 2013-11-04  Eric Botcazou  <ebotcazou@adacore.com>
5781         * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
5782         (dump_ada_specs): Adjust prototype of second callback.
5783         * c-ada-spec.c (cpp_check): New global variable.
5784         (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
5785         (print_generic_ada_decl): Likewise.
5786         (has_static_fields): Change return type to bool and add guard.
5787         (has_nontrivial_methods): New predicate.
5788         (is_tagged_type): Change return type to bool.
5789         (separate_class_package): Call has_nontrivial_methods.
5790         (pp_ada_tree_identifier): Minor tweaks.
5791         (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
5792         (dump_ada_array_domains): Likewise.
5793         (dump_ada_array_type): Likewise.
5794         (dump_template_types): Remove cpp_check parameter and do not pass it to
5795         dump_generic_ada_node.
5796         (dump_ada_template): Likewise.
5797         (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
5798         recursively.
5799         (print_ada_methods): Change return type to integer.  Remove cpp_check
5800         parameter and do not pass it down.
5801         (dump_nested_types): Remove cpp_check parameter and do not pass it to
5802         dump_generic_ada_node.
5803         (print_ada_declaration): Likewise.  Test RECORD_OR_UNION_TYPE_P before
5804         accessing methods.
5805         (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
5806         down.  Use has_nontrivial_methods to recognize C++ classes.  Use return
5807         value of print_ada_methods.
5808         (dump_ads): Rename cpp_check parameter to check and adjust prototype.
5809         Set cpp_check to it before invoking dump_ada_nodes.
5810         (dump_ada_specs): Likewise.
5812 2013-11-03  Marek Polacek  <polacek@redhat.com>
5814         * c-ubsan.c: Don't include hash-table.h.
5815         (ubsan_instrument_vla): New function.
5816         * c-ubsan.h: Declare it.
5818 2013-10-31  David Malcolm  <dmalcolm@redhat.com>
5820         Automated part of renaming of symtab_node_base to symtab_node.
5822         Patch autogenerated by rename_symtab.py from
5823         https://github.com/davidmalcolm/gcc-refactoring-scripts
5824         revision 58bb219cc090b2f4516a9297d868c245495ee622
5826         * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
5827         symtab_node_base to symtab_node.
5829 2013-10-31  Edward Smith-Rowland  <3dw4rd@verizon.net>
5831         Implement C++14 digit separators.
5832         * c-lex.c (interpret_float): Remove digit separators from scratch string
5833         before building real literal.
5835 2013-10-30  Jakub Jelinek  <jakub@redhat.com>
5837         * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
5839 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
5841         * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
5842         fields.
5843         (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
5844         enabled.
5845         * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
5846         (insert_cilk_frame): New prototype.
5847         (cilk_init_builtins): Likewise.
5848         (gimplify_cilk_spawn): Likewise.
5849         (c_cilk_install_body_w_frame_cleanup): Likewise.
5850         (cilk_detect_spawn_and_unwrap): Likewise.
5851         (cilk_set_spawn_marker): Likewise.
5852         (build_cilk_sync): Likewise.
5853         (build_cilk_spawn): Likewise.
5854         * cilk.c: New file.
5856 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
5858         Patch autogenerated by refactor_symtab.py from
5859         https://github.com/davidmalcolm/gcc-refactoring-scripts
5860         revision 58bb219cc090b2f4516a9297d868c245495ee622
5862         * c-gimplify.c (c_genericize): Update for conversion of symtab types
5863         to a true class hierarchy.
5864         * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
5866 2013-10-27  Richard Sandiford  <rdsandiford@googlemail.com>
5868         * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
5870 2013-10-26  Jeff Law  <law@redhat.com>
5872         * c-common.c (c_define_builtins): Remove mudflap support.
5873         * c.opt: Ignore and warn for mudflap options.
5875 2013-10-24  Tobias Burnus  <burnus@net-b.de>
5877         PR other/33426
5878         * c-pragma.c (init_pragma) Add #pragma ivdep handling.
5879         * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
5881 2013-10-23  Jason Merrill  <jason@redhat.com>
5883         * c-format.c (gcc_cxxdiag_char_table): Add %X.
5885 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
5887         * c-common.h (omp_clause_mask::operator !=): New method.
5888         * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
5889         instead of if (mask & something) tests everywhere.
5891         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
5892         201307 instead of 201107.
5893         * c-common.c (DEF_FUNCTION_TYPE_8): Define.
5894         (c_common_attribute_table): Add "omp declare target" and
5895         "omp declare simd" attributes.
5896         (handle_omp_declare_target_attribute,
5897         handle_omp_declare_simd_attribute): New functions.
5898         * c-omp.c: Include c-pragma.h.
5899         (c_finish_omp_taskgroup): New function.
5900         (c_finish_omp_atomic): Add swapped argument, if true,
5901         build the operation first with rhs, lhs arguments and use NOP_EXPR
5902         build_modify_expr.
5903         (c_finish_omp_for): Add code argument, pass it down to make_code.
5904         (c_omp_split_clauses): New function.
5905         (c_split_parallel_clauses): Removed.
5906         (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
5907         c_omp_declare_simd_clauses_to_decls): New functions.
5908         * c-common.h (omp_clause_mask): New type.
5909         (OMP_CLAUSE_MASK_1): Define.
5910         (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
5911         omp_clause_mask::operator |=, omp_clause_mask::operator ~,
5912         omp_clause_mask::operator |, omp_clause_mask::operator &,
5913         omp_clause_mask::operator <<, omp_clause_mask::operator >>,
5914         omp_clause_mask::operator ==): New methods.
5915         (enum c_omp_clause_split): New.
5916         (c_finish_omp_taskgroup): New prototype.
5917         (c_finish_omp_atomic): Add swapped argument.
5918         (c_finish_omp_for): Add code argument.
5919         (c_omp_split_clauses): New prototype.
5920         (c_split_parallel_clauses): Removed.
5921         (c_omp_declare_simd_clauses_to_numbers,
5922         c_omp_declare_simd_clauses_to_decls): New prototypes.
5923         * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
5924         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
5925         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
5926         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
5927         PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
5928         Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
5929         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
5930         PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
5931         PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
5932         PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
5933         PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
5934         PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
5935         PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
5936         PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
5937         PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
5938         PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
5939         PRAGMA_OMP_CLAUSE_UNIFORM.
5941 2013-10-09  Marc Glisse  <marc.glisse@inria.fr>
5943         PR tree-optimization/20318
5944         * c-common.c (handle_returns_nonnull_attribute): New function.
5945         (c_common_attribute_table): Add returns_nonnull.
5947 2013-10-03  Marc Glisse  <marc.glisse@inria.fr>
5949         PR c++/19476
5950         * c.opt (fcheck-new): Move to common.opt.
5952 2013-09-25  Marek Polacek  <polacek@redhat.com>
5953             Jakub Jelinek  <jakub@redhat.com>
5955         PR sanitizer/58413
5956         * c-ubsan.c (ubsan_instrument_shift): Don't instrument
5957         an expression if we can prove it is correct.
5958         (ubsan_instrument_division): Likewise.  Remove unnecessary
5959         check.
5961 2013-09-18  Marek Polacek  <polacek@redhat.com>
5963         PR sanitizer/58411
5964         * c-common.c (handle_no_sanitize_undefined_attribute): New function.
5965         Declare it.
5966         (struct attribute_spec c_common_att): Add no_sanitize_undefined.
5968 2013-09-14  Iain Sandoe  <iain@codesourcery.com>
5970         PR target/48094
5971         * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
5972         fobjc-gc, freplace-objc-classes): Accept for LTO.
5974 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
5976         * c-target.def: New hook
5978 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
5980         PR c++/43452
5981         * c.opt (Wdelete-incomplete): Add.
5983 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
5985         * c-common.c (same_scalar_type_ignoring_signedness): Delete.
5986         (vector_types_compatible_elements_p): New function.
5987         * c-common.h: (same_scalar_type_ignoring_signedness): Delete
5988         declaration.
5989         (vector_types_compatible_elements_p): Declare.
5991 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5993         * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
5994         a virtual member function.
5995         (pp_simple_type_specifier): Remove.
5996         (pp_c_type_specifier): Likewise.
5997         * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
5998         Rename from pp_c_type_specifier.  Adjust.
5999         (c_pretty_printer::c_pretty_printer): Do not assign to
6000         simple_type_specifier.
6002 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6004         * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6005         member function.
6006         (c_pretty_printer::storage_class_specifier): Likewise.
6007         (c_pretty_printer::initializer): Likewise.
6008         (pp_declaration): Remove.
6009         (pp_declaration_specifiers): Likewise.
6010         (pp_abstract_declarator): Likewise.
6011         (pp_declarator): Likewise.
6012         (pp_type_id): Likewise.
6013         (pp_statement): Likewise.
6014         (pp_constant): Likewise.
6015         (pp_id_expression): Likewise.
6016         (pp_primary_expression): Likewise.
6017         (pp_unary_expression): Likewise.
6018         (pp_multiplicative_expression): Likewise.
6019         (pp_conditional_expression): Likewise.
6020         (pp_assignment_expression): Likewise.
6021         (pp_expression): Likewise.
6022         (pp_c_type_id): Likewise.
6023         (pp_c_storage_class_specifier): Likewise.
6024         * c-pretty-print.c (pp_c_type_cast): Tidy.
6025         (pp_c_pointer): Likewise.
6026         (pp_c_type_specifier): Likewise.
6027         (pp_c_parameter_type_list): Likewise.
6028         (pp_c_function_definition): Likewise.
6029         (pp_c_init_declarator): Likewise.
6030         (pp_c_initializer_list): Likewise.
6031         (pp_c_constructor_elts): Likewise.
6032         (c_pretty_printer::direct_abstract_declarator): Likewise.
6033         (c_pretty_printer::declaration_specifiers): Likewise.
6034         (c_pretty_printer::primary_expression): Likewise.
6035         (c_pretty_printer::postfix_expression): Likewise.
6036         (c_pretty_printer::type_id): Rename from pp_c_type_id.
6037         (c_pretty_printer::storage_class_specifier): Rename from
6038         pp_c_storage_class_specifier.
6039         (c_pretty_printer::initializer): Rename from pp_c_initializer.
6040         (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6041         storage_class_specifier, initializer, offset_list, flags.
6043 2013-08-30  Marek Polacek  <polacek@redhat.com>
6045         * c-ubsan.c: New file.
6046         * c-ubsan.h: New file.
6048 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6050         * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6051         member function.
6052         (c_pretty_printer::declaration_specifiers): Likewise.
6053         (c_pretty_printer::declarator): Likewise.
6054         (c_pretty_printer::abstract_declarator): Likewise.
6055         (c_pretty_printer::direct_abstract_declarator): Likewise.
6056         (c_pretty_printer::direct_declarator): Likewise.
6057         (c_pretty_printer::function_specifier): Likewise.
6058         (pp_declaration): Adjust.
6059         (pp_declaration_specifiers): Likewise.
6060         (pp_abstract_declarator): Likewise.
6061         (pp_direct_declarator): Likewise.
6062         (pp_function_specifier): Likewise.
6063         (pp_direct_abstract_declarator): Remove as unused.
6064         (pp_c_declaration): Remove.
6065         (pp_c_declaration_specifiers): Likewise.
6066         (pp_c_declarator): Likewise.
6067         (pp_c_direct_declarator): Likewise.
6068         (pp_c_function_specifier): Likewise.
6069         (pp_c_direct_abstract_declarator): Likewise.
6070         * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6071         from pp_c_abstract_declarator.  Adjust.
6072         (c_pretty_printer::direct_abstract_declarator):  Rename from
6073         pp_c_direct_abstract_declarator.  Adjust.
6074         (c_pretty_printer::function_specifier): Rename from
6075         pp_c_function_specifier.  Adjust.
6076         (c_pretty_printer::declaration_specifiers): Rename from
6077         pp_c_declaration_specifiers.  Adjust.
6078         (c_pretty_printer::direct_declarator): Rename from
6079         pp_c_direct_declarator.  Adjust.
6080         (c_pretty_printer::declarator): Rename from pp_c_declarator.  Adjust.
6081         (c_pretty_printer::declaration): Rename from pp_c_declaration.  Adjust.
6082         (c_pretty_printer::c_pretty_printer): Do not assign to
6083         declaration, declaration_specifiers, declarator,
6084         direct_declarator, direct_abstract_declarator, function_specifier.
6086 2013-08-26  Gabriel Dos Reis  <gdre@integrable-solutions.net>
6088         * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6089         virtual member function.
6090         (c_pretty_printer::multiplicative_expression): Likewise.
6091         (c_pretty_printer::conditional_expression): Likewise.
6092         (c_pretty_printer::assignment_expression): Likewise.
6093         (c_pretty_printer::expression): Likewise.
6094         (pp_unary_expression): Adjust.
6095         (pp_multiplicative_expression): Likewise.
6096         (pp_assignment_expression): Likewise.
6097         (pp_conditional_expression): Likewise.
6098         (pp_expression): Likewise.
6099         * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6100         from pp_c_unary_expression.  Adjust.
6101         (c_pretty_printer::multiplicative_expression): Rename from
6102         pp_c_multiplicative_expression.  Adjust.
6103         (c_pretty_printer::conditional_expression): Rename from
6104         pp_c_conditional_expression.  Adjust.
6105         (c_pretty_printer::assignment_expression): Rename from
6106         pp_c_assignment_expression.  Adjust.
6107         (c_pretty_printer::expression): Rename from pp_c_expression.  Adjust.
6108         (c_pretty_printer::c_pretty_printer): Do not assign to
6109         unary_expression, multiplicative_expression,
6110         conditional_expression, expression.
6112 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6114         * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6115         virtual member function.
6116         (pp_postfix_expression): Adjust.
6117         (pp_c_postfix_expression): Remove.
6118         * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6119         from pp_c_postfix_expression.  Adjust.
6120         (c_pretty_printer::c_pretty_printer): Do not assign to
6121         postfix_expression.
6123 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6125         * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6126         virtua member function.
6127         (pp_primary_expression): Adjust.
6128         (pp_c_primary_expression): Remove.
6129         * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6130         from pp_c_primary_expression.  Adjust.
6131         (pp_c_initializer_list): Use pp_primary_expression.
6132         (c_pretty_printer::c_pretty_printer): Do not assign to
6133         primary_expression.
6135 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6137         * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6138         * c-pretty-print.c (M_): Remove.
6139         (c_pretty_printer::translate_string): Define.
6140         (pp_c_type_specifier): Use it.
6141         (pp_c_primary_expression): Likewise.
6142         (pp_c_expression): Likewise.
6144 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6146         * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6147         virtual function.
6148         (pp_c_id_expression): Remove.
6149         (pp_id_expression): Adjust.
6150         * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6151         pp_c_id_expression.  Adjust.
6152         (pp_c_postfix_expression): Use pp_id_expression.
6153         (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6155 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6157         * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6158         member function.
6159         (pp_constant): Adjust.
6160         (pp_c_constant): Remove.
6161         * c-pretty-print.c (c_pretty_printer::constant): Rename from
6162         pp_c_constant.  Adjust.
6163         (pp_c_constant)
6164         (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6165         (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6167 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6169         * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6170         (c_pretty_printer::c_pretty_printer): Declare.
6171         * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6172         c_pretty_printer_init.  Adjust.
6173         (print_c_tree): Do not call c_pretty_printer_init.
6174         * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6176 2013-08-09  Arnaud Charlet  <charlet@adacore.com>
6178         * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6180 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
6182         PR c++/58080
6183         * c-common.c (pointer_int_sum): Add bool parameter.
6184         * c-common.h (pointer_int_sum): Adjust declaration.
6186 2013-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6188         * c-pretty-print.c (print_c_tree): Simplify.  Use non-static local
6189         c_pretty_printer variable.
6191 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6193         * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6194         (pp_base): Remove.
6195         (pp_c_base): Likewise.  Adjust users.
6196         * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6197         (pp_c_whitespace): Do not call pp_base.
6198         (pp_c_left_paren): Likewise.
6199         (pp_c_right_paren): Likewise.
6200         (pp_c_left_brace): Likewise.
6201         (pp_c_right_brace): Likewise.
6202         (pp_c_left_bracket): Likewise.
6203         (pp_c_right_bracket): Likewise.
6204         (pp_c_dot): Likewise.
6205         (pp_c_ampersand): Likewise.
6206         (pp_c_star): Likewise.
6207         (pp_c_arrow): Likewise.
6208         (pp_c_semicolon): Likewise.
6209         (pp_c_complement): Likewise.
6210         (pp_c_exclamation): Likewise.
6211         (pp_c_direct_declarator): Likewise.
6212         (pp_c_ws_string): Likewise.
6213         (pp_c_identifier): Likewise.
6214         (pp_c_statement): Likewise.
6215         (print_c_tree): Likewise.
6217 2013-08-04  Ed Smith-Rowland  <3dw4rd@verizon.net>
6219         PR c++/58072
6220         * c-common.c (c_parse_error): Catch user-defined literal tokens and
6221         provide useful error strings.
6223 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6225         * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6226         printer functions instead of pp_string or operators and punctuators.
6227         (dump_generic_ada_node): Likewise.
6228         * c-pretty-print.c (pp_c_type_specifier): Likewise.
6229         (pp_c_relational_expression): Likewise.
6230         (pp_c_logical_or_expression): Likewise.
6232 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6234         * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6235         functions instead of pp_character.
6236         (pp_ada_tree_identifier): Likewise.
6237         (dump_ada_double_name): Likewise.
6238         (dump_ada_function_declaration): Likewise.
6239         (dump_ada_array_domains): Likewise.
6240         (dump_template_types): Likewise.
6241         (dump_generic_ada_node): Likewise.
6242         (print_ada_declaration): Likewise.
6243         (print_ada_struct_decl): Likewise.
6244         * c-pretty-print.c (pp_c_integer_constant): Likewise.
6246 2013-07-23  Tom Tromey  <tromey@redhat.com>
6248         * c-common.h (enum rid) <RID_GENERIC>: New constant.
6249         * c-common.c (c_common_reswords): Add _Generic.
6251 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
6253         * c-common.c: Fix typos.
6254         * c-common.h: Likewise.
6256 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
6258         PR c++/55203
6259         * c-common.c (c_common_attribute_table): Add warn_unused.
6260         (handle_warn_unused_attribute): New.
6262 2013-07-10  Jakub Jelinek  <jakub@redhat.com>
6264         * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6265         for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6267 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
6269         PR c++/57869
6270         * c.opt: Add Wconditionally-supported.
6272 2013-07-08  Graham Stott  <graham.stott@btinternet.com>
6274         * array-notation-common.c (length_mismatch_in_expr_p): Delete
6275         unused variables l_length and l_node.
6277 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
6279         PR c/57821
6280         * c-common.c (complete_array_type): Delay folding first index
6281         like other indices.  When folding, check for index overflow.
6283 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
6285         PR c++/57509
6286         * c-common.h (c_build_vec_perm_expr): New complain argument.
6287         * c-common.c (c_build_vec_perm_expr): Likewise.
6288         Use save_expr also in C++.
6290 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6292         * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6293         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6294         * c-opts.c (c_common_post_options): Likewise.
6296 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6298         * array-notation-common.c (length_mismatch_in_expr): Changed the
6299         parameter type's from a dynamic array to a vec_tree.  Also removed
6300         the size parameters.
6301         * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6302         the change above.
6304 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6306         * c-common.h (struct cilkplus_an_parts): New structure.
6307         (struct cilkplus_an_loop_parts): Likewise.
6308         (cilkplus_extract_an_triplets): New prototype.
6309         (fix_sec_implicit_args): Likewise.
6310         * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6311         (fix_sec_implicit_args): Likewise.
6313 2013-06-20  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6315         * array-notation-common.c (find_inv_trees): Removed an unwanted
6316         typecasting.
6317         * c-common.h (struct inv_list::additional_tcodes): Changed type from
6318         enum rid to enum tree_code.
6320 2013-06-11  Jan Hubicka  <jh@suse.cz>
6322         * c-common.c (handle_alias_ifunc_attribute): Do not set
6323         DECL_EXTERNAL for weakref variables.
6324         * c-pragma.c (handle_pragma_weak): Make sure aliases
6325         are not declared as external.
6327 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6329         * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6330         function from c/c-array-notation.c.
6331         (is_cilkplus_reduce_builtin): Likewise.
6332         (find_rank): Likewise.
6333         (extract_array_notation_exprs): Likewise.
6334         (replace_array_notations): Likewise.
6335         (find_inv_trees): Likewise.
6336         (replace_inv_trees): Likewise.
6337         (contains_array_notation_expr): Likewise.
6338         (find_correct_array_notation_type): Likewise.
6339         * c-common.h (struct inv_list): Moved this struct from the file
6340         c/c-array-notation.c and added a new field called additional tcodes.
6341         (length_mismatch_in_expr_p): New prototype.
6342         (is_cilkplus_reduce_builtin): Likewise.
6343         (find_rank): Likewise.
6344         (extract_array_notation_exprs): Likewise.
6345         (replace_array_notation): Likewise.
6346         (find_inv_trees): Likewise.
6347         (replace_inv_trees): Likewise.
6348         (find_correct_array_notation_type): Likewise.
6350 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
6352         * c-common.c (c_define_builtins): When cilkplus is enabled, the
6353         function array_notation_init_builtins is called.
6354         (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6355         * c-common.def (ARRAY_NOTATION_REF): New tree.
6356         * c-common.h (build_array_notation_expr): New function declaration.
6357         (build_array_notation_ref): Likewise.
6358         (extract_sec_implicit_index_arg): New extern declaration.
6359         (is_sec_implicit_index_fn): Likewise.
6360         (ARRAY_NOTATION_CHECK): New define.
6361         (ARRAY_NOTATION_ARRAY): Likewise.
6362         (ARRAY_NOTATION_START): Likewise.
6363         (ARRAY_NOTATION_LENGTH): Likewise.
6364         (ARRAY_NOTATION_STRIDE): Likewise.
6365         * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6366         ARRAY_NOTATION_REF.
6367         (pp_c_expression): Likewise.
6368         * c.opt (flag_enable_cilkplus): New flag.
6369         * array-notation-common.c: New file.
6371 2013-05-14  Jakub Jelinek  <jakub@redhat.com>
6373         PR c++/57274
6374         * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6376 2013-05-10  Marc Glisse  <marc.glisse@inria.fr>
6378         * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6379         vectors.
6381 2013-05-07  Han Shen  <shenhan@google.com>
6383         * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6385 2013-04-29  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
6387         * c-common.c (check_user_alignment): Emit error for negative values.
6389 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
6391         * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6393 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
6395         * c-cppbuiltin.c (c_cpp_builtins): Do not define
6396         __GXX_EXPERIMENTAL_CXX1Y__.
6398 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
6399             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
6401         * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6402         * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6403         to simply use OPT_Wpointer_arith.
6404         (c_sizeof_or_alignof_type): Likewise.
6406 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
6408         * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6410 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
6412         * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6413         gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6414         specifiers.
6416 2013-04-07  Steven Bosscher  <steven@gcc.gnu.org>
6418         * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6420 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
6422         * c-common.c (pointer_int_sum): Remove dead code.
6424 2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
6426         PR middle-end/56524
6427         * c-common.c (handle_optimize_attribute): Don't call
6428         save_optabs_if_changed.
6430 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
6432         PR middle-end/56461
6433         * c-pch.c (pch_init): Free target_validity at the end.
6435 2013-03-04  Jakub Jelinek  <jakub@redhat.com>
6437         * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6439 2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
6440             Jakub Jelinek  <jakub@redhat.com>
6442         PR sanitizer/56454
6443         * c-common.c (handle_no_sanitize_address_attribute): New function.
6444         (c_common_attribute_table): Add no_sanitize_address attribute.
6445         (handle_no_address_safety_analysis_attribute): Add
6446         no_sanitize_address attribute, not no_address_safety_analysis
6447         attribute.
6449 2013-02-18  Aldy Hernandez  <aldyh@redhat.com>
6451         PR target/52555
6452         * c-common.c (handle_optimize_attribute): Call
6453         save_optabs_if_changed.
6455 2013-02-18  Jakub Jelinek  <jakub@redhat.com>
6456             Steven Bosscher  <steven@gcc.gnu.org>
6458         PR pch/54117
6459         * c-opts.c (c_common_post_options): If debug info is enabled
6460         and non-dwarf*, refuse to load PCH files and when writing PCH
6461         file warn.
6463 2013-02-05  Jakub Jelinek  <jakub@redhat.com>
6465         PR middle-end/56167
6466         * c-common.c (handle_error_attribute): Fix condition.
6468 2013-01-30  Jakub Jelinek  <jakub@redhat.com>
6470         PR c++/55742
6471         * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6473 2013-01-18  Jason Merrill  <jason@redhat.com>
6475         PR target/54908
6476         * c.opt (-fextern-tls-init): New.
6477         * c-opts.c (c_common_post_options): Handle it.
6479 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
6481         PR c/48418
6482         * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
6483         RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
6484         and is either negative or bigger or equal to type precision
6485         of the first operand.
6487 2012-12-03  Marek Polacek  <polacek@redhat.com>
6489         PR c/55570
6490         * c-common.c (check_user_alignment): Swap order of tests,
6491         check TREE_CODE first.
6493 2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>
6495         PR c++/52654
6496         * c-common.h (overflow_type): New enum.
6497         (build_userdef_literal): Add overflow_type argument.
6498         (tree_userdef_literal): Add overflow_type.
6499         (USERDEF_LITERAL_OVERFLOW): New access macro.
6500         * c-common.c (build_userdef_literal): Add overflow_type
6501         argument.
6502         * c-lex.c (c_lex_with_flags): Add overflow_type to
6503         build_userdef_literal calls.
6504         (interpret_integer, interpret_float): Add overflow_type argument.
6506 2012-11-28  Richard Biener  <rguenther@suse.de>
6508         PR c/35634
6509         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6510         here and use a type with proper overflow behavior for types that would
6511         need to be promoted for the arithmetic.
6513 2012-11-23  Jakub Jelinek  <jakub@redhat.com>
6515         PR sanitizer/55435
6516         * c-common.c (handle_no_address_safety_analysis_attribute): New
6517         function.
6518         (c_common_attribute_table): Add no_address_safety_analysis.
6520 2012-11-16  Simon Baldwin  <simonb@google.com>
6522         * c.opt: Add f[no-]canonical-system-headers.
6523         * c-opts.c (c_common_handle_option): Handle
6524         OPT_fcanonical_system_headers.
6526 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
6528         PR c++/54413
6529         * c-opts.c (c_common_handle_option): Set new flags.
6530         * c.opt: Describe new flags.
6532 2012-11-09  Jason Merrill  <jason@redhat.com>
6534         * c.opt (Wabi-tag): New.
6536 2012-11-09  Andi Kleen  <ak@linux.intel.com>
6538         PR 55139
6539         * c-common.c (get_atomic_generic_size): Mask with
6540         MEMMODEL_MASK
6542 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6544         PR c/53063
6545         * c.opt (Wformat): Make it Alias Wformat=1.
6546         (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
6547         Wformat-security,Wformat-y2k,Wformat-zero-length): Use
6548         LangEnabledBy.
6549         (Wformat=): RejectNegative. Use LangEnabledBy.
6550         (Wnonnull): Use LangEnabledBy.
6551         * c-opts.c (c_common_handle_option): Do not handle Wformat here.
6552         * c-format.c (set_Wformat): Delete.
6553         (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
6554         (maybe_read_dollar_number):  Likewise.
6555         (avoid_dollar_number):  Likewise.
6556         (finish_dollar_format_checking):  Likewise.
6557         (check_format_info):  Likewise.
6558         (check_format_info_main):  Likewise.
6559         (check_format_types):  Likewise.
6560         (format_type_warning):  Likewise.
6561         * c-common.c (int):  Likewise.
6562         (check_function_sentinel):  Likewise.
6563         * c-common.h (warn_format,set_Wformat): Do not declare here.
6565 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6567         PR c/53063
6568         * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
6569         Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
6570         Use LangEnabledBy.
6571         (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
6572         common.opt.
6573         (Wvariadic-macros): Init(1).
6574         * c-opts.c (c_common_handle_option): Do not handle them
6575         explicitly.
6576         (c_common_post_options): Likewise.
6577         (sanitize_cpp_opts): warn_unused_macros is now
6578         cpp_warn_unused_macros.
6579         (push_command_line_include): Likewise.
6580         * c-common.c (warn_unknown_pragmas): Do not define.
6581         * c-common.h (warn_unknown_pragmas): Do not declare.
6583 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6585         PR c/51294
6586         * c-common.c (conversion_warning): Handle conditional expressions.
6588 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
6590         PR c++/54930
6591         * c.opt (Wreturn_local_addr): Define new option.
6593 2012-10-25  Jason Merrill  <jason@redhat.com>
6595         * c.opt (Wvirtual-move-assign): New.
6597         * c.opt (Winherited-variadic-ctor): New.
6599 2012-10-25  Marc Glisse  <marc.glisse@inria.fr>
6601         PR c++/54427
6602         * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
6604 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
6606         * c-common.h (pch_cpp_save_state): Declare.
6607         * c-target.def (c_preinclude): New hook.
6608         * c-opts.c (done_preinclude): New.
6609         (push_command_line_include): Handle default preincluded header.
6610         (cb_file_change): Call pch_cpp_save_state when calling
6611         push_command_line_include.
6612         * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
6613         (pch_cpp_save_state): New.
6614         (pch_init): Call pch_cpp_save_state conditionally, instead of
6615         calling cpp_save_state.
6617 2012-10-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6619         PR c/53063
6620         PR c/40989
6621         * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
6622         Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
6623         Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
6624         Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
6625         Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
6626         * c-opts.c (c_common_handle_option): Remove explicit handling from
6627         here.
6628         (c_common_post_options): Likewise.
6630 2012-10-18  Eric Botcazou  <ebotcazou@adacore.com>
6632         * c-ada-spec.c (LOCATION_COL): Delete.
6633         (compare_location): New function.
6634         (compare_node): Use it.
6635         (compare_comment): Likewise.
6637 2012-10-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6639         PR c/53063
6640         PR c/40989
6641         * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
6642         * c-opts.c (c_common_handle_option): Do not set them here. Add
6643         comment.
6644         (c_common_post_options): Likewise.
6646 2012-10-16  Eric Botcazou  <ebotcazou@adacore.com>
6648         * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
6649         (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
6650         Remove POINTER_TYPE handling, add large unsigned handling and use
6651         ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
6653 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
6655         PR c/54381
6656         * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
6657         * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
6658         locs and array of 3 trees instead of just single loc and single
6659         sizeof_arg tree.  Handle __builtin___*_chk builtins too, and
6660         also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
6661         For *cmp* builtins that take two sources strings report warnings
6662         about first and second source, not about destination and source.
6664 2012-10-12  Marc Glisse  <marc.glisse@inria.fr>
6666         PR c++/53055
6667         * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
6669 2012-10-11  Eric Botcazou  <ebotcazou@adacore.com>
6671         * c-ada-spec.c (dump_ada_template): Bail out for template declarations
6672         declaring something coming from another file.
6674 2012-10-10  Arnaud Charlet  <charlet@adacore.com>
6676         PR ada/54845
6677         * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
6679 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
6681         PR c++/54194
6682         * c-common.c (warn_about_parentheses): Add location_t parameter;
6683         use EXPR_LOC_OR_LOC.
6684         * c-common.h: Update declaration.
6686 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
6688         PR c++/54427
6689         * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
6690         more operations. Make error messages optional.
6691         * c-common.h (enum stv_conv): Moved from c-typeck.c.
6692         (scalar_to_vector): Declare.
6694 2012-10-08  Jason Merrill  <jason@redhat.com>
6696         * c-common.c (c_common_reswords): Add thread_local.
6698 2012-10-08  Dodji Seketeli  <dodji@redhat.com>
6700         PR c++/53528 C++11 attribute support
6701         * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
6702         new functions.
6703         * c-common.c (check_cxx_fundamental_alignment_constraints): New
6704         static function.
6705         (handle_aligned_attribute): In choose strictest alignment
6706         among many.  Use new check_cxx_fundamental_alignment_constraints.
6707         (handle_transparent_union_attribute): In c++11 attribute syntax,
6708         don't look through typedefs.
6710 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
6712         * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
6713         * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
6714         out of dumpfile.h.
6716 2012-09-25  Dehao Chen  <dehao@google.com>
6718         PR middle-end/54645
6719         * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6720         map when read in the pch.
6722 2012-09-18  Arnaud Charlet  <charlet@adacore.com>
6724         * c-ada-spec.c: Style fixes.
6726 2012-09-18  Thomas Quinot  <quinot@adacore.com>
6728         * c.opt (-fada-spec-parent): Define new command line switch.
6729         * c-ada-spec.c (get_ada_package): When -fada-spec-parent
6730         is specified, generate binding spec as a child of the specified unit.
6732 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
6733             Manuel López-Ibáñez  <manu@gcc.gnu.org>
6735         PR c++/53210
6736         * c.opt ([Winit-self]): Enabled by -Wall in C++.
6738 2012-08-23  Arnaud Charlet  <charlet@adacore.com>
6740         * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
6741         for pointers, and add missing Convention C pragma.
6742         (print_ada_struct_decl): Add missing aliased keyword.
6743         (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
6745 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
6747         * c-common.c (sizeof_pointer_memaccess_warning): New function.
6748         * c.opt (-Wsizeof-pointer-memaccess): Add new option.
6749         * c-opts.c (c_common_handle_option): Enable it for -Wall.
6750         * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
6751         * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
6753 2012-08-10  Richard Guenther  <rguenther@suse.de>
6755         * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
6757 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
6759         * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
6760         instead of separate pp_newline and pp_flush.
6761         (print_c_tree): Likewise.
6763 2012-07-26  Richard Henderson  <rth@redhat.com>
6765         * c-common.c (handle_hot_attribute): Allow labels.
6766         (handle_cold_attribute): Likewise.
6768 2012-07-20  Jakub Jelinek  <jakub@redhat.com>
6770         PR c++/28656
6771         * c-common.c (check_function_nonnull): Handle multiple nonnull
6772         attributes properly.
6774 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
6776         * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
6777         * c-ada-spec.c: Likewise.
6778         * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
6780 2012-07-14  Steven Bosscher  <steven@gcc.gnu.org>
6782         * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
6783         Remove code conditional on it.
6785 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
6787         * c-gimplify.c: Do not include basic-block.h.
6788         * c-common.c: Do not include linfuncs.h.
6790 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
6792         * c-common.h: Include tree.h.
6794 2012-07-02  Jason Merrill  <jason@redhat.com>
6796         PR c++/53524
6797         * c-common.c (get_priority): Call default_conversion.
6799 2012-07-01  Uros Bizjak  <ubizjak@gmail.com>
6801         * c-pch.c (c_common_write_pch): Remove unused variables.
6803 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
6805         * cppspec.c: Moved from gcc/ to here.
6807 2012-06-27  Kai Tietz  <ktietz@redhat.com>
6809         PR preprocessor/37215
6810         * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
6812 2012-06-21  Steven Bosscher  <steven@gcc.gnu.org>
6814         * c-common.h (c_common_print_pch_checksum): Remove.
6815         * c-pch.c: Do not include output.h.
6816         (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
6817         (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
6818         (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
6819         (struct c_pch_header): Remove.
6820         (get_ident): Update gpch version.
6821         (pch_init): Do not print executable_checksum to asm_out_file.
6822         Do not fail if there is no asm_out_file to read back from.  Set
6823         asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
6824         (c_common_write_pch): Verify that nothing was written to asm_out_file
6825         since pch_init was called.  Do not write a c_pch_header, and do not
6826         copy from asm_out_file to the PCH.
6827         (c_common_read_pch): Do not read a c_pch_header, and do not restore
6828         the content of asm_out_file from the PCH.
6829         (c_common_print_pch_checksum): Remove.
6830         * c-opts.c (c_common_init): Print out executable_checksum directly.
6832 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
6834         * c-target.def (objc_declare_unresolved_class_reference,
6835         objc_declare_class_definition): Add new hooks.
6837 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
6839         * c-lex.c: Do not include output.h.
6840         (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
6841         Remove uses of ASM_OUTPUT_IDENT.
6843 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
6845         PR c++/51033
6846         * c-common.h (c_build_vec_perm_expr): Move decl here.
6847         * c-common.c (c_build_vec_perm_expr): Move definition
6848         here.
6850 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
6852         * c.opt (fconserve-space): Turn into a no-op.
6854 2012-06-04  Sterling Augustine  <saugustine@google.com>
6856         * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
6857         * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
6858         both the start and end of the function.
6860 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
6862         * c-common.c: Do not include output.h.
6863         * c-pragma.c: Likewise.
6865 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
6867         * error.c (dump_decl): Check pp_c_flag_gnu_v3.
6868         (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
6869         (lang_decl_name): Handle namespace decls.
6871 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
6873         * c-ada-spec.c: Do not include output.h.
6874         * c-semantics.c: Likewise.
6876 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
6878         * c-common.c: Fix typo.
6880 2012-05-29  Michael Matz  <matz@suse.de>
6882         * c-common.h (c_expand_decl): Remove prototype.
6884 2012-05-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6886         * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
6887         * c-opts.c (c_common_handle_option): Remove code handling
6888         warn_missing_braces.
6890 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
6892         PR c++/25137
6893         * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
6894         -Wmissing_braces.
6896 2012-05-22  Dodji Seketeli  <dodji@redhat.com>
6898         PR c++/53322
6899         * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
6901 2012-05-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6903         * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
6904         * c-opts.c (c_common_handle_option): Do not handle explicitly
6905         Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
6907 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
6909         PR preprocessor/7263
6910         * c-lex.c (c_lex_with_flags):  Pass a virtual location to the call
6911         to cpp_classify_number.  For diagnostics, use the precise location
6912         instead of the global input_location.
6914 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
6916         PR c++/11856
6917         * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
6919 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
6921         * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
6923 2012-05-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6925         PR 53063
6926         * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
6927         Wreorder): Use LangEnabledBy.
6928         * c-opts.c (c_common_handle_option): Do not enable them
6929         explicitly. Call lang-specific generated functions.
6930         (c_common_post_options): Do not set them here.
6932 2012-05-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6934         * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
6935         Wmissing-field-initializers,Wmissing-parameter-type,
6936         Wold-style-declaration,Woverride-init): Use EnabledBy.
6937         * c-opts.c (c_common_post_options): Do not set here explicitly.
6939 2012-05-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6941         PR 53063
6942         * c-opts.c (c_common_handle_option): Use handle_generated_option
6943         to enable sub-options.
6945 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
6947         PR c++/53158
6948         * c-common.c (warnings_for_convert_and_check): Use warning_at.
6950 2012-05-10  Richard Guenther  <rguenther@suse.de>
6952         * c-common.c (c_sizeof_or_alignof_type): Remove assert and
6953         adjust commentary about TYPE_IS_SIZETYPE types.
6955 2012-05-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6957         PR c++/53261
6958         * c-common.c (warn_logical_operator): Check that argument of
6959         integer_zerop is not NULL.
6961 2012-05-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6963         PR c/43772
6964         * c-common.c (warn_logical_operator): Do not warn if either side
6965         is already true or false.
6967 2012-05-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6969         PR c/51712
6970         * c-common.c (expr_original_type): New.
6971         (shorten_compare): Do not warn for enumeration types.
6973 2012-05-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6975         * c.opt (fpermissive): Add Var(flag_permissive).
6977 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
6979         PR c++/51033
6980         * c-common.c (convert_vector_to_pointer_for_subscript): New function.
6981         * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
6983 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
6985         Add -Wvarargs option
6986         * c.opt (Wvarargs):  Define new option.
6988 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6990         * c-common.c (check_function_arguments): Replace
6991         Wmissing-format-attribute with Wsuggest-attribute=format.
6993 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
6995         * c.opt (Wsuggest-attribute=format): New. Alias of
6996         Wmissing-format-attribute.
6997         * c-format.c (decode_format_type): Replace
6998         Wmissing-format-attribute with Wsuggest-attribute=format.
6999         (check_function_format): Likewise.
7001 2012-04-27  Ollie Wild  <aaw@google.com>
7003         * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7004         * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7005         * c.opt: Add Wliteral-suffix.
7007 2012-04-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7009         PR c/44774
7010         * c.opt (Wpedantic): New.
7011         (pedantic): Alias Wpedantic.
7012         * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7013         (c_common_post_options): Likewise.
7014         (sanitize_cpp_opts): Likewise.
7015         * c-lex.c (interpret_float): Likewise.
7016         * c-format.c (check_format_types): Likewise.
7017         * c-common.c (pointer_int_sum): Likewise.
7018         (c_sizeof_or_alignof_type): Likewise.
7019         (c_add_case_label): Likewise.
7020         (c_do_switch_warnings): Likewise.
7021         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7023 2012-04-15  Jason Merrill  <jason@redhat.com>
7025         PR c++/52818
7026         * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7027         (C_STD_NAME): Distinguish between C++98 and C++11.
7029 2012-04-11  Eric Botcazou  <ebotcazou@adacore.com>
7031         PR target/52624
7032         * c-common.h (uint16_type_node): Rename into...
7033         (c_uint16_type_node): ...this.
7034         * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7035         * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7037 2012-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7039         * c-common.c (warn_if_unused_value): Move definition to here.
7040         * c-common.h (warn_if_unused_value): Move declaration to here.
7042 2012-03-23  William Bader  <williambader@hotmail.com>
7044         * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7046 2012-03-20  Jason Merrill  <jason@redhat.com>
7048         * c-common.h (enum cxx_dialect): Add cxx1y.
7049         * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7050         test.
7051         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7052         * c-opts.c (c_common_post_options): Likewise.
7053         (set_std_cxx1y): New.
7054         (c_common_handle_option): Call it.
7055         * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7057 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
7059         PR c++/14710
7060         * c.opt ([Wuseless-cast]): Add.
7062 2012-03-16  Richard Guenther  <rguenther@suse.de>
7064         * c-pretty-print.c (pp_c_initializer_list): Adjust.
7066 2012-03-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7068         PR c++/44783
7069         * c.opt (ftemplate-backtrace-limit) Add.
7071 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7073         * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7074         handling.
7075         * c-pragma.c (handle_pragma_extern_prefix): Remove.
7076         (init_pragma): Don't register extern_prefix.
7078 2012-03-12  Richard Guenther  <rguenther@suse.de>
7080         * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7081         (builtin_type_for_size): Likewise.
7083 2012-02-13  Jakub Jelinek  <jakub@redhat.com>
7085         PR c++/52215
7086         * c-common.c (sync_resolve_params): Don't decide whether to convert
7087         or not based on TYPE_SIZE comparison, convert whenever arg_type
7088         is unsigned INTEGER_TYPE.
7090 2012-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
7092         PR c/52118
7093         * c.opt ([Wunused-local-typedefs]): Fix description.
7095 2012-01-24  Mike Stump  <mikestump@comcast.net>
7097         * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7098         exactly.
7100 2012-01-18  Richard Guenther  <rguenther@suse.de>
7102         * c-opts.c (c_common_post_options): Reset LTO flags if
7103         we are about to generate a PCH.
7105 2012-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
7107         PR c++/51777
7108         * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7109         use pp_unsigned_wide_integer.
7111 2012-01-10  Richard Guenther  <rguenther@suse.de>
7113         PR middle-end/51806
7114         * c-opts.c (c_common_handle_option): Move -Werror handling
7115         to language independent code.
7117 2012-01-05  Richard Guenther  <rguenther@suse.de>
7119         PR middle-end/51764
7120         * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7121         from common.opt.
7123 2011-12-30  Paolo Carlini  <paolo.carlini@oracle.com>
7125         PR c++/51316
7126         * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7127         of array types with an unknown bound.
7129 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
7131         * c-common.c (flag_isoc99): Update comment to refer to C11.
7132         (flag_isoc1x): Change to flag_isoc11.
7133         * c-common.h (flag_isoc99): Update comment to refer to C11.
7134         (flag_isoc1x): Change to flag_isoc11.
7135         * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7136         C11.
7137         * c-opts.c (set_std_c1x): Change to set_std_c11.
7138         (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7139         Call set_std_c11.
7140         (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7141         (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7142         * c.opt (std=c1x): Change to std=c11.  Document as non-draft
7143         standard.
7144         (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7145         (std=gnu1x): Change to std=gnu11.  Refer to non-draft standard.
7146         (std=gnu1x): Make alias of std=gnu11.
7148 2011-12-19  Jason Merrill  <jason@redhat.com>
7150         PR c++/51228
7151         * c-common.c (handle_transparent_union_attribute): Check the first
7152         field if the type is complete.
7154 2011-12-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
7156         PR libstdc++/51365
7157         * c-common.c (RID_IS_FINAL): Add.
7158         * c-common.h (RID_IS_FINAL): Add.
7160 2011-11-30  Iain Sandoe  <iains@gcc.gnu.org>
7162         * c.opt (fgnu-runtime): Provide full description.
7163         (fnext-runtime): Likewise.
7164         * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7166 2011-11-28  Andrew MacLeod  <amacleod@redhat.com>
7168         * c-cpp-builtin.c (cpp_atomic_builtins):New.  Emit all atomic
7169         predefines in one place.  Add LOCK_FREE predefines.
7170         (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7171         new func.
7173 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
7175         PR c/51256
7176         * c-common.c (get_atomic_generic_size): Check for various error
7177         conditions
7178         (resolve_overloaded_atomic_exchange,
7179         resolve_overloaded_atomic_compare_exchange,
7180         resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7181         error_mark_node for error conditions.
7183 2011-11-08  Richard Guenther  <rguenther@suse.de>
7185         PR middle-end/51010
7186         c-family/
7188 2011-11-07  Richard Henderson  <rth@redhat.com>
7189             Aldy Hernandez  <aldyh@redhat.com>
7190             Torvald Riegel  <triegel@redhat.com>
7192         Merged from transactional-memory.
7194         * c-common.c (handle_tm_wrap_attribute,
7195         handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7196         (struct c_common_reswords): Added __transaction* keywords.
7197         (struct c_common_attribute_table): Added transaction* and tm_regparm
7198         attributes.
7199         * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7200         masks.
7201         (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7202         find_tm_attribute): Declare.
7204 2011-11-07  Jason Merrill  <jason@redhat.com>
7206         PR c++/35688
7207         * c-common.c, c-common.h: Revert yesterday's changes.
7209 2011-11-06  Jason Merrill  <jason@redhat.com>
7211         PR c++/35688
7212         * c-common.c (decl_has_visibility_attr): Split out from...
7213         (c_determine_visibility): ...here.
7214         * c-common.h: Declare it.
7216 2011-11-06  Joseph Myers  <joseph@codesourcery.com>
7218         * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7219         (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7220         type.
7221         (check_user_alignment): New.  Split out of
7222         handle_aligned_attribute.  Disallow integer constants with
7223         noninteger types.  Conditionally allow zero.
7224         (handle_aligned_attribute): Use check_user_alignment.
7225         * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7227 2011-11-06  Andrew MacLeod  <amacleod@redhat.com>
7228             Richard Henderson  <rth@redhat.com>
7230         Merged from cxx-mem-model.
7232         * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
7233         * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
7234         parameters that are the same type size.
7235         (get_atomic_generic_size): New.  Find size of generic
7236         atomic function parameters and do typechecking.
7237         (add_atomic_size_parameter): New.  Insert size into parameter list.
7238         (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7239         either __atomic_exchange_n or external library call.
7240         (resolve_overloaded_atomic_compare_exchange): Restructure
7241         __atomic_compare_exchange to either _n variant or external library call.
7242         (resolve_overloaded_atomic_load): Restructure __atomic_load to either
7243         __atomic_load_n or an external library call.
7244         (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7245         __atomic_store_n or an external library call.
7246         (resolve_overloaded_builtin): Handle new __atomic builtins.
7248 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
7250         PR c++/50608
7251         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7252         (fold_offsetof_1): Make global.  Remove STOP_REF argument and adjust.
7253         <INDIRECT_REF>: Return the argument.
7254         <ARRAY_REF>: Remove special code for negative offset.
7255         Call fold_build_pointer_plus instead of size_binop.
7256         (fold_offsetof): Remove STOP_REF argument and adjust.
7257         * c-common.h (fold_offsetof_1): Declare.
7258         (fold_offsetof): Remove STOP_REF argument.
7260 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
7262         PR c++/50810
7263         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7264         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7265         Wnarrowing for C++0x and C++98.
7266         * c.opt ([Wnarrowing]): Update.
7268 2011-11-01  Paolo Carlini  <paolo.carlini@oracle.com>
7270         PR c++/44277
7271         * c.opt: Add Wzero-as-null-pointer-constant.
7273 2011-10-31  Jason Merrill  <jason@redhat.com>
7275         * c.opt (-fdeduce-init-list): Off by default.
7277         PR c++/50920
7278         * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7279         * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7280         and -Wc++11-compat.
7281         * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7283 2011-10-27  Roberto Agostino Vitillo  <ravitillo@lbl.gov>
7285         PR c++/30066
7286         * c.opt (fvisibility-inlines-hidden): Description change.
7288 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
7290         Implement C++11 user-defined literals.
7291         * c-common.c (build_userdef_literal): New.
7292         * c-common.def: New tree code.
7293         * c-common.h (tree_userdef_literal): New tree struct and accessors.
7294         * c-lex.c (interpret_float): Add suffix parm.
7295         (c_lex_with_flags): Build literal tokens.
7297 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
7299         PR c++/50841
7300         Revert:
7301         2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
7303         PR c++/50810
7304         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7305         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7306         Wnarrowing for C++0x and C++98.
7307         * c.opt ([Wnarrowing]): Update.
7309 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
7311         PR c++/50810
7312         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7313         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7314         Wnarrowing for C++0x and C++98.
7315         * c.opt ([Wnarrowing]): Update.
7317 2011-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
7319         PR c++/45385
7320         * c-common.c (conversion_warning): Remove code looking for
7321         artificial operands.
7323 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
7325         PR bootstrap/50760
7326         * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
7327         !NO_IMPLICIT_EXTERN_C.
7329 2011-10-17  Michael Spertus  <mike_spertus@symantec.com>
7331         * c-common.c (c_common_reswords): Add __bases,
7332         __direct_bases.
7333         * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7335 2011-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
7337         PR c++/50757
7338         * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7340 2011-10-15  Tom Tromey  <tromey@redhat.com>
7341             Dodji Seketeli  <dodji@redhat.com>
7343         * c.opt (fdebug-cpp): New option.
7344         * c-opts.c (c_common_handle_option): Handle the option.
7345         * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7346         output stream in parameter. Factorized from ...
7347         (maybe_print_line): ... this. Dump location debug information when
7348         -fdebug-cpp is in effect.
7349         (print_line_1): New static function. Takes an output stream in
7350         parameter. Factorized from ...
7351         (print_line): ... here. Dump location information when -fdebug-cpp
7352         is in effect.
7353         (scan_translation_unit): Dump location information when
7354         -fdebug-cpp is in effect.
7356 2011-10-15  Tom Tromey  <tromey@redhat.com>
7357             Dodji Seketeli  <dodji@redhat.com>
7359         * c.opt (ftrack-macro-expansion): New option. Handle it with and
7360         without argument.
7361         * c-opts.c (c_common_handle_option)<case
7362         OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7363         cases. Handle -ftrack-macro-expansion with and without argument.
7365 2011-10-15  Tom Tromey  <tromey@redhat.com>
7366             Dodji Seketeli  <dodji@redhat.com>
7368         * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7369         (print_line, cb_define, do_line_change): Adjust to avoid touching
7370         the internals of struct line_map.  Use the public API instead.
7371         * c-pch.c (c_common_read_pch): Likewise.
7372         * c-lex.c (fe_file_change): Likewise.
7374 2011-10-14  Paolo Carlini  <paolo.carlini@oracle.com>
7376         PR c++/17212
7377         * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7379 2011-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
7381         PR c++/33067
7382         * c-pretty-print.c (pp_c_floating_constant): Output
7383         max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7385 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
7387         * c-common.c (def_builtin_1): Delete old interface with two
7388         parallel arrays to hold standard builtin declarations, and replace
7389         it with a function based interface that can support creating
7390         builtins on the fly in the future.  Change all uses, and poison
7391         the old names.  Make sure 0 is not a legitimate builtin index.
7392         * c-omp.c (c_finish_omp_barrier): Ditto.
7393         (c_finish_omp_taskwait): Ditto.
7394         (c_finish_omp_flush): Ditto.
7396 2011-10-11  Tristan Gingold  <gingold@adacore.com>
7398         * c.opt: (fallow-parameterless-variadic-functions): New.
7400 2011-09-08  Dodji Seketeli  <dodji@redhat.com>
7402         PR c++/33255 - Support -Wunused-local-typedefs warning
7403         * c-common.h (struct c_language_function::local_typedefs): New
7404         field.
7405         (record_locally_defined_typedef, maybe_record_typedef_use)
7406         (maybe_warn_unused_local_typedefs): Declare new functions.
7407         * c-common.c (record_locally_defined_typedef)
7408         (maybe_record_typedef_use)
7409         (maybe_warn_unused_local_typedefs): Define new functions.
7410         * c.opt: Declare new -Wunused-local-typedefs flag.
7412 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
7414         PR middle-end/50266
7415         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7416         computations.
7418 2011-09-05  Richard Guenther  <rguenther@suse.de>
7420         * c-common.c (complete_array_type): Use ssize_int (-1) instead
7421         of integer_minus_one_node for empty array upper bounds.
7423 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
7425         * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7426         it's the first time it's being called on this main TU.
7428 2011-08-24  Richard Guenther  <rguenther@suse.de>
7430         PR c/49396
7431         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7433 2011-08-22  Gabriel Charette  <gchare@google.com>
7435         * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7436         defined in cpp_init_builtins and c_cpp_builtins.
7438 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
7440         * c-common.c (c_common_reswords): Add __builtin_complex.
7441         * c-common.h (RID_BUILTIN_COMPLEX): New.
7443 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
7445         * c-common.c (c_common_reswords): Add _Noreturn.
7446         (keyword_is_function_specifier): Handle RID_NORETURN.
7447         * c-common.h (RID_NORETURN): New.
7449 2011-08-10  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
7451         * c-common.c (unsafe_conversion_p): New function. Check if it is
7452         unsafe to convert an expression to the type.
7453         (conversion_warning): Adjust, use unsafe_conversion_p.
7454         * c-common.h (unsafe_conversion_p): New function declaration.
7456 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
7458         * c-common.h (c_finish_omp_atomic): Adjust prototype.
7459         (c_finish_omp_taskyield): New prototype.
7460         * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7461         arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7462         OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC.  If LHS1
7463         or RHS1 have side-effects, evaluate those too in the right spot,
7464         if it is a decl and LHS is also a decl, error out if they
7465         aren't the same.
7466         (c_finish_omp_taskyield): New function.
7467         * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7468         * c-pragma.c (omp_pragmas): Add taskyield.
7469         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7470         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7471         PRAGMA_OMP_CLAUSE_MERGEABLE.
7473 2011-07-25  Dodji Seketeli  <dodji@redhat.com>
7475         * c-common.h (set_underlying_type): Remove parm name from
7476         declaration.
7478 2011-07-25  Romain Geissler  <romain.geissler@gmail.com>
7480         * c-pretty-print.h: Search c-common.h in c-family.
7482 2011-07-22  Jason Merrill  <jason@redhat.com>
7484         PR c++/49793
7485         * c.opt (Wnarrowing): New.
7487         PR c++/30112
7488         * c-common.h: Declare c_linkage_bindings.
7489         * c-pragma.c (handle_pragma_redefine_extname): Use it.
7491         PR c++/49813
7492         * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
7493         * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
7494         as flag_isoc99 for 'restrict'.
7495         (pp_c_specifier_qualifier_list): Likewise for _Complex.
7497 2011-07-21  Ian Lance Taylor  <iant@google.com>
7499         PR middle-end/49705
7500         * c-common.c (c_disable_warnings): New static function.
7501         (c_enable_warnings): New static function.
7502         (c_fully_fold_internal): Change local unused_p to bool.  Call
7503         c_disable_warnings and c_enable_warnings rather than change
7504         c_inhibit_evaluation_warnings.
7506 2011-07-20  Jason Merrill  <jason@redhat.com>
7508         PR c++/6709 (DR 743)
7509         PR c++/42603 (DR 950)
7510         * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
7511         (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
7512         (CPP_DECLTYPE): New.
7513         * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
7515 2011-07-19  Richard Guenther  <rguenther@suse.de>
7517         * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
7518         * c-omp.c (c_finish_omp_for): Likewise.
7520 2011-07-12  Eric Botcazou  <ebotcazou@adacore.com>
7522         * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
7523         body on the next line.
7525 2011-07-08  Jason Merrill  <jason@redhat.com>
7527         PR c++/45437
7528         * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
7530         PR c++/49673
7531         * c-common.c (c_apply_type_quals_to_decl): Don't check
7532         TYPE_NEEDS_CONSTRUCTING.
7534 2011-07-06  Richard Guenther  <rguenther@suse.de>
7536         * c-common.c (c_common_nodes_and_builtins):
7537         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
7539 2011-07-05  Richard Guenther  <rguenther@suse.de>
7541         * c-common.c (c_common_nodes_and_builtins): Build all common
7542         tree nodes first.
7544 2011-06-27  Jakub Jelinek  <jakub@redhat.com>
7546         * c-common.h (c_tree_chain_next): New static inline function.
7548         * c-common.c (check_builtin_function_arguments): Handle
7549         BUILT_IN_ASSUME_ALIGNED.
7551 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
7553         * c-common.c: Add sync_ or SYNC__ to builtin names.
7554         * c-omp.c: Add sync_ or SYNC__ to builtin names.
7556 2011-06-20  Pierre Vittet  <piervit@pvittet.com>
7558         * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
7559         handler.
7560         (gen_pragma_handler): New union.
7561         (internal_pragma_handler): New type.
7562         (c_register_pragma_with_data)
7563         (c_register_pragma_with_expansion_and_data): New functions.
7565         * c-pragma.c (registered_pragmas, c_register_pragma_1)
7566         (c_register_pragma, c_register_pragma_with_expansion)
7567         (c_invoke_pragma_handler): Changed to work with
7568         internal_pragma_handler.
7569         (c_register_pragma_with_data)
7570         (c_register_pragma_with_expansion_and_data): New functions.
7572 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
7574         * c-common.c: Include common/common-target.h.
7575         (handle_section_attribute): Use
7576         targetm_common.have_named_sections.
7577         * c-cppbuiltin.c: Include common/common-target.h.
7578         (c_cpp_builtins): Use targetm_common.except_unwind_info.
7580 2011-06-10  Richard Guenther  <rguenther@suse.de>
7582         * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
7583         to print a IDENTIFIER_NODE.
7585 2011-06-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7586             Joseph Myers  <joseph@codesourcery.com>
7588         * c.opt (fbuilding-libgcc): New option.
7589         * c-cppbuiltin.c (c_cpp_builtins): Define
7590         __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
7592 2011-06-07  Jason Merrill  <jason@redhat.com>
7594         * c-common.c (max_tinst_depth): Lower default to 900.
7596         * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
7598 2011-06-07  Richard Guenther  <rguenther@suse.de>
7600         * c-common.c (c_common_nodes_and_builtins): Do not set
7601         size_type_node or call set_sizetype.
7603 2011-06-07  Dodji Seketeli  <dodji@redhat.com>
7605         PR debug/49130
7606         * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
7607         type when using pointer comparison to compare types.
7609 2011-06-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
7611         * c.opt: Add -Wdelete-non-virtual-dtor.
7612         * c-opts.c (c_common_handle_option): Include it in -Wall.
7614 2011-05-30  Nathan Froyd  <froydnj@gcc.gnu.org>
7616         PR bootstrap/49190
7618         Revert:
7619         2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
7621         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7622         not tree_common.
7624 2011-05-27  Jakub Jelinek  <jakub@redhat.com>
7626         PR c++/49165
7627         * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
7628         C++ don't call c_common_truthvalue_conversion on void type arms.
7630 2011-05-27  Nathan Froyd  <froydnj@codesourcery.com>
7632         * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
7633         (stmt_list_stack): Define.
7634         (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
7635         * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
7637 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
7639         * c-common.c (warning_candidate_p): Check for BLOCKs.
7641 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
7643         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7644         not tree_common.
7646 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
7648         * c-common.c (def_fn_type): Remove extra va_end.
7650 2011-05-23  Jason Merrill  <jason@redhat.com>
7652         PR c++/48106
7653         * c-common.c (c_common_get_narrower): New.
7654         (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
7656 2011-05-23  Nathan Froyd  <froydnj@codesourcery.com>
7658         * c-common.h (check_function_arguments): Tweak prototype of
7659         check_function_arguments.
7660         * c-common.c (check_function_arguments): Likewise.  Adjust
7661         calls to check_function_nonnull, check_function_format, and
7662         check_function_sentinel.
7663         (check_function_sentinel): Take a FUNCTION_TYPE rather than
7664         separate attributes and typelist arguments.  Use
7665         FOREACH_FUNCTION_ARGS to iterate over argument types.
7667 2011-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
7669         * c-common.c (c_common_reswords): Reorder.
7670         * c-common.h (rid): Likewise.
7672 2011-05-10  Nathan Froyd  <froydnj@codesourcery.com>
7674         * c-common.c (def_fn_type): Don't call build_function_type, call
7675         build_function_type_array or build_varargs_function_type_array
7676         instead.
7677         (c_common_nodes_and_builtins): Likewise.
7679 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
7681         * c-common.c (c_add_case_label): Omit the loc argument to
7682         build_case_label.
7683         * c-common.h (build_case_label): Remove.
7684         * c-semantics.c (build_case_label): Remove.
7686 2011-05-05  Joseph Myers  <joseph@codesourcery.com>
7688         * c-objc.h (objc_start_method_definition): Update prototype.
7689         * stub-objc.c (objc_start_method_definition): Add extra parameter.
7691 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
7693         * c-common.c (check_main_parameter_types): Reindent.  Don't use
7694         TYPE_ARG_TYPES directly.
7695         (handle_nonnull_attribute): Likewise.
7696         (sync_resolve_params): Likewise.
7697         * c-format.c (handle_format_arg_attribute): Likewise.  Adjust call
7698         to check_format_string.
7699         (handle_format_attribute): Likewise.
7700         (check_format_string): Take a function type to examine instead of
7701         a type list.  Use a function_arg_iterator to step through argument
7702         types.
7704 2011-05-04  Richard Guenther  <rguenther@suse.de>
7706         * c-common.c (fix_string_type): Use size_int for index type bounds.
7707         (start_fname_decls): Do not pass NULL to build_int_cst.
7708         (c_init_attributes): Likewise.
7709         * c-lex.c (c_lex_with_flags): Likewise.
7711 2011-04-27  Jason Merrill  <jason@redhat.com>
7713         * c-common.c (make_tree_vector_from_list): New.
7714         * c-common.h: Declare it.
7716 2011-04-26  Richard Guenther  <rguenther@suse.de>
7718         PR preprocessor/48248
7719         * c-ppoutput.c (maybe_print_line): Always optimize newlines
7720         for output size with -P.
7722 2011-04-25  Paolo Carlini  <paolo.carlini@oracle.com>
7724         * c-common.c (struct c_common_resword): Add __underlying_type.
7725         * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
7727 2011-04-20  Jim Meyering  <meyering@redhat.com>
7729         * c-format.c (init_dollar_format_checking): Remove useless
7730         if-before-free.
7732 2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
7734         * c-objc.h (objc_get_interface_ivars): Removed.
7735         (objc_detect_field_duplicates): New.
7736         * stub-objc.c: Likewise.
7738 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
7740         * stub-objc.c (objc_declare_protocols): Renamed to
7741         objc_declare_protocol.
7742         * c-objc.h: Likewise.
7744 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
7746         * stub-objc.c (objc_declare_class): Updated argument name.
7748 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
7750         * c-common.h (c_common_init_ts): Declare.
7751         * c-common.c (c_common_init_ts): Define.
7753 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
7755         * c-objc.h (objc_build_message_expr): Updated prototype.
7756         * stub-objc.c (objc_build_message_expr): Likewise.
7758 2011-04-12  Martin Jambor  <mjambor@suse.cz>
7760         * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
7761         of cgraph_node.
7763 2011-04-11  Richard Guenther  <rguenther@suse.de>
7765         * c-common.c (complete_array_type): Build a range type of
7766         proper type.
7768 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
7770         * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
7771         (handle_type_generic_attribute): Likewise.
7773 2011-04-07  Jason Merrill  <jason@redhat.com>
7775         PR c++/48450
7776         * c-common.c (c_common_truthvalue_conversion): Don't ignore
7777         conversion from C++0x scoped enum.
7779 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
7781         * c-target-def.h: New file.
7782         * c-target.def: New file.
7783         * c-target.h: New file.
7784         * c-common.c (targetcm): Don't define here.
7785         * c-common.h (default_handle_c_option): Declare.
7786         * c-format.c: Include c-target.h instead of target.h.
7787         * c-opts.c: Include c-target.h instead of target.h.  Explicitly
7788         include tm.h.
7789         (default_handle_c_option): Move from targhooks.c.
7791 2011-03-29  Jakub Jelinek  <jakub@redhat.com>
7793         PR preprocessor/48248
7794         * c-ppoutput.c (print): Add src_file field.
7795         (init_pp_output): Initialize it.
7796         (maybe_print_line): Don't optimize by adding up to 8 newlines
7797         if map->to_file and print.src_file are different file.
7798         (print_line): Update print.src_file.
7800 2011-03-25  Kai Tietz  <ktietz@redhat.com>
7802         * c-ada-spec.c (compare_comment): Use filename_cmp
7803         instead of strcmp for filename.
7805 2011-03-25  Jeff Law  <law@redhat.com>
7807         * c-common.c (def_fn_type): Add missing va_end.
7809 2011-03-25  Jason Merrill  <jason@redhat.com>
7811         * c.opt: Add -std=c++03.
7813 2011-03-22  Eric Botcazou  <ebotcazou@adacore.com>
7815         * c-ada-spec.c (dump_ada_template): Skip non-class instances.
7817 2011-03-17  Kai Tietz  <ktietz@redhat.com>
7819         PR target/12171
7820         * c-pretty-print.c (pp_c_specifier_qualifier_list):
7821         Display allowed attributes for function pointer types.
7822         (pp_c_attributes_display): New function to display
7823         attributes having affects_type_identity flag set to true.
7824         * c-pretty-print.h (pp_c_attributes_display): New prototype.
7826         * c-common.c (c_common_attribute_table):
7827         Add new element.
7828         (c_common_format_attribute_table): Likewise.
7830 2011-03-18  Jason Merrill  <jason@redhat.com>
7832         * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
7833         * c-common.h: Don't declare it here.
7834         * c-common.c: Or define it here.
7835         * c-opts.c (c_common_handle_option): Or set it here.
7837         PR c++/35315
7838         * c-common.c (handle_transparent_union_attribute): Don't
7839         make a duplicate type in C++.
7841 2011-03-15  Jason Merrill  <jason@redhat.com>
7843         * c-common.c (max_constexpr_depth): New.
7844         * c-common.h: Declare it.
7845         * c-opts.c (c_common_handle_option): Set it.
7846         * c.opt (fconstexpr-depth): New option.
7848 2011-03-11  Jason Merrill  <jason@redhat.com>
7850         * c-common.c (attribute_takes_identifier_p): Add missing const.
7852         PR c++/46803
7853         * c-common.c (attribute_takes_identifier_p): Assume that an
7854         unknown attribute takes an identifier.
7856 2011-03-07  Nathan Froyd  <froydnj@codesourcery.com>
7858         PR c/47786
7859         * c-common.c (c_type_hash): Call list_length instead of iterating
7860         through DECL_CHAIN.  Rename 'i' to 'n_elements'.
7862 2011-02-19  Jakub Jelinek  <jakub@redhat.com>
7864         PR c/47809
7865         * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
7867 2011-02-17  Iain Sandoe  <iains@gcc.gnu.org>
7869         * c.opt (fobjc-abi-version=) New.
7870         (fobjc-nilcheck): New.
7872 2011-02-03  Nathan Froyd  <froydnj@codesourcery.com>
7874         PR c++/46890
7875         * c-common.h (keyword_is_decl_specifier): Declare.
7876         * c-common.c (keyword_is_decl_specifier): Define.
7877         (keyword_is_function_specifier): New function.
7879 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
7881         PR c/47473
7882         * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
7883         EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
7884         REAL_TYPE.
7886 2011-01-26  Arnaud Charlet  <charlet@adacore.com>
7888         * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
7890 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
7892         PR pch/47430
7893         * c-opts.c (c_common_post_options): Call c_common_no_more_pch
7894         after init_c_lex if pch_file is set.
7896 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
7898         PR c++/43601
7899         * c.opt (-fkeep-inline-dllexport): New switch.
7901 2011-01-12  Richard Guenther  <rguenther@suse.de>
7903         PR middle-end/32511
7904         * c-common.c (handle_weak_attribute): Warn instead of error
7905         on declaring an inline function weak.
7907 2011-01-05  Tom Tromey  <tromey@redhat.com>
7909         * c-common.h (lvalue_error): Update.
7910         * c-common.c (lvalue_error): Add 'loc' argument.  Call error_at,
7911         not error.
7913 2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>
7915         PR objc/47075
7916         * c-objc.h (objc_finish_message_expr): Added argument to
7917         prototype.
7919 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
7921         * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
7922         Use prototype_p.
7924 2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>
7926         * c-objc.h (objc_maybe_warn_exceptions): New.
7927         * stub-objc.c (objc_maybe_warn_exceptions): New.
7929 2010-12-10  Nathan Froyd  <froydnj@codesourcery.com>
7931         * c-common.h (readonly_error): Declare.
7932         * c-common.c (readonly_error): Define.
7934 2010-12-09  Nathan Froyd  <froydnj@codesourcery.com>
7936         * c-common.h (invalid_indirection_error): Declare.
7937         * c-common.c (invalid_indirection_error): Define.
7939 2010-12-03  Richard Guenther  <rguenther@suse.de>
7941         PR c/46745
7942         * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
7943         (pp_c_unary_expression): Likewise.
7944         (pp_c_expression): Likewise.
7946 2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
7948         * c-common.h (objc_finish_function): New.
7949         (objc_non_volatilized_type): Removed.
7950         (objc_type_quals_match): Removed.
7951         * stub-objc.c (objc_finish_function): New.
7952         (objc_non_volatilized_type): Removed.
7953         (objc_type_quals_match): Removed.
7955 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
7957         * c-common.h (parse_optimize_options): Declare.
7958         * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
7959         c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
7961 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
7963         * c-opts.c (check_deps_environment_vars): Use getenv instead of
7964         GET_ENVIRONMENT.
7965         * c-pch.c (O_BINARY): Don't define here.
7966         * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
7968 2010-11-25  Joseph Myers  <joseph@codesourcery.com>
7970         * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
7971         targetm.except_unwind_info.
7973 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
7975         * c-opts.c (c_common_handle_option): Pass location to
7976         set_struct_debug_option.
7978 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
7980         * c-common.c (visibility_options): Move from ../opts.c.
7981         * c-common.h (struct visibility_flags, visibility_options):
7982         Declare here.
7983         * c-opts.c (finish_options): Rename to c_finish_options.
7984         (c_common_init): Update call to finish_options.
7986 2010-11-22  Nicola Pero  <nicola.pero@meta-innovation.com>
7988         PR objc/34033
7989         * c-lex.c (lex_string): Check that each string in an Objective-C
7990         string concat sequence starts with either one or zero '@', and
7991         that there are no spurious '@' signs at the end.
7993 2010-11-20  Joseph Myers  <joseph@codesourcery.com>
7995         * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
7996         HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
7997         HANDLE_PRAGMA_VISIBILITY.
7998         * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
7999         HANDLE_PRAGMA_VISIBILITY): Don't define.
8000         (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8002 2010-11-20  Nathan Froyd  <froydnj@codesourcery.com>
8004         PR c++/16189
8005         PR c++/36888
8006         PR c++/45331
8007         * c-common.h (keyword_begins_type_specifier): Declare.
8008         (keyword_is_storage_class_specifier): Declare.
8009         (keyword_is_type_qualifier): Declare.
8010         * c-common.c (keyword_begins_type_specifier): New function.
8011         (keyword_is_storage_class_specifier): New function.
8012         (keyword_is_type_qualifier): Declare.
8014 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
8016         PR c/46547
8017         * c-common.c (in_late_binary_op): Define.
8018         (c_common_truthvalue_conversion): Check in_late_binary_op before
8019         calling c_save_expr.
8020         * c-common.h (in_late_binary_op): Declare.
8022 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
8024         * c-opts.c (c_common_handle_option): Update calls to
8025         set_struct_debug_option.
8027 2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
8029         * c-common.h (objc_declare_protocols): Added additional argument.
8030         * stub-objc.c (objc_declare_protocol): Same change.
8032 2010-11-18  Nathan Froyd  <froydnj@codesourcery.com>
8034         PR c/33193
8035         * c-common.h (build_real_imag_expr): Declare.
8036         * c-semantics.c (build_real_imag_expr): Define.
8038 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
8040         * c-opts.c (c_common_parse_file): Take no arguments.
8041         * c-common.h (c_common_parse_file): Update prototype.
8043 2010-11-16  Jakub Jelinek  <jakub@redhat.com>
8045         PR c++/46401
8046         * c-common.c (warning_candidate_p): Don't track non-const calls
8047         or STRING_CSTs.
8049 2010-11-15  Ian Lance Taylor  <iant@google.com>
8051         * c-lex.c (init_c_lex): Set macro debug callbacks if
8052         flag_dump_go_spec is set.
8054 2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
8056         * c-common.h (objc_build_incr_expr_for_property_ref): New.
8057         * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8059 2010-11-15  Nathan Froyd  <froydnj@codesourcery.com>
8061         PR preprocessor/45038
8062         * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8063         dialects.
8065 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
8067         * c-common.h (c_family_lang_mask): Declare.
8068         * c-opts.c (c_family_lang_mask): Make extern.
8069         * c-pragma.c (handle_pragma_diagnostic): Use
8070         control_warning_option.
8072 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
8074         * c-common.c (parse_optimize_options): Update call to
8075         decode_options.
8076         * c-common.h (c_common_handle_option): Update prototype.
8077         * c-opts.c (c_common_handle_option): Take location_t parameter and
8078         pass it to other functions.
8080 2010-11-11  Joseph Myers  <joseph@codesourcery.com>
8082         * c-opts.c (warning_as_error_callback): Remove.
8083         (c_common_initialize_diagnostics): Don't call
8084         register_warning_as_error_callback.
8085         (c_common_handle_option): Handle -Werror=normalized= here.
8087 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
8089         * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8090         in diagnostic.
8091         * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8092         letter.
8093         * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8094         Remove trailing '.' from diagnostics.
8095         * c.opt (Wwrite-strings_: Avoid '`' in help text.
8097 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
8099         * c-common.c (parse_optimize_options): Pass global_dc to
8100         decode_options.
8101         * c-opts.c (c_common_handle_option): Pass &global_options to
8102         set_Wstrict_aliasing.
8103         * c.opt (v): Don't mark Common or document here.
8105 2010-11-06  Iain Sandoe  <iains@gcc.gnu.org>
8107         PR target/44981
8108         * c-format.c (format_type): New type gcc_objc_string_format_type.
8109         (valid_stringptr_type_p): New.
8110         (handle_format_arg_attribute): Use valid_stringptr_type_p ().
8111         (check_format_string): Pass expected type, use
8112         valid_stringptr_type_p (), check that the format string types are
8113         consistent with the format specification.
8114         (decode_format_attr): Warn if NSString is used outside objective-c.
8115         (format_types_orig): Add NSString.
8116         (format_name): New.
8117         (format_flags): New.
8118         (check_format_arg): Handle format strings requiring an external parser.
8119         first_target_format_type: New variable.
8120         (handle_format_attribute): Set up first_target_format_type, pass the
8121         expected format arg string type to check_format_string().
8122         * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL):  New flag.
8123         * stub-objc.c (objc_string_ref_type_p): New.
8124         (objc_check_format_arg): New.
8126 2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
8128         Fixed using the Objective-C 2.0 dot-syntax with class names.
8129         * c-common.h (objc_build_class_component_ref): New.
8130         * stub-objc.c (objc_build_class_component_ref): New.
8132 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
8134         * c.opt (Wproperty-assign-default): New option.
8136 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
8138         Implemented -fobjc-std=objc1 flag.
8139         * c.opt (fobjc-std=objc1): New option.
8141 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
8143         Implemented format and noreturn attributes for Objective-C methods.
8144         * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8145         attribute for Objective-C methods.
8147 2010-10-31  Jason Merrill  <jason@redhat.com>
8149         * c-common.c (conversion_warning, warn_for_collisions_1): Use
8150         EXPR_LOC_OR_HERE.
8152 2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>
8154         Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8155         * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8156         (objc_add_property_declaration): Removed arguments for copies and
8157         ivar.
8158         (objc_build_getter_call): Renamed to
8159         objc_maybe_build_component_ref.
8160         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8161         (objc_is_property_ref): New.
8162         * c-common.c (c_common_reswords): Removed copies and ivar.
8163         * stub-objc.c (objc_add_property_declaration): Removed arguments
8164         for copies and ivar.
8165         (objc_build_getter_call): Renamed to
8166         objc_maybe_build_component_ref.
8167         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8168         (objc_is_property_ref): New.
8170 2010-10-29  Arnaud Charlet  <charlet@adacore.com>
8171             Matthew Gingell  <gingell@adacore.com>
8173         * c-ada-spec.c (separate_class_package): New function.
8174         (pp_ada_tree_identifier): Prefix references to C++ classes with the
8175         name of their enclosing package.
8176         (print_ada_declaration): Use separate_class_package.
8178 2010-10-27  Jason Merrill  <jason@redhat.com>
8180         * c-common.c (c_common_reswords): Add __is_literal_type.
8181         * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8183         * c-common.c (check_case_value): Remove special C++ code.
8185 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
8187         * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8188         RID_RETAIN, RID_COPY and RID_NONATOMIC.  Updated RID_FIRST_PATTR
8189         and RID_LAST_PATTR.
8190         (objc_add_property_declaration): Added additional arguments.
8191         (objc_property_attribute_kind): Removed.
8192         (objc_set_property_attr): Removed.
8193         * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8194         copy and nonatomic.
8195         * stub-objc.c (objc_add_property_declaration): Added additional
8196         arguments.
8197         (objc_set_property_attr): Removed.
8199 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
8201         * c-common.h (objc_add_property_variable): Renamed to
8202         objc_add_property_declaration.  Added location argument.
8203         * stub-objc.c (objc_add_property_variable): Same change.
8205 2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
8207         * c-common.h (objc_maybe_printable_name): New.
8208         * stub-objc.c (objc_maybe_printable_name): New.
8210 2010-10-22  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
8211             Andrew Pinski  <pinskia@gmail.com>
8213         * c-common.h (c_common_mark_addressable_vec): Declare.
8214         * c-common.c (c_common_mark_addressable_vec): New function.
8216 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
8218         * c-common.h (objc_set_method_type): Removed.
8219         (objc_add_method_declaration): Added boolean argument.
8220         (objc_start_method_definition): Same change.
8221         (objc_build_method_signature): Same change.
8222         * stub-objc.c (objc_set_method_type): Removed.
8223         (objc_add_method_declaration): Added boolean argument.
8224         (objc_start_method_definition): Same change.
8225         (objc_build_method_signature): Same change.
8227 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
8229         * c-common.h (finish_file): Removed.
8230         (objc_write_global_declarations): New.
8231         * c-opts.c (c_common_parse_file): Do not call finish_file.
8232         * stub-objc.c (objc_write_global_declarations): New.
8234 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
8236         Implemented parsing @synthesize and @dynamic for
8237         Objective-C/Objective-C++.
8238         * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8239         (objc_add_synthesize_declaration): New.
8240         (objc_add_dynamic_declaration): New.
8241         * c-common.c (c_common_reswords): Add synthesize and dynamic.
8242         * stub-objc.c (objc_add_synthesize_declaration): New.
8243         (objc_add_dynamic_declaration): New.
8245 2010-10-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
8247         PR target/46041
8248         * c-cppbuiltin.c (mode_has_fma): Move function here from
8249         builtins.c.  Don't use the fma optab, instead just use the
8250         HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8251         using -save-temps.
8253 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
8255         Merge from 'apple/trunk' branch on FSF servers.
8257         2005-11-08  Fariborz Jahanian  <fjahanian@apple.com>
8259         Radar 4330422
8260         * c-common.h (objc_non_volatilized_type): New declaration
8261         * stub-objc.c (objc_non_volatilized_type): New stub.
8263 2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
8265         Merge from 'apple/trunk' branch on FSF servers.
8267         2006-03-27 Fariborz Jahanian  <fjahanian@apple.com>
8269         Radar 4133425
8270         * c-common.h (objc_diagnose_private_ivar): New decl.
8271         * stub-objc.c (objc_diagnose_private_ivar): New stub.
8273 2010-10-17  Iain Sandoe  <iains@gcc.gnu.org>
8275         * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8276         * c-common.h (enum rid): Add RID_AT_PACKAGE.
8277         (objc_ivar_visibility_kind): New enum.
8278         (objc_set_visibility): Adjust prototype to use visibility enum.
8279         * stub-objc.c (objc_set_visibility): Adjust stub to use
8280         visibility enum.
8282 2010-10-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
8284         * c-cppbuiltin.c (builtin_define_float_constants): Emit
8285         __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8286         has the appropriate fma builtins.
8287         (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8289 2010-10-14  Iain Sandoe  <iains@gcc.gnu.org>
8291         merge from FSF apple 'trunk' branch.
8292         2006 Fariborz Jahanian  <fjahanian@apple.com>
8294         Radars 4436866, 4505126, 4506903, 4517826
8295         * c-common.c (c_common_resword): Define @property and its attributes.
8296         * c-common.h: Define property attribute enum entries.
8297         (OBJC_IS_PATTR_KEYWORD): New.
8298         (objc_property_attribute_kind): New enum.
8299         Declare objc_set_property_attr (), objc_add_property_variable (),
8300         objc_build_getter_call () and objc_build_setter_call ().
8301         * stub-objc.c (objc_set_property_attr): New stub.
8302         (objc_add_property_variable): Likewise.
8303         (objc_build_getter_call): Likewise.
8304         (objc_build_setter_call) Likewise.
8306 2010-10-13  Iain Sandoe  <iains@gcc.gnu.org>
8308         merge from FSF apple 'trunk' branch.
8309         2006-04-26 Fariborz Jahanian  <fjahanian@apple.com>
8311         Radar 3803157 (method attributes)
8312         * c-common.c (handle_deprecated_attribute): Recognize
8313         objc methods as valid declarations.
8314         * c-common.h: Declare objc_method_decl ().
8315         * stub-objc.c (objc_method_decl): New stub.
8317 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
8319         * c-common.c (parse_optimize_options): Call
8320         decode_cmdline_options_to_array_default_mask before
8321         decode_options.  Update arguments to decode_options.
8322         * c-common.h (c_common_init_options_struct): Declare.
8323         * c-opts.c (c_common_init_options_struct): New.  Split out from
8324         c_common_init_options.
8326 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
8328         Implemented fast enumeration for Objective-C.
8329         * c-common.h (objc_finish_foreach_loop): New.
8330         * stub-objc.c (objc_finish_foreach_loop): New.
8332 2010-10-05  Joseph Myers  <joseph@codesourcery.com>
8334         * c-common.h (struct diagnostic_context): Don't declare here.
8335         (c_common_initialize_diagnostics): Declare using
8336         diagnostic_context typedef.
8337         * c-opts.c (c_common_handle_option): Pass global_dc to
8338         handle_generated_option.
8340 2010-10-04  Joseph Myers  <joseph@codesourcery.com>
8342         * c-opts.c (c_common_handle_option): Pass &global_options_set to
8343         handle_generated_option.
8345 2010-10-03  Ian Lance Taylor  <iant@google.com>
8347         * c.opt (-fplan9-extensions): New option.
8349 2010-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
8351         * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8352         Remove.
8353         (c_cpp_builtins): Call functions from cppbuiltin.c instead
8354         of duplicating code.
8356 2010-09-30  Iain Sandoe  <iains@gcc.gnu.org>
8358         * c-common.c: Add two new entries for @optional
8359         and @required keywords.
8361         merge from FSF 'apple/trunk' branch.
8362         2006-01-30  Fariborz Jahanian  <fjahanian@apple.com>
8364         Radar 4386773
8365         * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8366         objective-c keywords.
8367         (objc_set_method_opt): New declaration.
8368         * stub-objc.c (objc_set_method_opt): New stub.
8370 2010-09-30  Joseph Myers  <joseph@codesourcery.com>
8372         * c-common.c (handle_optimize_attribute): Pass &global_options to
8373         cl_optimization_save and cl_optimization_restore.
8374         * c-opts.c (c_common_handle_option): Pass &global_options to
8375         handle_generated_option.
8376         * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8377         (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8378         &global_options to cl_optimization_restore.
8380 2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
8382         * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8383         Objective-C/Objective-C++ keywords.
8385 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
8387         Merge from 'apple/trunk' branch on FSF servers.
8389         2005-10-04  Fariborz Jahanian  <fjahanian@apple.com>
8391         Radar 4281748
8392         * c-common.h (objc_check_global_decl): New declaration.
8393         * stub-objc.c (objc_check_global_decl): New stub.
8395 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
8397         * c.opt: Don't use VarExists.
8399 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
8401         * c-common.c (c_cpp_error): Update names of diagnostic_context
8402         members.
8403         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8404         cl_optimization members.
8405         * c-opts.c (warning_as_error_callback, c_common_handle_option,
8406         sanitize_cpp_opts, finish_options): Update names of cpp_options
8407         members.
8409 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
8411         * c-common.h (OBJC_IS_CXX_KEYWORD): New macro.  Updated comments.
8412         (objc_is_reserved_word): Removed.
8413         * c-common.c: Updated comments.
8414         * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8415         objc_is_reserved_word.
8416         * stub-objc.c (objc_is_reserved_word): Removed.
8418 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
8420         * c-common.h (objc_add_method_declaration): Adjust prototype to
8421         include attributes.
8422         (objc_start_method_definition): Likewise.
8423         (objc_build_keyword_decl): Likewise.
8424         * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8425         (objc_start_method_definition): Likewise.
8426         (objc_build_keyword_decl): Likewise.
8428 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
8430         * c-common.h (objc_start_class_interface): Adjust prototype.
8431         (objc_start_category_interface): Likewise.
8432         (objc_start_protocol): Likewise.
8433         * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8434         (objc_start_class_interface): Likewise.
8435         (objc_start_category_interface): Likewise.
8437 2010-09-27  Ian Lance Taylor  <iant@google.com>
8439         * c-common.c (c_common_attribute_table): Add no_split_stack.
8440         (handle_no_split_stack_attribute): New static function.
8442 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
8444         Merge from 'apple/trunk' branch on FSF servers.
8446         2005-12-15  Fariborz Jahanian  <fjahanian@apple.com>
8448         Radar 4229905
8449         * c-common.h (objc_have_common_type): New declaration.
8450         * stub-objc.c (objc_have_common_type): New stub.
8452         2005-06-22  Ziemowit Laski  <zlaski@apple.com>
8454         Radar 4154928
8455         * c-common.h (objc_common_type): New prototype.
8456         * stub-objc.c (objc_common_type): New stub.
8458 2010-09-24  Jan Hubicka  <jh@suse.cz>
8460         * c-common.c (handle_leaf_attribute): New function.
8461         (struct attribute_spec c_common_att): Add leaf.
8463 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
8465         * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8466         -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8467         -dump, -dump=, -imacros, -imacros=, -include, -include=,
8468         -include-barrier, -include-directory, -include-directory=,
8469         -include-directory-after, -include-directory-after=,
8470         -include-prefix, -include-prefix=, -include-with-prefix,
8471         -include-with-prefix=, -include-with-prefix-after,
8472         -include-with-prefix-after=, -include-with-prefix-before,
8473         -include-with-prefix-before=, -no-integrated-cpp,
8474         -no-line-commands, -no-standard-includes, -no-warnings, -output,
8475         -output=, -pedantic, -pedantic-errors, -preprocess,
8476         -print-missing-file-dependencies, -trace-includes, -traditional,
8477         -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8478         -user-dependencies, -verbose, -write-dependencies,
8479         -write-user-dependencies, no-integrated-cpp, traditional): New.
8481 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
8483         PR objc/23710
8484         * c-common.h (objc_start_method_definition): Return bool instead
8485         of void.
8486         * stub-objc.c (objc_start_method_definition): Return bool instead
8487         of void.
8489 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
8491         PR objc/25965
8492         * c-common.h (objc_get_interface_ivars): New declaration.
8493         * stub-objc.c (objc_get_interface_ivars): New stub.
8495 2010-09-15  Ian Lance Taylor  <iant@google.com>
8497         * c-common.c (parse_optimize_options): Do not capitalize warning
8498         messages.  Remove period at end of warning message.
8500 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
8502         * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
8503         (handle_alias_attribute): ... here.
8504         (handle_ifunc_attribute): New.
8506 2010-09-06  Mark Mitchell  <mark@codesourcery.com>
8508         * c-common.h (do_warn_double_promotion): Declare.
8509         * c-common.c (do_warn_double_promotion): Define.
8511 2010-09-05  Mark Mitchell  <mark@codesourcery.com>
8513         * c.opt (Wdouble-promotion): New.
8515 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
8517         * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
8518         fvtable-thunks, fxref): Mark no longer supported in help text.
8520 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
8522         * c.opt (Wimport, fall-virtual, falt-external-templates,
8523         fdefault-inline, fenum-int-equiv, fexternal-templates,
8524         fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
8525         fname-mangling-version-, fnew-abi, fnonnull-objects,
8526         foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
8527         fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
8528         applicable.
8529         (fhandle-exceptions): Mark with Alias and Warn.
8530         * c-opts.c (c_common_handle_option): Don't handle options marked
8531         as ignored.
8533 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
8535         * c.opt (Wcomments, Werror-implicit-function-declaration,
8536         ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
8537         std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
8538         aliases.
8539         * c-common.c (option_codes): Use OPT_Wcomment instead of
8540         OPT_Wcomments.
8541         * c-opts.c (warning_as_error_callback, c_common_handle_option):
8542         Don't handle options marked as aliases.
8544 2010-08-25  Richard Guenther  <rguenther@suse.de>
8546         * c-common.c (c_common_get_alias_set): Remove special
8547         handling for pointers.
8549 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
8551         * c-common.c: Use FOR_EACH_VEC_ELT.
8552         * c-gimplify.c: Likewise.
8553         * c-pragma.c: Likewise.
8555 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
8557         * c.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
8558         RejectDriver.
8559         (MMDX): Change back to MMD.  Mark NoDriverArg instead of
8560         RejectDriver.
8561         * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
8562         instead of OPT_MDX and OPT_MMDX.
8564 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
8566         * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
8568 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
8570         * c.opt (MD, MMD): Change to MDX and MMDX.
8571         * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
8573 2010-08-11  Joseph Myers  <joseph@codesourcery.com>
8575         * c-opts.c (c_common_handle_option): Call handle_generated_option
8576         instead of handle_option.
8578 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
8580         * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
8581         (maybe_apply_renaming_pragma): Delete unneeded declarations.
8583 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
8585         * c-pragma.c (pending_redefinition): Declare.  Declare a VEC of it.
8586         (pending_redefine_extname): Change type to a VEC.
8587         (add_to_renaming_pragma_list): Update for new type of
8588         pending_redefine_extname.
8589         (maybe_apply_renaming_pragma): Likewise.
8591 2010-08-04  Arnaud Charlet  <charlet@adacore.com>
8593         * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
8594         visited.
8595         (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
8596         decide whether a type has already been declared/seen.
8597         Do not go to the original type.
8598         (dump_nested_types): New parameter forward.
8599         Generate forward declaration if needed and mark type as visited.
8600         (print_ada_declaration): Call dump_nested_types if not already done.
8601         Mark types as visited.
8603 2010-08-03  Joseph Myers  <joseph@codesourcery.com>
8605         * c.opt (-print-pch-checksum): Remove option.
8606         * c-opts.c (c_common_handle_option): Don't handle
8607         OPT_print_pch_checksum.
8609 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
8611         * c-common.h (c_common_handle_option): Update prototype and return
8612         value type.
8613         * c-opts.c (c_common_handle_option): Update prototype and return
8614         value type.  Update calls to handle_option and
8615         enable_warning_as_error.
8617 2010-07-27  Jakub Jelinek  <jakub@redhat.com>
8619         PR c/45079
8620         * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
8622 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
8624         * c-common.h (c_common_missing_argument): Remove.
8625         * c-opts.c (c_common_missing_argument): Remove.
8626         * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
8627         idirafter, imacros, include, isysroot, isystem, iquote): Add
8628         MissingArgError.
8629         * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
8631 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
8633         * c-common.h (c_common_option_lang_mask,
8634         c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
8635         New.
8636         (c_common_init_options): Update prototype.
8637         * c-opts.c (c_common_option_lang_mask): New.
8638         (c_common_initialize_diagnostics): Split out of
8639         c_common_init_options.
8640         (accept_all_c_family_options, c_common_complain_wrong_lang_p):
8641         New.
8642         (c_common_init_options): Update prototype.  Use decoded options in
8643         search for -lang-asm.
8645 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
8647         * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
8648         * c-format.c: Likewise.
8650 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8652         * c-common.h: Include diagnostic-core.h. Error if already
8653         included.
8654         * c-semantics.c: Do not define GCC_DIAG_STYLE here.
8656 2010-07-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8658         * c-common.c (IN_GCC_FRONTEND): Do not undef.
8659         Do not include expr.h
8660         (vector_mode_valid_p): Move here.
8662 2010-06-21  DJ Delorie  <dj@redhat.com>
8664         * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
8665         allow these pragmas anywhere.
8667 2010-06-14  Jakub Jelinek  <jakub@redhat.com>
8669         PR bootstrap/44509
8670         * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
8671         (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
8672         (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
8673         ggc_strdup instead of xstrdup.
8675 2010-06-10  Jakub Jelinek  <jakub@redhat.com>
8677         * c-cppbuiltin.c: Include cpp-id-data.h.
8678         (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
8679         (lazy_hex_fp_value): New function.
8680         (builtin_define_with_hex_fp_value): Provide definitions lazily.
8682 2010-06-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8684         * c-gimplify.c: Do not include tree-flow.h
8686 2010-06-29  Joern Rennecke  <joern.rennecke@embecosm.com>
8688         PR other/44034
8689         * c-common.c: Rename targetm member:
8690         targetm.enum_va_list -> targetm.enum_va_list_p
8692 2010-06-28  Anatoly Sokolov  <aesok@post.ru>
8694         * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
8696 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
8698         * c-cppbuiltin.c: Do not include except.h.
8700 2010-06-24  Andi Kleen  <ak@linux.intel.com>
8702         * c-common.c (warn_for_omitted_condop): New.
8703         * c-common.h (warn_for_omitted_condop): Add prototype.
8705 2010-06-21  Joseph Myers  <joseph@codesourcery.com>
8707         * c.opt (lang-objc): Remove.
8708         * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
8710 2010-06-21  Joern Rennecke  <joern.rennecke@embecosm.com>
8712         * c-opts.c: Include "tm_p.h".
8714 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
8716         * c-common.c (parse_optimize_options): Update call to
8717         decode_options.
8719 2010-06-18  Nathan Froyd  <froydnj@codesourcery.com>
8721         * c-common.c (record_types_used_by_current_var_decl): Adjust for
8722         new type of types_used_by_cur_var_decl.
8724 2010-06-17  Joern Rennecke  <joern.rennecke@embecosm.com>
8726         PR bootstrap/44512
8727         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
8728         for C++ standard compliance.
8730 2010-06-16  Jason Merrill  <jason@redhat.com>
8732         * c.opt: Add -Wnoexcept.
8734 2010-06-16  Richard Guenther  <rguenther@suse.de>
8736         PR c/44555
8737         * c-common.c (c_common_truthvalue_conversion): Remove
8738         premature and wrong optimization concering ADDR_EXPRs.
8740 2010-06-15  Arnaud Charlet  <charlet@adacore.com>
8742         * c-ada-spec.c (dump_sloc): Remove column info.
8743         (is_simple_enum): New function.
8744         (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
8745         enum types when relevant.
8747 2010-06-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8749         * c-common.c (conversion_warning): Warn at expression
8750         location.
8752 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
8754         * c-opts.c (c_common_handle_option): Don't handle
8755         OPT_fshow_column.
8757 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
8759         * c-pragma.c (push_alignment): Use typed GC allocation.
8760         (handle_pragma_push_options): Likewise.
8762         * c-common.c (parse_optimize_options): Likewise.
8764         * c-common.h (struct sorted_fields_type): Add variable_size GTY
8765         option.
8767 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
8769         * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
8770         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8771         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8772         flag_signed_bitfields, warn_strict_null_sentinel,
8773         flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
8774         flag_gen_declaration, flag_no_gnu_keywords,
8775         flag_implement_inlines, flag_implicit_templates,
8776         flag_implicit_inline_templates, flag_optional_diags,
8777         flag_elide_constructors, flag_default_inline, flag_rtti,
8778         flag_conserve_space, flag_access_control, flag_check_new,
8779         flag_new_for_scope, flag_weak, flag_working_directory,
8780         flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
8781         flag_enforce_eh_specs, flag_threadsafe_statics,
8782         flag_pretty_templates): Remove.
8783         * c-common.h (flag_preprocess_only, flag_nil_receivers,
8784         flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
8785         flag_replace_objc_classes, flag_undef, flag_no_builtin,
8786         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8787         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8788         flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
8789         flag_no_gnu_keywords, flag_implement_inlines,
8790         flag_implicit_templates, flag_implicit_inline_templates,
8791         flag_optional_diags, flag_elide_constructors, flag_default_inline,
8792         flag_rtti, flag_conserve_space, flag_access_control,
8793         flag_check_new, flag_new_for_scope, flag_weak,
8794         flag_working_directory, flag_use_cxa_atexit,
8795         flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
8796         flag_threadsafe_statics, flag_pretty_templates,
8797         warn_strict_null_sentinel): Remove.
8798         * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
8799         fbuiltin, fcheck-new, fconserve-space, felide-constructors,
8800         fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
8801         fimplicit-inline-templates, fimplicit-templates,
8802         flax-vector-conversions, fms-extensions, fnil-receivers,
8803         fnonansi-builtins, fpretty-templates, freplace-objc-classes,
8804         frtti, fshort-double, fshort-enums, fshort-wchar,
8805         fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
8806         funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
8807         fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
8808         gen-decls, undef): Use Var.
8809         (fdefault-inline, foptional-diags): Document as doing nothing.
8810         * c-opts.c (c_common_handle_option): Remove cases for options now
8811         using Var.  Mark ignored options as such.
8813 2010-06-05  Steven Bosscher  <steven@gcc.gnu.org>
8815         * c-common.c: Moved to here from parent directory.
8816         * c-common.def: Likewise.
8817         * c-common.h: Likewise.
8818         * c-cppbuiltin.c: Likewise.
8819         * c-dump.c: Likewise.
8820         * c-format.c: Likewise.
8821         * c-format.h : Likewise.
8822         * c-gimplify.c: Likewise.
8823         * c-lex.c: Likewise.
8824         * c-omp.c: Likewise.
8825         * c.opt: Likewise.
8826         * c-opts.c: Likewise.
8827         * c-pch.c: Likewise.
8828         * c-ppoutput.c: Likewise.
8829         * c-pragma.c: Likewise.
8830         * c-pragma.h: Likewise.
8831         * c-pretty-print.c: Likewise.
8832         * c-pretty-print.h: Likewise.
8833         * c-semantics.c: Likewise.
8834         * stub-objc.c: Likewise.
8836         * c-common.c: Include gt-c-family-c-common.h.
8837         * c-pragma.c: Include gt-c-family-c-pragma.h.
8839 Copyright (C) 2010-2018 Free Software Foundation, Inc.
8841 Copying and distribution of this file, with or without modification,
8842 are permitted in any medium without royalty provided the copyright
8843 notice and this notice are preserved.