1 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4 to generate constructor destructor priority warning.
5 * c.opt (-Wprio-ctor-dtor): New option.
7 2018-10-01 Jason Merrill <jason@redhat.com>
9 * c-lex.c (c_common_has_attribute): Add no_unique_address.
11 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
13 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
14 (dump_ada_node): Add const keyword.
16 2018-09-25 Martin Liska <mliska@suse.cz>
18 * c-common.c (c_common_truthvalue_conversion):
19 Remove Pascal from documentation.
21 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
23 * c-ada-spec.c: Include diagnostic.h.
24 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
26 2018-09-19 Marek Polacek <polacek@redhat.com>
28 * c.opt (Wclass-conversion): New.
30 2018-09-17 David Malcolm <dmalcolm@redhat.com>
32 * c-format.c (range_label_for_format_type_mismatch::get_text):
35 2018-09-17 David Malcolm <dmalcolm@redhat.com>
37 * c-format.c (format_warning_at_char): Update for introduction of
38 format_string_diagnostic_t.
39 (format_type_warning): Likewise.
41 2018-09-17 Martin Jambor <mjambor@suse.cz>
44 * c.opt (Wabsolute-value): New.
46 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
48 * c-common.c (complete_flexible_array_elts): New helper function.
49 * c-common.h (complete_flexible_array_elts): Declare.
51 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
53 * c-common.c (braced_list_to_string): Remove eval parameter.
54 Add some more checks. Always create zero-terminated STRING_CST.
55 * c-common.h (braced_list_to_string): Adjust prototype.
57 2018-08-27 David Malcolm <dmalcolm@redhat.com>
60 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
62 (maybe_suggest_missing_token_insertion): Likewise.
63 (maybe_add_include_fixit): Add param "override_location". If set,
64 and source-printing is enabled, then override the rich_location's
65 primary location with that of the insertion point for the fix-it
66 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
67 * c-common.h (extern void maybe_add_include_fixit): Add bool
69 * c-format.c (selftest::test_type_mismatch_range_labels): Update
70 for conversion of show_caret_p to a tri-state.
71 * c-warn.c (warn_for_restrict): Likewise.
73 (suggest_missing_header::~suggest_missing_header): Update call to
74 maybe_add_include_fixit to suggest overriding the location, as it
77 2018-08-27 Martin Liska <mliska@suse.cz>
79 * c-common.c (check_function_restrict): Use new function
80 fndecl_built_in_p and remove check for FUNCTION_DECL if
82 (check_builtin_function_arguments): Likewise.
83 (reject_gcc_builtin): Likewise.
84 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
86 2018-08-26 Marek Polacek <polacek@redhat.com>
88 PR c++/87029, Implement -Wredundant-move.
89 * c.opt (Wredundant-move): New option.
91 2018-08-21 Marek Polacek <polacek@redhat.com>
93 PR c++/86981, Implement -Wpessimizing-move.
94 * c.opt (Wpessimizing-move): New option.
96 2018-08-20 David Malcolm <dmalcolm@redhat.com>
99 * c-attribs.c (common_handle_aligned_attribute): Add
100 auto_diagnostic_group instance.
101 * c-indentation.c (warn_for_misleading_indentation): Likewise.
102 * c-opts.c (c_common_post_options): Likewise.
103 * c-warn.c (warn_logical_not_parentheses): Likewise.
104 (warn_duplicated_cond_add_or_warn): Likewise.
105 (warn_for_multistatement_macros): Likewise.
107 2018-08-20 Nathan Sidwell <nathan@acm.org>
109 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
112 2018-08-17 Nathan Sidwell <nathan@acm.org>
114 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
116 (laxy_hex_fp_value_count): Make unsigned.
117 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
118 manipulate the macro.
119 (builtin_defin_with_hex_fp_value): Adjust callback name, use
122 2018-08-17 David Malcolm <dmalcolm@redhat.com>
124 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
125 (gcc_dump_printf_length_specs): New.
126 (gcc_dump_printf_flag_pairs): New.
127 (gcc_dump_printf_flag_specs): New.
128 (gcc_dump_printf_char_table): New.
129 (format_types_orig): Add entry for "gcc_dump_printf".
130 (init_dynamic_diag_info): Set up length_char_specs and
131 conversion_specs for gcc_dump_printf_format_type.
132 (handle_format_attribute): Handle gcc_dump_printf_format_type.
134 2018-08-17 Nathan Sidwell <nathan@acm.org>
136 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
138 * c-ada-spec.c: Don't #include "cpp-id-data.h"
139 * c-cppbuiltin.c: Likewise.
141 2018-08-17 Martin Liska <mliska@suse.cz>
143 * c.opt: Remove Warn, Init and Report for options with
144 Ignore/Deprecated flag. Warning is done automatically for
147 2018-08-16 David Malcolm <dmalcolm@redhat.com>
150 * c-common.c (selftest::c_family_tests): Call
151 selftest::c_indentation_c_tests.
152 * c-common.h (selftest::c_indentation_c_tests): New decl.
153 * c-indentation.c: Include "selftest.h".
154 (next_tab_stop): Add "tab_width" param, rather than accessing
156 (get_visual_column): Likewise. Clarify comment. Bulletproof
157 against reading past the end of the line.
158 (get_first_nws_vis_column): Add "tab_width" param.
159 (detect_intervening_unindent): Likewise.
160 (should_warn_for_misleading_indentation): Read tab width from
161 cpp_opts and pass around.
162 (selftest::test_next_tab_stop): New test.
163 (selftest::assert_get_visual_column_succeeds): New function.
164 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
165 (selftest::assert_get_visual_column_fails): New function.
166 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
167 (selftest::test_get_visual_column): New test.
168 (selftest::c_indentation_c_tests): New function.
170 2018-08-16 Nathan Sidwell <nathan@acm.org>
172 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
173 (store_ada_macro): Likewise.
174 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
175 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
177 2018-08-15 David Malcolm <dmalcolm@redhat.com>
179 * c-format.c: Include "selftest-diagnostic.h" and
180 "gcc-rich-location.h".
181 (format_warning_at_char): Pass NULL for new label params of
183 (class indirection_suffix): New class.
184 (class range_label_for_format_type_mismatch): New class.
185 (format_type_warning): Move logic for generating "*" suffix to
186 class indirection_suffix. Create "fmt_label" and "param_label"
187 to show their types, and pass them to the
188 format_warning_at_substring calls.
189 (selftest::test_type_mismatch_range_labels): New test.
190 (selftest::c_format_c_tests): Call it.
192 2018-08-13 Martin Sebor <msebor@redhat.com>
194 PR tree-optimization/71625
195 * c-common.c (braced_list_to_string): New function.
196 * c-common.h (braced_list_to_string): Declare it.
198 2018-08-08 Nathan Sidwell <nathan@acm.org>
200 * c-common.c (try_to_locate_new_include_inertion_point): Use
201 linemap_included_from_linemap.
202 * c-lex.c (fe_file_change): Use linemap_included_from.
203 * c-ppoutput.c (pp_file_change): Likewise.
205 2018-08-01 Martin Sebor <msebor@redhat.com>
207 PR tree-optimization/86650
208 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
209 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
210 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
211 * c-format.h (T89_G): Update to be "gimple *" rather than
213 (local_gcall_ptr_node): Rename...
214 (local_gimple_ptr_node): ...to this.
216 2018-07-31 David Malcolm <dmalcolm@redhat.com>
218 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
219 table entries for gcc_diag_char_table, and the 'Z' entry from
220 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
221 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
222 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
223 adding missing "Z" for this table. Remove erroneous "G" and "K"
225 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
226 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
227 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
229 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
231 * c-common.c (speculation_safe_resolve_call): New function.
232 (speculation_safe_resolve_params): New function.
233 (speculation_safe_resolve_return): New function.
234 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
235 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
236 __HAVE_SPECULATION_SAFE_VALUE.
238 2018-07-20 David Malcolm <dmalcolm@redhat.com>
240 * c-common.c (c_cpp_error): Remove redundant "line_table"
241 parameter from call to rich_location::set_range.
242 (maybe_suggest_missing_token_insertion): Likewise.
244 2018-07-20 Martin Sebor <msebor@redhat.com>
247 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
249 2018-07-20 Martin Sebor <msebor@redhat.com>
252 * c-common.h (c_common_handle_option): Change function argument
254 * c-opts.c (c_common_init_options): Same.
255 (c_common_handle_option): Same. Remove special handling of
256 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
257 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
258 options to take a HOST_WIDE_INT argument and accept a byte-size
260 (-Wvla-larger-than): Same.
261 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
262 (-Wno-vla-larger-than): Same.
264 2018-07-12 Jakub Jelinek <jakub@redhat.com>
266 * c-attribs.c (c_common_attribute_table): Add
267 "omp declare target implicit" attribute.
269 2018-07-12 Richard Biener <rguenther@suse.de>
272 * c-attribs.c (handle_packed_attribute): Do not build a variant
273 type with TYPE_PACKED, instead ignore the attribute if we may
274 not apply to the original type.
276 2018-07-10 Jakub Jelinek <jakub@redhat.com>
279 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
280 to contain TREE_LIST for both the original class iterator and the
283 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
285 * c-ada-spec.c (to_ada_name): Remove index parameter.
286 (pp_ada_tree_identifier): Likewise.
287 (dump_ada_macros): Adjust call to to_ada_name.
288 (struct overloaded_name_hash): Delete.
289 (struct overloaded_name_hasher): Likewise.
290 (overloaded_names): Likewise.
291 (compute_overloading_index): Likewise.
292 (dump_ada_decl_name): Do not call compute_overloading_index and
293 adjust calls to pp_ada_tree_identifier.
294 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
295 (dump_ada_import): Add spc parameter and switch to aspect syntax.
296 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
297 (dump_ada_enum_type): Remove type and display_convention parameters.
298 Adjust calls to pp_ada_tree_identifier.
299 (dump_ada_node): Likewise and for dump_ada_structure.
300 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
302 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
304 (print_constructor): Adjust call to pp_ada_tree_identifier.
305 (print_destructor): Likewise.
306 (dump_ada_declaration): Switch to aspect syntax.
307 (dump_ada_structure): Likewise and tidy up. Replace display_convention
308 parameter with nested parameter.
309 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
310 (dump_ada_specs): Do not delete overloaded_names table.
312 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
315 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
318 2018-07-05 Nathan Sidwell <nathan@acm.org>
320 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
321 NO_IMPLICIT_EXTERN_C.
323 2018-06-28 Martin Liska <mliska@suse.cz>
325 * cppspec.c: Include opt-suggestions.h.
327 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
328 Thomas Schwinge <thomas@codesourcery.com>
329 Cesar Philippidis <cesar@codesourcery.com>
331 * c-pragma.h (enum pragma_omp_clause): Add
332 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
333 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
335 2018-06-20 Jakub Jelinek <jakub@redhat.com>
338 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
341 2018-06-18 Martin Sebor <msebor@redhat.com>
344 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
347 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
349 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
351 2018-06-13 Jason Merrill <jason@redhat.com>
353 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
354 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
357 PR c++/86094 - wrong code with defaulted move ctor.
358 * c-opts.c (c_common_post_options): Bump the current ABI version to
359 13. Set warn_abi_version and flag_abi_compat_version to the current
360 version rather than 0. Fix defaulting flag_abi_compat_version from
363 2018-06-12 Martin Sebor <msebor@redhat.com>
366 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
367 sizeof source and destination yields the same value.
369 2018-06-12 Martin Liska <mliska@suse.cz>
371 * c.opt: Make MPX-related options as Deprecated.
373 2018-06-08 David Malcolm <dmalcolm@redhat.com>
375 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
378 2018-06-08 Martin Liska <mliska@suse.cz>
380 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
381 for MPX (macros, related functions, fields in cgraph_node, ...).
382 (handle_bnd_legacy): Likewise.
383 (handle_bnd_instrument): Likewise.
386 2018-06-06 Jakub Jelinek <jakub@redhat.com>
389 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
390 __cpp_transactional_memory to 201500 instead of 210500.
392 2018-06-06 Jason Merrill <jason@redhat.com>
394 PR c++/85710 - ICE with -Wmemset-elt-size.
395 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
397 2018-06-01 Jason Merrill <jason@redhat.com>
399 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
402 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
404 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
405 declaration for a typedef independently of whether the declaration of
406 the subtype is generated.
408 2018-05-31 Martin Sebor <msebor@redhat.com>
411 * c.opt (-Wno-alloc-size-larger-than): New option.
413 2018-04-22 David Pagan <dave.pagan@oracle.com>
416 * c-opts.c (c_common_post_options): Set default for warn_return_type
417 for C++/C++ with ObjC extensions only. For C, makes it possible to
418 differentiate between default (no option), -Wreturn-type, and
421 2018-05-29 Jason Merrill <jason@redhat.com>
423 * c.opt (Winit-list-lifetime): New flag.
425 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
427 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
428 splay_tree_delete_pointers.
430 2018-05-26 Jakub Jelinek <jakub@redhat.com>
433 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
434 noinline variable to workaround broken kernel headers.
436 2018-05-18 Jason Merrill <jason@redhat.com>
438 * c.opt (Wdeprecated-copy): New flag.
440 2018-05-17 Martin Liska <mliska@suse.cz>
442 * c-warn.c (overflow_warning): Do not use
443 space in between 'G_' and '('.
445 2018-05-09 Jason Merrill <jason@redhat.com>
447 * c-common.c (valid_array_size_p): Add complain parameter.
448 * c-common.h: ...which defaults to true.
450 2018-05-11 Jakub Jelinek <jakub@redhat.com>
453 * c-omp.c (c_omp_predetermined_sharing): Return
454 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
456 2018-05-11 Martin Liska <mliska@suse.cz>
459 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
462 2018-05-10 Jakub Jelinek <jakub@redhat.com>
465 * c-common.h (fold_offsetof_1): Removed.
466 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
467 CTX argument defaulted to ERROR_MARK.
468 * c-common.c (fold_offsetof_1): Renamed to ...
469 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
470 argument, convert the pointer constant to TYPE and use size_binop
471 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
472 a pointer type. Adjust recursive calls.
474 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
477 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
479 2018-05-07 Nathan Sidwell <nathan@acm.org>
481 * c.opt (ffor-scope): Remove functionality, issue warning.
483 2018-05-03 Nathan Sidwell <nathan@acm.org>
485 * c.opt (ffriend-injection): Remove functionality, issue warning.
487 2018-05-01 David Malcolm <dmalcolm@redhat.com>
490 * c-format.c (struct format_check_results): Add field
492 (check_format_info): Initialize it, and warn if encountered.
493 (check_format_arg): Distinguish between wide char and
494 everything else when detecting arrays of non-char.
496 2018-04-30 David Malcolm <dmalcolm@redhat.com>
498 * c-format.c (get_corrected_substring): Update for
499 location_get_source_line returning a char_span. Use a char_span
500 when handling the prefix of the correction.
501 * c-indentation.c (get_visual_column): Update for
502 location_get_source_line returning a char_span.
503 (get_first_nws_vis_column): Likewise.
505 2018-03-29 David Malcolm <dmalcolm@redhat.com>
508 * known-headers.cc (get_stdlib_header_for_name): Add various names
509 from <assert.h>, <string.h>, and <memory.h>; add more names from
512 2018-03-27 Jakub Jelinek <jakub@redhat.com>
515 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
516 get_base_address of the second operand is a VAR_P, rather than the
517 operand itself, and use gcc_checking_assert instead of gcc_assert.
519 2018-03-23 Marek Polacek <polacek@redhat.com>
522 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
523 <case RDIV_EXPR>: Tweak condition.
525 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
527 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
529 2018-03-16 Jakub Jelinek <jakub@redhat.com>
532 * c-warn.c (conversion_warning): Replace "to to" with "to" in
536 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
539 2018-03-16 Richard Biener <rguenther@suse.de>
542 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
543 unshare the possibly folded expression.
545 2018-03-15 Richard Biener <rguenther@suse.de>
548 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
550 2018-03-13 Martin Sebor <msebor@redhat.com>
552 PR tree-optimization/84725
553 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
554 with all three narrow character types, including their qualified forms.
556 2018-03-12 Martin Sebor <msebor@redhat.com>
558 PR tree-optimization/83456
559 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
560 Restore checking of bounded built-in functions.
561 (check_function_arguments): Also return the result
562 of warn_for_restrict.
563 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
564 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
566 2018-03-02 Marek Polacek <polacek@redhat.com>
569 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
572 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
574 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
577 2018-03-01 Marek Polacek <polacek@redhat.com>
580 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
581 alignment in computation.
583 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
585 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
586 <REAL_TYPE>: Deal specifically with _Float128/__float128.
588 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
590 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
591 (is_char_array): Take a type instead of a declaration.
592 (dump_ada_array_type): Likewise.
593 (is_simple_enum): Minor tweak.
594 (dump_ada_enum_type): New function extracted from...
595 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
596 <INTEGER_TYPE>: Remove unreachable code.
597 <RECORD_TYPE>: Likewise. Minor tweaks.
598 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
599 <ENUMERAL_TYPE>: New case.
600 <RECORD_TYPE>: Factor out common code.
601 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
602 Minor tweaks. Deal with enumeral types.
603 (dump_ada_structure): Minor tweaks.
605 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
607 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
608 address for incomplete structures.
609 (dump_forward_type): Do not bail out for incomplete structures.
610 (dump_ada_declaration): Do not special-case incomplete structures
611 for subtypes. Dump them as null records for types.
613 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
615 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
616 (is_char_array): Fix formatting.
617 (dump_template_types): Likewise.
618 (dump_generic_ada_node): Rename into...
619 (dump_ada_node): ...this.
620 <POINTER_TYPE>: Remove superfluous space. Use generic address for
621 incomplete structures and not for empty structures. Do not use it
622 when forward declarations are needed.
623 (dump_forward_type): New function.
624 (dump_nested_types): Remove FORWARD parameter. Do not consider
625 TREE_VISITED and do not generate a forward declaration. Only dump
626 original nested types for nested declaration.
627 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
628 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
629 <RECORD_TYPE>: Do not consider TREE_VISITED.
630 (dump_ada_declaration): Use booleans and fix formatting throughout.
631 <TYPE_DECL>: Skip incomplete structures and not empty structures.
632 Call dump_forward_type instead of dump_nested_types for a typedef.
633 Remove superfluous check and adjust call to dump_nested_types.
634 <POINTER_TYPE>: Call dump_forward_type and fall through.
635 (dump_ada_struct_decl): Rename into...
636 (dump_ada_structure): ...this. Do not special-case empty structures.
638 2018-02-27 Martin Sebor <msebor@redhat.com>
641 * c.opt (-Wmissing-attributes): New option.
643 2018-02-21 Martin Liska <mliska@suse.cz>
645 * c.opt (Wcatch-value=): Add IntegerRange.
647 2018-02-15 Jason Merrill <jason@redhat.com>
649 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
651 2018-02-09 Nathan Sidwell <nathan@acm.org>
654 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
656 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
659 2018-02-09 Martin Sebor <msebor@redhat.com>
662 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
663 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
664 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
665 (-Wstrict-overflow, -Wsuggest-attribute): Same.
666 (-Wuninitialized): Same.
668 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
670 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
671 keyword for components.
673 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
675 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
677 2018-02-02 Julia Koval <julia.koval@intel.com>
679 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
681 2018-01-29 Marek Polacek <polacek@redhat.com>
684 * c-format.c (check_function_format): Check current_function_decl.
686 2018-01-27 Jakub Jelinek <jakub@redhat.com>
688 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
690 (LAZY_HEX_FP_VALUES_CNT): Define.
691 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
692 values rather than just 12.
693 (builtin_define_with_hex_fp_value): Likewise.
695 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
698 * c.opt (-fmacro-prefix-map): New option.
699 * c-opts.c (c_common_handle_option): Handle it.
700 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
701 * c-ppoutput.c (init_pp_output): Likewise.
703 2018-01-17 David Malcolm <dmalcolm@redhat.com>
706 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
708 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
710 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
711 Skip 'f' and 'F' characters if it is true.
712 (store_ada_macro): Minor tweak.
713 (dump_ada_macros) <CPP_COMMENT>: Likewise.
714 <CPP_WSTRING>: Likewise.
715 <CPP_STRING>: Output '&' in the buffer if not the first string.
716 <CPP_NUMBER>: Adjust calls to dump_number.
718 2018-01-10 David Malcolm <dmalcolm@redhat.com>
721 * c-common.c: Include "selftest.h".
722 (get_atomic_generic_size): Perform the test for integral type
723 before the range test for any integer constant, fixing indentation
724 of braces. Call fold_for_warn before testing for an INTEGER_CST.
725 (reject_gcc_builtin): Strip any location wrapper from EXPR.
726 (selftest::test_fold_for_warn): New function.
727 (selftest::c_common_c_tests): New function.
728 (selftest::c_family_tests): Call it, and
729 selftest::c_pretty_print_c_tests.
730 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
731 * c-format.c (check_format_arg): Convert VAR_P check to a
733 * c-pretty-print.c: Include "selftest.h".
734 (pp_c_cast_expression): Don't print casts for location wrappers.
735 (selftest::assert_c_pretty_printer_output): New function.
736 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
737 (selftest::test_location_wrappers): New function.
738 (selftest::c_pretty_print_c_tests): New function.
739 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
742 Alan Hayward <alan.hayward@arm.com>
743 David Sherwood <david.sherwood@arm.com>
745 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
748 Alan Hayward <alan.hayward@arm.com>
749 David Sherwood <david.sherwood@arm.com>
751 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
755 Alan Hayward <alan.hayward@arm.com>
756 David Sherwood <david.sherwood@arm.com>
758 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
759 (convert_vector_to_array_for_subscript): Handle polynomial
760 TYPE_VECTOR_SUBPARTS.
761 (c_common_type_for_mode): Check valid_vector_subparts_p.
762 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
765 2018-01-03 Jakub Jelinek <jakub@redhat.com>
767 Update copyright years.
769 2017-12-22 Mike Stump <mikestump@comcast.net>
770 Eric Botcazou <ebotcazou@adacore.com>
772 * c-pragma.c (init_pragma): Register pragma GCC unroll.
773 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
775 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
779 * c-semantics.c (only_debug_stmts_after_p): New.
780 (pop_stmt_list): Clear side effects in debug-only stmt list.
781 Check for single nondebug stmt followed by debug stmts only.
783 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
786 * c-semantics.c (pop_stmt_list): Propagate side effects from
787 single nondebug stmt to container list.
789 2017-12-19 Jakub Jelinek <jakub@redhat.com>
791 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
792 conditions with typical order conditions.
794 2017-12-18 Marek Polacek <polacek@redhat.com>
796 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
799 2017-12-17 Martin Sebor <msebor@redhat.com>
801 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
802 an error for attribute warn_if_not_aligned.
804 2017-12-16 Martin Sebor <msebor@redhat.com>
806 PR tree-optimization/78918
807 * c-common.c (check_function_restrict): Avoid checking built-ins.
808 * c.opt (-Wrestrict): Include in -Wall.
810 2017-12-15 Jakub Jelinek <jakub@redhat.com>
812 * c-attribs.c (c_common_attribute_table,
813 c_common_format_attribute_table): Swap affects_type_identity
814 and handler fields, adjust comments.
816 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
818 * c.opt (Wcast-function-type): New warning option.
819 * c-lex.c (get_fileinfo): Avoid warning.
820 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
822 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
825 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
826 Adjust the size of buf1 and buf2, add a new buf to avoid
827 format-overflow warning.
829 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
831 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
832 subsequent statement list.
834 2017-12-07 Martin Sebor <msebor@redhat.com>
838 * c-attribs.c (attr_aligned_exclusions): New array.
839 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
840 (attr_common_exclusions, attr_const_pure_exclusions): Same.
841 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
842 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
843 (attr_warn_unused_result_exclusions): Same.
844 (handle_hot_attribute, handle_cold_attribute): Simplify.
845 (handle_const_attribute): Warn on function returning void.
846 (handle_pure_attribute): Same.
847 (handle_aligned_attribute): Diagnose conflicting attribute
849 * c-warn.c (diagnose_mismatched_attributes): Simplify.
851 2017-12-06 David Malcolm <dmalcolm@redhat.com>
854 * c-common.c (selftest::c_family_tests): Call
855 selftest::c_spellcheck_cc_tests.
856 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
857 * c-spellcheck.cc: Include "selftest.h".
858 (name_reserved_for_implementation_p): New function.
859 (should_suggest_as_macro_p): New function.
860 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
861 should_suggest_as_macro_p and call it.
862 (selftest::test_name_reserved_for_implementation_p): New function.
863 (selftest::c_spellcheck_cc_tests): New function.
864 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
866 2017-12-06 David Malcolm <dmalcolm@redhat.com>
868 * c-spellcheck.cc: New file, taken from macro-handling code in
870 * c-spellcheck.h: New file, taken from macro-handling code in
873 2017-12-01 Jakub Jelinek <jakub@redhat.com>
875 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
877 (handle_simd_attribute): Don't check for "cilk simd function"
878 attribute. Reindent, formatting changes.
880 2017-11-30 Julia Koval <julia.koval@intel.com>
882 * c-common.h (inv_list): Remove.
884 2017-11-28 Jakub Jelinek <jakub@redhat.com>
887 * c-common.c (c_switch_covers_all_cases_p_1,
888 c_switch_covers_all_cases_p): New functions.
889 * c-common.h (c_switch_covers_all_cases_p): Declare.
891 2017-11-28 Julia Koval <julia.koval@intel.com>
892 Sebastian Peryt <sebastian.peryt@intel.com>
894 * array-notation-common.c: Delete.
895 * c-cilkplus.c: Ditto.
896 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
897 * c-common.def (ARRAY_NOTATION_REF): Remove.
898 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
899 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
900 c_validate_cilk_plus_loop, cilkplus_an_parts,
901 cilk_ignorable_spawn_rhs_op,
902 cilk_recognize_spawn): Remove.
903 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
904 * c-omp.c: Remove CILK_SIMD check.
906 * c-pragma.h: Remove CILK related pragmas.
907 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
908 ARRAY_NOTATION_REF condition.
909 (c_pretty_printer::expression): Ditto.
910 * c.opt (fcilkplus): Remove.
913 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
915 * c-pretty-print.c (pp_c_additive_expression,
916 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
918 2017-11-21 Jakub Jelinek <jakub@redhat.com>
920 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
923 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
924 instead of tree_to_uhwi, formatting fix.
926 2017-11-20 David Malcolm <dmalcolm@redhat.com>
929 * known-headers.cc: New file, based on material from c/c-decl.c.
930 (suggest_missing_header): Copied as-is.
931 (get_stdlib_header_for_name): New, based on get_c_name_hint but
932 heavily edited to add C++ support. Add some knowledge about
933 <limits.h>, <stdint.h>, and <wchar.h>.
934 * known-headers.h: Likewise.
936 2017-11-20 David Malcolm <dmalcolm@redhat.com>
938 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
939 (lookup_name_fuzzy): Likewise. Convert return type from
940 const char * to name_hint. Add location_t param.
941 * name-hint.h: New header.
943 2017-11-19 Jakub Jelinek <jakub@redhat.com>
947 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
949 2017-11-16 Joseph Myers <joseph@codesourcery.com>
951 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
952 expected publication date of C17.
953 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
955 2017-11-15 Joseph Myers <joseph@codesourcery.com>
958 * c-common.c (c_common_reswords): Add __builtin_tgmath.
959 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
961 2017-11-10 Martin Sebor <msebor@redhat.com>
964 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
965 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
966 * c.opt (-Wstringop-truncation): New option.
968 2017-11-06 Martin Liska <mliska@suse.cz>
971 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
973 * c.opt: Set default value of warn_return_type.
975 2017-10-31 David Malcolm <dmalcolm@redhat.com>
977 * c-common.c (binary_op_error): Update for renaming of
979 (c_parse_error): Likewise.
980 * c-warn.c (warn_logical_not_parentheses): Likewise for
981 renaming of inform_at_rich_loc.
982 (warn_for_restrict): Likewise for renaming of
983 warning_at_rich_loc_n.
985 2017-10-30 Joseph Myers <joseph@codesourcery.com>
987 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
988 * c-opts.c (set_std_c17): New function.
989 (c_common_init_options): Use gnu17 as default C version.
990 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
992 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
994 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
995 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
996 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
999 2017-10-23 Marek Polacek <polacek@redhat.com>
1002 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1004 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1006 * c-common.c (check_builtin_function_arguments): Also check arguments
1007 of __builtin_alloca_with_align_and_max.
1009 2017-10-17 David Malcolm <dmalcolm@redhat.com>
1011 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1012 rather than NULL to format_warning_va.
1013 (check_format_types): Likewise when calling format_type_warning.
1014 Remove code to extract source_ranges and source_range * in favor
1015 of just a location_t.
1016 (format_type_warning): Convert source_range * param to a
1019 2017-10-13 Jakub Jelinek <jakub@redhat.com>
1021 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1024 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1026 * c-common.c (enum missing_token_insertion_kind): New enum.
1027 (get_missing_token_insertion_kind): New function.
1028 (maybe_suggest_missing_token_insertion): New function.
1029 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1031 2017-10-11 Nathan Sidwell <nathan@acm.org>
1033 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1034 (c_common_handle_option): Update incpath_kind names.
1036 2017-10-11 Martin Liska <mliska@suse.cz>
1039 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1040 Wattributes warning.
1042 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1044 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1045 operating on trees as wide_ints.
1046 * c-common.c (pointer_int_sum): Likewise.
1047 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1048 * c-warn.c (match_case_to_enum_1): Likewise.
1049 (c_do_switch_warnings): Likewise.
1050 (maybe_warn_shift_overflow): Likewise.
1052 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1055 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1056 instead of wide_int::from.
1058 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1061 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1062 using to_widest use wide_int with the larger of the two precisions.
1064 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1066 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1069 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1071 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1072 when combining the original unconverted comparison operands.
1074 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1076 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1079 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1081 * c-ada-spec.c (to_ada_name): Add index parameter.
1082 (pp_ada_tree_identifier): Likewise.
1083 (dump_ada_macros): Adjust call to to_ada_name.
1084 (struct overloaded_name_hash): New type.
1085 (struct overloaded_name_hasher): Likewise.
1086 (overloaded_names): New hash table.
1087 (compute_overloading_index): New function.
1088 (dump_ada_decl_name): Call it and pass the result to
1089 pp_ada_tree_identifier.
1090 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1091 (dump_ada_function_declaration): Likewise.
1092 (dump_generic_ada_node): Likewise.
1093 (print_constructor): Likewise.
1094 (print_destructor): Likewise.
1095 (dump_ada_specs): Delete overloaded_names table.
1097 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1099 * c-ada-spec.c (max_ada_macros): Move around.
1100 (store_ada_macro_index): Likewise.
1101 (source_file): Rename into...
1102 (macro_source_file): ...this.
1103 (count_ada_macro): Move around.
1104 (store_ada_macro): Likewise.
1105 (compare_macro): Likewise.
1106 (print_ada_macros): Merge in...
1107 (dump_ada_macros): ...this.
1108 (source_file_base): Rename into...
1109 (current_source_file): ...this.
1110 (print_comment): Move around.
1111 (dump_ada_nodes): Call dump_ada_declaration directly.
1112 (struct with): Change type of limited field to bool.
1113 (append_withs): Change type of limited_access parameter to bool.
1114 (pp_ada_tree_identifie): Likewise.
1115 (dump_ada_decl_nam): Likewise.
1116 (dump_generic_ada_node): Likewise. Do not print the return type.
1117 (to_ada_name): Change type of space_found parameter to bool.
1118 (dump_ada_function_declaration): Return void and change type of
1119 parameters to bool. Also print the return type for a function.
1120 (print_ada_methods): Rename into...
1121 (dump_ada_methods): ...this.
1122 (print_ada_declaration): Rename into ...
1123 (dump_ada_declaration): ...this. Do not print the return type.
1124 (print_ada_struct_decl): Rename into...
1125 (dump_ada_struct_decl): ...this.
1127 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1129 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1130 rather than DECL_INITIAL.
1131 (common_handle_aligned_attribute): Likewise.
1133 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1135 * c.opt (gen-decls): Add RejectNegative.
1137 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1138 Jakub Jelinek <jakub@redhat.com>
1140 Add support for -std=c++2a.
1141 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1142 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1143 * c-opts.c (set_std_cxx2a): New.
1144 (c_common_handle_option): Set options when -std=c++2a is enabled.
1145 (c_common_post_options): Adjust comments.
1146 (set_std_cxx14, set_std_cxx17): Likewise.
1148 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1150 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1151 message for non-uniform endianness and issue a warning in C++.
1153 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1155 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1156 (Wc++17-compat): Change from undocumented alias to option.
1157 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1158 change C++1z to C++17 in description.
1159 (std=c++1z, std=gnu++1z): Change from option to undocumented
1161 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1163 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1164 * c-opts.c (set_std_cxx1z): Rename to ...
1165 (set_std_cxx17): ... this.
1166 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1167 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1169 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1172 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1174 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1175 function alignment if warn_if_not_aligned_p is true.
1177 2017-09-12 Nathan Sidwell <nathan@acm.org>
1179 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1180 resort_sorted_fields): Move to c/c-decl.c.
1181 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1182 (struct sorted_fields_type): Move to c/c-lang.h.
1184 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1187 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1189 2017-09-04 Marek Polacek <polacek@redhat.com>
1192 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1193 (warn_tautological_cmp): Call it.
1195 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1197 * c-opts.c (c_common_finish): Write dependency information even if
1200 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1203 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1204 (omp_pragmas_simd): ... here.
1205 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1206 create new clauses list containing just simd clause.
1208 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1209 Alan Hayward <alan.hayward@arm.com>
1210 David Sherwood <david.sherwood@arm.com>
1212 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1213 into scalar_mode_supported_p call.
1214 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1216 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1217 Alan Hayward <alan.hayward@arm.com>
1218 David Sherwood <david.sherwood@arm.com>
1220 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1221 for the mode iterator.
1223 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1224 Alan Hayward <alan.hayward@arm.com>
1225 David Sherwood <david.sherwood@arm.com>
1227 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1228 * c-common.c (c_build_vec_perm_expr): Likewise.
1230 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1231 Alan Hayward <alan.hayward@arm.com>
1232 David Sherwood <david.sherwood@arm.com>
1234 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1236 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1237 Alan Hayward <alan.hayward@arm.com>
1238 David Sherwood <david.sherwood@arm.com>
1240 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1241 before calling targetm.addr_space.valid_pointer_mode.
1243 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1244 Alan Hayward <alan.hayward@arm.com>
1245 David Sherwood <david.sherwood@arm.com>
1247 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1249 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1250 Alan Hayward <alan.hayward@arm.com>
1251 David Sherwood <david.sherwood@arm.com>
1253 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1255 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1257 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1258 Alan Hayward <alan.hayward@arm.com>
1259 David Sherwood <david.sherwood@arm.com>
1261 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1264 2017-08-29 Martin Liska <mliska@suse.cz>
1267 * c-common.c (parse_optimize_options): Add argument to function
1269 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1271 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1273 * c-lex.c (interpret_float): Use token location
1274 when building an EXCESS_PRECISION_EXPR.
1276 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1278 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1279 it to check_function_format.
1280 * c-common.h (check_function_arguments): Add vec<location_t> *
1282 (check_function_format): Likewise.
1283 * c-format.c (struct format_check_context): Add field "arglocs".
1284 (check_function_format): Add param "arglocs"; pass it to
1286 (check_format_info): Add param "arglocs"; use it to initialize
1287 new field of format_ctx.
1288 (check_format_arg): Pass format_ctx->arglocs to new param of
1289 check_format_info_main.
1290 (class argument_parser): New field "arglocs".
1291 (argument_parser::argument_parser): Add "arglocs_" param and use
1292 it to initialize new field.
1293 (argument_parser::check_argument_type): Pass new arglocs field to
1295 (check_format_info_main): Add param "arglocs", and use it when
1296 constructing arg_parser.
1297 (check_format_types): Add param "arglocs"; use it if non-NULL when
1298 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1300 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1303 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1304 (c_common_attribute_table): Add warn_if_not_aligned.
1305 (handle_aligned_attribute): Renamed to ...
1306 (common_handle_aligned_attribute): Remove argument, name, and add
1307 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1308 (handle_aligned_attribute): New.
1309 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1311 2017-08-14 Martin Sebor <msebor@redhat.com>
1314 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1315 (handle_nonstring_attribute): New function.
1317 2017-08-14 Martin Sebor <msebor@redhat.com>
1320 * c-format.h (T89_G): New macro.
1321 * c-format.c (local_gcall_ptr_node): New variable.
1322 (init_dynamic_diag_info): Initialize it.
1324 2017-08-11 Martin Liska <mliska@suse.cz>
1326 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1327 TARGET_SUPPORTS_ALIASES.
1329 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1331 * c-common.c (c_parse_error): Add rich_location * param, using it
1332 rather implicitly using input_location.
1333 * c-common.h (c_parse_error): Add rich_location * param.
1335 2017-08-09 Marek Polacek <polacek@redhat.com>
1337 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1338 (c_common_truthvalue_conversion): Likewise.
1339 * c-omp.c (c_finish_omp_atomic): Likewise.
1340 * c-common.h (build_binary_op): Update declaration.
1342 2017-08-08 Martin Liska <mliska@suse.cz>
1344 * c-ada-spec.c: Include header files.
1345 * c-ubsan.c: Likewise.
1346 * c-warn.c: Likewise.
1348 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1351 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1353 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1355 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1356 (print_ada_methods): Likewise.
1357 (print_ada_declaration): Likewise.
1359 2017-08-07 Martin Liska <mliska@suse.cz>
1361 * array-notation-common.c: Add new includes.
1362 * c-format.c( handle_format_attribute): Canonicalize a format
1364 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1366 * c-pretty-print.c: Add new include.
1368 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1370 * c-ada-spec.c (has_static_fields): Look only into variables.
1371 (print_constructor): Add TYPE parameter and use it for the name.
1372 (print_destructor): Likewise.
1373 (print_ada_declaration): Adjust to new constructor/destructor names.
1374 Adjust calls to print_constructor and print_destructor.
1375 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1376 Look only into variables in the final loop.
1378 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1380 * c-ada-spec.c (has_static_fields): Look only into fields.
1381 (dump_generic_ada_node): Small tweak.
1382 (dump_nested_types): Look only into fields.
1383 (print_ada_declaration): Look only into methods. Small tweak.
1384 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1386 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1388 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1389 (dump_ada_function_declaration): Likewise.
1390 (dump_generic_ada_node): Likewise.
1391 (print_ada_declaration): Add support for const-qualified variables.
1393 2017-07-31 Martin Liska <mliska@suse.cz>
1396 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1397 Guard condition with flag_sanitize_p also with current_function_decl
1399 (ubsan_maybe_instrument_reference_or_call): Likewise.
1401 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1403 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1405 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1407 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1409 (print_ada_declaration): Add missing guard for record types.
1411 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1414 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1415 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1416 new COMPOUND_EXPRs around the rhs of the comparison.
1418 2017-07-27 Marek Polacek <polacek@redhat.com>
1421 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1424 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1426 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1427 (handle_noipa_attribute): New function.
1429 2017-07-07 Torsten Duwe <duwe@suse.de>
1431 * c-attribs.c (c_common_attribute_table): Add entry for
1432 "patchable_function_entry".
1434 2017-07-20 Nathan Sidwell <nathan@acm.org>
1436 Remove TYPE_METHODS.
1437 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1438 dump_ada_template, print_ada_methods,
1439 print_ada_declaration): Member fns are on TYPE_FIELDS.
1441 2017-07-18 Nathan Sidwell <nathan@acm.org>
1443 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1445 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1447 * c-common.c (try_to_locate_new_include_insertion_point): New
1449 (per_file_includes_t): New typedef.
1450 (added_includes_t): New typedef.
1451 (added_includes): New variable.
1452 (maybe_add_include_fixit): New function.
1453 * c-common.h (maybe_add_include_fixit): New decl.
1455 2017-07-10 Martin Sebor <msebor@redhat.com>
1458 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1460 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1462 * c-common.c (selftest::c_family_tests): New.
1463 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1464 (selftest::c_family_tests): New decl.
1466 2017-07-04 Marek Polacek <polacek@redhat.com>
1469 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1472 2017-07-04 Marek Polacek <polacek@redhat.com>
1474 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1476 2017-06-28 Martin Liska <mliska@suse.cz>
1479 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1480 to a function declaration.
1482 2017-06-28 Martin Liska <mliska@suse.cz>
1485 * c.opt: Add IntegerRange to various options.
1487 2017-06-26 Marek Polacek <polacek@redhat.com>
1490 * c-common.h (warn_for_multistatement_macros): Declare.
1491 * c-warn.c: Include "c-family/c-indentation.h".
1492 (warn_for_multistatement_macros): New function.
1493 * c.opt (Wmultistatement-macros): New option.
1494 * c-indentation.c (guard_tinfo_to_string): No longer static.
1495 Change the parameter type to "enum rid". Handle RID_SWITCH.
1496 * c-indentation.h (guard_tinfo_to_string): Declare.
1498 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1500 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1502 2017-06-15 Martin Sebor <msebor@redhat.com>
1505 * c.opt (-Wclass-memaccess): New option.
1507 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1509 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1511 2017-06-13 Marek Polacek <polacek@redhat.com>
1514 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1517 2017-06-13 Martin Liska <mliska@suse.cz>
1520 * c-attribs.c (add_no_sanitize_value): New function.
1521 (handle_no_sanitize_attribute): Likewise.
1522 (handle_no_sanitize_address_attribute): Use the function.
1523 (handle_no_sanitize_thread_attribute): New function.
1524 (handle_no_address_safety_analysis_attribute): Use
1525 add_no_sanitize_value.
1526 (handle_no_sanitize_undefined_attribute): Likewise.
1527 * c-common.h: Declare new functions.
1528 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1529 (ubsan_instrument_shift): Likewise.
1530 (ubsan_instrument_bounds): Likewise.
1531 (ubsan_maybe_instrument_array_ref): Likewise.
1532 (ubsan_maybe_instrument_reference_or_call): Likewise.
1534 2017-06-11 Jason Merrill <jason@redhat.com>
1536 * c-ada-spec.c, c-pragma.c: Use id_equal.
1538 2017-06-04 Marek Polacek <polacek@redhat.com>
1541 * c-format.c (matching_type_p): Return false if any of the types
1542 requires structural equality.
1544 2017-06-02 Martin Sebor <msebor@redhat.com>
1547 * c-warn.c (conversion_warning): Use -Wconversion for integer
1548 conversion and -Wfloat-conversion for floating one.
1550 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1552 * c.opt (Wsizeof-pointer-div): New warning option.
1554 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1556 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1557 (Wcatch-value=1): Enable by -Wall.
1559 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1561 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1563 * c.opt (fdiagnostics-show-template-tree): New option.
1564 (felide-type): New option.
1566 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1568 * c.opt (Wcatch-value=): New C++ warning flag.
1570 2017-05-24 Nathan Sidwell <nathan@acm.org>
1572 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1573 const casts to avoid warning.
1575 2017-05-24 Martin Sebor <msebor@redhat.com>
1578 * c-common.h (unsafe_conversion_p): Add a function argument.
1579 * c-common.c (unsafe_conversion_p): Same.
1580 Add type names and values to diagnostics.
1581 (scalar_to_vector): Adjust.
1582 * c-warn.c (constant_expression_error): Add a function argument.
1583 Add type names and values to diagnostics.
1584 (conversion_warning): Add a function argument.
1585 Add type names and values to diagnostics.
1586 (warnings_for_convert_and_check): Same.
1588 2017-05-19 Jason Merrill <jason@redhat.com>
1590 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1593 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1595 * c-format.c (locus): Move out of function scope,
1598 2017-05-19 Nathan Sidwell <nathan@acm.org>
1600 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1601 (c_common_parse_file): Remove class dump handling.
1602 (get_dump_info): Likewise.
1604 2017-05-19 Richard Biener <rguenther@suse.de>
1607 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1608 to alias-set zero memory.
1610 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1612 * c-format.c (local_tree_type_node): Add GTY attribute.
1614 2017-05-18 Marek Polacek <polacek@redhat.com>
1616 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1617 (c_common_fixed_point_type_for_size): Likewise.
1618 (c_common_type_for_mode): Likewise.
1619 (shorten_compare): Likewise.
1620 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1621 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1623 2017-05-18 Marek Polacek <polacek@redhat.com>
1625 * c-common.c (self_promoting_args_p): Change the return type to bool.
1626 Use false/true instead of 0/1.
1627 * c-common.h (self_promoting_args_p): Update.
1629 2017-05-17 Marek Polacek <polacek@redhat.com>
1631 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1632 * c-warn.c: Likewise.
1634 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1636 Implement new C++ intrinsics __is_assignable and __is_constructible.
1637 * c-common.c (__is_assignable, __is_constructible): New.
1638 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1640 2017-05-17 Martin Liska <mliska@suse.cz>
1642 * c-common.h: Introduce dump_flags_t type and
1643 use it instead of int type.
1644 * c-gimplify.c (c_genericize): Likewise.
1645 * c-opts.c: Likewise.
1647 2017-05-17 Marek Polacek <polacek@redhat.com>
1649 * c-common.c (c_save_expr): Remove.
1650 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1651 * c-common.h (c_save_expr): Remove declaration.
1653 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1656 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1657 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1658 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1659 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1661 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1663 2017-05-09 Marek Polacek <polacek@redhat.com>
1666 * c-warn.c (unwrap_c_maybe_const): New.
1667 (warn_logical_operator): Call it.
1669 2017-05-09 Nathan Sidwell <nathan@acm.org>
1671 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1672 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1674 2017-05-08 Martin Sebor <msebor@redhat.com>
1676 PR translation/80280
1677 * c-format.h (struct format_flag_spec): Add new member.
1679 * c-format.c (local_tree_type_node): New global.
1680 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1681 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1682 (strfmon_flag_specs): Likewise.
1683 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1684 with distinct quoting properties.
1685 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1686 (flag_chars_t::validate): Add argument and handle bad quoting.
1687 (check_format_info_main): Handle quoting problems.
1688 (init_dynamic_diag_info): Simplify.
1690 2017-05-08 Jason Merrill <jason@redhat.com>
1692 * c-opts.c (c_common_post_options): Update defaults for
1693 flag_abi_version and flag_abi_compat_version.
1695 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1697 * c-common.c (c_cpp_error): Replace report_diagnostic
1698 with diagnostic_report_diagnostic.
1700 2017-05-04 Martin Sebor <msebor@redhat.com>
1702 PR translation/80280
1703 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1704 (handle_weakref_attribute): Same.
1706 2017-05-03 Nathan Sidwell <nathan@acm.org>
1708 Canonicalize canonical type hashing
1709 * c-common.c (complete_array_type): Use type_hash_canon.
1711 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1714 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1716 (cilk_install_body_pedigree_operations): Likewise.
1717 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1719 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1720 (cilk_install_body_pedigree_operations): Likewise.
1721 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1724 2017-04-27 Jakub Jelinek <jakub@redhat.com>
1727 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1728 flag on non-aggregate element types.
1730 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1732 * c-common.c (c_type_hasher, type_hash_table): Remove.
1733 (c_common_get_alias_set): Remove unreachable code.
1734 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1736 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1738 * c.opt (Wextra-semi): New C++ warning flag.
1740 2017-04-20 Jakub Jelinek <jakub@redhat.com>
1743 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1745 2017-04-18 Jakub Jelinek <jakub@redhat.com>
1749 * c-common.c (c_common_type_for_mode): Don't handle
1750 widest_*_literal_type_node here.
1751 c_common_signed_or_unsigned_type): Likewise.
1752 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1753 to *intTI_type_node or *intDI_type_node depending on whether
1754 TImode is supported by the target or not.
1756 2017-04-10 Martin Liska <mliska@suse.cz>
1759 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1760 doing an UBSAN check.
1762 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1764 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1766 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1769 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1771 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1772 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1775 2017-03-31 David Malcolm <dmalcolm@redhat.com>
1777 PR documentation/78732
1778 * c.opt (Wendif-labels): Fix description to refer to
1779 #else rather than #elif.
1781 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1784 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1785 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1787 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1790 * c-common.c (c_common_mark_addressable_vec): Don't set
1791 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1793 2017-03-21 Martin Sebor <msebor@redhat.com>
1796 * c-common.c (set_underlying_type): Mark type used only when
1797 original del is declared unused.
1799 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1801 PR translation/79848
1802 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1805 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1808 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1809 from inform's message, so that xgettext can locate it.
1811 2017-03-09 Marek Polacek <polacek@redhat.com>
1815 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1816 conversion to the attribute list.
1818 2017-03-09 Martin Liska <mliska@suse.cz>
1820 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1822 2017-03-03 Jason Merrill <jason@redhat.com>
1824 * c.opt (Wnoexcept-type): New.
1826 2017-03-02 Richard Biener <rguenther@suse.de>
1829 * c-common.c (c_common_mark_addressable_vec): Look through
1832 2017-02-28 Martin Liska <mliska@suse.cz>
1834 * c.opt: Replace space with tabular for options of <number>
1837 2017-02-28 Martin Liska <mliska@suse.cz>
1839 * c.opt: Fix --help=option -Q for options which are of
1842 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1845 * c-common.c (check_function_restrict): New function.
1846 (check_function_arguments): Add FNDECL argument. Call
1847 check_function_restrict if -Wrestrict.
1848 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1849 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1850 * c-common.h (check_function_arguments): Add FNDECL argument.
1851 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1853 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1855 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1856 treatment of parameters with pointer-to-tagged type and tidy up.
1857 (print_ada_methods): Remove the special treatment of C++ static member
1860 2017-02-22 Martin Liska <mliska@suse.cz>
1862 * c.opt: Replace inequality signs with square brackets
1865 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1868 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1871 2017-02-17 Joseph Myers <joseph@codesourcery.com>
1873 * c-cppbuiltin.c (builtin_define_float_constants): Define
1874 __DECIMAL_DIG__ to the value for long double.
1876 2017-02-15 Marek Polacek <polacek@redhat.com>
1879 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1880 conversion has occured.
1882 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1884 * c-common.c (c_common_reswords): Add "__RTL".
1885 * c-common.h (enum rid): Add RID_RTL.
1887 2017-01-20 Marek Polacek <polacek@redhat.com>
1890 * c-common.h (do_warn_duplicated_branches_r): Declare.
1891 * c-gimplify.c (c_genericize): Walk the function tree calling
1892 do_warn_duplicated_branches_r.
1893 * c-warn.c (expr_from_macro_expansion_r): New.
1894 (do_warn_duplicated_branches): New.
1895 (do_warn_duplicated_branches_r): New.
1896 * c.opt (Wduplicated-branches): New option.
1898 2017-01-17 David Malcolm <dmalcolm@redhat.com>
1901 * c-indentation.c (warn_for_misleading_indentation): Use the past
1902 subjunctive in the note.
1904 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1907 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1908 start type to integer_type.
1910 2017-01-16 Jakub Jelinek <jakub@redhat.com>
1913 * c.opt (gen-decls): Add Driver flag.
1915 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1918 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1921 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1923 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1926 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1928 2017-01-12 Martin Sebor <msebor@redhat.com>
1930 (-Wformat-overflow): ...to this.
1932 2017-01-11 Martin Sebor <msebor@redhat.com>
1935 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1936 Also enable for LTO.
1938 2017-01-10 Jason Merrill <jason@redhat.com>
1940 Implement P0195R2, C++17 variadic using.
1941 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1943 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1945 PR translation/79019
1946 PR translation/79020
1947 * c.opt (Wnormalized=): Fix typo in description.
1949 2017-01-08 Martin Sebor <msebor@redhat.com>
1952 * c.opt (-Wformat-truncation): New option.
1954 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1956 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1957 value to unsigned short to fit in 4 hex digits without
1960 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1962 * c.opt (fsso-struct): Add 'native' value.
1964 2017-01-05 Martin Liska <mliska@suse.cz>
1967 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1970 2017-01-04 Marek Polacek <polacek@redhat.com>
1973 * c.opt (Wpointer-compare): New option.
1975 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1978 * c.opt (fsso-struct=): Add RejectNegative.
1980 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1982 Update copyright years.
1984 2016-12-29 Martin Liska <mliska@suse.cz>
1987 * c.opt (strong-eval-order): Add RejectNegative keyword.
1989 2016-12-22 Jason Merrill <jason@redhat.com>
1991 Implement P0522R0, matching of template template arguments.
1992 * c-cppbuiltin.c (c_cpp_builtins): Define
1993 __cpp_template_template_args.
1995 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1998 * c-common.c (struct nonnull_arg_ctx): New type.
1999 (check_function_nonnull): Return bool instead of void. Use
2000 nonnull_arg_ctx as context rather than just location_t.
2001 (check_nonnull_arg): Adjust for the new context type, set
2002 warned_p to true if a warning has been diagnosed.
2003 (check_function_arguments): Return bool instead of void.
2004 * c-common.h (check_function_arguments): Adjust prototype.
2006 2016-12-21 Jason Merrill <jason@redhat.com>
2008 * c.opt (-fnew-ttp-matching): New flag.
2009 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2011 2016-12-14 Martin Jambor <mjambor@suse.cz>
2013 * c-omp.c: Include omp-general.h instead of omp-low.h.
2014 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2017 2016-12-14 Martin Sebor <msebor@redhat.com>
2020 * c-common.c (check_nonnull_arg): Disable when optimization
2023 2016-12-12 Marek Polacek <polacek@redhat.com>
2026 * c-common.c (attribute_fallthrough_p): Return false for
2029 2016-12-08 Martin Sebor <msebor@redhat.com>
2032 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2034 2016-12-08 Martin Sebor <msebor@redhat.com>
2037 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2040 2016-12-07 Martin Sebor <msebor@redhat.com>
2046 * c.opt (-Wstringop-overflow): New option.
2048 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2050 * c-attribs.c (asan odr indicator): New attribute.
2051 (handle_asan_odr_indicator_attribute): New function.
2053 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2055 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2058 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2060 * c-common.c (excess_precision_mode_join): New.
2061 (c_ts18661_flt_eval_method): New.
2062 (c_c11_flt_eval_method): Likewise.
2063 (c_flt_eval_method): Likewise.
2064 * c-common.h (excess_precision_mode_join): New.
2065 (c_flt_eval_method): Likewise.
2066 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2067 (cpp_iec_559_value): Call it.
2068 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2069 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2070 __FLT_EVAL_METHOD_TS_18661_3__.
2072 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2074 * c-opts.c (c_common_post_options): Add logic to handle the default
2075 case for -fpermitted-flt-eval-methods.
2077 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2079 * c.opt (Wexpansion-to-defined): New.
2081 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2084 * c-pragma.c (handle_pragma_target): Don't replace
2085 current_target_pragma, but chainon the new args to the current one.
2087 2016-11-22 Nathan Sidwell <nathan@acm.org>
2089 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2090 indentation and formatting.
2092 2016-11-21 Martin Sebor <msebor@redhat.com>
2094 * c.opt (-fprintf-return-value): Enable by default.
2096 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2099 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2100 * c-common.c (c_common_nodes_and_builtins): Initialize
2101 const_tm_ptr_type_node.
2103 2016-11-16 Marek Polacek <polacek@redhat.com>
2106 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2108 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2110 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2112 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2113 Richard Biener <rguenther@suse.de>
2115 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2116 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2117 * c.opt (fgimple): New option.
2119 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2122 * c-common.h (warn_for_restrict): Declare.
2123 * c-warn.c: Include gcc-rich-location.h.
2124 (warn_for_restrict): New function.
2125 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2126 (gcc_cdiag_char_table): Likewise.
2127 (gcc_cxxdiag_char_table): Likewise.
2128 * c.opt (Wrestrict): New option.
2130 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2132 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2133 for nested types only if the type is a record or union and dump SLOC.
2135 2016-11-09 Jason Merrill <jason@redhat.com>
2137 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2139 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2141 * c-ubsan.c (ubsan_instrument_shift): Handle split
2142 -fsanitize=shift-base and -fsanitize=shift-exponent.
2144 2016-11-07 Jason Merrill <jason@redhat.com>
2146 * c.opt (Wc++1z-compat): New.
2147 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2149 2016-11-07 Martin Liska <mliska@suse.cz>
2151 * c-warn.c (warn_for_unused_label): Save all labels used
2152 in goto or in &label.
2154 2016-11-03 Jason Merrill <jason@redhat.com>
2156 * c-cppbuiltin.c (c_cpp_builtins): Correct
2157 __cpp_inheriting_constructors.
2159 2016-11-01 Jason Merrill <jason@redhat.com>
2161 * c-cppbuiltin.c (c_cpp_builtins): Update
2162 __cpp_inheriting_constructors.
2164 * c.opt (-fnew-inheriting-ctors): New.
2165 * c-opts.c: Default to on for ABI 11+.
2167 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2170 * c.opt (fext-numeric-literals): Add Var and Init.
2171 * c-opts.c (c_common_handle_option): Don't clear
2172 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2173 (c_common_post_options): Clear it here if not set
2176 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2179 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2182 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2184 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2185 * c-common.c (c_common_reswords): Add __builtin_launder.
2187 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2189 * c-common.c (c_common_truthvalue_conversion): Warn for
2190 multiplications in boolean context. Fix the quoting of '<<' and '<'
2191 in the shift warning.
2193 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2195 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2197 2016-10-20 Jason Merrill <jason@redhat.com>
2199 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2201 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2203 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2204 integer shift ops in boolean context.
2206 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2208 * c.opt (Walloca): New.
2209 (Walloca-larger-than=): New.
2210 (Wvla-larger-than=): New.
2212 2016-10-17 Marek Polacek <polacek@redhat.com>
2214 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2215 Return immediately when finding a match.
2216 (warn_tautological_cmp): Remove a boolean variable that is no longer
2219 2016-10-17 Marek Polacek <polacek@redhat.com>
2221 * c-attribs.c: New file.
2222 * c-common.c: Move attributes handling to c-attribs.c.
2223 (get_nonnull_operand): No longer static.
2224 * c-common.h: Move the declarations from c-attribs.c to its own section.
2226 2016-10-14 Jason Merrill <jason@redhat.com>
2228 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2229 and __cpp_deduction_guides.
2231 2016-10-13 Jason Merrill <jason@redhat.com>
2233 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2235 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2237 * c-cppbuiltin.c: Include memmodel.h.
2238 * c-opts.c: Likewise.
2239 * c-pragma.c: Likewise.
2240 * c-warn.c: Likewise.
2242 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2244 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2245 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2246 * c-opts.c (sanitize_cpp_opts): Initialize
2247 cpp_opts->cpp_warn_implicit_fallthrough.
2249 2016-10-11 Marek Polacek <polacek@redhat.com>
2251 * c-common.c (warning_candidate_p): Change the return type to bool
2252 and return true/false instead of 1/0.
2253 (vector_mode_valid_p): Likewise.
2255 2016-10-11 Marek Polacek <polacek@redhat.com>
2257 * c-common.c (fold_for_warn): No longer static.
2258 (bool_promoted_to_int_p): Likewise.
2259 (c_common_get_narrower): Likewise.
2260 (constant_expression_warning): Move to c-warn.c.
2261 (constant_expression_error): Likewise.
2262 (overflow_warning): Likewise.
2263 (warn_logical_operator): Likewise.
2264 (find_array_ref_with_const_idx_r): Likewise.
2265 (warn_tautological_cmp): Likewise.
2266 (expr_has_boolean_operands_p): Likewise.
2267 (warn_logical_not_parentheses): Likewise.
2268 (warn_if_unused_value): Likewise.
2269 (strict_aliasing_warning): Likewise.
2270 (sizeof_pointer_memaccess_warning): Likewise.
2271 (check_main_parameter_types): Likewise.
2272 (conversion_warning): Likewise.
2273 (warnings_for_convert_and_check): Likewise.
2274 (match_case_to_enum_1): Likewise.
2275 (match_case_to_enum): Likewise.
2276 (c_do_switch_warnings): Likewise.
2277 (warn_for_omitted_condop): Likewise.
2278 (readonly_error): Likewise.
2279 (lvalue_error): Likewise.
2280 (invalid_indirection_error): Likewise.
2281 (warn_array_subscript_with_type_char): Likewise.
2282 (warn_about_parentheses): Likewise.
2283 (warn_for_unused_label): Likewise.
2284 (warn_for_div_by_zero): Likewise.
2285 (warn_for_memset): Likewise.
2286 (warn_for_sign_compare): Likewise.
2287 (do_warn_double_promotion): Likewise.
2288 (do_warn_unused_parameter): Likewise.
2289 (record_locally_defined_typedef): Likewise.
2290 (maybe_record_typedef_use): Likewise.
2291 (maybe_warn_unused_local_typedefs): Likewise.
2292 (maybe_warn_bool_compare): Likewise.
2293 (maybe_warn_shift_overflow): Likewise.
2294 (warn_duplicated_cond_add_or_warn): Likewise.
2295 (diagnose_mismatched_attributes): Likewise.
2296 * c-common.h: Move the declarations from c-warn.c to its own section.
2297 * c-warn.c: New file.
2299 2016-10-08 Jason Merrill <jason@redhat.com>
2301 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2302 into COND_EXPR in C++.
2304 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2306 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2307 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2308 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2310 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2312 Implement LWG2296 helper intrinsic
2313 * c-common.h (enum rid): Add RID_ADDRESSOF.
2314 * c-common.c (c_common_reswords): Add __builtin_addressof.
2316 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2319 * c-common.c (c_common_truthvalue_conversion): Warn also for
2320 suspicious enum values in boolean context.
2322 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2324 Implement P0258R2 - helper for C++17
2325 std::has_unique_object_representations trait
2326 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2327 * c-common.c (c_common_reswords): Add
2328 __has_unique_object_representations.
2330 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2333 * c-ubsan.c (ubsan_instrument_return): Don't call
2334 initialize_sanitizer_builtins here.
2336 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2338 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2339 conditional expression in boolean context when only one arm is
2342 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2345 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2348 * c-common.c (c_common_reswords): Update comment for C++11.
2350 2016-10-04 Jason Merrill <jason@redhat.com>
2352 * c-common.c (make_tree_vector_from_ctor): New.
2353 * c-common.h: Declare it.
2355 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2357 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2358 __LIBGCC_JCR_SECTION_NAME__.
2360 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2362 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2363 left shift in boolean context.
2365 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2367 Implement P0001R1 - C++17 removal of register storage class specifier
2368 * c.opt (Wregister): New warning.
2369 * c-opts.c (c_common_post_options): Enable -Wregister by
2372 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2374 * c-opts.c (c_common_post_options): Remove special case for
2375 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2378 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2380 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2383 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2385 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2387 * c-common.c: Include memmodel.h.
2389 2016-09-26 Marek Polacek <polacek@redhat.com>
2391 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2393 2016-09-26 Marek Polacek <polacek@redhat.com>
2396 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2397 (handle_fallthrough_attribute): New function.
2398 (attribute_fallthrough_p): New function.
2399 * c-common.h (attribute_fallthrough_p): Declare.
2401 2016-09-24 Marek Polacek <polacek@redhat.com>
2404 * c.opt (Wbool-operation): New.
2406 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2408 * c-common.c (c_common_truthvalue_conversion): Inhibit
2409 Wint-in-bool-context warning with from_macro_definition_at.
2410 Mention the expression will always evaluate to true.
2412 2016-09-21 Martin Sebor <msebor@redhat.com>
2415 * c.opt (fprintf-return-value): Temporarily initialize to zero
2416 to unblock bootstrap failures.
2418 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2421 * c.opt (Waligned-new=): Add RejectNegative.
2422 (faligned-new=): Likewise. Spelling fix - change
2423 aligned_new_threshhold to aligned_new_threshold.
2424 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2425 to aligned_new_threshold.
2427 2016-09-20 Martin Sebor <msebor@redhat.com>
2430 * c.opt: Add -Wformat-length and -fprintf-return-value.
2432 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2435 * c.opt (Wint-in-bool-context): New warning.
2436 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2437 constants in boolean context.
2439 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2441 * c-common.c (max_align_t_align): Also consider alignment of
2444 2016-09-15 Jason Merrill <jason@redhat.com>
2446 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2449 2016-09-14 Jason Merrill <jason@redhat.com>
2451 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2452 limit FIELD_DECL, either.
2454 2016-09-14 Marek Polacek <polacek@redhat.com>
2456 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2457 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2458 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2460 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2462 * c-common.c (warn_logical_not_parentheses): Replace
2463 rich_location::add_fixit_insert calls with add_fixit_insert_before
2464 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2466 2016-09-13 Jason Merrill <jason@redhat.com>
2467 Tom de Vries <tom@codesourcery.com>
2470 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2472 2016-09-13 Jason Merrill <jason@redhat.com>
2474 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2477 2016-09-12 Jason Merrill <jason@redhat.com>
2479 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2480 bit/byte confusion, allow large alignment for types.
2482 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2485 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2487 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2490 * c-format.c (argument_parser::check_argument_type): Add params
2491 "type_start" and "conversion_char". Use the former to generate
2492 offset_to_type_start and pass it and conversion_char to
2494 (check_format_info_main): Capture the start of the type
2495 information as "type_start", and pass it an format_char
2496 to arg_parser.check_argument_type.
2497 (check_format_types): Provide an example in the leading comment.
2498 Add params "offset_to_type_start" and "conversion_char"; pass
2499 them to format_type_warning calls.
2500 (test_get_modifier_for_format_len): Likewise.
2501 (matching_type_p): New function.
2502 (get_format_for_type): Add param "conversion_char" and move
2503 implementation into...
2504 (get_format_for_type_1): ...new function, called twice.
2505 Use new function matching_type_p rather than checking for
2506 TYPE_CANONICAL equality.
2507 (get_corrected_substring): New function.
2508 (format_type_warning): Provide an example in the leading comment.
2509 Add params "offset_to_type_start" and "conversion_char". Replace
2510 call to get_format_for_type with call to get_corrected_substring
2511 and move rejection of hints for widths/precisions there.
2512 (assert_format_for_type_streq): Add param "conversion_char".
2513 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2514 (test_get_format_for_type_printf): Add conversion chars to the
2515 tests, adding coverage for various combinations of integer
2516 vs double conversions, and for preserving octal and hexadecimal
2518 (test_get_format_for_type_scanf): Add conversion chars to the
2521 2016-09-10 Tom de Vries <tom@codesourcery.com>
2524 * c-common.c (build_va_arg): Handle more strict
2525 targetm.canonical_va_list_type. Replace first argument type error with
2528 2016-09-09 Martin Sebor <msebor@redhat.com>
2532 * c-format.c (argument_parser::find_format_char_info): Use %qc
2533 format directive unconditionally.
2535 2016-09-09 Jason Merrill <jason@redhat.com>
2537 Implement C++17 new of over-aligned types.
2538 * c.opt: Add -faligned-new and -Waligned-new.
2539 * c-common.c (max_align_t_align): Split out from...
2540 (cxx_fundamental_alignment_p): ...here.
2541 * c-common.h: Declare it.
2542 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2544 2016-09-09 Joseph Myers <joseph@codesourcery.com>
2546 * c-cppbuiltin.c (builtin_define_type_width): New function.
2547 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2550 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2552 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2554 (substring_loc::get_location): Move to substring-locations.c,
2555 keeping implementation as...
2556 (c_get_substring_location): New function, from the above, reworked
2557 to use accessors rather than member lookup.
2558 * c-common.h (class substring_loc): Move to substring-locations.h,
2559 replacing with a forward decl.
2560 (c_get_substring_location): New decl.
2561 * c-format.c: Include "substring-locations.h".
2562 (format_warning_va): Move to substring-locations.c.
2563 (format_warning_at_substring): Likewise.
2565 2016-09-06 Martin Sebor <msebor@redhat.com>
2568 * c-format.c (check_function_format): Avoid issuing warnings for
2569 functions unless they call format functions with non-constant
2572 2016-09-06 Richard Biener <rguenther@suse.de>
2575 * c-common.c (c_common_mark_addressable_vec): Handle
2576 COMPOUND_LITERAL_EXPR.
2578 2016-09-05 Marek Polacek <polacek@redhat.com>
2581 * c-common.c (bool_promoted_to_int_p): New function.
2582 (expr_has_boolean_operands_p): New function.
2583 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2584 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2586 2016-09-04 Tom de Vries <tom@codesourcery.com>
2589 2016-08-29 Tom de Vries <tom@codesourcery.com>
2591 * c-common.c (build_va_arg): Replace first argument type error
2594 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2597 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2598 (c_finish_omp_for): Reject _Atomic qualified iterators.
2600 2016-09-01 Martin Sebor <msebor@redhat.com>
2602 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2603 size to guarantee it fits the output of the formatted function
2604 regardless of its arguments.
2606 2016-09-01 Marek Polacek <polacek@redhat.com>
2609 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2612 2016-08-29 Marek Polacek <polacek@redhat.com>
2615 * c-common.c (warn_logical_not_parentheses): Don't warn for
2616 a comparison or a logical operator.
2618 2016-08-29 Tom de Vries <tom@codesourcery.com>
2620 * c-common.c (build_va_arg): Fix type comparison assert.
2622 2016-08-29 Tom de Vries <tom@codesourcery.com>
2624 * c-common.c (build_va_arg): Replace first argument type error
2627 2016-08-29 Tom de Vries <tom@codesourcery.com>
2630 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2631 with error_mark_node as va_list instead of with illegal va_list.
2633 2016-08-25 Marek Polacek <polacek@redhat.com>
2634 David Malcolm <dmalcolm@redhat.com>
2636 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2637 * c-common.h (warn_logical_not_parentheses): Update declaration.
2639 2016-08-22 Marek Polacek <polacek@redhat.com>
2642 * c-common.c (warn_for_memset): Check type for null.
2644 2016-08-22 Joseph Myers <joseph@codesourcery.com>
2646 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2647 _FloatNx types for suffixes for built-in functions.
2649 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2652 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2653 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2654 (RID_FLOAT128X): New enum rid values.
2655 (CASE_RID_FLOATN_NX): New macro.
2656 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2658 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2659 corresponding complex types.
2660 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2661 _FloatNx and corresponding complex types.
2662 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2663 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2664 and _FloatNx types for the widest type for determining
2665 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2666 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2667 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2669 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2671 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2674 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2676 * c-opts.c (c_diagnostic_finalizer): Update for change to
2677 diagnostic_show_locus.
2679 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2681 * c-common.c: Include "spellcheck.h".
2682 (cb_get_suggestion): New function.
2683 * c-common.h (cb_get_suggestion): New decl.
2684 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2687 2016-08-18 Marek Polacek <polacek@redhat.com>
2690 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2693 2016-08-16 David Malcolm <dmalcolm@redhat.com>
2696 * c-common.c (substring_loc::get_range): Rename to...
2697 (substring_loc::get_location): ...this, converting param from a
2698 source_range * to a location_t *. Call
2699 get_source_location_for_substring rather than
2700 get_source_range_for_substring, and pass in m_caret_idx.
2701 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2702 (substring_loc::get_range): Replace with...
2703 (substring_loc::get_location): ...this.
2704 (substring_loc::set_caret_index): New method.
2705 (substring_loc): Add field m_caret_idx.
2706 * c-format.c (format_warning_va): Update for above changes.
2707 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2708 clashing with type name.
2709 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2710 (check_argument_type): Likewise.
2711 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2712 Use a copy when emitting warnings, setting the caret index from TYPE.
2714 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
2715 Arnaud Charlet <charlet@adacore.com>
2717 * c-ada-spec.c (dump_number): New function.
2718 (handle_escape_character): Likewise.
2719 (print_ada_macros): Add handling of constant integers and strings.
2721 2016-08-12 Marek Polacek <polacek@redhat.com>
2724 * c-common.c (scalar_to_vector): Adjust fall through comment.
2725 * c-opts.c (c_common_handle_option): Likewise.
2726 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2727 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2728 fall through comment.
2729 * cilk.c (extract_free_variables): Add FALLTHRU.
2731 2016-08-10 Jason Merrill <jason@redhat.com>
2733 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2735 2016-08-09 Jason Merrill <jason@redhat.com>
2737 * c-common.c (c_common_attribute_table): vector_size affects type
2740 2016-08-09 Marek Polacek <polacek@redhat.com>
2743 * c-ada-spec.c (dump_generic_ada_node): Add return.
2745 2016-08-09 Jason Merrill <jason@redhat.com>
2747 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2748 C++17 constexpr lambdas.
2750 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2753 * c-common.h (selftest::c_format_c_tests): New declaration.
2754 (selftest::run_c_tests): New declaration.
2755 * c-format.c: Include "selftest.h.
2756 (format_warning_va): Add param "corrected_substring" and use
2757 it to add a replacement fix-it hint.
2758 (format_warning_at_substring): Likewise.
2759 (format_warning_at_char): Update for new param of
2761 (argument_parser::check_argument_type): Pass "fki" to
2763 (check_format_types): Add param "fki" and pass it to
2764 format_type_warning.
2765 (deref_n_times): New function.
2766 (get_modifier_for_format_len): New function.
2767 (selftest::test_get_modifier_for_format_len): New function.
2768 (get_format_for_type): New function.
2769 (format_type_warning): Add param "fki" and use it to attempt
2770 to provide hints for argument types when calling
2771 format_warning_at_substring.
2772 (selftest::get_info): New function.
2773 (selftest::assert_format_for_type_streq): New function.
2774 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2775 (selftest::test_get_format_for_type_printf): New function.
2776 (selftest::test_get_format_for_type_scanf): New function.
2777 (selftest::c_format_c_tests): New function.
2779 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2782 * c-format.c: Include "diagnostic.h".
2783 (location_column_from_byte_offset): Delete.
2784 (location_from_offset): Delete.
2785 (format_warning_va): New function.
2786 (format_warning_at_substring): New function.
2787 (format_warning_at_char): New function.
2788 (check_format_arg): Capture location of format_tree and pass to
2789 check_format_info_main.
2790 (argument_parser): Add fields "start_of_this_format" and
2791 "format_string_cst".
2792 (flag_chars_t::validate): Add param "format_string_cst". Convert
2793 warning_at call using location_from_offset to call to
2794 format_warning_at_char.
2795 (argument_parser::argument_parser): Add param "format_string_cst_"
2796 and use use it to initialize field "format_string_cst".
2797 Initialize new field "start_of_this_format".
2798 (argument_parser::read_format_flags): Convert warning_at call
2799 using location_from_offset to a call to format_warning_at_char.
2800 (argument_parser::read_any_format_left_precision): Likewise.
2801 (argument_parser::read_any_format_precision): Likewise.
2802 (argument_parser::read_any_other_modifier): Likewise.
2803 (argument_parser::find_format_char_info): Likewise, in three places.
2804 (argument_parser::parse_any_scan_set): Likewise, in one place.
2805 (argument_parser::handle_conversions): Likewise, in two places.
2806 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2807 and use it to make a substring_loc. Pass the latter to
2809 (check_format_info_main): Add params "fmt_param_loc" and
2810 "format_string_cst". Convert warning_at calls using
2811 location_from_offset to calls to format_warning_at_char. Pass the
2812 new params to the arg_parser ctor. Pass "format_string_cst" to
2813 flag_chars.validate. Pass "fmt_param_loc" to
2814 arg_parser.check_argument_type.
2815 (check_format_types): Convert first param from a location_t
2816 to a const substring_loc & and rename to "fmt_loc". Attempt
2817 to extract the range of the relevant parameter and pass it
2818 to format_type_warning.
2819 (format_type_warning): Convert first param from a location_t
2820 to a const substring_loc & and rename to "fmt_loc". Add
2821 params "param_range" and "type". Replace calls to warning_at
2822 with calls to format_warning_at_substring.
2824 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2826 * c-format.c (class flag_chars_t): New class.
2827 (struct length_modifier): New struct.
2828 (class argument_parser): New class.
2829 (flag_chars_t::flag_chars_t): New ctor.
2830 (flag_chars_t::has_char_p): New method.
2831 (flag_chars_t::add_char): New method.
2832 (flag_chars_t::validate): New method.
2833 (flag_chars_t::get_alloc_flag): New method.
2834 (flag_chars_t::assignment_suppression_p): New method.
2835 (argument_parser::argument_parser): New ctor.
2836 (argument_parser::read_any_dollar): New method.
2837 (argument_parser::read_format_flags): New method.
2838 (argument_parser::read_any_format_width): New method.
2839 (argument_parser::read_any_format_left_precision): New method.
2840 (argument_parser::read_any_format_precision): New method.
2841 (argument_parser::handle_alloc_chars): New method.
2842 (argument_parser::read_any_length_modifier): New method.
2843 (argument_parser::read_any_other_modifier): New method.
2844 (argument_parser::find_format_char_info): New method.
2845 (argument_parser::validate_flag_pairs): New method.
2846 (argument_parser::give_y2k_warnings): New method.
2847 (argument_parser::parse_any_scan_set): New method.
2848 (argument_parser::handle_conversions): New method.
2849 (argument_parser::check_argument_type): New method.
2850 (check_format_info_main): Introduce classes argument_parser
2851 and flag_chars_t, moving the code within the loop into methods
2852 of these classes. Make various locals "const".
2854 2016-08-05 David Malcolm <dmalcolm@redhat.com>
2856 * c-common.c: Include "substring-locations.h".
2857 (get_cpp_ttype_from_string_type): New function.
2858 (g_string_concat_db): New global.
2859 (substring_loc::get_range): New method.
2860 * c-common.h (g_string_concat_db): New declaration.
2861 (class substring_loc): New class.
2862 * c-lex.c (lex_string): When concatenating strings, capture the
2863 locations of all tokens using a new obstack, and record the
2864 concatenation locations within g_string_concat_db.
2865 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2868 2016-07-29 Marek Polacek <polacek@redhat.com>
2871 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2872 parentheses warning.
2875 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2877 2016-07-28 Martin Liska <mliska@suse.cz>
2879 PR gcov-profile/68025
2880 * c-common.c (handle_no_profile_instrument_function_attribute):
2882 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2884 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2887 2016-07-25 Jason Merrill <jason@redhat.com>
2890 * c.opt (fconstexpr-loop-limit): New.
2892 2016-07-22 Martin Sebor <msebor@redhat.com>
2895 * c-common.c (resolve_overloaded_builtin): Avoid converting
2896 __atomic_compare_exchange_n return type to that of what its
2897 first argument points to.
2899 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2901 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2902 ~(unsigned HOST_WIDE_INT) 0.
2904 2016-07-22 Martin Liska <mliska@suse.cz>
2906 PR gcov-profile/69028
2907 PR gcov-profile/62047
2908 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2909 to the current_function_decl.
2911 2016-07-21 Jason Merrill <jason@redhat.com>
2914 * c-common.c (c_common_truthvalue_conversion): Check
2915 c_inhibit_evaluation_warnings for warning about address of
2918 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2920 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2923 2016-07-15 Jason Merrill <jason@redhat.com>
2925 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2927 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2930 * c-common.h (enum lookup_name_fuzzy_kind): Add
2931 FUZZY_LOOKUP_FUNCTION_NAME.
2933 2016-07-08 Jason Merrill <jason@redhat.com>
2935 P0145: Refining Expression Order for C++.
2936 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2939 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2942 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2944 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2946 * c-pragma.h (enum pragma_kind): Rename
2947 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2950 2016-06-29 Richard Biener <rguenther@suse.de>
2953 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2955 2016-06-24 Jason Merrill <jason@redhat.com>
2957 P0145R2: Refining Expression Order for C++.
2958 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2961 2016-06-24 Jakub Jelinek <jakub@redhat.com>
2963 * c-common.c (check_builtin_function_arguments): Require last
2964 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2965 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2966 if the last argument is pointer to enumerated or boolean type.
2968 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2971 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2972 (lookup_name_fuzzy): New prototype.
2974 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
2976 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2978 2016-06-14 Jason Merrill <jason@redhat.com>
2980 P0145R2: Refining Expression Order for C++.
2981 * c.opt (fargs-in-order): New.
2982 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2984 2016-06-13 Jakub Jelinek <jakub@redhat.com>
2987 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2988 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2990 PR preprocessor/71183
2991 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2992 to cb_get_source_date_epoch.
2994 2016-06-10 Jakub Jelinek <jakub@redhat.com>
2997 * c.opt (Wpsabi): Add Warning flag.
2999 2016-06-10 Martin Sebor <msebor@redhat.com>
3002 * c-common.c (handle_nonnull_attribute): Accept
3003 the nonnull attribute in type-generic builtins.
3005 2016-06-09 Martin Sebor <msebor@redhat.com>
3008 * c-common.c (builtin_function_validate_nargs): Make text of error
3009 message consistent with others like it.
3011 2016-06-08 Martin Sebor <msebor@redhat.com>
3012 Jakub Jelinek <jakub@redhat.com>
3016 * c-common.c (check_builtin_function_arguments): Handle
3017 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3019 2016-06-08 Richard Biener <rguenther@suse.de>
3021 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3023 2016-06-07 Richard Biener <rguenther@suse.de>
3026 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3027 options and warn about others.
3029 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
3031 * c-common.c (get_source_date_epoch): Rename to
3032 cb_get_source_date_epoch.
3033 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3034 message when the parsing fails. Use error_at instead of fatal_error.
3035 * c-common.h (get_source_date_epoch): Rename to
3036 cb_get_source_date_epoch.
3037 * c-common.h (cb_get_source_date_epoch): Prototype.
3038 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3039 * c-common.h (c_omp_region_type): Remove trailing comma.
3040 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3041 * c-lex.c (c_lex_with_flags): Remove initialization of
3042 pfile->source_date_epoch.
3044 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3047 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3048 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3049 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3050 instead of C_OMP_CLAUSE_SPLIT_FOR.
3052 2016-05-24 Richard Biener <rguenther@suse.de>
3056 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3057 (convert_vector_to_array_for_subscript): ... this.
3058 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3059 VIEW_CONVERT_EXPR to an array type. Rename to ...
3060 (convert_vector_to_array_for_subscript): ... this.
3062 2016-05-12 Marek Polacek <polacek@redhat.com>
3065 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3066 size_in_bytes and pass LOC to it.
3068 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3071 * c.opt (Wduplicate-decl-specifier): New option.
3073 2016-05-11 Marek Polacek <polacek@redhat.com>
3076 * c-common.c (diagnose_mismatched_attributes): New function.
3077 * c-common.h (diagnose_mismatched_attributes): Declare.
3079 2016-05-04 Marek Polacek <polacek@redhat.com>
3081 * c.opt (Wdangling-else): New option.
3083 2016-05-03 Marek Polacek <polacek@redhat.com>
3086 * c-common.c (builtin_function_validate_nargs): Add location
3088 (check_builtin_function_arguments): Add location and arguments
3089 parameters. Use them.
3090 * c-common.h (check_builtin_function_arguments): Update declaration.
3092 2016-05-03 Richard Biener <rguenther@suse.de>
3094 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3095 allow call args to gimplify to SSA names.
3097 2016-05-03 Marek Polacek <polacek@redhat.com>
3099 * c-common.h (enum c_omp_region_type): Remove stray comma.
3101 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3103 * c-common.h (enum c_omp_region_type): Define.
3105 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3107 * c-common.c (shorten_compare): Use wi::to_wide.
3109 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3112 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3113 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3114 reduction clauses in acc parallel loops.
3116 2016-04-29 Marek Polacek <polacek@redhat.com>
3119 * c-common.c (warn_for_memset): Check domain before accessing it.
3121 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3124 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3125 "aligned" attribute.
3127 2016-04-28 Jason Merrill <jason@redhat.com>
3129 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3131 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3132 Matthias Klose <doko@debian.org>
3134 * c-common.c (get_source_date_epoch): New function, gets the environment
3135 variable SOURCE_DATE_EPOCH and parses it as long long with error
3137 * c-common.h (get_source_date_epoch): Prototype.
3138 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3140 2015-04-27 Ryan Burn <contact@rnburn.com>
3144 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3145 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3147 (cilk_detect_and_unwrap): Corresponding changes.
3148 (extract_free_variables): Don't extract free variables from
3149 AGGR_INIT_EXPR slot.
3150 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3151 (cilk_recognize_spawn): Likewise.
3153 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3155 * c.opt (Wmemset-elt-size): New option.
3156 * c-common.c (warn_for_memset): New function.
3157 * c-common.h (warn_for_memset): Declare.
3159 2016-04-25 Jason Merrill <jason@redhat.com>
3161 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3163 * c-common.h: Declare it.
3164 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3166 2016-04-22 Jason Merrill <jason@redhat.com>
3168 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3170 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3173 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3174 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3176 2016-04-18 Michael Matz <matz@suse.de>
3178 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3181 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3183 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3184 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3185 to incomplete types.
3186 (dump_nested_type): Remove redundant tests and tidy up.
3187 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3188 a type which is the typedef of an original type.
3190 2016-04-15 Marek Polacek <polacek@redhat.com>
3193 * c-common.c (build_va_arg): Change two asserts into errors and return
3196 2016-04-13 Marek Polacek <polacek@redhat.com>
3199 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3200 for switch statements, too.
3202 2016-03-28 Jason Merrill <jason@redhat.com>
3204 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3206 2016-03-23 Marek Polacek <polacek@redhat.com>
3209 * c.opt (Wignored-attributes): New option.
3211 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3214 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3215 diagnostic text, reversing the order of the warning and note so
3216 that they appear in source order.
3218 2016-03-17 Marek Polacek <polacek@redhat.com>
3221 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3224 2016-03-14 Jason Merrill <jason@redhat.com>
3226 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3228 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3230 2016-03-09 Richard Biener <rguenther@suse.de>
3233 * c-common.c (strict_aliasing_warning): Add back
3234 alias_sets_conflict_p check.
3236 2016-03-08 Jason Merrill <jason@redhat.com>
3238 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3240 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3243 * c-indentation.c (get_visual_column): Move code to determine next
3245 (next_tab_stop): ...this new function.
3246 (line_contains_hash_if): Delete function.
3247 (detect_preprocessor_logic): Delete function.
3248 (get_first_nws_vis_column): New function.
3249 (detect_intervening_unindent): New function.
3250 (should_warn_for_misleading_indentation): Replace call to
3251 detect_preprocessor_logic with a call to
3252 detect_intervening_unindent.
3254 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3257 * c-indentation.c (should_warn_for_misleading_indentation): When
3258 suppressing warnings about cases where the guard and body are on
3259 the same column, only use the first non-whitespace column in place
3260 of the guard token column when dealing with "else" clauses.
3261 When rejecting aligned BODY and NEXT, loosen the requirement
3262 from equality with the first non-whitespace of guard to simply
3263 that they not be indented relative to it.
3265 2016-03-04 Richard Biener <rguenther@suse.de>
3268 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3269 instead of alias_sets_conflict_p.
3271 2016-03-01 Marek Polacek <polacek@redhat.com>
3274 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3277 2016-02-22 Martin Sebor <msebor@redhat.com>
3280 * c-common.c (check_builtin_function_arguments): Validate and
3281 reject invalid arguments to __builtin_alloca_with_align.
3283 2016-02-20 Mark Wielaard <mjw@redhat.com>
3286 * c.opt (Wunused-const-variable): Turn into Alias for...
3287 (Wunused-const-variable=): New option.
3289 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3292 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3294 (c_common_init_options): ...to here.
3295 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3297 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3300 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3301 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3302 flag_preprocess_only.
3304 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3307 * c.opt (Wnonnull-compare): Enable for -Wall.
3309 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3312 * c-common.c (sync_resolve_size): Diagnose too few arguments
3313 even when params is non-NULL empty vector.
3315 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3318 * c.opt (fshort-double): Remove.
3320 2016-02-05 Martin Sebor <msebor@redhat.com>
3323 * c.opt (Warning options): Update -Wplacement-new to take
3324 an optional argument.
3326 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3328 PR preprocessor/69543
3330 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3331 instead of loc to control_warning_option.
3333 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3335 * c.opt (fopenacc-dim=): New option.
3337 2016-01-27 Ryan Burn <contact@rnburn.com>
3340 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3341 gimplify_arg. Removed superfluous post_p argument.
3342 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3343 superfluous post_p argument.
3344 * c-gimplify.c (c_gimplify_expr): Likewise.
3346 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3349 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3350 pp_newline_and_flush with pp_flush.
3352 2016-01-20 Martin Sebor <msebor@redhat.com>
3355 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3356 an incompatible argument when the argument isn't a valid tree node.
3358 2016-01-18 Jason Merrill <jason@redhat.com>
3361 * c-common.c (check_function_arguments_recurse): Fold the whole
3362 COND_EXPR, not just the condition.
3364 2016-01-18 Tom de Vries <tom@codesourcery.com>
3366 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3367 classify as loop clause.
3369 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3372 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3373 C++ FE no longer has limit on number of pragmas.
3375 2015-01-14 Ryan Burn <contact@rnburn.com>
3378 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3379 to add missing cleanup point.
3381 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3384 * c-indentation.c (get_visual_column): Add location_t param.
3385 Handle the column number being zero by effectively disabling the
3386 warning, with an "inform".
3387 (should_warn_for_misleading_indentation): Add location_t argument
3388 for all uses of get_visual_column.
3390 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3393 * c-indentation.c (should_warn_for_misleading_indentation):
3394 Don't warn about do-while statements.
3396 2016-01-07 Martin Sebor <msebor@redhat.com>
3399 * c-common.c (sync_resolve_size): Reject first argument when it's
3402 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3405 * c-indentation.c (get_visual_column): Remove default argument.
3406 (should_warn_for_misleading_indentation): For the multiline case,
3407 update call to get_visual_column for next_stmt_exploc so that it
3408 captures the location of the first non-whitespace character in the
3409 relevant line. Don't issue warnings if there is non-whitespace
3410 before the next statement.
3412 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3414 Update copyright years.
3416 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3418 * c-common.c (binary_op_error): Convert first param from
3419 location_t to rich_location * and use it when emitting an error.
3420 * c-common.h (binary_op_error): Convert first param from
3421 location_t to rich_location *.
3423 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3425 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3426 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3428 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3430 * c-common.c (c_common_attribute_table): Handle "omp declare target
3433 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3436 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3438 2014-12-12 Tobias Burnus <burnus@net-b.de>
3441 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3442 specifiers (%d, %i,%u and %c).
3444 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3446 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3448 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3452 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3453 * c-pragma.c (handle_pragma_diagnostic): Adjust
3454 control_warning_option caller.
3456 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3458 * c-common.c (c_cpp_error): Update for change to
3459 rich_location::set_range.
3461 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3463 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3464 shifting 1 out of the sign bit.
3466 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3468 * c-common.c (c_common_attribute_table[]): Update max arguments
3469 count for "simd" attribute.
3470 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3472 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3474 PR preprocessor/57580
3475 * c-ppoutput.c (print): Change printed field to bool.
3476 Move src_file last for smaller padding.
3477 (init_pp_output): Set print.printed to false instead of 0.
3478 (scan_translation_unit): Fix up formatting. Set print.printed
3479 to true after printing something other than newline.
3480 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3481 (maybe_print_line_1): Set print.printed to false instead of 0.
3482 (print_line_1): Likewise.
3483 (do_line_change): Set print.printed to true instead of 1.
3484 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3485 dump_macro): Set print.printed to false after printing newline.
3487 2015-12-02 Jason Merrill <jason@redhat.com>
3489 * c-common.c (fold_for_warn): New.
3490 (warn_logical_operator, warn_tautological_cmp)
3491 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3493 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3494 (c_fully_fold_internal, decl_constant_value_for_optimization):
3496 * c-common.h: Don't declare decl_constant_value_for_optimization.
3498 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3501 * c-common.h (c_build_qualified_type): Add extra default
3504 2015-12-01 Julian Brown <julian@codesourcery.com>
3505 Cesar Philippidis <cesar@codesourcery.com>
3506 James Norris <James_Norris@mentor.com>
3508 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3509 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3510 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3512 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3514 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3515 (decl_sloc_common): Delete and move bulk of processing to...
3516 (decl_sloc): ...here.
3517 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3518 (dump_ada_double_name): Remove S parameter and compute the suffix.
3519 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3520 element type and deal with an anonymous one.
3521 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3522 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3523 and remove reference to QUAL_UNION_TYPE.
3524 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3525 (dump_nested_type): ...here. New function extracted from above.
3526 Generate a full declaration for anonymous element type of arrays.
3527 (print_ada_declaration): Really skip anonymous declarations. Remove
3528 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3529 Clean up processing of declarations of array types and objects.
3530 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3531 Remove obsolete code and tidy up.
3533 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3536 * c-common.c (handle_transparent_union_attribute): Update
3539 2015-11-27 Martin Liska <mliska@suse.cz>
3542 * array-notation-common.c (cilkplus_extract_an_triplets):
3543 Release vector of vectors.
3544 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3546 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3549 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3550 (print_ada_struct_decl): Likewise.
3552 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3555 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3556 * cilk.c (recognize_spawn): Determine location in a more precise
3559 2015-11-19 Jason Merrill <jason@redhat.com>
3561 * c-common.c (shorten_compare): But look through macros from
3564 2015-11-18 Jason Merrill <jason@redhat.com>
3566 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3567 non-constant operand comes from a macro.
3569 2015-11-17 Jason Merrill <jason@redhat.com>
3572 * c-common.c (warn_tautological_cmp): Fold before checking for
3575 2015-11-16 Marek Polacek <polacek@redhat.com>
3578 * c-common.c (check_case_bounds): Fold low and high cases.
3580 2015-11-16 Marek Polacek <polacek@redhat.com>
3582 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3583 * c-common.c (c_common_get_alias_set): Likewise.
3584 (handle_visibility_attribute): Likewise.
3586 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3588 * c-common.c (handle_simd_attribute): New.
3589 (struct attribute_spec): Add entry for "simd".
3590 (handle_simd_attribute): New.
3592 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
3594 * c-lex.c (interpret_float): Use fold_convert.
3596 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3598 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3599 and store it on the result.
3600 * c-opts.c (c_common_init_options): Set
3601 global_dc->colorize_source_p.
3603 2015-11-12 James Norris <jnorris@codesourcery.com>
3604 Joseph Myers <joseph@codesourcery.com>
3606 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3607 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3608 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3609 PRAGMA_OACC_CLAUSE_LINK.
3611 2015-11-11 Marek Polacek <polacek@redhat.com>
3615 * c-common.c (valid_array_size_p): New function.
3616 * c-common.h (valid_array_size_p): Declare.
3618 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
3621 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3623 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3625 * array-notation-common.c: Remove unused header files.
3626 * c-ada-spec.c: Likewise.
3627 * c-cilkplus.c: Likewise.
3628 * c-common.c: Likewise.
3629 * c-cppbuiltin.c: Likewise.
3630 * c-dump.c: Likewise.
3631 * c-format.c: Likewise.
3632 * c-gimplify.c: Likewise.
3633 * c-indentation.c: Likewise.
3634 * c-lex.c: Likewise.
3635 * c-omp.c: Likewise.
3636 * c-opts.c: Likewise.
3637 * c-pch.c: Likewise.
3638 * c-ppoutput.c: Likewise.
3639 * c-pragma.c: Likewise.
3640 * c-pretty-print.c: Likewise.
3641 * c-semantics.c: Likewise.
3642 * c-ubsan.c: Likewise.
3644 * stub-objc.c: Likewise.
3646 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3647 Cesar Philippidis <cesar@codesourcery.com>
3648 James Norris <jnorris@codesourcery.com>
3649 Julian Brown <julian@codesourcery.com>
3650 Nathan Sidwell <nathan@codesourcery.com>
3652 * c-pragma.c (oacc_pragmas): Add "routine".
3653 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3655 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3657 * c-common.c (c_common_attributes): Add scalar_storage_order.
3658 (handle_scalar_storage_order_attribute): New function.
3659 * c-pragma.c (global_sso): New variable.
3660 (maybe_apply_pragma_scalar_storage_order): New function.
3661 (handle_pragma_scalar_storage_order): Likewise.
3662 (init_pragma): Register scalar_storage_order.
3663 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3664 * c.opt (Wscalar-storage-order): New warning.
3665 (fsso-struct=): New option.
3667 2015-11-08 Martin Sebor <msebor@redhat.com>
3669 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3671 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3673 * c-common.c: Don't undef DEF_BUILTIN.
3675 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3677 * c-common.c (c_cpp_error): Convert parameter from location_t to
3678 rich_location *. Eliminate the "column_override" parameter and
3679 the call to diagnostic_override_column.
3680 Update the "done_lexing" clause to set range 0
3681 on the rich_location, rather than overwriting a location_t.
3682 * c-common.h (c_cpp_error): Convert parameter from location_t to
3683 rich_location *. Eliminate the "column_override" parameter.
3685 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3686 Thomas Schwinge <thomas@codesourcery.com>
3687 James Norris <jnorris@codesourcery.com>
3689 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3690 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3691 clauses with parallel and kernels and loops.
3692 * c-pragma.h (enum pragma_omp_clause): Add entries for
3693 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3694 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3695 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3697 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3699 2015-11-05 Martin Sebor <msebor@redhat.com>
3702 * c.opt (-Wplacement-new): New option.
3704 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3706 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3707 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3708 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3709 save_expr or create_tmp_var* if TEST is true.
3710 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3711 Don't call add_stmt here.
3712 (struct c_omp_check_loop_iv_data): New type.
3713 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3714 c_omp_check_loop_iv_exprs): New functions.
3715 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3717 (c_omp_declare_simd_clauses_to_numbers): Change
3718 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3719 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3720 from numbers to PARM_DECLs.
3722 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3724 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3727 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
3730 * c-common.h (fold_offsetof_1): Add argument.
3731 * c-common.c (fold_offsetof_1): Diagnose more invalid
3732 offsetof expressions that reference elements past the end of
3735 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3736 Chung-Lin Tang <cltang@codesourcery.com>
3738 * c-pragma.c (oacc_pragmas): Add "atomic".
3739 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3741 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3743 * c-common.c (handle_target_clones_attribute): New.
3744 (c_common_attribute_table): Add handle_target_clones_attribute.
3745 (handle_always_inline_attribute): Add check on target_clones attribute.
3746 (handle_target_attribute): Ditto.
3748 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3750 * array-notation-common.c: Reorder #include's and remove duplicates.
3751 * c-ada-spec.c: Likewise.
3752 * c-cilkplus.c: Likewise.
3753 * c-common.c: Likewise.
3754 * c-cppbuiltin.c: Likewise.
3755 * c-dump.c: Likewise.
3756 * c-format.c: Likewise.
3757 * c-gimplify.c: Likewise.
3758 * c-indentation.c: Likewise.
3759 * c-lex.c: Likewise.
3760 * c-omp.c: Likewise.
3761 * c-opts.c: Likewise.
3762 * c-pch.c: Likewise.
3763 * c-ppoutput.c: Likewise.
3764 * c-pragma.c: Likewise.
3765 * c-pretty-print.c: Likewise.
3766 * c-semantics.c: Likewise.
3767 * c-ubsan.c: Likewise.
3769 * stub-objc.c: Likewise.
3771 2015-10-28 Jason Merrill <jason@redhat.com>
3773 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3775 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3776 James Norris <jnorris@codesourcery.com>
3777 Cesar Philippidis <cesar@codesourcery.com>
3781 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3782 * c-omp.c (c_oacc_split_loop_clauses): New function.
3784 2015-10-21 Martin Sebor <msebor@redhat.com>
3787 * c.opt: End each sentence that describes an option with a period.
3789 2015-10-20 Marek Polacek <polacek@redhat.com>
3791 * array-notation-common.c (is_cilkplus_vector_p): Define.
3792 * c-common.h (is_cilkplus_vector_p): Declare.
3794 2015-10-20 Marek Polacek <polacek@redhat.com>
3796 * c.opt (std=gnu++11): Do not describe as experimental.
3797 (std=gnu++14): Likewise.
3799 2015-10-19 Jason Merrill <jason@redhat.com>
3801 * c-cppbuiltin.c (c_cpp_builtins): Define
3802 __cpp_nontype_template_args.
3804 2015-10-19 Jason Merrill <jason@redhat.com>
3806 * c-cppbuiltin.c (c_cpp_builtins): Define
3807 __cpp_enumerator_attributes, __cpp_fold_expressions,
3808 __cpp_unicode_characters.
3810 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3811 Aldy Hernandez <aldyh@redhat.com>
3813 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3814 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3815 (c_define_builtins): Likewise.
3816 * c-common.h (enum c_omp_clause_split): Add
3817 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3818 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3819 (c_finish_omp_for): Add ORIG_DECLV argument.
3820 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3821 201511 instead of 201307.
3822 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3823 OMP_CRITICAL_CLAUSES to it.
3824 (c_finish_omp_ordered): Add CLAUSES argument, set
3825 OMP_ORDERED_CLAUSES to it.
3826 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3827 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3828 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3829 constructs and new OpenMP 4.5 clauses. Clear
3830 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3832 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3833 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3834 (enum pragma_omp_clause): Add
3835 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3836 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3838 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3840 * c-lex.c (interpret_float): Use real_equal instead of
3843 2015-10-04 Jason Merrill <jason@redhat.com>
3845 Implement N4514, C++ Extensions for Transactional Memory.
3846 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3847 (c_common_attribute_table): Add transaction_safe_dynamic.
3848 transaction_safe now affects type identity.
3849 (handle_tm_attribute): Handle transaction_safe_dynamic.
3850 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3851 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3852 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3854 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3855 * c-pretty-print.c (pp_c_attributes_display): Don't print
3856 transaction_safe in C++.
3858 2015-10-02 Marek Polacek <polacek@redhat.com>
3860 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3862 2015-10-02 Marek Polacek <polacek@redhat.com>
3865 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3866 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3867 * c.opt (Wduplicated-cond): New option.
3869 2015-10-01 Joseph Myers <joseph@codesourcery.com>
3871 * c.opt (std=c11): Do not describe as experimental.
3872 (std=gnu11): Likewise.
3873 (std=iso9899:2011): Likewise.
3875 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3877 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3878 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3880 2015-09-25 Marek Polacek <polacek@redhat.com>
3882 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3883 (ubsan_instrument_shift): Likewise.
3885 2015-09-25 Marek Polacek <polacek@redhat.com>
3888 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3890 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3892 * c-indentation.c (should_warn_for_misleading_indentation):
3893 Compare next_stmt_vis_column with guard_line_first_nws instead
3894 of with guard_line_vis_column.
3896 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3900 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3901 options and options not valid for the current language.
3903 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3905 * c-indentation.c (should_warn_for_misleading_indentation):
3906 Float out and consolidate the calls to get_visual_column that
3907 are passed guard_exploc as an argument. Compare
3908 next_stmt_vis_column with guard_line_first_nws instead of with
3909 body_line_first_nws.
3911 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3913 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3914 Wnamespaces): New C++ warnings.
3916 2015-09-22 Jason Merrill <jason@redhat.com>
3918 * c-common.h (abi_compat_version_crosses): New.
3919 (warn_abi_version): Declare.
3920 * c-common.c: Define it.
3921 * c-opts.c (c_common_post_options): Handle it.
3922 flag_abi_compat_version defaults to 8.
3924 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3926 Complete the implementation of N4230, Nested namespace definition.
3927 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3928 __cpp_nested_namespace_definitions.
3930 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3932 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3934 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3936 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3938 * c-pragma.h (pragma_lex): Add optional loc argument.
3940 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3942 * c-format.c (check_format_arg): Adjust to use common block size in all
3945 2015-09-15 David Malcolm <dmalcolm@redhat.com>
3947 * c-format.c (location_from_offset): Update for change in
3948 signature of location_get_source_line.
3949 * c-indentation.c (get_visual_column): Likewise.
3950 (line_contains_hash_if): Likewise.
3952 2015-09-14 Marek Polacek <polacek@redhat.com>
3954 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3955 setting various warnings.
3957 2015-09-14 Marek Polacek <polacek@redhat.com>
3959 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3962 2015-09-11 Mark Wielaard <mjw@redhat.com>
3965 * c.opt (Wunused-variable): Option from common.opt.
3966 (Wunused-const-variable): New option.
3968 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3971 * c.opt ([Wsubobject-linkage]): Add.
3973 2015-09-03 Martin Sebor <msebor@redhat.com>
3976 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3978 * c-common.c (reject_gcc_builtin): Define.
3980 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3983 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3985 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3986 cilk_gimplify_call_params_in_spawned_fn.
3987 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3988 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3991 2015-08-25 Marek Polacek <polacek@redhat.com>
3994 * c-common.c (handle_weak_attribute): Don't check whether the
3995 visibility can be changed here.
3997 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3999 * c-lex.c (c_lex_with_flags): Use explicit locations.
4001 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4003 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4004 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4006 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4009 * c-common.c (check_builtin_function_arguments): Add check
4010 for BUILT_IN_SIGNBIT argument.
4012 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4015 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4018 2015-08-17 Marek Polacek <polacek@redhat.com>
4020 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4021 with whitespaces before qualifier names.
4023 2015-08-12 Marek Polacek <polacek@redhat.com>
4026 * c-common.c (maybe_warn_shift_overflow): Properly handle
4027 left-shifting 1 into the sign bit.
4029 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4031 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4033 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4034 Braden Obrzut <admin@maniacsvault.net>
4035 Jason Merrill <jason@redhat.com>
4037 Add C++ Concepts TS support.
4038 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4039 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4040 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4041 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4042 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4043 * c.opt (fconcepts): New.
4045 2015-08-02 Martin Sebor <msebor@redhat.com>
4047 * c.opt (-Wframe-address): New warning option.
4049 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4051 * c-indentation.c (should_warn_for_misleading_indentation):
4054 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4056 * c-indentation.c (get_visual_column): Add parameter first_nws,
4057 use it. Update comment documenting the function.
4058 (is_first_nonwhitespace_on_line): Remove.
4059 (should_warn_for_misleading_indentation): Replace usage of
4060 of is_first_nonwhitespace_on_line with get_visual_column.
4062 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4064 * c-indentation.h (struct token_indent_info): Define.
4065 (get_token_indent_info): Define.
4066 (warn_for_misleading_information): Declare.
4067 * c-common.h (warn_for_misleading_information): Remove.
4068 * c-identation.c (warn_for_misleading_indentation):
4069 Change declaration to take three token_indent_infos. Adjust
4071 * c-identation.c (should_warn_for_misleading_indentation):
4072 Likewise. Bail out early if the body is a compound statement.
4073 (guard_tinfo_to_string): Define.
4075 2015-07-30 Jason Merrill <jason@redhat.com>
4077 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4078 '*' for reference decay.
4080 2015-07-30 Marek Polacek <polacek@redhat.com>
4082 * c-common.c (warn_tautological_cmp): Bail for float types.
4084 2015-07-27 Marek Polacek <polacek@redhat.com>
4087 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4089 2015-07-27 Marek Polacek <polacek@redhat.com>
4093 * c-common.c (find_array_ref_with_const_idx_r): New function.
4094 (warn_tautological_cmp): New function.
4095 * c-common.h (warn_tautological_cmp): Declare.
4096 * c.opt (Wtautological-compare): New option.
4098 2015-07-23 Marek Polacek <polacek@redhat.com>
4100 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4101 (ubsan_instrument_shift): Likewise.
4103 2015-07-23 Marek Polacek <polacek@redhat.com>
4106 * c-ubsan.c: Include gimplify.h.
4107 (ubsan_instrument_division): Unshare OP0 and OP1.
4108 (ubsan_instrument_shift): Likewise.
4110 2015-07-20 Marek Polacek <polacek@redhat.com>
4111 Richard Sandiford <richard.sandiford@arm.com>
4114 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4115 Use EXPR_LOC_OR_LOC.
4116 (maybe_warn_shift_overflow): New function.
4117 * c-common.h (maybe_warn_shift_overflow): Declare.
4118 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4119 * c.opt (Wshift-overflow): New option.
4121 2015-07-16 Martin Liska <mliska@suse.cz>
4123 * c-format.c (static void check_format_info_main): Use
4124 object_allocator instead of pool_allocator.
4125 (check_format_arg): Likewise.
4126 (check_format_info_main): Likewise.
4128 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4130 * c-opts.c: Remove multiline #include comment.
4132 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4134 * c-common.c: Fix double word typos.
4136 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4138 * c-ada-spec.h (cpp_operation): Revert latest change.
4139 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4140 constructors and destructors.
4142 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4144 * c-common.h: Adjust includes for flags.h changes.
4145 * stub-objc.c: Likewise.
4147 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4149 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4150 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4152 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4154 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4155 are to be removed, return NULL rather than original clauses list.
4157 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4159 * array-notation-common.c: Adjust includes.
4160 * c-ada-spec.c: Likewise.
4161 * c-cilkplus.c: Likewise.
4162 * c-common.h: Likewise.
4163 * c-cppbuiltin.c: Likewise.
4164 * c-dump.c: Likewise.
4165 * c-format.c: Likewise.
4166 * c-gimplify.c: Likewise.
4167 * c-indentation.c: Likewise.
4168 * c-lex.c: Likewise.
4169 * c-omp.c: Likewise.
4170 * c-opts.c: Likewise.
4171 * c-pch.c: Likewise.
4172 * c-ppoutput.c: Likewise.
4173 * c-pragma.c: Likewise.
4174 * c-pretty-print.c: Likewise.
4175 * c-semantics.c: Likewise.
4176 * c-ubsan.c: Likewise.
4178 * stub-objc.c: Likewise.
4180 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4182 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4183 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4185 2015-07-01 Jason Merrill <jason@redhat.com>
4187 * c-common.h (D_CXX11): Rename from D_CXX0X.
4188 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4189 * c-common.c: Adjust.
4191 * c-opts.c (c_common_post_options): Default to C++14.
4193 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4195 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4197 Implement N4197 - Adding u8 character literals
4198 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4200 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4201 CPP_UTF8CHAR_USERDEF tokens.
4202 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4203 and CPP_UTF8CHAR tokens.
4204 (lex_charconst): Treat CPP_UTF8CHAR token.
4206 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4209 * c-common.c (do_warn_unused_parameter): Move here.
4210 * c-common.h (do_warn_unused_parameter): Declare.
4212 2015-06-29 Marek Polacek <polacek@redhat.com>
4215 * c-common.c (check_case_bounds): Add bool * parameter. Set
4217 (c_add_case_label): Add bool * parameter. Pass it down to
4219 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4221 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4224 2015-06-27 Marek Polacek <polacek@redhat.com>
4226 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4227 or VECTOR_INTEGER_TYPE_P throughout.
4228 * c-gimplify.c: Likewise.
4230 2015-06-26 Marek Polacek <polacek@redhat.com>
4232 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4233 * c-common.c (c_fully_fold_internal): Likewise.
4234 (c_alignof_expr): Likewise.
4235 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4236 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4237 * cilk.c (create_parm_list): Likewise.
4239 2015-06-26 Marek Polacek <polacek@redhat.com>
4241 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4243 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4245 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4246 * c-gimplify.c: Likewise.
4247 * c-pragma.c: Likewise.
4248 * c-ubsan.c: Likewise.
4251 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4253 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4256 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4258 * cilk.c: Move calls.h after tm.h in the include chain.
4260 2015-06-25 Marek Polacek <polacek@redhat.com>
4262 * array-notation-common.c: Use VAR_P throughout.
4263 * c-ada-spec.c: Likewise.
4264 * c-common.c: Likewise.
4265 * c-format.c: Likewise.
4266 * c-gimplify.c: Likewise.
4267 * c-omp.c: Likewise.
4268 * c-pragma.c: Likewise.
4269 * c-pretty-print.c: Likewise.
4272 2015-06-25 Marek Polacek <polacek@redhat.com>
4274 * cilk.c (extract_free_variables): Use is_global_var.
4276 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4278 * c-common.c: Don't include target-def.h.
4280 2015-06-23 Marek Polacek <polacek@redhat.com>
4282 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4283 when comparing INTEGER_CSTs.
4285 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4287 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4288 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4289 (dump_ada_template): Skip partially specialized types.
4291 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4293 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4296 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4298 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4299 * c-ada-spec.c: Likewise.
4300 * c-cilkplus.c: Likewise.
4301 * c-common.c: Likewise.
4302 * c-common.h: Likewise.
4303 * c-cppbuiltin.c: Likewise.
4304 * c-dump.c: Likewise.
4305 * c-format.c: Likewise.
4306 * c-gimplify.c: Likewise.
4307 * c-indentation.c: Likewise.
4308 * c-lex.c: Likewise.
4309 * c-omp.c: Likewise.
4310 * c-opts.c: Likewise.
4311 * c-pch.c: Likewise.
4312 * c-ppoutput.c: Likewise.
4313 * c-pragma.c: Likewise.
4314 * c-pretty-print.c: Likewise.
4315 * c-semantics.c: Likewise.
4316 * c-ubsan.c: Likewise.
4318 * stub-objc.c: Likewise.
4320 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4323 * c-common.c (c_common_truthvalue_conversion): Warn when
4324 converting an address of a reference to a truth value.
4326 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4328 * array-notation-common.c : Adjust include files.
4329 * c-ada-spec.c : Likewise.
4330 * c-cilkplus.c : Likewise.
4331 * c-common.c : Likewise.
4332 * c-common.h : Likewise.
4333 * c-cppbuiltin.c : Likewise.
4334 * c-dump.c : Likewise.
4335 * c-format.c : Likewise.
4336 * c-gimplify.c : Likewise.
4337 * c-indentation.c : Likewise.
4338 * c-lex.c : Likewise.
4339 * c-omp.c : Likewise.
4340 * c-opts.c : Likewise.
4341 * c-pch.c : Likewise.
4342 * c-ppoutput.c : Likewise.
4343 * c-pragma.c : Likewise.
4344 * c-pretty-print.c : Likewise.
4345 * c-semantics.c : Likewise.
4346 * c-ubsan.c : Likewise.
4347 * cilk.c : Likewise.
4348 * stub-objc.c : Likewise.
4350 2015-06-08 Marek Polacek <polacek@redhat.com>
4353 * c-format.c (location_from_offset): Return LOC if LINE is null.
4355 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4357 * c-common.h (c_parse_final_cleanups): New prototype.
4358 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4360 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4362 * c-common.c (noplt): New attribute.
4363 (handle_noplt_attribute): New handler.
4365 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4367 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4368 * c-ada-spec.c: Likewise.
4369 * c-cilkplus.c: Likewise.
4370 * c-common.c: Likewise.
4371 * c-common.h: Likewise.
4372 * c-cppbuiltin.c: Likewise.
4373 * c-dump.c: Likewise.
4374 * c-format.c: Likewise.
4375 * c-gimplify.c: Likewise.
4376 * c-indentation.c: Likewise.
4377 * c-lex.c: Likewise.
4378 * c-omp.c: Likewise.
4379 * c-opts.c: Likewise.
4380 * c-pch.c: Likewise.
4381 * c-ppoutput.c: Likewise.
4382 * c-pragma.c: Likewise.
4383 * c-pretty-print.c: Likewise.
4384 * c-semantics.c: Likewise.
4385 * c-ubsan.c: Likewise.
4387 * stub-objc.c: Likewise.
4389 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4392 * c-indentation.c (should_warn_for_misleading_indentation): Use
4393 expand_location rather than expand_location_to_spelling_point.
4394 Don't warn if the guarding statement is more indented than the
4397 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4399 * c-indentation.c (warn_for_misleading_indentation): Bail out
4400 immediately if -Wmisleading-indentation isn't enabled.
4402 2015-06-01 Martin Liska <mliska@suse.cz>
4404 * c-format.c (check_format_arg):Use new type-based pool allocator.
4405 (check_format_info_main) Likewise.
4407 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4409 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4410 (has_nontrivial_methods): Likewise.
4412 2015-05-25 Marek Polacek <polacek@redhat.com>
4414 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4416 2015-05-22 Marek Polacek <polacek@redhat.com>
4419 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4421 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4423 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4424 STACK_GROWS_DOWNWARD.
4426 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4428 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4429 STACK_GROWS_DOWNWARD rather than if it is defined.
4431 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4434 * c-format.c (location_column_from_byte_offset): New.
4435 (location_from_offset): New.
4436 (struct format_wanted_type): Add offset_loc field.
4437 (check_format_info): Move handling of location for extra arguments
4438 closer to the point of warning.
4439 (check_format_info_main): Pass the result of location_from_offset
4441 (format_type_warning): Pass the result of location_from_offset
4444 2015-05-20 Marek Polacek <polacek@redhat.com>
4446 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4448 2015-05-20 Marek Polacek <polacek@redhat.com>
4450 * c-ada-spec.c (dump_sloc): Use DECL_P.
4452 2015-05-20 Marek Polacek <polacek@redhat.com>
4454 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4455 * c-common.c: Likewise.
4457 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4459 * c-common.h (fe_file_change): Strengthen param from
4460 const line_map * to const line_map_ordinary *.
4461 (pp_file_change): Likewise.
4462 * c-lex.c (fe_file_change): Likewise.
4463 (cb_define): Use linemap_check_ordinary when invoking
4465 (cb_undef): Likewise.
4466 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4467 invoking cb_file_change.
4468 (c_finish_options): Likewise.
4469 (push_command_line_include): Likewise.
4470 (cb_file_change): Strengthen param "new_map" from
4471 const line_map * to const line_map_ordinary *.
4472 * c-ppoutput.c (cb_define): Likewise for local "map".
4473 (pp_file_change): Likewise for param "map" and local "from".
4475 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4477 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4479 2015-05-18 Tom de Vries <tom@codesourcery.com>
4481 * c-common.c (build_va_arg_1): New function.
4482 (build_va_arg): Add address operator to va_list operand if necessary.
4484 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4487 * c-common.c (int_safely_convertible_to_real_p): Define.
4488 (unsafe_conversion_p): Check conversions involving complex types.
4489 (conversion_warning): Add new warning message for conversions which
4490 discard imaginary component.
4491 * c-common.h: (enum conversion_safety): Add new enumerator for such
4494 2015-05-14 Marek Polacek <polacek@redhat.com>
4498 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4499 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4500 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4501 use it. If FOR_INT_CONST, require that all evaluated operands be
4504 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4506 * c-common.h (warn_for_misleading_indentation): New prototype.
4507 * c-indentation.c: New file.
4508 * c.opt (Wmisleading-indentation): New option.
4510 2015-05-12 Tom de Vries <tom@codesourcery.com>
4512 PR tree-optimization/66010
4513 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4515 2015-05-09 Jason Merrill <jason@redhat.com>
4517 * c-opts.c (c_common_post_options): Also clear
4518 cpp_opts->cpp_warn_cxx11_compat.
4520 * c-common.h (enum cxx_dialect): Add cxx_unset.
4521 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4522 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4524 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4525 (std=gnu++0x): Mark as Undocumented.
4526 (std=gnu++1y): Add deprecated message.
4528 2015-05-08 Jason Merrill <jason@redhat.com>
4530 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4533 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4535 2015-05-08 Marek Polacek <polacek@redhat.com>
4538 * c.opt (Woverride-init-side-effects): New option.
4540 2015-05-07 Marek Polacek <polacek@redhat.com>
4543 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4545 * c.opt (Wshift-negative-value): New option.
4546 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4547 when -Wextra and C99/C++11 mode.
4549 2015-05-07 Marek Polacek <polacek@redhat.com>
4550 Martin Uecker <uecker@eecs.berkeley.edu>
4552 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4553 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4555 2015-05-05 Jason Merrill <jason@redhat.com>
4557 * c.opt (Wterminate): New.
4559 2015-04-30 Marek Polacek <polacek@redhat.com>
4561 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4562 require that the non-constant be of a boolean type.
4564 2015-04-29 Josh Triplett <josh@joshtriplett.org>
4566 * c-common.c (handle_section_attribute): Refactor to reduce
4567 nesting and distinguish between error cases.
4569 2015-04-29 Marek Polacek <polacek@redhat.com>
4572 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4575 2015-04-29 Jakub Jelinek <jakub@redhat.com>
4577 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4578 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4579 HOST_BITS_PER_WIDE_INT.
4581 2015-04-28 Tom de Vries <tom@codesourcery.com>
4583 PR tree-optimization/65887
4584 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4586 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
4587 Pierre-Marie de Rodat <derodat@adacore.com>
4589 * c-ada-spec.c (in_function): Delete.
4590 (dump_generic_ada_node): Do not change in_function and remove the
4591 redundant code dealing with it.
4592 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4593 (print_ada_methods): Output the static member functions in a nested
4594 package after the regular methods as well as associated renamings.
4596 2015-04-24 Marek Polacek <polacek@redhat.com>
4599 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4600 and OPT_Wshift_count_overflow.
4603 * c-common.c (warn_logical_operator): Warn if the operands have the
4606 2015-04-24 Marek Polacek <polacek@redhat.com>
4609 * c-common.c (warn_logical_operator): Bail if either operand comes
4610 from a macro expansion.
4612 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4615 * c-common.c (c_default_pointer_mode): Add definition.
4616 * c-common.h (c_default_pointer_mode): Add declaration.
4618 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4620 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4621 on record_builtin_type argument.
4623 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4626 * c-common.c (warn_logical_not_parentheses): Don't warn for
4629 2015-03-07 Marek Polacek <polacek@redhat.com>
4632 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4633 before trying to figure out whether we have a flexible array member.
4635 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
4636 Jonathan Wakely <jwakely.gcc@gmail.com>
4638 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4640 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4643 * c-ada-spec.c (print_destructor): Remove obsolete code.
4645 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4647 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4648 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4649 DECL_TEMPLATE_RESULT emulations.
4650 (dump_ada_template)): Add guard for TYPE_METHODS.
4652 2015-02-27 Marek Polacek <polacek@redhat.com>
4655 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4657 2015-02-27 Kai Tietz <ktietz@redhat.com>
4660 * c-pragma.c (handle_pragma_weak): Do not try to create
4661 weak/alias of declarations not being function, or variable
4664 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4667 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4669 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4671 2015-02-16 Marek Polacek <polacek@redhat.com>
4674 * c-format.c (check_format_types): Handle null param.
4676 2015-02-13 Marek Polacek <polacek@redhat.com>
4679 * c-format.c (check_format_types): Don't warn about different
4680 signedness if the original value is in the range of WANTED_TYPE.
4682 2015-02-12 Jason Merrill <jason@redhat.com>
4685 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4686 to the current highest version.
4687 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4689 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4693 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4694 instead of RDIV_EXPR. Use build_binary_op instead of
4697 2015-01-30 Joseph Myers <joseph@codesourcery.com>
4699 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4700 to pass input_location as first argument.
4702 2015-01-23 Tom de Vries <tom@codesourcery.com>
4705 * c.opt (fopenacc): Mark as LTO option.
4707 2015-01-23 Tom de Vries <tom@codesourcery.com>
4710 * c.opt (fopenmp): Mark as LTO option.
4712 2015-01-21 Jakub Jelinek <jakub@redhat.com>
4715 * cilk.c (fill_decls_vec): Only put decls into vector v.
4716 (compare_decls): Fix up formatting.
4718 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4721 * cilk.c: Include vec.h.
4722 (struct cilk_decls): New structure.
4723 (wrapper_parm_cb): Split this function to...
4724 (fill_decls_vec): ...this...
4725 (create_parm_list): ...and this.
4726 (compare_decls): New function.
4727 (for_local_cb): Remove.
4728 (wrapper_local_cb): Ditto.
4729 (build_wrapper_type): For now first traverse and fill vector of
4730 declarations then sort it and then deal with sorted vector.
4731 (cilk_outline): Ditto.
4732 (declare_one_free_variable): Ditto.
4734 2015-01-21 Jason Merrill <jason@redhat.com>
4737 * c-format.c (check_format_arg): Call decl_constant_value.
4739 2015-01-19 Martin Liska <mliska@suse.cz>
4741 * c-common.c (handle_noicf_attribute): New function.
4743 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4744 Bernd Schmidt <bernds@codesourcery.com>
4745 James Norris <jnorris@codesourcery.com>
4746 Cesar Philippidis <cesar@codesourcery.com>
4747 Ilmir Usmanov <i.usmanov@samsung.com>
4748 Jakub Jelinek <jakub@redhat.com>
4750 * c.opt (fopenacc): New option.
4751 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4752 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4754 * c-common.h (c_finish_oacc_wait): New prototype.
4755 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4756 (c_finish_oacc_wait): New function.
4757 * c-pragma.c (oacc_pragmas): New variable.
4758 (c_pp_lookup_pragma, init_pragma): Handle it.
4759 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4760 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4761 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4762 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4763 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4764 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4765 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4766 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4767 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4768 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4769 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4770 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4771 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4772 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4773 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4774 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4775 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4776 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4777 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4778 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4779 PRAGMA_OACC_CLAUSE_WORKER.
4781 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
4783 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4784 for the new option fstack-protector_explicit.
4785 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4786 (handle_stack_protect_attribute): New function.
4788 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
4790 * c.opt: New option -Warray-bounds=.
4792 2015-01-09 Michael Collison <michael.collison@linaro.org>
4794 * array-notation-common.c: Include hash-set.h, machmode.h,
4795 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4796 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4797 * c-ada-spec.c: Ditto.
4798 * c-cilkplus.c: Ditto.
4799 * c-common.c: Include input.h due to flattening of tree.h.
4800 Define macro GCC_C_COMMON_C.
4801 * c-common.h: Flatten tree.h header files into c-common.h.
4802 Remove include of tree-core.h.
4803 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4804 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4805 fold-const.h, wide-int.h, and inchash.h due to
4806 flattening of tree.h.
4808 * c-format.c: Flatten tree.h header files into c-common.h.
4809 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4810 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4811 fold-const.h, wide-int.h, and inchash.h due to
4812 flattening of tree.h.
4813 * c-dump.c: Include hash-set.h, machmode.h,
4814 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4815 fold-const.h, wide-int.h, and inchash.h due to
4816 flattening of tree.h.
4817 * c-format.c: Include hash-set.h, machmode.h,
4818 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4819 fold-const.h, wide-int.h, inchash.h and real.h due to
4820 flattening of tree.h.
4821 * c-gimplify.c: Include hash-set.h, machmode.h,
4822 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4823 fold-const.h, wide-int.h, and inchash.h due to
4824 flattening of tree.h.
4830 * c-ppoutput.c: Ditto.
4831 * c-pragma.c: Ditto.
4832 * c-pretty-print.c: Ditto.
4833 * c-semantics.c: Ditto.
4835 * stub-objc.c: Ditto.
4837 2015-01-08 Jason Merrill <jason@redhat.com>
4839 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4840 do_ubsan_in_current_function.
4841 (ubsan_maybe_instrument_reference_or_call): Likewise.
4842 * c-ubsan.h: Declare it.
4844 2015-01-08 Mike Stump <mikestump@comcast.net>
4846 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4848 2015-01-07 Marek Polacek <polacek@redhat.com>
4851 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4852 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4854 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4857 * c.opt (Wsuggest-override): New option.
4859 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4861 Update copyright years.
4863 2015-01-05 Marek Polacek <polacek@redhat.com>
4866 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4868 * c-common.h (warn_array_subscript_with_type_char): Update
4871 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4873 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4874 Control macro with flag_sized_deallocation.
4876 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4878 * c.opt (Wdiscarded-array-qualifiers): New option.
4880 2014-12-19 Jakub Jelinek <jakub@redhat.com>
4882 PR preprocessor/63831
4883 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4884 and __has_cpp_attribute here.
4885 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4886 c_common_has_attribute.
4887 * c-common.h (c_common_has_attribute): New prototype.
4888 * c-lex.c (init_c_lex): Set cb->has_attribute to
4889 c_common_has_attribute instead of cb_has_attribute.
4890 (get_token_no_padding): New function.
4891 (cb_has_attribute): Renamed to ...
4892 (c_common_has_attribute): ... this. No longer static. Use
4893 get_token_no_padding, require ()s, don't build TREE_LIST
4894 unnecessarily, fix up formatting, adjust diagnostics, call
4897 2014-12-15 Jason Merrill <jason@redhat.com>
4899 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4900 (-Wsized-deallocation): New.
4901 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4902 to on in C++14 and up.
4904 2014-12-11 Jason Merrill <jason@redhat.com>
4906 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4908 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4909 we aren't complaining about VLAs.
4911 2014-12-06 Marek Polacek <polacek@redhat.com>
4913 PR tree-optimization/64183
4914 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4915 shift-expression if it is integer_type_node. Use types_compatible_p.
4917 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4919 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4920 last argument from create_tmp_var_raw and create_tmp_var calls.
4921 * cilk.c (gimplify_cilk_spawn): Likewise.
4922 * c-omp.c (c_finish_omp_atomic): Likewise.
4924 2014-11-28 Marek Polacek <polacek@redhat.com>
4926 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4927 instead of unsigned_type_node.
4929 2014-11-28 Marek Polacek <polacek@redhat.com>
4932 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4934 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4935 expression to unsigned_type_node.
4937 2014-11-20 Mark Wielaard <mjw@redhat.com>
4940 * c-opts.c (set_std_c89): Set lang_hooks.name.
4941 (set_std_c99): Likewise.
4942 (set_std_c11): Likewise.
4943 (set_std_cxx98): Likewise.
4944 (set_std_cxx11): Likewise.
4945 (set_std_cxx14): Likewise.
4946 (set_std_cxx1z): Likewise.
4948 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4951 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4952 return type to bool.
4953 * c-common.c: Include gimple-expr.h.
4954 (convert_vector_to_pointer_for_subscript): Change return type to
4955 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4956 and copy it into a TARGET_EXPR and use that instead of *vecp
4959 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4961 Merger of git branch "gimple-classes-v2-option-3".
4962 * ChangeLog.gimple-classes: New.
4963 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4964 from being just a vec<gimple> to a vec<gbind *>.
4966 2014-11-18 Jakub Jelinek <jakub@redhat.com>
4969 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4970 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4971 get_pointer_alignment for non-pointers. Use ptype, or if it is
4972 reference type, corresponding pointer type, as type of kind
4974 (ubsan_maybe_instrument_reference,
4975 ubsan_maybe_instrument_member_call): Adjust callers.
4977 2014-11-15 Marek Polacek <polacek@redhat.com>
4980 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4982 (extract_array_notation_exprs): Return for NULL node.
4984 2014-11-12 Joseph Myers <joseph@codesourcery.com>
4986 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4987 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4989 2014-11-12 Jakub Jelinek <jakub@redhat.com>
4992 * c-common.c (check_builtin_function_arguments): Handle
4993 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4995 2014-11-10 Andi Kleen <ak@linux.intel.com>
4998 * c-common.h (check_no_cilk): Declare.
4999 * cilk.c (get_error_location): New function.
5000 (check_no_cilk): Dito.
5002 2014-11-10 Andi Kleen <ak@linux.intel.com>
5004 * cilk.c (recognize_spawn): Use expression location
5007 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5009 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5011 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5013 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5014 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5015 (__cpp_range_based_for, __cpp_initializer_lists,
5016 __cpp_delegating_constructors, __cpp_nsdmi,
5017 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5018 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5019 __has_cpp_attribute.
5020 * c-lex.c (cb_has_attribute): New callback CPP function;
5021 (init_c_lex): Set has_attribute callback.
5023 2014-11-04 Richard Biener <rguenther@suse.de>
5025 * c-common.c (shorten_compare): Do not shorten mixed
5026 DFP and non-DFP compares.
5028 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5030 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5031 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5032 Commentary and rearrangement of tests.
5033 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5034 Commentary and rearrangement of tests.
5035 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5036 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5038 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5040 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5041 enum from machine_mode.
5043 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5045 * c-common.c: Adjust include files.
5046 * c-gimplify.c: Ditto.
5048 * c-pragma.c: Ditto.
5051 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5053 * c-gimplify.c: Adjust include files.
5055 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5058 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5059 c_common_initialize_diagnostics.
5060 * c-common.h: Likewise.
5062 2014-10-24 Marek Polacek <polacek@redhat.com>
5065 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5066 print "struct"/"union"/"enum" for typedefed names.
5068 2014-10-23 Marek Polacek <polacek@redhat.com>
5070 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5073 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5074 Yury Gribov <y.gribov@samsung.com>
5076 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5077 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5078 instead of flag_sanitize_recover as bool flag.
5080 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5082 * cilk.c: Revert previous change.
5084 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5087 * cilk.c: Include vec.h.
5088 (struct cilk_decls): New structure.
5089 (wrapper_parm_cb): Split this function to...
5090 (fill_decls_vec): ...this...
5091 (create_parm_list): ...and this.
5092 (compare_decls): New function.
5093 (for_local_cb): Remove.
5094 (wrapper_local_cb): Ditto.
5095 (build_wrapper_type): For now first traverse and fill vector of
5096 declarations then sort it and then deal with sorted vector.
5097 (cilk_outline): Ditto.
5098 (declare_one_free_variable): Ditto.
5100 2014-10-17 Marek Polacek <polacek@redhat.com>
5102 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5103 * c.opt (Wimplicit-int): Initialize to -1.
5105 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5107 * c-pragma.c: Adjust include files.
5108 * c-semantics.c: Likewise.
5110 2014-10-16 DJ Delorie <dj@redhat.com>
5112 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5115 2014-10-14 Jason Merrill <jason@redhat.com>
5118 * c-common.h (CPP_PREPARSED_EXPR): New.
5119 (N_CP_TTYPES): Adjust.
5121 2014-10-15 Marek Polacek <polacek@redhat.com>
5123 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5125 2014-10-14 DJ Delorie <dj@redhat.com>
5127 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5128 types, not just __int128.
5129 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5130 types, not just __int128.
5131 (cpp_atomic_builtins): Round pointer sizes up.
5132 (type_suffix): Use type precision, not specific types.
5133 * c-common.c (c_common_reswords): Remove __int128 special case.
5134 (c_common_type_for_size): Check for all __intN types, not just
5136 (c_common_type_for_mode): Likewise.
5137 (c_common_signed_or_unsigned_type): Likewise.
5138 (c_build_bitfield_integer_type): Likewise.
5139 (c_common_nodes_and_builtins): Likewise.
5140 (keyword_begins_type_specifier): Likewise.
5141 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5144 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5146 * c-common.c: Use hash_table instead of hashtab.
5148 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5150 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5153 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5158 * c-common.c (warn_logical_operator): Punt for vectors.
5160 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5162 Implement SD-6: SG10 Feature Test Recommendations
5163 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5164 macros and the __has_header macro.
5166 2014-09-30 Jason Merrill <jason@redhat.com>
5168 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5169 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5170 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5172 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5173 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5175 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5176 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5178 2014-09-24 Marek Polacek <polacek@redhat.com>
5182 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5184 2014-09-23 Andi Kleen <ak@linux.intel.com>
5186 * c-common.c (handle_no_reorder_attribute): New function.
5187 (c_common_attribute_table): Add no_reorder attribute.
5189 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5191 * c-cppbuiltin.c (c_cpp_builtins): Define
5192 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5195 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5197 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5198 for supported floating-point modes.
5200 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5202 * c.opt (Wpsabi): Use LangEnabledBy.
5203 * c-opts.c (c_common_handle_option): Do not handle here.
5205 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5207 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5208 macros for floating-point modes.
5210 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5213 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5214 __*_DENORM_MIN__ without denormals.
5216 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5218 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5219 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5220 ubsan_create_data callers.
5221 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5222 index is constant or BIT_AND_EXPR with constant mask and is
5223 small enough for the bound.
5224 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5225 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5227 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5229 * c.opt: Add CppReason to various flags.
5230 (Wdate-time): Re-sort.
5231 * c-common.c: Include c-common.h earlier.
5232 (struct reason_option_codes_t): Delete.
5233 (c_option_controlling_cpp_error): Prefix global type and struct
5236 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5238 * c.opt (Wnormalized): New.
5239 (Wnormalized=): Use Enum and Reject Negative.
5240 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5242 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5244 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5245 digits of floating-point modes if -fbuilding-libgcc.
5247 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5249 * c-cppbuiltin.c (c_cpp_builtins): Also define
5250 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5251 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5252 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5253 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5254 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5255 __LIBGCC_STACK_GROWS_DOWNWARD__,
5256 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5257 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5258 __LIBGCC_DWARF_FRAME_REGISTERS__,
5259 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5260 __LIBGCC_STACK_POINTER_REGNUM__ and
5261 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5262 (builtin_define_with_value): Handle backslash-escaping in string
5265 2014-09-05 Richard Biener <rguenther@suse.de>
5268 * c-format.c (check_format_arg): Properly handle
5269 effectively signed POINTER_PLUS_EXPR offset.
5271 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5273 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5274 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5275 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5277 * c-opts.c (c_common_handle_option): Do not handle here.
5278 (sanitize_cpp_opts): Likewise.
5279 * c-common.c (struct reason_option_codes_t): Handle
5280 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5282 2014-09-03 Marek Polacek <polacek@redhat.com>
5284 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5286 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5287 Balaji V. Iyer <balaji.v.iyer@intel.com>
5288 Igor Zamyatin <igor.zamyatin@intel.com>
5290 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5291 * c-common.c (c_common_reswords): Added _Cilk_for.
5292 * c-common.h (enum rid): Added RID_CILK_FOR.
5293 (cilk_for_number_of_iterations): Add declaration.
5294 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5296 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5297 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5299 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5301 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5302 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5303 Wundef): Use CPP, Var and Init.
5304 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5306 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5308 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5309 * c-opts.c (c_common_handle_option): Do not handle here.
5311 2014-08-25 Jason Merrill <jason@redhat.com>
5313 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5314 -std=c++14 and -std=gnu++14, rather than the reverse.
5315 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5316 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5317 * c-common.h (cxx_dialect): Remove cxx1y.
5319 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5321 * c-common.h (enum cxx_dialect): Add cxx14.
5322 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5323 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5324 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5326 2014-08-22 Jason Merrill <jason@redhat.com>
5328 * c.opt (std=gnu++17): Fix alias.
5330 2014-08-22 Marek Polacek <polacek@redhat.com>
5333 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5334 check for vector types. Drop LHS argument.
5335 * c-common.h (warn_logical_not_parentheses): Adjust.
5337 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5339 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5340 (Wmultichar): Likewise.
5341 (Wdate-time): Use C-family languages instead of Common. Use CPP
5343 * c-opts.c (c_common_handle_option): Do not handle the above
5345 (sanitize_cpp_opts): Likewise.
5347 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5350 * c-opts.c: Include tree-diagnostics.h.
5351 (c_diagnostic_finalizer): New.
5352 (c_common_initialize_diagnostics): Use it.
5354 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5356 PR preprocessor/51303
5357 * c-common.c (struct reason_option_codes_t option_codes):
5358 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5360 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5364 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5365 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5366 (c_common_post_options): Call init_global_opts_from_cpp.
5367 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5369 2014-08-19 Marek Polacek <polacek@redhat.com>
5372 * c-common.c (maybe_warn_bool_compare): New function.
5373 * c-common.h (maybe_warn_bool_compare): Declare.
5374 * c.opt (Wbool-compare): New option.
5376 2014-08-19 Marek Polacek <polacek@redhat.com>
5378 * c.opt (Wc99-c11-compat): New option.
5380 2014-08-19 Marek Polacek <polacek@redhat.com>
5382 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5383 to warn_c90_c99_compat.
5384 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5387 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5388 Steven Bosscher <steven@gcc.gnu.org>
5391 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5392 format_check_results.
5393 (check_function_format): Use true and add comment for boolean
5395 (finish_dollar_format_checking): Use explicit location when warning.
5396 (check_format_info): Likewise.
5397 (check_format_arg): Set extra_arg_loc and format_string_loc.
5398 (check_format_info_main): Use explicit location when warning.
5399 (check_format_types): Pass explicit location.
5400 (format_type_warning): Likewise.
5402 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5405 * c-format.c: Handle Fortran flags.
5407 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5410 * array-notation-common.c (find_rank): Added handling for other
5411 types of references.
5413 2014-08-10 Marek Polacek <polacek@redhat.com>
5416 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5417 * c.opt (Wc90-c99-compat): Add option.
5419 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5421 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5423 2014-08-03 Marek Polacek <polacek@redhat.com>
5425 * c-common.c (check_case_value): Add location_t parameter. Use it.
5426 (c_add_case_label): Pass loc to check_case_value.
5428 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5430 * cilk.c: Use hash_map instead of pointer_map.
5432 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5434 * c-gimplify.c: Use hash_set instead of pointer_set.
5436 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5439 * array-notation-common.c (extract_array_notation_exprs): Handling
5442 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5444 * c-common.h (min_align_of_type): Removed prototype.
5445 * c-common.c (min_align_of_type): Removed.
5446 * c-ubsan.h (ubsan_maybe_instrument_reference,
5447 ubsan_maybe_instrument_member_call): New prototypes.
5448 * c-ubsan.c: Include stor-layout.h and builtins.h.
5449 (ubsan_maybe_instrument_reference_or_call,
5450 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5453 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5456 * c.opt (-Wreturn-local-addr): Move to common.opt.
5458 2014-07-30 Jason Merrill <jason@redhat.com>
5463 * c.opt (-fuse-all-virtuals): New.
5465 2014-07-30 Tom Tromey <tromey@redhat.com>
5468 * c.opt (Wdesignated-init): New option.
5469 * c-common.c (c_common_attribute_table): Add "designated_init".
5470 (handle_designated_init): New function.
5472 2014-07-24 Marek Polacek <polacek@redhat.com>
5475 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5477 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5479 PR preprocessor/60723 - missing system-ness marks for macro tokens
5480 * c-ppoutput.c (struct print::prev_was_system_token): New data
5482 (init_pp_output): Initialize it.
5483 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5484 (do_line_change): Return a flag saying if a line marker was
5486 (scan_translation_unit): Detect if the system-ness of the token we
5487 are about to emit is different from the one of the previously
5488 emitted token. If so, emit a line marker. Avoid emitting useless
5489 adjacent line markers. Avoid emitting line markers for tokens
5490 originating from the expansion of built-in macros.
5491 (scan_translation_unit_directives_only): Adjust.
5493 2014-07-15 Marek Polacek <polacek@redhat.com>
5495 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5496 TYPE_MAX_VALUE is NULL.
5498 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5501 * c.opt (Wmemset-transposed-args): New warning.
5503 2014-07-10 Jason Merrill <jason@redhat.com>
5507 * c.opt (-fuse-all-virtuals): New.
5509 2014-07-09 Richard Biener <rguenther@suse.de>
5512 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5513 using unsigned arithmetic if overflow does not wrap instead of
5514 if overflow is undefined.
5516 2014-07-06 Marek Polacek <polacek@redhat.com>
5519 * c.opt (Wsizeof-array-argument): New option.
5521 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5523 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5524 comments->count <= 1, as comments->entries might be NULL.
5526 2014-07-01 Marek Polacek <polacek@redhat.com>
5528 * c.opt (Wint-conversion): New option.
5530 2014-07-01 Marek Polacek <polacek@redhat.com>
5533 * c.opt (Wincompatible-pointer-types): New option.
5535 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5538 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5539 Do not discard TYPE_QUALS of type.
5541 2014-06-26 Jason Merrill <jason@redhat.com>
5543 * c-common.h (enum cxx_dialect): Add cxx1z.
5544 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5545 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5547 2014-06-26 Teresa Johnson <tejohnson@google.com>
5549 * c-common.h (get_dump_info): Declare.
5550 * c-gimplify.c (c_genericize): Use saved dump files.
5551 * c-opts.c (c_common_parse_file): Begin and end dumps
5552 once around parsing invocation.
5553 (get_dump_info): New function.
5555 2014-06-23 Marek Polacek <polacek@redhat.com>
5556 Andrew MacLeod <amacleod@redhat.com>
5559 * c-common.c (get_atomic_generic_size): Don't segfault if the
5560 type doesn't have a size.
5562 2014-06-20 Marek Polacek <polacek@redhat.com>
5564 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5565 (ubsan_walk_array_refs_r): New function.
5566 (c_genericize): Instrument array bounds.
5567 * c-ubsan.c: Include "internal-fn.h".
5568 (ubsan_instrument_division): Mark instrumented arrays as having
5569 side effects. Adjust ubsan_type_descriptor call.
5570 (ubsan_instrument_shift): Likewise.
5571 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5572 (ubsan_instrument_bounds): New function.
5573 (ubsan_array_ref_instrumented_p): New function.
5574 (ubsan_maybe_instrument_array_ref): New function.
5575 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5576 (ubsan_array_ref_instrumented_p): Declare.
5577 (ubsan_maybe_instrument_array_ref): Declare.
5579 2014-06-20 Hale Wang <hale.wang@arm.com>
5582 * c.opt (fshort-enums): Add to LTO.
5583 * c.opt (fshort-wchar): Likewise.
5585 2014-06-16 Marek Polacek <polacek@redhat.com>
5588 * c.opt (Wswitch-bool): Add Var.
5590 2014-06-12 Jakub Jelinek <jakub@redhat.com>
5593 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5594 #pragma omp target teams or
5595 #pragma omp {,target }teams distribute simd.
5597 2014-06-12 Jason Merrill <jason@redhat.com>
5599 * c.opt (Wabi=, fabi-compat-version): New.
5600 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5601 (c_common_post_options): Handle flag_abi_compat_version default.
5602 Disallow -fabi-compat-version=1.
5603 * c-common.h (abi_version_crosses): New.
5605 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
5607 * c-common.c (handle_section_attribute): Update handling for
5608 section names that are no longer trees.
5610 2014-06-10 Jakub Jelinek <jakub@redhat.com>
5613 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5614 (omp_pragmas): ... back here.
5616 2014-06-05 Marek Polacek <polacek@redhat.com>
5619 * c-common.c (warn_logical_not_parentheses): New function.
5620 * c-common.h (warn_logical_not_parentheses): Declare.
5621 * c.opt (Wlogical-not-parentheses): New option.
5623 2014-06-04 Marek Polacek <polacek@redhat.com>
5626 * c-common.c (check_case_bounds): Add location parameter.
5628 (c_add_case_label): Pass loc to check_case_bounds.
5630 2014-06-03 Marek Polacek <polacek@redhat.com>
5633 * c.opt (Wswitch-bool): New option.
5635 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5637 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5639 (record_types_used_by_current_var_decl): Move prototype to where
5642 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5643 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5644 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5646 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5648 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5649 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5651 * c-pretty-print.c (pp_c_void_constant): New function.
5652 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5653 (c_pretty_printer::expression): Handle VOID_CST.
5654 * cilk.c (extract_free_variables): Likewise.
5655 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5656 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5658 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5660 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5661 * c-pragma.c (push_alignment): Adjust.
5662 (handle_pragma_push_options): Likewise.
5664 2014-05-09 Marek Polacek <polacek@redhat.com>
5667 * c-common.c (check_user_alignment): Return -1 if alignment is error
5669 (handle_aligned_attribute): Don't call default_conversion on
5671 (handle_vector_size_attribute): Likewise.
5672 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5673 (handle_sentinel_attribute): Call default_conversion and allow even
5674 integral types as an argument.
5676 2014-05-08 Marek Polacek <polacek@redhat.com>
5679 * c-common.c (min_align_of_type): New function factored out from...
5680 (c_sizeof_or_alignof_type): ...here.
5681 * c-common.h (min_align_of_type): Declare.
5683 2014-05-08 Marek Polacek <polacek@redhat.com>
5686 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5687 parameter type of main.
5689 2014-05-07 DJ Delorie <dj@redhat.com>
5691 * c-cppbuiltin.c (print_bits_of_hex): New.
5692 (builtin_define_type_minmax): Print values using hex so as not to
5693 require a pre-computed list of string values.
5695 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5696 Mike Stump <mikestump@comcast.net>
5697 Richard Sandiford <rdsandiford@googlemail.com>
5699 * c-ada-spec.c: Include wide-int.h.
5700 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5701 (dump_generic_ada_node): Use wide-int interfaces.
5702 * c-common.c: Include wide-int-print.h.
5703 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5704 (pointer_int_sum): Use wide-int interfaces.
5705 (c_common_nodes_and_builtins): Use make_int_cst.
5706 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5707 (handle_alloc_size_attribute): Use wide-int interfaces.
5708 (get_nonnull_operand): Likewise.
5709 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5710 * c-lex.c: Include wide-int.h.
5711 (narrowest_unsigned_type): Take a widest_int rather than two
5713 (narrowest_signed_type): Likewise.
5714 (interpret_integer): Update accordingly. Use wide-int interfaces.
5715 (lex_charconst): Use wide-int interfaces.
5716 * c-pretty-print.c: Include wide-int.h.
5717 (pp_c_integer_constant): Use wide-int interfaces.
5718 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5719 INT_CST_LT_UNSIGNED.
5721 2014-05-06 Richard Biener <rguenther@suse.de>
5723 * c-opts.c (c_common_post_options): For -freestanding,
5724 -fno-hosted and -fno-builtin disable pattern recognition
5725 if not enabled explicitely.
5727 2014-05-02 Marek Polacek <polacek@redhat.com>
5729 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5731 2014-05-01 Marek Polacek <polacek@redhat.com>
5734 * c.opt (Wdiscarded-qualifiers): Add.
5736 2014-04-30 Marek Polacek <polacek@redhat.com>
5738 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5739 INT_MIN / -1 sanitization only for integer types.
5741 2014-04-25 Marek Polacek <polacek@redhat.com>
5744 * c-common.c (handle_noinline_attribute): Warn if the attribute
5745 conflicts with always_inline attribute.
5746 (handle_always_inline_attribute): Warn if the attribute conflicts
5747 with noinline attribute.
5749 2014-04-25 Marek Polacek <polacek@redhat.com>
5752 * c-common.c (check_main_parameter_types): Warn about variadic main.
5754 2014-04-24 Mike Stump <mikestump@comcast.net>
5756 * c.opt (Wshadow-ivar): Default to on.
5758 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5760 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5762 2014-04-23 Marek Polacek <polacek@redhat.com>
5764 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5766 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5769 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5770 if flag_sanitize_undefined_trap_on_error.
5771 (ubsan_instrument_division, ubsan_instrument_shift,
5772 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5773 if !flag_sanitize_recover.
5775 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
5778 * c-common.c (registered_builtin_types): Make non-static.
5779 * c-common.h (registered_builtin_types): Declare.
5781 2014-04-14 Richard Biener <rguenther@suse.de>
5782 Marc Glisse <marc.glisse@inria.fr>
5785 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5786 apply may-alias the scalar pointer type when applicable.
5788 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5791 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5792 as possible argument for Cilk_spawn.
5794 2014-04-11 Tobias Burnus <burnus@net-b.de>
5797 * c.opt (Wformat-signedness): Add
5798 * c-format.c(check_format_types): Use it.
5800 2014-04-11 Jason Merrill <jason@redhat.com>
5803 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5804 default_conversion for an array argument.
5806 2014-04-08 Marek Polacek <polacek@redhat.com>
5809 * c-ubsan.c: Include asan.h.
5810 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5812 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5814 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5816 2014-04-02 Marek Polacek <polacek@redhat.com>
5818 * c-common.h (c_expand_expr): Remove declaration.
5820 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5823 * c-common.c (add_atomic_size_parameter): When creating new
5824 params vector, push the size argument first.
5826 2014-03-26 Jakub Jelinek <jakub@redhat.com>
5828 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5829 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5830 ubsan_create_data callers.
5832 2014-03-22 Jakub Jelinek <jakub@redhat.com>
5835 * c-opts.c (c_finish_options): Restore cb_file_change call to
5838 2014-03-13 Jakub Jelinek <jakub@redhat.com>
5841 * c-pragma.c (apply_pragma_weak): Only look at
5842 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5843 DECL_ASSEMBLER_NAME_SET_P (decl).
5844 (maybe_apply_pending_pragma_weaks): Exit early if
5845 vec_safe_is_empty (pending_weaks) rather than only when
5847 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5848 set assembler name back to NULL afterwards.
5850 2014-03-11 Jason Merrill <jason@redhat.com>
5852 * c.opt: Add -std=gnu++14.
5854 2014-03-11 Ian Bolton <ian.bolton@arm.com>
5856 * c-opts.c (c_common_post_options): Don't override
5857 -ffp-contract=fast if unsafe-math-optimizations is on.
5859 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
5861 * c.opt: Enable LTO FE for fshort-double.
5863 2014-03-07 Jason Merrill <jason@redhat.com>
5865 * c.opt: Add -std=c++14.
5867 2014-03-06 Marek Polacek <polacek@redhat.com>
5870 * cilk.c (contains_cilk_spawn_stmt): New function.
5871 (contains_cilk_spawn_stmt_walker): Likewise.
5872 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5873 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5875 2014-03-03 Jakub Jelinek <jakub@redhat.com>
5877 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5878 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5879 even when flag_preprocess_only.
5881 2014-02-26 Jason Merrill <jason@redhat.com>
5885 * c-common.c (shorten_compare): Don't check
5886 c_inhibit_evaluation_warnings.
5888 2014-02-19 Jakub Jelinek <jakub@redhat.com>
5891 * c-common.c (c_common_nodes_and_builtins): When initializing
5892 c_uint{16,32,64}_type_node, also set corresponding
5893 uint{16,32,64}_type_node to the same value.
5896 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5897 for PRAGMA_IVDEP if flag_preprocess_only.
5899 2014-02-12 Jakub Jelinek <jakub@redhat.com>
5902 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5903 if false, add ADD itself, rather than vice versa.
5904 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5905 copy. For SAVE_EXPR, only call merge_tlist once.
5907 2014-02-08 Jakub Jelinek <jakub@redhat.com>
5910 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5912 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5914 (c_common_attribute_table): Add alloc_align and assume_aligned
5917 2014-02-06 Marek Polacek <polacek@redhat.com>
5920 * c-common.c (warn_for_sign_compare): Call warning_at with location
5923 2014-02-05 Marek Polacek <polacek@redhat.com>
5926 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5929 2014-02-04 Marek Polacek <polacek@redhat.com>
5932 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5935 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
5939 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5940 handle_vector_size_attribute, handle_nonnull_attribute): Call
5941 default_conversion on the attribute argument.
5942 (handle_nonnull_attribute): Increment the argument number.
5944 2014-01-31 Marek Polacek <polacek@redhat.com>
5947 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5948 build_function_call_vec.
5949 (resolve_overloaded_builtin): Likewise.
5950 * c-common.h (build_function_call_vec): Adjust declaration.
5952 2014-01-30 Marek Polacek <polacek@redhat.com>
5955 * c-common.h (unsafe_conversion_p): Adjust declaration.
5956 (warnings_for_convert_and_check): Likewise.
5957 (convert_and_check): Likewise.
5958 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5959 expansion_point_location_if_in_system_header on it.
5960 (warnings_for_convert_and_check): Add location parameter. Call
5961 expansion_point_location_if_in_system_header on it. Use it.
5962 (convert_and_check): Add location parameter. Use it.
5963 (conversion_warning): Likewise.
5964 (c_add_case_label): Adjust convert_and_check calls.
5965 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5967 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5969 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5971 * c-pragma.c (init_pragma): Likewise.
5974 2014-01-23 Marek Polacek <polacek@redhat.com>
5977 * c-common.c (shorten_compare): Add location_t parameter.
5978 * c-common.h (shorten_binary_op): Adjust declaration.
5980 2014-01-23 Marek Polacek <polacek@redhat.com>
5983 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5984 * c-common.h: Declare it.
5986 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5988 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5989 * c-ada-spec.c (dump_ads): Likewise.
5990 (cpp_check): Likewise.
5991 (dump_ada_specs): Likewise.
5993 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
5996 * c-common.c (handle_no_instrument_function_attribute): Allow
5997 no_instrument_function attribute in class member
5998 definition/declaration.
6000 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6003 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6004 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6005 being COMPOUND_EXPR.
6006 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6007 operand a SAVE_EXPR and second MODIFY_EXPR.
6009 2014-01-09 Jakub Jelinek <jakub@redhat.com>
6012 * c-pch.c (c_common_write_pch): Call
6013 prepare_target_option_nodes_for_pch.
6015 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6017 Update copyright years
6019 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6021 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6022 the copyright notice.
6024 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6026 * c-ada-spec.c (print_constructor): New function.
6027 (print_destructor): Retrieve the origin of the destructor.
6028 (print_ada_declaration): Revamp handling of constructors/destructors.
6030 2013-12-23 Stuart Hastings <stuart@apple.com>
6031 Bill Maddox <maddox@google.com>
6032 Jason Merrill <jason@redhat.com>
6034 * c.opt: Add -fdeclone-ctor-dtor.
6035 * c-opts.c (c_common_post_options): Default to on iff -Os.
6037 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6039 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6041 * c-pragma.h (enum pragma_cilk_clause): Remove.
6042 (enum pragma_omp_clause): Added the following fields:
6043 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6044 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6045 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6046 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6047 PRAGMA_CILK_CLAUSE_UNIFORM.
6050 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6052 * cilk.c (cilk_outline): Made this function non-static.
6053 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6054 (create_cilk_wrapper): Added a new parameter: a function pointer.
6055 (c_install_body_w_frame_cleanup): Remove
6056 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6057 * c-common.h (cilk_outline): New prototype.
6058 (gimplify_cilk_spawn): Removed two parameters.
6059 (cilk_install_body_with_frame_cleanup): New prototype.
6060 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6061 CILK_SPAWN_STMT case.
6063 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6065 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6067 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6068 (int_array_type_node): Remove.
6069 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6071 2013-12-05 Marek Polacek <polacek@redhat.com>
6074 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6075 [ADJUST_FIELD_ALIGN].
6077 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6080 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6081 and check field alignment if set.
6082 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6083 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6085 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6086 Marek Polacek <polacek@redhat.com>
6088 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6089 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6091 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6094 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6097 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6100 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6101 goto invalid. If it is error_mark_node, don't issue further
6104 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6106 * c.opt (Wopenmp-simd): New.
6108 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6110 * c-ubsan.h (ubsan_instrument_return): New prototype.
6111 * c-ubsan.c (ubsan_instrument_return): New function.
6113 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6115 * c-common.c: Add required include files from gimple.h.
6116 * c-gimplify.c: Likewise
6119 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6121 * c-common.c (unsafe_conversion_p): Remove use of
6122 EXPR_LOC_OR_HERE macro.
6123 (conversion_warning): Likewise.
6124 (warnings_for_convert_and_check): Likewise.
6125 (warn_for_collisions_1): Likewise.
6126 (shorten_compare): Likewise, and remove use of in_system_header
6127 macro, using the location from the former.
6128 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6129 (cb_def_pragma): Remove use of in_system_header macro.
6130 (lex_string): Likewise.
6131 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6133 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6134 Mike Stump <mikestump@comcast.net>
6135 Richard Sandiford <rdsandiford@googlemail.com>
6137 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6138 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6139 tree_fits_shwi_p or tree_fits_uhwi_p.
6140 (dump_generic_ada_node): Likewise.
6141 * c-format.c (check_format_arg): Likewise.
6142 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6144 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6146 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6148 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6151 * c-common.c (unsafe_conversion_p): Make this function
6152 return an enumeration with more detail.
6153 (conversion_warning): Use the new return type of
6154 unsafe_conversion_p to separately warn either about conversions
6155 that lower floating point number precision or about the other
6156 kinds of conversions.
6157 * c-common.h (enum conversion_safety): New enumeration.
6158 (unsafe_conversion_p): switching return type to
6159 conversion_safety enumeration.
6160 * c.opt: Adding new warning -Wfloat-conversion and
6161 enabling it with -Wconversion.
6163 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6165 * c-opts.c: Include plugin.h.
6166 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6168 2013-11-19 Marek Polacek <polacek@redhat.com>
6170 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6172 (ubsan_instrument_shift): Likewise.
6173 (ubsan_instrument_vla): Likewise.
6175 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6177 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6178 cast to unsigned type.
6180 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6182 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6184 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6185 rather than tree_low_cst.
6187 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6189 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6190 tree_to_uhwi throughout.
6192 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6194 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6195 tree_low_cst (..., 0) with tree_to_shwi throughout.
6197 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6199 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6200 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6202 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6204 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6205 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6207 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6209 * c-cilkplus.c: New file.
6210 * c-common.c (readonly_error): Add location argument.
6211 * c-common.h (readonly_error): Same.
6212 (c_finish_cilk_clauses): Protoize.
6213 (c_check_cilk_loop): Same.
6214 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6215 Do not fail on error_mark_node.
6216 Abstract increment canonicalization to here...
6217 (c_omp_for_incr_canonicalize_ptr): New.
6218 c-pragma.c (init_pragma): Register "simd" pragma.
6219 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6220 (enum pragma_cilk_clause): New.
6222 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6224 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6225 wchar_type and host_integerp checks.
6227 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6229 * c-common.c: Likewise.
6230 * c-gimplify.c: Likewise.
6233 2013-11-14 Diego Novillo <dnovillo@google.com>
6235 * c-common.c: Include fold-const.h.
6236 Include stor-layout.h.
6238 Include stringpool.h.
6241 Include trans-mem.h.
6242 * c-cppbuiltin.c: Include stor-layout.h.
6243 Include stringpool.h.
6244 * c-format.c: Include stringpool.h.
6245 * c-lex.c: Include stringpool.h.
6246 Include stor-layout.h.
6247 * c-pragma.c: Include stringpool.h.
6250 Include gcc-symtab.h.
6251 * c-pretty-print.c: Include stor-layout.h.
6253 * cilk.c: Include stringpool.h.
6256 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6258 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6259 * c-common.c (c_common_reswords): Add __auto_type.
6260 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6262 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6264 * c-common.c: Include gimplify.h.
6265 * c-gimplify.c: Likewise.
6267 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6268 * c-ubsan.c: Don't include gimple.h.
6270 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6272 * c-common.c (c_common_reswords): Add _Thread_local.
6274 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6276 * c-common.c (atomic_size_supported_p): New function.
6277 (resolve_overloaded_atomic_exchange)
6278 (resolve_overloaded_atomic_compare_exchange)
6279 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6280 Use it instead of comparing size with a local list of sizes.
6282 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6283 Joseph Myers <joseph@codesourcery.com>
6285 * c-common.h (enum rid): Add RID_ATOMIC.
6286 * c-common.c (c_common_reswords): Add _Atomic.
6287 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6288 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6289 * c-format.c (check_format_types): Check for extra _Atomic
6290 qualifiers in format argument.
6291 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6292 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6294 2013-11-06 Tobias Burnus <burnus@net-b.de>
6296 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6298 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6300 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6302 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6303 to mean lack of IEEE 754 support.
6305 2013-11-05 Tobias Burnus <burnus@net-b.de>
6307 * c.opt (-Wdate-time): New option
6308 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6310 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6312 * c-cppbuiltin.c (cpp_iec_559_value): Test
6313 flag_excess_precision_cmdline not flag_excess_precision.
6315 2013-11-05 Tobias Burnus <burnus@net-b.de>
6317 * c.opt (fopenmp-simd): New option.
6318 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6319 (omp_pragmas): ... this new struct.
6320 (c_pp_lookup_pragma): Also walk omp_pragmas.
6321 (init_pragma): Init pragmas for -fopenmp-simd.
6323 2013-11-04 Marek Polacek <polacek@redhat.com>
6326 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6328 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6330 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6332 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6334 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6336 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6337 (dump_ada_specs): Adjust prototype of second callback.
6338 * c-ada-spec.c (cpp_check): New global variable.
6339 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6340 (print_generic_ada_decl): Likewise.
6341 (has_static_fields): Change return type to bool and add guard.
6342 (has_nontrivial_methods): New predicate.
6343 (is_tagged_type): Change return type to bool.
6344 (separate_class_package): Call has_nontrivial_methods.
6345 (pp_ada_tree_identifier): Minor tweaks.
6346 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6347 (dump_ada_array_domains): Likewise.
6348 (dump_ada_array_type): Likewise.
6349 (dump_template_types): Remove cpp_check parameter and do not pass it to
6350 dump_generic_ada_node.
6351 (dump_ada_template): Likewise.
6352 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6354 (print_ada_methods): Change return type to integer. Remove cpp_check
6355 parameter and do not pass it down.
6356 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6357 dump_generic_ada_node.
6358 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6360 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6361 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6362 value of print_ada_methods.
6363 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6364 Set cpp_check to it before invoking dump_ada_nodes.
6365 (dump_ada_specs): Likewise.
6367 2013-11-03 Marek Polacek <polacek@redhat.com>
6369 * c-ubsan.c: Don't include hash-table.h.
6370 (ubsan_instrument_vla): New function.
6371 * c-ubsan.h: Declare it.
6373 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6375 Automated part of renaming of symtab_node_base to symtab_node.
6377 Patch autogenerated by rename_symtab.py from
6378 https://github.com/davidmalcolm/gcc-refactoring-scripts
6379 revision 58bb219cc090b2f4516a9297d868c245495ee622
6381 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6382 symtab_node_base to symtab_node.
6384 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6386 Implement C++14 digit separators.
6387 * c-lex.c (interpret_float): Remove digit separators from scratch string
6388 before building real literal.
6390 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6392 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6394 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6396 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6398 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6400 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6401 (insert_cilk_frame): New prototype.
6402 (cilk_init_builtins): Likewise.
6403 (gimplify_cilk_spawn): Likewise.
6404 (c_cilk_install_body_w_frame_cleanup): Likewise.
6405 (cilk_detect_spawn_and_unwrap): Likewise.
6406 (cilk_set_spawn_marker): Likewise.
6407 (build_cilk_sync): Likewise.
6408 (build_cilk_spawn): Likewise.
6411 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6413 Patch autogenerated by refactor_symtab.py from
6414 https://github.com/davidmalcolm/gcc-refactoring-scripts
6415 revision 58bb219cc090b2f4516a9297d868c245495ee622
6417 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6418 to a true class hierarchy.
6419 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6421 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6423 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6425 2013-10-26 Jeff Law <law@redhat.com>
6427 * c-common.c (c_define_builtins): Remove mudflap support.
6428 * c.opt: Ignore and warn for mudflap options.
6430 2013-10-24 Tobias Burnus <burnus@net-b.de>
6433 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6434 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6436 2013-10-23 Jason Merrill <jason@redhat.com>
6438 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6440 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6442 * c-common.h (omp_clause_mask::operator !=): New method.
6443 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6444 instead of if (mask & something) tests everywhere.
6446 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6447 201307 instead of 201107.
6448 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6449 (c_common_attribute_table): Add "omp declare target" and
6450 "omp declare simd" attributes.
6451 (handle_omp_declare_target_attribute,
6452 handle_omp_declare_simd_attribute): New functions.
6453 * c-omp.c: Include c-pragma.h.
6454 (c_finish_omp_taskgroup): New function.
6455 (c_finish_omp_atomic): Add swapped argument, if true,
6456 build the operation first with rhs, lhs arguments and use NOP_EXPR
6458 (c_finish_omp_for): Add code argument, pass it down to make_code.
6459 (c_omp_split_clauses): New function.
6460 (c_split_parallel_clauses): Removed.
6461 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6462 c_omp_declare_simd_clauses_to_decls): New functions.
6463 * c-common.h (omp_clause_mask): New type.
6464 (OMP_CLAUSE_MASK_1): Define.
6465 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6466 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6467 omp_clause_mask::operator |, omp_clause_mask::operator &,
6468 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6469 omp_clause_mask::operator ==): New methods.
6470 (enum c_omp_clause_split): New.
6471 (c_finish_omp_taskgroup): New prototype.
6472 (c_finish_omp_atomic): Add swapped argument.
6473 (c_finish_omp_for): Add code argument.
6474 (c_omp_split_clauses): New prototype.
6475 (c_split_parallel_clauses): Removed.
6476 (c_omp_declare_simd_clauses_to_numbers,
6477 c_omp_declare_simd_clauses_to_decls): New prototypes.
6478 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6479 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6480 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6481 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6482 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6483 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6484 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6485 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6486 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6487 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6488 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6489 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6490 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6491 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6492 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6493 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6494 PRAGMA_OMP_CLAUSE_UNIFORM.
6496 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6498 PR tree-optimization/20318
6499 * c-common.c (handle_returns_nonnull_attribute): New function.
6500 (c_common_attribute_table): Add returns_nonnull.
6502 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6505 * c.opt (fcheck-new): Move to common.opt.
6507 2013-09-25 Marek Polacek <polacek@redhat.com>
6508 Jakub Jelinek <jakub@redhat.com>
6511 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6512 an expression if we can prove it is correct.
6513 (ubsan_instrument_division): Likewise. Remove unnecessary
6516 2013-09-18 Marek Polacek <polacek@redhat.com>
6519 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6521 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6523 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6526 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6527 fobjc-gc, freplace-objc-classes): Accept for LTO.
6529 2013-09-13 Jacek Caban <jacek@codeweavers.com>
6531 * c-target.def: New hook
6533 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6536 * c.opt (Wdelete-incomplete): Add.
6538 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6540 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6541 (vector_types_compatible_elements_p): New function.
6542 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6544 (vector_types_compatible_elements_p): Declare.
6546 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6548 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6549 a virtual member function.
6550 (pp_simple_type_specifier): Remove.
6551 (pp_c_type_specifier): Likewise.
6552 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6553 Rename from pp_c_type_specifier. Adjust.
6554 (c_pretty_printer::c_pretty_printer): Do not assign to
6555 simple_type_specifier.
6557 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6559 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6561 (c_pretty_printer::storage_class_specifier): Likewise.
6562 (c_pretty_printer::initializer): Likewise.
6563 (pp_declaration): Remove.
6564 (pp_declaration_specifiers): Likewise.
6565 (pp_abstract_declarator): Likewise.
6566 (pp_declarator): Likewise.
6567 (pp_type_id): Likewise.
6568 (pp_statement): Likewise.
6569 (pp_constant): Likewise.
6570 (pp_id_expression): Likewise.
6571 (pp_primary_expression): Likewise.
6572 (pp_unary_expression): Likewise.
6573 (pp_multiplicative_expression): Likewise.
6574 (pp_conditional_expression): Likewise.
6575 (pp_assignment_expression): Likewise.
6576 (pp_expression): Likewise.
6577 (pp_c_type_id): Likewise.
6578 (pp_c_storage_class_specifier): Likewise.
6579 * c-pretty-print.c (pp_c_type_cast): Tidy.
6580 (pp_c_pointer): Likewise.
6581 (pp_c_type_specifier): Likewise.
6582 (pp_c_parameter_type_list): Likewise.
6583 (pp_c_function_definition): Likewise.
6584 (pp_c_init_declarator): Likewise.
6585 (pp_c_initializer_list): Likewise.
6586 (pp_c_constructor_elts): Likewise.
6587 (c_pretty_printer::direct_abstract_declarator): Likewise.
6588 (c_pretty_printer::declaration_specifiers): Likewise.
6589 (c_pretty_printer::primary_expression): Likewise.
6590 (c_pretty_printer::postfix_expression): Likewise.
6591 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6592 (c_pretty_printer::storage_class_specifier): Rename from
6593 pp_c_storage_class_specifier.
6594 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6595 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6596 storage_class_specifier, initializer, offset_list, flags.
6598 2013-08-30 Marek Polacek <polacek@redhat.com>
6600 * c-ubsan.c: New file.
6601 * c-ubsan.h: New file.
6603 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6605 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6607 (c_pretty_printer::declaration_specifiers): Likewise.
6608 (c_pretty_printer::declarator): Likewise.
6609 (c_pretty_printer::abstract_declarator): Likewise.
6610 (c_pretty_printer::direct_abstract_declarator): Likewise.
6611 (c_pretty_printer::direct_declarator): Likewise.
6612 (c_pretty_printer::function_specifier): Likewise.
6613 (pp_declaration): Adjust.
6614 (pp_declaration_specifiers): Likewise.
6615 (pp_abstract_declarator): Likewise.
6616 (pp_direct_declarator): Likewise.
6617 (pp_function_specifier): Likewise.
6618 (pp_direct_abstract_declarator): Remove as unused.
6619 (pp_c_declaration): Remove.
6620 (pp_c_declaration_specifiers): Likewise.
6621 (pp_c_declarator): Likewise.
6622 (pp_c_direct_declarator): Likewise.
6623 (pp_c_function_specifier): Likewise.
6624 (pp_c_direct_abstract_declarator): Likewise.
6625 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6626 from pp_c_abstract_declarator. Adjust.
6627 (c_pretty_printer::direct_abstract_declarator): Rename from
6628 pp_c_direct_abstract_declarator. Adjust.
6629 (c_pretty_printer::function_specifier): Rename from
6630 pp_c_function_specifier. Adjust.
6631 (c_pretty_printer::declaration_specifiers): Rename from
6632 pp_c_declaration_specifiers. Adjust.
6633 (c_pretty_printer::direct_declarator): Rename from
6634 pp_c_direct_declarator. Adjust.
6635 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6636 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6637 (c_pretty_printer::c_pretty_printer): Do not assign to
6638 declaration, declaration_specifiers, declarator,
6639 direct_declarator, direct_abstract_declarator, function_specifier.
6641 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6643 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6644 virtual member function.
6645 (c_pretty_printer::multiplicative_expression): Likewise.
6646 (c_pretty_printer::conditional_expression): Likewise.
6647 (c_pretty_printer::assignment_expression): Likewise.
6648 (c_pretty_printer::expression): Likewise.
6649 (pp_unary_expression): Adjust.
6650 (pp_multiplicative_expression): Likewise.
6651 (pp_assignment_expression): Likewise.
6652 (pp_conditional_expression): Likewise.
6653 (pp_expression): Likewise.
6654 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6655 from pp_c_unary_expression. Adjust.
6656 (c_pretty_printer::multiplicative_expression): Rename from
6657 pp_c_multiplicative_expression. Adjust.
6658 (c_pretty_printer::conditional_expression): Rename from
6659 pp_c_conditional_expression. Adjust.
6660 (c_pretty_printer::assignment_expression): Rename from
6661 pp_c_assignment_expression. Adjust.
6662 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6663 (c_pretty_printer::c_pretty_printer): Do not assign to
6664 unary_expression, multiplicative_expression,
6665 conditional_expression, expression.
6667 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6669 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6670 virtual member function.
6671 (pp_postfix_expression): Adjust.
6672 (pp_c_postfix_expression): Remove.
6673 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6674 from pp_c_postfix_expression. Adjust.
6675 (c_pretty_printer::c_pretty_printer): Do not assign to
6678 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6680 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6681 virtua member function.
6682 (pp_primary_expression): Adjust.
6683 (pp_c_primary_expression): Remove.
6684 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6685 from pp_c_primary_expression. Adjust.
6686 (pp_c_initializer_list): Use pp_primary_expression.
6687 (c_pretty_printer::c_pretty_printer): Do not assign to
6690 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6692 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6693 * c-pretty-print.c (M_): Remove.
6694 (c_pretty_printer::translate_string): Define.
6695 (pp_c_type_specifier): Use it.
6696 (pp_c_primary_expression): Likewise.
6697 (pp_c_expression): Likewise.
6699 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6701 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6703 (pp_c_id_expression): Remove.
6704 (pp_id_expression): Adjust.
6705 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6706 pp_c_id_expression. Adjust.
6707 (pp_c_postfix_expression): Use pp_id_expression.
6708 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6710 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6712 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6714 (pp_constant): Adjust.
6715 (pp_c_constant): Remove.
6716 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6717 pp_c_constant. Adjust.
6719 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6720 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6722 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6724 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6725 (c_pretty_printer::c_pretty_printer): Declare.
6726 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6727 c_pretty_printer_init. Adjust.
6728 (print_c_tree): Do not call c_pretty_printer_init.
6729 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6731 2013-08-09 Arnaud Charlet <charlet@adacore.com>
6733 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6735 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6738 * c-common.c (pointer_int_sum): Add bool parameter.
6739 * c-common.h (pointer_int_sum): Adjust declaration.
6741 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6743 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6744 c_pretty_printer variable.
6746 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6748 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6750 (pp_c_base): Likewise. Adjust users.
6751 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6752 (pp_c_whitespace): Do not call pp_base.
6753 (pp_c_left_paren): Likewise.
6754 (pp_c_right_paren): Likewise.
6755 (pp_c_left_brace): Likewise.
6756 (pp_c_right_brace): Likewise.
6757 (pp_c_left_bracket): Likewise.
6758 (pp_c_right_bracket): Likewise.
6759 (pp_c_dot): Likewise.
6760 (pp_c_ampersand): Likewise.
6761 (pp_c_star): Likewise.
6762 (pp_c_arrow): Likewise.
6763 (pp_c_semicolon): Likewise.
6764 (pp_c_complement): Likewise.
6765 (pp_c_exclamation): Likewise.
6766 (pp_c_direct_declarator): Likewise.
6767 (pp_c_ws_string): Likewise.
6768 (pp_c_identifier): Likewise.
6769 (pp_c_statement): Likewise.
6770 (print_c_tree): Likewise.
6772 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6775 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6776 provide useful error strings.
6778 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6780 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6781 printer functions instead of pp_string or operators and punctuators.
6782 (dump_generic_ada_node): Likewise.
6783 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6784 (pp_c_relational_expression): Likewise.
6785 (pp_c_logical_or_expression): Likewise.
6787 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6789 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6790 functions instead of pp_character.
6791 (pp_ada_tree_identifier): Likewise.
6792 (dump_ada_double_name): Likewise.
6793 (dump_ada_function_declaration): Likewise.
6794 (dump_ada_array_domains): Likewise.
6795 (dump_template_types): Likewise.
6796 (dump_generic_ada_node): Likewise.
6797 (print_ada_declaration): Likewise.
6798 (print_ada_struct_decl): Likewise.
6799 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6801 2013-07-23 Tom Tromey <tromey@redhat.com>
6803 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6804 * c-common.c (c_common_reswords): Add _Generic.
6806 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
6808 * c-common.c: Fix typos.
6809 * c-common.h: Likewise.
6811 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
6814 * c-common.c (c_common_attribute_table): Add warn_unused.
6815 (handle_warn_unused_attribute): New.
6817 2013-07-10 Jakub Jelinek <jakub@redhat.com>
6819 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6820 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6822 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6825 * c.opt: Add Wconditionally-supported.
6827 2013-07-08 Graham Stott <graham.stott@btinternet.com>
6829 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6830 unused variables l_length and l_node.
6832 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6835 * c-common.c (complete_array_type): Delay folding first index
6836 like other indices. When folding, check for index overflow.
6838 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
6841 * c-common.h (c_build_vec_perm_expr): New complain argument.
6842 * c-common.c (c_build_vec_perm_expr): Likewise.
6843 Use save_expr also in C++.
6845 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6847 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6848 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6849 * c-opts.c (c_common_post_options): Likewise.
6851 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6853 * array-notation-common.c (length_mismatch_in_expr): Changed the
6854 parameter type's from a dynamic array to a vec_tree. Also removed
6855 the size parameters.
6856 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6859 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6861 * c-common.h (struct cilkplus_an_parts): New structure.
6862 (struct cilkplus_an_loop_parts): Likewise.
6863 (cilkplus_extract_an_triplets): New prototype.
6864 (fix_sec_implicit_args): Likewise.
6865 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6866 (fix_sec_implicit_args): Likewise.
6868 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6870 * array-notation-common.c (find_inv_trees): Removed an unwanted
6872 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6873 enum rid to enum tree_code.
6875 2013-06-11 Jan Hubicka <jh@suse.cz>
6877 * c-common.c (handle_alias_ifunc_attribute): Do not set
6878 DECL_EXTERNAL for weakref variables.
6879 * c-pragma.c (handle_pragma_weak): Make sure aliases
6880 are not declared as external.
6882 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6884 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6885 function from c/c-array-notation.c.
6886 (is_cilkplus_reduce_builtin): Likewise.
6887 (find_rank): Likewise.
6888 (extract_array_notation_exprs): Likewise.
6889 (replace_array_notations): Likewise.
6890 (find_inv_trees): Likewise.
6891 (replace_inv_trees): Likewise.
6892 (contains_array_notation_expr): Likewise.
6893 (find_correct_array_notation_type): Likewise.
6894 * c-common.h (struct inv_list): Moved this struct from the file
6895 c/c-array-notation.c and added a new field called additional tcodes.
6896 (length_mismatch_in_expr_p): New prototype.
6897 (is_cilkplus_reduce_builtin): Likewise.
6898 (find_rank): Likewise.
6899 (extract_array_notation_exprs): Likewise.
6900 (replace_array_notation): Likewise.
6901 (find_inv_trees): Likewise.
6902 (replace_inv_trees): Likewise.
6903 (find_correct_array_notation_type): Likewise.
6905 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6907 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6908 function array_notation_init_builtins is called.
6909 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6910 * c-common.def (ARRAY_NOTATION_REF): New tree.
6911 * c-common.h (build_array_notation_expr): New function declaration.
6912 (build_array_notation_ref): Likewise.
6913 (extract_sec_implicit_index_arg): New extern declaration.
6914 (is_sec_implicit_index_fn): Likewise.
6915 (ARRAY_NOTATION_CHECK): New define.
6916 (ARRAY_NOTATION_ARRAY): Likewise.
6917 (ARRAY_NOTATION_START): Likewise.
6918 (ARRAY_NOTATION_LENGTH): Likewise.
6919 (ARRAY_NOTATION_STRIDE): Likewise.
6920 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6922 (pp_c_expression): Likewise.
6923 * c.opt (flag_enable_cilkplus): New flag.
6924 * array-notation-common.c: New file.
6926 2013-05-14 Jakub Jelinek <jakub@redhat.com>
6929 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6931 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
6933 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6936 2013-05-07 Han Shen <shenhan@google.com>
6938 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6940 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6942 * c-common.c (check_user_alignment): Emit error for negative values.
6944 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6946 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6948 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6950 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6951 __GXX_EXPERIMENTAL_CXX1Y__.
6953 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6954 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6956 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6957 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6958 to simply use OPT_Wpointer_arith.
6959 (c_sizeof_or_alignof_type): Likewise.
6961 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6963 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6965 2013-04-12 Jakub Jelinek <jakub@redhat.com>
6967 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6968 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6971 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6973 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6975 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6977 * c-common.c (pointer_int_sum): Remove dead code.
6979 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6982 * c-common.c (handle_optimize_attribute): Don't call
6983 save_optabs_if_changed.
6985 2013-03-05 Jakub Jelinek <jakub@redhat.com>
6988 * c-pch.c (pch_init): Free target_validity at the end.
6990 2013-03-04 Jakub Jelinek <jakub@redhat.com>
6992 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6994 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6995 Jakub Jelinek <jakub@redhat.com>
6998 * c-common.c (handle_no_sanitize_address_attribute): New function.
6999 (c_common_attribute_table): Add no_sanitize_address attribute.
7000 (handle_no_address_safety_analysis_attribute): Add
7001 no_sanitize_address attribute, not no_address_safety_analysis
7004 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
7007 * c-common.c (handle_optimize_attribute): Call
7008 save_optabs_if_changed.
7010 2013-02-18 Jakub Jelinek <jakub@redhat.com>
7011 Steven Bosscher <steven@gcc.gnu.org>
7014 * c-opts.c (c_common_post_options): If debug info is enabled
7015 and non-dwarf*, refuse to load PCH files and when writing PCH
7018 2013-02-05 Jakub Jelinek <jakub@redhat.com>
7021 * c-common.c (handle_error_attribute): Fix condition.
7023 2013-01-30 Jakub Jelinek <jakub@redhat.com>
7026 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7028 2013-01-18 Jason Merrill <jason@redhat.com>
7031 * c.opt (-fextern-tls-init): New.
7032 * c-opts.c (c_common_post_options): Handle it.
7034 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7037 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7038 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7039 and is either negative or bigger or equal to type precision
7040 of the first operand.
7042 2012-12-03 Marek Polacek <polacek@redhat.com>
7045 * c-common.c (check_user_alignment): Swap order of tests,
7046 check TREE_CODE first.
7048 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7051 * c-common.h (overflow_type): New enum.
7052 (build_userdef_literal): Add overflow_type argument.
7053 (tree_userdef_literal): Add overflow_type.
7054 (USERDEF_LITERAL_OVERFLOW): New access macro.
7055 * c-common.c (build_userdef_literal): Add overflow_type
7057 * c-lex.c (c_lex_with_flags): Add overflow_type to
7058 build_userdef_literal calls.
7059 (interpret_integer, interpret_float): Add overflow_type argument.
7061 2012-11-28 Richard Biener <rguenther@suse.de>
7064 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7065 here and use a type with proper overflow behavior for types that would
7066 need to be promoted for the arithmetic.
7068 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7071 * c-common.c (handle_no_address_safety_analysis_attribute): New
7073 (c_common_attribute_table): Add no_address_safety_analysis.
7075 2012-11-16 Simon Baldwin <simonb@google.com>
7077 * c.opt: Add f[no-]canonical-system-headers.
7078 * c-opts.c (c_common_handle_option): Handle
7079 OPT_fcanonical_system_headers.
7081 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7084 * c-opts.c (c_common_handle_option): Set new flags.
7085 * c.opt: Describe new flags.
7087 2012-11-09 Jason Merrill <jason@redhat.com>
7089 * c.opt (Wabi-tag): New.
7091 2012-11-09 Andi Kleen <ak@linux.intel.com>
7094 * c-common.c (get_atomic_generic_size): Mask with
7097 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7100 * c.opt (Wformat): Make it Alias Wformat=1.
7101 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7102 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7104 (Wformat=): RejectNegative. Use LangEnabledBy.
7105 (Wnonnull): Use LangEnabledBy.
7106 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7107 * c-format.c (set_Wformat): Delete.
7108 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7109 (maybe_read_dollar_number): Likewise.
7110 (avoid_dollar_number): Likewise.
7111 (finish_dollar_format_checking): Likewise.
7112 (check_format_info): Likewise.
7113 (check_format_info_main): Likewise.
7114 (check_format_types): Likewise.
7115 (format_type_warning): Likewise.
7116 * c-common.c (int): Likewise.
7117 (check_function_sentinel): Likewise.
7118 * c-common.h (warn_format,set_Wformat): Do not declare here.
7120 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7123 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7124 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7126 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7128 (Wvariadic-macros): Init(1).
7129 * c-opts.c (c_common_handle_option): Do not handle them
7131 (c_common_post_options): Likewise.
7132 (sanitize_cpp_opts): warn_unused_macros is now
7133 cpp_warn_unused_macros.
7134 (push_command_line_include): Likewise.
7135 * c-common.c (warn_unknown_pragmas): Do not define.
7136 * c-common.h (warn_unknown_pragmas): Do not declare.
7138 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7141 * c-common.c (conversion_warning): Handle conditional expressions.
7143 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7146 * c.opt (Wreturn_local_addr): Define new option.
7148 2012-10-25 Jason Merrill <jason@redhat.com>
7150 * c.opt (Wvirtual-move-assign): New.
7152 * c.opt (Winherited-variadic-ctor): New.
7154 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7157 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7159 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7161 * c-common.h (pch_cpp_save_state): Declare.
7162 * c-target.def (c_preinclude): New hook.
7163 * c-opts.c (done_preinclude): New.
7164 (push_command_line_include): Handle default preincluded header.
7165 (cb_file_change): Call pch_cpp_save_state when calling
7166 push_command_line_include.
7167 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7168 (pch_cpp_save_state): New.
7169 (pch_init): Call pch_cpp_save_state conditionally, instead of
7170 calling cpp_save_state.
7172 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7176 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7177 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7178 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7179 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7180 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7181 * c-opts.c (c_common_handle_option): Remove explicit handling from
7183 (c_common_post_options): Likewise.
7185 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7187 * c-ada-spec.c (LOCATION_COL): Delete.
7188 (compare_location): New function.
7189 (compare_node): Use it.
7190 (compare_comment): Likewise.
7192 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7196 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7197 * c-opts.c (c_common_handle_option): Do not set them here. Add
7199 (c_common_post_options): Likewise.
7201 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7203 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7204 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7205 Remove POINTER_TYPE handling, add large unsigned handling and use
7206 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7208 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7211 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7212 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7213 locs and array of 3 trees instead of just single loc and single
7214 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7215 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7216 For *cmp* builtins that take two sources strings report warnings
7217 about first and second source, not about destination and source.
7219 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7222 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7224 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7226 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7227 declaring something coming from another file.
7229 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7232 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7234 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7237 * c-common.c (warn_about_parentheses): Add location_t parameter;
7238 use EXPR_LOC_OR_LOC.
7239 * c-common.h: Update declaration.
7241 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7244 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7245 more operations. Make error messages optional.
7246 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7247 (scalar_to_vector): Declare.
7249 2012-10-08 Jason Merrill <jason@redhat.com>
7251 * c-common.c (c_common_reswords): Add thread_local.
7253 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7255 PR c++/53528 C++11 attribute support
7256 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7258 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7260 (handle_aligned_attribute): In choose strictest alignment
7261 among many. Use new check_cxx_fundamental_alignment_constraints.
7262 (handle_transparent_union_attribute): In c++11 attribute syntax,
7263 don't look through typedefs.
7265 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7267 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7268 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7271 2012-09-25 Dehao Chen <dehao@google.com>
7274 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7275 map when read in the pch.
7277 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7279 * c-ada-spec.c: Style fixes.
7281 2012-09-18 Thomas Quinot <quinot@adacore.com>
7283 * c.opt (-fada-spec-parent): Define new command line switch.
7284 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7285 is specified, generate binding spec as a child of the specified unit.
7287 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7288 Manuel López-Ibáñez <manu@gcc.gnu.org>
7291 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7293 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7295 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7296 for pointers, and add missing Convention C pragma.
7297 (print_ada_struct_decl): Add missing aliased keyword.
7298 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7300 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7302 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7303 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7304 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7305 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7306 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7308 2012-08-10 Richard Guenther <rguenther@suse.de>
7310 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7312 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7314 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7315 instead of separate pp_newline and pp_flush.
7316 (print_c_tree): Likewise.
7318 2012-07-26 Richard Henderson <rth@redhat.com>
7320 * c-common.c (handle_hot_attribute): Allow labels.
7321 (handle_cold_attribute): Likewise.
7323 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7326 * c-common.c (check_function_nonnull): Handle multiple nonnull
7327 attributes properly.
7329 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7331 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7332 * c-ada-spec.c: Likewise.
7333 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7335 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7337 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7338 Remove code conditional on it.
7340 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7342 * c-gimplify.c: Do not include basic-block.h.
7343 * c-common.c: Do not include linfuncs.h.
7345 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7347 * c-common.h: Include tree.h.
7349 2012-07-02 Jason Merrill <jason@redhat.com>
7352 * c-common.c (get_priority): Call default_conversion.
7354 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7356 * c-pch.c (c_common_write_pch): Remove unused variables.
7358 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7360 * cppspec.c: Moved from gcc/ to here.
7362 2012-06-27 Kai Tietz <ktietz@redhat.com>
7364 PR preprocessor/37215
7365 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7367 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7369 * c-common.h (c_common_print_pch_checksum): Remove.
7370 * c-pch.c: Do not include output.h.
7371 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7372 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7373 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7374 (struct c_pch_header): Remove.
7375 (get_ident): Update gpch version.
7376 (pch_init): Do not print executable_checksum to asm_out_file.
7377 Do not fail if there is no asm_out_file to read back from. Set
7378 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7379 (c_common_write_pch): Verify that nothing was written to asm_out_file
7380 since pch_init was called. Do not write a c_pch_header, and do not
7381 copy from asm_out_file to the PCH.
7382 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7383 the content of asm_out_file from the PCH.
7384 (c_common_print_pch_checksum): Remove.
7385 * c-opts.c (c_common_init): Print out executable_checksum directly.
7387 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7389 * c-target.def (objc_declare_unresolved_class_reference,
7390 objc_declare_class_definition): Add new hooks.
7392 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7394 * c-lex.c: Do not include output.h.
7395 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7396 Remove uses of ASM_OUTPUT_IDENT.
7398 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7401 * c-common.h (c_build_vec_perm_expr): Move decl here.
7402 * c-common.c (c_build_vec_perm_expr): Move definition
7405 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7407 * c.opt (fconserve-space): Turn into a no-op.
7409 2012-06-04 Sterling Augustine <saugustine@google.com>
7411 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7412 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7413 both the start and end of the function.
7415 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7417 * c-common.c: Do not include output.h.
7418 * c-pragma.c: Likewise.
7420 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7422 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7423 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7424 (lang_decl_name): Handle namespace decls.
7426 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7428 * c-ada-spec.c: Do not include output.h.
7429 * c-semantics.c: Likewise.
7431 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7433 * c-common.c: Fix typo.
7435 2012-05-29 Michael Matz <matz@suse.de>
7437 * c-common.h (c_expand_decl): Remove prototype.
7439 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7441 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7442 * c-opts.c (c_common_handle_option): Remove code handling
7443 warn_missing_braces.
7445 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7448 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7451 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7454 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7456 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7458 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7459 * c-opts.c (c_common_handle_option): Do not handle explicitly
7460 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7462 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7464 PR preprocessor/7263
7465 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7466 to cpp_classify_number. For diagnostics, use the precise location
7467 instead of the global input_location.
7469 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7472 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7474 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7476 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7478 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7481 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7482 Wreorder): Use LangEnabledBy.
7483 * c-opts.c (c_common_handle_option): Do not enable them
7484 explicitly. Call lang-specific generated functions.
7485 (c_common_post_options): Do not set them here.
7487 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7489 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7490 Wmissing-field-initializers,Wmissing-parameter-type,
7491 Wold-style-declaration,Woverride-init): Use EnabledBy.
7492 * c-opts.c (c_common_post_options): Do not set here explicitly.
7494 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7497 * c-opts.c (c_common_handle_option): Use handle_generated_option
7498 to enable sub-options.
7500 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7503 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7505 2012-05-10 Richard Guenther <rguenther@suse.de>
7507 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7508 adjust commentary about TYPE_IS_SIZETYPE types.
7510 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7513 * c-common.c (warn_logical_operator): Check that argument of
7514 integer_zerop is not NULL.
7516 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7519 * c-common.c (warn_logical_operator): Do not warn if either side
7520 is already true or false.
7522 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7525 * c-common.c (expr_original_type): New.
7526 (shorten_compare): Do not warn for enumeration types.
7528 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7530 * c.opt (fpermissive): Add Var(flag_permissive).
7532 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
7535 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7536 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7538 2012-04-30 Dodji Seketeli <dodji@redhat.com>
7540 Add -Wvarargs option
7541 * c.opt (Wvarargs): Define new option.
7543 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7545 * c-common.c (check_function_arguments): Replace
7546 Wmissing-format-attribute with Wsuggest-attribute=format.
7548 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7550 * c.opt (Wsuggest-attribute=format): New. Alias of
7551 Wmissing-format-attribute.
7552 * c-format.c (decode_format_type): Replace
7553 Wmissing-format-attribute with Wsuggest-attribute=format.
7554 (check_function_format): Likewise.
7556 2012-04-27 Ollie Wild <aaw@google.com>
7558 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7559 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7560 * c.opt: Add Wliteral-suffix.
7562 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7565 * c.opt (Wpedantic): New.
7566 (pedantic): Alias Wpedantic.
7567 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7568 (c_common_post_options): Likewise.
7569 (sanitize_cpp_opts): Likewise.
7570 * c-lex.c (interpret_float): Likewise.
7571 * c-format.c (check_format_types): Likewise.
7572 * c-common.c (pointer_int_sum): Likewise.
7573 (c_sizeof_or_alignof_type): Likewise.
7574 (c_add_case_label): Likewise.
7575 (c_do_switch_warnings): Likewise.
7576 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7578 2012-04-15 Jason Merrill <jason@redhat.com>
7581 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7582 (C_STD_NAME): Distinguish between C++98 and C++11.
7584 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7587 * c-common.h (uint16_type_node): Rename into...
7588 (c_uint16_type_node): ...this.
7589 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7590 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7592 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7594 * c-common.c (warn_if_unused_value): Move definition to here.
7595 * c-common.h (warn_if_unused_value): Move declaration to here.
7597 2012-03-23 William Bader <williambader@hotmail.com>
7599 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7601 2012-03-20 Jason Merrill <jason@redhat.com>
7603 * c-common.h (enum cxx_dialect): Add cxx1y.
7604 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7606 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7607 * c-opts.c (c_common_post_options): Likewise.
7608 (set_std_cxx1y): New.
7609 (c_common_handle_option): Call it.
7610 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7612 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7615 * c.opt ([Wuseless-cast]): Add.
7617 2012-03-16 Richard Guenther <rguenther@suse.de>
7619 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7621 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7624 * c.opt (ftemplate-backtrace-limit) Add.
7626 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7628 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7630 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7631 (init_pragma): Don't register extern_prefix.
7633 2012-03-12 Richard Guenther <rguenther@suse.de>
7635 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7636 (builtin_type_for_size): Likewise.
7638 2012-02-13 Jakub Jelinek <jakub@redhat.com>
7641 * c-common.c (sync_resolve_params): Don't decide whether to convert
7642 or not based on TYPE_SIZE comparison, convert whenever arg_type
7643 is unsigned INTEGER_TYPE.
7645 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7648 * c.opt ([Wunused-local-typedefs]): Fix description.
7650 2012-01-24 Mike Stump <mikestump@comcast.net>
7652 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7655 2012-01-18 Richard Guenther <rguenther@suse.de>
7657 * c-opts.c (c_common_post_options): Reset LTO flags if
7658 we are about to generate a PCH.
7660 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7663 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7664 use pp_unsigned_wide_integer.
7666 2012-01-10 Richard Guenther <rguenther@suse.de>
7669 * c-opts.c (c_common_handle_option): Move -Werror handling
7670 to language independent code.
7672 2012-01-05 Richard Guenther <rguenther@suse.de>
7675 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7678 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7681 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7682 of array types with an unknown bound.
7684 2011-12-20 Joseph Myers <joseph@codesourcery.com>
7686 * c-common.c (flag_isoc99): Update comment to refer to C11.
7687 (flag_isoc1x): Change to flag_isoc11.
7688 * c-common.h (flag_isoc99): Update comment to refer to C11.
7689 (flag_isoc1x): Change to flag_isoc11.
7690 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7692 * c-opts.c (set_std_c1x): Change to set_std_c11.
7693 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7695 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7696 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7697 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7699 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7700 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7701 (std=gnu1x): Make alias of std=gnu11.
7703 2011-12-19 Jason Merrill <jason@redhat.com>
7706 * c-common.c (handle_transparent_union_attribute): Check the first
7707 field if the type is complete.
7709 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7712 * c-common.c (RID_IS_FINAL): Add.
7713 * c-common.h (RID_IS_FINAL): Add.
7715 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7717 * c.opt (fgnu-runtime): Provide full description.
7718 (fnext-runtime): Likewise.
7719 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7721 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
7723 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7724 predefines in one place. Add LOCK_FREE predefines.
7725 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7728 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
7731 * c-common.c (get_atomic_generic_size): Check for various error
7733 (resolve_overloaded_atomic_exchange,
7734 resolve_overloaded_atomic_compare_exchange,
7735 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7736 error_mark_node for error conditions.
7738 2011-11-08 Richard Guenther <rguenther@suse.de>
7743 2011-11-07 Richard Henderson <rth@redhat.com>
7744 Aldy Hernandez <aldyh@redhat.com>
7745 Torvald Riegel <triegel@redhat.com>
7747 Merged from transactional-memory.
7749 * c-common.c (handle_tm_wrap_attribute,
7750 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7751 (struct c_common_reswords): Added __transaction* keywords.
7752 (struct c_common_attribute_table): Added transaction* and tm_regparm
7754 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7756 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7757 find_tm_attribute): Declare.
7759 2011-11-07 Jason Merrill <jason@redhat.com>
7762 * c-common.c, c-common.h: Revert yesterday's changes.
7764 2011-11-06 Jason Merrill <jason@redhat.com>
7767 * c-common.c (decl_has_visibility_attr): Split out from...
7768 (c_determine_visibility): ...here.
7769 * c-common.h: Declare it.
7771 2011-11-06 Joseph Myers <joseph@codesourcery.com>
7773 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7774 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7776 (check_user_alignment): New. Split out of
7777 handle_aligned_attribute. Disallow integer constants with
7778 noninteger types. Conditionally allow zero.
7779 (handle_aligned_attribute): Use check_user_alignment.
7780 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7782 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
7783 Richard Henderson <rth@redhat.com>
7785 Merged from cxx-mem-model.
7787 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
7788 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
7789 parameters that are the same type size.
7790 (get_atomic_generic_size): New. Find size of generic
7791 atomic function parameters and do typechecking.
7792 (add_atomic_size_parameter): New. Insert size into parameter list.
7793 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7794 either __atomic_exchange_n or external library call.
7795 (resolve_overloaded_atomic_compare_exchange): Restructure
7796 __atomic_compare_exchange to either _n variant or external library call.
7797 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
7798 __atomic_load_n or an external library call.
7799 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7800 __atomic_store_n or an external library call.
7801 (resolve_overloaded_builtin): Handle new __atomic builtins.
7803 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7806 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7807 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7808 <INDIRECT_REF>: Return the argument.
7809 <ARRAY_REF>: Remove special code for negative offset.
7810 Call fold_build_pointer_plus instead of size_binop.
7811 (fold_offsetof): Remove STOP_REF argument and adjust.
7812 * c-common.h (fold_offsetof_1): Declare.
7813 (fold_offsetof): Remove STOP_REF argument.
7815 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7818 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7819 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7820 Wnarrowing for C++0x and C++98.
7821 * c.opt ([Wnarrowing]): Update.
7823 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7826 * c.opt: Add Wzero-as-null-pointer-constant.
7828 2011-10-31 Jason Merrill <jason@redhat.com>
7830 * c.opt (-fdeduce-init-list): Off by default.
7833 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7834 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7836 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7838 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7841 * c.opt (fvisibility-inlines-hidden): Description change.
7843 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7845 Implement C++11 user-defined literals.
7846 * c-common.c (build_userdef_literal): New.
7847 * c-common.def: New tree code.
7848 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7849 * c-lex.c (interpret_float): Add suffix parm.
7850 (c_lex_with_flags): Build literal tokens.
7852 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7856 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7859 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7860 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7861 Wnarrowing for C++0x and C++98.
7862 * c.opt ([Wnarrowing]): Update.
7864 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7867 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7868 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7869 Wnarrowing for C++0x and C++98.
7870 * c.opt ([Wnarrowing]): Update.
7872 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7875 * c-common.c (conversion_warning): Remove code looking for
7876 artificial operands.
7878 2011-10-18 Dodji Seketeli <dodji@redhat.com>
7881 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
7882 !NO_IMPLICIT_EXTERN_C.
7884 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
7886 * c-common.c (c_common_reswords): Add __bases,
7888 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7890 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7893 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7895 2011-10-15 Tom Tromey <tromey@redhat.com>
7896 Dodji Seketeli <dodji@redhat.com>
7898 * c.opt (fdebug-cpp): New option.
7899 * c-opts.c (c_common_handle_option): Handle the option.
7900 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7901 output stream in parameter. Factorized from ...
7902 (maybe_print_line): ... this. Dump location debug information when
7903 -fdebug-cpp is in effect.
7904 (print_line_1): New static function. Takes an output stream in
7905 parameter. Factorized from ...
7906 (print_line): ... here. Dump location information when -fdebug-cpp
7908 (scan_translation_unit): Dump location information when
7909 -fdebug-cpp is in effect.
7911 2011-10-15 Tom Tromey <tromey@redhat.com>
7912 Dodji Seketeli <dodji@redhat.com>
7914 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7916 * c-opts.c (c_common_handle_option)<case
7917 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7918 cases. Handle -ftrack-macro-expansion with and without argument.
7920 2011-10-15 Tom Tromey <tromey@redhat.com>
7921 Dodji Seketeli <dodji@redhat.com>
7923 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7924 (print_line, cb_define, do_line_change): Adjust to avoid touching
7925 the internals of struct line_map. Use the public API instead.
7926 * c-pch.c (c_common_read_pch): Likewise.
7927 * c-lex.c (fe_file_change): Likewise.
7929 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7932 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7934 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7937 * c-pretty-print.c (pp_c_floating_constant): Output
7938 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7940 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7942 * c-common.c (def_builtin_1): Delete old interface with two
7943 parallel arrays to hold standard builtin declarations, and replace
7944 it with a function based interface that can support creating
7945 builtins on the fly in the future. Change all uses, and poison
7946 the old names. Make sure 0 is not a legitimate builtin index.
7947 * c-omp.c (c_finish_omp_barrier): Ditto.
7948 (c_finish_omp_taskwait): Ditto.
7949 (c_finish_omp_flush): Ditto.
7951 2011-10-11 Tristan Gingold <gingold@adacore.com>
7953 * c.opt: (fallow-parameterless-variadic-functions): New.
7955 2011-09-08 Dodji Seketeli <dodji@redhat.com>
7957 PR c++/33255 - Support -Wunused-local-typedefs warning
7958 * c-common.h (struct c_language_function::local_typedefs): New
7960 (record_locally_defined_typedef, maybe_record_typedef_use)
7961 (maybe_warn_unused_local_typedefs): Declare new functions.
7962 * c-common.c (record_locally_defined_typedef)
7963 (maybe_record_typedef_use)
7964 (maybe_warn_unused_local_typedefs): Define new functions.
7965 * c.opt: Declare new -Wunused-local-typedefs flag.
7967 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7970 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7973 2011-09-05 Richard Guenther <rguenther@suse.de>
7975 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7976 of integer_minus_one_node for empty array upper bounds.
7978 2011-08-28 Dodji Seketeli <dodji@redhat.com>
7980 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7981 it's the first time it's being called on this main TU.
7983 2011-08-24 Richard Guenther <rguenther@suse.de>
7986 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7988 2011-08-22 Gabriel Charette <gchare@google.com>
7990 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7991 defined in cpp_init_builtins and c_cpp_builtins.
7993 2011-08-19 Joseph Myers <joseph@codesourcery.com>
7995 * c-common.c (c_common_reswords): Add __builtin_complex.
7996 * c-common.h (RID_BUILTIN_COMPLEX): New.
7998 2011-08-18 Joseph Myers <joseph@codesourcery.com>
8000 * c-common.c (c_common_reswords): Add _Noreturn.
8001 (keyword_is_function_specifier): Handle RID_NORETURN.
8002 * c-common.h (RID_NORETURN): New.
8004 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8006 * c-common.c (unsafe_conversion_p): New function. Check if it is
8007 unsafe to convert an expression to the type.
8008 (conversion_warning): Adjust, use unsafe_conversion_p.
8009 * c-common.h (unsafe_conversion_p): New function declaration.
8011 2011-08-02 Jakub Jelinek <jakub@redhat.com>
8013 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8014 (c_finish_omp_taskyield): New prototype.
8015 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8016 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8017 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8018 or RHS1 have side-effects, evaluate those too in the right spot,
8019 if it is a decl and LHS is also a decl, error out if they
8021 (c_finish_omp_taskyield): New function.
8022 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8023 * c-pragma.c (omp_pragmas): Add taskyield.
8024 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8025 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8026 PRAGMA_OMP_CLAUSE_MERGEABLE.
8028 2011-07-25 Dodji Seketeli <dodji@redhat.com>
8030 * c-common.h (set_underlying_type): Remove parm name from
8033 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8035 * c-pretty-print.h: Search c-common.h in c-family.
8037 2011-07-22 Jason Merrill <jason@redhat.com>
8040 * c.opt (Wnarrowing): New.
8043 * c-common.h: Declare c_linkage_bindings.
8044 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8047 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8048 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8049 as flag_isoc99 for 'restrict'.
8050 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8052 2011-07-21 Ian Lance Taylor <iant@google.com>
8055 * c-common.c (c_disable_warnings): New static function.
8056 (c_enable_warnings): New static function.
8057 (c_fully_fold_internal): Change local unused_p to bool. Call
8058 c_disable_warnings and c_enable_warnings rather than change
8059 c_inhibit_evaluation_warnings.
8061 2011-07-20 Jason Merrill <jason@redhat.com>
8063 PR c++/6709 (DR 743)
8064 PR c++/42603 (DR 950)
8065 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8066 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8067 (CPP_DECLTYPE): New.
8068 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8070 2011-07-19 Richard Guenther <rguenther@suse.de>
8072 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8073 * c-omp.c (c_finish_omp_for): Likewise.
8075 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8077 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8078 body on the next line.
8080 2011-07-08 Jason Merrill <jason@redhat.com>
8083 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8086 * c-common.c (c_apply_type_quals_to_decl): Don't check
8087 TYPE_NEEDS_CONSTRUCTING.
8089 2011-07-06 Richard Guenther <rguenther@suse.de>
8091 * c-common.c (c_common_nodes_and_builtins):
8092 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8094 2011-07-05 Richard Guenther <rguenther@suse.de>
8096 * c-common.c (c_common_nodes_and_builtins): Build all common
8099 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8101 * c-common.h (c_tree_chain_next): New static inline function.
8103 * c-common.c (check_builtin_function_arguments): Handle
8104 BUILT_IN_ASSUME_ALIGNED.
8106 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8108 * c-common.c: Add sync_ or SYNC__ to builtin names.
8109 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8111 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8113 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8115 (gen_pragma_handler): New union.
8116 (internal_pragma_handler): New type.
8117 (c_register_pragma_with_data)
8118 (c_register_pragma_with_expansion_and_data): New functions.
8120 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8121 (c_register_pragma, c_register_pragma_with_expansion)
8122 (c_invoke_pragma_handler): Changed to work with
8123 internal_pragma_handler.
8124 (c_register_pragma_with_data)
8125 (c_register_pragma_with_expansion_and_data): New functions.
8127 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8129 * c-common.c: Include common/common-target.h.
8130 (handle_section_attribute): Use
8131 targetm_common.have_named_sections.
8132 * c-cppbuiltin.c: Include common/common-target.h.
8133 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8135 2011-06-10 Richard Guenther <rguenther@suse.de>
8137 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8138 to print a IDENTIFIER_NODE.
8140 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8141 Joseph Myers <joseph@codesourcery.com>
8143 * c.opt (fbuilding-libgcc): New option.
8144 * c-cppbuiltin.c (c_cpp_builtins): Define
8145 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8147 2011-06-07 Jason Merrill <jason@redhat.com>
8149 * c-common.c (max_tinst_depth): Lower default to 900.
8151 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8153 2011-06-07 Richard Guenther <rguenther@suse.de>
8155 * c-common.c (c_common_nodes_and_builtins): Do not set
8156 size_type_node or call set_sizetype.
8158 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8161 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8162 type when using pointer comparison to compare types.
8164 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8166 * c.opt: Add -Wdelete-non-virtual-dtor.
8167 * c-opts.c (c_common_handle_option): Include it in -Wall.
8169 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8174 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8176 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8179 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8182 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8183 C++ don't call c_common_truthvalue_conversion on void type arms.
8185 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8187 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8188 (stmt_list_stack): Define.
8189 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8190 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8192 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8194 * c-common.c (warning_candidate_p): Check for BLOCKs.
8196 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8198 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8201 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8203 * c-common.c (def_fn_type): Remove extra va_end.
8205 2011-05-23 Jason Merrill <jason@redhat.com>
8208 * c-common.c (c_common_get_narrower): New.
8209 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8211 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8213 * c-common.h (check_function_arguments): Tweak prototype of
8214 check_function_arguments.
8215 * c-common.c (check_function_arguments): Likewise. Adjust
8216 calls to check_function_nonnull, check_function_format, and
8217 check_function_sentinel.
8218 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8219 separate attributes and typelist arguments. Use
8220 FOREACH_FUNCTION_ARGS to iterate over argument types.
8222 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8224 * c-common.c (c_common_reswords): Reorder.
8225 * c-common.h (rid): Likewise.
8227 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8229 * c-common.c (def_fn_type): Don't call build_function_type, call
8230 build_function_type_array or build_varargs_function_type_array
8232 (c_common_nodes_and_builtins): Likewise.
8234 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8236 * c-common.c (c_add_case_label): Omit the loc argument to
8238 * c-common.h (build_case_label): Remove.
8239 * c-semantics.c (build_case_label): Remove.
8241 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8243 * c-objc.h (objc_start_method_definition): Update prototype.
8244 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8246 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8248 * c-common.c (check_main_parameter_types): Reindent. Don't use
8249 TYPE_ARG_TYPES directly.
8250 (handle_nonnull_attribute): Likewise.
8251 (sync_resolve_params): Likewise.
8252 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8253 to check_format_string.
8254 (handle_format_attribute): Likewise.
8255 (check_format_string): Take a function type to examine instead of
8256 a type list. Use a function_arg_iterator to step through argument
8259 2011-05-04 Richard Guenther <rguenther@suse.de>
8261 * c-common.c (fix_string_type): Use size_int for index type bounds.
8262 (start_fname_decls): Do not pass NULL to build_int_cst.
8263 (c_init_attributes): Likewise.
8264 * c-lex.c (c_lex_with_flags): Likewise.
8266 2011-04-27 Jason Merrill <jason@redhat.com>
8268 * c-common.c (make_tree_vector_from_list): New.
8269 * c-common.h: Declare it.
8271 2011-04-26 Richard Guenther <rguenther@suse.de>
8273 PR preprocessor/48248
8274 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8275 for output size with -P.
8277 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8279 * c-common.c (struct c_common_resword): Add __underlying_type.
8280 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8282 2011-04-20 Jim Meyering <meyering@redhat.com>
8284 * c-format.c (init_dollar_format_checking): Remove useless
8287 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8289 * c-objc.h (objc_get_interface_ivars): Removed.
8290 (objc_detect_field_duplicates): New.
8291 * stub-objc.c: Likewise.
8293 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8295 * stub-objc.c (objc_declare_protocols): Renamed to
8296 objc_declare_protocol.
8297 * c-objc.h: Likewise.
8299 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8301 * stub-objc.c (objc_declare_class): Updated argument name.
8303 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8305 * c-common.h (c_common_init_ts): Declare.
8306 * c-common.c (c_common_init_ts): Define.
8308 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8310 * c-objc.h (objc_build_message_expr): Updated prototype.
8311 * stub-objc.c (objc_build_message_expr): Likewise.
8313 2011-04-12 Martin Jambor <mjambor@suse.cz>
8315 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8318 2011-04-11 Richard Guenther <rguenther@suse.de>
8320 * c-common.c (complete_array_type): Build a range type of
8323 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8325 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8326 (handle_type_generic_attribute): Likewise.
8328 2011-04-07 Jason Merrill <jason@redhat.com>
8331 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8332 conversion from C++0x scoped enum.
8334 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8336 * c-target-def.h: New file.
8337 * c-target.def: New file.
8338 * c-target.h: New file.
8339 * c-common.c (targetcm): Don't define here.
8340 * c-common.h (default_handle_c_option): Declare.
8341 * c-format.c: Include c-target.h instead of target.h.
8342 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8344 (default_handle_c_option): Move from targhooks.c.
8346 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8348 PR preprocessor/48248
8349 * c-ppoutput.c (print): Add src_file field.
8350 (init_pp_output): Initialize it.
8351 (maybe_print_line): Don't optimize by adding up to 8 newlines
8352 if map->to_file and print.src_file are different file.
8353 (print_line): Update print.src_file.
8355 2011-03-25 Kai Tietz <ktietz@redhat.com>
8357 * c-ada-spec.c (compare_comment): Use filename_cmp
8358 instead of strcmp for filename.
8360 2011-03-25 Jeff Law <law@redhat.com>
8362 * c-common.c (def_fn_type): Add missing va_end.
8364 2011-03-25 Jason Merrill <jason@redhat.com>
8366 * c.opt: Add -std=c++03.
8368 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8370 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8372 2011-03-17 Kai Tietz <ktietz@redhat.com>
8375 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8376 Display allowed attributes for function pointer types.
8377 (pp_c_attributes_display): New function to display
8378 attributes having affects_type_identity flag set to true.
8379 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8381 * c-common.c (c_common_attribute_table):
8383 (c_common_format_attribute_table): Likewise.
8385 2011-03-18 Jason Merrill <jason@redhat.com>
8387 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8388 * c-common.h: Don't declare it here.
8389 * c-common.c: Or define it here.
8390 * c-opts.c (c_common_handle_option): Or set it here.
8393 * c-common.c (handle_transparent_union_attribute): Don't
8394 make a duplicate type in C++.
8396 2011-03-15 Jason Merrill <jason@redhat.com>
8398 * c-common.c (max_constexpr_depth): New.
8399 * c-common.h: Declare it.
8400 * c-opts.c (c_common_handle_option): Set it.
8401 * c.opt (fconstexpr-depth): New option.
8403 2011-03-11 Jason Merrill <jason@redhat.com>
8405 * c-common.c (attribute_takes_identifier_p): Add missing const.
8408 * c-common.c (attribute_takes_identifier_p): Assume that an
8409 unknown attribute takes an identifier.
8411 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8414 * c-common.c (c_type_hash): Call list_length instead of iterating
8415 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8417 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8420 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8422 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8424 * c.opt (fobjc-abi-version=) New.
8425 (fobjc-nilcheck): New.
8427 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8430 * c-common.h (keyword_is_decl_specifier): Declare.
8431 * c-common.c (keyword_is_decl_specifier): Define.
8432 (keyword_is_function_specifier): New function.
8434 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8437 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8438 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8441 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8443 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8445 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8448 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8449 after init_c_lex if pch_file is set.
8451 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8454 * c.opt (-fkeep-inline-dllexport): New switch.
8456 2011-01-12 Richard Guenther <rguenther@suse.de>
8459 * c-common.c (handle_weak_attribute): Warn instead of error
8460 on declaring an inline function weak.
8462 2011-01-05 Tom Tromey <tromey@redhat.com>
8464 * c-common.h (lvalue_error): Update.
8465 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8468 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8471 * c-objc.h (objc_finish_message_expr): Added argument to
8474 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8476 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8479 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8481 * c-objc.h (objc_maybe_warn_exceptions): New.
8482 * stub-objc.c (objc_maybe_warn_exceptions): New.
8484 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8486 * c-common.h (readonly_error): Declare.
8487 * c-common.c (readonly_error): Define.
8489 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8491 * c-common.h (invalid_indirection_error): Declare.
8492 * c-common.c (invalid_indirection_error): Define.
8494 2010-12-03 Richard Guenther <rguenther@suse.de>
8497 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8498 (pp_c_unary_expression): Likewise.
8499 (pp_c_expression): Likewise.
8501 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8503 * c-common.h (objc_finish_function): New.
8504 (objc_non_volatilized_type): Removed.
8505 (objc_type_quals_match): Removed.
8506 * stub-objc.c (objc_finish_function): New.
8507 (objc_non_volatilized_type): Removed.
8508 (objc_type_quals_match): Removed.
8510 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8512 * c-common.h (parse_optimize_options): Declare.
8513 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8514 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8516 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8518 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8520 * c-pch.c (O_BINARY): Don't define here.
8521 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8523 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8525 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8526 targetm.except_unwind_info.
8528 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8530 * c-opts.c (c_common_handle_option): Pass location to
8531 set_struct_debug_option.
8533 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8535 * c-common.c (visibility_options): Move from ../opts.c.
8536 * c-common.h (struct visibility_flags, visibility_options):
8538 * c-opts.c (finish_options): Rename to c_finish_options.
8539 (c_common_init): Update call to finish_options.
8541 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8544 * c-lex.c (lex_string): Check that each string in an Objective-C
8545 string concat sequence starts with either one or zero '@', and
8546 that there are no spurious '@' signs at the end.
8548 2010-11-20 Joseph Myers <joseph@codesourcery.com>
8550 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8551 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8552 HANDLE_PRAGMA_VISIBILITY.
8553 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8554 HANDLE_PRAGMA_VISIBILITY): Don't define.
8555 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8557 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8562 * c-common.h (keyword_begins_type_specifier): Declare.
8563 (keyword_is_storage_class_specifier): Declare.
8564 (keyword_is_type_qualifier): Declare.
8565 * c-common.c (keyword_begins_type_specifier): New function.
8566 (keyword_is_storage_class_specifier): New function.
8567 (keyword_is_type_qualifier): Declare.
8569 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8572 * c-common.c (in_late_binary_op): Define.
8573 (c_common_truthvalue_conversion): Check in_late_binary_op before
8574 calling c_save_expr.
8575 * c-common.h (in_late_binary_op): Declare.
8577 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8579 * c-opts.c (c_common_handle_option): Update calls to
8580 set_struct_debug_option.
8582 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8584 * c-common.h (objc_declare_protocols): Added additional argument.
8585 * stub-objc.c (objc_declare_protocol): Same change.
8587 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8590 * c-common.h (build_real_imag_expr): Declare.
8591 * c-semantics.c (build_real_imag_expr): Define.
8593 2010-11-17 Joseph Myers <joseph@codesourcery.com>
8595 * c-opts.c (c_common_parse_file): Take no arguments.
8596 * c-common.h (c_common_parse_file): Update prototype.
8598 2010-11-16 Jakub Jelinek <jakub@redhat.com>
8601 * c-common.c (warning_candidate_p): Don't track non-const calls
8604 2010-11-15 Ian Lance Taylor <iant@google.com>
8606 * c-lex.c (init_c_lex): Set macro debug callbacks if
8607 flag_dump_go_spec is set.
8609 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8611 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8612 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8614 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8616 PR preprocessor/45038
8617 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8620 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8622 * c-common.h (c_family_lang_mask): Declare.
8623 * c-opts.c (c_family_lang_mask): Make extern.
8624 * c-pragma.c (handle_pragma_diagnostic): Use
8625 control_warning_option.
8627 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8629 * c-common.c (parse_optimize_options): Update call to
8631 * c-common.h (c_common_handle_option): Update prototype.
8632 * c-opts.c (c_common_handle_option): Take location_t parameter and
8633 pass it to other functions.
8635 2010-11-11 Joseph Myers <joseph@codesourcery.com>
8637 * c-opts.c (warning_as_error_callback): Remove.
8638 (c_common_initialize_diagnostics): Don't call
8639 register_warning_as_error_callback.
8640 (c_common_handle_option): Handle -Werror=normalized= here.
8642 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8644 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8646 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8648 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8649 Remove trailing '.' from diagnostics.
8650 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8652 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8654 * c-common.c (parse_optimize_options): Pass global_dc to
8656 * c-opts.c (c_common_handle_option): Pass &global_options to
8657 set_Wstrict_aliasing.
8658 * c.opt (v): Don't mark Common or document here.
8660 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8663 * c-format.c (format_type): New type gcc_objc_string_format_type.
8664 (valid_stringptr_type_p): New.
8665 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
8666 (check_format_string): Pass expected type, use
8667 valid_stringptr_type_p (), check that the format string types are
8668 consistent with the format specification.
8669 (decode_format_attr): Warn if NSString is used outside objective-c.
8670 (format_types_orig): Add NSString.
8672 (format_flags): New.
8673 (check_format_arg): Handle format strings requiring an external parser.
8674 first_target_format_type: New variable.
8675 (handle_format_attribute): Set up first_target_format_type, pass the
8676 expected format arg string type to check_format_string().
8677 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8678 * stub-objc.c (objc_string_ref_type_p): New.
8679 (objc_check_format_arg): New.
8681 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8683 Fixed using the Objective-C 2.0 dot-syntax with class names.
8684 * c-common.h (objc_build_class_component_ref): New.
8685 * stub-objc.c (objc_build_class_component_ref): New.
8687 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8689 * c.opt (Wproperty-assign-default): New option.
8691 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8693 Implemented -fobjc-std=objc1 flag.
8694 * c.opt (fobjc-std=objc1): New option.
8696 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8698 Implemented format and noreturn attributes for Objective-C methods.
8699 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8700 attribute for Objective-C methods.
8702 2010-10-31 Jason Merrill <jason@redhat.com>
8704 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8707 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8709 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8710 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8711 (objc_add_property_declaration): Removed arguments for copies and
8713 (objc_build_getter_call): Renamed to
8714 objc_maybe_build_component_ref.
8715 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8716 (objc_is_property_ref): New.
8717 * c-common.c (c_common_reswords): Removed copies and ivar.
8718 * stub-objc.c (objc_add_property_declaration): Removed arguments
8719 for copies and ivar.
8720 (objc_build_getter_call): Renamed to
8721 objc_maybe_build_component_ref.
8722 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8723 (objc_is_property_ref): New.
8725 2010-10-29 Arnaud Charlet <charlet@adacore.com>
8726 Matthew Gingell <gingell@adacore.com>
8728 * c-ada-spec.c (separate_class_package): New function.
8729 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8730 name of their enclosing package.
8731 (print_ada_declaration): Use separate_class_package.
8733 2010-10-27 Jason Merrill <jason@redhat.com>
8735 * c-common.c (c_common_reswords): Add __is_literal_type.
8736 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8738 * c-common.c (check_case_value): Remove special C++ code.
8740 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8742 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8743 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8745 (objc_add_property_declaration): Added additional arguments.
8746 (objc_property_attribute_kind): Removed.
8747 (objc_set_property_attr): Removed.
8748 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8750 * stub-objc.c (objc_add_property_declaration): Added additional
8752 (objc_set_property_attr): Removed.
8754 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8756 * c-common.h (objc_add_property_variable): Renamed to
8757 objc_add_property_declaration. Added location argument.
8758 * stub-objc.c (objc_add_property_variable): Same change.
8760 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8762 * c-common.h (objc_maybe_printable_name): New.
8763 * stub-objc.c (objc_maybe_printable_name): New.
8765 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8766 Andrew Pinski <pinskia@gmail.com>
8768 * c-common.h (c_common_mark_addressable_vec): Declare.
8769 * c-common.c (c_common_mark_addressable_vec): New function.
8771 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8773 * c-common.h (objc_set_method_type): Removed.
8774 (objc_add_method_declaration): Added boolean argument.
8775 (objc_start_method_definition): Same change.
8776 (objc_build_method_signature): Same change.
8777 * stub-objc.c (objc_set_method_type): Removed.
8778 (objc_add_method_declaration): Added boolean argument.
8779 (objc_start_method_definition): Same change.
8780 (objc_build_method_signature): Same change.
8782 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8784 * c-common.h (finish_file): Removed.
8785 (objc_write_global_declarations): New.
8786 * c-opts.c (c_common_parse_file): Do not call finish_file.
8787 * stub-objc.c (objc_write_global_declarations): New.
8789 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8791 Implemented parsing @synthesize and @dynamic for
8792 Objective-C/Objective-C++.
8793 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8794 (objc_add_synthesize_declaration): New.
8795 (objc_add_dynamic_declaration): New.
8796 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8797 * stub-objc.c (objc_add_synthesize_declaration): New.
8798 (objc_add_dynamic_declaration): New.
8800 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8803 * c-cppbuiltin.c (mode_has_fma): Move function here from
8804 builtins.c. Don't use the fma optab, instead just use the
8805 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8808 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8810 Merge from 'apple/trunk' branch on FSF servers.
8812 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
8815 * c-common.h (objc_non_volatilized_type): New declaration
8816 * stub-objc.c (objc_non_volatilized_type): New stub.
8818 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8820 Merge from 'apple/trunk' branch on FSF servers.
8822 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
8825 * c-common.h (objc_diagnose_private_ivar): New decl.
8826 * stub-objc.c (objc_diagnose_private_ivar): New stub.
8828 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8830 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8831 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8832 (objc_ivar_visibility_kind): New enum.
8833 (objc_set_visibility): Adjust prototype to use visibility enum.
8834 * stub-objc.c (objc_set_visibility): Adjust stub to use
8837 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8839 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8840 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8841 has the appropriate fma builtins.
8842 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8844 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8846 merge from FSF apple 'trunk' branch.
8847 2006 Fariborz Jahanian <fjahanian@apple.com>
8849 Radars 4436866, 4505126, 4506903, 4517826
8850 * c-common.c (c_common_resword): Define @property and its attributes.
8851 * c-common.h: Define property attribute enum entries.
8852 (OBJC_IS_PATTR_KEYWORD): New.
8853 (objc_property_attribute_kind): New enum.
8854 Declare objc_set_property_attr (), objc_add_property_variable (),
8855 objc_build_getter_call () and objc_build_setter_call ().
8856 * stub-objc.c (objc_set_property_attr): New stub.
8857 (objc_add_property_variable): Likewise.
8858 (objc_build_getter_call): Likewise.
8859 (objc_build_setter_call) Likewise.
8861 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8863 merge from FSF apple 'trunk' branch.
8864 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
8866 Radar 3803157 (method attributes)
8867 * c-common.c (handle_deprecated_attribute): Recognize
8868 objc methods as valid declarations.
8869 * c-common.h: Declare objc_method_decl ().
8870 * stub-objc.c (objc_method_decl): New stub.
8872 2010-10-08 Joseph Myers <joseph@codesourcery.com>
8874 * c-common.c (parse_optimize_options): Call
8875 decode_cmdline_options_to_array_default_mask before
8876 decode_options. Update arguments to decode_options.
8877 * c-common.h (c_common_init_options_struct): Declare.
8878 * c-opts.c (c_common_init_options_struct): New. Split out from
8879 c_common_init_options.
8881 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8883 Implemented fast enumeration for Objective-C.
8884 * c-common.h (objc_finish_foreach_loop): New.
8885 * stub-objc.c (objc_finish_foreach_loop): New.
8887 2010-10-05 Joseph Myers <joseph@codesourcery.com>
8889 * c-common.h (struct diagnostic_context): Don't declare here.
8890 (c_common_initialize_diagnostics): Declare using
8891 diagnostic_context typedef.
8892 * c-opts.c (c_common_handle_option): Pass global_dc to
8893 handle_generated_option.
8895 2010-10-04 Joseph Myers <joseph@codesourcery.com>
8897 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8898 handle_generated_option.
8900 2010-10-03 Ian Lance Taylor <iant@google.com>
8902 * c.opt (-fplan9-extensions): New option.
8904 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8906 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8908 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8909 of duplicating code.
8911 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8913 * c-common.c: Add two new entries for @optional
8914 and @required keywords.
8916 merge from FSF 'apple/trunk' branch.
8917 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
8920 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8921 objective-c keywords.
8922 (objc_set_method_opt): New declaration.
8923 * stub-objc.c (objc_set_method_opt): New stub.
8925 2010-09-30 Joseph Myers <joseph@codesourcery.com>
8927 * c-common.c (handle_optimize_attribute): Pass &global_options to
8928 cl_optimization_save and cl_optimization_restore.
8929 * c-opts.c (c_common_handle_option): Pass &global_options to
8930 handle_generated_option.
8931 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8932 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8933 &global_options to cl_optimization_restore.
8935 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8937 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8938 Objective-C/Objective-C++ keywords.
8940 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8942 Merge from 'apple/trunk' branch on FSF servers.
8944 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
8947 * c-common.h (objc_check_global_decl): New declaration.
8948 * stub-objc.c (objc_check_global_decl): New stub.
8950 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8952 * c.opt: Don't use VarExists.
8954 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8956 * c-common.c (c_cpp_error): Update names of diagnostic_context
8958 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8959 cl_optimization members.
8960 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8961 sanitize_cpp_opts, finish_options): Update names of cpp_options
8964 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8966 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8967 (objc_is_reserved_word): Removed.
8968 * c-common.c: Updated comments.
8969 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8970 objc_is_reserved_word.
8971 * stub-objc.c (objc_is_reserved_word): Removed.
8973 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8975 * c-common.h (objc_add_method_declaration): Adjust prototype to
8977 (objc_start_method_definition): Likewise.
8978 (objc_build_keyword_decl): Likewise.
8979 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8980 (objc_start_method_definition): Likewise.
8981 (objc_build_keyword_decl): Likewise.
8983 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8985 * c-common.h (objc_start_class_interface): Adjust prototype.
8986 (objc_start_category_interface): Likewise.
8987 (objc_start_protocol): Likewise.
8988 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8989 (objc_start_class_interface): Likewise.
8990 (objc_start_category_interface): Likewise.
8992 2010-09-27 Ian Lance Taylor <iant@google.com>
8994 * c-common.c (c_common_attribute_table): Add no_split_stack.
8995 (handle_no_split_stack_attribute): New static function.
8997 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8999 Merge from 'apple/trunk' branch on FSF servers.
9001 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
9004 * c-common.h (objc_have_common_type): New declaration.
9005 * stub-objc.c (objc_have_common_type): New stub.
9007 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9010 * c-common.h (objc_common_type): New prototype.
9011 * stub-objc.c (objc_common_type): New stub.
9013 2010-09-24 Jan Hubicka <jh@suse.cz>
9015 * c-common.c (handle_leaf_attribute): New function.
9016 (struct attribute_spec c_common_att): Add leaf.
9018 2010-09-22 Joseph Myers <joseph@codesourcery.com>
9020 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9021 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9022 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9023 -include-barrier, -include-directory, -include-directory=,
9024 -include-directory-after, -include-directory-after=,
9025 -include-prefix, -include-prefix=, -include-with-prefix,
9026 -include-with-prefix=, -include-with-prefix-after,
9027 -include-with-prefix-after=, -include-with-prefix-before,
9028 -include-with-prefix-before=, -no-integrated-cpp,
9029 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9030 -output=, -pedantic, -pedantic-errors, -preprocess,
9031 -print-missing-file-dependencies, -trace-includes, -traditional,
9032 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9033 -user-dependencies, -verbose, -write-dependencies,
9034 -write-user-dependencies, no-integrated-cpp, traditional): New.
9036 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9039 * c-common.h (objc_start_method_definition): Return bool instead
9041 * stub-objc.c (objc_start_method_definition): Return bool instead
9044 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9047 * c-common.h (objc_get_interface_ivars): New declaration.
9048 * stub-objc.c (objc_get_interface_ivars): New stub.
9050 2010-09-15 Ian Lance Taylor <iant@google.com>
9052 * c-common.c (parse_optimize_options): Do not capitalize warning
9053 messages. Remove period at end of warning message.
9055 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9057 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9058 (handle_alias_attribute): ... here.
9059 (handle_ifunc_attribute): New.
9061 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9063 * c-common.h (do_warn_double_promotion): Declare.
9064 * c-common.c (do_warn_double_promotion): Define.
9066 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9068 * c.opt (Wdouble-promotion): New.
9070 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9072 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9073 fvtable-thunks, fxref): Mark no longer supported in help text.
9075 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9077 * c.opt (Wimport, fall-virtual, falt-external-templates,
9078 fdefault-inline, fenum-int-equiv, fexternal-templates,
9079 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9080 fname-mangling-version-, fnew-abi, fnonnull-objects,
9081 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9082 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9084 (fhandle-exceptions): Mark with Alias and Warn.
9085 * c-opts.c (c_common_handle_option): Don't handle options marked
9088 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9090 * c.opt (Wcomments, Werror-implicit-function-declaration,
9091 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9092 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9094 * c-common.c (option_codes): Use OPT_Wcomment instead of
9096 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9097 Don't handle options marked as aliases.
9099 2010-08-25 Richard Guenther <rguenther@suse.de>
9101 * c-common.c (c_common_get_alias_set): Remove special
9102 handling for pointers.
9104 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9106 * c-common.c: Use FOR_EACH_VEC_ELT.
9107 * c-gimplify.c: Likewise.
9108 * c-pragma.c: Likewise.
9110 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9112 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9114 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9116 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9117 instead of OPT_MDX and OPT_MMDX.
9119 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9121 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9123 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9125 * c.opt (MD, MMD): Change to MDX and MMDX.
9126 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9128 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9130 * c-opts.c (c_common_handle_option): Call handle_generated_option
9131 instead of handle_option.
9133 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9135 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9136 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9138 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9140 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9141 (pending_redefine_extname): Change type to a VEC.
9142 (add_to_renaming_pragma_list): Update for new type of
9143 pending_redefine_extname.
9144 (maybe_apply_renaming_pragma): Likewise.
9146 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9148 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9150 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9151 decide whether a type has already been declared/seen.
9152 Do not go to the original type.
9153 (dump_nested_types): New parameter forward.
9154 Generate forward declaration if needed and mark type as visited.
9155 (print_ada_declaration): Call dump_nested_types if not already done.
9156 Mark types as visited.
9158 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9160 * c.opt (-print-pch-checksum): Remove option.
9161 * c-opts.c (c_common_handle_option): Don't handle
9162 OPT_print_pch_checksum.
9164 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9166 * c-common.h (c_common_handle_option): Update prototype and return
9168 * c-opts.c (c_common_handle_option): Update prototype and return
9169 value type. Update calls to handle_option and
9170 enable_warning_as_error.
9172 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9175 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9177 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9179 * c-common.h (c_common_missing_argument): Remove.
9180 * c-opts.c (c_common_missing_argument): Remove.
9181 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9182 idirafter, imacros, include, isysroot, isystem, iquote): Add
9184 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9186 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9188 * c-common.h (c_common_option_lang_mask,
9189 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9191 (c_common_init_options): Update prototype.
9192 * c-opts.c (c_common_option_lang_mask): New.
9193 (c_common_initialize_diagnostics): Split out of
9194 c_common_init_options.
9195 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9197 (c_common_init_options): Update prototype. Use decoded options in
9198 search for -lang-asm.
9200 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9202 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9203 * c-format.c: Likewise.
9205 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9207 * c-common.h: Include diagnostic-core.h. Error if already
9209 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9211 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9213 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9214 Do not include expr.h
9215 (vector_mode_valid_p): Move here.
9217 2010-06-21 DJ Delorie <dj@redhat.com>
9219 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9220 allow these pragmas anywhere.
9222 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9225 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9226 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9227 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9228 ggc_strdup instead of xstrdup.
9230 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9232 * c-cppbuiltin.c: Include cpp-id-data.h.
9233 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9234 (lazy_hex_fp_value): New function.
9235 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9237 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9239 * c-gimplify.c: Do not include tree-flow.h
9241 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9244 * c-common.c: Rename targetm member:
9245 targetm.enum_va_list -> targetm.enum_va_list_p
9247 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9249 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9251 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9253 * c-cppbuiltin.c: Do not include except.h.
9255 2010-06-24 Andi Kleen <ak@linux.intel.com>
9257 * c-common.c (warn_for_omitted_condop): New.
9258 * c-common.h (warn_for_omitted_condop): Add prototype.
9260 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9262 * c.opt (lang-objc): Remove.
9263 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9265 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9267 * c-opts.c: Include "tm_p.h".
9269 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9271 * c-common.c (parse_optimize_options): Update call to
9274 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9276 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9277 new type of types_used_by_cur_var_decl.
9279 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9282 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9283 for C++ standard compliance.
9285 2010-06-16 Jason Merrill <jason@redhat.com>
9287 * c.opt: Add -Wnoexcept.
9289 2010-06-16 Richard Guenther <rguenther@suse.de>
9292 * c-common.c (c_common_truthvalue_conversion): Remove
9293 premature and wrong optimization concering ADDR_EXPRs.
9295 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9297 * c-ada-spec.c (dump_sloc): Remove column info.
9298 (is_simple_enum): New function.
9299 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9300 enum types when relevant.
9302 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9304 * c-common.c (conversion_warning): Warn at expression
9307 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9309 * c-opts.c (c_common_handle_option): Don't handle
9312 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9314 * c-pragma.c (push_alignment): Use typed GC allocation.
9315 (handle_pragma_push_options): Likewise.
9317 * c-common.c (parse_optimize_options): Likewise.
9319 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9322 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9324 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9325 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9326 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9327 flag_signed_bitfields, warn_strict_null_sentinel,
9328 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9329 flag_gen_declaration, flag_no_gnu_keywords,
9330 flag_implement_inlines, flag_implicit_templates,
9331 flag_implicit_inline_templates, flag_optional_diags,
9332 flag_elide_constructors, flag_default_inline, flag_rtti,
9333 flag_conserve_space, flag_access_control, flag_check_new,
9334 flag_new_for_scope, flag_weak, flag_working_directory,
9335 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9336 flag_enforce_eh_specs, flag_threadsafe_statics,
9337 flag_pretty_templates): Remove.
9338 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9339 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9340 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9341 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9342 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9343 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9344 flag_no_gnu_keywords, flag_implement_inlines,
9345 flag_implicit_templates, flag_implicit_inline_templates,
9346 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9347 flag_rtti, flag_conserve_space, flag_access_control,
9348 flag_check_new, flag_new_for_scope, flag_weak,
9349 flag_working_directory, flag_use_cxa_atexit,
9350 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9351 flag_threadsafe_statics, flag_pretty_templates,
9352 warn_strict_null_sentinel): Remove.
9353 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9354 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9355 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9356 fimplicit-inline-templates, fimplicit-templates,
9357 flax-vector-conversions, fms-extensions, fnil-receivers,
9358 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9359 frtti, fshort-double, fshort-enums, fshort-wchar,
9360 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9361 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9362 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9363 gen-decls, undef): Use Var.
9364 (fdefault-inline, foptional-diags): Document as doing nothing.
9365 * c-opts.c (c_common_handle_option): Remove cases for options now
9366 using Var. Mark ignored options as such.
9368 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9370 * c-common.c: Moved to here from parent directory.
9371 * c-common.def: Likewise.
9372 * c-common.h: Likewise.
9373 * c-cppbuiltin.c: Likewise.
9374 * c-dump.c: Likewise.
9375 * c-format.c: Likewise.
9376 * c-format.h : Likewise.
9377 * c-gimplify.c: Likewise.
9378 * c-lex.c: Likewise.
9379 * c-omp.c: Likewise.
9381 * c-opts.c: Likewise.
9382 * c-pch.c: Likewise.
9383 * c-ppoutput.c: Likewise.
9384 * c-pragma.c: Likewise.
9385 * c-pragma.h: Likewise.
9386 * c-pretty-print.c: Likewise.
9387 * c-pretty-print.h: Likewise.
9388 * c-semantics.c: Likewise.
9389 * stub-objc.c: Likewise.
9391 * c-common.c: Include gt-c-family-c-common.h.
9392 * c-pragma.c: Include gt-c-family-c-pragma.h.
9394 Copyright (C) 2010-2018 Free Software Foundation, Inc.
9396 Copying and distribution of this file, with or without modification,
9397 are permitted in any medium without royalty provided the copyright
9398 notice and this notice are preserved.