1 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3 * c-format.c (range_label_for_format_type_mismatch::get_text):
6 2018-09-17 David Malcolm <dmalcolm@redhat.com>
8 * c-format.c (format_warning_at_char): Update for introduction of
9 format_string_diagnostic_t.
10 (format_type_warning): Likewise.
12 2018-09-17 Martin Jambor <mjambor@suse.cz>
15 * c.opt (Wabsolute-value): New.
17 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
19 * c-common.c (complete_flexible_array_elts): New helper function.
20 * c-common.h (complete_flexible_array_elts): Declare.
22 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
24 * c-common.c (braced_list_to_string): Remove eval parameter.
25 Add some more checks. Always create zero-terminated STRING_CST.
26 * c-common.h (braced_list_to_string): Adjust prototype.
28 2018-08-27 David Malcolm <dmalcolm@redhat.com>
31 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
33 (maybe_suggest_missing_token_insertion): Likewise.
34 (maybe_add_include_fixit): Add param "override_location". If set,
35 and source-printing is enabled, then override the rich_location's
36 primary location with that of the insertion point for the fix-it
37 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
38 * c-common.h (extern void maybe_add_include_fixit): Add bool
40 * c-format.c (selftest::test_type_mismatch_range_labels): Update
41 for conversion of show_caret_p to a tri-state.
42 * c-warn.c (warn_for_restrict): Likewise.
44 (suggest_missing_header::~suggest_missing_header): Update call to
45 maybe_add_include_fixit to suggest overriding the location, as it
48 2018-08-27 Martin Liska <mliska@suse.cz>
50 * c-common.c (check_function_restrict): Use new function
51 fndecl_built_in_p and remove check for FUNCTION_DECL if
53 (check_builtin_function_arguments): Likewise.
54 (reject_gcc_builtin): Likewise.
55 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
57 2018-08-26 Marek Polacek <polacek@redhat.com>
59 PR c++/87029, Implement -Wredundant-move.
60 * c.opt (Wredundant-move): New option.
62 2018-08-21 Marek Polacek <polacek@redhat.com>
64 PR c++/86981, Implement -Wpessimizing-move.
65 * c.opt (Wpessimizing-move): New option.
67 2018-08-20 David Malcolm <dmalcolm@redhat.com>
70 * c-attribs.c (common_handle_aligned_attribute): Add
71 auto_diagnostic_group instance.
72 * c-indentation.c (warn_for_misleading_indentation): Likewise.
73 * c-opts.c (c_common_post_options): Likewise.
74 * c-warn.c (warn_logical_not_parentheses): Likewise.
75 (warn_duplicated_cond_add_or_warn): Likewise.
76 (warn_for_multistatement_macros): Likewise.
78 2018-08-20 Nathan Sidwell <nathan@acm.org>
80 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
83 2018-08-17 Nathan Sidwell <nathan@acm.org>
85 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
87 (laxy_hex_fp_value_count): Make unsigned.
88 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
90 (builtin_defin_with_hex_fp_value): Adjust callback name, use
93 2018-08-17 David Malcolm <dmalcolm@redhat.com>
95 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
96 (gcc_dump_printf_length_specs): New.
97 (gcc_dump_printf_flag_pairs): New.
98 (gcc_dump_printf_flag_specs): New.
99 (gcc_dump_printf_char_table): New.
100 (format_types_orig): Add entry for "gcc_dump_printf".
101 (init_dynamic_diag_info): Set up length_char_specs and
102 conversion_specs for gcc_dump_printf_format_type.
103 (handle_format_attribute): Handle gcc_dump_printf_format_type.
105 2018-08-17 Nathan Sidwell <nathan@acm.org>
107 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
109 * c-ada-spec.c: Don't #include "cpp-id-data.h"
110 * c-cppbuiltin.c: Likewise.
112 2018-08-17 Martin Liska <mliska@suse.cz>
114 * c.opt: Remove Warn, Init and Report for options with
115 Ignore/Deprecated flag. Warning is done automatically for
118 2018-08-16 David Malcolm <dmalcolm@redhat.com>
121 * c-common.c (selftest::c_family_tests): Call
122 selftest::c_indentation_c_tests.
123 * c-common.h (selftest::c_indentation_c_tests): New decl.
124 * c-indentation.c: Include "selftest.h".
125 (next_tab_stop): Add "tab_width" param, rather than accessing
127 (get_visual_column): Likewise. Clarify comment. Bulletproof
128 against reading past the end of the line.
129 (get_first_nws_vis_column): Add "tab_width" param.
130 (detect_intervening_unindent): Likewise.
131 (should_warn_for_misleading_indentation): Read tab width from
132 cpp_opts and pass around.
133 (selftest::test_next_tab_stop): New test.
134 (selftest::assert_get_visual_column_succeeds): New function.
135 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
136 (selftest::assert_get_visual_column_fails): New function.
137 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
138 (selftest::test_get_visual_column): New test.
139 (selftest::c_indentation_c_tests): New function.
141 2018-08-16 Nathan Sidwell <nathan@acm.org>
143 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
144 (store_ada_macro): Likewise.
145 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
146 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
148 2018-08-15 David Malcolm <dmalcolm@redhat.com>
150 * c-format.c: Include "selftest-diagnostic.h" and
151 "gcc-rich-location.h".
152 (format_warning_at_char): Pass NULL for new label params of
154 (class indirection_suffix): New class.
155 (class range_label_for_format_type_mismatch): New class.
156 (format_type_warning): Move logic for generating "*" suffix to
157 class indirection_suffix. Create "fmt_label" and "param_label"
158 to show their types, and pass them to the
159 format_warning_at_substring calls.
160 (selftest::test_type_mismatch_range_labels): New test.
161 (selftest::c_format_c_tests): Call it.
163 2018-08-13 Martin Sebor <msebor@redhat.com>
165 PR tree-optimization/71625
166 * c-common.c (braced_list_to_string): New function.
167 * c-common.h (braced_list_to_string): Declare it.
169 2018-08-08 Nathan Sidwell <nathan@acm.org>
171 * c-common.c (try_to_locate_new_include_inertion_point): Use
172 linemap_included_from_linemap.
173 * c-lex.c (fe_file_change): Use linemap_included_from.
174 * c-ppoutput.c (pp_file_change): Likewise.
176 2018-08-01 Martin Sebor <msebor@redhat.com>
178 PR tree-optimization/86650
179 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
180 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
181 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
182 * c-format.h (T89_G): Update to be "gimple *" rather than
184 (local_gcall_ptr_node): Rename...
185 (local_gimple_ptr_node): ...to this.
187 2018-07-31 David Malcolm <dmalcolm@redhat.com>
189 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
190 table entries for gcc_diag_char_table, and the 'Z' entry from
191 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
192 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
193 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
194 adding missing "Z" for this table. Remove erroneous "G" and "K"
196 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
197 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
198 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
200 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
202 * c-common.c (speculation_safe_resolve_call): New function.
203 (speculation_safe_resolve_params): New function.
204 (speculation_safe_resolve_return): New function.
205 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
206 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
207 __HAVE_SPECULATION_SAFE_VALUE.
209 2018-07-20 David Malcolm <dmalcolm@redhat.com>
211 * c-common.c (c_cpp_error): Remove redundant "line_table"
212 parameter from call to rich_location::set_range.
213 (maybe_suggest_missing_token_insertion): Likewise.
215 2018-07-20 Martin Sebor <msebor@redhat.com>
218 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
220 2018-07-20 Martin Sebor <msebor@redhat.com>
223 * c-common.h (c_common_handle_option): Change function argument
225 * c-opts.c (c_common_init_options): Same.
226 (c_common_handle_option): Same. Remove special handling of
227 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
228 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
229 options to take a HOST_WIDE_INT argument and accept a byte-size
231 (-Wvla-larger-than): Same.
232 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
233 (-Wno-vla-larger-than): Same.
235 2018-07-12 Jakub Jelinek <jakub@redhat.com>
237 * c-attribs.c (c_common_attribute_table): Add
238 "omp declare target implicit" attribute.
240 2018-07-12 Richard Biener <rguenther@suse.de>
243 * c-attribs.c (handle_packed_attribute): Do not build a variant
244 type with TYPE_PACKED, instead ignore the attribute if we may
245 not apply to the original type.
247 2018-07-10 Jakub Jelinek <jakub@redhat.com>
250 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
251 to contain TREE_LIST for both the original class iterator and the
254 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
256 * c-ada-spec.c (to_ada_name): Remove index parameter.
257 (pp_ada_tree_identifier): Likewise.
258 (dump_ada_macros): Adjust call to to_ada_name.
259 (struct overloaded_name_hash): Delete.
260 (struct overloaded_name_hasher): Likewise.
261 (overloaded_names): Likewise.
262 (compute_overloading_index): Likewise.
263 (dump_ada_decl_name): Do not call compute_overloading_index and
264 adjust calls to pp_ada_tree_identifier.
265 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
266 (dump_ada_import): Add spc parameter and switch to aspect syntax.
267 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
268 (dump_ada_enum_type): Remove type and display_convention parameters.
269 Adjust calls to pp_ada_tree_identifier.
270 (dump_ada_node): Likewise and for dump_ada_structure.
271 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
273 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
275 (print_constructor): Adjust call to pp_ada_tree_identifier.
276 (print_destructor): Likewise.
277 (dump_ada_declaration): Switch to aspect syntax.
278 (dump_ada_structure): Likewise and tidy up. Replace display_convention
279 parameter with nested parameter.
280 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
281 (dump_ada_specs): Do not delete overloaded_names table.
283 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
286 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
289 2018-07-05 Nathan Sidwell <nathan@acm.org>
291 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
292 NO_IMPLICIT_EXTERN_C.
294 2018-06-28 Martin Liska <mliska@suse.cz>
296 * cppspec.c: Include opt-suggestions.h.
298 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
299 Thomas Schwinge <thomas@codesourcery.com>
300 Cesar Philippidis <cesar@codesourcery.com>
302 * c-pragma.h (enum pragma_omp_clause): Add
303 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
304 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
306 2018-06-20 Jakub Jelinek <jakub@redhat.com>
309 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
312 2018-06-18 Martin Sebor <msebor@redhat.com>
315 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
318 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
320 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
322 2018-06-13 Jason Merrill <jason@redhat.com>
324 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
325 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
328 PR c++/86094 - wrong code with defaulted move ctor.
329 * c-opts.c (c_common_post_options): Bump the current ABI version to
330 13. Set warn_abi_version and flag_abi_compat_version to the current
331 version rather than 0. Fix defaulting flag_abi_compat_version from
334 2018-06-12 Martin Sebor <msebor@redhat.com>
337 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
338 sizeof source and destination yields the same value.
340 2018-06-12 Martin Liska <mliska@suse.cz>
342 * c.opt: Make MPX-related options as Deprecated.
344 2018-06-08 David Malcolm <dmalcolm@redhat.com>
346 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
349 2018-06-08 Martin Liska <mliska@suse.cz>
351 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
352 for MPX (macros, related functions, fields in cgraph_node, ...).
353 (handle_bnd_legacy): Likewise.
354 (handle_bnd_instrument): Likewise.
357 2018-06-06 Jakub Jelinek <jakub@redhat.com>
360 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
361 __cpp_transactional_memory to 201500 instead of 210500.
363 2018-06-06 Jason Merrill <jason@redhat.com>
365 PR c++/85710 - ICE with -Wmemset-elt-size.
366 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
368 2018-06-01 Jason Merrill <jason@redhat.com>
370 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
373 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
375 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
376 declaration for a typedef independently of whether the declaration of
377 the subtype is generated.
379 2018-05-31 Martin Sebor <msebor@redhat.com>
382 * c.opt (-Wno-alloc-size-larger-than): New option.
384 2018-04-22 David Pagan <dave.pagan@oracle.com>
387 * c-opts.c (c_common_post_options): Set default for warn_return_type
388 for C++/C++ with ObjC extensions only. For C, makes it possible to
389 differentiate between default (no option), -Wreturn-type, and
392 2018-05-29 Jason Merrill <jason@redhat.com>
394 * c.opt (Winit-list-lifetime): New flag.
396 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
398 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
399 splay_tree_delete_pointers.
401 2018-05-26 Jakub Jelinek <jakub@redhat.com>
404 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
405 noinline variable to workaround broken kernel headers.
407 2018-05-18 Jason Merrill <jason@redhat.com>
409 * c.opt (Wdeprecated-copy): New flag.
411 2018-05-17 Martin Liska <mliska@suse.cz>
413 * c-warn.c (overflow_warning): Do not use
414 space in between 'G_' and '('.
416 2018-05-09 Jason Merrill <jason@redhat.com>
418 * c-common.c (valid_array_size_p): Add complain parameter.
419 * c-common.h: ...which defaults to true.
421 2018-05-11 Jakub Jelinek <jakub@redhat.com>
424 * c-omp.c (c_omp_predetermined_sharing): Return
425 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
427 2018-05-11 Martin Liska <mliska@suse.cz>
430 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
433 2018-05-10 Jakub Jelinek <jakub@redhat.com>
436 * c-common.h (fold_offsetof_1): Removed.
437 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
438 CTX argument defaulted to ERROR_MARK.
439 * c-common.c (fold_offsetof_1): Renamed to ...
440 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
441 argument, convert the pointer constant to TYPE and use size_binop
442 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
443 a pointer type. Adjust recursive calls.
445 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
448 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
450 2018-05-07 Nathan Sidwell <nathan@acm.org>
452 * c.opt (ffor-scope): Remove functionality, issue warning.
454 2018-05-03 Nathan Sidwell <nathan@acm.org>
456 * c.opt (ffriend-injection): Remove functionality, issue warning.
458 2018-05-01 David Malcolm <dmalcolm@redhat.com>
461 * c-format.c (struct format_check_results): Add field
463 (check_format_info): Initialize it, and warn if encountered.
464 (check_format_arg): Distinguish between wide char and
465 everything else when detecting arrays of non-char.
467 2018-04-30 David Malcolm <dmalcolm@redhat.com>
469 * c-format.c (get_corrected_substring): Update for
470 location_get_source_line returning a char_span. Use a char_span
471 when handling the prefix of the correction.
472 * c-indentation.c (get_visual_column): Update for
473 location_get_source_line returning a char_span.
474 (get_first_nws_vis_column): Likewise.
476 2018-03-29 David Malcolm <dmalcolm@redhat.com>
479 * known-headers.cc (get_stdlib_header_for_name): Add various names
480 from <assert.h>, <string.h>, and <memory.h>; add more names from
483 2018-03-27 Jakub Jelinek <jakub@redhat.com>
486 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
487 get_base_address of the second operand is a VAR_P, rather than the
488 operand itself, and use gcc_checking_assert instead of gcc_assert.
490 2018-03-23 Marek Polacek <polacek@redhat.com>
493 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
494 <case RDIV_EXPR>: Tweak condition.
496 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
498 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
500 2018-03-16 Jakub Jelinek <jakub@redhat.com>
503 * c-warn.c (conversion_warning): Replace "to to" with "to" in
507 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
510 2018-03-16 Richard Biener <rguenther@suse.de>
513 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
514 unshare the possibly folded expression.
516 2018-03-15 Richard Biener <rguenther@suse.de>
519 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
521 2018-03-13 Martin Sebor <msebor@redhat.com>
523 PR tree-optimization/84725
524 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
525 with all three narrow character types, including their qualified forms.
527 2018-03-12 Martin Sebor <msebor@redhat.com>
529 PR tree-optimization/83456
530 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
531 Restore checking of bounded built-in functions.
532 (check_function_arguments): Also return the result
533 of warn_for_restrict.
534 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
535 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
537 2018-03-02 Marek Polacek <polacek@redhat.com>
540 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
543 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
545 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
548 2018-03-01 Marek Polacek <polacek@redhat.com>
551 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
552 alignment in computation.
554 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
556 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
557 <REAL_TYPE>: Deal specifically with _Float128/__float128.
559 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
561 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
562 (is_char_array): Take a type instead of a declaration.
563 (dump_ada_array_type): Likewise.
564 (is_simple_enum): Minor tweak.
565 (dump_ada_enum_type): New function extracted from...
566 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
567 <INTEGER_TYPE>: Remove unreachable code.
568 <RECORD_TYPE>: Likewise. Minor tweaks.
569 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
570 <ENUMERAL_TYPE>: New case.
571 <RECORD_TYPE>: Factor out common code.
572 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
573 Minor tweaks. Deal with enumeral types.
574 (dump_ada_structure): Minor tweaks.
576 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
578 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
579 address for incomplete structures.
580 (dump_forward_type): Do not bail out for incomplete structures.
581 (dump_ada_declaration): Do not special-case incomplete structures
582 for subtypes. Dump them as null records for types.
584 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
586 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
587 (is_char_array): Fix formatting.
588 (dump_template_types): Likewise.
589 (dump_generic_ada_node): Rename into...
590 (dump_ada_node): ...this.
591 <POINTER_TYPE>: Remove superfluous space. Use generic address for
592 incomplete structures and not for empty structures. Do not use it
593 when forward declarations are needed.
594 (dump_forward_type): New function.
595 (dump_nested_types): Remove FORWARD parameter. Do not consider
596 TREE_VISITED and do not generate a forward declaration. Only dump
597 original nested types for nested declaration.
598 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
599 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
600 <RECORD_TYPE>: Do not consider TREE_VISITED.
601 (dump_ada_declaration): Use booleans and fix formatting throughout.
602 <TYPE_DECL>: Skip incomplete structures and not empty structures.
603 Call dump_forward_type instead of dump_nested_types for a typedef.
604 Remove superfluous check and adjust call to dump_nested_types.
605 <POINTER_TYPE>: Call dump_forward_type and fall through.
606 (dump_ada_struct_decl): Rename into...
607 (dump_ada_structure): ...this. Do not special-case empty structures.
609 2018-02-27 Martin Sebor <msebor@redhat.com>
612 * c.opt (-Wmissing-attributes): New option.
614 2018-02-21 Martin Liska <mliska@suse.cz>
616 * c.opt (Wcatch-value=): Add IntegerRange.
618 2018-02-15 Jason Merrill <jason@redhat.com>
620 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
622 2018-02-09 Nathan Sidwell <nathan@acm.org>
625 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
627 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
630 2018-02-09 Martin Sebor <msebor@redhat.com>
633 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
634 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
635 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
636 (-Wstrict-overflow, -Wsuggest-attribute): Same.
637 (-Wuninitialized): Same.
639 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
641 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
642 keyword for components.
644 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
646 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
648 2018-02-02 Julia Koval <julia.koval@intel.com>
650 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
652 2018-01-29 Marek Polacek <polacek@redhat.com>
655 * c-format.c (check_function_format): Check current_function_decl.
657 2018-01-27 Jakub Jelinek <jakub@redhat.com>
659 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
661 (LAZY_HEX_FP_VALUES_CNT): Define.
662 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
663 values rather than just 12.
664 (builtin_define_with_hex_fp_value): Likewise.
666 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
669 * c.opt (-fmacro-prefix-map): New option.
670 * c-opts.c (c_common_handle_option): Handle it.
671 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
672 * c-ppoutput.c (init_pp_output): Likewise.
674 2018-01-17 David Malcolm <dmalcolm@redhat.com>
677 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
679 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
681 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
682 Skip 'f' and 'F' characters if it is true.
683 (store_ada_macro): Minor tweak.
684 (dump_ada_macros) <CPP_COMMENT>: Likewise.
685 <CPP_WSTRING>: Likewise.
686 <CPP_STRING>: Output '&' in the buffer if not the first string.
687 <CPP_NUMBER>: Adjust calls to dump_number.
689 2018-01-10 David Malcolm <dmalcolm@redhat.com>
692 * c-common.c: Include "selftest.h".
693 (get_atomic_generic_size): Perform the test for integral type
694 before the range test for any integer constant, fixing indentation
695 of braces. Call fold_for_warn before testing for an INTEGER_CST.
696 (reject_gcc_builtin): Strip any location wrapper from EXPR.
697 (selftest::test_fold_for_warn): New function.
698 (selftest::c_common_c_tests): New function.
699 (selftest::c_family_tests): Call it, and
700 selftest::c_pretty_print_c_tests.
701 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
702 * c-format.c (check_format_arg): Convert VAR_P check to a
704 * c-pretty-print.c: Include "selftest.h".
705 (pp_c_cast_expression): Don't print casts for location wrappers.
706 (selftest::assert_c_pretty_printer_output): New function.
707 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
708 (selftest::test_location_wrappers): New function.
709 (selftest::c_pretty_print_c_tests): New function.
710 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
713 Alan Hayward <alan.hayward@arm.com>
714 David Sherwood <david.sherwood@arm.com>
716 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
718 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
719 Alan Hayward <alan.hayward@arm.com>
720 David Sherwood <david.sherwood@arm.com>
722 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
726 Alan Hayward <alan.hayward@arm.com>
727 David Sherwood <david.sherwood@arm.com>
729 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
730 (convert_vector_to_array_for_subscript): Handle polynomial
731 TYPE_VECTOR_SUBPARTS.
732 (c_common_type_for_mode): Check valid_vector_subparts_p.
733 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
736 2018-01-03 Jakub Jelinek <jakub@redhat.com>
738 Update copyright years.
740 2017-12-22 Mike Stump <mikestump@comcast.net>
741 Eric Botcazou <ebotcazou@adacore.com>
743 * c-pragma.c (init_pragma): Register pragma GCC unroll.
744 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
746 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
750 * c-semantics.c (only_debug_stmts_after_p): New.
751 (pop_stmt_list): Clear side effects in debug-only stmt list.
752 Check for single nondebug stmt followed by debug stmts only.
754 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
757 * c-semantics.c (pop_stmt_list): Propagate side effects from
758 single nondebug stmt to container list.
760 2017-12-19 Jakub Jelinek <jakub@redhat.com>
762 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
763 conditions with typical order conditions.
765 2017-12-18 Marek Polacek <polacek@redhat.com>
767 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
770 2017-12-17 Martin Sebor <msebor@redhat.com>
772 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
773 an error for attribute warn_if_not_aligned.
775 2017-12-16 Martin Sebor <msebor@redhat.com>
777 PR tree-optimization/78918
778 * c-common.c (check_function_restrict): Avoid checking built-ins.
779 * c.opt (-Wrestrict): Include in -Wall.
781 2017-12-15 Jakub Jelinek <jakub@redhat.com>
783 * c-attribs.c (c_common_attribute_table,
784 c_common_format_attribute_table): Swap affects_type_identity
785 and handler fields, adjust comments.
787 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
789 * c.opt (Wcast-function-type): New warning option.
790 * c-lex.c (get_fileinfo): Avoid warning.
791 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
793 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
796 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
797 Adjust the size of buf1 and buf2, add a new buf to avoid
798 format-overflow warning.
800 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
802 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
803 subsequent statement list.
805 2017-12-07 Martin Sebor <msebor@redhat.com>
809 * c-attribs.c (attr_aligned_exclusions): New array.
810 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
811 (attr_common_exclusions, attr_const_pure_exclusions): Same.
812 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
813 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
814 (attr_warn_unused_result_exclusions): Same.
815 (handle_hot_attribute, handle_cold_attribute): Simplify.
816 (handle_const_attribute): Warn on function returning void.
817 (handle_pure_attribute): Same.
818 (handle_aligned_attribute): Diagnose conflicting attribute
820 * c-warn.c (diagnose_mismatched_attributes): Simplify.
822 2017-12-06 David Malcolm <dmalcolm@redhat.com>
825 * c-common.c (selftest::c_family_tests): Call
826 selftest::c_spellcheck_cc_tests.
827 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
828 * c-spellcheck.cc: Include "selftest.h".
829 (name_reserved_for_implementation_p): New function.
830 (should_suggest_as_macro_p): New function.
831 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
832 should_suggest_as_macro_p and call it.
833 (selftest::test_name_reserved_for_implementation_p): New function.
834 (selftest::c_spellcheck_cc_tests): New function.
835 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
837 2017-12-06 David Malcolm <dmalcolm@redhat.com>
839 * c-spellcheck.cc: New file, taken from macro-handling code in
841 * c-spellcheck.h: New file, taken from macro-handling code in
844 2017-12-01 Jakub Jelinek <jakub@redhat.com>
846 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
848 (handle_simd_attribute): Don't check for "cilk simd function"
849 attribute. Reindent, formatting changes.
851 2017-11-30 Julia Koval <julia.koval@intel.com>
853 * c-common.h (inv_list): Remove.
855 2017-11-28 Jakub Jelinek <jakub@redhat.com>
858 * c-common.c (c_switch_covers_all_cases_p_1,
859 c_switch_covers_all_cases_p): New functions.
860 * c-common.h (c_switch_covers_all_cases_p): Declare.
862 2017-11-28 Julia Koval <julia.koval@intel.com>
863 Sebastian Peryt <sebastian.peryt@intel.com>
865 * array-notation-common.c: Delete.
866 * c-cilkplus.c: Ditto.
867 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
868 * c-common.def (ARRAY_NOTATION_REF): Remove.
869 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
870 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
871 c_validate_cilk_plus_loop, cilkplus_an_parts,
872 cilk_ignorable_spawn_rhs_op,
873 cilk_recognize_spawn): Remove.
874 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
875 * c-omp.c: Remove CILK_SIMD check.
877 * c-pragma.h: Remove CILK related pragmas.
878 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
879 ARRAY_NOTATION_REF condition.
880 (c_pretty_printer::expression): Ditto.
881 * c.opt (fcilkplus): Remove.
884 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
886 * c-pretty-print.c (pp_c_additive_expression,
887 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
889 2017-11-21 Jakub Jelinek <jakub@redhat.com>
891 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
894 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
895 instead of tree_to_uhwi, formatting fix.
897 2017-11-20 David Malcolm <dmalcolm@redhat.com>
900 * known-headers.cc: New file, based on material from c/c-decl.c.
901 (suggest_missing_header): Copied as-is.
902 (get_stdlib_header_for_name): New, based on get_c_name_hint but
903 heavily edited to add C++ support. Add some knowledge about
904 <limits.h>, <stdint.h>, and <wchar.h>.
905 * known-headers.h: Likewise.
907 2017-11-20 David Malcolm <dmalcolm@redhat.com>
909 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
910 (lookup_name_fuzzy): Likewise. Convert return type from
911 const char * to name_hint. Add location_t param.
912 * name-hint.h: New header.
914 2017-11-19 Jakub Jelinek <jakub@redhat.com>
918 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
920 2017-11-16 Joseph Myers <joseph@codesourcery.com>
922 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
923 expected publication date of C17.
924 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
926 2017-11-15 Joseph Myers <joseph@codesourcery.com>
929 * c-common.c (c_common_reswords): Add __builtin_tgmath.
930 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
932 2017-11-10 Martin Sebor <msebor@redhat.com>
935 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
936 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
937 * c.opt (-Wstringop-truncation): New option.
939 2017-11-06 Martin Liska <mliska@suse.cz>
942 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
944 * c.opt: Set default value of warn_return_type.
946 2017-10-31 David Malcolm <dmalcolm@redhat.com>
948 * c-common.c (binary_op_error): Update for renaming of
950 (c_parse_error): Likewise.
951 * c-warn.c (warn_logical_not_parentheses): Likewise for
952 renaming of inform_at_rich_loc.
953 (warn_for_restrict): Likewise for renaming of
954 warning_at_rich_loc_n.
956 2017-10-30 Joseph Myers <joseph@codesourcery.com>
958 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
959 * c-opts.c (set_std_c17): New function.
960 (c_common_init_options): Use gnu17 as default C version.
961 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
963 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
965 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
966 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
967 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
970 2017-10-23 Marek Polacek <polacek@redhat.com>
973 * c-warn.c (warnings_for_convert_and_check): Fix typos.
975 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
977 * c-common.c (check_builtin_function_arguments): Also check arguments
978 of __builtin_alloca_with_align_and_max.
980 2017-10-17 David Malcolm <dmalcolm@redhat.com>
982 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
983 rather than NULL to format_warning_va.
984 (check_format_types): Likewise when calling format_type_warning.
985 Remove code to extract source_ranges and source_range * in favor
986 of just a location_t.
987 (format_type_warning): Convert source_range * param to a
990 2017-10-13 Jakub Jelinek <jakub@redhat.com>
992 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
995 2017-10-12 David Malcolm <dmalcolm@redhat.com>
997 * c-common.c (enum missing_token_insertion_kind): New enum.
998 (get_missing_token_insertion_kind): New function.
999 (maybe_suggest_missing_token_insertion): New function.
1000 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1002 2017-10-11 Nathan Sidwell <nathan@acm.org>
1004 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1005 (c_common_handle_option): Update incpath_kind names.
1007 2017-10-11 Martin Liska <mliska@suse.cz>
1010 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1011 Wattributes warning.
1013 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1015 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1016 operating on trees as wide_ints.
1017 * c-common.c (pointer_int_sum): Likewise.
1018 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1019 * c-warn.c (match_case_to_enum_1): Likewise.
1020 (c_do_switch_warnings): Likewise.
1021 (maybe_warn_shift_overflow): Likewise.
1023 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1026 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1027 instead of wide_int::from.
1029 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1032 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1033 using to_widest use wide_int with the larger of the two precisions.
1035 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1037 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1040 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1042 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1043 when combining the original unconverted comparison operands.
1045 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1047 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1050 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1052 * c-ada-spec.c (to_ada_name): Add index parameter.
1053 (pp_ada_tree_identifier): Likewise.
1054 (dump_ada_macros): Adjust call to to_ada_name.
1055 (struct overloaded_name_hash): New type.
1056 (struct overloaded_name_hasher): Likewise.
1057 (overloaded_names): New hash table.
1058 (compute_overloading_index): New function.
1059 (dump_ada_decl_name): Call it and pass the result to
1060 pp_ada_tree_identifier.
1061 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1062 (dump_ada_function_declaration): Likewise.
1063 (dump_generic_ada_node): Likewise.
1064 (print_constructor): Likewise.
1065 (print_destructor): Likewise.
1066 (dump_ada_specs): Delete overloaded_names table.
1068 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1070 * c-ada-spec.c (max_ada_macros): Move around.
1071 (store_ada_macro_index): Likewise.
1072 (source_file): Rename into...
1073 (macro_source_file): ...this.
1074 (count_ada_macro): Move around.
1075 (store_ada_macro): Likewise.
1076 (compare_macro): Likewise.
1077 (print_ada_macros): Merge in...
1078 (dump_ada_macros): ...this.
1079 (source_file_base): Rename into...
1080 (current_source_file): ...this.
1081 (print_comment): Move around.
1082 (dump_ada_nodes): Call dump_ada_declaration directly.
1083 (struct with): Change type of limited field to bool.
1084 (append_withs): Change type of limited_access parameter to bool.
1085 (pp_ada_tree_identifie): Likewise.
1086 (dump_ada_decl_nam): Likewise.
1087 (dump_generic_ada_node): Likewise. Do not print the return type.
1088 (to_ada_name): Change type of space_found parameter to bool.
1089 (dump_ada_function_declaration): Return void and change type of
1090 parameters to bool. Also print the return type for a function.
1091 (print_ada_methods): Rename into...
1092 (dump_ada_methods): ...this.
1093 (print_ada_declaration): Rename into ...
1094 (dump_ada_declaration): ...this. Do not print the return type.
1095 (print_ada_struct_decl): Rename into...
1096 (dump_ada_struct_decl): ...this.
1098 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1100 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1101 rather than DECL_INITIAL.
1102 (common_handle_aligned_attribute): Likewise.
1104 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1106 * c.opt (gen-decls): Add RejectNegative.
1108 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1109 Jakub Jelinek <jakub@redhat.com>
1111 Add support for -std=c++2a.
1112 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1113 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1114 * c-opts.c (set_std_cxx2a): New.
1115 (c_common_handle_option): Set options when -std=c++2a is enabled.
1116 (c_common_post_options): Adjust comments.
1117 (set_std_cxx14, set_std_cxx17): Likewise.
1119 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1121 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1122 message for non-uniform endianness and issue a warning in C++.
1124 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1126 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1127 (Wc++17-compat): Change from undocumented alias to option.
1128 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1129 change C++1z to C++17 in description.
1130 (std=c++1z, std=gnu++1z): Change from option to undocumented
1132 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1134 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1135 * c-opts.c (set_std_cxx1z): Rename to ...
1136 (set_std_cxx17): ... this.
1137 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1138 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1140 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1143 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1145 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1146 function alignment if warn_if_not_aligned_p is true.
1148 2017-09-12 Nathan Sidwell <nathan@acm.org>
1150 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1151 resort_sorted_fields): Move to c/c-decl.c.
1152 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1153 (struct sorted_fields_type): Move to c/c-lang.h.
1155 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1158 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1160 2017-09-04 Marek Polacek <polacek@redhat.com>
1163 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1164 (warn_tautological_cmp): Call it.
1166 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1168 * c-opts.c (c_common_finish): Write dependency information even if
1171 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1174 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1175 (omp_pragmas_simd): ... here.
1176 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1177 create new clauses list containing just simd clause.
1179 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1180 Alan Hayward <alan.hayward@arm.com>
1181 David Sherwood <david.sherwood@arm.com>
1183 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1184 into scalar_mode_supported_p call.
1185 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1187 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1188 Alan Hayward <alan.hayward@arm.com>
1189 David Sherwood <david.sherwood@arm.com>
1191 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1192 for the mode iterator.
1194 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1195 Alan Hayward <alan.hayward@arm.com>
1196 David Sherwood <david.sherwood@arm.com>
1198 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1199 * c-common.c (c_build_vec_perm_expr): Likewise.
1201 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1202 Alan Hayward <alan.hayward@arm.com>
1203 David Sherwood <david.sherwood@arm.com>
1205 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1207 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1208 Alan Hayward <alan.hayward@arm.com>
1209 David Sherwood <david.sherwood@arm.com>
1211 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1212 before calling targetm.addr_space.valid_pointer_mode.
1214 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1215 Alan Hayward <alan.hayward@arm.com>
1216 David Sherwood <david.sherwood@arm.com>
1218 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1220 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1221 Alan Hayward <alan.hayward@arm.com>
1222 David Sherwood <david.sherwood@arm.com>
1224 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1226 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1228 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1229 Alan Hayward <alan.hayward@arm.com>
1230 David Sherwood <david.sherwood@arm.com>
1232 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1235 2017-08-29 Martin Liska <mliska@suse.cz>
1238 * c-common.c (parse_optimize_options): Add argument to function
1240 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1242 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1244 * c-lex.c (interpret_float): Use token location
1245 when building an EXCESS_PRECISION_EXPR.
1247 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1249 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1250 it to check_function_format.
1251 * c-common.h (check_function_arguments): Add vec<location_t> *
1253 (check_function_format): Likewise.
1254 * c-format.c (struct format_check_context): Add field "arglocs".
1255 (check_function_format): Add param "arglocs"; pass it to
1257 (check_format_info): Add param "arglocs"; use it to initialize
1258 new field of format_ctx.
1259 (check_format_arg): Pass format_ctx->arglocs to new param of
1260 check_format_info_main.
1261 (class argument_parser): New field "arglocs".
1262 (argument_parser::argument_parser): Add "arglocs_" param and use
1263 it to initialize new field.
1264 (argument_parser::check_argument_type): Pass new arglocs field to
1266 (check_format_info_main): Add param "arglocs", and use it when
1267 constructing arg_parser.
1268 (check_format_types): Add param "arglocs"; use it if non-NULL when
1269 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1271 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1274 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1275 (c_common_attribute_table): Add warn_if_not_aligned.
1276 (handle_aligned_attribute): Renamed to ...
1277 (common_handle_aligned_attribute): Remove argument, name, and add
1278 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1279 (handle_aligned_attribute): New.
1280 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1282 2017-08-14 Martin Sebor <msebor@redhat.com>
1285 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1286 (handle_nonstring_attribute): New function.
1288 2017-08-14 Martin Sebor <msebor@redhat.com>
1291 * c-format.h (T89_G): New macro.
1292 * c-format.c (local_gcall_ptr_node): New variable.
1293 (init_dynamic_diag_info): Initialize it.
1295 2017-08-11 Martin Liska <mliska@suse.cz>
1297 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1298 TARGET_SUPPORTS_ALIASES.
1300 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1302 * c-common.c (c_parse_error): Add rich_location * param, using it
1303 rather implicitly using input_location.
1304 * c-common.h (c_parse_error): Add rich_location * param.
1306 2017-08-09 Marek Polacek <polacek@redhat.com>
1308 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1309 (c_common_truthvalue_conversion): Likewise.
1310 * c-omp.c (c_finish_omp_atomic): Likewise.
1311 * c-common.h (build_binary_op): Update declaration.
1313 2017-08-08 Martin Liska <mliska@suse.cz>
1315 * c-ada-spec.c: Include header files.
1316 * c-ubsan.c: Likewise.
1317 * c-warn.c: Likewise.
1319 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1322 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1324 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1326 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1327 (print_ada_methods): Likewise.
1328 (print_ada_declaration): Likewise.
1330 2017-08-07 Martin Liska <mliska@suse.cz>
1332 * array-notation-common.c: Add new includes.
1333 * c-format.c( handle_format_attribute): Canonicalize a format
1335 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1337 * c-pretty-print.c: Add new include.
1339 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1341 * c-ada-spec.c (has_static_fields): Look only into variables.
1342 (print_constructor): Add TYPE parameter and use it for the name.
1343 (print_destructor): Likewise.
1344 (print_ada_declaration): Adjust to new constructor/destructor names.
1345 Adjust calls to print_constructor and print_destructor.
1346 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1347 Look only into variables in the final loop.
1349 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1351 * c-ada-spec.c (has_static_fields): Look only into fields.
1352 (dump_generic_ada_node): Small tweak.
1353 (dump_nested_types): Look only into fields.
1354 (print_ada_declaration): Look only into methods. Small tweak.
1355 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1357 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1359 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1360 (dump_ada_function_declaration): Likewise.
1361 (dump_generic_ada_node): Likewise.
1362 (print_ada_declaration): Add support for const-qualified variables.
1364 2017-07-31 Martin Liska <mliska@suse.cz>
1367 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1368 Guard condition with flag_sanitize_p also with current_function_decl
1370 (ubsan_maybe_instrument_reference_or_call): Likewise.
1372 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1374 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1376 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1378 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1380 (print_ada_declaration): Add missing guard for record types.
1382 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1385 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1386 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1387 new COMPOUND_EXPRs around the rhs of the comparison.
1389 2017-07-27 Marek Polacek <polacek@redhat.com>
1392 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1395 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1397 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1398 (handle_noipa_attribute): New function.
1400 2017-07-07 Torsten Duwe <duwe@suse.de>
1402 * c-attribs.c (c_common_attribute_table): Add entry for
1403 "patchable_function_entry".
1405 2017-07-20 Nathan Sidwell <nathan@acm.org>
1407 Remove TYPE_METHODS.
1408 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1409 dump_ada_template, print_ada_methods,
1410 print_ada_declaration): Member fns are on TYPE_FIELDS.
1412 2017-07-18 Nathan Sidwell <nathan@acm.org>
1414 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1416 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1418 * c-common.c (try_to_locate_new_include_insertion_point): New
1420 (per_file_includes_t): New typedef.
1421 (added_includes_t): New typedef.
1422 (added_includes): New variable.
1423 (maybe_add_include_fixit): New function.
1424 * c-common.h (maybe_add_include_fixit): New decl.
1426 2017-07-10 Martin Sebor <msebor@redhat.com>
1429 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1431 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1433 * c-common.c (selftest::c_family_tests): New.
1434 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1435 (selftest::c_family_tests): New decl.
1437 2017-07-04 Marek Polacek <polacek@redhat.com>
1440 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1443 2017-07-04 Marek Polacek <polacek@redhat.com>
1445 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1447 2017-06-28 Martin Liska <mliska@suse.cz>
1450 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1451 to a function declaration.
1453 2017-06-28 Martin Liska <mliska@suse.cz>
1456 * c.opt: Add IntegerRange to various options.
1458 2017-06-26 Marek Polacek <polacek@redhat.com>
1461 * c-common.h (warn_for_multistatement_macros): Declare.
1462 * c-warn.c: Include "c-family/c-indentation.h".
1463 (warn_for_multistatement_macros): New function.
1464 * c.opt (Wmultistatement-macros): New option.
1465 * c-indentation.c (guard_tinfo_to_string): No longer static.
1466 Change the parameter type to "enum rid". Handle RID_SWITCH.
1467 * c-indentation.h (guard_tinfo_to_string): Declare.
1469 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1471 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1473 2017-06-15 Martin Sebor <msebor@redhat.com>
1476 * c.opt (-Wclass-memaccess): New option.
1478 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1480 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1482 2017-06-13 Marek Polacek <polacek@redhat.com>
1485 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1488 2017-06-13 Martin Liska <mliska@suse.cz>
1491 * c-attribs.c (add_no_sanitize_value): New function.
1492 (handle_no_sanitize_attribute): Likewise.
1493 (handle_no_sanitize_address_attribute): Use the function.
1494 (handle_no_sanitize_thread_attribute): New function.
1495 (handle_no_address_safety_analysis_attribute): Use
1496 add_no_sanitize_value.
1497 (handle_no_sanitize_undefined_attribute): Likewise.
1498 * c-common.h: Declare new functions.
1499 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1500 (ubsan_instrument_shift): Likewise.
1501 (ubsan_instrument_bounds): Likewise.
1502 (ubsan_maybe_instrument_array_ref): Likewise.
1503 (ubsan_maybe_instrument_reference_or_call): Likewise.
1505 2017-06-11 Jason Merrill <jason@redhat.com>
1507 * c-ada-spec.c, c-pragma.c: Use id_equal.
1509 2017-06-04 Marek Polacek <polacek@redhat.com>
1512 * c-format.c (matching_type_p): Return false if any of the types
1513 requires structural equality.
1515 2017-06-02 Martin Sebor <msebor@redhat.com>
1518 * c-warn.c (conversion_warning): Use -Wconversion for integer
1519 conversion and -Wfloat-conversion for floating one.
1521 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1523 * c.opt (Wsizeof-pointer-div): New warning option.
1525 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1527 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1528 (Wcatch-value=1): Enable by -Wall.
1530 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1532 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1534 * c.opt (fdiagnostics-show-template-tree): New option.
1535 (felide-type): New option.
1537 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1539 * c.opt (Wcatch-value=): New C++ warning flag.
1541 2017-05-24 Nathan Sidwell <nathan@acm.org>
1543 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1544 const casts to avoid warning.
1546 2017-05-24 Martin Sebor <msebor@redhat.com>
1549 * c-common.h (unsafe_conversion_p): Add a function argument.
1550 * c-common.c (unsafe_conversion_p): Same.
1551 Add type names and values to diagnostics.
1552 (scalar_to_vector): Adjust.
1553 * c-warn.c (constant_expression_error): Add a function argument.
1554 Add type names and values to diagnostics.
1555 (conversion_warning): Add a function argument.
1556 Add type names and values to diagnostics.
1557 (warnings_for_convert_and_check): Same.
1559 2017-05-19 Jason Merrill <jason@redhat.com>
1561 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1564 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1566 * c-format.c (locus): Move out of function scope,
1569 2017-05-19 Nathan Sidwell <nathan@acm.org>
1571 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1572 (c_common_parse_file): Remove class dump handling.
1573 (get_dump_info): Likewise.
1575 2017-05-19 Richard Biener <rguenther@suse.de>
1578 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1579 to alias-set zero memory.
1581 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1583 * c-format.c (local_tree_type_node): Add GTY attribute.
1585 2017-05-18 Marek Polacek <polacek@redhat.com>
1587 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1588 (c_common_fixed_point_type_for_size): Likewise.
1589 (c_common_type_for_mode): Likewise.
1590 (shorten_compare): Likewise.
1591 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1592 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1594 2017-05-18 Marek Polacek <polacek@redhat.com>
1596 * c-common.c (self_promoting_args_p): Change the return type to bool.
1597 Use false/true instead of 0/1.
1598 * c-common.h (self_promoting_args_p): Update.
1600 2017-05-17 Marek Polacek <polacek@redhat.com>
1602 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1603 * c-warn.c: Likewise.
1605 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1607 Implement new C++ intrinsics __is_assignable and __is_constructible.
1608 * c-common.c (__is_assignable, __is_constructible): New.
1609 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1611 2017-05-17 Martin Liska <mliska@suse.cz>
1613 * c-common.h: Introduce dump_flags_t type and
1614 use it instead of int type.
1615 * c-gimplify.c (c_genericize): Likewise.
1616 * c-opts.c: Likewise.
1618 2017-05-17 Marek Polacek <polacek@redhat.com>
1620 * c-common.c (c_save_expr): Remove.
1621 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1622 * c-common.h (c_save_expr): Remove declaration.
1624 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1627 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1628 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1629 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1630 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1632 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1634 2017-05-09 Marek Polacek <polacek@redhat.com>
1637 * c-warn.c (unwrap_c_maybe_const): New.
1638 (warn_logical_operator): Call it.
1640 2017-05-09 Nathan Sidwell <nathan@acm.org>
1642 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1643 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1645 2017-05-08 Martin Sebor <msebor@redhat.com>
1647 PR translation/80280
1648 * c-format.h (struct format_flag_spec): Add new member.
1650 * c-format.c (local_tree_type_node): New global.
1651 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1652 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1653 (strfmon_flag_specs): Likewise.
1654 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1655 with distinct quoting properties.
1656 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1657 (flag_chars_t::validate): Add argument and handle bad quoting.
1658 (check_format_info_main): Handle quoting problems.
1659 (init_dynamic_diag_info): Simplify.
1661 2017-05-08 Jason Merrill <jason@redhat.com>
1663 * c-opts.c (c_common_post_options): Update defaults for
1664 flag_abi_version and flag_abi_compat_version.
1666 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1668 * c-common.c (c_cpp_error): Replace report_diagnostic
1669 with diagnostic_report_diagnostic.
1671 2017-05-04 Martin Sebor <msebor@redhat.com>
1673 PR translation/80280
1674 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1675 (handle_weakref_attribute): Same.
1677 2017-05-03 Nathan Sidwell <nathan@acm.org>
1679 Canonicalize canonical type hashing
1680 * c-common.c (complete_array_type): Use type_hash_canon.
1682 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1685 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1687 (cilk_install_body_pedigree_operations): Likewise.
1688 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1690 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1691 (cilk_install_body_pedigree_operations): Likewise.
1692 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1695 2017-04-27 Jakub Jelinek <jakub@redhat.com>
1698 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1699 flag on non-aggregate element types.
1701 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1703 * c-common.c (c_type_hasher, type_hash_table): Remove.
1704 (c_common_get_alias_set): Remove unreachable code.
1705 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1707 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1709 * c.opt (Wextra-semi): New C++ warning flag.
1711 2017-04-20 Jakub Jelinek <jakub@redhat.com>
1714 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1716 2017-04-18 Jakub Jelinek <jakub@redhat.com>
1720 * c-common.c (c_common_type_for_mode): Don't handle
1721 widest_*_literal_type_node here.
1722 c_common_signed_or_unsigned_type): Likewise.
1723 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1724 to *intTI_type_node or *intDI_type_node depending on whether
1725 TImode is supported by the target or not.
1727 2017-04-10 Martin Liska <mliska@suse.cz>
1730 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1731 doing an UBSAN check.
1733 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1735 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1737 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1740 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1742 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1743 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1746 2017-03-31 David Malcolm <dmalcolm@redhat.com>
1748 PR documentation/78732
1749 * c.opt (Wendif-labels): Fix description to refer to
1750 #else rather than #elif.
1752 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1755 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1756 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1758 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1761 * c-common.c (c_common_mark_addressable_vec): Don't set
1762 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1764 2017-03-21 Martin Sebor <msebor@redhat.com>
1767 * c-common.c (set_underlying_type): Mark type used only when
1768 original del is declared unused.
1770 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1772 PR translation/79848
1773 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1776 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1779 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1780 from inform's message, so that xgettext can locate it.
1782 2017-03-09 Marek Polacek <polacek@redhat.com>
1786 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1787 conversion to the attribute list.
1789 2017-03-09 Martin Liska <mliska@suse.cz>
1791 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1793 2017-03-03 Jason Merrill <jason@redhat.com>
1795 * c.opt (Wnoexcept-type): New.
1797 2017-03-02 Richard Biener <rguenther@suse.de>
1800 * c-common.c (c_common_mark_addressable_vec): Look through
1803 2017-02-28 Martin Liska <mliska@suse.cz>
1805 * c.opt: Replace space with tabular for options of <number>
1808 2017-02-28 Martin Liska <mliska@suse.cz>
1810 * c.opt: Fix --help=option -Q for options which are of
1813 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1816 * c-common.c (check_function_restrict): New function.
1817 (check_function_arguments): Add FNDECL argument. Call
1818 check_function_restrict if -Wrestrict.
1819 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1820 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1821 * c-common.h (check_function_arguments): Add FNDECL argument.
1822 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1824 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1826 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1827 treatment of parameters with pointer-to-tagged type and tidy up.
1828 (print_ada_methods): Remove the special treatment of C++ static member
1831 2017-02-22 Martin Liska <mliska@suse.cz>
1833 * c.opt: Replace inequality signs with square brackets
1836 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1839 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1842 2017-02-17 Joseph Myers <joseph@codesourcery.com>
1844 * c-cppbuiltin.c (builtin_define_float_constants): Define
1845 __DECIMAL_DIG__ to the value for long double.
1847 2017-02-15 Marek Polacek <polacek@redhat.com>
1850 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1851 conversion has occured.
1853 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1855 * c-common.c (c_common_reswords): Add "__RTL".
1856 * c-common.h (enum rid): Add RID_RTL.
1858 2017-01-20 Marek Polacek <polacek@redhat.com>
1861 * c-common.h (do_warn_duplicated_branches_r): Declare.
1862 * c-gimplify.c (c_genericize): Walk the function tree calling
1863 do_warn_duplicated_branches_r.
1864 * c-warn.c (expr_from_macro_expansion_r): New.
1865 (do_warn_duplicated_branches): New.
1866 (do_warn_duplicated_branches_r): New.
1867 * c.opt (Wduplicated-branches): New option.
1869 2017-01-17 David Malcolm <dmalcolm@redhat.com>
1872 * c-indentation.c (warn_for_misleading_indentation): Use the past
1873 subjunctive in the note.
1875 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1878 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1879 start type to integer_type.
1881 2017-01-16 Jakub Jelinek <jakub@redhat.com>
1884 * c.opt (gen-decls): Add Driver flag.
1886 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1889 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1892 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1894 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1897 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1899 2017-01-12 Martin Sebor <msebor@redhat.com>
1901 (-Wformat-overflow): ...to this.
1903 2017-01-11 Martin Sebor <msebor@redhat.com>
1906 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1907 Also enable for LTO.
1909 2017-01-10 Jason Merrill <jason@redhat.com>
1911 Implement P0195R2, C++17 variadic using.
1912 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1914 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1916 PR translation/79019
1917 PR translation/79020
1918 * c.opt (Wnormalized=): Fix typo in description.
1920 2017-01-08 Martin Sebor <msebor@redhat.com>
1923 * c.opt (-Wformat-truncation): New option.
1925 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1927 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1928 value to unsigned short to fit in 4 hex digits without
1931 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1933 * c.opt (fsso-struct): Add 'native' value.
1935 2017-01-05 Martin Liska <mliska@suse.cz>
1938 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1941 2017-01-04 Marek Polacek <polacek@redhat.com>
1944 * c.opt (Wpointer-compare): New option.
1946 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1949 * c.opt (fsso-struct=): Add RejectNegative.
1951 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1953 Update copyright years.
1955 2016-12-29 Martin Liska <mliska@suse.cz>
1958 * c.opt (strong-eval-order): Add RejectNegative keyword.
1960 2016-12-22 Jason Merrill <jason@redhat.com>
1962 Implement P0522R0, matching of template template arguments.
1963 * c-cppbuiltin.c (c_cpp_builtins): Define
1964 __cpp_template_template_args.
1966 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1969 * c-common.c (struct nonnull_arg_ctx): New type.
1970 (check_function_nonnull): Return bool instead of void. Use
1971 nonnull_arg_ctx as context rather than just location_t.
1972 (check_nonnull_arg): Adjust for the new context type, set
1973 warned_p to true if a warning has been diagnosed.
1974 (check_function_arguments): Return bool instead of void.
1975 * c-common.h (check_function_arguments): Adjust prototype.
1977 2016-12-21 Jason Merrill <jason@redhat.com>
1979 * c.opt (-fnew-ttp-matching): New flag.
1980 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1982 2016-12-14 Martin Jambor <mjambor@suse.cz>
1984 * c-omp.c: Include omp-general.h instead of omp-low.h.
1985 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1988 2016-12-14 Martin Sebor <msebor@redhat.com>
1991 * c-common.c (check_nonnull_arg): Disable when optimization
1994 2016-12-12 Marek Polacek <polacek@redhat.com>
1997 * c-common.c (attribute_fallthrough_p): Return false for
2000 2016-12-08 Martin Sebor <msebor@redhat.com>
2003 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2005 2016-12-08 Martin Sebor <msebor@redhat.com>
2008 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2011 2016-12-07 Martin Sebor <msebor@redhat.com>
2017 * c.opt (-Wstringop-overflow): New option.
2019 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2021 * c-attribs.c (asan odr indicator): New attribute.
2022 (handle_asan_odr_indicator_attribute): New function.
2024 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2026 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2029 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2031 * c-common.c (excess_precision_mode_join): New.
2032 (c_ts18661_flt_eval_method): New.
2033 (c_c11_flt_eval_method): Likewise.
2034 (c_flt_eval_method): Likewise.
2035 * c-common.h (excess_precision_mode_join): New.
2036 (c_flt_eval_method): Likewise.
2037 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2038 (cpp_iec_559_value): Call it.
2039 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2040 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2041 __FLT_EVAL_METHOD_TS_18661_3__.
2043 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2045 * c-opts.c (c_common_post_options): Add logic to handle the default
2046 case for -fpermitted-flt-eval-methods.
2048 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2050 * c.opt (Wexpansion-to-defined): New.
2052 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2055 * c-pragma.c (handle_pragma_target): Don't replace
2056 current_target_pragma, but chainon the new args to the current one.
2058 2016-11-22 Nathan Sidwell <nathan@acm.org>
2060 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2061 indentation and formatting.
2063 2016-11-21 Martin Sebor <msebor@redhat.com>
2065 * c.opt (-fprintf-return-value): Enable by default.
2067 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2070 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2071 * c-common.c (c_common_nodes_and_builtins): Initialize
2072 const_tm_ptr_type_node.
2074 2016-11-16 Marek Polacek <polacek@redhat.com>
2077 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2079 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2081 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2083 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2084 Richard Biener <rguenther@suse.de>
2086 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2087 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2088 * c.opt (fgimple): New option.
2090 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2093 * c-common.h (warn_for_restrict): Declare.
2094 * c-warn.c: Include gcc-rich-location.h.
2095 (warn_for_restrict): New function.
2096 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2097 (gcc_cdiag_char_table): Likewise.
2098 (gcc_cxxdiag_char_table): Likewise.
2099 * c.opt (Wrestrict): New option.
2101 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2103 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2104 for nested types only if the type is a record or union and dump SLOC.
2106 2016-11-09 Jason Merrill <jason@redhat.com>
2108 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2110 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2112 * c-ubsan.c (ubsan_instrument_shift): Handle split
2113 -fsanitize=shift-base and -fsanitize=shift-exponent.
2115 2016-11-07 Jason Merrill <jason@redhat.com>
2117 * c.opt (Wc++1z-compat): New.
2118 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2120 2016-11-07 Martin Liska <mliska@suse.cz>
2122 * c-warn.c (warn_for_unused_label): Save all labels used
2123 in goto or in &label.
2125 2016-11-03 Jason Merrill <jason@redhat.com>
2127 * c-cppbuiltin.c (c_cpp_builtins): Correct
2128 __cpp_inheriting_constructors.
2130 2016-11-01 Jason Merrill <jason@redhat.com>
2132 * c-cppbuiltin.c (c_cpp_builtins): Update
2133 __cpp_inheriting_constructors.
2135 * c.opt (-fnew-inheriting-ctors): New.
2136 * c-opts.c: Default to on for ABI 11+.
2138 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2141 * c.opt (fext-numeric-literals): Add Var and Init.
2142 * c-opts.c (c_common_handle_option): Don't clear
2143 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2144 (c_common_post_options): Clear it here if not set
2147 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2150 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2153 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2155 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2156 * c-common.c (c_common_reswords): Add __builtin_launder.
2158 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2160 * c-common.c (c_common_truthvalue_conversion): Warn for
2161 multiplications in boolean context. Fix the quoting of '<<' and '<'
2162 in the shift warning.
2164 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2166 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2168 2016-10-20 Jason Merrill <jason@redhat.com>
2170 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2172 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2174 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2175 integer shift ops in boolean context.
2177 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2179 * c.opt (Walloca): New.
2180 (Walloca-larger-than=): New.
2181 (Wvla-larger-than=): New.
2183 2016-10-17 Marek Polacek <polacek@redhat.com>
2185 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2186 Return immediately when finding a match.
2187 (warn_tautological_cmp): Remove a boolean variable that is no longer
2190 2016-10-17 Marek Polacek <polacek@redhat.com>
2192 * c-attribs.c: New file.
2193 * c-common.c: Move attributes handling to c-attribs.c.
2194 (get_nonnull_operand): No longer static.
2195 * c-common.h: Move the declarations from c-attribs.c to its own section.
2197 2016-10-14 Jason Merrill <jason@redhat.com>
2199 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2200 and __cpp_deduction_guides.
2202 2016-10-13 Jason Merrill <jason@redhat.com>
2204 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2206 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2208 * c-cppbuiltin.c: Include memmodel.h.
2209 * c-opts.c: Likewise.
2210 * c-pragma.c: Likewise.
2211 * c-warn.c: Likewise.
2213 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2215 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2216 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2217 * c-opts.c (sanitize_cpp_opts): Initialize
2218 cpp_opts->cpp_warn_implicit_fallthrough.
2220 2016-10-11 Marek Polacek <polacek@redhat.com>
2222 * c-common.c (warning_candidate_p): Change the return type to bool
2223 and return true/false instead of 1/0.
2224 (vector_mode_valid_p): Likewise.
2226 2016-10-11 Marek Polacek <polacek@redhat.com>
2228 * c-common.c (fold_for_warn): No longer static.
2229 (bool_promoted_to_int_p): Likewise.
2230 (c_common_get_narrower): Likewise.
2231 (constant_expression_warning): Move to c-warn.c.
2232 (constant_expression_error): Likewise.
2233 (overflow_warning): Likewise.
2234 (warn_logical_operator): Likewise.
2235 (find_array_ref_with_const_idx_r): Likewise.
2236 (warn_tautological_cmp): Likewise.
2237 (expr_has_boolean_operands_p): Likewise.
2238 (warn_logical_not_parentheses): Likewise.
2239 (warn_if_unused_value): Likewise.
2240 (strict_aliasing_warning): Likewise.
2241 (sizeof_pointer_memaccess_warning): Likewise.
2242 (check_main_parameter_types): Likewise.
2243 (conversion_warning): Likewise.
2244 (warnings_for_convert_and_check): Likewise.
2245 (match_case_to_enum_1): Likewise.
2246 (match_case_to_enum): Likewise.
2247 (c_do_switch_warnings): Likewise.
2248 (warn_for_omitted_condop): Likewise.
2249 (readonly_error): Likewise.
2250 (lvalue_error): Likewise.
2251 (invalid_indirection_error): Likewise.
2252 (warn_array_subscript_with_type_char): Likewise.
2253 (warn_about_parentheses): Likewise.
2254 (warn_for_unused_label): Likewise.
2255 (warn_for_div_by_zero): Likewise.
2256 (warn_for_memset): Likewise.
2257 (warn_for_sign_compare): Likewise.
2258 (do_warn_double_promotion): Likewise.
2259 (do_warn_unused_parameter): Likewise.
2260 (record_locally_defined_typedef): Likewise.
2261 (maybe_record_typedef_use): Likewise.
2262 (maybe_warn_unused_local_typedefs): Likewise.
2263 (maybe_warn_bool_compare): Likewise.
2264 (maybe_warn_shift_overflow): Likewise.
2265 (warn_duplicated_cond_add_or_warn): Likewise.
2266 (diagnose_mismatched_attributes): Likewise.
2267 * c-common.h: Move the declarations from c-warn.c to its own section.
2268 * c-warn.c: New file.
2270 2016-10-08 Jason Merrill <jason@redhat.com>
2272 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2273 into COND_EXPR in C++.
2275 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2277 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2278 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2279 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2281 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2283 Implement LWG2296 helper intrinsic
2284 * c-common.h (enum rid): Add RID_ADDRESSOF.
2285 * c-common.c (c_common_reswords): Add __builtin_addressof.
2287 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2290 * c-common.c (c_common_truthvalue_conversion): Warn also for
2291 suspicious enum values in boolean context.
2293 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2295 Implement P0258R2 - helper for C++17
2296 std::has_unique_object_representations trait
2297 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2298 * c-common.c (c_common_reswords): Add
2299 __has_unique_object_representations.
2301 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2304 * c-ubsan.c (ubsan_instrument_return): Don't call
2305 initialize_sanitizer_builtins here.
2307 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2309 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2310 conditional expression in boolean context when only one arm is
2313 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2316 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2319 * c-common.c (c_common_reswords): Update comment for C++11.
2321 2016-10-04 Jason Merrill <jason@redhat.com>
2323 * c-common.c (make_tree_vector_from_ctor): New.
2324 * c-common.h: Declare it.
2326 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2328 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2329 __LIBGCC_JCR_SECTION_NAME__.
2331 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2333 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2334 left shift in boolean context.
2336 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2338 Implement P0001R1 - C++17 removal of register storage class specifier
2339 * c.opt (Wregister): New warning.
2340 * c-opts.c (c_common_post_options): Enable -Wregister by
2343 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2345 * c-opts.c (c_common_post_options): Remove special case for
2346 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2349 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2351 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2354 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2356 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2358 * c-common.c: Include memmodel.h.
2360 2016-09-26 Marek Polacek <polacek@redhat.com>
2362 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2364 2016-09-26 Marek Polacek <polacek@redhat.com>
2367 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2368 (handle_fallthrough_attribute): New function.
2369 (attribute_fallthrough_p): New function.
2370 * c-common.h (attribute_fallthrough_p): Declare.
2372 2016-09-24 Marek Polacek <polacek@redhat.com>
2375 * c.opt (Wbool-operation): New.
2377 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2379 * c-common.c (c_common_truthvalue_conversion): Inhibit
2380 Wint-in-bool-context warning with from_macro_definition_at.
2381 Mention the expression will always evaluate to true.
2383 2016-09-21 Martin Sebor <msebor@redhat.com>
2386 * c.opt (fprintf-return-value): Temporarily initialize to zero
2387 to unblock bootstrap failures.
2389 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2392 * c.opt (Waligned-new=): Add RejectNegative.
2393 (faligned-new=): Likewise. Spelling fix - change
2394 aligned_new_threshhold to aligned_new_threshold.
2395 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2396 to aligned_new_threshold.
2398 2016-09-20 Martin Sebor <msebor@redhat.com>
2401 * c.opt: Add -Wformat-length and -fprintf-return-value.
2403 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2406 * c.opt (Wint-in-bool-context): New warning.
2407 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2408 constants in boolean context.
2410 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2412 * c-common.c (max_align_t_align): Also consider alignment of
2415 2016-09-15 Jason Merrill <jason@redhat.com>
2417 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2420 2016-09-14 Jason Merrill <jason@redhat.com>
2422 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2423 limit FIELD_DECL, either.
2425 2016-09-14 Marek Polacek <polacek@redhat.com>
2427 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2428 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2429 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2431 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2433 * c-common.c (warn_logical_not_parentheses): Replace
2434 rich_location::add_fixit_insert calls with add_fixit_insert_before
2435 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2437 2016-09-13 Jason Merrill <jason@redhat.com>
2438 Tom de Vries <tom@codesourcery.com>
2441 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2443 2016-09-13 Jason Merrill <jason@redhat.com>
2445 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2448 2016-09-12 Jason Merrill <jason@redhat.com>
2450 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2451 bit/byte confusion, allow large alignment for types.
2453 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2456 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2458 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2461 * c-format.c (argument_parser::check_argument_type): Add params
2462 "type_start" and "conversion_char". Use the former to generate
2463 offset_to_type_start and pass it and conversion_char to
2465 (check_format_info_main): Capture the start of the type
2466 information as "type_start", and pass it an format_char
2467 to arg_parser.check_argument_type.
2468 (check_format_types): Provide an example in the leading comment.
2469 Add params "offset_to_type_start" and "conversion_char"; pass
2470 them to format_type_warning calls.
2471 (test_get_modifier_for_format_len): Likewise.
2472 (matching_type_p): New function.
2473 (get_format_for_type): Add param "conversion_char" and move
2474 implementation into...
2475 (get_format_for_type_1): ...new function, called twice.
2476 Use new function matching_type_p rather than checking for
2477 TYPE_CANONICAL equality.
2478 (get_corrected_substring): New function.
2479 (format_type_warning): Provide an example in the leading comment.
2480 Add params "offset_to_type_start" and "conversion_char". Replace
2481 call to get_format_for_type with call to get_corrected_substring
2482 and move rejection of hints for widths/precisions there.
2483 (assert_format_for_type_streq): Add param "conversion_char".
2484 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2485 (test_get_format_for_type_printf): Add conversion chars to the
2486 tests, adding coverage for various combinations of integer
2487 vs double conversions, and for preserving octal and hexadecimal
2489 (test_get_format_for_type_scanf): Add conversion chars to the
2492 2016-09-10 Tom de Vries <tom@codesourcery.com>
2495 * c-common.c (build_va_arg): Handle more strict
2496 targetm.canonical_va_list_type. Replace first argument type error with
2499 2016-09-09 Martin Sebor <msebor@redhat.com>
2503 * c-format.c (argument_parser::find_format_char_info): Use %qc
2504 format directive unconditionally.
2506 2016-09-09 Jason Merrill <jason@redhat.com>
2508 Implement C++17 new of over-aligned types.
2509 * c.opt: Add -faligned-new and -Waligned-new.
2510 * c-common.c (max_align_t_align): Split out from...
2511 (cxx_fundamental_alignment_p): ...here.
2512 * c-common.h: Declare it.
2513 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2515 2016-09-09 Joseph Myers <joseph@codesourcery.com>
2517 * c-cppbuiltin.c (builtin_define_type_width): New function.
2518 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2521 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2523 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2525 (substring_loc::get_location): Move to substring-locations.c,
2526 keeping implementation as...
2527 (c_get_substring_location): New function, from the above, reworked
2528 to use accessors rather than member lookup.
2529 * c-common.h (class substring_loc): Move to substring-locations.h,
2530 replacing with a forward decl.
2531 (c_get_substring_location): New decl.
2532 * c-format.c: Include "substring-locations.h".
2533 (format_warning_va): Move to substring-locations.c.
2534 (format_warning_at_substring): Likewise.
2536 2016-09-06 Martin Sebor <msebor@redhat.com>
2539 * c-format.c (check_function_format): Avoid issuing warnings for
2540 functions unless they call format functions with non-constant
2543 2016-09-06 Richard Biener <rguenther@suse.de>
2546 * c-common.c (c_common_mark_addressable_vec): Handle
2547 COMPOUND_LITERAL_EXPR.
2549 2016-09-05 Marek Polacek <polacek@redhat.com>
2552 * c-common.c (bool_promoted_to_int_p): New function.
2553 (expr_has_boolean_operands_p): New function.
2554 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2555 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2557 2016-09-04 Tom de Vries <tom@codesourcery.com>
2560 2016-08-29 Tom de Vries <tom@codesourcery.com>
2562 * c-common.c (build_va_arg): Replace first argument type error
2565 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2568 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2569 (c_finish_omp_for): Reject _Atomic qualified iterators.
2571 2016-09-01 Martin Sebor <msebor@redhat.com>
2573 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2574 size to guarantee it fits the output of the formatted function
2575 regardless of its arguments.
2577 2016-09-01 Marek Polacek <polacek@redhat.com>
2580 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2583 2016-08-29 Marek Polacek <polacek@redhat.com>
2586 * c-common.c (warn_logical_not_parentheses): Don't warn for
2587 a comparison or a logical operator.
2589 2016-08-29 Tom de Vries <tom@codesourcery.com>
2591 * c-common.c (build_va_arg): Fix type comparison assert.
2593 2016-08-29 Tom de Vries <tom@codesourcery.com>
2595 * c-common.c (build_va_arg): Replace first argument type error
2598 2016-08-29 Tom de Vries <tom@codesourcery.com>
2601 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2602 with error_mark_node as va_list instead of with illegal va_list.
2604 2016-08-25 Marek Polacek <polacek@redhat.com>
2605 David Malcolm <dmalcolm@redhat.com>
2607 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2608 * c-common.h (warn_logical_not_parentheses): Update declaration.
2610 2016-08-22 Marek Polacek <polacek@redhat.com>
2613 * c-common.c (warn_for_memset): Check type for null.
2615 2016-08-22 Joseph Myers <joseph@codesourcery.com>
2617 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2618 _FloatNx types for suffixes for built-in functions.
2620 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2623 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2624 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2625 (RID_FLOAT128X): New enum rid values.
2626 (CASE_RID_FLOATN_NX): New macro.
2627 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2629 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2630 corresponding complex types.
2631 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2632 _FloatNx and corresponding complex types.
2633 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2634 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2635 and _FloatNx types for the widest type for determining
2636 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2637 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2638 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2640 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2642 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2645 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2647 * c-opts.c (c_diagnostic_finalizer): Update for change to
2648 diagnostic_show_locus.
2650 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2652 * c-common.c: Include "spellcheck.h".
2653 (cb_get_suggestion): New function.
2654 * c-common.h (cb_get_suggestion): New decl.
2655 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2658 2016-08-18 Marek Polacek <polacek@redhat.com>
2661 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2664 2016-08-16 David Malcolm <dmalcolm@redhat.com>
2667 * c-common.c (substring_loc::get_range): Rename to...
2668 (substring_loc::get_location): ...this, converting param from a
2669 source_range * to a location_t *. Call
2670 get_source_location_for_substring rather than
2671 get_source_range_for_substring, and pass in m_caret_idx.
2672 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2673 (substring_loc::get_range): Replace with...
2674 (substring_loc::get_location): ...this.
2675 (substring_loc::set_caret_index): New method.
2676 (substring_loc): Add field m_caret_idx.
2677 * c-format.c (format_warning_va): Update for above changes.
2678 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2679 clashing with type name.
2680 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2681 (check_argument_type): Likewise.
2682 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2683 Use a copy when emitting warnings, setting the caret index from TYPE.
2685 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
2686 Arnaud Charlet <charlet@adacore.com>
2688 * c-ada-spec.c (dump_number): New function.
2689 (handle_escape_character): Likewise.
2690 (print_ada_macros): Add handling of constant integers and strings.
2692 2016-08-12 Marek Polacek <polacek@redhat.com>
2695 * c-common.c (scalar_to_vector): Adjust fall through comment.
2696 * c-opts.c (c_common_handle_option): Likewise.
2697 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2698 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2699 fall through comment.
2700 * cilk.c (extract_free_variables): Add FALLTHRU.
2702 2016-08-10 Jason Merrill <jason@redhat.com>
2704 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2706 2016-08-09 Jason Merrill <jason@redhat.com>
2708 * c-common.c (c_common_attribute_table): vector_size affects type
2711 2016-08-09 Marek Polacek <polacek@redhat.com>
2714 * c-ada-spec.c (dump_generic_ada_node): Add return.
2716 2016-08-09 Jason Merrill <jason@redhat.com>
2718 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2719 C++17 constexpr lambdas.
2721 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2724 * c-common.h (selftest::c_format_c_tests): New declaration.
2725 (selftest::run_c_tests): New declaration.
2726 * c-format.c: Include "selftest.h.
2727 (format_warning_va): Add param "corrected_substring" and use
2728 it to add a replacement fix-it hint.
2729 (format_warning_at_substring): Likewise.
2730 (format_warning_at_char): Update for new param of
2732 (argument_parser::check_argument_type): Pass "fki" to
2734 (check_format_types): Add param "fki" and pass it to
2735 format_type_warning.
2736 (deref_n_times): New function.
2737 (get_modifier_for_format_len): New function.
2738 (selftest::test_get_modifier_for_format_len): New function.
2739 (get_format_for_type): New function.
2740 (format_type_warning): Add param "fki" and use it to attempt
2741 to provide hints for argument types when calling
2742 format_warning_at_substring.
2743 (selftest::get_info): New function.
2744 (selftest::assert_format_for_type_streq): New function.
2745 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2746 (selftest::test_get_format_for_type_printf): New function.
2747 (selftest::test_get_format_for_type_scanf): New function.
2748 (selftest::c_format_c_tests): New function.
2750 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2753 * c-format.c: Include "diagnostic.h".
2754 (location_column_from_byte_offset): Delete.
2755 (location_from_offset): Delete.
2756 (format_warning_va): New function.
2757 (format_warning_at_substring): New function.
2758 (format_warning_at_char): New function.
2759 (check_format_arg): Capture location of format_tree and pass to
2760 check_format_info_main.
2761 (argument_parser): Add fields "start_of_this_format" and
2762 "format_string_cst".
2763 (flag_chars_t::validate): Add param "format_string_cst". Convert
2764 warning_at call using location_from_offset to call to
2765 format_warning_at_char.
2766 (argument_parser::argument_parser): Add param "format_string_cst_"
2767 and use use it to initialize field "format_string_cst".
2768 Initialize new field "start_of_this_format".
2769 (argument_parser::read_format_flags): Convert warning_at call
2770 using location_from_offset to a call to format_warning_at_char.
2771 (argument_parser::read_any_format_left_precision): Likewise.
2772 (argument_parser::read_any_format_precision): Likewise.
2773 (argument_parser::read_any_other_modifier): Likewise.
2774 (argument_parser::find_format_char_info): Likewise, in three places.
2775 (argument_parser::parse_any_scan_set): Likewise, in one place.
2776 (argument_parser::handle_conversions): Likewise, in two places.
2777 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2778 and use it to make a substring_loc. Pass the latter to
2780 (check_format_info_main): Add params "fmt_param_loc" and
2781 "format_string_cst". Convert warning_at calls using
2782 location_from_offset to calls to format_warning_at_char. Pass the
2783 new params to the arg_parser ctor. Pass "format_string_cst" to
2784 flag_chars.validate. Pass "fmt_param_loc" to
2785 arg_parser.check_argument_type.
2786 (check_format_types): Convert first param from a location_t
2787 to a const substring_loc & and rename to "fmt_loc". Attempt
2788 to extract the range of the relevant parameter and pass it
2789 to format_type_warning.
2790 (format_type_warning): Convert first param from a location_t
2791 to a const substring_loc & and rename to "fmt_loc". Add
2792 params "param_range" and "type". Replace calls to warning_at
2793 with calls to format_warning_at_substring.
2795 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2797 * c-format.c (class flag_chars_t): New class.
2798 (struct length_modifier): New struct.
2799 (class argument_parser): New class.
2800 (flag_chars_t::flag_chars_t): New ctor.
2801 (flag_chars_t::has_char_p): New method.
2802 (flag_chars_t::add_char): New method.
2803 (flag_chars_t::validate): New method.
2804 (flag_chars_t::get_alloc_flag): New method.
2805 (flag_chars_t::assignment_suppression_p): New method.
2806 (argument_parser::argument_parser): New ctor.
2807 (argument_parser::read_any_dollar): New method.
2808 (argument_parser::read_format_flags): New method.
2809 (argument_parser::read_any_format_width): New method.
2810 (argument_parser::read_any_format_left_precision): New method.
2811 (argument_parser::read_any_format_precision): New method.
2812 (argument_parser::handle_alloc_chars): New method.
2813 (argument_parser::read_any_length_modifier): New method.
2814 (argument_parser::read_any_other_modifier): New method.
2815 (argument_parser::find_format_char_info): New method.
2816 (argument_parser::validate_flag_pairs): New method.
2817 (argument_parser::give_y2k_warnings): New method.
2818 (argument_parser::parse_any_scan_set): New method.
2819 (argument_parser::handle_conversions): New method.
2820 (argument_parser::check_argument_type): New method.
2821 (check_format_info_main): Introduce classes argument_parser
2822 and flag_chars_t, moving the code within the loop into methods
2823 of these classes. Make various locals "const".
2825 2016-08-05 David Malcolm <dmalcolm@redhat.com>
2827 * c-common.c: Include "substring-locations.h".
2828 (get_cpp_ttype_from_string_type): New function.
2829 (g_string_concat_db): New global.
2830 (substring_loc::get_range): New method.
2831 * c-common.h (g_string_concat_db): New declaration.
2832 (class substring_loc): New class.
2833 * c-lex.c (lex_string): When concatenating strings, capture the
2834 locations of all tokens using a new obstack, and record the
2835 concatenation locations within g_string_concat_db.
2836 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2839 2016-07-29 Marek Polacek <polacek@redhat.com>
2842 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2843 parentheses warning.
2846 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2848 2016-07-28 Martin Liska <mliska@suse.cz>
2850 PR gcov-profile/68025
2851 * c-common.c (handle_no_profile_instrument_function_attribute):
2853 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2855 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2858 2016-07-25 Jason Merrill <jason@redhat.com>
2861 * c.opt (fconstexpr-loop-limit): New.
2863 2016-07-22 Martin Sebor <msebor@redhat.com>
2866 * c-common.c (resolve_overloaded_builtin): Avoid converting
2867 __atomic_compare_exchange_n return type to that of what its
2868 first argument points to.
2870 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2872 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2873 ~(unsigned HOST_WIDE_INT) 0.
2875 2016-07-22 Martin Liska <mliska@suse.cz>
2877 PR gcov-profile/69028
2878 PR gcov-profile/62047
2879 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2880 to the current_function_decl.
2882 2016-07-21 Jason Merrill <jason@redhat.com>
2885 * c-common.c (c_common_truthvalue_conversion): Check
2886 c_inhibit_evaluation_warnings for warning about address of
2889 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2891 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2894 2016-07-15 Jason Merrill <jason@redhat.com>
2896 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2898 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2901 * c-common.h (enum lookup_name_fuzzy_kind): Add
2902 FUZZY_LOOKUP_FUNCTION_NAME.
2904 2016-07-08 Jason Merrill <jason@redhat.com>
2906 P0145: Refining Expression Order for C++.
2907 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2910 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2913 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2915 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2917 * c-pragma.h (enum pragma_kind): Rename
2918 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2921 2016-06-29 Richard Biener <rguenther@suse.de>
2924 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2926 2016-06-24 Jason Merrill <jason@redhat.com>
2928 P0145R2: Refining Expression Order for C++.
2929 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2932 2016-06-24 Jakub Jelinek <jakub@redhat.com>
2934 * c-common.c (check_builtin_function_arguments): Require last
2935 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2936 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2937 if the last argument is pointer to enumerated or boolean type.
2939 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2942 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2943 (lookup_name_fuzzy): New prototype.
2945 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
2947 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2949 2016-06-14 Jason Merrill <jason@redhat.com>
2951 P0145R2: Refining Expression Order for C++.
2952 * c.opt (fargs-in-order): New.
2953 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2955 2016-06-13 Jakub Jelinek <jakub@redhat.com>
2958 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2959 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2961 PR preprocessor/71183
2962 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2963 to cb_get_source_date_epoch.
2965 2016-06-10 Jakub Jelinek <jakub@redhat.com>
2968 * c.opt (Wpsabi): Add Warning flag.
2970 2016-06-10 Martin Sebor <msebor@redhat.com>
2973 * c-common.c (handle_nonnull_attribute): Accept
2974 the nonnull attribute in type-generic builtins.
2976 2016-06-09 Martin Sebor <msebor@redhat.com>
2979 * c-common.c (builtin_function_validate_nargs): Make text of error
2980 message consistent with others like it.
2982 2016-06-08 Martin Sebor <msebor@redhat.com>
2983 Jakub Jelinek <jakub@redhat.com>
2987 * c-common.c (check_builtin_function_arguments): Handle
2988 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2990 2016-06-08 Richard Biener <rguenther@suse.de>
2992 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2994 2016-06-07 Richard Biener <rguenther@suse.de>
2997 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2998 options and warn about others.
3000 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
3002 * c-common.c (get_source_date_epoch): Rename to
3003 cb_get_source_date_epoch.
3004 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3005 message when the parsing fails. Use error_at instead of fatal_error.
3006 * c-common.h (get_source_date_epoch): Rename to
3007 cb_get_source_date_epoch.
3008 * c-common.h (cb_get_source_date_epoch): Prototype.
3009 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3010 * c-common.h (c_omp_region_type): Remove trailing comma.
3011 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3012 * c-lex.c (c_lex_with_flags): Remove initialization of
3013 pfile->source_date_epoch.
3015 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3018 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3019 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3020 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3021 instead of C_OMP_CLAUSE_SPLIT_FOR.
3023 2016-05-24 Richard Biener <rguenther@suse.de>
3027 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3028 (convert_vector_to_array_for_subscript): ... this.
3029 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3030 VIEW_CONVERT_EXPR to an array type. Rename to ...
3031 (convert_vector_to_array_for_subscript): ... this.
3033 2016-05-12 Marek Polacek <polacek@redhat.com>
3036 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3037 size_in_bytes and pass LOC to it.
3039 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3042 * c.opt (Wduplicate-decl-specifier): New option.
3044 2016-05-11 Marek Polacek <polacek@redhat.com>
3047 * c-common.c (diagnose_mismatched_attributes): New function.
3048 * c-common.h (diagnose_mismatched_attributes): Declare.
3050 2016-05-04 Marek Polacek <polacek@redhat.com>
3052 * c.opt (Wdangling-else): New option.
3054 2016-05-03 Marek Polacek <polacek@redhat.com>
3057 * c-common.c (builtin_function_validate_nargs): Add location
3059 (check_builtin_function_arguments): Add location and arguments
3060 parameters. Use them.
3061 * c-common.h (check_builtin_function_arguments): Update declaration.
3063 2016-05-03 Richard Biener <rguenther@suse.de>
3065 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3066 allow call args to gimplify to SSA names.
3068 2016-05-03 Marek Polacek <polacek@redhat.com>
3070 * c-common.h (enum c_omp_region_type): Remove stray comma.
3072 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3074 * c-common.h (enum c_omp_region_type): Define.
3076 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3078 * c-common.c (shorten_compare): Use wi::to_wide.
3080 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3083 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3084 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3085 reduction clauses in acc parallel loops.
3087 2016-04-29 Marek Polacek <polacek@redhat.com>
3090 * c-common.c (warn_for_memset): Check domain before accessing it.
3092 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3095 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3096 "aligned" attribute.
3098 2016-04-28 Jason Merrill <jason@redhat.com>
3100 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3102 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3103 Matthias Klose <doko@debian.org>
3105 * c-common.c (get_source_date_epoch): New function, gets the environment
3106 variable SOURCE_DATE_EPOCH and parses it as long long with error
3108 * c-common.h (get_source_date_epoch): Prototype.
3109 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3111 2015-04-27 Ryan Burn <contact@rnburn.com>
3115 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3116 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3118 (cilk_detect_and_unwrap): Corresponding changes.
3119 (extract_free_variables): Don't extract free variables from
3120 AGGR_INIT_EXPR slot.
3121 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3122 (cilk_recognize_spawn): Likewise.
3124 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3126 * c.opt (Wmemset-elt-size): New option.
3127 * c-common.c (warn_for_memset): New function.
3128 * c-common.h (warn_for_memset): Declare.
3130 2016-04-25 Jason Merrill <jason@redhat.com>
3132 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3134 * c-common.h: Declare it.
3135 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3137 2016-04-22 Jason Merrill <jason@redhat.com>
3139 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3141 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3144 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3145 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3147 2016-04-18 Michael Matz <matz@suse.de>
3149 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3152 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3154 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3155 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3156 to incomplete types.
3157 (dump_nested_type): Remove redundant tests and tidy up.
3158 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3159 a type which is the typedef of an original type.
3161 2016-04-15 Marek Polacek <polacek@redhat.com>
3164 * c-common.c (build_va_arg): Change two asserts into errors and return
3167 2016-04-13 Marek Polacek <polacek@redhat.com>
3170 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3171 for switch statements, too.
3173 2016-03-28 Jason Merrill <jason@redhat.com>
3175 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3177 2016-03-23 Marek Polacek <polacek@redhat.com>
3180 * c.opt (Wignored-attributes): New option.
3182 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3185 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3186 diagnostic text, reversing the order of the warning and note so
3187 that they appear in source order.
3189 2016-03-17 Marek Polacek <polacek@redhat.com>
3192 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3195 2016-03-14 Jason Merrill <jason@redhat.com>
3197 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3199 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3201 2016-03-09 Richard Biener <rguenther@suse.de>
3204 * c-common.c (strict_aliasing_warning): Add back
3205 alias_sets_conflict_p check.
3207 2016-03-08 Jason Merrill <jason@redhat.com>
3209 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3211 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3214 * c-indentation.c (get_visual_column): Move code to determine next
3216 (next_tab_stop): ...this new function.
3217 (line_contains_hash_if): Delete function.
3218 (detect_preprocessor_logic): Delete function.
3219 (get_first_nws_vis_column): New function.
3220 (detect_intervening_unindent): New function.
3221 (should_warn_for_misleading_indentation): Replace call to
3222 detect_preprocessor_logic with a call to
3223 detect_intervening_unindent.
3225 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3228 * c-indentation.c (should_warn_for_misleading_indentation): When
3229 suppressing warnings about cases where the guard and body are on
3230 the same column, only use the first non-whitespace column in place
3231 of the guard token column when dealing with "else" clauses.
3232 When rejecting aligned BODY and NEXT, loosen the requirement
3233 from equality with the first non-whitespace of guard to simply
3234 that they not be indented relative to it.
3236 2016-03-04 Richard Biener <rguenther@suse.de>
3239 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3240 instead of alias_sets_conflict_p.
3242 2016-03-01 Marek Polacek <polacek@redhat.com>
3245 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3248 2016-02-22 Martin Sebor <msebor@redhat.com>
3251 * c-common.c (check_builtin_function_arguments): Validate and
3252 reject invalid arguments to __builtin_alloca_with_align.
3254 2016-02-20 Mark Wielaard <mjw@redhat.com>
3257 * c.opt (Wunused-const-variable): Turn into Alias for...
3258 (Wunused-const-variable=): New option.
3260 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3263 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3265 (c_common_init_options): ...to here.
3266 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3268 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3271 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3272 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3273 flag_preprocess_only.
3275 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3278 * c.opt (Wnonnull-compare): Enable for -Wall.
3280 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3283 * c-common.c (sync_resolve_size): Diagnose too few arguments
3284 even when params is non-NULL empty vector.
3286 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3289 * c.opt (fshort-double): Remove.
3291 2016-02-05 Martin Sebor <msebor@redhat.com>
3294 * c.opt (Warning options): Update -Wplacement-new to take
3295 an optional argument.
3297 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3299 PR preprocessor/69543
3301 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3302 instead of loc to control_warning_option.
3304 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3306 * c.opt (fopenacc-dim=): New option.
3308 2016-01-27 Ryan Burn <contact@rnburn.com>
3311 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3312 gimplify_arg. Removed superfluous post_p argument.
3313 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3314 superfluous post_p argument.
3315 * c-gimplify.c (c_gimplify_expr): Likewise.
3317 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3320 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3321 pp_newline_and_flush with pp_flush.
3323 2016-01-20 Martin Sebor <msebor@redhat.com>
3326 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3327 an incompatible argument when the argument isn't a valid tree node.
3329 2016-01-18 Jason Merrill <jason@redhat.com>
3332 * c-common.c (check_function_arguments_recurse): Fold the whole
3333 COND_EXPR, not just the condition.
3335 2016-01-18 Tom de Vries <tom@codesourcery.com>
3337 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3338 classify as loop clause.
3340 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3343 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3344 C++ FE no longer has limit on number of pragmas.
3346 2015-01-14 Ryan Burn <contact@rnburn.com>
3349 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3350 to add missing cleanup point.
3352 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3355 * c-indentation.c (get_visual_column): Add location_t param.
3356 Handle the column number being zero by effectively disabling the
3357 warning, with an "inform".
3358 (should_warn_for_misleading_indentation): Add location_t argument
3359 for all uses of get_visual_column.
3361 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3364 * c-indentation.c (should_warn_for_misleading_indentation):
3365 Don't warn about do-while statements.
3367 2016-01-07 Martin Sebor <msebor@redhat.com>
3370 * c-common.c (sync_resolve_size): Reject first argument when it's
3373 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3376 * c-indentation.c (get_visual_column): Remove default argument.
3377 (should_warn_for_misleading_indentation): For the multiline case,
3378 update call to get_visual_column for next_stmt_exploc so that it
3379 captures the location of the first non-whitespace character in the
3380 relevant line. Don't issue warnings if there is non-whitespace
3381 before the next statement.
3383 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3385 Update copyright years.
3387 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3389 * c-common.c (binary_op_error): Convert first param from
3390 location_t to rich_location * and use it when emitting an error.
3391 * c-common.h (binary_op_error): Convert first param from
3392 location_t to rich_location *.
3394 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3396 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3397 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3399 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3401 * c-common.c (c_common_attribute_table): Handle "omp declare target
3404 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3407 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3409 2014-12-12 Tobias Burnus <burnus@net-b.de>
3412 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3413 specifiers (%d, %i,%u and %c).
3415 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3417 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3419 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3423 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3424 * c-pragma.c (handle_pragma_diagnostic): Adjust
3425 control_warning_option caller.
3427 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3429 * c-common.c (c_cpp_error): Update for change to
3430 rich_location::set_range.
3432 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3434 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3435 shifting 1 out of the sign bit.
3437 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3439 * c-common.c (c_common_attribute_table[]): Update max arguments
3440 count for "simd" attribute.
3441 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3443 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3445 PR preprocessor/57580
3446 * c-ppoutput.c (print): Change printed field to bool.
3447 Move src_file last for smaller padding.
3448 (init_pp_output): Set print.printed to false instead of 0.
3449 (scan_translation_unit): Fix up formatting. Set print.printed
3450 to true after printing something other than newline.
3451 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3452 (maybe_print_line_1): Set print.printed to false instead of 0.
3453 (print_line_1): Likewise.
3454 (do_line_change): Set print.printed to true instead of 1.
3455 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3456 dump_macro): Set print.printed to false after printing newline.
3458 2015-12-02 Jason Merrill <jason@redhat.com>
3460 * c-common.c (fold_for_warn): New.
3461 (warn_logical_operator, warn_tautological_cmp)
3462 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3464 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3465 (c_fully_fold_internal, decl_constant_value_for_optimization):
3467 * c-common.h: Don't declare decl_constant_value_for_optimization.
3469 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3472 * c-common.h (c_build_qualified_type): Add extra default
3475 2015-12-01 Julian Brown <julian@codesourcery.com>
3476 Cesar Philippidis <cesar@codesourcery.com>
3477 James Norris <James_Norris@mentor.com>
3479 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3480 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3481 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3483 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3485 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3486 (decl_sloc_common): Delete and move bulk of processing to...
3487 (decl_sloc): ...here.
3488 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3489 (dump_ada_double_name): Remove S parameter and compute the suffix.
3490 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3491 element type and deal with an anonymous one.
3492 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3493 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3494 and remove reference to QUAL_UNION_TYPE.
3495 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3496 (dump_nested_type): ...here. New function extracted from above.
3497 Generate a full declaration for anonymous element type of arrays.
3498 (print_ada_declaration): Really skip anonymous declarations. Remove
3499 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3500 Clean up processing of declarations of array types and objects.
3501 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3502 Remove obsolete code and tidy up.
3504 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3507 * c-common.c (handle_transparent_union_attribute): Update
3510 2015-11-27 Martin Liska <mliska@suse.cz>
3513 * array-notation-common.c (cilkplus_extract_an_triplets):
3514 Release vector of vectors.
3515 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3517 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3520 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3521 (print_ada_struct_decl): Likewise.
3523 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3526 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3527 * cilk.c (recognize_spawn): Determine location in a more precise
3530 2015-11-19 Jason Merrill <jason@redhat.com>
3532 * c-common.c (shorten_compare): But look through macros from
3535 2015-11-18 Jason Merrill <jason@redhat.com>
3537 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3538 non-constant operand comes from a macro.
3540 2015-11-17 Jason Merrill <jason@redhat.com>
3543 * c-common.c (warn_tautological_cmp): Fold before checking for
3546 2015-11-16 Marek Polacek <polacek@redhat.com>
3549 * c-common.c (check_case_bounds): Fold low and high cases.
3551 2015-11-16 Marek Polacek <polacek@redhat.com>
3553 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3554 * c-common.c (c_common_get_alias_set): Likewise.
3555 (handle_visibility_attribute): Likewise.
3557 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3559 * c-common.c (handle_simd_attribute): New.
3560 (struct attribute_spec): Add entry for "simd".
3561 (handle_simd_attribute): New.
3563 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
3565 * c-lex.c (interpret_float): Use fold_convert.
3567 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3569 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3570 and store it on the result.
3571 * c-opts.c (c_common_init_options): Set
3572 global_dc->colorize_source_p.
3574 2015-11-12 James Norris <jnorris@codesourcery.com>
3575 Joseph Myers <joseph@codesourcery.com>
3577 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3578 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3579 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3580 PRAGMA_OACC_CLAUSE_LINK.
3582 2015-11-11 Marek Polacek <polacek@redhat.com>
3586 * c-common.c (valid_array_size_p): New function.
3587 * c-common.h (valid_array_size_p): Declare.
3589 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
3592 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3594 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3596 * array-notation-common.c: Remove unused header files.
3597 * c-ada-spec.c: Likewise.
3598 * c-cilkplus.c: Likewise.
3599 * c-common.c: Likewise.
3600 * c-cppbuiltin.c: Likewise.
3601 * c-dump.c: Likewise.
3602 * c-format.c: Likewise.
3603 * c-gimplify.c: Likewise.
3604 * c-indentation.c: Likewise.
3605 * c-lex.c: Likewise.
3606 * c-omp.c: Likewise.
3607 * c-opts.c: Likewise.
3608 * c-pch.c: Likewise.
3609 * c-ppoutput.c: Likewise.
3610 * c-pragma.c: Likewise.
3611 * c-pretty-print.c: Likewise.
3612 * c-semantics.c: Likewise.
3613 * c-ubsan.c: Likewise.
3615 * stub-objc.c: Likewise.
3617 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3618 Cesar Philippidis <cesar@codesourcery.com>
3619 James Norris <jnorris@codesourcery.com>
3620 Julian Brown <julian@codesourcery.com>
3621 Nathan Sidwell <nathan@codesourcery.com>
3623 * c-pragma.c (oacc_pragmas): Add "routine".
3624 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3626 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3628 * c-common.c (c_common_attributes): Add scalar_storage_order.
3629 (handle_scalar_storage_order_attribute): New function.
3630 * c-pragma.c (global_sso): New variable.
3631 (maybe_apply_pragma_scalar_storage_order): New function.
3632 (handle_pragma_scalar_storage_order): Likewise.
3633 (init_pragma): Register scalar_storage_order.
3634 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3635 * c.opt (Wscalar-storage-order): New warning.
3636 (fsso-struct=): New option.
3638 2015-11-08 Martin Sebor <msebor@redhat.com>
3640 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3642 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3644 * c-common.c: Don't undef DEF_BUILTIN.
3646 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3648 * c-common.c (c_cpp_error): Convert parameter from location_t to
3649 rich_location *. Eliminate the "column_override" parameter and
3650 the call to diagnostic_override_column.
3651 Update the "done_lexing" clause to set range 0
3652 on the rich_location, rather than overwriting a location_t.
3653 * c-common.h (c_cpp_error): Convert parameter from location_t to
3654 rich_location *. Eliminate the "column_override" parameter.
3656 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3657 Thomas Schwinge <thomas@codesourcery.com>
3658 James Norris <jnorris@codesourcery.com>
3660 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3661 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3662 clauses with parallel and kernels and loops.
3663 * c-pragma.h (enum pragma_omp_clause): Add entries for
3664 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3665 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3666 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3668 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3670 2015-11-05 Martin Sebor <msebor@redhat.com>
3673 * c.opt (-Wplacement-new): New option.
3675 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3677 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3678 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3679 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3680 save_expr or create_tmp_var* if TEST is true.
3681 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3682 Don't call add_stmt here.
3683 (struct c_omp_check_loop_iv_data): New type.
3684 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3685 c_omp_check_loop_iv_exprs): New functions.
3686 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3688 (c_omp_declare_simd_clauses_to_numbers): Change
3689 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3690 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3691 from numbers to PARM_DECLs.
3693 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3695 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3698 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
3701 * c-common.h (fold_offsetof_1): Add argument.
3702 * c-common.c (fold_offsetof_1): Diagnose more invalid
3703 offsetof expressions that reference elements past the end of
3706 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3707 Chung-Lin Tang <cltang@codesourcery.com>
3709 * c-pragma.c (oacc_pragmas): Add "atomic".
3710 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3712 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3714 * c-common.c (handle_target_clones_attribute): New.
3715 (c_common_attribute_table): Add handle_target_clones_attribute.
3716 (handle_always_inline_attribute): Add check on target_clones attribute.
3717 (handle_target_attribute): Ditto.
3719 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3721 * array-notation-common.c: Reorder #include's and remove duplicates.
3722 * c-ada-spec.c: Likewise.
3723 * c-cilkplus.c: Likewise.
3724 * c-common.c: Likewise.
3725 * c-cppbuiltin.c: Likewise.
3726 * c-dump.c: Likewise.
3727 * c-format.c: Likewise.
3728 * c-gimplify.c: Likewise.
3729 * c-indentation.c: Likewise.
3730 * c-lex.c: Likewise.
3731 * c-omp.c: Likewise.
3732 * c-opts.c: Likewise.
3733 * c-pch.c: Likewise.
3734 * c-ppoutput.c: Likewise.
3735 * c-pragma.c: Likewise.
3736 * c-pretty-print.c: Likewise.
3737 * c-semantics.c: Likewise.
3738 * c-ubsan.c: Likewise.
3740 * stub-objc.c: Likewise.
3742 2015-10-28 Jason Merrill <jason@redhat.com>
3744 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3746 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3747 James Norris <jnorris@codesourcery.com>
3748 Cesar Philippidis <cesar@codesourcery.com>
3752 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3753 * c-omp.c (c_oacc_split_loop_clauses): New function.
3755 2015-10-21 Martin Sebor <msebor@redhat.com>
3758 * c.opt: End each sentence that describes an option with a period.
3760 2015-10-20 Marek Polacek <polacek@redhat.com>
3762 * array-notation-common.c (is_cilkplus_vector_p): Define.
3763 * c-common.h (is_cilkplus_vector_p): Declare.
3765 2015-10-20 Marek Polacek <polacek@redhat.com>
3767 * c.opt (std=gnu++11): Do not describe as experimental.
3768 (std=gnu++14): Likewise.
3770 2015-10-19 Jason Merrill <jason@redhat.com>
3772 * c-cppbuiltin.c (c_cpp_builtins): Define
3773 __cpp_nontype_template_args.
3775 2015-10-19 Jason Merrill <jason@redhat.com>
3777 * c-cppbuiltin.c (c_cpp_builtins): Define
3778 __cpp_enumerator_attributes, __cpp_fold_expressions,
3779 __cpp_unicode_characters.
3781 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3782 Aldy Hernandez <aldyh@redhat.com>
3784 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3785 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3786 (c_define_builtins): Likewise.
3787 * c-common.h (enum c_omp_clause_split): Add
3788 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3789 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3790 (c_finish_omp_for): Add ORIG_DECLV argument.
3791 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3792 201511 instead of 201307.
3793 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3794 OMP_CRITICAL_CLAUSES to it.
3795 (c_finish_omp_ordered): Add CLAUSES argument, set
3796 OMP_ORDERED_CLAUSES to it.
3797 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3798 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3799 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3800 constructs and new OpenMP 4.5 clauses. Clear
3801 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3803 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3804 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3805 (enum pragma_omp_clause): Add
3806 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3807 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3809 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3811 * c-lex.c (interpret_float): Use real_equal instead of
3814 2015-10-04 Jason Merrill <jason@redhat.com>
3816 Implement N4514, C++ Extensions for Transactional Memory.
3817 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3818 (c_common_attribute_table): Add transaction_safe_dynamic.
3819 transaction_safe now affects type identity.
3820 (handle_tm_attribute): Handle transaction_safe_dynamic.
3821 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3822 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3823 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3825 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3826 * c-pretty-print.c (pp_c_attributes_display): Don't print
3827 transaction_safe in C++.
3829 2015-10-02 Marek Polacek <polacek@redhat.com>
3831 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3833 2015-10-02 Marek Polacek <polacek@redhat.com>
3836 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3837 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3838 * c.opt (Wduplicated-cond): New option.
3840 2015-10-01 Joseph Myers <joseph@codesourcery.com>
3842 * c.opt (std=c11): Do not describe as experimental.
3843 (std=gnu11): Likewise.
3844 (std=iso9899:2011): Likewise.
3846 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3848 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3849 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3851 2015-09-25 Marek Polacek <polacek@redhat.com>
3853 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3854 (ubsan_instrument_shift): Likewise.
3856 2015-09-25 Marek Polacek <polacek@redhat.com>
3859 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3861 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3863 * c-indentation.c (should_warn_for_misleading_indentation):
3864 Compare next_stmt_vis_column with guard_line_first_nws instead
3865 of with guard_line_vis_column.
3867 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3871 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3872 options and options not valid for the current language.
3874 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3876 * c-indentation.c (should_warn_for_misleading_indentation):
3877 Float out and consolidate the calls to get_visual_column that
3878 are passed guard_exploc as an argument. Compare
3879 next_stmt_vis_column with guard_line_first_nws instead of with
3880 body_line_first_nws.
3882 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3884 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3885 Wnamespaces): New C++ warnings.
3887 2015-09-22 Jason Merrill <jason@redhat.com>
3889 * c-common.h (abi_compat_version_crosses): New.
3890 (warn_abi_version): Declare.
3891 * c-common.c: Define it.
3892 * c-opts.c (c_common_post_options): Handle it.
3893 flag_abi_compat_version defaults to 8.
3895 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3897 Complete the implementation of N4230, Nested namespace definition.
3898 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3899 __cpp_nested_namespace_definitions.
3901 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3903 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3905 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3907 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3909 * c-pragma.h (pragma_lex): Add optional loc argument.
3911 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3913 * c-format.c (check_format_arg): Adjust to use common block size in all
3916 2015-09-15 David Malcolm <dmalcolm@redhat.com>
3918 * c-format.c (location_from_offset): Update for change in
3919 signature of location_get_source_line.
3920 * c-indentation.c (get_visual_column): Likewise.
3921 (line_contains_hash_if): Likewise.
3923 2015-09-14 Marek Polacek <polacek@redhat.com>
3925 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3926 setting various warnings.
3928 2015-09-14 Marek Polacek <polacek@redhat.com>
3930 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3933 2015-09-11 Mark Wielaard <mjw@redhat.com>
3936 * c.opt (Wunused-variable): Option from common.opt.
3937 (Wunused-const-variable): New option.
3939 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3942 * c.opt ([Wsubobject-linkage]): Add.
3944 2015-09-03 Martin Sebor <msebor@redhat.com>
3947 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3949 * c-common.c (reject_gcc_builtin): Define.
3951 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3954 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3956 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3957 cilk_gimplify_call_params_in_spawned_fn.
3958 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3959 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3962 2015-08-25 Marek Polacek <polacek@redhat.com>
3965 * c-common.c (handle_weak_attribute): Don't check whether the
3966 visibility can be changed here.
3968 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3970 * c-lex.c (c_lex_with_flags): Use explicit locations.
3972 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3974 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3975 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3977 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3980 * c-common.c (check_builtin_function_arguments): Add check
3981 for BUILT_IN_SIGNBIT argument.
3983 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3986 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3989 2015-08-17 Marek Polacek <polacek@redhat.com>
3991 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3992 with whitespaces before qualifier names.
3994 2015-08-12 Marek Polacek <polacek@redhat.com>
3997 * c-common.c (maybe_warn_shift_overflow): Properly handle
3998 left-shifting 1 into the sign bit.
4000 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4002 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4004 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4005 Braden Obrzut <admin@maniacsvault.net>
4006 Jason Merrill <jason@redhat.com>
4008 Add C++ Concepts TS support.
4009 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4010 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4011 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4012 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4013 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4014 * c.opt (fconcepts): New.
4016 2015-08-02 Martin Sebor <msebor@redhat.com>
4018 * c.opt (-Wframe-address): New warning option.
4020 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4022 * c-indentation.c (should_warn_for_misleading_indentation):
4025 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4027 * c-indentation.c (get_visual_column): Add parameter first_nws,
4028 use it. Update comment documenting the function.
4029 (is_first_nonwhitespace_on_line): Remove.
4030 (should_warn_for_misleading_indentation): Replace usage of
4031 of is_first_nonwhitespace_on_line with get_visual_column.
4033 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4035 * c-indentation.h (struct token_indent_info): Define.
4036 (get_token_indent_info): Define.
4037 (warn_for_misleading_information): Declare.
4038 * c-common.h (warn_for_misleading_information): Remove.
4039 * c-identation.c (warn_for_misleading_indentation):
4040 Change declaration to take three token_indent_infos. Adjust
4042 * c-identation.c (should_warn_for_misleading_indentation):
4043 Likewise. Bail out early if the body is a compound statement.
4044 (guard_tinfo_to_string): Define.
4046 2015-07-30 Jason Merrill <jason@redhat.com>
4048 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4049 '*' for reference decay.
4051 2015-07-30 Marek Polacek <polacek@redhat.com>
4053 * c-common.c (warn_tautological_cmp): Bail for float types.
4055 2015-07-27 Marek Polacek <polacek@redhat.com>
4058 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4060 2015-07-27 Marek Polacek <polacek@redhat.com>
4064 * c-common.c (find_array_ref_with_const_idx_r): New function.
4065 (warn_tautological_cmp): New function.
4066 * c-common.h (warn_tautological_cmp): Declare.
4067 * c.opt (Wtautological-compare): New option.
4069 2015-07-23 Marek Polacek <polacek@redhat.com>
4071 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4072 (ubsan_instrument_shift): Likewise.
4074 2015-07-23 Marek Polacek <polacek@redhat.com>
4077 * c-ubsan.c: Include gimplify.h.
4078 (ubsan_instrument_division): Unshare OP0 and OP1.
4079 (ubsan_instrument_shift): Likewise.
4081 2015-07-20 Marek Polacek <polacek@redhat.com>
4082 Richard Sandiford <richard.sandiford@arm.com>
4085 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4086 Use EXPR_LOC_OR_LOC.
4087 (maybe_warn_shift_overflow): New function.
4088 * c-common.h (maybe_warn_shift_overflow): Declare.
4089 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4090 * c.opt (Wshift-overflow): New option.
4092 2015-07-16 Martin Liska <mliska@suse.cz>
4094 * c-format.c (static void check_format_info_main): Use
4095 object_allocator instead of pool_allocator.
4096 (check_format_arg): Likewise.
4097 (check_format_info_main): Likewise.
4099 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4101 * c-opts.c: Remove multiline #include comment.
4103 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4105 * c-common.c: Fix double word typos.
4107 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4109 * c-ada-spec.h (cpp_operation): Revert latest change.
4110 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4111 constructors and destructors.
4113 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4115 * c-common.h: Adjust includes for flags.h changes.
4116 * stub-objc.c: Likewise.
4118 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4120 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4121 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4123 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4125 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4126 are to be removed, return NULL rather than original clauses list.
4128 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4130 * array-notation-common.c: Adjust includes.
4131 * c-ada-spec.c: Likewise.
4132 * c-cilkplus.c: Likewise.
4133 * c-common.h: Likewise.
4134 * c-cppbuiltin.c: Likewise.
4135 * c-dump.c: Likewise.
4136 * c-format.c: Likewise.
4137 * c-gimplify.c: Likewise.
4138 * c-indentation.c: Likewise.
4139 * c-lex.c: Likewise.
4140 * c-omp.c: Likewise.
4141 * c-opts.c: Likewise.
4142 * c-pch.c: Likewise.
4143 * c-ppoutput.c: Likewise.
4144 * c-pragma.c: Likewise.
4145 * c-pretty-print.c: Likewise.
4146 * c-semantics.c: Likewise.
4147 * c-ubsan.c: Likewise.
4149 * stub-objc.c: Likewise.
4151 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4153 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4154 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4156 2015-07-01 Jason Merrill <jason@redhat.com>
4158 * c-common.h (D_CXX11): Rename from D_CXX0X.
4159 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4160 * c-common.c: Adjust.
4162 * c-opts.c (c_common_post_options): Default to C++14.
4164 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4166 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4168 Implement N4197 - Adding u8 character literals
4169 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4171 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4172 CPP_UTF8CHAR_USERDEF tokens.
4173 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4174 and CPP_UTF8CHAR tokens.
4175 (lex_charconst): Treat CPP_UTF8CHAR token.
4177 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4180 * c-common.c (do_warn_unused_parameter): Move here.
4181 * c-common.h (do_warn_unused_parameter): Declare.
4183 2015-06-29 Marek Polacek <polacek@redhat.com>
4186 * c-common.c (check_case_bounds): Add bool * parameter. Set
4188 (c_add_case_label): Add bool * parameter. Pass it down to
4190 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4192 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4195 2015-06-27 Marek Polacek <polacek@redhat.com>
4197 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4198 or VECTOR_INTEGER_TYPE_P throughout.
4199 * c-gimplify.c: Likewise.
4201 2015-06-26 Marek Polacek <polacek@redhat.com>
4203 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4204 * c-common.c (c_fully_fold_internal): Likewise.
4205 (c_alignof_expr): Likewise.
4206 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4207 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4208 * cilk.c (create_parm_list): Likewise.
4210 2015-06-26 Marek Polacek <polacek@redhat.com>
4212 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4214 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4216 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4217 * c-gimplify.c: Likewise.
4218 * c-pragma.c: Likewise.
4219 * c-ubsan.c: Likewise.
4222 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4224 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4227 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4229 * cilk.c: Move calls.h after tm.h in the include chain.
4231 2015-06-25 Marek Polacek <polacek@redhat.com>
4233 * array-notation-common.c: Use VAR_P throughout.
4234 * c-ada-spec.c: Likewise.
4235 * c-common.c: Likewise.
4236 * c-format.c: Likewise.
4237 * c-gimplify.c: Likewise.
4238 * c-omp.c: Likewise.
4239 * c-pragma.c: Likewise.
4240 * c-pretty-print.c: Likewise.
4243 2015-06-25 Marek Polacek <polacek@redhat.com>
4245 * cilk.c (extract_free_variables): Use is_global_var.
4247 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4249 * c-common.c: Don't include target-def.h.
4251 2015-06-23 Marek Polacek <polacek@redhat.com>
4253 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4254 when comparing INTEGER_CSTs.
4256 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4258 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4259 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4260 (dump_ada_template): Skip partially specialized types.
4262 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4264 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4267 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4269 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4270 * c-ada-spec.c: Likewise.
4271 * c-cilkplus.c: Likewise.
4272 * c-common.c: Likewise.
4273 * c-common.h: Likewise.
4274 * c-cppbuiltin.c: Likewise.
4275 * c-dump.c: Likewise.
4276 * c-format.c: Likewise.
4277 * c-gimplify.c: Likewise.
4278 * c-indentation.c: Likewise.
4279 * c-lex.c: Likewise.
4280 * c-omp.c: Likewise.
4281 * c-opts.c: Likewise.
4282 * c-pch.c: Likewise.
4283 * c-ppoutput.c: Likewise.
4284 * c-pragma.c: Likewise.
4285 * c-pretty-print.c: Likewise.
4286 * c-semantics.c: Likewise.
4287 * c-ubsan.c: Likewise.
4289 * stub-objc.c: Likewise.
4291 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4294 * c-common.c (c_common_truthvalue_conversion): Warn when
4295 converting an address of a reference to a truth value.
4297 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4299 * array-notation-common.c : Adjust include files.
4300 * c-ada-spec.c : Likewise.
4301 * c-cilkplus.c : Likewise.
4302 * c-common.c : Likewise.
4303 * c-common.h : Likewise.
4304 * c-cppbuiltin.c : Likewise.
4305 * c-dump.c : Likewise.
4306 * c-format.c : Likewise.
4307 * c-gimplify.c : Likewise.
4308 * c-indentation.c : Likewise.
4309 * c-lex.c : Likewise.
4310 * c-omp.c : Likewise.
4311 * c-opts.c : Likewise.
4312 * c-pch.c : Likewise.
4313 * c-ppoutput.c : Likewise.
4314 * c-pragma.c : Likewise.
4315 * c-pretty-print.c : Likewise.
4316 * c-semantics.c : Likewise.
4317 * c-ubsan.c : Likewise.
4318 * cilk.c : Likewise.
4319 * stub-objc.c : Likewise.
4321 2015-06-08 Marek Polacek <polacek@redhat.com>
4324 * c-format.c (location_from_offset): Return LOC if LINE is null.
4326 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4328 * c-common.h (c_parse_final_cleanups): New prototype.
4329 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4331 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4333 * c-common.c (noplt): New attribute.
4334 (handle_noplt_attribute): New handler.
4336 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4338 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4339 * c-ada-spec.c: Likewise.
4340 * c-cilkplus.c: Likewise.
4341 * c-common.c: Likewise.
4342 * c-common.h: Likewise.
4343 * c-cppbuiltin.c: Likewise.
4344 * c-dump.c: Likewise.
4345 * c-format.c: Likewise.
4346 * c-gimplify.c: Likewise.
4347 * c-indentation.c: Likewise.
4348 * c-lex.c: Likewise.
4349 * c-omp.c: Likewise.
4350 * c-opts.c: Likewise.
4351 * c-pch.c: Likewise.
4352 * c-ppoutput.c: Likewise.
4353 * c-pragma.c: Likewise.
4354 * c-pretty-print.c: Likewise.
4355 * c-semantics.c: Likewise.
4356 * c-ubsan.c: Likewise.
4358 * stub-objc.c: Likewise.
4360 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4363 * c-indentation.c (should_warn_for_misleading_indentation): Use
4364 expand_location rather than expand_location_to_spelling_point.
4365 Don't warn if the guarding statement is more indented than the
4368 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4370 * c-indentation.c (warn_for_misleading_indentation): Bail out
4371 immediately if -Wmisleading-indentation isn't enabled.
4373 2015-06-01 Martin Liska <mliska@suse.cz>
4375 * c-format.c (check_format_arg):Use new type-based pool allocator.
4376 (check_format_info_main) Likewise.
4378 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4380 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4381 (has_nontrivial_methods): Likewise.
4383 2015-05-25 Marek Polacek <polacek@redhat.com>
4385 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4387 2015-05-22 Marek Polacek <polacek@redhat.com>
4390 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4392 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4394 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4395 STACK_GROWS_DOWNWARD.
4397 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4399 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4400 STACK_GROWS_DOWNWARD rather than if it is defined.
4402 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4405 * c-format.c (location_column_from_byte_offset): New.
4406 (location_from_offset): New.
4407 (struct format_wanted_type): Add offset_loc field.
4408 (check_format_info): Move handling of location for extra arguments
4409 closer to the point of warning.
4410 (check_format_info_main): Pass the result of location_from_offset
4412 (format_type_warning): Pass the result of location_from_offset
4415 2015-05-20 Marek Polacek <polacek@redhat.com>
4417 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4419 2015-05-20 Marek Polacek <polacek@redhat.com>
4421 * c-ada-spec.c (dump_sloc): Use DECL_P.
4423 2015-05-20 Marek Polacek <polacek@redhat.com>
4425 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4426 * c-common.c: Likewise.
4428 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4430 * c-common.h (fe_file_change): Strengthen param from
4431 const line_map * to const line_map_ordinary *.
4432 (pp_file_change): Likewise.
4433 * c-lex.c (fe_file_change): Likewise.
4434 (cb_define): Use linemap_check_ordinary when invoking
4436 (cb_undef): Likewise.
4437 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4438 invoking cb_file_change.
4439 (c_finish_options): Likewise.
4440 (push_command_line_include): Likewise.
4441 (cb_file_change): Strengthen param "new_map" from
4442 const line_map * to const line_map_ordinary *.
4443 * c-ppoutput.c (cb_define): Likewise for local "map".
4444 (pp_file_change): Likewise for param "map" and local "from".
4446 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4448 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4450 2015-05-18 Tom de Vries <tom@codesourcery.com>
4452 * c-common.c (build_va_arg_1): New function.
4453 (build_va_arg): Add address operator to va_list operand if necessary.
4455 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4458 * c-common.c (int_safely_convertible_to_real_p): Define.
4459 (unsafe_conversion_p): Check conversions involving complex types.
4460 (conversion_warning): Add new warning message for conversions which
4461 discard imaginary component.
4462 * c-common.h: (enum conversion_safety): Add new enumerator for such
4465 2015-05-14 Marek Polacek <polacek@redhat.com>
4469 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4470 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4471 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4472 use it. If FOR_INT_CONST, require that all evaluated operands be
4475 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4477 * c-common.h (warn_for_misleading_indentation): New prototype.
4478 * c-indentation.c: New file.
4479 * c.opt (Wmisleading-indentation): New option.
4481 2015-05-12 Tom de Vries <tom@codesourcery.com>
4483 PR tree-optimization/66010
4484 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4486 2015-05-09 Jason Merrill <jason@redhat.com>
4488 * c-opts.c (c_common_post_options): Also clear
4489 cpp_opts->cpp_warn_cxx11_compat.
4491 * c-common.h (enum cxx_dialect): Add cxx_unset.
4492 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4493 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4495 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4496 (std=gnu++0x): Mark as Undocumented.
4497 (std=gnu++1y): Add deprecated message.
4499 2015-05-08 Jason Merrill <jason@redhat.com>
4501 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4504 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4506 2015-05-08 Marek Polacek <polacek@redhat.com>
4509 * c.opt (Woverride-init-side-effects): New option.
4511 2015-05-07 Marek Polacek <polacek@redhat.com>
4514 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4516 * c.opt (Wshift-negative-value): New option.
4517 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4518 when -Wextra and C99/C++11 mode.
4520 2015-05-07 Marek Polacek <polacek@redhat.com>
4521 Martin Uecker <uecker@eecs.berkeley.edu>
4523 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4524 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4526 2015-05-05 Jason Merrill <jason@redhat.com>
4528 * c.opt (Wterminate): New.
4530 2015-04-30 Marek Polacek <polacek@redhat.com>
4532 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4533 require that the non-constant be of a boolean type.
4535 2015-04-29 Josh Triplett <josh@joshtriplett.org>
4537 * c-common.c (handle_section_attribute): Refactor to reduce
4538 nesting and distinguish between error cases.
4540 2015-04-29 Marek Polacek <polacek@redhat.com>
4543 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4546 2015-04-29 Jakub Jelinek <jakub@redhat.com>
4548 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4549 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4550 HOST_BITS_PER_WIDE_INT.
4552 2015-04-28 Tom de Vries <tom@codesourcery.com>
4554 PR tree-optimization/65887
4555 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4557 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
4558 Pierre-Marie de Rodat <derodat@adacore.com>
4560 * c-ada-spec.c (in_function): Delete.
4561 (dump_generic_ada_node): Do not change in_function and remove the
4562 redundant code dealing with it.
4563 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4564 (print_ada_methods): Output the static member functions in a nested
4565 package after the regular methods as well as associated renamings.
4567 2015-04-24 Marek Polacek <polacek@redhat.com>
4570 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4571 and OPT_Wshift_count_overflow.
4574 * c-common.c (warn_logical_operator): Warn if the operands have the
4577 2015-04-24 Marek Polacek <polacek@redhat.com>
4580 * c-common.c (warn_logical_operator): Bail if either operand comes
4581 from a macro expansion.
4583 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4586 * c-common.c (c_default_pointer_mode): Add definition.
4587 * c-common.h (c_default_pointer_mode): Add declaration.
4589 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4591 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4592 on record_builtin_type argument.
4594 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4597 * c-common.c (warn_logical_not_parentheses): Don't warn for
4600 2015-03-07 Marek Polacek <polacek@redhat.com>
4603 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4604 before trying to figure out whether we have a flexible array member.
4606 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
4607 Jonathan Wakely <jwakely.gcc@gmail.com>
4609 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4611 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4614 * c-ada-spec.c (print_destructor): Remove obsolete code.
4616 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4618 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4619 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4620 DECL_TEMPLATE_RESULT emulations.
4621 (dump_ada_template)): Add guard for TYPE_METHODS.
4623 2015-02-27 Marek Polacek <polacek@redhat.com>
4626 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4628 2015-02-27 Kai Tietz <ktietz@redhat.com>
4631 * c-pragma.c (handle_pragma_weak): Do not try to create
4632 weak/alias of declarations not being function, or variable
4635 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4638 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4640 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4642 2015-02-16 Marek Polacek <polacek@redhat.com>
4645 * c-format.c (check_format_types): Handle null param.
4647 2015-02-13 Marek Polacek <polacek@redhat.com>
4650 * c-format.c (check_format_types): Don't warn about different
4651 signedness if the original value is in the range of WANTED_TYPE.
4653 2015-02-12 Jason Merrill <jason@redhat.com>
4656 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4657 to the current highest version.
4658 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4660 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4664 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4665 instead of RDIV_EXPR. Use build_binary_op instead of
4668 2015-01-30 Joseph Myers <joseph@codesourcery.com>
4670 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4671 to pass input_location as first argument.
4673 2015-01-23 Tom de Vries <tom@codesourcery.com>
4676 * c.opt (fopenacc): Mark as LTO option.
4678 2015-01-23 Tom de Vries <tom@codesourcery.com>
4681 * c.opt (fopenmp): Mark as LTO option.
4683 2015-01-21 Jakub Jelinek <jakub@redhat.com>
4686 * cilk.c (fill_decls_vec): Only put decls into vector v.
4687 (compare_decls): Fix up formatting.
4689 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4692 * cilk.c: Include vec.h.
4693 (struct cilk_decls): New structure.
4694 (wrapper_parm_cb): Split this function to...
4695 (fill_decls_vec): ...this...
4696 (create_parm_list): ...and this.
4697 (compare_decls): New function.
4698 (for_local_cb): Remove.
4699 (wrapper_local_cb): Ditto.
4700 (build_wrapper_type): For now first traverse and fill vector of
4701 declarations then sort it and then deal with sorted vector.
4702 (cilk_outline): Ditto.
4703 (declare_one_free_variable): Ditto.
4705 2015-01-21 Jason Merrill <jason@redhat.com>
4708 * c-format.c (check_format_arg): Call decl_constant_value.
4710 2015-01-19 Martin Liska <mliska@suse.cz>
4712 * c-common.c (handle_noicf_attribute): New function.
4714 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4715 Bernd Schmidt <bernds@codesourcery.com>
4716 James Norris <jnorris@codesourcery.com>
4717 Cesar Philippidis <cesar@codesourcery.com>
4718 Ilmir Usmanov <i.usmanov@samsung.com>
4719 Jakub Jelinek <jakub@redhat.com>
4721 * c.opt (fopenacc): New option.
4722 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4723 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4725 * c-common.h (c_finish_oacc_wait): New prototype.
4726 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4727 (c_finish_oacc_wait): New function.
4728 * c-pragma.c (oacc_pragmas): New variable.
4729 (c_pp_lookup_pragma, init_pragma): Handle it.
4730 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4731 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4732 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4733 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4734 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4735 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4736 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4737 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4738 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4739 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4740 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4741 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4742 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4743 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4744 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4745 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4746 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4747 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4748 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4749 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4750 PRAGMA_OACC_CLAUSE_WORKER.
4752 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
4754 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4755 for the new option fstack-protector_explicit.
4756 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4757 (handle_stack_protect_attribute): New function.
4759 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
4761 * c.opt: New option -Warray-bounds=.
4763 2015-01-09 Michael Collison <michael.collison@linaro.org>
4765 * array-notation-common.c: Include hash-set.h, machmode.h,
4766 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4767 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4768 * c-ada-spec.c: Ditto.
4769 * c-cilkplus.c: Ditto.
4770 * c-common.c: Include input.h due to flattening of tree.h.
4771 Define macro GCC_C_COMMON_C.
4772 * c-common.h: Flatten tree.h header files into c-common.h.
4773 Remove include of tree-core.h.
4774 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4775 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4776 fold-const.h, wide-int.h, and inchash.h due to
4777 flattening of tree.h.
4779 * c-format.c: Flatten tree.h header files into c-common.h.
4780 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4781 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4782 fold-const.h, wide-int.h, and inchash.h due to
4783 flattening of tree.h.
4784 * c-dump.c: Include hash-set.h, machmode.h,
4785 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4786 fold-const.h, wide-int.h, and inchash.h due to
4787 flattening of tree.h.
4788 * c-format.c: Include hash-set.h, machmode.h,
4789 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4790 fold-const.h, wide-int.h, inchash.h and real.h due to
4791 flattening of tree.h.
4792 * c-gimplify.c: Include hash-set.h, machmode.h,
4793 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4794 fold-const.h, wide-int.h, and inchash.h due to
4795 flattening of tree.h.
4801 * c-ppoutput.c: Ditto.
4802 * c-pragma.c: Ditto.
4803 * c-pretty-print.c: Ditto.
4804 * c-semantics.c: Ditto.
4806 * stub-objc.c: Ditto.
4808 2015-01-08 Jason Merrill <jason@redhat.com>
4810 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4811 do_ubsan_in_current_function.
4812 (ubsan_maybe_instrument_reference_or_call): Likewise.
4813 * c-ubsan.h: Declare it.
4815 2015-01-08 Mike Stump <mikestump@comcast.net>
4817 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4819 2015-01-07 Marek Polacek <polacek@redhat.com>
4822 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4823 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4825 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4828 * c.opt (Wsuggest-override): New option.
4830 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4832 Update copyright years.
4834 2015-01-05 Marek Polacek <polacek@redhat.com>
4837 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4839 * c-common.h (warn_array_subscript_with_type_char): Update
4842 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4844 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4845 Control macro with flag_sized_deallocation.
4847 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4849 * c.opt (Wdiscarded-array-qualifiers): New option.
4851 2014-12-19 Jakub Jelinek <jakub@redhat.com>
4853 PR preprocessor/63831
4854 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4855 and __has_cpp_attribute here.
4856 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4857 c_common_has_attribute.
4858 * c-common.h (c_common_has_attribute): New prototype.
4859 * c-lex.c (init_c_lex): Set cb->has_attribute to
4860 c_common_has_attribute instead of cb_has_attribute.
4861 (get_token_no_padding): New function.
4862 (cb_has_attribute): Renamed to ...
4863 (c_common_has_attribute): ... this. No longer static. Use
4864 get_token_no_padding, require ()s, don't build TREE_LIST
4865 unnecessarily, fix up formatting, adjust diagnostics, call
4868 2014-12-15 Jason Merrill <jason@redhat.com>
4870 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4871 (-Wsized-deallocation): New.
4872 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4873 to on in C++14 and up.
4875 2014-12-11 Jason Merrill <jason@redhat.com>
4877 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4879 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4880 we aren't complaining about VLAs.
4882 2014-12-06 Marek Polacek <polacek@redhat.com>
4884 PR tree-optimization/64183
4885 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4886 shift-expression if it is integer_type_node. Use types_compatible_p.
4888 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4890 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4891 last argument from create_tmp_var_raw and create_tmp_var calls.
4892 * cilk.c (gimplify_cilk_spawn): Likewise.
4893 * c-omp.c (c_finish_omp_atomic): Likewise.
4895 2014-11-28 Marek Polacek <polacek@redhat.com>
4897 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4898 instead of unsigned_type_node.
4900 2014-11-28 Marek Polacek <polacek@redhat.com>
4903 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4905 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4906 expression to unsigned_type_node.
4908 2014-11-20 Mark Wielaard <mjw@redhat.com>
4911 * c-opts.c (set_std_c89): Set lang_hooks.name.
4912 (set_std_c99): Likewise.
4913 (set_std_c11): Likewise.
4914 (set_std_cxx98): Likewise.
4915 (set_std_cxx11): Likewise.
4916 (set_std_cxx14): Likewise.
4917 (set_std_cxx1z): Likewise.
4919 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4922 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4923 return type to bool.
4924 * c-common.c: Include gimple-expr.h.
4925 (convert_vector_to_pointer_for_subscript): Change return type to
4926 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4927 and copy it into a TARGET_EXPR and use that instead of *vecp
4930 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4932 Merger of git branch "gimple-classes-v2-option-3".
4933 * ChangeLog.gimple-classes: New.
4934 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4935 from being just a vec<gimple> to a vec<gbind *>.
4937 2014-11-18 Jakub Jelinek <jakub@redhat.com>
4940 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4941 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4942 get_pointer_alignment for non-pointers. Use ptype, or if it is
4943 reference type, corresponding pointer type, as type of kind
4945 (ubsan_maybe_instrument_reference,
4946 ubsan_maybe_instrument_member_call): Adjust callers.
4948 2014-11-15 Marek Polacek <polacek@redhat.com>
4951 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4953 (extract_array_notation_exprs): Return for NULL node.
4955 2014-11-12 Joseph Myers <joseph@codesourcery.com>
4957 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4958 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4960 2014-11-12 Jakub Jelinek <jakub@redhat.com>
4963 * c-common.c (check_builtin_function_arguments): Handle
4964 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4966 2014-11-10 Andi Kleen <ak@linux.intel.com>
4969 * c-common.h (check_no_cilk): Declare.
4970 * cilk.c (get_error_location): New function.
4971 (check_no_cilk): Dito.
4973 2014-11-10 Andi Kleen <ak@linux.intel.com>
4975 * cilk.c (recognize_spawn): Use expression location
4978 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4980 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4982 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4984 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4985 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4986 (__cpp_range_based_for, __cpp_initializer_lists,
4987 __cpp_delegating_constructors, __cpp_nsdmi,
4988 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4989 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4990 __has_cpp_attribute.
4991 * c-lex.c (cb_has_attribute): New callback CPP function;
4992 (init_c_lex): Set has_attribute callback.
4994 2014-11-04 Richard Biener <rguenther@suse.de>
4996 * c-common.c (shorten_compare): Do not shorten mixed
4997 DFP and non-DFP compares.
4999 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5001 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5002 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5003 Commentary and rearrangement of tests.
5004 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5005 Commentary and rearrangement of tests.
5006 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5007 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5009 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5011 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5012 enum from machine_mode.
5014 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5016 * c-common.c: Adjust include files.
5017 * c-gimplify.c: Ditto.
5019 * c-pragma.c: Ditto.
5022 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5024 * c-gimplify.c: Adjust include files.
5026 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5029 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5030 c_common_initialize_diagnostics.
5031 * c-common.h: Likewise.
5033 2014-10-24 Marek Polacek <polacek@redhat.com>
5036 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5037 print "struct"/"union"/"enum" for typedefed names.
5039 2014-10-23 Marek Polacek <polacek@redhat.com>
5041 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5044 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5045 Yury Gribov <y.gribov@samsung.com>
5047 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5048 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5049 instead of flag_sanitize_recover as bool flag.
5051 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5053 * cilk.c: Revert previous change.
5055 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5058 * cilk.c: Include vec.h.
5059 (struct cilk_decls): New structure.
5060 (wrapper_parm_cb): Split this function to...
5061 (fill_decls_vec): ...this...
5062 (create_parm_list): ...and this.
5063 (compare_decls): New function.
5064 (for_local_cb): Remove.
5065 (wrapper_local_cb): Ditto.
5066 (build_wrapper_type): For now first traverse and fill vector of
5067 declarations then sort it and then deal with sorted vector.
5068 (cilk_outline): Ditto.
5069 (declare_one_free_variable): Ditto.
5071 2014-10-17 Marek Polacek <polacek@redhat.com>
5073 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5074 * c.opt (Wimplicit-int): Initialize to -1.
5076 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5078 * c-pragma.c: Adjust include files.
5079 * c-semantics.c: Likewise.
5081 2014-10-16 DJ Delorie <dj@redhat.com>
5083 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5086 2014-10-14 Jason Merrill <jason@redhat.com>
5089 * c-common.h (CPP_PREPARSED_EXPR): New.
5090 (N_CP_TTYPES): Adjust.
5092 2014-10-15 Marek Polacek <polacek@redhat.com>
5094 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5096 2014-10-14 DJ Delorie <dj@redhat.com>
5098 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5099 types, not just __int128.
5100 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5101 types, not just __int128.
5102 (cpp_atomic_builtins): Round pointer sizes up.
5103 (type_suffix): Use type precision, not specific types.
5104 * c-common.c (c_common_reswords): Remove __int128 special case.
5105 (c_common_type_for_size): Check for all __intN types, not just
5107 (c_common_type_for_mode): Likewise.
5108 (c_common_signed_or_unsigned_type): Likewise.
5109 (c_build_bitfield_integer_type): Likewise.
5110 (c_common_nodes_and_builtins): Likewise.
5111 (keyword_begins_type_specifier): Likewise.
5112 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5115 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5117 * c-common.c: Use hash_table instead of hashtab.
5119 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5121 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5124 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5129 * c-common.c (warn_logical_operator): Punt for vectors.
5131 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5133 Implement SD-6: SG10 Feature Test Recommendations
5134 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5135 macros and the __has_header macro.
5137 2014-09-30 Jason Merrill <jason@redhat.com>
5139 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5140 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5141 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5143 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5144 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5146 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5147 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5149 2014-09-24 Marek Polacek <polacek@redhat.com>
5153 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5155 2014-09-23 Andi Kleen <ak@linux.intel.com>
5157 * c-common.c (handle_no_reorder_attribute): New function.
5158 (c_common_attribute_table): Add no_reorder attribute.
5160 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5162 * c-cppbuiltin.c (c_cpp_builtins): Define
5163 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5166 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5168 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5169 for supported floating-point modes.
5171 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5173 * c.opt (Wpsabi): Use LangEnabledBy.
5174 * c-opts.c (c_common_handle_option): Do not handle here.
5176 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5178 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5179 macros for floating-point modes.
5181 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5184 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5185 __*_DENORM_MIN__ without denormals.
5187 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5189 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5190 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5191 ubsan_create_data callers.
5192 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5193 index is constant or BIT_AND_EXPR with constant mask and is
5194 small enough for the bound.
5195 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5196 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5198 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5200 * c.opt: Add CppReason to various flags.
5201 (Wdate-time): Re-sort.
5202 * c-common.c: Include c-common.h earlier.
5203 (struct reason_option_codes_t): Delete.
5204 (c_option_controlling_cpp_error): Prefix global type and struct
5207 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5209 * c.opt (Wnormalized): New.
5210 (Wnormalized=): Use Enum and Reject Negative.
5211 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5213 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5215 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5216 digits of floating-point modes if -fbuilding-libgcc.
5218 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5220 * c-cppbuiltin.c (c_cpp_builtins): Also define
5221 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5222 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5223 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5224 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5225 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5226 __LIBGCC_STACK_GROWS_DOWNWARD__,
5227 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5228 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5229 __LIBGCC_DWARF_FRAME_REGISTERS__,
5230 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5231 __LIBGCC_STACK_POINTER_REGNUM__ and
5232 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5233 (builtin_define_with_value): Handle backslash-escaping in string
5236 2014-09-05 Richard Biener <rguenther@suse.de>
5239 * c-format.c (check_format_arg): Properly handle
5240 effectively signed POINTER_PLUS_EXPR offset.
5242 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5244 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5245 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5246 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5248 * c-opts.c (c_common_handle_option): Do not handle here.
5249 (sanitize_cpp_opts): Likewise.
5250 * c-common.c (struct reason_option_codes_t): Handle
5251 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5253 2014-09-03 Marek Polacek <polacek@redhat.com>
5255 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5257 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5258 Balaji V. Iyer <balaji.v.iyer@intel.com>
5259 Igor Zamyatin <igor.zamyatin@intel.com>
5261 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5262 * c-common.c (c_common_reswords): Added _Cilk_for.
5263 * c-common.h (enum rid): Added RID_CILK_FOR.
5264 (cilk_for_number_of_iterations): Add declaration.
5265 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5267 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5268 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5270 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5272 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5273 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5274 Wundef): Use CPP, Var and Init.
5275 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5277 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5279 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5280 * c-opts.c (c_common_handle_option): Do not handle here.
5282 2014-08-25 Jason Merrill <jason@redhat.com>
5284 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5285 -std=c++14 and -std=gnu++14, rather than the reverse.
5286 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5287 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5288 * c-common.h (cxx_dialect): Remove cxx1y.
5290 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5292 * c-common.h (enum cxx_dialect): Add cxx14.
5293 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5294 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5295 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5297 2014-08-22 Jason Merrill <jason@redhat.com>
5299 * c.opt (std=gnu++17): Fix alias.
5301 2014-08-22 Marek Polacek <polacek@redhat.com>
5304 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5305 check for vector types. Drop LHS argument.
5306 * c-common.h (warn_logical_not_parentheses): Adjust.
5308 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5310 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5311 (Wmultichar): Likewise.
5312 (Wdate-time): Use C-family languages instead of Common. Use CPP
5314 * c-opts.c (c_common_handle_option): Do not handle the above
5316 (sanitize_cpp_opts): Likewise.
5318 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5321 * c-opts.c: Include tree-diagnostics.h.
5322 (c_diagnostic_finalizer): New.
5323 (c_common_initialize_diagnostics): Use it.
5325 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5327 PR preprocessor/51303
5328 * c-common.c (struct reason_option_codes_t option_codes):
5329 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5331 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5335 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5336 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5337 (c_common_post_options): Call init_global_opts_from_cpp.
5338 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5340 2014-08-19 Marek Polacek <polacek@redhat.com>
5343 * c-common.c (maybe_warn_bool_compare): New function.
5344 * c-common.h (maybe_warn_bool_compare): Declare.
5345 * c.opt (Wbool-compare): New option.
5347 2014-08-19 Marek Polacek <polacek@redhat.com>
5349 * c.opt (Wc99-c11-compat): New option.
5351 2014-08-19 Marek Polacek <polacek@redhat.com>
5353 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5354 to warn_c90_c99_compat.
5355 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5358 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5359 Steven Bosscher <steven@gcc.gnu.org>
5362 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5363 format_check_results.
5364 (check_function_format): Use true and add comment for boolean
5366 (finish_dollar_format_checking): Use explicit location when warning.
5367 (check_format_info): Likewise.
5368 (check_format_arg): Set extra_arg_loc and format_string_loc.
5369 (check_format_info_main): Use explicit location when warning.
5370 (check_format_types): Pass explicit location.
5371 (format_type_warning): Likewise.
5373 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5376 * c-format.c: Handle Fortran flags.
5378 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5381 * array-notation-common.c (find_rank): Added handling for other
5382 types of references.
5384 2014-08-10 Marek Polacek <polacek@redhat.com>
5387 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5388 * c.opt (Wc90-c99-compat): Add option.
5390 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5392 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5394 2014-08-03 Marek Polacek <polacek@redhat.com>
5396 * c-common.c (check_case_value): Add location_t parameter. Use it.
5397 (c_add_case_label): Pass loc to check_case_value.
5399 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5401 * cilk.c: Use hash_map instead of pointer_map.
5403 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5405 * c-gimplify.c: Use hash_set instead of pointer_set.
5407 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5410 * array-notation-common.c (extract_array_notation_exprs): Handling
5413 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5415 * c-common.h (min_align_of_type): Removed prototype.
5416 * c-common.c (min_align_of_type): Removed.
5417 * c-ubsan.h (ubsan_maybe_instrument_reference,
5418 ubsan_maybe_instrument_member_call): New prototypes.
5419 * c-ubsan.c: Include stor-layout.h and builtins.h.
5420 (ubsan_maybe_instrument_reference_or_call,
5421 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5424 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5427 * c.opt (-Wreturn-local-addr): Move to common.opt.
5429 2014-07-30 Jason Merrill <jason@redhat.com>
5434 * c.opt (-fuse-all-virtuals): New.
5436 2014-07-30 Tom Tromey <tromey@redhat.com>
5439 * c.opt (Wdesignated-init): New option.
5440 * c-common.c (c_common_attribute_table): Add "designated_init".
5441 (handle_designated_init): New function.
5443 2014-07-24 Marek Polacek <polacek@redhat.com>
5446 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5448 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5450 PR preprocessor/60723 - missing system-ness marks for macro tokens
5451 * c-ppoutput.c (struct print::prev_was_system_token): New data
5453 (init_pp_output): Initialize it.
5454 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5455 (do_line_change): Return a flag saying if a line marker was
5457 (scan_translation_unit): Detect if the system-ness of the token we
5458 are about to emit is different from the one of the previously
5459 emitted token. If so, emit a line marker. Avoid emitting useless
5460 adjacent line markers. Avoid emitting line markers for tokens
5461 originating from the expansion of built-in macros.
5462 (scan_translation_unit_directives_only): Adjust.
5464 2014-07-15 Marek Polacek <polacek@redhat.com>
5466 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5467 TYPE_MAX_VALUE is NULL.
5469 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5472 * c.opt (Wmemset-transposed-args): New warning.
5474 2014-07-10 Jason Merrill <jason@redhat.com>
5478 * c.opt (-fuse-all-virtuals): New.
5480 2014-07-09 Richard Biener <rguenther@suse.de>
5483 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5484 using unsigned arithmetic if overflow does not wrap instead of
5485 if overflow is undefined.
5487 2014-07-06 Marek Polacek <polacek@redhat.com>
5490 * c.opt (Wsizeof-array-argument): New option.
5492 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5494 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5495 comments->count <= 1, as comments->entries might be NULL.
5497 2014-07-01 Marek Polacek <polacek@redhat.com>
5499 * c.opt (Wint-conversion): New option.
5501 2014-07-01 Marek Polacek <polacek@redhat.com>
5504 * c.opt (Wincompatible-pointer-types): New option.
5506 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5509 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5510 Do not discard TYPE_QUALS of type.
5512 2014-06-26 Jason Merrill <jason@redhat.com>
5514 * c-common.h (enum cxx_dialect): Add cxx1z.
5515 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5516 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5518 2014-06-26 Teresa Johnson <tejohnson@google.com>
5520 * c-common.h (get_dump_info): Declare.
5521 * c-gimplify.c (c_genericize): Use saved dump files.
5522 * c-opts.c (c_common_parse_file): Begin and end dumps
5523 once around parsing invocation.
5524 (get_dump_info): New function.
5526 2014-06-23 Marek Polacek <polacek@redhat.com>
5527 Andrew MacLeod <amacleod@redhat.com>
5530 * c-common.c (get_atomic_generic_size): Don't segfault if the
5531 type doesn't have a size.
5533 2014-06-20 Marek Polacek <polacek@redhat.com>
5535 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5536 (ubsan_walk_array_refs_r): New function.
5537 (c_genericize): Instrument array bounds.
5538 * c-ubsan.c: Include "internal-fn.h".
5539 (ubsan_instrument_division): Mark instrumented arrays as having
5540 side effects. Adjust ubsan_type_descriptor call.
5541 (ubsan_instrument_shift): Likewise.
5542 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5543 (ubsan_instrument_bounds): New function.
5544 (ubsan_array_ref_instrumented_p): New function.
5545 (ubsan_maybe_instrument_array_ref): New function.
5546 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5547 (ubsan_array_ref_instrumented_p): Declare.
5548 (ubsan_maybe_instrument_array_ref): Declare.
5550 2014-06-20 Hale Wang <hale.wang@arm.com>
5553 * c.opt (fshort-enums): Add to LTO.
5554 * c.opt (fshort-wchar): Likewise.
5556 2014-06-16 Marek Polacek <polacek@redhat.com>
5559 * c.opt (Wswitch-bool): Add Var.
5561 2014-06-12 Jakub Jelinek <jakub@redhat.com>
5564 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5565 #pragma omp target teams or
5566 #pragma omp {,target }teams distribute simd.
5568 2014-06-12 Jason Merrill <jason@redhat.com>
5570 * c.opt (Wabi=, fabi-compat-version): New.
5571 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5572 (c_common_post_options): Handle flag_abi_compat_version default.
5573 Disallow -fabi-compat-version=1.
5574 * c-common.h (abi_version_crosses): New.
5576 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
5578 * c-common.c (handle_section_attribute): Update handling for
5579 section names that are no longer trees.
5581 2014-06-10 Jakub Jelinek <jakub@redhat.com>
5584 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5585 (omp_pragmas): ... back here.
5587 2014-06-05 Marek Polacek <polacek@redhat.com>
5590 * c-common.c (warn_logical_not_parentheses): New function.
5591 * c-common.h (warn_logical_not_parentheses): Declare.
5592 * c.opt (Wlogical-not-parentheses): New option.
5594 2014-06-04 Marek Polacek <polacek@redhat.com>
5597 * c-common.c (check_case_bounds): Add location parameter.
5599 (c_add_case_label): Pass loc to check_case_bounds.
5601 2014-06-03 Marek Polacek <polacek@redhat.com>
5604 * c.opt (Wswitch-bool): New option.
5606 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5608 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5610 (record_types_used_by_current_var_decl): Move prototype to where
5613 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5614 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5615 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5617 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5619 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5620 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5622 * c-pretty-print.c (pp_c_void_constant): New function.
5623 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5624 (c_pretty_printer::expression): Handle VOID_CST.
5625 * cilk.c (extract_free_variables): Likewise.
5626 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5627 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5629 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5631 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5632 * c-pragma.c (push_alignment): Adjust.
5633 (handle_pragma_push_options): Likewise.
5635 2014-05-09 Marek Polacek <polacek@redhat.com>
5638 * c-common.c (check_user_alignment): Return -1 if alignment is error
5640 (handle_aligned_attribute): Don't call default_conversion on
5642 (handle_vector_size_attribute): Likewise.
5643 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5644 (handle_sentinel_attribute): Call default_conversion and allow even
5645 integral types as an argument.
5647 2014-05-08 Marek Polacek <polacek@redhat.com>
5650 * c-common.c (min_align_of_type): New function factored out from...
5651 (c_sizeof_or_alignof_type): ...here.
5652 * c-common.h (min_align_of_type): Declare.
5654 2014-05-08 Marek Polacek <polacek@redhat.com>
5657 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5658 parameter type of main.
5660 2014-05-07 DJ Delorie <dj@redhat.com>
5662 * c-cppbuiltin.c (print_bits_of_hex): New.
5663 (builtin_define_type_minmax): Print values using hex so as not to
5664 require a pre-computed list of string values.
5666 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5667 Mike Stump <mikestump@comcast.net>
5668 Richard Sandiford <rdsandiford@googlemail.com>
5670 * c-ada-spec.c: Include wide-int.h.
5671 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5672 (dump_generic_ada_node): Use wide-int interfaces.
5673 * c-common.c: Include wide-int-print.h.
5674 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5675 (pointer_int_sum): Use wide-int interfaces.
5676 (c_common_nodes_and_builtins): Use make_int_cst.
5677 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5678 (handle_alloc_size_attribute): Use wide-int interfaces.
5679 (get_nonnull_operand): Likewise.
5680 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5681 * c-lex.c: Include wide-int.h.
5682 (narrowest_unsigned_type): Take a widest_int rather than two
5684 (narrowest_signed_type): Likewise.
5685 (interpret_integer): Update accordingly. Use wide-int interfaces.
5686 (lex_charconst): Use wide-int interfaces.
5687 * c-pretty-print.c: Include wide-int.h.
5688 (pp_c_integer_constant): Use wide-int interfaces.
5689 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5690 INT_CST_LT_UNSIGNED.
5692 2014-05-06 Richard Biener <rguenther@suse.de>
5694 * c-opts.c (c_common_post_options): For -freestanding,
5695 -fno-hosted and -fno-builtin disable pattern recognition
5696 if not enabled explicitely.
5698 2014-05-02 Marek Polacek <polacek@redhat.com>
5700 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5702 2014-05-01 Marek Polacek <polacek@redhat.com>
5705 * c.opt (Wdiscarded-qualifiers): Add.
5707 2014-04-30 Marek Polacek <polacek@redhat.com>
5709 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5710 INT_MIN / -1 sanitization only for integer types.
5712 2014-04-25 Marek Polacek <polacek@redhat.com>
5715 * c-common.c (handle_noinline_attribute): Warn if the attribute
5716 conflicts with always_inline attribute.
5717 (handle_always_inline_attribute): Warn if the attribute conflicts
5718 with noinline attribute.
5720 2014-04-25 Marek Polacek <polacek@redhat.com>
5723 * c-common.c (check_main_parameter_types): Warn about variadic main.
5725 2014-04-24 Mike Stump <mikestump@comcast.net>
5727 * c.opt (Wshadow-ivar): Default to on.
5729 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5731 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5733 2014-04-23 Marek Polacek <polacek@redhat.com>
5735 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5737 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5740 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5741 if flag_sanitize_undefined_trap_on_error.
5742 (ubsan_instrument_division, ubsan_instrument_shift,
5743 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5744 if !flag_sanitize_recover.
5746 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
5749 * c-common.c (registered_builtin_types): Make non-static.
5750 * c-common.h (registered_builtin_types): Declare.
5752 2014-04-14 Richard Biener <rguenther@suse.de>
5753 Marc Glisse <marc.glisse@inria.fr>
5756 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5757 apply may-alias the scalar pointer type when applicable.
5759 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5762 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5763 as possible argument for Cilk_spawn.
5765 2014-04-11 Tobias Burnus <burnus@net-b.de>
5768 * c.opt (Wformat-signedness): Add
5769 * c-format.c(check_format_types): Use it.
5771 2014-04-11 Jason Merrill <jason@redhat.com>
5774 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5775 default_conversion for an array argument.
5777 2014-04-08 Marek Polacek <polacek@redhat.com>
5780 * c-ubsan.c: Include asan.h.
5781 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5783 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5785 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5787 2014-04-02 Marek Polacek <polacek@redhat.com>
5789 * c-common.h (c_expand_expr): Remove declaration.
5791 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5794 * c-common.c (add_atomic_size_parameter): When creating new
5795 params vector, push the size argument first.
5797 2014-03-26 Jakub Jelinek <jakub@redhat.com>
5799 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5800 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5801 ubsan_create_data callers.
5803 2014-03-22 Jakub Jelinek <jakub@redhat.com>
5806 * c-opts.c (c_finish_options): Restore cb_file_change call to
5809 2014-03-13 Jakub Jelinek <jakub@redhat.com>
5812 * c-pragma.c (apply_pragma_weak): Only look at
5813 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5814 DECL_ASSEMBLER_NAME_SET_P (decl).
5815 (maybe_apply_pending_pragma_weaks): Exit early if
5816 vec_safe_is_empty (pending_weaks) rather than only when
5818 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5819 set assembler name back to NULL afterwards.
5821 2014-03-11 Jason Merrill <jason@redhat.com>
5823 * c.opt: Add -std=gnu++14.
5825 2014-03-11 Ian Bolton <ian.bolton@arm.com>
5827 * c-opts.c (c_common_post_options): Don't override
5828 -ffp-contract=fast if unsafe-math-optimizations is on.
5830 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
5832 * c.opt: Enable LTO FE for fshort-double.
5834 2014-03-07 Jason Merrill <jason@redhat.com>
5836 * c.opt: Add -std=c++14.
5838 2014-03-06 Marek Polacek <polacek@redhat.com>
5841 * cilk.c (contains_cilk_spawn_stmt): New function.
5842 (contains_cilk_spawn_stmt_walker): Likewise.
5843 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5844 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5846 2014-03-03 Jakub Jelinek <jakub@redhat.com>
5848 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5849 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5850 even when flag_preprocess_only.
5852 2014-02-26 Jason Merrill <jason@redhat.com>
5856 * c-common.c (shorten_compare): Don't check
5857 c_inhibit_evaluation_warnings.
5859 2014-02-19 Jakub Jelinek <jakub@redhat.com>
5862 * c-common.c (c_common_nodes_and_builtins): When initializing
5863 c_uint{16,32,64}_type_node, also set corresponding
5864 uint{16,32,64}_type_node to the same value.
5867 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5868 for PRAGMA_IVDEP if flag_preprocess_only.
5870 2014-02-12 Jakub Jelinek <jakub@redhat.com>
5873 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5874 if false, add ADD itself, rather than vice versa.
5875 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5876 copy. For SAVE_EXPR, only call merge_tlist once.
5878 2014-02-08 Jakub Jelinek <jakub@redhat.com>
5881 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5883 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5885 (c_common_attribute_table): Add alloc_align and assume_aligned
5888 2014-02-06 Marek Polacek <polacek@redhat.com>
5891 * c-common.c (warn_for_sign_compare): Call warning_at with location
5894 2014-02-05 Marek Polacek <polacek@redhat.com>
5897 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5900 2014-02-04 Marek Polacek <polacek@redhat.com>
5903 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5906 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
5910 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5911 handle_vector_size_attribute, handle_nonnull_attribute): Call
5912 default_conversion on the attribute argument.
5913 (handle_nonnull_attribute): Increment the argument number.
5915 2014-01-31 Marek Polacek <polacek@redhat.com>
5918 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5919 build_function_call_vec.
5920 (resolve_overloaded_builtin): Likewise.
5921 * c-common.h (build_function_call_vec): Adjust declaration.
5923 2014-01-30 Marek Polacek <polacek@redhat.com>
5926 * c-common.h (unsafe_conversion_p): Adjust declaration.
5927 (warnings_for_convert_and_check): Likewise.
5928 (convert_and_check): Likewise.
5929 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5930 expansion_point_location_if_in_system_header on it.
5931 (warnings_for_convert_and_check): Add location parameter. Call
5932 expansion_point_location_if_in_system_header on it. Use it.
5933 (convert_and_check): Add location parameter. Use it.
5934 (conversion_warning): Likewise.
5935 (c_add_case_label): Adjust convert_and_check calls.
5936 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5938 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5940 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5942 * c-pragma.c (init_pragma): Likewise.
5945 2014-01-23 Marek Polacek <polacek@redhat.com>
5948 * c-common.c (shorten_compare): Add location_t parameter.
5949 * c-common.h (shorten_binary_op): Adjust declaration.
5951 2014-01-23 Marek Polacek <polacek@redhat.com>
5954 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5955 * c-common.h: Declare it.
5957 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5959 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5960 * c-ada-spec.c (dump_ads): Likewise.
5961 (cpp_check): Likewise.
5962 (dump_ada_specs): Likewise.
5964 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
5967 * c-common.c (handle_no_instrument_function_attribute): Allow
5968 no_instrument_function attribute in class member
5969 definition/declaration.
5971 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5974 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5975 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5976 being COMPOUND_EXPR.
5977 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5978 operand a SAVE_EXPR and second MODIFY_EXPR.
5980 2014-01-09 Jakub Jelinek <jakub@redhat.com>
5983 * c-pch.c (c_common_write_pch): Call
5984 prepare_target_option_nodes_for_pch.
5986 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5988 Update copyright years
5990 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5992 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5993 the copyright notice.
5995 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5997 * c-ada-spec.c (print_constructor): New function.
5998 (print_destructor): Retrieve the origin of the destructor.
5999 (print_ada_declaration): Revamp handling of constructors/destructors.
6001 2013-12-23 Stuart Hastings <stuart@apple.com>
6002 Bill Maddox <maddox@google.com>
6003 Jason Merrill <jason@redhat.com>
6005 * c.opt: Add -fdeclone-ctor-dtor.
6006 * c-opts.c (c_common_post_options): Default to on iff -Os.
6008 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6010 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6012 * c-pragma.h (enum pragma_cilk_clause): Remove.
6013 (enum pragma_omp_clause): Added the following fields:
6014 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6015 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6016 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6017 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6018 PRAGMA_CILK_CLAUSE_UNIFORM.
6021 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6023 * cilk.c (cilk_outline): Made this function non-static.
6024 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6025 (create_cilk_wrapper): Added a new parameter: a function pointer.
6026 (c_install_body_w_frame_cleanup): Remove
6027 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6028 * c-common.h (cilk_outline): New prototype.
6029 (gimplify_cilk_spawn): Removed two parameters.
6030 (cilk_install_body_with_frame_cleanup): New prototype.
6031 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6032 CILK_SPAWN_STMT case.
6034 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6036 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6038 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6039 (int_array_type_node): Remove.
6040 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6042 2013-12-05 Marek Polacek <polacek@redhat.com>
6045 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6046 [ADJUST_FIELD_ALIGN].
6048 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6051 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6052 and check field alignment if set.
6053 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6054 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6056 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6057 Marek Polacek <polacek@redhat.com>
6059 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6060 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6062 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6065 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6068 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6071 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6072 goto invalid. If it is error_mark_node, don't issue further
6075 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6077 * c.opt (Wopenmp-simd): New.
6079 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6081 * c-ubsan.h (ubsan_instrument_return): New prototype.
6082 * c-ubsan.c (ubsan_instrument_return): New function.
6084 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6086 * c-common.c: Add required include files from gimple.h.
6087 * c-gimplify.c: Likewise
6090 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6092 * c-common.c (unsafe_conversion_p): Remove use of
6093 EXPR_LOC_OR_HERE macro.
6094 (conversion_warning): Likewise.
6095 (warnings_for_convert_and_check): Likewise.
6096 (warn_for_collisions_1): Likewise.
6097 (shorten_compare): Likewise, and remove use of in_system_header
6098 macro, using the location from the former.
6099 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6100 (cb_def_pragma): Remove use of in_system_header macro.
6101 (lex_string): Likewise.
6102 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6104 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6105 Mike Stump <mikestump@comcast.net>
6106 Richard Sandiford <rdsandiford@googlemail.com>
6108 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6109 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6110 tree_fits_shwi_p or tree_fits_uhwi_p.
6111 (dump_generic_ada_node): Likewise.
6112 * c-format.c (check_format_arg): Likewise.
6113 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6115 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6117 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6119 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6122 * c-common.c (unsafe_conversion_p): Make this function
6123 return an enumeration with more detail.
6124 (conversion_warning): Use the new return type of
6125 unsafe_conversion_p to separately warn either about conversions
6126 that lower floating point number precision or about the other
6127 kinds of conversions.
6128 * c-common.h (enum conversion_safety): New enumeration.
6129 (unsafe_conversion_p): switching return type to
6130 conversion_safety enumeration.
6131 * c.opt: Adding new warning -Wfloat-conversion and
6132 enabling it with -Wconversion.
6134 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6136 * c-opts.c: Include plugin.h.
6137 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6139 2013-11-19 Marek Polacek <polacek@redhat.com>
6141 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6143 (ubsan_instrument_shift): Likewise.
6144 (ubsan_instrument_vla): Likewise.
6146 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6148 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6149 cast to unsigned type.
6151 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6153 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6155 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6156 rather than tree_low_cst.
6158 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6160 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6161 tree_to_uhwi throughout.
6163 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6165 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6166 tree_low_cst (..., 0) with tree_to_shwi throughout.
6168 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6170 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6171 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6173 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6175 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6176 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6178 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6180 * c-cilkplus.c: New file.
6181 * c-common.c (readonly_error): Add location argument.
6182 * c-common.h (readonly_error): Same.
6183 (c_finish_cilk_clauses): Protoize.
6184 (c_check_cilk_loop): Same.
6185 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6186 Do not fail on error_mark_node.
6187 Abstract increment canonicalization to here...
6188 (c_omp_for_incr_canonicalize_ptr): New.
6189 c-pragma.c (init_pragma): Register "simd" pragma.
6190 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6191 (enum pragma_cilk_clause): New.
6193 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6195 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6196 wchar_type and host_integerp checks.
6198 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6200 * c-common.c: Likewise.
6201 * c-gimplify.c: Likewise.
6204 2013-11-14 Diego Novillo <dnovillo@google.com>
6206 * c-common.c: Include fold-const.h.
6207 Include stor-layout.h.
6209 Include stringpool.h.
6212 Include trans-mem.h.
6213 * c-cppbuiltin.c: Include stor-layout.h.
6214 Include stringpool.h.
6215 * c-format.c: Include stringpool.h.
6216 * c-lex.c: Include stringpool.h.
6217 Include stor-layout.h.
6218 * c-pragma.c: Include stringpool.h.
6221 Include gcc-symtab.h.
6222 * c-pretty-print.c: Include stor-layout.h.
6224 * cilk.c: Include stringpool.h.
6227 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6229 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6230 * c-common.c (c_common_reswords): Add __auto_type.
6231 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6233 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6235 * c-common.c: Include gimplify.h.
6236 * c-gimplify.c: Likewise.
6238 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6239 * c-ubsan.c: Don't include gimple.h.
6241 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6243 * c-common.c (c_common_reswords): Add _Thread_local.
6245 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6247 * c-common.c (atomic_size_supported_p): New function.
6248 (resolve_overloaded_atomic_exchange)
6249 (resolve_overloaded_atomic_compare_exchange)
6250 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6251 Use it instead of comparing size with a local list of sizes.
6253 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6254 Joseph Myers <joseph@codesourcery.com>
6256 * c-common.h (enum rid): Add RID_ATOMIC.
6257 * c-common.c (c_common_reswords): Add _Atomic.
6258 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6259 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6260 * c-format.c (check_format_types): Check for extra _Atomic
6261 qualifiers in format argument.
6262 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6263 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6265 2013-11-06 Tobias Burnus <burnus@net-b.de>
6267 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6269 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6271 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6273 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6274 to mean lack of IEEE 754 support.
6276 2013-11-05 Tobias Burnus <burnus@net-b.de>
6278 * c.opt (-Wdate-time): New option
6279 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6281 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6283 * c-cppbuiltin.c (cpp_iec_559_value): Test
6284 flag_excess_precision_cmdline not flag_excess_precision.
6286 2013-11-05 Tobias Burnus <burnus@net-b.de>
6288 * c.opt (fopenmp-simd): New option.
6289 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6290 (omp_pragmas): ... this new struct.
6291 (c_pp_lookup_pragma): Also walk omp_pragmas.
6292 (init_pragma): Init pragmas for -fopenmp-simd.
6294 2013-11-04 Marek Polacek <polacek@redhat.com>
6297 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6299 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6301 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6303 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6305 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6307 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6308 (dump_ada_specs): Adjust prototype of second callback.
6309 * c-ada-spec.c (cpp_check): New global variable.
6310 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6311 (print_generic_ada_decl): Likewise.
6312 (has_static_fields): Change return type to bool and add guard.
6313 (has_nontrivial_methods): New predicate.
6314 (is_tagged_type): Change return type to bool.
6315 (separate_class_package): Call has_nontrivial_methods.
6316 (pp_ada_tree_identifier): Minor tweaks.
6317 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6318 (dump_ada_array_domains): Likewise.
6319 (dump_ada_array_type): Likewise.
6320 (dump_template_types): Remove cpp_check parameter and do not pass it to
6321 dump_generic_ada_node.
6322 (dump_ada_template): Likewise.
6323 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6325 (print_ada_methods): Change return type to integer. Remove cpp_check
6326 parameter and do not pass it down.
6327 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6328 dump_generic_ada_node.
6329 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6331 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6332 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6333 value of print_ada_methods.
6334 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6335 Set cpp_check to it before invoking dump_ada_nodes.
6336 (dump_ada_specs): Likewise.
6338 2013-11-03 Marek Polacek <polacek@redhat.com>
6340 * c-ubsan.c: Don't include hash-table.h.
6341 (ubsan_instrument_vla): New function.
6342 * c-ubsan.h: Declare it.
6344 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6346 Automated part of renaming of symtab_node_base to symtab_node.
6348 Patch autogenerated by rename_symtab.py from
6349 https://github.com/davidmalcolm/gcc-refactoring-scripts
6350 revision 58bb219cc090b2f4516a9297d868c245495ee622
6352 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6353 symtab_node_base to symtab_node.
6355 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6357 Implement C++14 digit separators.
6358 * c-lex.c (interpret_float): Remove digit separators from scratch string
6359 before building real literal.
6361 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6363 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6365 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6367 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6369 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6371 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6372 (insert_cilk_frame): New prototype.
6373 (cilk_init_builtins): Likewise.
6374 (gimplify_cilk_spawn): Likewise.
6375 (c_cilk_install_body_w_frame_cleanup): Likewise.
6376 (cilk_detect_spawn_and_unwrap): Likewise.
6377 (cilk_set_spawn_marker): Likewise.
6378 (build_cilk_sync): Likewise.
6379 (build_cilk_spawn): Likewise.
6382 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6384 Patch autogenerated by refactor_symtab.py from
6385 https://github.com/davidmalcolm/gcc-refactoring-scripts
6386 revision 58bb219cc090b2f4516a9297d868c245495ee622
6388 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6389 to a true class hierarchy.
6390 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6392 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6394 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6396 2013-10-26 Jeff Law <law@redhat.com>
6398 * c-common.c (c_define_builtins): Remove mudflap support.
6399 * c.opt: Ignore and warn for mudflap options.
6401 2013-10-24 Tobias Burnus <burnus@net-b.de>
6404 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6405 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6407 2013-10-23 Jason Merrill <jason@redhat.com>
6409 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6411 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6413 * c-common.h (omp_clause_mask::operator !=): New method.
6414 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6415 instead of if (mask & something) tests everywhere.
6417 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6418 201307 instead of 201107.
6419 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6420 (c_common_attribute_table): Add "omp declare target" and
6421 "omp declare simd" attributes.
6422 (handle_omp_declare_target_attribute,
6423 handle_omp_declare_simd_attribute): New functions.
6424 * c-omp.c: Include c-pragma.h.
6425 (c_finish_omp_taskgroup): New function.
6426 (c_finish_omp_atomic): Add swapped argument, if true,
6427 build the operation first with rhs, lhs arguments and use NOP_EXPR
6429 (c_finish_omp_for): Add code argument, pass it down to make_code.
6430 (c_omp_split_clauses): New function.
6431 (c_split_parallel_clauses): Removed.
6432 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6433 c_omp_declare_simd_clauses_to_decls): New functions.
6434 * c-common.h (omp_clause_mask): New type.
6435 (OMP_CLAUSE_MASK_1): Define.
6436 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6437 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6438 omp_clause_mask::operator |, omp_clause_mask::operator &,
6439 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6440 omp_clause_mask::operator ==): New methods.
6441 (enum c_omp_clause_split): New.
6442 (c_finish_omp_taskgroup): New prototype.
6443 (c_finish_omp_atomic): Add swapped argument.
6444 (c_finish_omp_for): Add code argument.
6445 (c_omp_split_clauses): New prototype.
6446 (c_split_parallel_clauses): Removed.
6447 (c_omp_declare_simd_clauses_to_numbers,
6448 c_omp_declare_simd_clauses_to_decls): New prototypes.
6449 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6450 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6451 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6452 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6453 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6454 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6455 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6456 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6457 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6458 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6459 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6460 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6461 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6462 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6463 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6464 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6465 PRAGMA_OMP_CLAUSE_UNIFORM.
6467 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6469 PR tree-optimization/20318
6470 * c-common.c (handle_returns_nonnull_attribute): New function.
6471 (c_common_attribute_table): Add returns_nonnull.
6473 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6476 * c.opt (fcheck-new): Move to common.opt.
6478 2013-09-25 Marek Polacek <polacek@redhat.com>
6479 Jakub Jelinek <jakub@redhat.com>
6482 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6483 an expression if we can prove it is correct.
6484 (ubsan_instrument_division): Likewise. Remove unnecessary
6487 2013-09-18 Marek Polacek <polacek@redhat.com>
6490 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6492 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6494 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6497 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6498 fobjc-gc, freplace-objc-classes): Accept for LTO.
6500 2013-09-13 Jacek Caban <jacek@codeweavers.com>
6502 * c-target.def: New hook
6504 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6507 * c.opt (Wdelete-incomplete): Add.
6509 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6511 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6512 (vector_types_compatible_elements_p): New function.
6513 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6515 (vector_types_compatible_elements_p): Declare.
6517 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6519 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6520 a virtual member function.
6521 (pp_simple_type_specifier): Remove.
6522 (pp_c_type_specifier): Likewise.
6523 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6524 Rename from pp_c_type_specifier. Adjust.
6525 (c_pretty_printer::c_pretty_printer): Do not assign to
6526 simple_type_specifier.
6528 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6530 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6532 (c_pretty_printer::storage_class_specifier): Likewise.
6533 (c_pretty_printer::initializer): Likewise.
6534 (pp_declaration): Remove.
6535 (pp_declaration_specifiers): Likewise.
6536 (pp_abstract_declarator): Likewise.
6537 (pp_declarator): Likewise.
6538 (pp_type_id): Likewise.
6539 (pp_statement): Likewise.
6540 (pp_constant): Likewise.
6541 (pp_id_expression): Likewise.
6542 (pp_primary_expression): Likewise.
6543 (pp_unary_expression): Likewise.
6544 (pp_multiplicative_expression): Likewise.
6545 (pp_conditional_expression): Likewise.
6546 (pp_assignment_expression): Likewise.
6547 (pp_expression): Likewise.
6548 (pp_c_type_id): Likewise.
6549 (pp_c_storage_class_specifier): Likewise.
6550 * c-pretty-print.c (pp_c_type_cast): Tidy.
6551 (pp_c_pointer): Likewise.
6552 (pp_c_type_specifier): Likewise.
6553 (pp_c_parameter_type_list): Likewise.
6554 (pp_c_function_definition): Likewise.
6555 (pp_c_init_declarator): Likewise.
6556 (pp_c_initializer_list): Likewise.
6557 (pp_c_constructor_elts): Likewise.
6558 (c_pretty_printer::direct_abstract_declarator): Likewise.
6559 (c_pretty_printer::declaration_specifiers): Likewise.
6560 (c_pretty_printer::primary_expression): Likewise.
6561 (c_pretty_printer::postfix_expression): Likewise.
6562 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6563 (c_pretty_printer::storage_class_specifier): Rename from
6564 pp_c_storage_class_specifier.
6565 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6566 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6567 storage_class_specifier, initializer, offset_list, flags.
6569 2013-08-30 Marek Polacek <polacek@redhat.com>
6571 * c-ubsan.c: New file.
6572 * c-ubsan.h: New file.
6574 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6576 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6578 (c_pretty_printer::declaration_specifiers): Likewise.
6579 (c_pretty_printer::declarator): Likewise.
6580 (c_pretty_printer::abstract_declarator): Likewise.
6581 (c_pretty_printer::direct_abstract_declarator): Likewise.
6582 (c_pretty_printer::direct_declarator): Likewise.
6583 (c_pretty_printer::function_specifier): Likewise.
6584 (pp_declaration): Adjust.
6585 (pp_declaration_specifiers): Likewise.
6586 (pp_abstract_declarator): Likewise.
6587 (pp_direct_declarator): Likewise.
6588 (pp_function_specifier): Likewise.
6589 (pp_direct_abstract_declarator): Remove as unused.
6590 (pp_c_declaration): Remove.
6591 (pp_c_declaration_specifiers): Likewise.
6592 (pp_c_declarator): Likewise.
6593 (pp_c_direct_declarator): Likewise.
6594 (pp_c_function_specifier): Likewise.
6595 (pp_c_direct_abstract_declarator): Likewise.
6596 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6597 from pp_c_abstract_declarator. Adjust.
6598 (c_pretty_printer::direct_abstract_declarator): Rename from
6599 pp_c_direct_abstract_declarator. Adjust.
6600 (c_pretty_printer::function_specifier): Rename from
6601 pp_c_function_specifier. Adjust.
6602 (c_pretty_printer::declaration_specifiers): Rename from
6603 pp_c_declaration_specifiers. Adjust.
6604 (c_pretty_printer::direct_declarator): Rename from
6605 pp_c_direct_declarator. Adjust.
6606 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6607 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6608 (c_pretty_printer::c_pretty_printer): Do not assign to
6609 declaration, declaration_specifiers, declarator,
6610 direct_declarator, direct_abstract_declarator, function_specifier.
6612 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6614 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6615 virtual member function.
6616 (c_pretty_printer::multiplicative_expression): Likewise.
6617 (c_pretty_printer::conditional_expression): Likewise.
6618 (c_pretty_printer::assignment_expression): Likewise.
6619 (c_pretty_printer::expression): Likewise.
6620 (pp_unary_expression): Adjust.
6621 (pp_multiplicative_expression): Likewise.
6622 (pp_assignment_expression): Likewise.
6623 (pp_conditional_expression): Likewise.
6624 (pp_expression): Likewise.
6625 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6626 from pp_c_unary_expression. Adjust.
6627 (c_pretty_printer::multiplicative_expression): Rename from
6628 pp_c_multiplicative_expression. Adjust.
6629 (c_pretty_printer::conditional_expression): Rename from
6630 pp_c_conditional_expression. Adjust.
6631 (c_pretty_printer::assignment_expression): Rename from
6632 pp_c_assignment_expression. Adjust.
6633 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6634 (c_pretty_printer::c_pretty_printer): Do not assign to
6635 unary_expression, multiplicative_expression,
6636 conditional_expression, expression.
6638 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6640 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6641 virtual member function.
6642 (pp_postfix_expression): Adjust.
6643 (pp_c_postfix_expression): Remove.
6644 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6645 from pp_c_postfix_expression. Adjust.
6646 (c_pretty_printer::c_pretty_printer): Do not assign to
6649 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6651 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6652 virtua member function.
6653 (pp_primary_expression): Adjust.
6654 (pp_c_primary_expression): Remove.
6655 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6656 from pp_c_primary_expression. Adjust.
6657 (pp_c_initializer_list): Use pp_primary_expression.
6658 (c_pretty_printer::c_pretty_printer): Do not assign to
6661 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6663 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6664 * c-pretty-print.c (M_): Remove.
6665 (c_pretty_printer::translate_string): Define.
6666 (pp_c_type_specifier): Use it.
6667 (pp_c_primary_expression): Likewise.
6668 (pp_c_expression): Likewise.
6670 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6672 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6674 (pp_c_id_expression): Remove.
6675 (pp_id_expression): Adjust.
6676 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6677 pp_c_id_expression. Adjust.
6678 (pp_c_postfix_expression): Use pp_id_expression.
6679 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6681 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6683 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6685 (pp_constant): Adjust.
6686 (pp_c_constant): Remove.
6687 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6688 pp_c_constant. Adjust.
6690 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6691 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6693 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6695 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6696 (c_pretty_printer::c_pretty_printer): Declare.
6697 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6698 c_pretty_printer_init. Adjust.
6699 (print_c_tree): Do not call c_pretty_printer_init.
6700 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6702 2013-08-09 Arnaud Charlet <charlet@adacore.com>
6704 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6706 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6709 * c-common.c (pointer_int_sum): Add bool parameter.
6710 * c-common.h (pointer_int_sum): Adjust declaration.
6712 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6714 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6715 c_pretty_printer variable.
6717 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6719 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6721 (pp_c_base): Likewise. Adjust users.
6722 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6723 (pp_c_whitespace): Do not call pp_base.
6724 (pp_c_left_paren): Likewise.
6725 (pp_c_right_paren): Likewise.
6726 (pp_c_left_brace): Likewise.
6727 (pp_c_right_brace): Likewise.
6728 (pp_c_left_bracket): Likewise.
6729 (pp_c_right_bracket): Likewise.
6730 (pp_c_dot): Likewise.
6731 (pp_c_ampersand): Likewise.
6732 (pp_c_star): Likewise.
6733 (pp_c_arrow): Likewise.
6734 (pp_c_semicolon): Likewise.
6735 (pp_c_complement): Likewise.
6736 (pp_c_exclamation): Likewise.
6737 (pp_c_direct_declarator): Likewise.
6738 (pp_c_ws_string): Likewise.
6739 (pp_c_identifier): Likewise.
6740 (pp_c_statement): Likewise.
6741 (print_c_tree): Likewise.
6743 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6746 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6747 provide useful error strings.
6749 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6751 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6752 printer functions instead of pp_string or operators and punctuators.
6753 (dump_generic_ada_node): Likewise.
6754 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6755 (pp_c_relational_expression): Likewise.
6756 (pp_c_logical_or_expression): Likewise.
6758 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6760 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6761 functions instead of pp_character.
6762 (pp_ada_tree_identifier): Likewise.
6763 (dump_ada_double_name): Likewise.
6764 (dump_ada_function_declaration): Likewise.
6765 (dump_ada_array_domains): Likewise.
6766 (dump_template_types): Likewise.
6767 (dump_generic_ada_node): Likewise.
6768 (print_ada_declaration): Likewise.
6769 (print_ada_struct_decl): Likewise.
6770 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6772 2013-07-23 Tom Tromey <tromey@redhat.com>
6774 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6775 * c-common.c (c_common_reswords): Add _Generic.
6777 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
6779 * c-common.c: Fix typos.
6780 * c-common.h: Likewise.
6782 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
6785 * c-common.c (c_common_attribute_table): Add warn_unused.
6786 (handle_warn_unused_attribute): New.
6788 2013-07-10 Jakub Jelinek <jakub@redhat.com>
6790 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6791 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6793 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6796 * c.opt: Add Wconditionally-supported.
6798 2013-07-08 Graham Stott <graham.stott@btinternet.com>
6800 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6801 unused variables l_length and l_node.
6803 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6806 * c-common.c (complete_array_type): Delay folding first index
6807 like other indices. When folding, check for index overflow.
6809 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
6812 * c-common.h (c_build_vec_perm_expr): New complain argument.
6813 * c-common.c (c_build_vec_perm_expr): Likewise.
6814 Use save_expr also in C++.
6816 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6818 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6819 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6820 * c-opts.c (c_common_post_options): Likewise.
6822 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6824 * array-notation-common.c (length_mismatch_in_expr): Changed the
6825 parameter type's from a dynamic array to a vec_tree. Also removed
6826 the size parameters.
6827 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6830 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6832 * c-common.h (struct cilkplus_an_parts): New structure.
6833 (struct cilkplus_an_loop_parts): Likewise.
6834 (cilkplus_extract_an_triplets): New prototype.
6835 (fix_sec_implicit_args): Likewise.
6836 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6837 (fix_sec_implicit_args): Likewise.
6839 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6841 * array-notation-common.c (find_inv_trees): Removed an unwanted
6843 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6844 enum rid to enum tree_code.
6846 2013-06-11 Jan Hubicka <jh@suse.cz>
6848 * c-common.c (handle_alias_ifunc_attribute): Do not set
6849 DECL_EXTERNAL for weakref variables.
6850 * c-pragma.c (handle_pragma_weak): Make sure aliases
6851 are not declared as external.
6853 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6855 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6856 function from c/c-array-notation.c.
6857 (is_cilkplus_reduce_builtin): Likewise.
6858 (find_rank): Likewise.
6859 (extract_array_notation_exprs): Likewise.
6860 (replace_array_notations): Likewise.
6861 (find_inv_trees): Likewise.
6862 (replace_inv_trees): Likewise.
6863 (contains_array_notation_expr): Likewise.
6864 (find_correct_array_notation_type): Likewise.
6865 * c-common.h (struct inv_list): Moved this struct from the file
6866 c/c-array-notation.c and added a new field called additional tcodes.
6867 (length_mismatch_in_expr_p): New prototype.
6868 (is_cilkplus_reduce_builtin): Likewise.
6869 (find_rank): Likewise.
6870 (extract_array_notation_exprs): Likewise.
6871 (replace_array_notation): Likewise.
6872 (find_inv_trees): Likewise.
6873 (replace_inv_trees): Likewise.
6874 (find_correct_array_notation_type): Likewise.
6876 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6878 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6879 function array_notation_init_builtins is called.
6880 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6881 * c-common.def (ARRAY_NOTATION_REF): New tree.
6882 * c-common.h (build_array_notation_expr): New function declaration.
6883 (build_array_notation_ref): Likewise.
6884 (extract_sec_implicit_index_arg): New extern declaration.
6885 (is_sec_implicit_index_fn): Likewise.
6886 (ARRAY_NOTATION_CHECK): New define.
6887 (ARRAY_NOTATION_ARRAY): Likewise.
6888 (ARRAY_NOTATION_START): Likewise.
6889 (ARRAY_NOTATION_LENGTH): Likewise.
6890 (ARRAY_NOTATION_STRIDE): Likewise.
6891 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6893 (pp_c_expression): Likewise.
6894 * c.opt (flag_enable_cilkplus): New flag.
6895 * array-notation-common.c: New file.
6897 2013-05-14 Jakub Jelinek <jakub@redhat.com>
6900 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6902 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
6904 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6907 2013-05-07 Han Shen <shenhan@google.com>
6909 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6911 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6913 * c-common.c (check_user_alignment): Emit error for negative values.
6915 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6917 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6919 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6921 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6922 __GXX_EXPERIMENTAL_CXX1Y__.
6924 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6925 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6927 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6928 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6929 to simply use OPT_Wpointer_arith.
6930 (c_sizeof_or_alignof_type): Likewise.
6932 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6934 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6936 2013-04-12 Jakub Jelinek <jakub@redhat.com>
6938 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6939 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6942 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6944 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6946 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6948 * c-common.c (pointer_int_sum): Remove dead code.
6950 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6953 * c-common.c (handle_optimize_attribute): Don't call
6954 save_optabs_if_changed.
6956 2013-03-05 Jakub Jelinek <jakub@redhat.com>
6959 * c-pch.c (pch_init): Free target_validity at the end.
6961 2013-03-04 Jakub Jelinek <jakub@redhat.com>
6963 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6965 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6966 Jakub Jelinek <jakub@redhat.com>
6969 * c-common.c (handle_no_sanitize_address_attribute): New function.
6970 (c_common_attribute_table): Add no_sanitize_address attribute.
6971 (handle_no_address_safety_analysis_attribute): Add
6972 no_sanitize_address attribute, not no_address_safety_analysis
6975 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
6978 * c-common.c (handle_optimize_attribute): Call
6979 save_optabs_if_changed.
6981 2013-02-18 Jakub Jelinek <jakub@redhat.com>
6982 Steven Bosscher <steven@gcc.gnu.org>
6985 * c-opts.c (c_common_post_options): If debug info is enabled
6986 and non-dwarf*, refuse to load PCH files and when writing PCH
6989 2013-02-05 Jakub Jelinek <jakub@redhat.com>
6992 * c-common.c (handle_error_attribute): Fix condition.
6994 2013-01-30 Jakub Jelinek <jakub@redhat.com>
6997 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6999 2013-01-18 Jason Merrill <jason@redhat.com>
7002 * c.opt (-fextern-tls-init): New.
7003 * c-opts.c (c_common_post_options): Handle it.
7005 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7008 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7009 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7010 and is either negative or bigger or equal to type precision
7011 of the first operand.
7013 2012-12-03 Marek Polacek <polacek@redhat.com>
7016 * c-common.c (check_user_alignment): Swap order of tests,
7017 check TREE_CODE first.
7019 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7022 * c-common.h (overflow_type): New enum.
7023 (build_userdef_literal): Add overflow_type argument.
7024 (tree_userdef_literal): Add overflow_type.
7025 (USERDEF_LITERAL_OVERFLOW): New access macro.
7026 * c-common.c (build_userdef_literal): Add overflow_type
7028 * c-lex.c (c_lex_with_flags): Add overflow_type to
7029 build_userdef_literal calls.
7030 (interpret_integer, interpret_float): Add overflow_type argument.
7032 2012-11-28 Richard Biener <rguenther@suse.de>
7035 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7036 here and use a type with proper overflow behavior for types that would
7037 need to be promoted for the arithmetic.
7039 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7042 * c-common.c (handle_no_address_safety_analysis_attribute): New
7044 (c_common_attribute_table): Add no_address_safety_analysis.
7046 2012-11-16 Simon Baldwin <simonb@google.com>
7048 * c.opt: Add f[no-]canonical-system-headers.
7049 * c-opts.c (c_common_handle_option): Handle
7050 OPT_fcanonical_system_headers.
7052 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7055 * c-opts.c (c_common_handle_option): Set new flags.
7056 * c.opt: Describe new flags.
7058 2012-11-09 Jason Merrill <jason@redhat.com>
7060 * c.opt (Wabi-tag): New.
7062 2012-11-09 Andi Kleen <ak@linux.intel.com>
7065 * c-common.c (get_atomic_generic_size): Mask with
7068 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7071 * c.opt (Wformat): Make it Alias Wformat=1.
7072 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7073 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7075 (Wformat=): RejectNegative. Use LangEnabledBy.
7076 (Wnonnull): Use LangEnabledBy.
7077 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7078 * c-format.c (set_Wformat): Delete.
7079 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7080 (maybe_read_dollar_number): Likewise.
7081 (avoid_dollar_number): Likewise.
7082 (finish_dollar_format_checking): Likewise.
7083 (check_format_info): Likewise.
7084 (check_format_info_main): Likewise.
7085 (check_format_types): Likewise.
7086 (format_type_warning): Likewise.
7087 * c-common.c (int): Likewise.
7088 (check_function_sentinel): Likewise.
7089 * c-common.h (warn_format,set_Wformat): Do not declare here.
7091 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7094 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7095 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7097 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7099 (Wvariadic-macros): Init(1).
7100 * c-opts.c (c_common_handle_option): Do not handle them
7102 (c_common_post_options): Likewise.
7103 (sanitize_cpp_opts): warn_unused_macros is now
7104 cpp_warn_unused_macros.
7105 (push_command_line_include): Likewise.
7106 * c-common.c (warn_unknown_pragmas): Do not define.
7107 * c-common.h (warn_unknown_pragmas): Do not declare.
7109 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7112 * c-common.c (conversion_warning): Handle conditional expressions.
7114 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7117 * c.opt (Wreturn_local_addr): Define new option.
7119 2012-10-25 Jason Merrill <jason@redhat.com>
7121 * c.opt (Wvirtual-move-assign): New.
7123 * c.opt (Winherited-variadic-ctor): New.
7125 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7128 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7130 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7132 * c-common.h (pch_cpp_save_state): Declare.
7133 * c-target.def (c_preinclude): New hook.
7134 * c-opts.c (done_preinclude): New.
7135 (push_command_line_include): Handle default preincluded header.
7136 (cb_file_change): Call pch_cpp_save_state when calling
7137 push_command_line_include.
7138 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7139 (pch_cpp_save_state): New.
7140 (pch_init): Call pch_cpp_save_state conditionally, instead of
7141 calling cpp_save_state.
7143 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7147 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7148 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7149 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7150 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7151 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7152 * c-opts.c (c_common_handle_option): Remove explicit handling from
7154 (c_common_post_options): Likewise.
7156 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7158 * c-ada-spec.c (LOCATION_COL): Delete.
7159 (compare_location): New function.
7160 (compare_node): Use it.
7161 (compare_comment): Likewise.
7163 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7167 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7168 * c-opts.c (c_common_handle_option): Do not set them here. Add
7170 (c_common_post_options): Likewise.
7172 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7174 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7175 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7176 Remove POINTER_TYPE handling, add large unsigned handling and use
7177 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7179 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7182 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7183 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7184 locs and array of 3 trees instead of just single loc and single
7185 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7186 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7187 For *cmp* builtins that take two sources strings report warnings
7188 about first and second source, not about destination and source.
7190 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7193 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7195 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7197 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7198 declaring something coming from another file.
7200 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7203 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7205 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7208 * c-common.c (warn_about_parentheses): Add location_t parameter;
7209 use EXPR_LOC_OR_LOC.
7210 * c-common.h: Update declaration.
7212 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7215 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7216 more operations. Make error messages optional.
7217 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7218 (scalar_to_vector): Declare.
7220 2012-10-08 Jason Merrill <jason@redhat.com>
7222 * c-common.c (c_common_reswords): Add thread_local.
7224 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7226 PR c++/53528 C++11 attribute support
7227 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7229 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7231 (handle_aligned_attribute): In choose strictest alignment
7232 among many. Use new check_cxx_fundamental_alignment_constraints.
7233 (handle_transparent_union_attribute): In c++11 attribute syntax,
7234 don't look through typedefs.
7236 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7238 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7239 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7242 2012-09-25 Dehao Chen <dehao@google.com>
7245 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7246 map when read in the pch.
7248 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7250 * c-ada-spec.c: Style fixes.
7252 2012-09-18 Thomas Quinot <quinot@adacore.com>
7254 * c.opt (-fada-spec-parent): Define new command line switch.
7255 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7256 is specified, generate binding spec as a child of the specified unit.
7258 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7259 Manuel López-Ibáñez <manu@gcc.gnu.org>
7262 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7264 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7266 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7267 for pointers, and add missing Convention C pragma.
7268 (print_ada_struct_decl): Add missing aliased keyword.
7269 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7271 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7273 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7274 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7275 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7276 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7277 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7279 2012-08-10 Richard Guenther <rguenther@suse.de>
7281 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7283 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7285 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7286 instead of separate pp_newline and pp_flush.
7287 (print_c_tree): Likewise.
7289 2012-07-26 Richard Henderson <rth@redhat.com>
7291 * c-common.c (handle_hot_attribute): Allow labels.
7292 (handle_cold_attribute): Likewise.
7294 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7297 * c-common.c (check_function_nonnull): Handle multiple nonnull
7298 attributes properly.
7300 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7302 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7303 * c-ada-spec.c: Likewise.
7304 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7306 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7308 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7309 Remove code conditional on it.
7311 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7313 * c-gimplify.c: Do not include basic-block.h.
7314 * c-common.c: Do not include linfuncs.h.
7316 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7318 * c-common.h: Include tree.h.
7320 2012-07-02 Jason Merrill <jason@redhat.com>
7323 * c-common.c (get_priority): Call default_conversion.
7325 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7327 * c-pch.c (c_common_write_pch): Remove unused variables.
7329 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7331 * cppspec.c: Moved from gcc/ to here.
7333 2012-06-27 Kai Tietz <ktietz@redhat.com>
7335 PR preprocessor/37215
7336 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7338 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7340 * c-common.h (c_common_print_pch_checksum): Remove.
7341 * c-pch.c: Do not include output.h.
7342 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7343 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7344 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7345 (struct c_pch_header): Remove.
7346 (get_ident): Update gpch version.
7347 (pch_init): Do not print executable_checksum to asm_out_file.
7348 Do not fail if there is no asm_out_file to read back from. Set
7349 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7350 (c_common_write_pch): Verify that nothing was written to asm_out_file
7351 since pch_init was called. Do not write a c_pch_header, and do not
7352 copy from asm_out_file to the PCH.
7353 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7354 the content of asm_out_file from the PCH.
7355 (c_common_print_pch_checksum): Remove.
7356 * c-opts.c (c_common_init): Print out executable_checksum directly.
7358 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7360 * c-target.def (objc_declare_unresolved_class_reference,
7361 objc_declare_class_definition): Add new hooks.
7363 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7365 * c-lex.c: Do not include output.h.
7366 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7367 Remove uses of ASM_OUTPUT_IDENT.
7369 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7372 * c-common.h (c_build_vec_perm_expr): Move decl here.
7373 * c-common.c (c_build_vec_perm_expr): Move definition
7376 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7378 * c.opt (fconserve-space): Turn into a no-op.
7380 2012-06-04 Sterling Augustine <saugustine@google.com>
7382 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7383 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7384 both the start and end of the function.
7386 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7388 * c-common.c: Do not include output.h.
7389 * c-pragma.c: Likewise.
7391 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7393 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7394 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7395 (lang_decl_name): Handle namespace decls.
7397 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7399 * c-ada-spec.c: Do not include output.h.
7400 * c-semantics.c: Likewise.
7402 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7404 * c-common.c: Fix typo.
7406 2012-05-29 Michael Matz <matz@suse.de>
7408 * c-common.h (c_expand_decl): Remove prototype.
7410 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7412 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7413 * c-opts.c (c_common_handle_option): Remove code handling
7414 warn_missing_braces.
7416 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7419 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7422 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7425 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7427 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7429 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7430 * c-opts.c (c_common_handle_option): Do not handle explicitly
7431 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7433 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7435 PR preprocessor/7263
7436 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7437 to cpp_classify_number. For diagnostics, use the precise location
7438 instead of the global input_location.
7440 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7443 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7445 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7447 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7449 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7452 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7453 Wreorder): Use LangEnabledBy.
7454 * c-opts.c (c_common_handle_option): Do not enable them
7455 explicitly. Call lang-specific generated functions.
7456 (c_common_post_options): Do not set them here.
7458 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7460 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7461 Wmissing-field-initializers,Wmissing-parameter-type,
7462 Wold-style-declaration,Woverride-init): Use EnabledBy.
7463 * c-opts.c (c_common_post_options): Do not set here explicitly.
7465 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7468 * c-opts.c (c_common_handle_option): Use handle_generated_option
7469 to enable sub-options.
7471 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7474 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7476 2012-05-10 Richard Guenther <rguenther@suse.de>
7478 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7479 adjust commentary about TYPE_IS_SIZETYPE types.
7481 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7484 * c-common.c (warn_logical_operator): Check that argument of
7485 integer_zerop is not NULL.
7487 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7490 * c-common.c (warn_logical_operator): Do not warn if either side
7491 is already true or false.
7493 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7496 * c-common.c (expr_original_type): New.
7497 (shorten_compare): Do not warn for enumeration types.
7499 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7501 * c.opt (fpermissive): Add Var(flag_permissive).
7503 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
7506 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7507 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7509 2012-04-30 Dodji Seketeli <dodji@redhat.com>
7511 Add -Wvarargs option
7512 * c.opt (Wvarargs): Define new option.
7514 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7516 * c-common.c (check_function_arguments): Replace
7517 Wmissing-format-attribute with Wsuggest-attribute=format.
7519 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7521 * c.opt (Wsuggest-attribute=format): New. Alias of
7522 Wmissing-format-attribute.
7523 * c-format.c (decode_format_type): Replace
7524 Wmissing-format-attribute with Wsuggest-attribute=format.
7525 (check_function_format): Likewise.
7527 2012-04-27 Ollie Wild <aaw@google.com>
7529 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7530 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7531 * c.opt: Add Wliteral-suffix.
7533 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7536 * c.opt (Wpedantic): New.
7537 (pedantic): Alias Wpedantic.
7538 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7539 (c_common_post_options): Likewise.
7540 (sanitize_cpp_opts): Likewise.
7541 * c-lex.c (interpret_float): Likewise.
7542 * c-format.c (check_format_types): Likewise.
7543 * c-common.c (pointer_int_sum): Likewise.
7544 (c_sizeof_or_alignof_type): Likewise.
7545 (c_add_case_label): Likewise.
7546 (c_do_switch_warnings): Likewise.
7547 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7549 2012-04-15 Jason Merrill <jason@redhat.com>
7552 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7553 (C_STD_NAME): Distinguish between C++98 and C++11.
7555 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7558 * c-common.h (uint16_type_node): Rename into...
7559 (c_uint16_type_node): ...this.
7560 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7561 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7563 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7565 * c-common.c (warn_if_unused_value): Move definition to here.
7566 * c-common.h (warn_if_unused_value): Move declaration to here.
7568 2012-03-23 William Bader <williambader@hotmail.com>
7570 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7572 2012-03-20 Jason Merrill <jason@redhat.com>
7574 * c-common.h (enum cxx_dialect): Add cxx1y.
7575 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7577 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7578 * c-opts.c (c_common_post_options): Likewise.
7579 (set_std_cxx1y): New.
7580 (c_common_handle_option): Call it.
7581 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7583 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7586 * c.opt ([Wuseless-cast]): Add.
7588 2012-03-16 Richard Guenther <rguenther@suse.de>
7590 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7592 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7595 * c.opt (ftemplate-backtrace-limit) Add.
7597 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7599 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7601 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7602 (init_pragma): Don't register extern_prefix.
7604 2012-03-12 Richard Guenther <rguenther@suse.de>
7606 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7607 (builtin_type_for_size): Likewise.
7609 2012-02-13 Jakub Jelinek <jakub@redhat.com>
7612 * c-common.c (sync_resolve_params): Don't decide whether to convert
7613 or not based on TYPE_SIZE comparison, convert whenever arg_type
7614 is unsigned INTEGER_TYPE.
7616 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7619 * c.opt ([Wunused-local-typedefs]): Fix description.
7621 2012-01-24 Mike Stump <mikestump@comcast.net>
7623 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7626 2012-01-18 Richard Guenther <rguenther@suse.de>
7628 * c-opts.c (c_common_post_options): Reset LTO flags if
7629 we are about to generate a PCH.
7631 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7634 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7635 use pp_unsigned_wide_integer.
7637 2012-01-10 Richard Guenther <rguenther@suse.de>
7640 * c-opts.c (c_common_handle_option): Move -Werror handling
7641 to language independent code.
7643 2012-01-05 Richard Guenther <rguenther@suse.de>
7646 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7649 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7652 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7653 of array types with an unknown bound.
7655 2011-12-20 Joseph Myers <joseph@codesourcery.com>
7657 * c-common.c (flag_isoc99): Update comment to refer to C11.
7658 (flag_isoc1x): Change to flag_isoc11.
7659 * c-common.h (flag_isoc99): Update comment to refer to C11.
7660 (flag_isoc1x): Change to flag_isoc11.
7661 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7663 * c-opts.c (set_std_c1x): Change to set_std_c11.
7664 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7666 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7667 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7668 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7670 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7671 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7672 (std=gnu1x): Make alias of std=gnu11.
7674 2011-12-19 Jason Merrill <jason@redhat.com>
7677 * c-common.c (handle_transparent_union_attribute): Check the first
7678 field if the type is complete.
7680 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7683 * c-common.c (RID_IS_FINAL): Add.
7684 * c-common.h (RID_IS_FINAL): Add.
7686 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7688 * c.opt (fgnu-runtime): Provide full description.
7689 (fnext-runtime): Likewise.
7690 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7692 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
7694 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7695 predefines in one place. Add LOCK_FREE predefines.
7696 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7699 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
7702 * c-common.c (get_atomic_generic_size): Check for various error
7704 (resolve_overloaded_atomic_exchange,
7705 resolve_overloaded_atomic_compare_exchange,
7706 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7707 error_mark_node for error conditions.
7709 2011-11-08 Richard Guenther <rguenther@suse.de>
7714 2011-11-07 Richard Henderson <rth@redhat.com>
7715 Aldy Hernandez <aldyh@redhat.com>
7716 Torvald Riegel <triegel@redhat.com>
7718 Merged from transactional-memory.
7720 * c-common.c (handle_tm_wrap_attribute,
7721 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7722 (struct c_common_reswords): Added __transaction* keywords.
7723 (struct c_common_attribute_table): Added transaction* and tm_regparm
7725 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7727 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7728 find_tm_attribute): Declare.
7730 2011-11-07 Jason Merrill <jason@redhat.com>
7733 * c-common.c, c-common.h: Revert yesterday's changes.
7735 2011-11-06 Jason Merrill <jason@redhat.com>
7738 * c-common.c (decl_has_visibility_attr): Split out from...
7739 (c_determine_visibility): ...here.
7740 * c-common.h: Declare it.
7742 2011-11-06 Joseph Myers <joseph@codesourcery.com>
7744 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7745 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7747 (check_user_alignment): New. Split out of
7748 handle_aligned_attribute. Disallow integer constants with
7749 noninteger types. Conditionally allow zero.
7750 (handle_aligned_attribute): Use check_user_alignment.
7751 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7753 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
7754 Richard Henderson <rth@redhat.com>
7756 Merged from cxx-mem-model.
7758 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
7759 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
7760 parameters that are the same type size.
7761 (get_atomic_generic_size): New. Find size of generic
7762 atomic function parameters and do typechecking.
7763 (add_atomic_size_parameter): New. Insert size into parameter list.
7764 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7765 either __atomic_exchange_n or external library call.
7766 (resolve_overloaded_atomic_compare_exchange): Restructure
7767 __atomic_compare_exchange to either _n variant or external library call.
7768 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
7769 __atomic_load_n or an external library call.
7770 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7771 __atomic_store_n or an external library call.
7772 (resolve_overloaded_builtin): Handle new __atomic builtins.
7774 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7777 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7778 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7779 <INDIRECT_REF>: Return the argument.
7780 <ARRAY_REF>: Remove special code for negative offset.
7781 Call fold_build_pointer_plus instead of size_binop.
7782 (fold_offsetof): Remove STOP_REF argument and adjust.
7783 * c-common.h (fold_offsetof_1): Declare.
7784 (fold_offsetof): Remove STOP_REF argument.
7786 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7789 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7790 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7791 Wnarrowing for C++0x and C++98.
7792 * c.opt ([Wnarrowing]): Update.
7794 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7797 * c.opt: Add Wzero-as-null-pointer-constant.
7799 2011-10-31 Jason Merrill <jason@redhat.com>
7801 * c.opt (-fdeduce-init-list): Off by default.
7804 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7805 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7807 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7809 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7812 * c.opt (fvisibility-inlines-hidden): Description change.
7814 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7816 Implement C++11 user-defined literals.
7817 * c-common.c (build_userdef_literal): New.
7818 * c-common.def: New tree code.
7819 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7820 * c-lex.c (interpret_float): Add suffix parm.
7821 (c_lex_with_flags): Build literal tokens.
7823 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7827 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7830 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7831 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7832 Wnarrowing for C++0x and C++98.
7833 * c.opt ([Wnarrowing]): Update.
7835 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7838 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7839 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7840 Wnarrowing for C++0x and C++98.
7841 * c.opt ([Wnarrowing]): Update.
7843 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7846 * c-common.c (conversion_warning): Remove code looking for
7847 artificial operands.
7849 2011-10-18 Dodji Seketeli <dodji@redhat.com>
7852 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
7853 !NO_IMPLICIT_EXTERN_C.
7855 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
7857 * c-common.c (c_common_reswords): Add __bases,
7859 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7861 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7864 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7866 2011-10-15 Tom Tromey <tromey@redhat.com>
7867 Dodji Seketeli <dodji@redhat.com>
7869 * c.opt (fdebug-cpp): New option.
7870 * c-opts.c (c_common_handle_option): Handle the option.
7871 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7872 output stream in parameter. Factorized from ...
7873 (maybe_print_line): ... this. Dump location debug information when
7874 -fdebug-cpp is in effect.
7875 (print_line_1): New static function. Takes an output stream in
7876 parameter. Factorized from ...
7877 (print_line): ... here. Dump location information when -fdebug-cpp
7879 (scan_translation_unit): Dump location information when
7880 -fdebug-cpp is in effect.
7882 2011-10-15 Tom Tromey <tromey@redhat.com>
7883 Dodji Seketeli <dodji@redhat.com>
7885 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7887 * c-opts.c (c_common_handle_option)<case
7888 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7889 cases. Handle -ftrack-macro-expansion with and without argument.
7891 2011-10-15 Tom Tromey <tromey@redhat.com>
7892 Dodji Seketeli <dodji@redhat.com>
7894 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7895 (print_line, cb_define, do_line_change): Adjust to avoid touching
7896 the internals of struct line_map. Use the public API instead.
7897 * c-pch.c (c_common_read_pch): Likewise.
7898 * c-lex.c (fe_file_change): Likewise.
7900 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7903 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7905 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7908 * c-pretty-print.c (pp_c_floating_constant): Output
7909 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7911 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7913 * c-common.c (def_builtin_1): Delete old interface with two
7914 parallel arrays to hold standard builtin declarations, and replace
7915 it with a function based interface that can support creating
7916 builtins on the fly in the future. Change all uses, and poison
7917 the old names. Make sure 0 is not a legitimate builtin index.
7918 * c-omp.c (c_finish_omp_barrier): Ditto.
7919 (c_finish_omp_taskwait): Ditto.
7920 (c_finish_omp_flush): Ditto.
7922 2011-10-11 Tristan Gingold <gingold@adacore.com>
7924 * c.opt: (fallow-parameterless-variadic-functions): New.
7926 2011-09-08 Dodji Seketeli <dodji@redhat.com>
7928 PR c++/33255 - Support -Wunused-local-typedefs warning
7929 * c-common.h (struct c_language_function::local_typedefs): New
7931 (record_locally_defined_typedef, maybe_record_typedef_use)
7932 (maybe_warn_unused_local_typedefs): Declare new functions.
7933 * c-common.c (record_locally_defined_typedef)
7934 (maybe_record_typedef_use)
7935 (maybe_warn_unused_local_typedefs): Define new functions.
7936 * c.opt: Declare new -Wunused-local-typedefs flag.
7938 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7941 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7944 2011-09-05 Richard Guenther <rguenther@suse.de>
7946 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7947 of integer_minus_one_node for empty array upper bounds.
7949 2011-08-28 Dodji Seketeli <dodji@redhat.com>
7951 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7952 it's the first time it's being called on this main TU.
7954 2011-08-24 Richard Guenther <rguenther@suse.de>
7957 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7959 2011-08-22 Gabriel Charette <gchare@google.com>
7961 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7962 defined in cpp_init_builtins and c_cpp_builtins.
7964 2011-08-19 Joseph Myers <joseph@codesourcery.com>
7966 * c-common.c (c_common_reswords): Add __builtin_complex.
7967 * c-common.h (RID_BUILTIN_COMPLEX): New.
7969 2011-08-18 Joseph Myers <joseph@codesourcery.com>
7971 * c-common.c (c_common_reswords): Add _Noreturn.
7972 (keyword_is_function_specifier): Handle RID_NORETURN.
7973 * c-common.h (RID_NORETURN): New.
7975 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7977 * c-common.c (unsafe_conversion_p): New function. Check if it is
7978 unsafe to convert an expression to the type.
7979 (conversion_warning): Adjust, use unsafe_conversion_p.
7980 * c-common.h (unsafe_conversion_p): New function declaration.
7982 2011-08-02 Jakub Jelinek <jakub@redhat.com>
7984 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7985 (c_finish_omp_taskyield): New prototype.
7986 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7987 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7988 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7989 or RHS1 have side-effects, evaluate those too in the right spot,
7990 if it is a decl and LHS is also a decl, error out if they
7992 (c_finish_omp_taskyield): New function.
7993 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7994 * c-pragma.c (omp_pragmas): Add taskyield.
7995 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7996 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7997 PRAGMA_OMP_CLAUSE_MERGEABLE.
7999 2011-07-25 Dodji Seketeli <dodji@redhat.com>
8001 * c-common.h (set_underlying_type): Remove parm name from
8004 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8006 * c-pretty-print.h: Search c-common.h in c-family.
8008 2011-07-22 Jason Merrill <jason@redhat.com>
8011 * c.opt (Wnarrowing): New.
8014 * c-common.h: Declare c_linkage_bindings.
8015 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8018 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8019 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8020 as flag_isoc99 for 'restrict'.
8021 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8023 2011-07-21 Ian Lance Taylor <iant@google.com>
8026 * c-common.c (c_disable_warnings): New static function.
8027 (c_enable_warnings): New static function.
8028 (c_fully_fold_internal): Change local unused_p to bool. Call
8029 c_disable_warnings and c_enable_warnings rather than change
8030 c_inhibit_evaluation_warnings.
8032 2011-07-20 Jason Merrill <jason@redhat.com>
8034 PR c++/6709 (DR 743)
8035 PR c++/42603 (DR 950)
8036 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8037 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8038 (CPP_DECLTYPE): New.
8039 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8041 2011-07-19 Richard Guenther <rguenther@suse.de>
8043 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8044 * c-omp.c (c_finish_omp_for): Likewise.
8046 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8048 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8049 body on the next line.
8051 2011-07-08 Jason Merrill <jason@redhat.com>
8054 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8057 * c-common.c (c_apply_type_quals_to_decl): Don't check
8058 TYPE_NEEDS_CONSTRUCTING.
8060 2011-07-06 Richard Guenther <rguenther@suse.de>
8062 * c-common.c (c_common_nodes_and_builtins):
8063 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8065 2011-07-05 Richard Guenther <rguenther@suse.de>
8067 * c-common.c (c_common_nodes_and_builtins): Build all common
8070 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8072 * c-common.h (c_tree_chain_next): New static inline function.
8074 * c-common.c (check_builtin_function_arguments): Handle
8075 BUILT_IN_ASSUME_ALIGNED.
8077 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8079 * c-common.c: Add sync_ or SYNC__ to builtin names.
8080 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8082 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8084 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8086 (gen_pragma_handler): New union.
8087 (internal_pragma_handler): New type.
8088 (c_register_pragma_with_data)
8089 (c_register_pragma_with_expansion_and_data): New functions.
8091 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8092 (c_register_pragma, c_register_pragma_with_expansion)
8093 (c_invoke_pragma_handler): Changed to work with
8094 internal_pragma_handler.
8095 (c_register_pragma_with_data)
8096 (c_register_pragma_with_expansion_and_data): New functions.
8098 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8100 * c-common.c: Include common/common-target.h.
8101 (handle_section_attribute): Use
8102 targetm_common.have_named_sections.
8103 * c-cppbuiltin.c: Include common/common-target.h.
8104 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8106 2011-06-10 Richard Guenther <rguenther@suse.de>
8108 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8109 to print a IDENTIFIER_NODE.
8111 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8112 Joseph Myers <joseph@codesourcery.com>
8114 * c.opt (fbuilding-libgcc): New option.
8115 * c-cppbuiltin.c (c_cpp_builtins): Define
8116 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8118 2011-06-07 Jason Merrill <jason@redhat.com>
8120 * c-common.c (max_tinst_depth): Lower default to 900.
8122 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8124 2011-06-07 Richard Guenther <rguenther@suse.de>
8126 * c-common.c (c_common_nodes_and_builtins): Do not set
8127 size_type_node or call set_sizetype.
8129 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8132 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8133 type when using pointer comparison to compare types.
8135 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8137 * c.opt: Add -Wdelete-non-virtual-dtor.
8138 * c-opts.c (c_common_handle_option): Include it in -Wall.
8140 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8145 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8147 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8150 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8153 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8154 C++ don't call c_common_truthvalue_conversion on void type arms.
8156 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8158 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8159 (stmt_list_stack): Define.
8160 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8161 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8163 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8165 * c-common.c (warning_candidate_p): Check for BLOCKs.
8167 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8169 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8172 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8174 * c-common.c (def_fn_type): Remove extra va_end.
8176 2011-05-23 Jason Merrill <jason@redhat.com>
8179 * c-common.c (c_common_get_narrower): New.
8180 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8182 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8184 * c-common.h (check_function_arguments): Tweak prototype of
8185 check_function_arguments.
8186 * c-common.c (check_function_arguments): Likewise. Adjust
8187 calls to check_function_nonnull, check_function_format, and
8188 check_function_sentinel.
8189 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8190 separate attributes and typelist arguments. Use
8191 FOREACH_FUNCTION_ARGS to iterate over argument types.
8193 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8195 * c-common.c (c_common_reswords): Reorder.
8196 * c-common.h (rid): Likewise.
8198 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8200 * c-common.c (def_fn_type): Don't call build_function_type, call
8201 build_function_type_array or build_varargs_function_type_array
8203 (c_common_nodes_and_builtins): Likewise.
8205 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8207 * c-common.c (c_add_case_label): Omit the loc argument to
8209 * c-common.h (build_case_label): Remove.
8210 * c-semantics.c (build_case_label): Remove.
8212 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8214 * c-objc.h (objc_start_method_definition): Update prototype.
8215 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8217 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8219 * c-common.c (check_main_parameter_types): Reindent. Don't use
8220 TYPE_ARG_TYPES directly.
8221 (handle_nonnull_attribute): Likewise.
8222 (sync_resolve_params): Likewise.
8223 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8224 to check_format_string.
8225 (handle_format_attribute): Likewise.
8226 (check_format_string): Take a function type to examine instead of
8227 a type list. Use a function_arg_iterator to step through argument
8230 2011-05-04 Richard Guenther <rguenther@suse.de>
8232 * c-common.c (fix_string_type): Use size_int for index type bounds.
8233 (start_fname_decls): Do not pass NULL to build_int_cst.
8234 (c_init_attributes): Likewise.
8235 * c-lex.c (c_lex_with_flags): Likewise.
8237 2011-04-27 Jason Merrill <jason@redhat.com>
8239 * c-common.c (make_tree_vector_from_list): New.
8240 * c-common.h: Declare it.
8242 2011-04-26 Richard Guenther <rguenther@suse.de>
8244 PR preprocessor/48248
8245 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8246 for output size with -P.
8248 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8250 * c-common.c (struct c_common_resword): Add __underlying_type.
8251 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8253 2011-04-20 Jim Meyering <meyering@redhat.com>
8255 * c-format.c (init_dollar_format_checking): Remove useless
8258 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8260 * c-objc.h (objc_get_interface_ivars): Removed.
8261 (objc_detect_field_duplicates): New.
8262 * stub-objc.c: Likewise.
8264 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8266 * stub-objc.c (objc_declare_protocols): Renamed to
8267 objc_declare_protocol.
8268 * c-objc.h: Likewise.
8270 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8272 * stub-objc.c (objc_declare_class): Updated argument name.
8274 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8276 * c-common.h (c_common_init_ts): Declare.
8277 * c-common.c (c_common_init_ts): Define.
8279 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8281 * c-objc.h (objc_build_message_expr): Updated prototype.
8282 * stub-objc.c (objc_build_message_expr): Likewise.
8284 2011-04-12 Martin Jambor <mjambor@suse.cz>
8286 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8289 2011-04-11 Richard Guenther <rguenther@suse.de>
8291 * c-common.c (complete_array_type): Build a range type of
8294 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8296 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8297 (handle_type_generic_attribute): Likewise.
8299 2011-04-07 Jason Merrill <jason@redhat.com>
8302 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8303 conversion from C++0x scoped enum.
8305 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8307 * c-target-def.h: New file.
8308 * c-target.def: New file.
8309 * c-target.h: New file.
8310 * c-common.c (targetcm): Don't define here.
8311 * c-common.h (default_handle_c_option): Declare.
8312 * c-format.c: Include c-target.h instead of target.h.
8313 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8315 (default_handle_c_option): Move from targhooks.c.
8317 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8319 PR preprocessor/48248
8320 * c-ppoutput.c (print): Add src_file field.
8321 (init_pp_output): Initialize it.
8322 (maybe_print_line): Don't optimize by adding up to 8 newlines
8323 if map->to_file and print.src_file are different file.
8324 (print_line): Update print.src_file.
8326 2011-03-25 Kai Tietz <ktietz@redhat.com>
8328 * c-ada-spec.c (compare_comment): Use filename_cmp
8329 instead of strcmp for filename.
8331 2011-03-25 Jeff Law <law@redhat.com>
8333 * c-common.c (def_fn_type): Add missing va_end.
8335 2011-03-25 Jason Merrill <jason@redhat.com>
8337 * c.opt: Add -std=c++03.
8339 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8341 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8343 2011-03-17 Kai Tietz <ktietz@redhat.com>
8346 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8347 Display allowed attributes for function pointer types.
8348 (pp_c_attributes_display): New function to display
8349 attributes having affects_type_identity flag set to true.
8350 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8352 * c-common.c (c_common_attribute_table):
8354 (c_common_format_attribute_table): Likewise.
8356 2011-03-18 Jason Merrill <jason@redhat.com>
8358 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8359 * c-common.h: Don't declare it here.
8360 * c-common.c: Or define it here.
8361 * c-opts.c (c_common_handle_option): Or set it here.
8364 * c-common.c (handle_transparent_union_attribute): Don't
8365 make a duplicate type in C++.
8367 2011-03-15 Jason Merrill <jason@redhat.com>
8369 * c-common.c (max_constexpr_depth): New.
8370 * c-common.h: Declare it.
8371 * c-opts.c (c_common_handle_option): Set it.
8372 * c.opt (fconstexpr-depth): New option.
8374 2011-03-11 Jason Merrill <jason@redhat.com>
8376 * c-common.c (attribute_takes_identifier_p): Add missing const.
8379 * c-common.c (attribute_takes_identifier_p): Assume that an
8380 unknown attribute takes an identifier.
8382 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8385 * c-common.c (c_type_hash): Call list_length instead of iterating
8386 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8388 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8391 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8393 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8395 * c.opt (fobjc-abi-version=) New.
8396 (fobjc-nilcheck): New.
8398 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8401 * c-common.h (keyword_is_decl_specifier): Declare.
8402 * c-common.c (keyword_is_decl_specifier): Define.
8403 (keyword_is_function_specifier): New function.
8405 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8408 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8409 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8412 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8414 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8416 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8419 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8420 after init_c_lex if pch_file is set.
8422 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8425 * c.opt (-fkeep-inline-dllexport): New switch.
8427 2011-01-12 Richard Guenther <rguenther@suse.de>
8430 * c-common.c (handle_weak_attribute): Warn instead of error
8431 on declaring an inline function weak.
8433 2011-01-05 Tom Tromey <tromey@redhat.com>
8435 * c-common.h (lvalue_error): Update.
8436 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8439 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8442 * c-objc.h (objc_finish_message_expr): Added argument to
8445 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8447 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8450 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8452 * c-objc.h (objc_maybe_warn_exceptions): New.
8453 * stub-objc.c (objc_maybe_warn_exceptions): New.
8455 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8457 * c-common.h (readonly_error): Declare.
8458 * c-common.c (readonly_error): Define.
8460 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8462 * c-common.h (invalid_indirection_error): Declare.
8463 * c-common.c (invalid_indirection_error): Define.
8465 2010-12-03 Richard Guenther <rguenther@suse.de>
8468 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8469 (pp_c_unary_expression): Likewise.
8470 (pp_c_expression): Likewise.
8472 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8474 * c-common.h (objc_finish_function): New.
8475 (objc_non_volatilized_type): Removed.
8476 (objc_type_quals_match): Removed.
8477 * stub-objc.c (objc_finish_function): New.
8478 (objc_non_volatilized_type): Removed.
8479 (objc_type_quals_match): Removed.
8481 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8483 * c-common.h (parse_optimize_options): Declare.
8484 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8485 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8487 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8489 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8491 * c-pch.c (O_BINARY): Don't define here.
8492 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8494 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8496 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8497 targetm.except_unwind_info.
8499 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8501 * c-opts.c (c_common_handle_option): Pass location to
8502 set_struct_debug_option.
8504 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8506 * c-common.c (visibility_options): Move from ../opts.c.
8507 * c-common.h (struct visibility_flags, visibility_options):
8509 * c-opts.c (finish_options): Rename to c_finish_options.
8510 (c_common_init): Update call to finish_options.
8512 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8515 * c-lex.c (lex_string): Check that each string in an Objective-C
8516 string concat sequence starts with either one or zero '@', and
8517 that there are no spurious '@' signs at the end.
8519 2010-11-20 Joseph Myers <joseph@codesourcery.com>
8521 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8522 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8523 HANDLE_PRAGMA_VISIBILITY.
8524 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8525 HANDLE_PRAGMA_VISIBILITY): Don't define.
8526 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8528 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8533 * c-common.h (keyword_begins_type_specifier): Declare.
8534 (keyword_is_storage_class_specifier): Declare.
8535 (keyword_is_type_qualifier): Declare.
8536 * c-common.c (keyword_begins_type_specifier): New function.
8537 (keyword_is_storage_class_specifier): New function.
8538 (keyword_is_type_qualifier): Declare.
8540 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8543 * c-common.c (in_late_binary_op): Define.
8544 (c_common_truthvalue_conversion): Check in_late_binary_op before
8545 calling c_save_expr.
8546 * c-common.h (in_late_binary_op): Declare.
8548 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8550 * c-opts.c (c_common_handle_option): Update calls to
8551 set_struct_debug_option.
8553 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8555 * c-common.h (objc_declare_protocols): Added additional argument.
8556 * stub-objc.c (objc_declare_protocol): Same change.
8558 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8561 * c-common.h (build_real_imag_expr): Declare.
8562 * c-semantics.c (build_real_imag_expr): Define.
8564 2010-11-17 Joseph Myers <joseph@codesourcery.com>
8566 * c-opts.c (c_common_parse_file): Take no arguments.
8567 * c-common.h (c_common_parse_file): Update prototype.
8569 2010-11-16 Jakub Jelinek <jakub@redhat.com>
8572 * c-common.c (warning_candidate_p): Don't track non-const calls
8575 2010-11-15 Ian Lance Taylor <iant@google.com>
8577 * c-lex.c (init_c_lex): Set macro debug callbacks if
8578 flag_dump_go_spec is set.
8580 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8582 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8583 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8585 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8587 PR preprocessor/45038
8588 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8591 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8593 * c-common.h (c_family_lang_mask): Declare.
8594 * c-opts.c (c_family_lang_mask): Make extern.
8595 * c-pragma.c (handle_pragma_diagnostic): Use
8596 control_warning_option.
8598 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8600 * c-common.c (parse_optimize_options): Update call to
8602 * c-common.h (c_common_handle_option): Update prototype.
8603 * c-opts.c (c_common_handle_option): Take location_t parameter and
8604 pass it to other functions.
8606 2010-11-11 Joseph Myers <joseph@codesourcery.com>
8608 * c-opts.c (warning_as_error_callback): Remove.
8609 (c_common_initialize_diagnostics): Don't call
8610 register_warning_as_error_callback.
8611 (c_common_handle_option): Handle -Werror=normalized= here.
8613 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8615 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8617 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8619 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8620 Remove trailing '.' from diagnostics.
8621 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8623 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8625 * c-common.c (parse_optimize_options): Pass global_dc to
8627 * c-opts.c (c_common_handle_option): Pass &global_options to
8628 set_Wstrict_aliasing.
8629 * c.opt (v): Don't mark Common or document here.
8631 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8634 * c-format.c (format_type): New type gcc_objc_string_format_type.
8635 (valid_stringptr_type_p): New.
8636 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
8637 (check_format_string): Pass expected type, use
8638 valid_stringptr_type_p (), check that the format string types are
8639 consistent with the format specification.
8640 (decode_format_attr): Warn if NSString is used outside objective-c.
8641 (format_types_orig): Add NSString.
8643 (format_flags): New.
8644 (check_format_arg): Handle format strings requiring an external parser.
8645 first_target_format_type: New variable.
8646 (handle_format_attribute): Set up first_target_format_type, pass the
8647 expected format arg string type to check_format_string().
8648 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8649 * stub-objc.c (objc_string_ref_type_p): New.
8650 (objc_check_format_arg): New.
8652 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8654 Fixed using the Objective-C 2.0 dot-syntax with class names.
8655 * c-common.h (objc_build_class_component_ref): New.
8656 * stub-objc.c (objc_build_class_component_ref): New.
8658 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8660 * c.opt (Wproperty-assign-default): New option.
8662 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8664 Implemented -fobjc-std=objc1 flag.
8665 * c.opt (fobjc-std=objc1): New option.
8667 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8669 Implemented format and noreturn attributes for Objective-C methods.
8670 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8671 attribute for Objective-C methods.
8673 2010-10-31 Jason Merrill <jason@redhat.com>
8675 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8678 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8680 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8681 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8682 (objc_add_property_declaration): Removed arguments for copies and
8684 (objc_build_getter_call): Renamed to
8685 objc_maybe_build_component_ref.
8686 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8687 (objc_is_property_ref): New.
8688 * c-common.c (c_common_reswords): Removed copies and ivar.
8689 * stub-objc.c (objc_add_property_declaration): Removed arguments
8690 for copies and ivar.
8691 (objc_build_getter_call): Renamed to
8692 objc_maybe_build_component_ref.
8693 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8694 (objc_is_property_ref): New.
8696 2010-10-29 Arnaud Charlet <charlet@adacore.com>
8697 Matthew Gingell <gingell@adacore.com>
8699 * c-ada-spec.c (separate_class_package): New function.
8700 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8701 name of their enclosing package.
8702 (print_ada_declaration): Use separate_class_package.
8704 2010-10-27 Jason Merrill <jason@redhat.com>
8706 * c-common.c (c_common_reswords): Add __is_literal_type.
8707 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8709 * c-common.c (check_case_value): Remove special C++ code.
8711 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8713 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8714 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8716 (objc_add_property_declaration): Added additional arguments.
8717 (objc_property_attribute_kind): Removed.
8718 (objc_set_property_attr): Removed.
8719 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8721 * stub-objc.c (objc_add_property_declaration): Added additional
8723 (objc_set_property_attr): Removed.
8725 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8727 * c-common.h (objc_add_property_variable): Renamed to
8728 objc_add_property_declaration. Added location argument.
8729 * stub-objc.c (objc_add_property_variable): Same change.
8731 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8733 * c-common.h (objc_maybe_printable_name): New.
8734 * stub-objc.c (objc_maybe_printable_name): New.
8736 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8737 Andrew Pinski <pinskia@gmail.com>
8739 * c-common.h (c_common_mark_addressable_vec): Declare.
8740 * c-common.c (c_common_mark_addressable_vec): New function.
8742 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8744 * c-common.h (objc_set_method_type): Removed.
8745 (objc_add_method_declaration): Added boolean argument.
8746 (objc_start_method_definition): Same change.
8747 (objc_build_method_signature): Same change.
8748 * stub-objc.c (objc_set_method_type): Removed.
8749 (objc_add_method_declaration): Added boolean argument.
8750 (objc_start_method_definition): Same change.
8751 (objc_build_method_signature): Same change.
8753 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8755 * c-common.h (finish_file): Removed.
8756 (objc_write_global_declarations): New.
8757 * c-opts.c (c_common_parse_file): Do not call finish_file.
8758 * stub-objc.c (objc_write_global_declarations): New.
8760 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8762 Implemented parsing @synthesize and @dynamic for
8763 Objective-C/Objective-C++.
8764 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8765 (objc_add_synthesize_declaration): New.
8766 (objc_add_dynamic_declaration): New.
8767 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8768 * stub-objc.c (objc_add_synthesize_declaration): New.
8769 (objc_add_dynamic_declaration): New.
8771 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8774 * c-cppbuiltin.c (mode_has_fma): Move function here from
8775 builtins.c. Don't use the fma optab, instead just use the
8776 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8779 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8781 Merge from 'apple/trunk' branch on FSF servers.
8783 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
8786 * c-common.h (objc_non_volatilized_type): New declaration
8787 * stub-objc.c (objc_non_volatilized_type): New stub.
8789 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8791 Merge from 'apple/trunk' branch on FSF servers.
8793 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
8796 * c-common.h (objc_diagnose_private_ivar): New decl.
8797 * stub-objc.c (objc_diagnose_private_ivar): New stub.
8799 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8801 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8802 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8803 (objc_ivar_visibility_kind): New enum.
8804 (objc_set_visibility): Adjust prototype to use visibility enum.
8805 * stub-objc.c (objc_set_visibility): Adjust stub to use
8808 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8810 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8811 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8812 has the appropriate fma builtins.
8813 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8815 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8817 merge from FSF apple 'trunk' branch.
8818 2006 Fariborz Jahanian <fjahanian@apple.com>
8820 Radars 4436866, 4505126, 4506903, 4517826
8821 * c-common.c (c_common_resword): Define @property and its attributes.
8822 * c-common.h: Define property attribute enum entries.
8823 (OBJC_IS_PATTR_KEYWORD): New.
8824 (objc_property_attribute_kind): New enum.
8825 Declare objc_set_property_attr (), objc_add_property_variable (),
8826 objc_build_getter_call () and objc_build_setter_call ().
8827 * stub-objc.c (objc_set_property_attr): New stub.
8828 (objc_add_property_variable): Likewise.
8829 (objc_build_getter_call): Likewise.
8830 (objc_build_setter_call) Likewise.
8832 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8834 merge from FSF apple 'trunk' branch.
8835 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
8837 Radar 3803157 (method attributes)
8838 * c-common.c (handle_deprecated_attribute): Recognize
8839 objc methods as valid declarations.
8840 * c-common.h: Declare objc_method_decl ().
8841 * stub-objc.c (objc_method_decl): New stub.
8843 2010-10-08 Joseph Myers <joseph@codesourcery.com>
8845 * c-common.c (parse_optimize_options): Call
8846 decode_cmdline_options_to_array_default_mask before
8847 decode_options. Update arguments to decode_options.
8848 * c-common.h (c_common_init_options_struct): Declare.
8849 * c-opts.c (c_common_init_options_struct): New. Split out from
8850 c_common_init_options.
8852 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8854 Implemented fast enumeration for Objective-C.
8855 * c-common.h (objc_finish_foreach_loop): New.
8856 * stub-objc.c (objc_finish_foreach_loop): New.
8858 2010-10-05 Joseph Myers <joseph@codesourcery.com>
8860 * c-common.h (struct diagnostic_context): Don't declare here.
8861 (c_common_initialize_diagnostics): Declare using
8862 diagnostic_context typedef.
8863 * c-opts.c (c_common_handle_option): Pass global_dc to
8864 handle_generated_option.
8866 2010-10-04 Joseph Myers <joseph@codesourcery.com>
8868 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8869 handle_generated_option.
8871 2010-10-03 Ian Lance Taylor <iant@google.com>
8873 * c.opt (-fplan9-extensions): New option.
8875 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8877 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8879 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8880 of duplicating code.
8882 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8884 * c-common.c: Add two new entries for @optional
8885 and @required keywords.
8887 merge from FSF 'apple/trunk' branch.
8888 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
8891 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8892 objective-c keywords.
8893 (objc_set_method_opt): New declaration.
8894 * stub-objc.c (objc_set_method_opt): New stub.
8896 2010-09-30 Joseph Myers <joseph@codesourcery.com>
8898 * c-common.c (handle_optimize_attribute): Pass &global_options to
8899 cl_optimization_save and cl_optimization_restore.
8900 * c-opts.c (c_common_handle_option): Pass &global_options to
8901 handle_generated_option.
8902 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8903 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8904 &global_options to cl_optimization_restore.
8906 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8908 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8909 Objective-C/Objective-C++ keywords.
8911 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8913 Merge from 'apple/trunk' branch on FSF servers.
8915 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
8918 * c-common.h (objc_check_global_decl): New declaration.
8919 * stub-objc.c (objc_check_global_decl): New stub.
8921 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8923 * c.opt: Don't use VarExists.
8925 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8927 * c-common.c (c_cpp_error): Update names of diagnostic_context
8929 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8930 cl_optimization members.
8931 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8932 sanitize_cpp_opts, finish_options): Update names of cpp_options
8935 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8937 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8938 (objc_is_reserved_word): Removed.
8939 * c-common.c: Updated comments.
8940 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8941 objc_is_reserved_word.
8942 * stub-objc.c (objc_is_reserved_word): Removed.
8944 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8946 * c-common.h (objc_add_method_declaration): Adjust prototype to
8948 (objc_start_method_definition): Likewise.
8949 (objc_build_keyword_decl): Likewise.
8950 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8951 (objc_start_method_definition): Likewise.
8952 (objc_build_keyword_decl): Likewise.
8954 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8956 * c-common.h (objc_start_class_interface): Adjust prototype.
8957 (objc_start_category_interface): Likewise.
8958 (objc_start_protocol): Likewise.
8959 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8960 (objc_start_class_interface): Likewise.
8961 (objc_start_category_interface): Likewise.
8963 2010-09-27 Ian Lance Taylor <iant@google.com>
8965 * c-common.c (c_common_attribute_table): Add no_split_stack.
8966 (handle_no_split_stack_attribute): New static function.
8968 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8970 Merge from 'apple/trunk' branch on FSF servers.
8972 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
8975 * c-common.h (objc_have_common_type): New declaration.
8976 * stub-objc.c (objc_have_common_type): New stub.
8978 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8981 * c-common.h (objc_common_type): New prototype.
8982 * stub-objc.c (objc_common_type): New stub.
8984 2010-09-24 Jan Hubicka <jh@suse.cz>
8986 * c-common.c (handle_leaf_attribute): New function.
8987 (struct attribute_spec c_common_att): Add leaf.
8989 2010-09-22 Joseph Myers <joseph@codesourcery.com>
8991 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8992 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8993 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8994 -include-barrier, -include-directory, -include-directory=,
8995 -include-directory-after, -include-directory-after=,
8996 -include-prefix, -include-prefix=, -include-with-prefix,
8997 -include-with-prefix=, -include-with-prefix-after,
8998 -include-with-prefix-after=, -include-with-prefix-before,
8999 -include-with-prefix-before=, -no-integrated-cpp,
9000 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9001 -output=, -pedantic, -pedantic-errors, -preprocess,
9002 -print-missing-file-dependencies, -trace-includes, -traditional,
9003 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9004 -user-dependencies, -verbose, -write-dependencies,
9005 -write-user-dependencies, no-integrated-cpp, traditional): New.
9007 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9010 * c-common.h (objc_start_method_definition): Return bool instead
9012 * stub-objc.c (objc_start_method_definition): Return bool instead
9015 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9018 * c-common.h (objc_get_interface_ivars): New declaration.
9019 * stub-objc.c (objc_get_interface_ivars): New stub.
9021 2010-09-15 Ian Lance Taylor <iant@google.com>
9023 * c-common.c (parse_optimize_options): Do not capitalize warning
9024 messages. Remove period at end of warning message.
9026 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9028 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9029 (handle_alias_attribute): ... here.
9030 (handle_ifunc_attribute): New.
9032 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9034 * c-common.h (do_warn_double_promotion): Declare.
9035 * c-common.c (do_warn_double_promotion): Define.
9037 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9039 * c.opt (Wdouble-promotion): New.
9041 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9043 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9044 fvtable-thunks, fxref): Mark no longer supported in help text.
9046 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9048 * c.opt (Wimport, fall-virtual, falt-external-templates,
9049 fdefault-inline, fenum-int-equiv, fexternal-templates,
9050 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9051 fname-mangling-version-, fnew-abi, fnonnull-objects,
9052 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9053 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9055 (fhandle-exceptions): Mark with Alias and Warn.
9056 * c-opts.c (c_common_handle_option): Don't handle options marked
9059 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9061 * c.opt (Wcomments, Werror-implicit-function-declaration,
9062 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9063 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9065 * c-common.c (option_codes): Use OPT_Wcomment instead of
9067 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9068 Don't handle options marked as aliases.
9070 2010-08-25 Richard Guenther <rguenther@suse.de>
9072 * c-common.c (c_common_get_alias_set): Remove special
9073 handling for pointers.
9075 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9077 * c-common.c: Use FOR_EACH_VEC_ELT.
9078 * c-gimplify.c: Likewise.
9079 * c-pragma.c: Likewise.
9081 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9083 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9085 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9087 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9088 instead of OPT_MDX and OPT_MMDX.
9090 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9092 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9094 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9096 * c.opt (MD, MMD): Change to MDX and MMDX.
9097 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9099 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9101 * c-opts.c (c_common_handle_option): Call handle_generated_option
9102 instead of handle_option.
9104 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9106 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9107 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9109 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9111 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9112 (pending_redefine_extname): Change type to a VEC.
9113 (add_to_renaming_pragma_list): Update for new type of
9114 pending_redefine_extname.
9115 (maybe_apply_renaming_pragma): Likewise.
9117 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9119 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9121 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9122 decide whether a type has already been declared/seen.
9123 Do not go to the original type.
9124 (dump_nested_types): New parameter forward.
9125 Generate forward declaration if needed and mark type as visited.
9126 (print_ada_declaration): Call dump_nested_types if not already done.
9127 Mark types as visited.
9129 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9131 * c.opt (-print-pch-checksum): Remove option.
9132 * c-opts.c (c_common_handle_option): Don't handle
9133 OPT_print_pch_checksum.
9135 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9137 * c-common.h (c_common_handle_option): Update prototype and return
9139 * c-opts.c (c_common_handle_option): Update prototype and return
9140 value type. Update calls to handle_option and
9141 enable_warning_as_error.
9143 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9146 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9148 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9150 * c-common.h (c_common_missing_argument): Remove.
9151 * c-opts.c (c_common_missing_argument): Remove.
9152 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9153 idirafter, imacros, include, isysroot, isystem, iquote): Add
9155 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9157 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9159 * c-common.h (c_common_option_lang_mask,
9160 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9162 (c_common_init_options): Update prototype.
9163 * c-opts.c (c_common_option_lang_mask): New.
9164 (c_common_initialize_diagnostics): Split out of
9165 c_common_init_options.
9166 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9168 (c_common_init_options): Update prototype. Use decoded options in
9169 search for -lang-asm.
9171 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9173 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9174 * c-format.c: Likewise.
9176 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9178 * c-common.h: Include diagnostic-core.h. Error if already
9180 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9182 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9184 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9185 Do not include expr.h
9186 (vector_mode_valid_p): Move here.
9188 2010-06-21 DJ Delorie <dj@redhat.com>
9190 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9191 allow these pragmas anywhere.
9193 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9196 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9197 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9198 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9199 ggc_strdup instead of xstrdup.
9201 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9203 * c-cppbuiltin.c: Include cpp-id-data.h.
9204 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9205 (lazy_hex_fp_value): New function.
9206 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9208 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9210 * c-gimplify.c: Do not include tree-flow.h
9212 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9215 * c-common.c: Rename targetm member:
9216 targetm.enum_va_list -> targetm.enum_va_list_p
9218 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9220 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9222 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9224 * c-cppbuiltin.c: Do not include except.h.
9226 2010-06-24 Andi Kleen <ak@linux.intel.com>
9228 * c-common.c (warn_for_omitted_condop): New.
9229 * c-common.h (warn_for_omitted_condop): Add prototype.
9231 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9233 * c.opt (lang-objc): Remove.
9234 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9236 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9238 * c-opts.c: Include "tm_p.h".
9240 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9242 * c-common.c (parse_optimize_options): Update call to
9245 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9247 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9248 new type of types_used_by_cur_var_decl.
9250 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9253 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9254 for C++ standard compliance.
9256 2010-06-16 Jason Merrill <jason@redhat.com>
9258 * c.opt: Add -Wnoexcept.
9260 2010-06-16 Richard Guenther <rguenther@suse.de>
9263 * c-common.c (c_common_truthvalue_conversion): Remove
9264 premature and wrong optimization concering ADDR_EXPRs.
9266 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9268 * c-ada-spec.c (dump_sloc): Remove column info.
9269 (is_simple_enum): New function.
9270 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9271 enum types when relevant.
9273 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9275 * c-common.c (conversion_warning): Warn at expression
9278 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9280 * c-opts.c (c_common_handle_option): Don't handle
9283 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9285 * c-pragma.c (push_alignment): Use typed GC allocation.
9286 (handle_pragma_push_options): Likewise.
9288 * c-common.c (parse_optimize_options): Likewise.
9290 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9293 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9295 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9296 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9297 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9298 flag_signed_bitfields, warn_strict_null_sentinel,
9299 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9300 flag_gen_declaration, flag_no_gnu_keywords,
9301 flag_implement_inlines, flag_implicit_templates,
9302 flag_implicit_inline_templates, flag_optional_diags,
9303 flag_elide_constructors, flag_default_inline, flag_rtti,
9304 flag_conserve_space, flag_access_control, flag_check_new,
9305 flag_new_for_scope, flag_weak, flag_working_directory,
9306 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9307 flag_enforce_eh_specs, flag_threadsafe_statics,
9308 flag_pretty_templates): Remove.
9309 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9310 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9311 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9312 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9313 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9314 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9315 flag_no_gnu_keywords, flag_implement_inlines,
9316 flag_implicit_templates, flag_implicit_inline_templates,
9317 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9318 flag_rtti, flag_conserve_space, flag_access_control,
9319 flag_check_new, flag_new_for_scope, flag_weak,
9320 flag_working_directory, flag_use_cxa_atexit,
9321 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9322 flag_threadsafe_statics, flag_pretty_templates,
9323 warn_strict_null_sentinel): Remove.
9324 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9325 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9326 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9327 fimplicit-inline-templates, fimplicit-templates,
9328 flax-vector-conversions, fms-extensions, fnil-receivers,
9329 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9330 frtti, fshort-double, fshort-enums, fshort-wchar,
9331 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9332 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9333 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9334 gen-decls, undef): Use Var.
9335 (fdefault-inline, foptional-diags): Document as doing nothing.
9336 * c-opts.c (c_common_handle_option): Remove cases for options now
9337 using Var. Mark ignored options as such.
9339 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9341 * c-common.c: Moved to here from parent directory.
9342 * c-common.def: Likewise.
9343 * c-common.h: Likewise.
9344 * c-cppbuiltin.c: Likewise.
9345 * c-dump.c: Likewise.
9346 * c-format.c: Likewise.
9347 * c-format.h : Likewise.
9348 * c-gimplify.c: Likewise.
9349 * c-lex.c: Likewise.
9350 * c-omp.c: Likewise.
9352 * c-opts.c: Likewise.
9353 * c-pch.c: Likewise.
9354 * c-ppoutput.c: Likewise.
9355 * c-pragma.c: Likewise.
9356 * c-pragma.h: Likewise.
9357 * c-pretty-print.c: Likewise.
9358 * c-pretty-print.h: Likewise.
9359 * c-semantics.c: Likewise.
9360 * stub-objc.c: Likewise.
9362 * c-common.c: Include gt-c-family-c-common.h.
9363 * c-pragma.c: Include gt-c-family-c-pragma.h.
9365 Copyright (C) 2010-2018 Free Software Foundation, Inc.
9367 Copying and distribution of this file, with or without modification,
9368 are permitted in any medium without royalty provided the copyright
9369 notice and this notice are preserved.