1 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3 * c-ada-spec.c: Include diagnostic.h.
4 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
6 2018-09-19 Marek Polacek <polacek@redhat.com>
8 * c.opt (Wclass-conversion): New.
10 2018-09-17 David Malcolm <dmalcolm@redhat.com>
12 * c-format.c (range_label_for_format_type_mismatch::get_text):
15 2018-09-17 David Malcolm <dmalcolm@redhat.com>
17 * c-format.c (format_warning_at_char): Update for introduction of
18 format_string_diagnostic_t.
19 (format_type_warning): Likewise.
21 2018-09-17 Martin Jambor <mjambor@suse.cz>
24 * c.opt (Wabsolute-value): New.
26 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
28 * c-common.c (complete_flexible_array_elts): New helper function.
29 * c-common.h (complete_flexible_array_elts): Declare.
31 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
33 * c-common.c (braced_list_to_string): Remove eval parameter.
34 Add some more checks. Always create zero-terminated STRING_CST.
35 * c-common.h (braced_list_to_string): Adjust prototype.
37 2018-08-27 David Malcolm <dmalcolm@redhat.com>
40 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
42 (maybe_suggest_missing_token_insertion): Likewise.
43 (maybe_add_include_fixit): Add param "override_location". If set,
44 and source-printing is enabled, then override the rich_location's
45 primary location with that of the insertion point for the fix-it
46 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
47 * c-common.h (extern void maybe_add_include_fixit): Add bool
49 * c-format.c (selftest::test_type_mismatch_range_labels): Update
50 for conversion of show_caret_p to a tri-state.
51 * c-warn.c (warn_for_restrict): Likewise.
53 (suggest_missing_header::~suggest_missing_header): Update call to
54 maybe_add_include_fixit to suggest overriding the location, as it
57 2018-08-27 Martin Liska <mliska@suse.cz>
59 * c-common.c (check_function_restrict): Use new function
60 fndecl_built_in_p and remove check for FUNCTION_DECL if
62 (check_builtin_function_arguments): Likewise.
63 (reject_gcc_builtin): Likewise.
64 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
66 2018-08-26 Marek Polacek <polacek@redhat.com>
68 PR c++/87029, Implement -Wredundant-move.
69 * c.opt (Wredundant-move): New option.
71 2018-08-21 Marek Polacek <polacek@redhat.com>
73 PR c++/86981, Implement -Wpessimizing-move.
74 * c.opt (Wpessimizing-move): New option.
76 2018-08-20 David Malcolm <dmalcolm@redhat.com>
79 * c-attribs.c (common_handle_aligned_attribute): Add
80 auto_diagnostic_group instance.
81 * c-indentation.c (warn_for_misleading_indentation): Likewise.
82 * c-opts.c (c_common_post_options): Likewise.
83 * c-warn.c (warn_logical_not_parentheses): Likewise.
84 (warn_duplicated_cond_add_or_warn): Likewise.
85 (warn_for_multistatement_macros): Likewise.
87 2018-08-20 Nathan Sidwell <nathan@acm.org>
89 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
92 2018-08-17 Nathan Sidwell <nathan@acm.org>
94 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
96 (laxy_hex_fp_value_count): Make unsigned.
97 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
99 (builtin_defin_with_hex_fp_value): Adjust callback name, use
102 2018-08-17 David Malcolm <dmalcolm@redhat.com>
104 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
105 (gcc_dump_printf_length_specs): New.
106 (gcc_dump_printf_flag_pairs): New.
107 (gcc_dump_printf_flag_specs): New.
108 (gcc_dump_printf_char_table): New.
109 (format_types_orig): Add entry for "gcc_dump_printf".
110 (init_dynamic_diag_info): Set up length_char_specs and
111 conversion_specs for gcc_dump_printf_format_type.
112 (handle_format_attribute): Handle gcc_dump_printf_format_type.
114 2018-08-17 Nathan Sidwell <nathan@acm.org>
116 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
118 * c-ada-spec.c: Don't #include "cpp-id-data.h"
119 * c-cppbuiltin.c: Likewise.
121 2018-08-17 Martin Liska <mliska@suse.cz>
123 * c.opt: Remove Warn, Init and Report for options with
124 Ignore/Deprecated flag. Warning is done automatically for
127 2018-08-16 David Malcolm <dmalcolm@redhat.com>
130 * c-common.c (selftest::c_family_tests): Call
131 selftest::c_indentation_c_tests.
132 * c-common.h (selftest::c_indentation_c_tests): New decl.
133 * c-indentation.c: Include "selftest.h".
134 (next_tab_stop): Add "tab_width" param, rather than accessing
136 (get_visual_column): Likewise. Clarify comment. Bulletproof
137 against reading past the end of the line.
138 (get_first_nws_vis_column): Add "tab_width" param.
139 (detect_intervening_unindent): Likewise.
140 (should_warn_for_misleading_indentation): Read tab width from
141 cpp_opts and pass around.
142 (selftest::test_next_tab_stop): New test.
143 (selftest::assert_get_visual_column_succeeds): New function.
144 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
145 (selftest::assert_get_visual_column_fails): New function.
146 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
147 (selftest::test_get_visual_column): New test.
148 (selftest::c_indentation_c_tests): New function.
150 2018-08-16 Nathan Sidwell <nathan@acm.org>
152 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
153 (store_ada_macro): Likewise.
154 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
155 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
157 2018-08-15 David Malcolm <dmalcolm@redhat.com>
159 * c-format.c: Include "selftest-diagnostic.h" and
160 "gcc-rich-location.h".
161 (format_warning_at_char): Pass NULL for new label params of
163 (class indirection_suffix): New class.
164 (class range_label_for_format_type_mismatch): New class.
165 (format_type_warning): Move logic for generating "*" suffix to
166 class indirection_suffix. Create "fmt_label" and "param_label"
167 to show their types, and pass them to the
168 format_warning_at_substring calls.
169 (selftest::test_type_mismatch_range_labels): New test.
170 (selftest::c_format_c_tests): Call it.
172 2018-08-13 Martin Sebor <msebor@redhat.com>
174 PR tree-optimization/71625
175 * c-common.c (braced_list_to_string): New function.
176 * c-common.h (braced_list_to_string): Declare it.
178 2018-08-08 Nathan Sidwell <nathan@acm.org>
180 * c-common.c (try_to_locate_new_include_inertion_point): Use
181 linemap_included_from_linemap.
182 * c-lex.c (fe_file_change): Use linemap_included_from.
183 * c-ppoutput.c (pp_file_change): Likewise.
185 2018-08-01 Martin Sebor <msebor@redhat.com>
187 PR tree-optimization/86650
188 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
189 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
190 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
191 * c-format.h (T89_G): Update to be "gimple *" rather than
193 (local_gcall_ptr_node): Rename...
194 (local_gimple_ptr_node): ...to this.
196 2018-07-31 David Malcolm <dmalcolm@redhat.com>
198 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
199 table entries for gcc_diag_char_table, and the 'Z' entry from
200 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
201 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
202 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
203 adding missing "Z" for this table. Remove erroneous "G" and "K"
205 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
206 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
207 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
209 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
211 * c-common.c (speculation_safe_resolve_call): New function.
212 (speculation_safe_resolve_params): New function.
213 (speculation_safe_resolve_return): New function.
214 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
215 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
216 __HAVE_SPECULATION_SAFE_VALUE.
218 2018-07-20 David Malcolm <dmalcolm@redhat.com>
220 * c-common.c (c_cpp_error): Remove redundant "line_table"
221 parameter from call to rich_location::set_range.
222 (maybe_suggest_missing_token_insertion): Likewise.
224 2018-07-20 Martin Sebor <msebor@redhat.com>
227 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
229 2018-07-20 Martin Sebor <msebor@redhat.com>
232 * c-common.h (c_common_handle_option): Change function argument
234 * c-opts.c (c_common_init_options): Same.
235 (c_common_handle_option): Same. Remove special handling of
236 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
237 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
238 options to take a HOST_WIDE_INT argument and accept a byte-size
240 (-Wvla-larger-than): Same.
241 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
242 (-Wno-vla-larger-than): Same.
244 2018-07-12 Jakub Jelinek <jakub@redhat.com>
246 * c-attribs.c (c_common_attribute_table): Add
247 "omp declare target implicit" attribute.
249 2018-07-12 Richard Biener <rguenther@suse.de>
252 * c-attribs.c (handle_packed_attribute): Do not build a variant
253 type with TYPE_PACKED, instead ignore the attribute if we may
254 not apply to the original type.
256 2018-07-10 Jakub Jelinek <jakub@redhat.com>
259 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
260 to contain TREE_LIST for both the original class iterator and the
263 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
265 * c-ada-spec.c (to_ada_name): Remove index parameter.
266 (pp_ada_tree_identifier): Likewise.
267 (dump_ada_macros): Adjust call to to_ada_name.
268 (struct overloaded_name_hash): Delete.
269 (struct overloaded_name_hasher): Likewise.
270 (overloaded_names): Likewise.
271 (compute_overloading_index): Likewise.
272 (dump_ada_decl_name): Do not call compute_overloading_index and
273 adjust calls to pp_ada_tree_identifier.
274 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
275 (dump_ada_import): Add spc parameter and switch to aspect syntax.
276 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
277 (dump_ada_enum_type): Remove type and display_convention parameters.
278 Adjust calls to pp_ada_tree_identifier.
279 (dump_ada_node): Likewise and for dump_ada_structure.
280 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
282 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
284 (print_constructor): Adjust call to pp_ada_tree_identifier.
285 (print_destructor): Likewise.
286 (dump_ada_declaration): Switch to aspect syntax.
287 (dump_ada_structure): Likewise and tidy up. Replace display_convention
288 parameter with nested parameter.
289 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
290 (dump_ada_specs): Do not delete overloaded_names table.
292 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
295 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
298 2018-07-05 Nathan Sidwell <nathan@acm.org>
300 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
301 NO_IMPLICIT_EXTERN_C.
303 2018-06-28 Martin Liska <mliska@suse.cz>
305 * cppspec.c: Include opt-suggestions.h.
307 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
308 Thomas Schwinge <thomas@codesourcery.com>
309 Cesar Philippidis <cesar@codesourcery.com>
311 * c-pragma.h (enum pragma_omp_clause): Add
312 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
313 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
315 2018-06-20 Jakub Jelinek <jakub@redhat.com>
318 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
321 2018-06-18 Martin Sebor <msebor@redhat.com>
324 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
327 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
329 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
331 2018-06-13 Jason Merrill <jason@redhat.com>
333 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
334 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
337 PR c++/86094 - wrong code with defaulted move ctor.
338 * c-opts.c (c_common_post_options): Bump the current ABI version to
339 13. Set warn_abi_version and flag_abi_compat_version to the current
340 version rather than 0. Fix defaulting flag_abi_compat_version from
343 2018-06-12 Martin Sebor <msebor@redhat.com>
346 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
347 sizeof source and destination yields the same value.
349 2018-06-12 Martin Liska <mliska@suse.cz>
351 * c.opt: Make MPX-related options as Deprecated.
353 2018-06-08 David Malcolm <dmalcolm@redhat.com>
355 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
358 2018-06-08 Martin Liska <mliska@suse.cz>
360 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
361 for MPX (macros, related functions, fields in cgraph_node, ...).
362 (handle_bnd_legacy): Likewise.
363 (handle_bnd_instrument): Likewise.
366 2018-06-06 Jakub Jelinek <jakub@redhat.com>
369 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
370 __cpp_transactional_memory to 201500 instead of 210500.
372 2018-06-06 Jason Merrill <jason@redhat.com>
374 PR c++/85710 - ICE with -Wmemset-elt-size.
375 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
377 2018-06-01 Jason Merrill <jason@redhat.com>
379 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
382 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
384 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
385 declaration for a typedef independently of whether the declaration of
386 the subtype is generated.
388 2018-05-31 Martin Sebor <msebor@redhat.com>
391 * c.opt (-Wno-alloc-size-larger-than): New option.
393 2018-04-22 David Pagan <dave.pagan@oracle.com>
396 * c-opts.c (c_common_post_options): Set default for warn_return_type
397 for C++/C++ with ObjC extensions only. For C, makes it possible to
398 differentiate between default (no option), -Wreturn-type, and
401 2018-05-29 Jason Merrill <jason@redhat.com>
403 * c.opt (Winit-list-lifetime): New flag.
405 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
407 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
408 splay_tree_delete_pointers.
410 2018-05-26 Jakub Jelinek <jakub@redhat.com>
413 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
414 noinline variable to workaround broken kernel headers.
416 2018-05-18 Jason Merrill <jason@redhat.com>
418 * c.opt (Wdeprecated-copy): New flag.
420 2018-05-17 Martin Liska <mliska@suse.cz>
422 * c-warn.c (overflow_warning): Do not use
423 space in between 'G_' and '('.
425 2018-05-09 Jason Merrill <jason@redhat.com>
427 * c-common.c (valid_array_size_p): Add complain parameter.
428 * c-common.h: ...which defaults to true.
430 2018-05-11 Jakub Jelinek <jakub@redhat.com>
433 * c-omp.c (c_omp_predetermined_sharing): Return
434 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
436 2018-05-11 Martin Liska <mliska@suse.cz>
439 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
442 2018-05-10 Jakub Jelinek <jakub@redhat.com>
445 * c-common.h (fold_offsetof_1): Removed.
446 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
447 CTX argument defaulted to ERROR_MARK.
448 * c-common.c (fold_offsetof_1): Renamed to ...
449 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
450 argument, convert the pointer constant to TYPE and use size_binop
451 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
452 a pointer type. Adjust recursive calls.
454 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
457 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
459 2018-05-07 Nathan Sidwell <nathan@acm.org>
461 * c.opt (ffor-scope): Remove functionality, issue warning.
463 2018-05-03 Nathan Sidwell <nathan@acm.org>
465 * c.opt (ffriend-injection): Remove functionality, issue warning.
467 2018-05-01 David Malcolm <dmalcolm@redhat.com>
470 * c-format.c (struct format_check_results): Add field
472 (check_format_info): Initialize it, and warn if encountered.
473 (check_format_arg): Distinguish between wide char and
474 everything else when detecting arrays of non-char.
476 2018-04-30 David Malcolm <dmalcolm@redhat.com>
478 * c-format.c (get_corrected_substring): Update for
479 location_get_source_line returning a char_span. Use a char_span
480 when handling the prefix of the correction.
481 * c-indentation.c (get_visual_column): Update for
482 location_get_source_line returning a char_span.
483 (get_first_nws_vis_column): Likewise.
485 2018-03-29 David Malcolm <dmalcolm@redhat.com>
488 * known-headers.cc (get_stdlib_header_for_name): Add various names
489 from <assert.h>, <string.h>, and <memory.h>; add more names from
492 2018-03-27 Jakub Jelinek <jakub@redhat.com>
495 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
496 get_base_address of the second operand is a VAR_P, rather than the
497 operand itself, and use gcc_checking_assert instead of gcc_assert.
499 2018-03-23 Marek Polacek <polacek@redhat.com>
502 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
503 <case RDIV_EXPR>: Tweak condition.
505 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
507 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
509 2018-03-16 Jakub Jelinek <jakub@redhat.com>
512 * c-warn.c (conversion_warning): Replace "to to" with "to" in
516 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
519 2018-03-16 Richard Biener <rguenther@suse.de>
522 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
523 unshare the possibly folded expression.
525 2018-03-15 Richard Biener <rguenther@suse.de>
528 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
530 2018-03-13 Martin Sebor <msebor@redhat.com>
532 PR tree-optimization/84725
533 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
534 with all three narrow character types, including their qualified forms.
536 2018-03-12 Martin Sebor <msebor@redhat.com>
538 PR tree-optimization/83456
539 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
540 Restore checking of bounded built-in functions.
541 (check_function_arguments): Also return the result
542 of warn_for_restrict.
543 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
544 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
546 2018-03-02 Marek Polacek <polacek@redhat.com>
549 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
552 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
554 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
557 2018-03-01 Marek Polacek <polacek@redhat.com>
560 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
561 alignment in computation.
563 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
565 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
566 <REAL_TYPE>: Deal specifically with _Float128/__float128.
568 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
570 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
571 (is_char_array): Take a type instead of a declaration.
572 (dump_ada_array_type): Likewise.
573 (is_simple_enum): Minor tweak.
574 (dump_ada_enum_type): New function extracted from...
575 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
576 <INTEGER_TYPE>: Remove unreachable code.
577 <RECORD_TYPE>: Likewise. Minor tweaks.
578 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
579 <ENUMERAL_TYPE>: New case.
580 <RECORD_TYPE>: Factor out common code.
581 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
582 Minor tweaks. Deal with enumeral types.
583 (dump_ada_structure): Minor tweaks.
585 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
587 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
588 address for incomplete structures.
589 (dump_forward_type): Do not bail out for incomplete structures.
590 (dump_ada_declaration): Do not special-case incomplete structures
591 for subtypes. Dump them as null records for types.
593 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
595 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
596 (is_char_array): Fix formatting.
597 (dump_template_types): Likewise.
598 (dump_generic_ada_node): Rename into...
599 (dump_ada_node): ...this.
600 <POINTER_TYPE>: Remove superfluous space. Use generic address for
601 incomplete structures and not for empty structures. Do not use it
602 when forward declarations are needed.
603 (dump_forward_type): New function.
604 (dump_nested_types): Remove FORWARD parameter. Do not consider
605 TREE_VISITED and do not generate a forward declaration. Only dump
606 original nested types for nested declaration.
607 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
608 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
609 <RECORD_TYPE>: Do not consider TREE_VISITED.
610 (dump_ada_declaration): Use booleans and fix formatting throughout.
611 <TYPE_DECL>: Skip incomplete structures and not empty structures.
612 Call dump_forward_type instead of dump_nested_types for a typedef.
613 Remove superfluous check and adjust call to dump_nested_types.
614 <POINTER_TYPE>: Call dump_forward_type and fall through.
615 (dump_ada_struct_decl): Rename into...
616 (dump_ada_structure): ...this. Do not special-case empty structures.
618 2018-02-27 Martin Sebor <msebor@redhat.com>
621 * c.opt (-Wmissing-attributes): New option.
623 2018-02-21 Martin Liska <mliska@suse.cz>
625 * c.opt (Wcatch-value=): Add IntegerRange.
627 2018-02-15 Jason Merrill <jason@redhat.com>
629 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
631 2018-02-09 Nathan Sidwell <nathan@acm.org>
634 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
636 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
639 2018-02-09 Martin Sebor <msebor@redhat.com>
642 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
643 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
644 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
645 (-Wstrict-overflow, -Wsuggest-attribute): Same.
646 (-Wuninitialized): Same.
648 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
650 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
651 keyword for components.
653 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
655 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
657 2018-02-02 Julia Koval <julia.koval@intel.com>
659 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
661 2018-01-29 Marek Polacek <polacek@redhat.com>
664 * c-format.c (check_function_format): Check current_function_decl.
666 2018-01-27 Jakub Jelinek <jakub@redhat.com>
668 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
670 (LAZY_HEX_FP_VALUES_CNT): Define.
671 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
672 values rather than just 12.
673 (builtin_define_with_hex_fp_value): Likewise.
675 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
678 * c.opt (-fmacro-prefix-map): New option.
679 * c-opts.c (c_common_handle_option): Handle it.
680 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
681 * c-ppoutput.c (init_pp_output): Likewise.
683 2018-01-17 David Malcolm <dmalcolm@redhat.com>
686 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
688 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
690 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
691 Skip 'f' and 'F' characters if it is true.
692 (store_ada_macro): Minor tweak.
693 (dump_ada_macros) <CPP_COMMENT>: Likewise.
694 <CPP_WSTRING>: Likewise.
695 <CPP_STRING>: Output '&' in the buffer if not the first string.
696 <CPP_NUMBER>: Adjust calls to dump_number.
698 2018-01-10 David Malcolm <dmalcolm@redhat.com>
701 * c-common.c: Include "selftest.h".
702 (get_atomic_generic_size): Perform the test for integral type
703 before the range test for any integer constant, fixing indentation
704 of braces. Call fold_for_warn before testing for an INTEGER_CST.
705 (reject_gcc_builtin): Strip any location wrapper from EXPR.
706 (selftest::test_fold_for_warn): New function.
707 (selftest::c_common_c_tests): New function.
708 (selftest::c_family_tests): Call it, and
709 selftest::c_pretty_print_c_tests.
710 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
711 * c-format.c (check_format_arg): Convert VAR_P check to a
713 * c-pretty-print.c: Include "selftest.h".
714 (pp_c_cast_expression): Don't print casts for location wrappers.
715 (selftest::assert_c_pretty_printer_output): New function.
716 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
717 (selftest::test_location_wrappers): New function.
718 (selftest::c_pretty_print_c_tests): New function.
719 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
722 Alan Hayward <alan.hayward@arm.com>
723 David Sherwood <david.sherwood@arm.com>
725 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
728 Alan Hayward <alan.hayward@arm.com>
729 David Sherwood <david.sherwood@arm.com>
731 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
735 Alan Hayward <alan.hayward@arm.com>
736 David Sherwood <david.sherwood@arm.com>
738 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
739 (convert_vector_to_array_for_subscript): Handle polynomial
740 TYPE_VECTOR_SUBPARTS.
741 (c_common_type_for_mode): Check valid_vector_subparts_p.
742 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
745 2018-01-03 Jakub Jelinek <jakub@redhat.com>
747 Update copyright years.
749 2017-12-22 Mike Stump <mikestump@comcast.net>
750 Eric Botcazou <ebotcazou@adacore.com>
752 * c-pragma.c (init_pragma): Register pragma GCC unroll.
753 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
755 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
759 * c-semantics.c (only_debug_stmts_after_p): New.
760 (pop_stmt_list): Clear side effects in debug-only stmt list.
761 Check for single nondebug stmt followed by debug stmts only.
763 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
766 * c-semantics.c (pop_stmt_list): Propagate side effects from
767 single nondebug stmt to container list.
769 2017-12-19 Jakub Jelinek <jakub@redhat.com>
771 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
772 conditions with typical order conditions.
774 2017-12-18 Marek Polacek <polacek@redhat.com>
776 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
779 2017-12-17 Martin Sebor <msebor@redhat.com>
781 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
782 an error for attribute warn_if_not_aligned.
784 2017-12-16 Martin Sebor <msebor@redhat.com>
786 PR tree-optimization/78918
787 * c-common.c (check_function_restrict): Avoid checking built-ins.
788 * c.opt (-Wrestrict): Include in -Wall.
790 2017-12-15 Jakub Jelinek <jakub@redhat.com>
792 * c-attribs.c (c_common_attribute_table,
793 c_common_format_attribute_table): Swap affects_type_identity
794 and handler fields, adjust comments.
796 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
798 * c.opt (Wcast-function-type): New warning option.
799 * c-lex.c (get_fileinfo): Avoid warning.
800 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
802 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
805 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
806 Adjust the size of buf1 and buf2, add a new buf to avoid
807 format-overflow warning.
809 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
811 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
812 subsequent statement list.
814 2017-12-07 Martin Sebor <msebor@redhat.com>
818 * c-attribs.c (attr_aligned_exclusions): New array.
819 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
820 (attr_common_exclusions, attr_const_pure_exclusions): Same.
821 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
822 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
823 (attr_warn_unused_result_exclusions): Same.
824 (handle_hot_attribute, handle_cold_attribute): Simplify.
825 (handle_const_attribute): Warn on function returning void.
826 (handle_pure_attribute): Same.
827 (handle_aligned_attribute): Diagnose conflicting attribute
829 * c-warn.c (diagnose_mismatched_attributes): Simplify.
831 2017-12-06 David Malcolm <dmalcolm@redhat.com>
834 * c-common.c (selftest::c_family_tests): Call
835 selftest::c_spellcheck_cc_tests.
836 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
837 * c-spellcheck.cc: Include "selftest.h".
838 (name_reserved_for_implementation_p): New function.
839 (should_suggest_as_macro_p): New function.
840 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
841 should_suggest_as_macro_p and call it.
842 (selftest::test_name_reserved_for_implementation_p): New function.
843 (selftest::c_spellcheck_cc_tests): New function.
844 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
846 2017-12-06 David Malcolm <dmalcolm@redhat.com>
848 * c-spellcheck.cc: New file, taken from macro-handling code in
850 * c-spellcheck.h: New file, taken from macro-handling code in
853 2017-12-01 Jakub Jelinek <jakub@redhat.com>
855 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
857 (handle_simd_attribute): Don't check for "cilk simd function"
858 attribute. Reindent, formatting changes.
860 2017-11-30 Julia Koval <julia.koval@intel.com>
862 * c-common.h (inv_list): Remove.
864 2017-11-28 Jakub Jelinek <jakub@redhat.com>
867 * c-common.c (c_switch_covers_all_cases_p_1,
868 c_switch_covers_all_cases_p): New functions.
869 * c-common.h (c_switch_covers_all_cases_p): Declare.
871 2017-11-28 Julia Koval <julia.koval@intel.com>
872 Sebastian Peryt <sebastian.peryt@intel.com>
874 * array-notation-common.c: Delete.
875 * c-cilkplus.c: Ditto.
876 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
877 * c-common.def (ARRAY_NOTATION_REF): Remove.
878 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
879 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
880 c_validate_cilk_plus_loop, cilkplus_an_parts,
881 cilk_ignorable_spawn_rhs_op,
882 cilk_recognize_spawn): Remove.
883 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
884 * c-omp.c: Remove CILK_SIMD check.
886 * c-pragma.h: Remove CILK related pragmas.
887 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
888 ARRAY_NOTATION_REF condition.
889 (c_pretty_printer::expression): Ditto.
890 * c.opt (fcilkplus): Remove.
893 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
895 * c-pretty-print.c (pp_c_additive_expression,
896 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
898 2017-11-21 Jakub Jelinek <jakub@redhat.com>
900 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
903 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
904 instead of tree_to_uhwi, formatting fix.
906 2017-11-20 David Malcolm <dmalcolm@redhat.com>
909 * known-headers.cc: New file, based on material from c/c-decl.c.
910 (suggest_missing_header): Copied as-is.
911 (get_stdlib_header_for_name): New, based on get_c_name_hint but
912 heavily edited to add C++ support. Add some knowledge about
913 <limits.h>, <stdint.h>, and <wchar.h>.
914 * known-headers.h: Likewise.
916 2017-11-20 David Malcolm <dmalcolm@redhat.com>
918 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
919 (lookup_name_fuzzy): Likewise. Convert return type from
920 const char * to name_hint. Add location_t param.
921 * name-hint.h: New header.
923 2017-11-19 Jakub Jelinek <jakub@redhat.com>
927 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
929 2017-11-16 Joseph Myers <joseph@codesourcery.com>
931 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
932 expected publication date of C17.
933 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
935 2017-11-15 Joseph Myers <joseph@codesourcery.com>
938 * c-common.c (c_common_reswords): Add __builtin_tgmath.
939 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
941 2017-11-10 Martin Sebor <msebor@redhat.com>
944 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
945 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
946 * c.opt (-Wstringop-truncation): New option.
948 2017-11-06 Martin Liska <mliska@suse.cz>
951 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
953 * c.opt: Set default value of warn_return_type.
955 2017-10-31 David Malcolm <dmalcolm@redhat.com>
957 * c-common.c (binary_op_error): Update for renaming of
959 (c_parse_error): Likewise.
960 * c-warn.c (warn_logical_not_parentheses): Likewise for
961 renaming of inform_at_rich_loc.
962 (warn_for_restrict): Likewise for renaming of
963 warning_at_rich_loc_n.
965 2017-10-30 Joseph Myers <joseph@codesourcery.com>
967 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
968 * c-opts.c (set_std_c17): New function.
969 (c_common_init_options): Use gnu17 as default C version.
970 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
972 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
974 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
975 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
976 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
979 2017-10-23 Marek Polacek <polacek@redhat.com>
982 * c-warn.c (warnings_for_convert_and_check): Fix typos.
984 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
986 * c-common.c (check_builtin_function_arguments): Also check arguments
987 of __builtin_alloca_with_align_and_max.
989 2017-10-17 David Malcolm <dmalcolm@redhat.com>
991 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
992 rather than NULL to format_warning_va.
993 (check_format_types): Likewise when calling format_type_warning.
994 Remove code to extract source_ranges and source_range * in favor
995 of just a location_t.
996 (format_type_warning): Convert source_range * param to a
999 2017-10-13 Jakub Jelinek <jakub@redhat.com>
1001 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1004 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1006 * c-common.c (enum missing_token_insertion_kind): New enum.
1007 (get_missing_token_insertion_kind): New function.
1008 (maybe_suggest_missing_token_insertion): New function.
1009 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1011 2017-10-11 Nathan Sidwell <nathan@acm.org>
1013 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1014 (c_common_handle_option): Update incpath_kind names.
1016 2017-10-11 Martin Liska <mliska@suse.cz>
1019 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1020 Wattributes warning.
1022 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1024 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1025 operating on trees as wide_ints.
1026 * c-common.c (pointer_int_sum): Likewise.
1027 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1028 * c-warn.c (match_case_to_enum_1): Likewise.
1029 (c_do_switch_warnings): Likewise.
1030 (maybe_warn_shift_overflow): Likewise.
1032 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1035 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1036 instead of wide_int::from.
1038 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1041 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1042 using to_widest use wide_int with the larger of the two precisions.
1044 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1046 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1049 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1051 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1052 when combining the original unconverted comparison operands.
1054 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1056 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1059 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1061 * c-ada-spec.c (to_ada_name): Add index parameter.
1062 (pp_ada_tree_identifier): Likewise.
1063 (dump_ada_macros): Adjust call to to_ada_name.
1064 (struct overloaded_name_hash): New type.
1065 (struct overloaded_name_hasher): Likewise.
1066 (overloaded_names): New hash table.
1067 (compute_overloading_index): New function.
1068 (dump_ada_decl_name): Call it and pass the result to
1069 pp_ada_tree_identifier.
1070 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1071 (dump_ada_function_declaration): Likewise.
1072 (dump_generic_ada_node): Likewise.
1073 (print_constructor): Likewise.
1074 (print_destructor): Likewise.
1075 (dump_ada_specs): Delete overloaded_names table.
1077 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1079 * c-ada-spec.c (max_ada_macros): Move around.
1080 (store_ada_macro_index): Likewise.
1081 (source_file): Rename into...
1082 (macro_source_file): ...this.
1083 (count_ada_macro): Move around.
1084 (store_ada_macro): Likewise.
1085 (compare_macro): Likewise.
1086 (print_ada_macros): Merge in...
1087 (dump_ada_macros): ...this.
1088 (source_file_base): Rename into...
1089 (current_source_file): ...this.
1090 (print_comment): Move around.
1091 (dump_ada_nodes): Call dump_ada_declaration directly.
1092 (struct with): Change type of limited field to bool.
1093 (append_withs): Change type of limited_access parameter to bool.
1094 (pp_ada_tree_identifie): Likewise.
1095 (dump_ada_decl_nam): Likewise.
1096 (dump_generic_ada_node): Likewise. Do not print the return type.
1097 (to_ada_name): Change type of space_found parameter to bool.
1098 (dump_ada_function_declaration): Return void and change type of
1099 parameters to bool. Also print the return type for a function.
1100 (print_ada_methods): Rename into...
1101 (dump_ada_methods): ...this.
1102 (print_ada_declaration): Rename into ...
1103 (dump_ada_declaration): ...this. Do not print the return type.
1104 (print_ada_struct_decl): Rename into...
1105 (dump_ada_struct_decl): ...this.
1107 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1109 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1110 rather than DECL_INITIAL.
1111 (common_handle_aligned_attribute): Likewise.
1113 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1115 * c.opt (gen-decls): Add RejectNegative.
1117 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1118 Jakub Jelinek <jakub@redhat.com>
1120 Add support for -std=c++2a.
1121 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1122 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1123 * c-opts.c (set_std_cxx2a): New.
1124 (c_common_handle_option): Set options when -std=c++2a is enabled.
1125 (c_common_post_options): Adjust comments.
1126 (set_std_cxx14, set_std_cxx17): Likewise.
1128 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1130 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1131 message for non-uniform endianness and issue a warning in C++.
1133 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1135 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1136 (Wc++17-compat): Change from undocumented alias to option.
1137 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1138 change C++1z to C++17 in description.
1139 (std=c++1z, std=gnu++1z): Change from option to undocumented
1141 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1143 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1144 * c-opts.c (set_std_cxx1z): Rename to ...
1145 (set_std_cxx17): ... this.
1146 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1147 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1149 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1152 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1154 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1155 function alignment if warn_if_not_aligned_p is true.
1157 2017-09-12 Nathan Sidwell <nathan@acm.org>
1159 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1160 resort_sorted_fields): Move to c/c-decl.c.
1161 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1162 (struct sorted_fields_type): Move to c/c-lang.h.
1164 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1167 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1169 2017-09-04 Marek Polacek <polacek@redhat.com>
1172 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1173 (warn_tautological_cmp): Call it.
1175 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1177 * c-opts.c (c_common_finish): Write dependency information even if
1180 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1183 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1184 (omp_pragmas_simd): ... here.
1185 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1186 create new clauses list containing just simd clause.
1188 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1189 Alan Hayward <alan.hayward@arm.com>
1190 David Sherwood <david.sherwood@arm.com>
1192 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1193 into scalar_mode_supported_p call.
1194 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1196 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1197 Alan Hayward <alan.hayward@arm.com>
1198 David Sherwood <david.sherwood@arm.com>
1200 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1201 for the mode iterator.
1203 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1204 Alan Hayward <alan.hayward@arm.com>
1205 David Sherwood <david.sherwood@arm.com>
1207 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1208 * c-common.c (c_build_vec_perm_expr): Likewise.
1210 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1211 Alan Hayward <alan.hayward@arm.com>
1212 David Sherwood <david.sherwood@arm.com>
1214 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1216 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1217 Alan Hayward <alan.hayward@arm.com>
1218 David Sherwood <david.sherwood@arm.com>
1220 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1221 before calling targetm.addr_space.valid_pointer_mode.
1223 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1224 Alan Hayward <alan.hayward@arm.com>
1225 David Sherwood <david.sherwood@arm.com>
1227 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1229 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1230 Alan Hayward <alan.hayward@arm.com>
1231 David Sherwood <david.sherwood@arm.com>
1233 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1235 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1237 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1238 Alan Hayward <alan.hayward@arm.com>
1239 David Sherwood <david.sherwood@arm.com>
1241 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1244 2017-08-29 Martin Liska <mliska@suse.cz>
1247 * c-common.c (parse_optimize_options): Add argument to function
1249 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1251 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1253 * c-lex.c (interpret_float): Use token location
1254 when building an EXCESS_PRECISION_EXPR.
1256 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1258 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1259 it to check_function_format.
1260 * c-common.h (check_function_arguments): Add vec<location_t> *
1262 (check_function_format): Likewise.
1263 * c-format.c (struct format_check_context): Add field "arglocs".
1264 (check_function_format): Add param "arglocs"; pass it to
1266 (check_format_info): Add param "arglocs"; use it to initialize
1267 new field of format_ctx.
1268 (check_format_arg): Pass format_ctx->arglocs to new param of
1269 check_format_info_main.
1270 (class argument_parser): New field "arglocs".
1271 (argument_parser::argument_parser): Add "arglocs_" param and use
1272 it to initialize new field.
1273 (argument_parser::check_argument_type): Pass new arglocs field to
1275 (check_format_info_main): Add param "arglocs", and use it when
1276 constructing arg_parser.
1277 (check_format_types): Add param "arglocs"; use it if non-NULL when
1278 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1280 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1283 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1284 (c_common_attribute_table): Add warn_if_not_aligned.
1285 (handle_aligned_attribute): Renamed to ...
1286 (common_handle_aligned_attribute): Remove argument, name, and add
1287 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1288 (handle_aligned_attribute): New.
1289 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1291 2017-08-14 Martin Sebor <msebor@redhat.com>
1294 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1295 (handle_nonstring_attribute): New function.
1297 2017-08-14 Martin Sebor <msebor@redhat.com>
1300 * c-format.h (T89_G): New macro.
1301 * c-format.c (local_gcall_ptr_node): New variable.
1302 (init_dynamic_diag_info): Initialize it.
1304 2017-08-11 Martin Liska <mliska@suse.cz>
1306 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1307 TARGET_SUPPORTS_ALIASES.
1309 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1311 * c-common.c (c_parse_error): Add rich_location * param, using it
1312 rather implicitly using input_location.
1313 * c-common.h (c_parse_error): Add rich_location * param.
1315 2017-08-09 Marek Polacek <polacek@redhat.com>
1317 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1318 (c_common_truthvalue_conversion): Likewise.
1319 * c-omp.c (c_finish_omp_atomic): Likewise.
1320 * c-common.h (build_binary_op): Update declaration.
1322 2017-08-08 Martin Liska <mliska@suse.cz>
1324 * c-ada-spec.c: Include header files.
1325 * c-ubsan.c: Likewise.
1326 * c-warn.c: Likewise.
1328 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1331 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1333 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1335 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1336 (print_ada_methods): Likewise.
1337 (print_ada_declaration): Likewise.
1339 2017-08-07 Martin Liska <mliska@suse.cz>
1341 * array-notation-common.c: Add new includes.
1342 * c-format.c( handle_format_attribute): Canonicalize a format
1344 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1346 * c-pretty-print.c: Add new include.
1348 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1350 * c-ada-spec.c (has_static_fields): Look only into variables.
1351 (print_constructor): Add TYPE parameter and use it for the name.
1352 (print_destructor): Likewise.
1353 (print_ada_declaration): Adjust to new constructor/destructor names.
1354 Adjust calls to print_constructor and print_destructor.
1355 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1356 Look only into variables in the final loop.
1358 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1360 * c-ada-spec.c (has_static_fields): Look only into fields.
1361 (dump_generic_ada_node): Small tweak.
1362 (dump_nested_types): Look only into fields.
1363 (print_ada_declaration): Look only into methods. Small tweak.
1364 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1366 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1368 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1369 (dump_ada_function_declaration): Likewise.
1370 (dump_generic_ada_node): Likewise.
1371 (print_ada_declaration): Add support for const-qualified variables.
1373 2017-07-31 Martin Liska <mliska@suse.cz>
1376 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1377 Guard condition with flag_sanitize_p also with current_function_decl
1379 (ubsan_maybe_instrument_reference_or_call): Likewise.
1381 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1383 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1385 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1387 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1389 (print_ada_declaration): Add missing guard for record types.
1391 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1394 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1395 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1396 new COMPOUND_EXPRs around the rhs of the comparison.
1398 2017-07-27 Marek Polacek <polacek@redhat.com>
1401 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1404 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1406 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1407 (handle_noipa_attribute): New function.
1409 2017-07-07 Torsten Duwe <duwe@suse.de>
1411 * c-attribs.c (c_common_attribute_table): Add entry for
1412 "patchable_function_entry".
1414 2017-07-20 Nathan Sidwell <nathan@acm.org>
1416 Remove TYPE_METHODS.
1417 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1418 dump_ada_template, print_ada_methods,
1419 print_ada_declaration): Member fns are on TYPE_FIELDS.
1421 2017-07-18 Nathan Sidwell <nathan@acm.org>
1423 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1425 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1427 * c-common.c (try_to_locate_new_include_insertion_point): New
1429 (per_file_includes_t): New typedef.
1430 (added_includes_t): New typedef.
1431 (added_includes): New variable.
1432 (maybe_add_include_fixit): New function.
1433 * c-common.h (maybe_add_include_fixit): New decl.
1435 2017-07-10 Martin Sebor <msebor@redhat.com>
1438 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1440 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1442 * c-common.c (selftest::c_family_tests): New.
1443 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1444 (selftest::c_family_tests): New decl.
1446 2017-07-04 Marek Polacek <polacek@redhat.com>
1449 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1452 2017-07-04 Marek Polacek <polacek@redhat.com>
1454 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1456 2017-06-28 Martin Liska <mliska@suse.cz>
1459 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1460 to a function declaration.
1462 2017-06-28 Martin Liska <mliska@suse.cz>
1465 * c.opt: Add IntegerRange to various options.
1467 2017-06-26 Marek Polacek <polacek@redhat.com>
1470 * c-common.h (warn_for_multistatement_macros): Declare.
1471 * c-warn.c: Include "c-family/c-indentation.h".
1472 (warn_for_multistatement_macros): New function.
1473 * c.opt (Wmultistatement-macros): New option.
1474 * c-indentation.c (guard_tinfo_to_string): No longer static.
1475 Change the parameter type to "enum rid". Handle RID_SWITCH.
1476 * c-indentation.h (guard_tinfo_to_string): Declare.
1478 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1480 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1482 2017-06-15 Martin Sebor <msebor@redhat.com>
1485 * c.opt (-Wclass-memaccess): New option.
1487 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1489 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1491 2017-06-13 Marek Polacek <polacek@redhat.com>
1494 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1497 2017-06-13 Martin Liska <mliska@suse.cz>
1500 * c-attribs.c (add_no_sanitize_value): New function.
1501 (handle_no_sanitize_attribute): Likewise.
1502 (handle_no_sanitize_address_attribute): Use the function.
1503 (handle_no_sanitize_thread_attribute): New function.
1504 (handle_no_address_safety_analysis_attribute): Use
1505 add_no_sanitize_value.
1506 (handle_no_sanitize_undefined_attribute): Likewise.
1507 * c-common.h: Declare new functions.
1508 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1509 (ubsan_instrument_shift): Likewise.
1510 (ubsan_instrument_bounds): Likewise.
1511 (ubsan_maybe_instrument_array_ref): Likewise.
1512 (ubsan_maybe_instrument_reference_or_call): Likewise.
1514 2017-06-11 Jason Merrill <jason@redhat.com>
1516 * c-ada-spec.c, c-pragma.c: Use id_equal.
1518 2017-06-04 Marek Polacek <polacek@redhat.com>
1521 * c-format.c (matching_type_p): Return false if any of the types
1522 requires structural equality.
1524 2017-06-02 Martin Sebor <msebor@redhat.com>
1527 * c-warn.c (conversion_warning): Use -Wconversion for integer
1528 conversion and -Wfloat-conversion for floating one.
1530 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1532 * c.opt (Wsizeof-pointer-div): New warning option.
1534 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1536 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1537 (Wcatch-value=1): Enable by -Wall.
1539 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1541 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1543 * c.opt (fdiagnostics-show-template-tree): New option.
1544 (felide-type): New option.
1546 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1548 * c.opt (Wcatch-value=): New C++ warning flag.
1550 2017-05-24 Nathan Sidwell <nathan@acm.org>
1552 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1553 const casts to avoid warning.
1555 2017-05-24 Martin Sebor <msebor@redhat.com>
1558 * c-common.h (unsafe_conversion_p): Add a function argument.
1559 * c-common.c (unsafe_conversion_p): Same.
1560 Add type names and values to diagnostics.
1561 (scalar_to_vector): Adjust.
1562 * c-warn.c (constant_expression_error): Add a function argument.
1563 Add type names and values to diagnostics.
1564 (conversion_warning): Add a function argument.
1565 Add type names and values to diagnostics.
1566 (warnings_for_convert_and_check): Same.
1568 2017-05-19 Jason Merrill <jason@redhat.com>
1570 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1573 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1575 * c-format.c (locus): Move out of function scope,
1578 2017-05-19 Nathan Sidwell <nathan@acm.org>
1580 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1581 (c_common_parse_file): Remove class dump handling.
1582 (get_dump_info): Likewise.
1584 2017-05-19 Richard Biener <rguenther@suse.de>
1587 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1588 to alias-set zero memory.
1590 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1592 * c-format.c (local_tree_type_node): Add GTY attribute.
1594 2017-05-18 Marek Polacek <polacek@redhat.com>
1596 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1597 (c_common_fixed_point_type_for_size): Likewise.
1598 (c_common_type_for_mode): Likewise.
1599 (shorten_compare): Likewise.
1600 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1601 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1603 2017-05-18 Marek Polacek <polacek@redhat.com>
1605 * c-common.c (self_promoting_args_p): Change the return type to bool.
1606 Use false/true instead of 0/1.
1607 * c-common.h (self_promoting_args_p): Update.
1609 2017-05-17 Marek Polacek <polacek@redhat.com>
1611 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1612 * c-warn.c: Likewise.
1614 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1616 Implement new C++ intrinsics __is_assignable and __is_constructible.
1617 * c-common.c (__is_assignable, __is_constructible): New.
1618 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1620 2017-05-17 Martin Liska <mliska@suse.cz>
1622 * c-common.h: Introduce dump_flags_t type and
1623 use it instead of int type.
1624 * c-gimplify.c (c_genericize): Likewise.
1625 * c-opts.c: Likewise.
1627 2017-05-17 Marek Polacek <polacek@redhat.com>
1629 * c-common.c (c_save_expr): Remove.
1630 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1631 * c-common.h (c_save_expr): Remove declaration.
1633 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1636 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1637 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1638 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1639 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1641 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1643 2017-05-09 Marek Polacek <polacek@redhat.com>
1646 * c-warn.c (unwrap_c_maybe_const): New.
1647 (warn_logical_operator): Call it.
1649 2017-05-09 Nathan Sidwell <nathan@acm.org>
1651 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1652 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1654 2017-05-08 Martin Sebor <msebor@redhat.com>
1656 PR translation/80280
1657 * c-format.h (struct format_flag_spec): Add new member.
1659 * c-format.c (local_tree_type_node): New global.
1660 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1661 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1662 (strfmon_flag_specs): Likewise.
1663 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1664 with distinct quoting properties.
1665 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1666 (flag_chars_t::validate): Add argument and handle bad quoting.
1667 (check_format_info_main): Handle quoting problems.
1668 (init_dynamic_diag_info): Simplify.
1670 2017-05-08 Jason Merrill <jason@redhat.com>
1672 * c-opts.c (c_common_post_options): Update defaults for
1673 flag_abi_version and flag_abi_compat_version.
1675 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1677 * c-common.c (c_cpp_error): Replace report_diagnostic
1678 with diagnostic_report_diagnostic.
1680 2017-05-04 Martin Sebor <msebor@redhat.com>
1682 PR translation/80280
1683 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1684 (handle_weakref_attribute): Same.
1686 2017-05-03 Nathan Sidwell <nathan@acm.org>
1688 Canonicalize canonical type hashing
1689 * c-common.c (complete_array_type): Use type_hash_canon.
1691 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1694 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1696 (cilk_install_body_pedigree_operations): Likewise.
1697 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1699 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1700 (cilk_install_body_pedigree_operations): Likewise.
1701 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1704 2017-04-27 Jakub Jelinek <jakub@redhat.com>
1707 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1708 flag on non-aggregate element types.
1710 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1712 * c-common.c (c_type_hasher, type_hash_table): Remove.
1713 (c_common_get_alias_set): Remove unreachable code.
1714 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1716 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1718 * c.opt (Wextra-semi): New C++ warning flag.
1720 2017-04-20 Jakub Jelinek <jakub@redhat.com>
1723 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1725 2017-04-18 Jakub Jelinek <jakub@redhat.com>
1729 * c-common.c (c_common_type_for_mode): Don't handle
1730 widest_*_literal_type_node here.
1731 c_common_signed_or_unsigned_type): Likewise.
1732 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1733 to *intTI_type_node or *intDI_type_node depending on whether
1734 TImode is supported by the target or not.
1736 2017-04-10 Martin Liska <mliska@suse.cz>
1739 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1740 doing an UBSAN check.
1742 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1744 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1746 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1749 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1751 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1752 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1755 2017-03-31 David Malcolm <dmalcolm@redhat.com>
1757 PR documentation/78732
1758 * c.opt (Wendif-labels): Fix description to refer to
1759 #else rather than #elif.
1761 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1764 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1765 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1767 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1770 * c-common.c (c_common_mark_addressable_vec): Don't set
1771 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1773 2017-03-21 Martin Sebor <msebor@redhat.com>
1776 * c-common.c (set_underlying_type): Mark type used only when
1777 original del is declared unused.
1779 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1781 PR translation/79848
1782 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1785 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1788 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1789 from inform's message, so that xgettext can locate it.
1791 2017-03-09 Marek Polacek <polacek@redhat.com>
1795 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1796 conversion to the attribute list.
1798 2017-03-09 Martin Liska <mliska@suse.cz>
1800 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1802 2017-03-03 Jason Merrill <jason@redhat.com>
1804 * c.opt (Wnoexcept-type): New.
1806 2017-03-02 Richard Biener <rguenther@suse.de>
1809 * c-common.c (c_common_mark_addressable_vec): Look through
1812 2017-02-28 Martin Liska <mliska@suse.cz>
1814 * c.opt: Replace space with tabular for options of <number>
1817 2017-02-28 Martin Liska <mliska@suse.cz>
1819 * c.opt: Fix --help=option -Q for options which are of
1822 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1825 * c-common.c (check_function_restrict): New function.
1826 (check_function_arguments): Add FNDECL argument. Call
1827 check_function_restrict if -Wrestrict.
1828 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1829 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1830 * c-common.h (check_function_arguments): Add FNDECL argument.
1831 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1833 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1835 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1836 treatment of parameters with pointer-to-tagged type and tidy up.
1837 (print_ada_methods): Remove the special treatment of C++ static member
1840 2017-02-22 Martin Liska <mliska@suse.cz>
1842 * c.opt: Replace inequality signs with square brackets
1845 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1848 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1851 2017-02-17 Joseph Myers <joseph@codesourcery.com>
1853 * c-cppbuiltin.c (builtin_define_float_constants): Define
1854 __DECIMAL_DIG__ to the value for long double.
1856 2017-02-15 Marek Polacek <polacek@redhat.com>
1859 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1860 conversion has occured.
1862 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1864 * c-common.c (c_common_reswords): Add "__RTL".
1865 * c-common.h (enum rid): Add RID_RTL.
1867 2017-01-20 Marek Polacek <polacek@redhat.com>
1870 * c-common.h (do_warn_duplicated_branches_r): Declare.
1871 * c-gimplify.c (c_genericize): Walk the function tree calling
1872 do_warn_duplicated_branches_r.
1873 * c-warn.c (expr_from_macro_expansion_r): New.
1874 (do_warn_duplicated_branches): New.
1875 (do_warn_duplicated_branches_r): New.
1876 * c.opt (Wduplicated-branches): New option.
1878 2017-01-17 David Malcolm <dmalcolm@redhat.com>
1881 * c-indentation.c (warn_for_misleading_indentation): Use the past
1882 subjunctive in the note.
1884 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1887 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1888 start type to integer_type.
1890 2017-01-16 Jakub Jelinek <jakub@redhat.com>
1893 * c.opt (gen-decls): Add Driver flag.
1895 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1898 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1901 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1903 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1906 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1908 2017-01-12 Martin Sebor <msebor@redhat.com>
1910 (-Wformat-overflow): ...to this.
1912 2017-01-11 Martin Sebor <msebor@redhat.com>
1915 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1916 Also enable for LTO.
1918 2017-01-10 Jason Merrill <jason@redhat.com>
1920 Implement P0195R2, C++17 variadic using.
1921 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1923 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1925 PR translation/79019
1926 PR translation/79020
1927 * c.opt (Wnormalized=): Fix typo in description.
1929 2017-01-08 Martin Sebor <msebor@redhat.com>
1932 * c.opt (-Wformat-truncation): New option.
1934 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1936 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1937 value to unsigned short to fit in 4 hex digits without
1940 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1942 * c.opt (fsso-struct): Add 'native' value.
1944 2017-01-05 Martin Liska <mliska@suse.cz>
1947 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1950 2017-01-04 Marek Polacek <polacek@redhat.com>
1953 * c.opt (Wpointer-compare): New option.
1955 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1958 * c.opt (fsso-struct=): Add RejectNegative.
1960 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1962 Update copyright years.
1964 2016-12-29 Martin Liska <mliska@suse.cz>
1967 * c.opt (strong-eval-order): Add RejectNegative keyword.
1969 2016-12-22 Jason Merrill <jason@redhat.com>
1971 Implement P0522R0, matching of template template arguments.
1972 * c-cppbuiltin.c (c_cpp_builtins): Define
1973 __cpp_template_template_args.
1975 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1978 * c-common.c (struct nonnull_arg_ctx): New type.
1979 (check_function_nonnull): Return bool instead of void. Use
1980 nonnull_arg_ctx as context rather than just location_t.
1981 (check_nonnull_arg): Adjust for the new context type, set
1982 warned_p to true if a warning has been diagnosed.
1983 (check_function_arguments): Return bool instead of void.
1984 * c-common.h (check_function_arguments): Adjust prototype.
1986 2016-12-21 Jason Merrill <jason@redhat.com>
1988 * c.opt (-fnew-ttp-matching): New flag.
1989 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1991 2016-12-14 Martin Jambor <mjambor@suse.cz>
1993 * c-omp.c: Include omp-general.h instead of omp-low.h.
1994 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1997 2016-12-14 Martin Sebor <msebor@redhat.com>
2000 * c-common.c (check_nonnull_arg): Disable when optimization
2003 2016-12-12 Marek Polacek <polacek@redhat.com>
2006 * c-common.c (attribute_fallthrough_p): Return false for
2009 2016-12-08 Martin Sebor <msebor@redhat.com>
2012 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2014 2016-12-08 Martin Sebor <msebor@redhat.com>
2017 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2020 2016-12-07 Martin Sebor <msebor@redhat.com>
2026 * c.opt (-Wstringop-overflow): New option.
2028 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2030 * c-attribs.c (asan odr indicator): New attribute.
2031 (handle_asan_odr_indicator_attribute): New function.
2033 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2035 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2038 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2040 * c-common.c (excess_precision_mode_join): New.
2041 (c_ts18661_flt_eval_method): New.
2042 (c_c11_flt_eval_method): Likewise.
2043 (c_flt_eval_method): Likewise.
2044 * c-common.h (excess_precision_mode_join): New.
2045 (c_flt_eval_method): Likewise.
2046 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2047 (cpp_iec_559_value): Call it.
2048 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2049 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2050 __FLT_EVAL_METHOD_TS_18661_3__.
2052 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2054 * c-opts.c (c_common_post_options): Add logic to handle the default
2055 case for -fpermitted-flt-eval-methods.
2057 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2059 * c.opt (Wexpansion-to-defined): New.
2061 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2064 * c-pragma.c (handle_pragma_target): Don't replace
2065 current_target_pragma, but chainon the new args to the current one.
2067 2016-11-22 Nathan Sidwell <nathan@acm.org>
2069 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2070 indentation and formatting.
2072 2016-11-21 Martin Sebor <msebor@redhat.com>
2074 * c.opt (-fprintf-return-value): Enable by default.
2076 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2079 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2080 * c-common.c (c_common_nodes_and_builtins): Initialize
2081 const_tm_ptr_type_node.
2083 2016-11-16 Marek Polacek <polacek@redhat.com>
2086 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2088 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2090 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2092 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2093 Richard Biener <rguenther@suse.de>
2095 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2096 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2097 * c.opt (fgimple): New option.
2099 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2102 * c-common.h (warn_for_restrict): Declare.
2103 * c-warn.c: Include gcc-rich-location.h.
2104 (warn_for_restrict): New function.
2105 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2106 (gcc_cdiag_char_table): Likewise.
2107 (gcc_cxxdiag_char_table): Likewise.
2108 * c.opt (Wrestrict): New option.
2110 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2112 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2113 for nested types only if the type is a record or union and dump SLOC.
2115 2016-11-09 Jason Merrill <jason@redhat.com>
2117 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2119 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2121 * c-ubsan.c (ubsan_instrument_shift): Handle split
2122 -fsanitize=shift-base and -fsanitize=shift-exponent.
2124 2016-11-07 Jason Merrill <jason@redhat.com>
2126 * c.opt (Wc++1z-compat): New.
2127 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2129 2016-11-07 Martin Liska <mliska@suse.cz>
2131 * c-warn.c (warn_for_unused_label): Save all labels used
2132 in goto or in &label.
2134 2016-11-03 Jason Merrill <jason@redhat.com>
2136 * c-cppbuiltin.c (c_cpp_builtins): Correct
2137 __cpp_inheriting_constructors.
2139 2016-11-01 Jason Merrill <jason@redhat.com>
2141 * c-cppbuiltin.c (c_cpp_builtins): Update
2142 __cpp_inheriting_constructors.
2144 * c.opt (-fnew-inheriting-ctors): New.
2145 * c-opts.c: Default to on for ABI 11+.
2147 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2150 * c.opt (fext-numeric-literals): Add Var and Init.
2151 * c-opts.c (c_common_handle_option): Don't clear
2152 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2153 (c_common_post_options): Clear it here if not set
2156 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2159 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2162 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2164 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2165 * c-common.c (c_common_reswords): Add __builtin_launder.
2167 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2169 * c-common.c (c_common_truthvalue_conversion): Warn for
2170 multiplications in boolean context. Fix the quoting of '<<' and '<'
2171 in the shift warning.
2173 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2175 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2177 2016-10-20 Jason Merrill <jason@redhat.com>
2179 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2181 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2183 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2184 integer shift ops in boolean context.
2186 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2188 * c.opt (Walloca): New.
2189 (Walloca-larger-than=): New.
2190 (Wvla-larger-than=): New.
2192 2016-10-17 Marek Polacek <polacek@redhat.com>
2194 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2195 Return immediately when finding a match.
2196 (warn_tautological_cmp): Remove a boolean variable that is no longer
2199 2016-10-17 Marek Polacek <polacek@redhat.com>
2201 * c-attribs.c: New file.
2202 * c-common.c: Move attributes handling to c-attribs.c.
2203 (get_nonnull_operand): No longer static.
2204 * c-common.h: Move the declarations from c-attribs.c to its own section.
2206 2016-10-14 Jason Merrill <jason@redhat.com>
2208 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2209 and __cpp_deduction_guides.
2211 2016-10-13 Jason Merrill <jason@redhat.com>
2213 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2215 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2217 * c-cppbuiltin.c: Include memmodel.h.
2218 * c-opts.c: Likewise.
2219 * c-pragma.c: Likewise.
2220 * c-warn.c: Likewise.
2222 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2224 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2225 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2226 * c-opts.c (sanitize_cpp_opts): Initialize
2227 cpp_opts->cpp_warn_implicit_fallthrough.
2229 2016-10-11 Marek Polacek <polacek@redhat.com>
2231 * c-common.c (warning_candidate_p): Change the return type to bool
2232 and return true/false instead of 1/0.
2233 (vector_mode_valid_p): Likewise.
2235 2016-10-11 Marek Polacek <polacek@redhat.com>
2237 * c-common.c (fold_for_warn): No longer static.
2238 (bool_promoted_to_int_p): Likewise.
2239 (c_common_get_narrower): Likewise.
2240 (constant_expression_warning): Move to c-warn.c.
2241 (constant_expression_error): Likewise.
2242 (overflow_warning): Likewise.
2243 (warn_logical_operator): Likewise.
2244 (find_array_ref_with_const_idx_r): Likewise.
2245 (warn_tautological_cmp): Likewise.
2246 (expr_has_boolean_operands_p): Likewise.
2247 (warn_logical_not_parentheses): Likewise.
2248 (warn_if_unused_value): Likewise.
2249 (strict_aliasing_warning): Likewise.
2250 (sizeof_pointer_memaccess_warning): Likewise.
2251 (check_main_parameter_types): Likewise.
2252 (conversion_warning): Likewise.
2253 (warnings_for_convert_and_check): Likewise.
2254 (match_case_to_enum_1): Likewise.
2255 (match_case_to_enum): Likewise.
2256 (c_do_switch_warnings): Likewise.
2257 (warn_for_omitted_condop): Likewise.
2258 (readonly_error): Likewise.
2259 (lvalue_error): Likewise.
2260 (invalid_indirection_error): Likewise.
2261 (warn_array_subscript_with_type_char): Likewise.
2262 (warn_about_parentheses): Likewise.
2263 (warn_for_unused_label): Likewise.
2264 (warn_for_div_by_zero): Likewise.
2265 (warn_for_memset): Likewise.
2266 (warn_for_sign_compare): Likewise.
2267 (do_warn_double_promotion): Likewise.
2268 (do_warn_unused_parameter): Likewise.
2269 (record_locally_defined_typedef): Likewise.
2270 (maybe_record_typedef_use): Likewise.
2271 (maybe_warn_unused_local_typedefs): Likewise.
2272 (maybe_warn_bool_compare): Likewise.
2273 (maybe_warn_shift_overflow): Likewise.
2274 (warn_duplicated_cond_add_or_warn): Likewise.
2275 (diagnose_mismatched_attributes): Likewise.
2276 * c-common.h: Move the declarations from c-warn.c to its own section.
2277 * c-warn.c: New file.
2279 2016-10-08 Jason Merrill <jason@redhat.com>
2281 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2282 into COND_EXPR in C++.
2284 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2286 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2287 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2288 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2290 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2292 Implement LWG2296 helper intrinsic
2293 * c-common.h (enum rid): Add RID_ADDRESSOF.
2294 * c-common.c (c_common_reswords): Add __builtin_addressof.
2296 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2299 * c-common.c (c_common_truthvalue_conversion): Warn also for
2300 suspicious enum values in boolean context.
2302 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2304 Implement P0258R2 - helper for C++17
2305 std::has_unique_object_representations trait
2306 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2307 * c-common.c (c_common_reswords): Add
2308 __has_unique_object_representations.
2310 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2313 * c-ubsan.c (ubsan_instrument_return): Don't call
2314 initialize_sanitizer_builtins here.
2316 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2318 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2319 conditional expression in boolean context when only one arm is
2322 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2325 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2328 * c-common.c (c_common_reswords): Update comment for C++11.
2330 2016-10-04 Jason Merrill <jason@redhat.com>
2332 * c-common.c (make_tree_vector_from_ctor): New.
2333 * c-common.h: Declare it.
2335 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2337 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2338 __LIBGCC_JCR_SECTION_NAME__.
2340 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2342 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2343 left shift in boolean context.
2345 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2347 Implement P0001R1 - C++17 removal of register storage class specifier
2348 * c.opt (Wregister): New warning.
2349 * c-opts.c (c_common_post_options): Enable -Wregister by
2352 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2354 * c-opts.c (c_common_post_options): Remove special case for
2355 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2358 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2360 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2363 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2365 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2367 * c-common.c: Include memmodel.h.
2369 2016-09-26 Marek Polacek <polacek@redhat.com>
2371 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2373 2016-09-26 Marek Polacek <polacek@redhat.com>
2376 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2377 (handle_fallthrough_attribute): New function.
2378 (attribute_fallthrough_p): New function.
2379 * c-common.h (attribute_fallthrough_p): Declare.
2381 2016-09-24 Marek Polacek <polacek@redhat.com>
2384 * c.opt (Wbool-operation): New.
2386 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2388 * c-common.c (c_common_truthvalue_conversion): Inhibit
2389 Wint-in-bool-context warning with from_macro_definition_at.
2390 Mention the expression will always evaluate to true.
2392 2016-09-21 Martin Sebor <msebor@redhat.com>
2395 * c.opt (fprintf-return-value): Temporarily initialize to zero
2396 to unblock bootstrap failures.
2398 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2401 * c.opt (Waligned-new=): Add RejectNegative.
2402 (faligned-new=): Likewise. Spelling fix - change
2403 aligned_new_threshhold to aligned_new_threshold.
2404 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2405 to aligned_new_threshold.
2407 2016-09-20 Martin Sebor <msebor@redhat.com>
2410 * c.opt: Add -Wformat-length and -fprintf-return-value.
2412 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2415 * c.opt (Wint-in-bool-context): New warning.
2416 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2417 constants in boolean context.
2419 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2421 * c-common.c (max_align_t_align): Also consider alignment of
2424 2016-09-15 Jason Merrill <jason@redhat.com>
2426 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2429 2016-09-14 Jason Merrill <jason@redhat.com>
2431 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2432 limit FIELD_DECL, either.
2434 2016-09-14 Marek Polacek <polacek@redhat.com>
2436 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2437 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2438 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2440 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2442 * c-common.c (warn_logical_not_parentheses): Replace
2443 rich_location::add_fixit_insert calls with add_fixit_insert_before
2444 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2446 2016-09-13 Jason Merrill <jason@redhat.com>
2447 Tom de Vries <tom@codesourcery.com>
2450 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2452 2016-09-13 Jason Merrill <jason@redhat.com>
2454 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2457 2016-09-12 Jason Merrill <jason@redhat.com>
2459 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2460 bit/byte confusion, allow large alignment for types.
2462 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2465 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2467 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2470 * c-format.c (argument_parser::check_argument_type): Add params
2471 "type_start" and "conversion_char". Use the former to generate
2472 offset_to_type_start and pass it and conversion_char to
2474 (check_format_info_main): Capture the start of the type
2475 information as "type_start", and pass it an format_char
2476 to arg_parser.check_argument_type.
2477 (check_format_types): Provide an example in the leading comment.
2478 Add params "offset_to_type_start" and "conversion_char"; pass
2479 them to format_type_warning calls.
2480 (test_get_modifier_for_format_len): Likewise.
2481 (matching_type_p): New function.
2482 (get_format_for_type): Add param "conversion_char" and move
2483 implementation into...
2484 (get_format_for_type_1): ...new function, called twice.
2485 Use new function matching_type_p rather than checking for
2486 TYPE_CANONICAL equality.
2487 (get_corrected_substring): New function.
2488 (format_type_warning): Provide an example in the leading comment.
2489 Add params "offset_to_type_start" and "conversion_char". Replace
2490 call to get_format_for_type with call to get_corrected_substring
2491 and move rejection of hints for widths/precisions there.
2492 (assert_format_for_type_streq): Add param "conversion_char".
2493 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2494 (test_get_format_for_type_printf): Add conversion chars to the
2495 tests, adding coverage for various combinations of integer
2496 vs double conversions, and for preserving octal and hexadecimal
2498 (test_get_format_for_type_scanf): Add conversion chars to the
2501 2016-09-10 Tom de Vries <tom@codesourcery.com>
2504 * c-common.c (build_va_arg): Handle more strict
2505 targetm.canonical_va_list_type. Replace first argument type error with
2508 2016-09-09 Martin Sebor <msebor@redhat.com>
2512 * c-format.c (argument_parser::find_format_char_info): Use %qc
2513 format directive unconditionally.
2515 2016-09-09 Jason Merrill <jason@redhat.com>
2517 Implement C++17 new of over-aligned types.
2518 * c.opt: Add -faligned-new and -Waligned-new.
2519 * c-common.c (max_align_t_align): Split out from...
2520 (cxx_fundamental_alignment_p): ...here.
2521 * c-common.h: Declare it.
2522 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2524 2016-09-09 Joseph Myers <joseph@codesourcery.com>
2526 * c-cppbuiltin.c (builtin_define_type_width): New function.
2527 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2530 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2532 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2534 (substring_loc::get_location): Move to substring-locations.c,
2535 keeping implementation as...
2536 (c_get_substring_location): New function, from the above, reworked
2537 to use accessors rather than member lookup.
2538 * c-common.h (class substring_loc): Move to substring-locations.h,
2539 replacing with a forward decl.
2540 (c_get_substring_location): New decl.
2541 * c-format.c: Include "substring-locations.h".
2542 (format_warning_va): Move to substring-locations.c.
2543 (format_warning_at_substring): Likewise.
2545 2016-09-06 Martin Sebor <msebor@redhat.com>
2548 * c-format.c (check_function_format): Avoid issuing warnings for
2549 functions unless they call format functions with non-constant
2552 2016-09-06 Richard Biener <rguenther@suse.de>
2555 * c-common.c (c_common_mark_addressable_vec): Handle
2556 COMPOUND_LITERAL_EXPR.
2558 2016-09-05 Marek Polacek <polacek@redhat.com>
2561 * c-common.c (bool_promoted_to_int_p): New function.
2562 (expr_has_boolean_operands_p): New function.
2563 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2564 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2566 2016-09-04 Tom de Vries <tom@codesourcery.com>
2569 2016-08-29 Tom de Vries <tom@codesourcery.com>
2571 * c-common.c (build_va_arg): Replace first argument type error
2574 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2577 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2578 (c_finish_omp_for): Reject _Atomic qualified iterators.
2580 2016-09-01 Martin Sebor <msebor@redhat.com>
2582 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2583 size to guarantee it fits the output of the formatted function
2584 regardless of its arguments.
2586 2016-09-01 Marek Polacek <polacek@redhat.com>
2589 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2592 2016-08-29 Marek Polacek <polacek@redhat.com>
2595 * c-common.c (warn_logical_not_parentheses): Don't warn for
2596 a comparison or a logical operator.
2598 2016-08-29 Tom de Vries <tom@codesourcery.com>
2600 * c-common.c (build_va_arg): Fix type comparison assert.
2602 2016-08-29 Tom de Vries <tom@codesourcery.com>
2604 * c-common.c (build_va_arg): Replace first argument type error
2607 2016-08-29 Tom de Vries <tom@codesourcery.com>
2610 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2611 with error_mark_node as va_list instead of with illegal va_list.
2613 2016-08-25 Marek Polacek <polacek@redhat.com>
2614 David Malcolm <dmalcolm@redhat.com>
2616 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2617 * c-common.h (warn_logical_not_parentheses): Update declaration.
2619 2016-08-22 Marek Polacek <polacek@redhat.com>
2622 * c-common.c (warn_for_memset): Check type for null.
2624 2016-08-22 Joseph Myers <joseph@codesourcery.com>
2626 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2627 _FloatNx types for suffixes for built-in functions.
2629 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2632 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2633 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2634 (RID_FLOAT128X): New enum rid values.
2635 (CASE_RID_FLOATN_NX): New macro.
2636 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2638 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2639 corresponding complex types.
2640 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2641 _FloatNx and corresponding complex types.
2642 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2643 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2644 and _FloatNx types for the widest type for determining
2645 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2646 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2647 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2649 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2651 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2654 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2656 * c-opts.c (c_diagnostic_finalizer): Update for change to
2657 diagnostic_show_locus.
2659 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2661 * c-common.c: Include "spellcheck.h".
2662 (cb_get_suggestion): New function.
2663 * c-common.h (cb_get_suggestion): New decl.
2664 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2667 2016-08-18 Marek Polacek <polacek@redhat.com>
2670 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2673 2016-08-16 David Malcolm <dmalcolm@redhat.com>
2676 * c-common.c (substring_loc::get_range): Rename to...
2677 (substring_loc::get_location): ...this, converting param from a
2678 source_range * to a location_t *. Call
2679 get_source_location_for_substring rather than
2680 get_source_range_for_substring, and pass in m_caret_idx.
2681 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2682 (substring_loc::get_range): Replace with...
2683 (substring_loc::get_location): ...this.
2684 (substring_loc::set_caret_index): New method.
2685 (substring_loc): Add field m_caret_idx.
2686 * c-format.c (format_warning_va): Update for above changes.
2687 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2688 clashing with type name.
2689 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2690 (check_argument_type): Likewise.
2691 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2692 Use a copy when emitting warnings, setting the caret index from TYPE.
2694 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
2695 Arnaud Charlet <charlet@adacore.com>
2697 * c-ada-spec.c (dump_number): New function.
2698 (handle_escape_character): Likewise.
2699 (print_ada_macros): Add handling of constant integers and strings.
2701 2016-08-12 Marek Polacek <polacek@redhat.com>
2704 * c-common.c (scalar_to_vector): Adjust fall through comment.
2705 * c-opts.c (c_common_handle_option): Likewise.
2706 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2707 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2708 fall through comment.
2709 * cilk.c (extract_free_variables): Add FALLTHRU.
2711 2016-08-10 Jason Merrill <jason@redhat.com>
2713 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2715 2016-08-09 Jason Merrill <jason@redhat.com>
2717 * c-common.c (c_common_attribute_table): vector_size affects type
2720 2016-08-09 Marek Polacek <polacek@redhat.com>
2723 * c-ada-spec.c (dump_generic_ada_node): Add return.
2725 2016-08-09 Jason Merrill <jason@redhat.com>
2727 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2728 C++17 constexpr lambdas.
2730 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2733 * c-common.h (selftest::c_format_c_tests): New declaration.
2734 (selftest::run_c_tests): New declaration.
2735 * c-format.c: Include "selftest.h.
2736 (format_warning_va): Add param "corrected_substring" and use
2737 it to add a replacement fix-it hint.
2738 (format_warning_at_substring): Likewise.
2739 (format_warning_at_char): Update for new param of
2741 (argument_parser::check_argument_type): Pass "fki" to
2743 (check_format_types): Add param "fki" and pass it to
2744 format_type_warning.
2745 (deref_n_times): New function.
2746 (get_modifier_for_format_len): New function.
2747 (selftest::test_get_modifier_for_format_len): New function.
2748 (get_format_for_type): New function.
2749 (format_type_warning): Add param "fki" and use it to attempt
2750 to provide hints for argument types when calling
2751 format_warning_at_substring.
2752 (selftest::get_info): New function.
2753 (selftest::assert_format_for_type_streq): New function.
2754 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2755 (selftest::test_get_format_for_type_printf): New function.
2756 (selftest::test_get_format_for_type_scanf): New function.
2757 (selftest::c_format_c_tests): New function.
2759 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2762 * c-format.c: Include "diagnostic.h".
2763 (location_column_from_byte_offset): Delete.
2764 (location_from_offset): Delete.
2765 (format_warning_va): New function.
2766 (format_warning_at_substring): New function.
2767 (format_warning_at_char): New function.
2768 (check_format_arg): Capture location of format_tree and pass to
2769 check_format_info_main.
2770 (argument_parser): Add fields "start_of_this_format" and
2771 "format_string_cst".
2772 (flag_chars_t::validate): Add param "format_string_cst". Convert
2773 warning_at call using location_from_offset to call to
2774 format_warning_at_char.
2775 (argument_parser::argument_parser): Add param "format_string_cst_"
2776 and use use it to initialize field "format_string_cst".
2777 Initialize new field "start_of_this_format".
2778 (argument_parser::read_format_flags): Convert warning_at call
2779 using location_from_offset to a call to format_warning_at_char.
2780 (argument_parser::read_any_format_left_precision): Likewise.
2781 (argument_parser::read_any_format_precision): Likewise.
2782 (argument_parser::read_any_other_modifier): Likewise.
2783 (argument_parser::find_format_char_info): Likewise, in three places.
2784 (argument_parser::parse_any_scan_set): Likewise, in one place.
2785 (argument_parser::handle_conversions): Likewise, in two places.
2786 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2787 and use it to make a substring_loc. Pass the latter to
2789 (check_format_info_main): Add params "fmt_param_loc" and
2790 "format_string_cst". Convert warning_at calls using
2791 location_from_offset to calls to format_warning_at_char. Pass the
2792 new params to the arg_parser ctor. Pass "format_string_cst" to
2793 flag_chars.validate. Pass "fmt_param_loc" to
2794 arg_parser.check_argument_type.
2795 (check_format_types): Convert first param from a location_t
2796 to a const substring_loc & and rename to "fmt_loc". Attempt
2797 to extract the range of the relevant parameter and pass it
2798 to format_type_warning.
2799 (format_type_warning): Convert first param from a location_t
2800 to a const substring_loc & and rename to "fmt_loc". Add
2801 params "param_range" and "type". Replace calls to warning_at
2802 with calls to format_warning_at_substring.
2804 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2806 * c-format.c (class flag_chars_t): New class.
2807 (struct length_modifier): New struct.
2808 (class argument_parser): New class.
2809 (flag_chars_t::flag_chars_t): New ctor.
2810 (flag_chars_t::has_char_p): New method.
2811 (flag_chars_t::add_char): New method.
2812 (flag_chars_t::validate): New method.
2813 (flag_chars_t::get_alloc_flag): New method.
2814 (flag_chars_t::assignment_suppression_p): New method.
2815 (argument_parser::argument_parser): New ctor.
2816 (argument_parser::read_any_dollar): New method.
2817 (argument_parser::read_format_flags): New method.
2818 (argument_parser::read_any_format_width): New method.
2819 (argument_parser::read_any_format_left_precision): New method.
2820 (argument_parser::read_any_format_precision): New method.
2821 (argument_parser::handle_alloc_chars): New method.
2822 (argument_parser::read_any_length_modifier): New method.
2823 (argument_parser::read_any_other_modifier): New method.
2824 (argument_parser::find_format_char_info): New method.
2825 (argument_parser::validate_flag_pairs): New method.
2826 (argument_parser::give_y2k_warnings): New method.
2827 (argument_parser::parse_any_scan_set): New method.
2828 (argument_parser::handle_conversions): New method.
2829 (argument_parser::check_argument_type): New method.
2830 (check_format_info_main): Introduce classes argument_parser
2831 and flag_chars_t, moving the code within the loop into methods
2832 of these classes. Make various locals "const".
2834 2016-08-05 David Malcolm <dmalcolm@redhat.com>
2836 * c-common.c: Include "substring-locations.h".
2837 (get_cpp_ttype_from_string_type): New function.
2838 (g_string_concat_db): New global.
2839 (substring_loc::get_range): New method.
2840 * c-common.h (g_string_concat_db): New declaration.
2841 (class substring_loc): New class.
2842 * c-lex.c (lex_string): When concatenating strings, capture the
2843 locations of all tokens using a new obstack, and record the
2844 concatenation locations within g_string_concat_db.
2845 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2848 2016-07-29 Marek Polacek <polacek@redhat.com>
2851 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2852 parentheses warning.
2855 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2857 2016-07-28 Martin Liska <mliska@suse.cz>
2859 PR gcov-profile/68025
2860 * c-common.c (handle_no_profile_instrument_function_attribute):
2862 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2864 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2867 2016-07-25 Jason Merrill <jason@redhat.com>
2870 * c.opt (fconstexpr-loop-limit): New.
2872 2016-07-22 Martin Sebor <msebor@redhat.com>
2875 * c-common.c (resolve_overloaded_builtin): Avoid converting
2876 __atomic_compare_exchange_n return type to that of what its
2877 first argument points to.
2879 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2881 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2882 ~(unsigned HOST_WIDE_INT) 0.
2884 2016-07-22 Martin Liska <mliska@suse.cz>
2886 PR gcov-profile/69028
2887 PR gcov-profile/62047
2888 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2889 to the current_function_decl.
2891 2016-07-21 Jason Merrill <jason@redhat.com>
2894 * c-common.c (c_common_truthvalue_conversion): Check
2895 c_inhibit_evaluation_warnings for warning about address of
2898 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2900 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2903 2016-07-15 Jason Merrill <jason@redhat.com>
2905 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2907 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2910 * c-common.h (enum lookup_name_fuzzy_kind): Add
2911 FUZZY_LOOKUP_FUNCTION_NAME.
2913 2016-07-08 Jason Merrill <jason@redhat.com>
2915 P0145: Refining Expression Order for C++.
2916 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2919 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2922 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2924 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2926 * c-pragma.h (enum pragma_kind): Rename
2927 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2930 2016-06-29 Richard Biener <rguenther@suse.de>
2933 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2935 2016-06-24 Jason Merrill <jason@redhat.com>
2937 P0145R2: Refining Expression Order for C++.
2938 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2941 2016-06-24 Jakub Jelinek <jakub@redhat.com>
2943 * c-common.c (check_builtin_function_arguments): Require last
2944 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2945 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2946 if the last argument is pointer to enumerated or boolean type.
2948 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2951 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2952 (lookup_name_fuzzy): New prototype.
2954 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
2956 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2958 2016-06-14 Jason Merrill <jason@redhat.com>
2960 P0145R2: Refining Expression Order for C++.
2961 * c.opt (fargs-in-order): New.
2962 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2964 2016-06-13 Jakub Jelinek <jakub@redhat.com>
2967 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2968 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2970 PR preprocessor/71183
2971 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2972 to cb_get_source_date_epoch.
2974 2016-06-10 Jakub Jelinek <jakub@redhat.com>
2977 * c.opt (Wpsabi): Add Warning flag.
2979 2016-06-10 Martin Sebor <msebor@redhat.com>
2982 * c-common.c (handle_nonnull_attribute): Accept
2983 the nonnull attribute in type-generic builtins.
2985 2016-06-09 Martin Sebor <msebor@redhat.com>
2988 * c-common.c (builtin_function_validate_nargs): Make text of error
2989 message consistent with others like it.
2991 2016-06-08 Martin Sebor <msebor@redhat.com>
2992 Jakub Jelinek <jakub@redhat.com>
2996 * c-common.c (check_builtin_function_arguments): Handle
2997 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2999 2016-06-08 Richard Biener <rguenther@suse.de>
3001 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3003 2016-06-07 Richard Biener <rguenther@suse.de>
3006 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3007 options and warn about others.
3009 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
3011 * c-common.c (get_source_date_epoch): Rename to
3012 cb_get_source_date_epoch.
3013 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3014 message when the parsing fails. Use error_at instead of fatal_error.
3015 * c-common.h (get_source_date_epoch): Rename to
3016 cb_get_source_date_epoch.
3017 * c-common.h (cb_get_source_date_epoch): Prototype.
3018 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3019 * c-common.h (c_omp_region_type): Remove trailing comma.
3020 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3021 * c-lex.c (c_lex_with_flags): Remove initialization of
3022 pfile->source_date_epoch.
3024 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3027 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3028 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3029 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3030 instead of C_OMP_CLAUSE_SPLIT_FOR.
3032 2016-05-24 Richard Biener <rguenther@suse.de>
3036 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3037 (convert_vector_to_array_for_subscript): ... this.
3038 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3039 VIEW_CONVERT_EXPR to an array type. Rename to ...
3040 (convert_vector_to_array_for_subscript): ... this.
3042 2016-05-12 Marek Polacek <polacek@redhat.com>
3045 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3046 size_in_bytes and pass LOC to it.
3048 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3051 * c.opt (Wduplicate-decl-specifier): New option.
3053 2016-05-11 Marek Polacek <polacek@redhat.com>
3056 * c-common.c (diagnose_mismatched_attributes): New function.
3057 * c-common.h (diagnose_mismatched_attributes): Declare.
3059 2016-05-04 Marek Polacek <polacek@redhat.com>
3061 * c.opt (Wdangling-else): New option.
3063 2016-05-03 Marek Polacek <polacek@redhat.com>
3066 * c-common.c (builtin_function_validate_nargs): Add location
3068 (check_builtin_function_arguments): Add location and arguments
3069 parameters. Use them.
3070 * c-common.h (check_builtin_function_arguments): Update declaration.
3072 2016-05-03 Richard Biener <rguenther@suse.de>
3074 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3075 allow call args to gimplify to SSA names.
3077 2016-05-03 Marek Polacek <polacek@redhat.com>
3079 * c-common.h (enum c_omp_region_type): Remove stray comma.
3081 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3083 * c-common.h (enum c_omp_region_type): Define.
3085 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3087 * c-common.c (shorten_compare): Use wi::to_wide.
3089 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3092 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3093 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3094 reduction clauses in acc parallel loops.
3096 2016-04-29 Marek Polacek <polacek@redhat.com>
3099 * c-common.c (warn_for_memset): Check domain before accessing it.
3101 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3104 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3105 "aligned" attribute.
3107 2016-04-28 Jason Merrill <jason@redhat.com>
3109 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3111 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3112 Matthias Klose <doko@debian.org>
3114 * c-common.c (get_source_date_epoch): New function, gets the environment
3115 variable SOURCE_DATE_EPOCH and parses it as long long with error
3117 * c-common.h (get_source_date_epoch): Prototype.
3118 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3120 2015-04-27 Ryan Burn <contact@rnburn.com>
3124 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3125 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3127 (cilk_detect_and_unwrap): Corresponding changes.
3128 (extract_free_variables): Don't extract free variables from
3129 AGGR_INIT_EXPR slot.
3130 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3131 (cilk_recognize_spawn): Likewise.
3133 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3135 * c.opt (Wmemset-elt-size): New option.
3136 * c-common.c (warn_for_memset): New function.
3137 * c-common.h (warn_for_memset): Declare.
3139 2016-04-25 Jason Merrill <jason@redhat.com>
3141 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3143 * c-common.h: Declare it.
3144 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3146 2016-04-22 Jason Merrill <jason@redhat.com>
3148 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3150 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3153 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3154 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3156 2016-04-18 Michael Matz <matz@suse.de>
3158 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3161 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3163 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3164 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3165 to incomplete types.
3166 (dump_nested_type): Remove redundant tests and tidy up.
3167 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3168 a type which is the typedef of an original type.
3170 2016-04-15 Marek Polacek <polacek@redhat.com>
3173 * c-common.c (build_va_arg): Change two asserts into errors and return
3176 2016-04-13 Marek Polacek <polacek@redhat.com>
3179 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3180 for switch statements, too.
3182 2016-03-28 Jason Merrill <jason@redhat.com>
3184 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3186 2016-03-23 Marek Polacek <polacek@redhat.com>
3189 * c.opt (Wignored-attributes): New option.
3191 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3194 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3195 diagnostic text, reversing the order of the warning and note so
3196 that they appear in source order.
3198 2016-03-17 Marek Polacek <polacek@redhat.com>
3201 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3204 2016-03-14 Jason Merrill <jason@redhat.com>
3206 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3208 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3210 2016-03-09 Richard Biener <rguenther@suse.de>
3213 * c-common.c (strict_aliasing_warning): Add back
3214 alias_sets_conflict_p check.
3216 2016-03-08 Jason Merrill <jason@redhat.com>
3218 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3220 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3223 * c-indentation.c (get_visual_column): Move code to determine next
3225 (next_tab_stop): ...this new function.
3226 (line_contains_hash_if): Delete function.
3227 (detect_preprocessor_logic): Delete function.
3228 (get_first_nws_vis_column): New function.
3229 (detect_intervening_unindent): New function.
3230 (should_warn_for_misleading_indentation): Replace call to
3231 detect_preprocessor_logic with a call to
3232 detect_intervening_unindent.
3234 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3237 * c-indentation.c (should_warn_for_misleading_indentation): When
3238 suppressing warnings about cases where the guard and body are on
3239 the same column, only use the first non-whitespace column in place
3240 of the guard token column when dealing with "else" clauses.
3241 When rejecting aligned BODY and NEXT, loosen the requirement
3242 from equality with the first non-whitespace of guard to simply
3243 that they not be indented relative to it.
3245 2016-03-04 Richard Biener <rguenther@suse.de>
3248 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3249 instead of alias_sets_conflict_p.
3251 2016-03-01 Marek Polacek <polacek@redhat.com>
3254 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3257 2016-02-22 Martin Sebor <msebor@redhat.com>
3260 * c-common.c (check_builtin_function_arguments): Validate and
3261 reject invalid arguments to __builtin_alloca_with_align.
3263 2016-02-20 Mark Wielaard <mjw@redhat.com>
3266 * c.opt (Wunused-const-variable): Turn into Alias for...
3267 (Wunused-const-variable=): New option.
3269 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3272 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3274 (c_common_init_options): ...to here.
3275 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3277 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3280 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3281 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3282 flag_preprocess_only.
3284 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3287 * c.opt (Wnonnull-compare): Enable for -Wall.
3289 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3292 * c-common.c (sync_resolve_size): Diagnose too few arguments
3293 even when params is non-NULL empty vector.
3295 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3298 * c.opt (fshort-double): Remove.
3300 2016-02-05 Martin Sebor <msebor@redhat.com>
3303 * c.opt (Warning options): Update -Wplacement-new to take
3304 an optional argument.
3306 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3308 PR preprocessor/69543
3310 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3311 instead of loc to control_warning_option.
3313 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3315 * c.opt (fopenacc-dim=): New option.
3317 2016-01-27 Ryan Burn <contact@rnburn.com>
3320 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3321 gimplify_arg. Removed superfluous post_p argument.
3322 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3323 superfluous post_p argument.
3324 * c-gimplify.c (c_gimplify_expr): Likewise.
3326 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3329 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3330 pp_newline_and_flush with pp_flush.
3332 2016-01-20 Martin Sebor <msebor@redhat.com>
3335 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3336 an incompatible argument when the argument isn't a valid tree node.
3338 2016-01-18 Jason Merrill <jason@redhat.com>
3341 * c-common.c (check_function_arguments_recurse): Fold the whole
3342 COND_EXPR, not just the condition.
3344 2016-01-18 Tom de Vries <tom@codesourcery.com>
3346 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3347 classify as loop clause.
3349 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3352 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3353 C++ FE no longer has limit on number of pragmas.
3355 2015-01-14 Ryan Burn <contact@rnburn.com>
3358 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3359 to add missing cleanup point.
3361 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3364 * c-indentation.c (get_visual_column): Add location_t param.
3365 Handle the column number being zero by effectively disabling the
3366 warning, with an "inform".
3367 (should_warn_for_misleading_indentation): Add location_t argument
3368 for all uses of get_visual_column.
3370 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3373 * c-indentation.c (should_warn_for_misleading_indentation):
3374 Don't warn about do-while statements.
3376 2016-01-07 Martin Sebor <msebor@redhat.com>
3379 * c-common.c (sync_resolve_size): Reject first argument when it's
3382 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3385 * c-indentation.c (get_visual_column): Remove default argument.
3386 (should_warn_for_misleading_indentation): For the multiline case,
3387 update call to get_visual_column for next_stmt_exploc so that it
3388 captures the location of the first non-whitespace character in the
3389 relevant line. Don't issue warnings if there is non-whitespace
3390 before the next statement.
3392 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3394 Update copyright years.
3396 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3398 * c-common.c (binary_op_error): Convert first param from
3399 location_t to rich_location * and use it when emitting an error.
3400 * c-common.h (binary_op_error): Convert first param from
3401 location_t to rich_location *.
3403 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3405 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3406 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3408 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3410 * c-common.c (c_common_attribute_table): Handle "omp declare target
3413 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3416 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3418 2014-12-12 Tobias Burnus <burnus@net-b.de>
3421 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3422 specifiers (%d, %i,%u and %c).
3424 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3426 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3428 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3432 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3433 * c-pragma.c (handle_pragma_diagnostic): Adjust
3434 control_warning_option caller.
3436 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3438 * c-common.c (c_cpp_error): Update for change to
3439 rich_location::set_range.
3441 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3443 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3444 shifting 1 out of the sign bit.
3446 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3448 * c-common.c (c_common_attribute_table[]): Update max arguments
3449 count for "simd" attribute.
3450 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3452 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3454 PR preprocessor/57580
3455 * c-ppoutput.c (print): Change printed field to bool.
3456 Move src_file last for smaller padding.
3457 (init_pp_output): Set print.printed to false instead of 0.
3458 (scan_translation_unit): Fix up formatting. Set print.printed
3459 to true after printing something other than newline.
3460 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3461 (maybe_print_line_1): Set print.printed to false instead of 0.
3462 (print_line_1): Likewise.
3463 (do_line_change): Set print.printed to true instead of 1.
3464 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3465 dump_macro): Set print.printed to false after printing newline.
3467 2015-12-02 Jason Merrill <jason@redhat.com>
3469 * c-common.c (fold_for_warn): New.
3470 (warn_logical_operator, warn_tautological_cmp)
3471 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3473 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3474 (c_fully_fold_internal, decl_constant_value_for_optimization):
3476 * c-common.h: Don't declare decl_constant_value_for_optimization.
3478 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3481 * c-common.h (c_build_qualified_type): Add extra default
3484 2015-12-01 Julian Brown <julian@codesourcery.com>
3485 Cesar Philippidis <cesar@codesourcery.com>
3486 James Norris <James_Norris@mentor.com>
3488 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3489 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3490 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3492 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3494 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3495 (decl_sloc_common): Delete and move bulk of processing to...
3496 (decl_sloc): ...here.
3497 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3498 (dump_ada_double_name): Remove S parameter and compute the suffix.
3499 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3500 element type and deal with an anonymous one.
3501 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3502 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3503 and remove reference to QUAL_UNION_TYPE.
3504 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3505 (dump_nested_type): ...here. New function extracted from above.
3506 Generate a full declaration for anonymous element type of arrays.
3507 (print_ada_declaration): Really skip anonymous declarations. Remove
3508 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3509 Clean up processing of declarations of array types and objects.
3510 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3511 Remove obsolete code and tidy up.
3513 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3516 * c-common.c (handle_transparent_union_attribute): Update
3519 2015-11-27 Martin Liska <mliska@suse.cz>
3522 * array-notation-common.c (cilkplus_extract_an_triplets):
3523 Release vector of vectors.
3524 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3526 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3529 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3530 (print_ada_struct_decl): Likewise.
3532 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3535 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3536 * cilk.c (recognize_spawn): Determine location in a more precise
3539 2015-11-19 Jason Merrill <jason@redhat.com>
3541 * c-common.c (shorten_compare): But look through macros from
3544 2015-11-18 Jason Merrill <jason@redhat.com>
3546 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3547 non-constant operand comes from a macro.
3549 2015-11-17 Jason Merrill <jason@redhat.com>
3552 * c-common.c (warn_tautological_cmp): Fold before checking for
3555 2015-11-16 Marek Polacek <polacek@redhat.com>
3558 * c-common.c (check_case_bounds): Fold low and high cases.
3560 2015-11-16 Marek Polacek <polacek@redhat.com>
3562 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3563 * c-common.c (c_common_get_alias_set): Likewise.
3564 (handle_visibility_attribute): Likewise.
3566 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3568 * c-common.c (handle_simd_attribute): New.
3569 (struct attribute_spec): Add entry for "simd".
3570 (handle_simd_attribute): New.
3572 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
3574 * c-lex.c (interpret_float): Use fold_convert.
3576 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3578 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3579 and store it on the result.
3580 * c-opts.c (c_common_init_options): Set
3581 global_dc->colorize_source_p.
3583 2015-11-12 James Norris <jnorris@codesourcery.com>
3584 Joseph Myers <joseph@codesourcery.com>
3586 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3587 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3588 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3589 PRAGMA_OACC_CLAUSE_LINK.
3591 2015-11-11 Marek Polacek <polacek@redhat.com>
3595 * c-common.c (valid_array_size_p): New function.
3596 * c-common.h (valid_array_size_p): Declare.
3598 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
3601 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3603 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3605 * array-notation-common.c: Remove unused header files.
3606 * c-ada-spec.c: Likewise.
3607 * c-cilkplus.c: Likewise.
3608 * c-common.c: Likewise.
3609 * c-cppbuiltin.c: Likewise.
3610 * c-dump.c: Likewise.
3611 * c-format.c: Likewise.
3612 * c-gimplify.c: Likewise.
3613 * c-indentation.c: Likewise.
3614 * c-lex.c: Likewise.
3615 * c-omp.c: Likewise.
3616 * c-opts.c: Likewise.
3617 * c-pch.c: Likewise.
3618 * c-ppoutput.c: Likewise.
3619 * c-pragma.c: Likewise.
3620 * c-pretty-print.c: Likewise.
3621 * c-semantics.c: Likewise.
3622 * c-ubsan.c: Likewise.
3624 * stub-objc.c: Likewise.
3626 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3627 Cesar Philippidis <cesar@codesourcery.com>
3628 James Norris <jnorris@codesourcery.com>
3629 Julian Brown <julian@codesourcery.com>
3630 Nathan Sidwell <nathan@codesourcery.com>
3632 * c-pragma.c (oacc_pragmas): Add "routine".
3633 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3635 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3637 * c-common.c (c_common_attributes): Add scalar_storage_order.
3638 (handle_scalar_storage_order_attribute): New function.
3639 * c-pragma.c (global_sso): New variable.
3640 (maybe_apply_pragma_scalar_storage_order): New function.
3641 (handle_pragma_scalar_storage_order): Likewise.
3642 (init_pragma): Register scalar_storage_order.
3643 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3644 * c.opt (Wscalar-storage-order): New warning.
3645 (fsso-struct=): New option.
3647 2015-11-08 Martin Sebor <msebor@redhat.com>
3649 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3651 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3653 * c-common.c: Don't undef DEF_BUILTIN.
3655 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3657 * c-common.c (c_cpp_error): Convert parameter from location_t to
3658 rich_location *. Eliminate the "column_override" parameter and
3659 the call to diagnostic_override_column.
3660 Update the "done_lexing" clause to set range 0
3661 on the rich_location, rather than overwriting a location_t.
3662 * c-common.h (c_cpp_error): Convert parameter from location_t to
3663 rich_location *. Eliminate the "column_override" parameter.
3665 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3666 Thomas Schwinge <thomas@codesourcery.com>
3667 James Norris <jnorris@codesourcery.com>
3669 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3670 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3671 clauses with parallel and kernels and loops.
3672 * c-pragma.h (enum pragma_omp_clause): Add entries for
3673 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3674 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3675 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3677 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3679 2015-11-05 Martin Sebor <msebor@redhat.com>
3682 * c.opt (-Wplacement-new): New option.
3684 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3686 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3687 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3688 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3689 save_expr or create_tmp_var* if TEST is true.
3690 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3691 Don't call add_stmt here.
3692 (struct c_omp_check_loop_iv_data): New type.
3693 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3694 c_omp_check_loop_iv_exprs): New functions.
3695 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3697 (c_omp_declare_simd_clauses_to_numbers): Change
3698 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3699 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3700 from numbers to PARM_DECLs.
3702 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3704 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3707 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
3710 * c-common.h (fold_offsetof_1): Add argument.
3711 * c-common.c (fold_offsetof_1): Diagnose more invalid
3712 offsetof expressions that reference elements past the end of
3715 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3716 Chung-Lin Tang <cltang@codesourcery.com>
3718 * c-pragma.c (oacc_pragmas): Add "atomic".
3719 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3721 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3723 * c-common.c (handle_target_clones_attribute): New.
3724 (c_common_attribute_table): Add handle_target_clones_attribute.
3725 (handle_always_inline_attribute): Add check on target_clones attribute.
3726 (handle_target_attribute): Ditto.
3728 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3730 * array-notation-common.c: Reorder #include's and remove duplicates.
3731 * c-ada-spec.c: Likewise.
3732 * c-cilkplus.c: Likewise.
3733 * c-common.c: Likewise.
3734 * c-cppbuiltin.c: Likewise.
3735 * c-dump.c: Likewise.
3736 * c-format.c: Likewise.
3737 * c-gimplify.c: Likewise.
3738 * c-indentation.c: Likewise.
3739 * c-lex.c: Likewise.
3740 * c-omp.c: Likewise.
3741 * c-opts.c: Likewise.
3742 * c-pch.c: Likewise.
3743 * c-ppoutput.c: Likewise.
3744 * c-pragma.c: Likewise.
3745 * c-pretty-print.c: Likewise.
3746 * c-semantics.c: Likewise.
3747 * c-ubsan.c: Likewise.
3749 * stub-objc.c: Likewise.
3751 2015-10-28 Jason Merrill <jason@redhat.com>
3753 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3755 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3756 James Norris <jnorris@codesourcery.com>
3757 Cesar Philippidis <cesar@codesourcery.com>
3761 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3762 * c-omp.c (c_oacc_split_loop_clauses): New function.
3764 2015-10-21 Martin Sebor <msebor@redhat.com>
3767 * c.opt: End each sentence that describes an option with a period.
3769 2015-10-20 Marek Polacek <polacek@redhat.com>
3771 * array-notation-common.c (is_cilkplus_vector_p): Define.
3772 * c-common.h (is_cilkplus_vector_p): Declare.
3774 2015-10-20 Marek Polacek <polacek@redhat.com>
3776 * c.opt (std=gnu++11): Do not describe as experimental.
3777 (std=gnu++14): Likewise.
3779 2015-10-19 Jason Merrill <jason@redhat.com>
3781 * c-cppbuiltin.c (c_cpp_builtins): Define
3782 __cpp_nontype_template_args.
3784 2015-10-19 Jason Merrill <jason@redhat.com>
3786 * c-cppbuiltin.c (c_cpp_builtins): Define
3787 __cpp_enumerator_attributes, __cpp_fold_expressions,
3788 __cpp_unicode_characters.
3790 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3791 Aldy Hernandez <aldyh@redhat.com>
3793 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3794 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3795 (c_define_builtins): Likewise.
3796 * c-common.h (enum c_omp_clause_split): Add
3797 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3798 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3799 (c_finish_omp_for): Add ORIG_DECLV argument.
3800 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3801 201511 instead of 201307.
3802 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3803 OMP_CRITICAL_CLAUSES to it.
3804 (c_finish_omp_ordered): Add CLAUSES argument, set
3805 OMP_ORDERED_CLAUSES to it.
3806 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3807 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3808 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3809 constructs and new OpenMP 4.5 clauses. Clear
3810 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3812 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3813 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3814 (enum pragma_omp_clause): Add
3815 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3816 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3818 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3820 * c-lex.c (interpret_float): Use real_equal instead of
3823 2015-10-04 Jason Merrill <jason@redhat.com>
3825 Implement N4514, C++ Extensions for Transactional Memory.
3826 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3827 (c_common_attribute_table): Add transaction_safe_dynamic.
3828 transaction_safe now affects type identity.
3829 (handle_tm_attribute): Handle transaction_safe_dynamic.
3830 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3831 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3832 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3834 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3835 * c-pretty-print.c (pp_c_attributes_display): Don't print
3836 transaction_safe in C++.
3838 2015-10-02 Marek Polacek <polacek@redhat.com>
3840 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3842 2015-10-02 Marek Polacek <polacek@redhat.com>
3845 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3846 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3847 * c.opt (Wduplicated-cond): New option.
3849 2015-10-01 Joseph Myers <joseph@codesourcery.com>
3851 * c.opt (std=c11): Do not describe as experimental.
3852 (std=gnu11): Likewise.
3853 (std=iso9899:2011): Likewise.
3855 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3857 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3858 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3860 2015-09-25 Marek Polacek <polacek@redhat.com>
3862 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3863 (ubsan_instrument_shift): Likewise.
3865 2015-09-25 Marek Polacek <polacek@redhat.com>
3868 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3870 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3872 * c-indentation.c (should_warn_for_misleading_indentation):
3873 Compare next_stmt_vis_column with guard_line_first_nws instead
3874 of with guard_line_vis_column.
3876 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3880 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3881 options and options not valid for the current language.
3883 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3885 * c-indentation.c (should_warn_for_misleading_indentation):
3886 Float out and consolidate the calls to get_visual_column that
3887 are passed guard_exploc as an argument. Compare
3888 next_stmt_vis_column with guard_line_first_nws instead of with
3889 body_line_first_nws.
3891 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3893 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3894 Wnamespaces): New C++ warnings.
3896 2015-09-22 Jason Merrill <jason@redhat.com>
3898 * c-common.h (abi_compat_version_crosses): New.
3899 (warn_abi_version): Declare.
3900 * c-common.c: Define it.
3901 * c-opts.c (c_common_post_options): Handle it.
3902 flag_abi_compat_version defaults to 8.
3904 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3906 Complete the implementation of N4230, Nested namespace definition.
3907 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3908 __cpp_nested_namespace_definitions.
3910 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3912 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3914 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3916 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3918 * c-pragma.h (pragma_lex): Add optional loc argument.
3920 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3922 * c-format.c (check_format_arg): Adjust to use common block size in all
3925 2015-09-15 David Malcolm <dmalcolm@redhat.com>
3927 * c-format.c (location_from_offset): Update for change in
3928 signature of location_get_source_line.
3929 * c-indentation.c (get_visual_column): Likewise.
3930 (line_contains_hash_if): Likewise.
3932 2015-09-14 Marek Polacek <polacek@redhat.com>
3934 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3935 setting various warnings.
3937 2015-09-14 Marek Polacek <polacek@redhat.com>
3939 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3942 2015-09-11 Mark Wielaard <mjw@redhat.com>
3945 * c.opt (Wunused-variable): Option from common.opt.
3946 (Wunused-const-variable): New option.
3948 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3951 * c.opt ([Wsubobject-linkage]): Add.
3953 2015-09-03 Martin Sebor <msebor@redhat.com>
3956 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3958 * c-common.c (reject_gcc_builtin): Define.
3960 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3963 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3965 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3966 cilk_gimplify_call_params_in_spawned_fn.
3967 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3968 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3971 2015-08-25 Marek Polacek <polacek@redhat.com>
3974 * c-common.c (handle_weak_attribute): Don't check whether the
3975 visibility can be changed here.
3977 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3979 * c-lex.c (c_lex_with_flags): Use explicit locations.
3981 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3983 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3984 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3986 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3989 * c-common.c (check_builtin_function_arguments): Add check
3990 for BUILT_IN_SIGNBIT argument.
3992 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3995 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3998 2015-08-17 Marek Polacek <polacek@redhat.com>
4000 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4001 with whitespaces before qualifier names.
4003 2015-08-12 Marek Polacek <polacek@redhat.com>
4006 * c-common.c (maybe_warn_shift_overflow): Properly handle
4007 left-shifting 1 into the sign bit.
4009 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4011 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4013 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4014 Braden Obrzut <admin@maniacsvault.net>
4015 Jason Merrill <jason@redhat.com>
4017 Add C++ Concepts TS support.
4018 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4019 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4020 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4021 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4022 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4023 * c.opt (fconcepts): New.
4025 2015-08-02 Martin Sebor <msebor@redhat.com>
4027 * c.opt (-Wframe-address): New warning option.
4029 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4031 * c-indentation.c (should_warn_for_misleading_indentation):
4034 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4036 * c-indentation.c (get_visual_column): Add parameter first_nws,
4037 use it. Update comment documenting the function.
4038 (is_first_nonwhitespace_on_line): Remove.
4039 (should_warn_for_misleading_indentation): Replace usage of
4040 of is_first_nonwhitespace_on_line with get_visual_column.
4042 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4044 * c-indentation.h (struct token_indent_info): Define.
4045 (get_token_indent_info): Define.
4046 (warn_for_misleading_information): Declare.
4047 * c-common.h (warn_for_misleading_information): Remove.
4048 * c-identation.c (warn_for_misleading_indentation):
4049 Change declaration to take three token_indent_infos. Adjust
4051 * c-identation.c (should_warn_for_misleading_indentation):
4052 Likewise. Bail out early if the body is a compound statement.
4053 (guard_tinfo_to_string): Define.
4055 2015-07-30 Jason Merrill <jason@redhat.com>
4057 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4058 '*' for reference decay.
4060 2015-07-30 Marek Polacek <polacek@redhat.com>
4062 * c-common.c (warn_tautological_cmp): Bail for float types.
4064 2015-07-27 Marek Polacek <polacek@redhat.com>
4067 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4069 2015-07-27 Marek Polacek <polacek@redhat.com>
4073 * c-common.c (find_array_ref_with_const_idx_r): New function.
4074 (warn_tautological_cmp): New function.
4075 * c-common.h (warn_tautological_cmp): Declare.
4076 * c.opt (Wtautological-compare): New option.
4078 2015-07-23 Marek Polacek <polacek@redhat.com>
4080 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4081 (ubsan_instrument_shift): Likewise.
4083 2015-07-23 Marek Polacek <polacek@redhat.com>
4086 * c-ubsan.c: Include gimplify.h.
4087 (ubsan_instrument_division): Unshare OP0 and OP1.
4088 (ubsan_instrument_shift): Likewise.
4090 2015-07-20 Marek Polacek <polacek@redhat.com>
4091 Richard Sandiford <richard.sandiford@arm.com>
4094 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4095 Use EXPR_LOC_OR_LOC.
4096 (maybe_warn_shift_overflow): New function.
4097 * c-common.h (maybe_warn_shift_overflow): Declare.
4098 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4099 * c.opt (Wshift-overflow): New option.
4101 2015-07-16 Martin Liska <mliska@suse.cz>
4103 * c-format.c (static void check_format_info_main): Use
4104 object_allocator instead of pool_allocator.
4105 (check_format_arg): Likewise.
4106 (check_format_info_main): Likewise.
4108 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4110 * c-opts.c: Remove multiline #include comment.
4112 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4114 * c-common.c: Fix double word typos.
4116 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4118 * c-ada-spec.h (cpp_operation): Revert latest change.
4119 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4120 constructors and destructors.
4122 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4124 * c-common.h: Adjust includes for flags.h changes.
4125 * stub-objc.c: Likewise.
4127 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4129 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4130 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4132 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4134 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4135 are to be removed, return NULL rather than original clauses list.
4137 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4139 * array-notation-common.c: Adjust includes.
4140 * c-ada-spec.c: Likewise.
4141 * c-cilkplus.c: Likewise.
4142 * c-common.h: Likewise.
4143 * c-cppbuiltin.c: Likewise.
4144 * c-dump.c: Likewise.
4145 * c-format.c: Likewise.
4146 * c-gimplify.c: Likewise.
4147 * c-indentation.c: Likewise.
4148 * c-lex.c: Likewise.
4149 * c-omp.c: Likewise.
4150 * c-opts.c: Likewise.
4151 * c-pch.c: Likewise.
4152 * c-ppoutput.c: Likewise.
4153 * c-pragma.c: Likewise.
4154 * c-pretty-print.c: Likewise.
4155 * c-semantics.c: Likewise.
4156 * c-ubsan.c: Likewise.
4158 * stub-objc.c: Likewise.
4160 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4162 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4163 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4165 2015-07-01 Jason Merrill <jason@redhat.com>
4167 * c-common.h (D_CXX11): Rename from D_CXX0X.
4168 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4169 * c-common.c: Adjust.
4171 * c-opts.c (c_common_post_options): Default to C++14.
4173 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4175 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4177 Implement N4197 - Adding u8 character literals
4178 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4180 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4181 CPP_UTF8CHAR_USERDEF tokens.
4182 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4183 and CPP_UTF8CHAR tokens.
4184 (lex_charconst): Treat CPP_UTF8CHAR token.
4186 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4189 * c-common.c (do_warn_unused_parameter): Move here.
4190 * c-common.h (do_warn_unused_parameter): Declare.
4192 2015-06-29 Marek Polacek <polacek@redhat.com>
4195 * c-common.c (check_case_bounds): Add bool * parameter. Set
4197 (c_add_case_label): Add bool * parameter. Pass it down to
4199 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4201 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4204 2015-06-27 Marek Polacek <polacek@redhat.com>
4206 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4207 or VECTOR_INTEGER_TYPE_P throughout.
4208 * c-gimplify.c: Likewise.
4210 2015-06-26 Marek Polacek <polacek@redhat.com>
4212 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4213 * c-common.c (c_fully_fold_internal): Likewise.
4214 (c_alignof_expr): Likewise.
4215 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4216 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4217 * cilk.c (create_parm_list): Likewise.
4219 2015-06-26 Marek Polacek <polacek@redhat.com>
4221 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4223 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4225 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4226 * c-gimplify.c: Likewise.
4227 * c-pragma.c: Likewise.
4228 * c-ubsan.c: Likewise.
4231 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4233 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4236 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4238 * cilk.c: Move calls.h after tm.h in the include chain.
4240 2015-06-25 Marek Polacek <polacek@redhat.com>
4242 * array-notation-common.c: Use VAR_P throughout.
4243 * c-ada-spec.c: Likewise.
4244 * c-common.c: Likewise.
4245 * c-format.c: Likewise.
4246 * c-gimplify.c: Likewise.
4247 * c-omp.c: Likewise.
4248 * c-pragma.c: Likewise.
4249 * c-pretty-print.c: Likewise.
4252 2015-06-25 Marek Polacek <polacek@redhat.com>
4254 * cilk.c (extract_free_variables): Use is_global_var.
4256 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4258 * c-common.c: Don't include target-def.h.
4260 2015-06-23 Marek Polacek <polacek@redhat.com>
4262 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4263 when comparing INTEGER_CSTs.
4265 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4267 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4268 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4269 (dump_ada_template): Skip partially specialized types.
4271 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4273 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4276 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4278 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4279 * c-ada-spec.c: Likewise.
4280 * c-cilkplus.c: Likewise.
4281 * c-common.c: Likewise.
4282 * c-common.h: Likewise.
4283 * c-cppbuiltin.c: Likewise.
4284 * c-dump.c: Likewise.
4285 * c-format.c: Likewise.
4286 * c-gimplify.c: Likewise.
4287 * c-indentation.c: Likewise.
4288 * c-lex.c: Likewise.
4289 * c-omp.c: Likewise.
4290 * c-opts.c: Likewise.
4291 * c-pch.c: Likewise.
4292 * c-ppoutput.c: Likewise.
4293 * c-pragma.c: Likewise.
4294 * c-pretty-print.c: Likewise.
4295 * c-semantics.c: Likewise.
4296 * c-ubsan.c: Likewise.
4298 * stub-objc.c: Likewise.
4300 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4303 * c-common.c (c_common_truthvalue_conversion): Warn when
4304 converting an address of a reference to a truth value.
4306 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4308 * array-notation-common.c : Adjust include files.
4309 * c-ada-spec.c : Likewise.
4310 * c-cilkplus.c : Likewise.
4311 * c-common.c : Likewise.
4312 * c-common.h : Likewise.
4313 * c-cppbuiltin.c : Likewise.
4314 * c-dump.c : Likewise.
4315 * c-format.c : Likewise.
4316 * c-gimplify.c : Likewise.
4317 * c-indentation.c : Likewise.
4318 * c-lex.c : Likewise.
4319 * c-omp.c : Likewise.
4320 * c-opts.c : Likewise.
4321 * c-pch.c : Likewise.
4322 * c-ppoutput.c : Likewise.
4323 * c-pragma.c : Likewise.
4324 * c-pretty-print.c : Likewise.
4325 * c-semantics.c : Likewise.
4326 * c-ubsan.c : Likewise.
4327 * cilk.c : Likewise.
4328 * stub-objc.c : Likewise.
4330 2015-06-08 Marek Polacek <polacek@redhat.com>
4333 * c-format.c (location_from_offset): Return LOC if LINE is null.
4335 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4337 * c-common.h (c_parse_final_cleanups): New prototype.
4338 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4340 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4342 * c-common.c (noplt): New attribute.
4343 (handle_noplt_attribute): New handler.
4345 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4347 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4348 * c-ada-spec.c: Likewise.
4349 * c-cilkplus.c: Likewise.
4350 * c-common.c: Likewise.
4351 * c-common.h: Likewise.
4352 * c-cppbuiltin.c: Likewise.
4353 * c-dump.c: Likewise.
4354 * c-format.c: Likewise.
4355 * c-gimplify.c: Likewise.
4356 * c-indentation.c: Likewise.
4357 * c-lex.c: Likewise.
4358 * c-omp.c: Likewise.
4359 * c-opts.c: Likewise.
4360 * c-pch.c: Likewise.
4361 * c-ppoutput.c: Likewise.
4362 * c-pragma.c: Likewise.
4363 * c-pretty-print.c: Likewise.
4364 * c-semantics.c: Likewise.
4365 * c-ubsan.c: Likewise.
4367 * stub-objc.c: Likewise.
4369 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4372 * c-indentation.c (should_warn_for_misleading_indentation): Use
4373 expand_location rather than expand_location_to_spelling_point.
4374 Don't warn if the guarding statement is more indented than the
4377 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4379 * c-indentation.c (warn_for_misleading_indentation): Bail out
4380 immediately if -Wmisleading-indentation isn't enabled.
4382 2015-06-01 Martin Liska <mliska@suse.cz>
4384 * c-format.c (check_format_arg):Use new type-based pool allocator.
4385 (check_format_info_main) Likewise.
4387 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4389 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4390 (has_nontrivial_methods): Likewise.
4392 2015-05-25 Marek Polacek <polacek@redhat.com>
4394 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4396 2015-05-22 Marek Polacek <polacek@redhat.com>
4399 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4401 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4403 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4404 STACK_GROWS_DOWNWARD.
4406 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4408 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4409 STACK_GROWS_DOWNWARD rather than if it is defined.
4411 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4414 * c-format.c (location_column_from_byte_offset): New.
4415 (location_from_offset): New.
4416 (struct format_wanted_type): Add offset_loc field.
4417 (check_format_info): Move handling of location for extra arguments
4418 closer to the point of warning.
4419 (check_format_info_main): Pass the result of location_from_offset
4421 (format_type_warning): Pass the result of location_from_offset
4424 2015-05-20 Marek Polacek <polacek@redhat.com>
4426 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4428 2015-05-20 Marek Polacek <polacek@redhat.com>
4430 * c-ada-spec.c (dump_sloc): Use DECL_P.
4432 2015-05-20 Marek Polacek <polacek@redhat.com>
4434 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4435 * c-common.c: Likewise.
4437 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4439 * c-common.h (fe_file_change): Strengthen param from
4440 const line_map * to const line_map_ordinary *.
4441 (pp_file_change): Likewise.
4442 * c-lex.c (fe_file_change): Likewise.
4443 (cb_define): Use linemap_check_ordinary when invoking
4445 (cb_undef): Likewise.
4446 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4447 invoking cb_file_change.
4448 (c_finish_options): Likewise.
4449 (push_command_line_include): Likewise.
4450 (cb_file_change): Strengthen param "new_map" from
4451 const line_map * to const line_map_ordinary *.
4452 * c-ppoutput.c (cb_define): Likewise for local "map".
4453 (pp_file_change): Likewise for param "map" and local "from".
4455 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4457 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4459 2015-05-18 Tom de Vries <tom@codesourcery.com>
4461 * c-common.c (build_va_arg_1): New function.
4462 (build_va_arg): Add address operator to va_list operand if necessary.
4464 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4467 * c-common.c (int_safely_convertible_to_real_p): Define.
4468 (unsafe_conversion_p): Check conversions involving complex types.
4469 (conversion_warning): Add new warning message for conversions which
4470 discard imaginary component.
4471 * c-common.h: (enum conversion_safety): Add new enumerator for such
4474 2015-05-14 Marek Polacek <polacek@redhat.com>
4478 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4479 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4480 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4481 use it. If FOR_INT_CONST, require that all evaluated operands be
4484 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4486 * c-common.h (warn_for_misleading_indentation): New prototype.
4487 * c-indentation.c: New file.
4488 * c.opt (Wmisleading-indentation): New option.
4490 2015-05-12 Tom de Vries <tom@codesourcery.com>
4492 PR tree-optimization/66010
4493 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4495 2015-05-09 Jason Merrill <jason@redhat.com>
4497 * c-opts.c (c_common_post_options): Also clear
4498 cpp_opts->cpp_warn_cxx11_compat.
4500 * c-common.h (enum cxx_dialect): Add cxx_unset.
4501 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4502 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4504 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4505 (std=gnu++0x): Mark as Undocumented.
4506 (std=gnu++1y): Add deprecated message.
4508 2015-05-08 Jason Merrill <jason@redhat.com>
4510 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4513 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4515 2015-05-08 Marek Polacek <polacek@redhat.com>
4518 * c.opt (Woverride-init-side-effects): New option.
4520 2015-05-07 Marek Polacek <polacek@redhat.com>
4523 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4525 * c.opt (Wshift-negative-value): New option.
4526 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4527 when -Wextra and C99/C++11 mode.
4529 2015-05-07 Marek Polacek <polacek@redhat.com>
4530 Martin Uecker <uecker@eecs.berkeley.edu>
4532 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4533 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4535 2015-05-05 Jason Merrill <jason@redhat.com>
4537 * c.opt (Wterminate): New.
4539 2015-04-30 Marek Polacek <polacek@redhat.com>
4541 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4542 require that the non-constant be of a boolean type.
4544 2015-04-29 Josh Triplett <josh@joshtriplett.org>
4546 * c-common.c (handle_section_attribute): Refactor to reduce
4547 nesting and distinguish between error cases.
4549 2015-04-29 Marek Polacek <polacek@redhat.com>
4552 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4555 2015-04-29 Jakub Jelinek <jakub@redhat.com>
4557 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4558 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4559 HOST_BITS_PER_WIDE_INT.
4561 2015-04-28 Tom de Vries <tom@codesourcery.com>
4563 PR tree-optimization/65887
4564 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4566 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
4567 Pierre-Marie de Rodat <derodat@adacore.com>
4569 * c-ada-spec.c (in_function): Delete.
4570 (dump_generic_ada_node): Do not change in_function and remove the
4571 redundant code dealing with it.
4572 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4573 (print_ada_methods): Output the static member functions in a nested
4574 package after the regular methods as well as associated renamings.
4576 2015-04-24 Marek Polacek <polacek@redhat.com>
4579 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4580 and OPT_Wshift_count_overflow.
4583 * c-common.c (warn_logical_operator): Warn if the operands have the
4586 2015-04-24 Marek Polacek <polacek@redhat.com>
4589 * c-common.c (warn_logical_operator): Bail if either operand comes
4590 from a macro expansion.
4592 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4595 * c-common.c (c_default_pointer_mode): Add definition.
4596 * c-common.h (c_default_pointer_mode): Add declaration.
4598 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4600 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4601 on record_builtin_type argument.
4603 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4606 * c-common.c (warn_logical_not_parentheses): Don't warn for
4609 2015-03-07 Marek Polacek <polacek@redhat.com>
4612 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4613 before trying to figure out whether we have a flexible array member.
4615 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
4616 Jonathan Wakely <jwakely.gcc@gmail.com>
4618 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4620 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4623 * c-ada-spec.c (print_destructor): Remove obsolete code.
4625 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4627 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4628 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4629 DECL_TEMPLATE_RESULT emulations.
4630 (dump_ada_template)): Add guard for TYPE_METHODS.
4632 2015-02-27 Marek Polacek <polacek@redhat.com>
4635 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4637 2015-02-27 Kai Tietz <ktietz@redhat.com>
4640 * c-pragma.c (handle_pragma_weak): Do not try to create
4641 weak/alias of declarations not being function, or variable
4644 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4647 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4649 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4651 2015-02-16 Marek Polacek <polacek@redhat.com>
4654 * c-format.c (check_format_types): Handle null param.
4656 2015-02-13 Marek Polacek <polacek@redhat.com>
4659 * c-format.c (check_format_types): Don't warn about different
4660 signedness if the original value is in the range of WANTED_TYPE.
4662 2015-02-12 Jason Merrill <jason@redhat.com>
4665 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4666 to the current highest version.
4667 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4669 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4673 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4674 instead of RDIV_EXPR. Use build_binary_op instead of
4677 2015-01-30 Joseph Myers <joseph@codesourcery.com>
4679 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4680 to pass input_location as first argument.
4682 2015-01-23 Tom de Vries <tom@codesourcery.com>
4685 * c.opt (fopenacc): Mark as LTO option.
4687 2015-01-23 Tom de Vries <tom@codesourcery.com>
4690 * c.opt (fopenmp): Mark as LTO option.
4692 2015-01-21 Jakub Jelinek <jakub@redhat.com>
4695 * cilk.c (fill_decls_vec): Only put decls into vector v.
4696 (compare_decls): Fix up formatting.
4698 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4701 * cilk.c: Include vec.h.
4702 (struct cilk_decls): New structure.
4703 (wrapper_parm_cb): Split this function to...
4704 (fill_decls_vec): ...this...
4705 (create_parm_list): ...and this.
4706 (compare_decls): New function.
4707 (for_local_cb): Remove.
4708 (wrapper_local_cb): Ditto.
4709 (build_wrapper_type): For now first traverse and fill vector of
4710 declarations then sort it and then deal with sorted vector.
4711 (cilk_outline): Ditto.
4712 (declare_one_free_variable): Ditto.
4714 2015-01-21 Jason Merrill <jason@redhat.com>
4717 * c-format.c (check_format_arg): Call decl_constant_value.
4719 2015-01-19 Martin Liska <mliska@suse.cz>
4721 * c-common.c (handle_noicf_attribute): New function.
4723 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4724 Bernd Schmidt <bernds@codesourcery.com>
4725 James Norris <jnorris@codesourcery.com>
4726 Cesar Philippidis <cesar@codesourcery.com>
4727 Ilmir Usmanov <i.usmanov@samsung.com>
4728 Jakub Jelinek <jakub@redhat.com>
4730 * c.opt (fopenacc): New option.
4731 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4732 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4734 * c-common.h (c_finish_oacc_wait): New prototype.
4735 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4736 (c_finish_oacc_wait): New function.
4737 * c-pragma.c (oacc_pragmas): New variable.
4738 (c_pp_lookup_pragma, init_pragma): Handle it.
4739 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4740 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4741 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4742 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4743 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4744 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4745 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4746 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4747 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4748 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4749 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4750 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4751 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4752 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4753 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4754 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4755 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4756 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4757 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4758 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4759 PRAGMA_OACC_CLAUSE_WORKER.
4761 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
4763 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4764 for the new option fstack-protector_explicit.
4765 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4766 (handle_stack_protect_attribute): New function.
4768 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
4770 * c.opt: New option -Warray-bounds=.
4772 2015-01-09 Michael Collison <michael.collison@linaro.org>
4774 * array-notation-common.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 flattening of tree.h.
4777 * c-ada-spec.c: Ditto.
4778 * c-cilkplus.c: Ditto.
4779 * c-common.c: Include input.h due to flattening of tree.h.
4780 Define macro GCC_C_COMMON_C.
4781 * c-common.h: Flatten tree.h header files into c-common.h.
4782 Remove include of tree-core.h.
4783 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4784 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4785 fold-const.h, wide-int.h, and inchash.h due to
4786 flattening of tree.h.
4788 * c-format.c: Flatten tree.h header files into c-common.h.
4789 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4790 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4791 fold-const.h, wide-int.h, and inchash.h due to
4792 flattening of tree.h.
4793 * c-dump.c: Include hash-set.h, machmode.h,
4794 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4795 fold-const.h, wide-int.h, and inchash.h due to
4796 flattening of tree.h.
4797 * c-format.c: Include hash-set.h, machmode.h,
4798 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4799 fold-const.h, wide-int.h, inchash.h and real.h due to
4800 flattening of tree.h.
4801 * c-gimplify.c: Include hash-set.h, machmode.h,
4802 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4803 fold-const.h, wide-int.h, and inchash.h due to
4804 flattening of tree.h.
4810 * c-ppoutput.c: Ditto.
4811 * c-pragma.c: Ditto.
4812 * c-pretty-print.c: Ditto.
4813 * c-semantics.c: Ditto.
4815 * stub-objc.c: Ditto.
4817 2015-01-08 Jason Merrill <jason@redhat.com>
4819 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4820 do_ubsan_in_current_function.
4821 (ubsan_maybe_instrument_reference_or_call): Likewise.
4822 * c-ubsan.h: Declare it.
4824 2015-01-08 Mike Stump <mikestump@comcast.net>
4826 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4828 2015-01-07 Marek Polacek <polacek@redhat.com>
4831 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4832 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4834 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4837 * c.opt (Wsuggest-override): New option.
4839 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4841 Update copyright years.
4843 2015-01-05 Marek Polacek <polacek@redhat.com>
4846 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4848 * c-common.h (warn_array_subscript_with_type_char): Update
4851 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4853 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4854 Control macro with flag_sized_deallocation.
4856 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4858 * c.opt (Wdiscarded-array-qualifiers): New option.
4860 2014-12-19 Jakub Jelinek <jakub@redhat.com>
4862 PR preprocessor/63831
4863 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4864 and __has_cpp_attribute here.
4865 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4866 c_common_has_attribute.
4867 * c-common.h (c_common_has_attribute): New prototype.
4868 * c-lex.c (init_c_lex): Set cb->has_attribute to
4869 c_common_has_attribute instead of cb_has_attribute.
4870 (get_token_no_padding): New function.
4871 (cb_has_attribute): Renamed to ...
4872 (c_common_has_attribute): ... this. No longer static. Use
4873 get_token_no_padding, require ()s, don't build TREE_LIST
4874 unnecessarily, fix up formatting, adjust diagnostics, call
4877 2014-12-15 Jason Merrill <jason@redhat.com>
4879 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4880 (-Wsized-deallocation): New.
4881 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4882 to on in C++14 and up.
4884 2014-12-11 Jason Merrill <jason@redhat.com>
4886 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4888 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4889 we aren't complaining about VLAs.
4891 2014-12-06 Marek Polacek <polacek@redhat.com>
4893 PR tree-optimization/64183
4894 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4895 shift-expression if it is integer_type_node. Use types_compatible_p.
4897 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4899 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4900 last argument from create_tmp_var_raw and create_tmp_var calls.
4901 * cilk.c (gimplify_cilk_spawn): Likewise.
4902 * c-omp.c (c_finish_omp_atomic): Likewise.
4904 2014-11-28 Marek Polacek <polacek@redhat.com>
4906 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4907 instead of unsigned_type_node.
4909 2014-11-28 Marek Polacek <polacek@redhat.com>
4912 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4914 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4915 expression to unsigned_type_node.
4917 2014-11-20 Mark Wielaard <mjw@redhat.com>
4920 * c-opts.c (set_std_c89): Set lang_hooks.name.
4921 (set_std_c99): Likewise.
4922 (set_std_c11): Likewise.
4923 (set_std_cxx98): Likewise.
4924 (set_std_cxx11): Likewise.
4925 (set_std_cxx14): Likewise.
4926 (set_std_cxx1z): Likewise.
4928 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4931 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4932 return type to bool.
4933 * c-common.c: Include gimple-expr.h.
4934 (convert_vector_to_pointer_for_subscript): Change return type to
4935 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4936 and copy it into a TARGET_EXPR and use that instead of *vecp
4939 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4941 Merger of git branch "gimple-classes-v2-option-3".
4942 * ChangeLog.gimple-classes: New.
4943 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4944 from being just a vec<gimple> to a vec<gbind *>.
4946 2014-11-18 Jakub Jelinek <jakub@redhat.com>
4949 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4950 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4951 get_pointer_alignment for non-pointers. Use ptype, or if it is
4952 reference type, corresponding pointer type, as type of kind
4954 (ubsan_maybe_instrument_reference,
4955 ubsan_maybe_instrument_member_call): Adjust callers.
4957 2014-11-15 Marek Polacek <polacek@redhat.com>
4960 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4962 (extract_array_notation_exprs): Return for NULL node.
4964 2014-11-12 Joseph Myers <joseph@codesourcery.com>
4966 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4967 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4969 2014-11-12 Jakub Jelinek <jakub@redhat.com>
4972 * c-common.c (check_builtin_function_arguments): Handle
4973 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4975 2014-11-10 Andi Kleen <ak@linux.intel.com>
4978 * c-common.h (check_no_cilk): Declare.
4979 * cilk.c (get_error_location): New function.
4980 (check_no_cilk): Dito.
4982 2014-11-10 Andi Kleen <ak@linux.intel.com>
4984 * cilk.c (recognize_spawn): Use expression location
4987 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4989 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4991 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4993 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4994 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4995 (__cpp_range_based_for, __cpp_initializer_lists,
4996 __cpp_delegating_constructors, __cpp_nsdmi,
4997 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4998 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4999 __has_cpp_attribute.
5000 * c-lex.c (cb_has_attribute): New callback CPP function;
5001 (init_c_lex): Set has_attribute callback.
5003 2014-11-04 Richard Biener <rguenther@suse.de>
5005 * c-common.c (shorten_compare): Do not shorten mixed
5006 DFP and non-DFP compares.
5008 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5010 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5011 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5012 Commentary and rearrangement of tests.
5013 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5014 Commentary and rearrangement of tests.
5015 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5016 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5018 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5020 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5021 enum from machine_mode.
5023 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5025 * c-common.c: Adjust include files.
5026 * c-gimplify.c: Ditto.
5028 * c-pragma.c: Ditto.
5031 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5033 * c-gimplify.c: Adjust include files.
5035 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5038 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5039 c_common_initialize_diagnostics.
5040 * c-common.h: Likewise.
5042 2014-10-24 Marek Polacek <polacek@redhat.com>
5045 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5046 print "struct"/"union"/"enum" for typedefed names.
5048 2014-10-23 Marek Polacek <polacek@redhat.com>
5050 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5053 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5054 Yury Gribov <y.gribov@samsung.com>
5056 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5057 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5058 instead of flag_sanitize_recover as bool flag.
5060 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5062 * cilk.c: Revert previous change.
5064 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5067 * cilk.c: Include vec.h.
5068 (struct cilk_decls): New structure.
5069 (wrapper_parm_cb): Split this function to...
5070 (fill_decls_vec): ...this...
5071 (create_parm_list): ...and this.
5072 (compare_decls): New function.
5073 (for_local_cb): Remove.
5074 (wrapper_local_cb): Ditto.
5075 (build_wrapper_type): For now first traverse and fill vector of
5076 declarations then sort it and then deal with sorted vector.
5077 (cilk_outline): Ditto.
5078 (declare_one_free_variable): Ditto.
5080 2014-10-17 Marek Polacek <polacek@redhat.com>
5082 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5083 * c.opt (Wimplicit-int): Initialize to -1.
5085 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5087 * c-pragma.c: Adjust include files.
5088 * c-semantics.c: Likewise.
5090 2014-10-16 DJ Delorie <dj@redhat.com>
5092 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5095 2014-10-14 Jason Merrill <jason@redhat.com>
5098 * c-common.h (CPP_PREPARSED_EXPR): New.
5099 (N_CP_TTYPES): Adjust.
5101 2014-10-15 Marek Polacek <polacek@redhat.com>
5103 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5105 2014-10-14 DJ Delorie <dj@redhat.com>
5107 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5108 types, not just __int128.
5109 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5110 types, not just __int128.
5111 (cpp_atomic_builtins): Round pointer sizes up.
5112 (type_suffix): Use type precision, not specific types.
5113 * c-common.c (c_common_reswords): Remove __int128 special case.
5114 (c_common_type_for_size): Check for all __intN types, not just
5116 (c_common_type_for_mode): Likewise.
5117 (c_common_signed_or_unsigned_type): Likewise.
5118 (c_build_bitfield_integer_type): Likewise.
5119 (c_common_nodes_and_builtins): Likewise.
5120 (keyword_begins_type_specifier): Likewise.
5121 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5124 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5126 * c-common.c: Use hash_table instead of hashtab.
5128 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5130 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5133 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5138 * c-common.c (warn_logical_operator): Punt for vectors.
5140 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5142 Implement SD-6: SG10 Feature Test Recommendations
5143 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5144 macros and the __has_header macro.
5146 2014-09-30 Jason Merrill <jason@redhat.com>
5148 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5149 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5150 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5152 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5153 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5155 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5156 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5158 2014-09-24 Marek Polacek <polacek@redhat.com>
5162 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5164 2014-09-23 Andi Kleen <ak@linux.intel.com>
5166 * c-common.c (handle_no_reorder_attribute): New function.
5167 (c_common_attribute_table): Add no_reorder attribute.
5169 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5171 * c-cppbuiltin.c (c_cpp_builtins): Define
5172 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5175 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5177 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5178 for supported floating-point modes.
5180 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5182 * c.opt (Wpsabi): Use LangEnabledBy.
5183 * c-opts.c (c_common_handle_option): Do not handle here.
5185 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5187 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5188 macros for floating-point modes.
5190 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5193 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5194 __*_DENORM_MIN__ without denormals.
5196 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5198 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5199 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5200 ubsan_create_data callers.
5201 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5202 index is constant or BIT_AND_EXPR with constant mask and is
5203 small enough for the bound.
5204 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5205 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5207 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5209 * c.opt: Add CppReason to various flags.
5210 (Wdate-time): Re-sort.
5211 * c-common.c: Include c-common.h earlier.
5212 (struct reason_option_codes_t): Delete.
5213 (c_option_controlling_cpp_error): Prefix global type and struct
5216 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5218 * c.opt (Wnormalized): New.
5219 (Wnormalized=): Use Enum and Reject Negative.
5220 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5222 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5224 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5225 digits of floating-point modes if -fbuilding-libgcc.
5227 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5229 * c-cppbuiltin.c (c_cpp_builtins): Also define
5230 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5231 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5232 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5233 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5234 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5235 __LIBGCC_STACK_GROWS_DOWNWARD__,
5236 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5237 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5238 __LIBGCC_DWARF_FRAME_REGISTERS__,
5239 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5240 __LIBGCC_STACK_POINTER_REGNUM__ and
5241 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5242 (builtin_define_with_value): Handle backslash-escaping in string
5245 2014-09-05 Richard Biener <rguenther@suse.de>
5248 * c-format.c (check_format_arg): Properly handle
5249 effectively signed POINTER_PLUS_EXPR offset.
5251 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5253 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5254 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5255 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5257 * c-opts.c (c_common_handle_option): Do not handle here.
5258 (sanitize_cpp_opts): Likewise.
5259 * c-common.c (struct reason_option_codes_t): Handle
5260 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5262 2014-09-03 Marek Polacek <polacek@redhat.com>
5264 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5266 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5267 Balaji V. Iyer <balaji.v.iyer@intel.com>
5268 Igor Zamyatin <igor.zamyatin@intel.com>
5270 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5271 * c-common.c (c_common_reswords): Added _Cilk_for.
5272 * c-common.h (enum rid): Added RID_CILK_FOR.
5273 (cilk_for_number_of_iterations): Add declaration.
5274 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5276 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5277 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5279 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5281 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5282 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5283 Wundef): Use CPP, Var and Init.
5284 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5286 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5288 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5289 * c-opts.c (c_common_handle_option): Do not handle here.
5291 2014-08-25 Jason Merrill <jason@redhat.com>
5293 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5294 -std=c++14 and -std=gnu++14, rather than the reverse.
5295 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5296 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5297 * c-common.h (cxx_dialect): Remove cxx1y.
5299 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5301 * c-common.h (enum cxx_dialect): Add cxx14.
5302 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5303 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5304 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5306 2014-08-22 Jason Merrill <jason@redhat.com>
5308 * c.opt (std=gnu++17): Fix alias.
5310 2014-08-22 Marek Polacek <polacek@redhat.com>
5313 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5314 check for vector types. Drop LHS argument.
5315 * c-common.h (warn_logical_not_parentheses): Adjust.
5317 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5319 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5320 (Wmultichar): Likewise.
5321 (Wdate-time): Use C-family languages instead of Common. Use CPP
5323 * c-opts.c (c_common_handle_option): Do not handle the above
5325 (sanitize_cpp_opts): Likewise.
5327 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5330 * c-opts.c: Include tree-diagnostics.h.
5331 (c_diagnostic_finalizer): New.
5332 (c_common_initialize_diagnostics): Use it.
5334 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5336 PR preprocessor/51303
5337 * c-common.c (struct reason_option_codes_t option_codes):
5338 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5340 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5344 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5345 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5346 (c_common_post_options): Call init_global_opts_from_cpp.
5347 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5349 2014-08-19 Marek Polacek <polacek@redhat.com>
5352 * c-common.c (maybe_warn_bool_compare): New function.
5353 * c-common.h (maybe_warn_bool_compare): Declare.
5354 * c.opt (Wbool-compare): New option.
5356 2014-08-19 Marek Polacek <polacek@redhat.com>
5358 * c.opt (Wc99-c11-compat): New option.
5360 2014-08-19 Marek Polacek <polacek@redhat.com>
5362 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5363 to warn_c90_c99_compat.
5364 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5367 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5368 Steven Bosscher <steven@gcc.gnu.org>
5371 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5372 format_check_results.
5373 (check_function_format): Use true and add comment for boolean
5375 (finish_dollar_format_checking): Use explicit location when warning.
5376 (check_format_info): Likewise.
5377 (check_format_arg): Set extra_arg_loc and format_string_loc.
5378 (check_format_info_main): Use explicit location when warning.
5379 (check_format_types): Pass explicit location.
5380 (format_type_warning): Likewise.
5382 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5385 * c-format.c: Handle Fortran flags.
5387 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5390 * array-notation-common.c (find_rank): Added handling for other
5391 types of references.
5393 2014-08-10 Marek Polacek <polacek@redhat.com>
5396 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5397 * c.opt (Wc90-c99-compat): Add option.
5399 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5401 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5403 2014-08-03 Marek Polacek <polacek@redhat.com>
5405 * c-common.c (check_case_value): Add location_t parameter. Use it.
5406 (c_add_case_label): Pass loc to check_case_value.
5408 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5410 * cilk.c: Use hash_map instead of pointer_map.
5412 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5414 * c-gimplify.c: Use hash_set instead of pointer_set.
5416 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5419 * array-notation-common.c (extract_array_notation_exprs): Handling
5422 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5424 * c-common.h (min_align_of_type): Removed prototype.
5425 * c-common.c (min_align_of_type): Removed.
5426 * c-ubsan.h (ubsan_maybe_instrument_reference,
5427 ubsan_maybe_instrument_member_call): New prototypes.
5428 * c-ubsan.c: Include stor-layout.h and builtins.h.
5429 (ubsan_maybe_instrument_reference_or_call,
5430 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5433 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5436 * c.opt (-Wreturn-local-addr): Move to common.opt.
5438 2014-07-30 Jason Merrill <jason@redhat.com>
5443 * c.opt (-fuse-all-virtuals): New.
5445 2014-07-30 Tom Tromey <tromey@redhat.com>
5448 * c.opt (Wdesignated-init): New option.
5449 * c-common.c (c_common_attribute_table): Add "designated_init".
5450 (handle_designated_init): New function.
5452 2014-07-24 Marek Polacek <polacek@redhat.com>
5455 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5457 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5459 PR preprocessor/60723 - missing system-ness marks for macro tokens
5460 * c-ppoutput.c (struct print::prev_was_system_token): New data
5462 (init_pp_output): Initialize it.
5463 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5464 (do_line_change): Return a flag saying if a line marker was
5466 (scan_translation_unit): Detect if the system-ness of the token we
5467 are about to emit is different from the one of the previously
5468 emitted token. If so, emit a line marker. Avoid emitting useless
5469 adjacent line markers. Avoid emitting line markers for tokens
5470 originating from the expansion of built-in macros.
5471 (scan_translation_unit_directives_only): Adjust.
5473 2014-07-15 Marek Polacek <polacek@redhat.com>
5475 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5476 TYPE_MAX_VALUE is NULL.
5478 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5481 * c.opt (Wmemset-transposed-args): New warning.
5483 2014-07-10 Jason Merrill <jason@redhat.com>
5487 * c.opt (-fuse-all-virtuals): New.
5489 2014-07-09 Richard Biener <rguenther@suse.de>
5492 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5493 using unsigned arithmetic if overflow does not wrap instead of
5494 if overflow is undefined.
5496 2014-07-06 Marek Polacek <polacek@redhat.com>
5499 * c.opt (Wsizeof-array-argument): New option.
5501 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5503 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5504 comments->count <= 1, as comments->entries might be NULL.
5506 2014-07-01 Marek Polacek <polacek@redhat.com>
5508 * c.opt (Wint-conversion): New option.
5510 2014-07-01 Marek Polacek <polacek@redhat.com>
5513 * c.opt (Wincompatible-pointer-types): New option.
5515 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5518 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5519 Do not discard TYPE_QUALS of type.
5521 2014-06-26 Jason Merrill <jason@redhat.com>
5523 * c-common.h (enum cxx_dialect): Add cxx1z.
5524 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5525 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5527 2014-06-26 Teresa Johnson <tejohnson@google.com>
5529 * c-common.h (get_dump_info): Declare.
5530 * c-gimplify.c (c_genericize): Use saved dump files.
5531 * c-opts.c (c_common_parse_file): Begin and end dumps
5532 once around parsing invocation.
5533 (get_dump_info): New function.
5535 2014-06-23 Marek Polacek <polacek@redhat.com>
5536 Andrew MacLeod <amacleod@redhat.com>
5539 * c-common.c (get_atomic_generic_size): Don't segfault if the
5540 type doesn't have a size.
5542 2014-06-20 Marek Polacek <polacek@redhat.com>
5544 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5545 (ubsan_walk_array_refs_r): New function.
5546 (c_genericize): Instrument array bounds.
5547 * c-ubsan.c: Include "internal-fn.h".
5548 (ubsan_instrument_division): Mark instrumented arrays as having
5549 side effects. Adjust ubsan_type_descriptor call.
5550 (ubsan_instrument_shift): Likewise.
5551 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5552 (ubsan_instrument_bounds): New function.
5553 (ubsan_array_ref_instrumented_p): New function.
5554 (ubsan_maybe_instrument_array_ref): New function.
5555 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5556 (ubsan_array_ref_instrumented_p): Declare.
5557 (ubsan_maybe_instrument_array_ref): Declare.
5559 2014-06-20 Hale Wang <hale.wang@arm.com>
5562 * c.opt (fshort-enums): Add to LTO.
5563 * c.opt (fshort-wchar): Likewise.
5565 2014-06-16 Marek Polacek <polacek@redhat.com>
5568 * c.opt (Wswitch-bool): Add Var.
5570 2014-06-12 Jakub Jelinek <jakub@redhat.com>
5573 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5574 #pragma omp target teams or
5575 #pragma omp {,target }teams distribute simd.
5577 2014-06-12 Jason Merrill <jason@redhat.com>
5579 * c.opt (Wabi=, fabi-compat-version): New.
5580 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5581 (c_common_post_options): Handle flag_abi_compat_version default.
5582 Disallow -fabi-compat-version=1.
5583 * c-common.h (abi_version_crosses): New.
5585 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
5587 * c-common.c (handle_section_attribute): Update handling for
5588 section names that are no longer trees.
5590 2014-06-10 Jakub Jelinek <jakub@redhat.com>
5593 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5594 (omp_pragmas): ... back here.
5596 2014-06-05 Marek Polacek <polacek@redhat.com>
5599 * c-common.c (warn_logical_not_parentheses): New function.
5600 * c-common.h (warn_logical_not_parentheses): Declare.
5601 * c.opt (Wlogical-not-parentheses): New option.
5603 2014-06-04 Marek Polacek <polacek@redhat.com>
5606 * c-common.c (check_case_bounds): Add location parameter.
5608 (c_add_case_label): Pass loc to check_case_bounds.
5610 2014-06-03 Marek Polacek <polacek@redhat.com>
5613 * c.opt (Wswitch-bool): New option.
5615 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5617 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5619 (record_types_used_by_current_var_decl): Move prototype to where
5622 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5623 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5624 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5626 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5628 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5629 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5631 * c-pretty-print.c (pp_c_void_constant): New function.
5632 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5633 (c_pretty_printer::expression): Handle VOID_CST.
5634 * cilk.c (extract_free_variables): Likewise.
5635 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5636 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5638 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5640 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5641 * c-pragma.c (push_alignment): Adjust.
5642 (handle_pragma_push_options): Likewise.
5644 2014-05-09 Marek Polacek <polacek@redhat.com>
5647 * c-common.c (check_user_alignment): Return -1 if alignment is error
5649 (handle_aligned_attribute): Don't call default_conversion on
5651 (handle_vector_size_attribute): Likewise.
5652 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5653 (handle_sentinel_attribute): Call default_conversion and allow even
5654 integral types as an argument.
5656 2014-05-08 Marek Polacek <polacek@redhat.com>
5659 * c-common.c (min_align_of_type): New function factored out from...
5660 (c_sizeof_or_alignof_type): ...here.
5661 * c-common.h (min_align_of_type): Declare.
5663 2014-05-08 Marek Polacek <polacek@redhat.com>
5666 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5667 parameter type of main.
5669 2014-05-07 DJ Delorie <dj@redhat.com>
5671 * c-cppbuiltin.c (print_bits_of_hex): New.
5672 (builtin_define_type_minmax): Print values using hex so as not to
5673 require a pre-computed list of string values.
5675 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5676 Mike Stump <mikestump@comcast.net>
5677 Richard Sandiford <rdsandiford@googlemail.com>
5679 * c-ada-spec.c: Include wide-int.h.
5680 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5681 (dump_generic_ada_node): Use wide-int interfaces.
5682 * c-common.c: Include wide-int-print.h.
5683 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5684 (pointer_int_sum): Use wide-int interfaces.
5685 (c_common_nodes_and_builtins): Use make_int_cst.
5686 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5687 (handle_alloc_size_attribute): Use wide-int interfaces.
5688 (get_nonnull_operand): Likewise.
5689 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5690 * c-lex.c: Include wide-int.h.
5691 (narrowest_unsigned_type): Take a widest_int rather than two
5693 (narrowest_signed_type): Likewise.
5694 (interpret_integer): Update accordingly. Use wide-int interfaces.
5695 (lex_charconst): Use wide-int interfaces.
5696 * c-pretty-print.c: Include wide-int.h.
5697 (pp_c_integer_constant): Use wide-int interfaces.
5698 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5699 INT_CST_LT_UNSIGNED.
5701 2014-05-06 Richard Biener <rguenther@suse.de>
5703 * c-opts.c (c_common_post_options): For -freestanding,
5704 -fno-hosted and -fno-builtin disable pattern recognition
5705 if not enabled explicitely.
5707 2014-05-02 Marek Polacek <polacek@redhat.com>
5709 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5711 2014-05-01 Marek Polacek <polacek@redhat.com>
5714 * c.opt (Wdiscarded-qualifiers): Add.
5716 2014-04-30 Marek Polacek <polacek@redhat.com>
5718 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5719 INT_MIN / -1 sanitization only for integer types.
5721 2014-04-25 Marek Polacek <polacek@redhat.com>
5724 * c-common.c (handle_noinline_attribute): Warn if the attribute
5725 conflicts with always_inline attribute.
5726 (handle_always_inline_attribute): Warn if the attribute conflicts
5727 with noinline attribute.
5729 2014-04-25 Marek Polacek <polacek@redhat.com>
5732 * c-common.c (check_main_parameter_types): Warn about variadic main.
5734 2014-04-24 Mike Stump <mikestump@comcast.net>
5736 * c.opt (Wshadow-ivar): Default to on.
5738 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5740 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5742 2014-04-23 Marek Polacek <polacek@redhat.com>
5744 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5746 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5749 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5750 if flag_sanitize_undefined_trap_on_error.
5751 (ubsan_instrument_division, ubsan_instrument_shift,
5752 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5753 if !flag_sanitize_recover.
5755 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
5758 * c-common.c (registered_builtin_types): Make non-static.
5759 * c-common.h (registered_builtin_types): Declare.
5761 2014-04-14 Richard Biener <rguenther@suse.de>
5762 Marc Glisse <marc.glisse@inria.fr>
5765 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5766 apply may-alias the scalar pointer type when applicable.
5768 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5771 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5772 as possible argument for Cilk_spawn.
5774 2014-04-11 Tobias Burnus <burnus@net-b.de>
5777 * c.opt (Wformat-signedness): Add
5778 * c-format.c(check_format_types): Use it.
5780 2014-04-11 Jason Merrill <jason@redhat.com>
5783 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5784 default_conversion for an array argument.
5786 2014-04-08 Marek Polacek <polacek@redhat.com>
5789 * c-ubsan.c: Include asan.h.
5790 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5792 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5794 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5796 2014-04-02 Marek Polacek <polacek@redhat.com>
5798 * c-common.h (c_expand_expr): Remove declaration.
5800 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5803 * c-common.c (add_atomic_size_parameter): When creating new
5804 params vector, push the size argument first.
5806 2014-03-26 Jakub Jelinek <jakub@redhat.com>
5808 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5809 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5810 ubsan_create_data callers.
5812 2014-03-22 Jakub Jelinek <jakub@redhat.com>
5815 * c-opts.c (c_finish_options): Restore cb_file_change call to
5818 2014-03-13 Jakub Jelinek <jakub@redhat.com>
5821 * c-pragma.c (apply_pragma_weak): Only look at
5822 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5823 DECL_ASSEMBLER_NAME_SET_P (decl).
5824 (maybe_apply_pending_pragma_weaks): Exit early if
5825 vec_safe_is_empty (pending_weaks) rather than only when
5827 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5828 set assembler name back to NULL afterwards.
5830 2014-03-11 Jason Merrill <jason@redhat.com>
5832 * c.opt: Add -std=gnu++14.
5834 2014-03-11 Ian Bolton <ian.bolton@arm.com>
5836 * c-opts.c (c_common_post_options): Don't override
5837 -ffp-contract=fast if unsafe-math-optimizations is on.
5839 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
5841 * c.opt: Enable LTO FE for fshort-double.
5843 2014-03-07 Jason Merrill <jason@redhat.com>
5845 * c.opt: Add -std=c++14.
5847 2014-03-06 Marek Polacek <polacek@redhat.com>
5850 * cilk.c (contains_cilk_spawn_stmt): New function.
5851 (contains_cilk_spawn_stmt_walker): Likewise.
5852 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5853 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5855 2014-03-03 Jakub Jelinek <jakub@redhat.com>
5857 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5858 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5859 even when flag_preprocess_only.
5861 2014-02-26 Jason Merrill <jason@redhat.com>
5865 * c-common.c (shorten_compare): Don't check
5866 c_inhibit_evaluation_warnings.
5868 2014-02-19 Jakub Jelinek <jakub@redhat.com>
5871 * c-common.c (c_common_nodes_and_builtins): When initializing
5872 c_uint{16,32,64}_type_node, also set corresponding
5873 uint{16,32,64}_type_node to the same value.
5876 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5877 for PRAGMA_IVDEP if flag_preprocess_only.
5879 2014-02-12 Jakub Jelinek <jakub@redhat.com>
5882 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5883 if false, add ADD itself, rather than vice versa.
5884 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5885 copy. For SAVE_EXPR, only call merge_tlist once.
5887 2014-02-08 Jakub Jelinek <jakub@redhat.com>
5890 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5892 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5894 (c_common_attribute_table): Add alloc_align and assume_aligned
5897 2014-02-06 Marek Polacek <polacek@redhat.com>
5900 * c-common.c (warn_for_sign_compare): Call warning_at with location
5903 2014-02-05 Marek Polacek <polacek@redhat.com>
5906 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5909 2014-02-04 Marek Polacek <polacek@redhat.com>
5912 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5915 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
5919 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5920 handle_vector_size_attribute, handle_nonnull_attribute): Call
5921 default_conversion on the attribute argument.
5922 (handle_nonnull_attribute): Increment the argument number.
5924 2014-01-31 Marek Polacek <polacek@redhat.com>
5927 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5928 build_function_call_vec.
5929 (resolve_overloaded_builtin): Likewise.
5930 * c-common.h (build_function_call_vec): Adjust declaration.
5932 2014-01-30 Marek Polacek <polacek@redhat.com>
5935 * c-common.h (unsafe_conversion_p): Adjust declaration.
5936 (warnings_for_convert_and_check): Likewise.
5937 (convert_and_check): Likewise.
5938 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5939 expansion_point_location_if_in_system_header on it.
5940 (warnings_for_convert_and_check): Add location parameter. Call
5941 expansion_point_location_if_in_system_header on it. Use it.
5942 (convert_and_check): Add location parameter. Use it.
5943 (conversion_warning): Likewise.
5944 (c_add_case_label): Adjust convert_and_check calls.
5945 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5947 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5949 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5951 * c-pragma.c (init_pragma): Likewise.
5954 2014-01-23 Marek Polacek <polacek@redhat.com>
5957 * c-common.c (shorten_compare): Add location_t parameter.
5958 * c-common.h (shorten_binary_op): Adjust declaration.
5960 2014-01-23 Marek Polacek <polacek@redhat.com>
5963 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5964 * c-common.h: Declare it.
5966 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5968 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5969 * c-ada-spec.c (dump_ads): Likewise.
5970 (cpp_check): Likewise.
5971 (dump_ada_specs): Likewise.
5973 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
5976 * c-common.c (handle_no_instrument_function_attribute): Allow
5977 no_instrument_function attribute in class member
5978 definition/declaration.
5980 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5983 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5984 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5985 being COMPOUND_EXPR.
5986 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5987 operand a SAVE_EXPR and second MODIFY_EXPR.
5989 2014-01-09 Jakub Jelinek <jakub@redhat.com>
5992 * c-pch.c (c_common_write_pch): Call
5993 prepare_target_option_nodes_for_pch.
5995 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5997 Update copyright years
5999 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6001 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6002 the copyright notice.
6004 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6006 * c-ada-spec.c (print_constructor): New function.
6007 (print_destructor): Retrieve the origin of the destructor.
6008 (print_ada_declaration): Revamp handling of constructors/destructors.
6010 2013-12-23 Stuart Hastings <stuart@apple.com>
6011 Bill Maddox <maddox@google.com>
6012 Jason Merrill <jason@redhat.com>
6014 * c.opt: Add -fdeclone-ctor-dtor.
6015 * c-opts.c (c_common_post_options): Default to on iff -Os.
6017 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6019 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6021 * c-pragma.h (enum pragma_cilk_clause): Remove.
6022 (enum pragma_omp_clause): Added the following fields:
6023 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6024 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6025 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6026 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6027 PRAGMA_CILK_CLAUSE_UNIFORM.
6030 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6032 * cilk.c (cilk_outline): Made this function non-static.
6033 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6034 (create_cilk_wrapper): Added a new parameter: a function pointer.
6035 (c_install_body_w_frame_cleanup): Remove
6036 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6037 * c-common.h (cilk_outline): New prototype.
6038 (gimplify_cilk_spawn): Removed two parameters.
6039 (cilk_install_body_with_frame_cleanup): New prototype.
6040 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6041 CILK_SPAWN_STMT case.
6043 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6045 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6047 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6048 (int_array_type_node): Remove.
6049 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6051 2013-12-05 Marek Polacek <polacek@redhat.com>
6054 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6055 [ADJUST_FIELD_ALIGN].
6057 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6060 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6061 and check field alignment if set.
6062 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6063 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6065 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6066 Marek Polacek <polacek@redhat.com>
6068 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6069 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6071 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6074 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6077 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6080 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6081 goto invalid. If it is error_mark_node, don't issue further
6084 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6086 * c.opt (Wopenmp-simd): New.
6088 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6090 * c-ubsan.h (ubsan_instrument_return): New prototype.
6091 * c-ubsan.c (ubsan_instrument_return): New function.
6093 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6095 * c-common.c: Add required include files from gimple.h.
6096 * c-gimplify.c: Likewise
6099 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6101 * c-common.c (unsafe_conversion_p): Remove use of
6102 EXPR_LOC_OR_HERE macro.
6103 (conversion_warning): Likewise.
6104 (warnings_for_convert_and_check): Likewise.
6105 (warn_for_collisions_1): Likewise.
6106 (shorten_compare): Likewise, and remove use of in_system_header
6107 macro, using the location from the former.
6108 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6109 (cb_def_pragma): Remove use of in_system_header macro.
6110 (lex_string): Likewise.
6111 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6113 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6114 Mike Stump <mikestump@comcast.net>
6115 Richard Sandiford <rdsandiford@googlemail.com>
6117 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6118 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6119 tree_fits_shwi_p or tree_fits_uhwi_p.
6120 (dump_generic_ada_node): Likewise.
6121 * c-format.c (check_format_arg): Likewise.
6122 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6124 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6126 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6128 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6131 * c-common.c (unsafe_conversion_p): Make this function
6132 return an enumeration with more detail.
6133 (conversion_warning): Use the new return type of
6134 unsafe_conversion_p to separately warn either about conversions
6135 that lower floating point number precision or about the other
6136 kinds of conversions.
6137 * c-common.h (enum conversion_safety): New enumeration.
6138 (unsafe_conversion_p): switching return type to
6139 conversion_safety enumeration.
6140 * c.opt: Adding new warning -Wfloat-conversion and
6141 enabling it with -Wconversion.
6143 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6145 * c-opts.c: Include plugin.h.
6146 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6148 2013-11-19 Marek Polacek <polacek@redhat.com>
6150 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6152 (ubsan_instrument_shift): Likewise.
6153 (ubsan_instrument_vla): Likewise.
6155 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6157 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6158 cast to unsigned type.
6160 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6162 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6164 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6165 rather than tree_low_cst.
6167 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6169 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6170 tree_to_uhwi throughout.
6172 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6174 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6175 tree_low_cst (..., 0) with tree_to_shwi throughout.
6177 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6179 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6180 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6182 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6184 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6185 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6187 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6189 * c-cilkplus.c: New file.
6190 * c-common.c (readonly_error): Add location argument.
6191 * c-common.h (readonly_error): Same.
6192 (c_finish_cilk_clauses): Protoize.
6193 (c_check_cilk_loop): Same.
6194 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6195 Do not fail on error_mark_node.
6196 Abstract increment canonicalization to here...
6197 (c_omp_for_incr_canonicalize_ptr): New.
6198 c-pragma.c (init_pragma): Register "simd" pragma.
6199 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6200 (enum pragma_cilk_clause): New.
6202 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6204 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6205 wchar_type and host_integerp checks.
6207 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6209 * c-common.c: Likewise.
6210 * c-gimplify.c: Likewise.
6213 2013-11-14 Diego Novillo <dnovillo@google.com>
6215 * c-common.c: Include fold-const.h.
6216 Include stor-layout.h.
6218 Include stringpool.h.
6221 Include trans-mem.h.
6222 * c-cppbuiltin.c: Include stor-layout.h.
6223 Include stringpool.h.
6224 * c-format.c: Include stringpool.h.
6225 * c-lex.c: Include stringpool.h.
6226 Include stor-layout.h.
6227 * c-pragma.c: Include stringpool.h.
6230 Include gcc-symtab.h.
6231 * c-pretty-print.c: Include stor-layout.h.
6233 * cilk.c: Include stringpool.h.
6236 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6238 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6239 * c-common.c (c_common_reswords): Add __auto_type.
6240 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6242 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6244 * c-common.c: Include gimplify.h.
6245 * c-gimplify.c: Likewise.
6247 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6248 * c-ubsan.c: Don't include gimple.h.
6250 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6252 * c-common.c (c_common_reswords): Add _Thread_local.
6254 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6256 * c-common.c (atomic_size_supported_p): New function.
6257 (resolve_overloaded_atomic_exchange)
6258 (resolve_overloaded_atomic_compare_exchange)
6259 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6260 Use it instead of comparing size with a local list of sizes.
6262 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6263 Joseph Myers <joseph@codesourcery.com>
6265 * c-common.h (enum rid): Add RID_ATOMIC.
6266 * c-common.c (c_common_reswords): Add _Atomic.
6267 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6268 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6269 * c-format.c (check_format_types): Check for extra _Atomic
6270 qualifiers in format argument.
6271 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6272 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6274 2013-11-06 Tobias Burnus <burnus@net-b.de>
6276 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6278 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6280 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6282 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6283 to mean lack of IEEE 754 support.
6285 2013-11-05 Tobias Burnus <burnus@net-b.de>
6287 * c.opt (-Wdate-time): New option
6288 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6290 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6292 * c-cppbuiltin.c (cpp_iec_559_value): Test
6293 flag_excess_precision_cmdline not flag_excess_precision.
6295 2013-11-05 Tobias Burnus <burnus@net-b.de>
6297 * c.opt (fopenmp-simd): New option.
6298 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6299 (omp_pragmas): ... this new struct.
6300 (c_pp_lookup_pragma): Also walk omp_pragmas.
6301 (init_pragma): Init pragmas for -fopenmp-simd.
6303 2013-11-04 Marek Polacek <polacek@redhat.com>
6306 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6308 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6310 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6312 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6314 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6316 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6317 (dump_ada_specs): Adjust prototype of second callback.
6318 * c-ada-spec.c (cpp_check): New global variable.
6319 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6320 (print_generic_ada_decl): Likewise.
6321 (has_static_fields): Change return type to bool and add guard.
6322 (has_nontrivial_methods): New predicate.
6323 (is_tagged_type): Change return type to bool.
6324 (separate_class_package): Call has_nontrivial_methods.
6325 (pp_ada_tree_identifier): Minor tweaks.
6326 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6327 (dump_ada_array_domains): Likewise.
6328 (dump_ada_array_type): Likewise.
6329 (dump_template_types): Remove cpp_check parameter and do not pass it to
6330 dump_generic_ada_node.
6331 (dump_ada_template): Likewise.
6332 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6334 (print_ada_methods): Change return type to integer. Remove cpp_check
6335 parameter and do not pass it down.
6336 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6337 dump_generic_ada_node.
6338 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6340 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6341 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6342 value of print_ada_methods.
6343 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6344 Set cpp_check to it before invoking dump_ada_nodes.
6345 (dump_ada_specs): Likewise.
6347 2013-11-03 Marek Polacek <polacek@redhat.com>
6349 * c-ubsan.c: Don't include hash-table.h.
6350 (ubsan_instrument_vla): New function.
6351 * c-ubsan.h: Declare it.
6353 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6355 Automated part of renaming of symtab_node_base to symtab_node.
6357 Patch autogenerated by rename_symtab.py from
6358 https://github.com/davidmalcolm/gcc-refactoring-scripts
6359 revision 58bb219cc090b2f4516a9297d868c245495ee622
6361 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6362 symtab_node_base to symtab_node.
6364 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6366 Implement C++14 digit separators.
6367 * c-lex.c (interpret_float): Remove digit separators from scratch string
6368 before building real literal.
6370 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6372 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6374 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6376 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6378 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6380 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6381 (insert_cilk_frame): New prototype.
6382 (cilk_init_builtins): Likewise.
6383 (gimplify_cilk_spawn): Likewise.
6384 (c_cilk_install_body_w_frame_cleanup): Likewise.
6385 (cilk_detect_spawn_and_unwrap): Likewise.
6386 (cilk_set_spawn_marker): Likewise.
6387 (build_cilk_sync): Likewise.
6388 (build_cilk_spawn): Likewise.
6391 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6393 Patch autogenerated by refactor_symtab.py from
6394 https://github.com/davidmalcolm/gcc-refactoring-scripts
6395 revision 58bb219cc090b2f4516a9297d868c245495ee622
6397 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6398 to a true class hierarchy.
6399 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6401 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6403 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6405 2013-10-26 Jeff Law <law@redhat.com>
6407 * c-common.c (c_define_builtins): Remove mudflap support.
6408 * c.opt: Ignore and warn for mudflap options.
6410 2013-10-24 Tobias Burnus <burnus@net-b.de>
6413 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6414 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6416 2013-10-23 Jason Merrill <jason@redhat.com>
6418 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6420 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6422 * c-common.h (omp_clause_mask::operator !=): New method.
6423 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6424 instead of if (mask & something) tests everywhere.
6426 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6427 201307 instead of 201107.
6428 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6429 (c_common_attribute_table): Add "omp declare target" and
6430 "omp declare simd" attributes.
6431 (handle_omp_declare_target_attribute,
6432 handle_omp_declare_simd_attribute): New functions.
6433 * c-omp.c: Include c-pragma.h.
6434 (c_finish_omp_taskgroup): New function.
6435 (c_finish_omp_atomic): Add swapped argument, if true,
6436 build the operation first with rhs, lhs arguments and use NOP_EXPR
6438 (c_finish_omp_for): Add code argument, pass it down to make_code.
6439 (c_omp_split_clauses): New function.
6440 (c_split_parallel_clauses): Removed.
6441 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6442 c_omp_declare_simd_clauses_to_decls): New functions.
6443 * c-common.h (omp_clause_mask): New type.
6444 (OMP_CLAUSE_MASK_1): Define.
6445 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6446 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6447 omp_clause_mask::operator |, omp_clause_mask::operator &,
6448 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6449 omp_clause_mask::operator ==): New methods.
6450 (enum c_omp_clause_split): New.
6451 (c_finish_omp_taskgroup): New prototype.
6452 (c_finish_omp_atomic): Add swapped argument.
6453 (c_finish_omp_for): Add code argument.
6454 (c_omp_split_clauses): New prototype.
6455 (c_split_parallel_clauses): Removed.
6456 (c_omp_declare_simd_clauses_to_numbers,
6457 c_omp_declare_simd_clauses_to_decls): New prototypes.
6458 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6459 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6460 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6461 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6462 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6463 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6464 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6465 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6466 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6467 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6468 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6469 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6470 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6471 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6472 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6473 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6474 PRAGMA_OMP_CLAUSE_UNIFORM.
6476 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6478 PR tree-optimization/20318
6479 * c-common.c (handle_returns_nonnull_attribute): New function.
6480 (c_common_attribute_table): Add returns_nonnull.
6482 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6485 * c.opt (fcheck-new): Move to common.opt.
6487 2013-09-25 Marek Polacek <polacek@redhat.com>
6488 Jakub Jelinek <jakub@redhat.com>
6491 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6492 an expression if we can prove it is correct.
6493 (ubsan_instrument_division): Likewise. Remove unnecessary
6496 2013-09-18 Marek Polacek <polacek@redhat.com>
6499 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6501 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6503 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6506 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6507 fobjc-gc, freplace-objc-classes): Accept for LTO.
6509 2013-09-13 Jacek Caban <jacek@codeweavers.com>
6511 * c-target.def: New hook
6513 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6516 * c.opt (Wdelete-incomplete): Add.
6518 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6520 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6521 (vector_types_compatible_elements_p): New function.
6522 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6524 (vector_types_compatible_elements_p): Declare.
6526 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6528 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6529 a virtual member function.
6530 (pp_simple_type_specifier): Remove.
6531 (pp_c_type_specifier): Likewise.
6532 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6533 Rename from pp_c_type_specifier. Adjust.
6534 (c_pretty_printer::c_pretty_printer): Do not assign to
6535 simple_type_specifier.
6537 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6539 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6541 (c_pretty_printer::storage_class_specifier): Likewise.
6542 (c_pretty_printer::initializer): Likewise.
6543 (pp_declaration): Remove.
6544 (pp_declaration_specifiers): Likewise.
6545 (pp_abstract_declarator): Likewise.
6546 (pp_declarator): Likewise.
6547 (pp_type_id): Likewise.
6548 (pp_statement): Likewise.
6549 (pp_constant): Likewise.
6550 (pp_id_expression): Likewise.
6551 (pp_primary_expression): Likewise.
6552 (pp_unary_expression): Likewise.
6553 (pp_multiplicative_expression): Likewise.
6554 (pp_conditional_expression): Likewise.
6555 (pp_assignment_expression): Likewise.
6556 (pp_expression): Likewise.
6557 (pp_c_type_id): Likewise.
6558 (pp_c_storage_class_specifier): Likewise.
6559 * c-pretty-print.c (pp_c_type_cast): Tidy.
6560 (pp_c_pointer): Likewise.
6561 (pp_c_type_specifier): Likewise.
6562 (pp_c_parameter_type_list): Likewise.
6563 (pp_c_function_definition): Likewise.
6564 (pp_c_init_declarator): Likewise.
6565 (pp_c_initializer_list): Likewise.
6566 (pp_c_constructor_elts): Likewise.
6567 (c_pretty_printer::direct_abstract_declarator): Likewise.
6568 (c_pretty_printer::declaration_specifiers): Likewise.
6569 (c_pretty_printer::primary_expression): Likewise.
6570 (c_pretty_printer::postfix_expression): Likewise.
6571 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6572 (c_pretty_printer::storage_class_specifier): Rename from
6573 pp_c_storage_class_specifier.
6574 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6575 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6576 storage_class_specifier, initializer, offset_list, flags.
6578 2013-08-30 Marek Polacek <polacek@redhat.com>
6580 * c-ubsan.c: New file.
6581 * c-ubsan.h: New file.
6583 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6585 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6587 (c_pretty_printer::declaration_specifiers): Likewise.
6588 (c_pretty_printer::declarator): Likewise.
6589 (c_pretty_printer::abstract_declarator): Likewise.
6590 (c_pretty_printer::direct_abstract_declarator): Likewise.
6591 (c_pretty_printer::direct_declarator): Likewise.
6592 (c_pretty_printer::function_specifier): Likewise.
6593 (pp_declaration): Adjust.
6594 (pp_declaration_specifiers): Likewise.
6595 (pp_abstract_declarator): Likewise.
6596 (pp_direct_declarator): Likewise.
6597 (pp_function_specifier): Likewise.
6598 (pp_direct_abstract_declarator): Remove as unused.
6599 (pp_c_declaration): Remove.
6600 (pp_c_declaration_specifiers): Likewise.
6601 (pp_c_declarator): Likewise.
6602 (pp_c_direct_declarator): Likewise.
6603 (pp_c_function_specifier): Likewise.
6604 (pp_c_direct_abstract_declarator): Likewise.
6605 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6606 from pp_c_abstract_declarator. Adjust.
6607 (c_pretty_printer::direct_abstract_declarator): Rename from
6608 pp_c_direct_abstract_declarator. Adjust.
6609 (c_pretty_printer::function_specifier): Rename from
6610 pp_c_function_specifier. Adjust.
6611 (c_pretty_printer::declaration_specifiers): Rename from
6612 pp_c_declaration_specifiers. Adjust.
6613 (c_pretty_printer::direct_declarator): Rename from
6614 pp_c_direct_declarator. Adjust.
6615 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6616 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6617 (c_pretty_printer::c_pretty_printer): Do not assign to
6618 declaration, declaration_specifiers, declarator,
6619 direct_declarator, direct_abstract_declarator, function_specifier.
6621 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6623 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6624 virtual member function.
6625 (c_pretty_printer::multiplicative_expression): Likewise.
6626 (c_pretty_printer::conditional_expression): Likewise.
6627 (c_pretty_printer::assignment_expression): Likewise.
6628 (c_pretty_printer::expression): Likewise.
6629 (pp_unary_expression): Adjust.
6630 (pp_multiplicative_expression): Likewise.
6631 (pp_assignment_expression): Likewise.
6632 (pp_conditional_expression): Likewise.
6633 (pp_expression): Likewise.
6634 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6635 from pp_c_unary_expression. Adjust.
6636 (c_pretty_printer::multiplicative_expression): Rename from
6637 pp_c_multiplicative_expression. Adjust.
6638 (c_pretty_printer::conditional_expression): Rename from
6639 pp_c_conditional_expression. Adjust.
6640 (c_pretty_printer::assignment_expression): Rename from
6641 pp_c_assignment_expression. Adjust.
6642 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6643 (c_pretty_printer::c_pretty_printer): Do not assign to
6644 unary_expression, multiplicative_expression,
6645 conditional_expression, expression.
6647 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6649 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6650 virtual member function.
6651 (pp_postfix_expression): Adjust.
6652 (pp_c_postfix_expression): Remove.
6653 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6654 from pp_c_postfix_expression. Adjust.
6655 (c_pretty_printer::c_pretty_printer): Do not assign to
6658 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6660 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6661 virtua member function.
6662 (pp_primary_expression): Adjust.
6663 (pp_c_primary_expression): Remove.
6664 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6665 from pp_c_primary_expression. Adjust.
6666 (pp_c_initializer_list): Use pp_primary_expression.
6667 (c_pretty_printer::c_pretty_printer): Do not assign to
6670 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6672 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6673 * c-pretty-print.c (M_): Remove.
6674 (c_pretty_printer::translate_string): Define.
6675 (pp_c_type_specifier): Use it.
6676 (pp_c_primary_expression): Likewise.
6677 (pp_c_expression): Likewise.
6679 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6681 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6683 (pp_c_id_expression): Remove.
6684 (pp_id_expression): Adjust.
6685 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6686 pp_c_id_expression. Adjust.
6687 (pp_c_postfix_expression): Use pp_id_expression.
6688 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6690 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6692 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6694 (pp_constant): Adjust.
6695 (pp_c_constant): Remove.
6696 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6697 pp_c_constant. Adjust.
6699 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6700 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6702 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6704 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6705 (c_pretty_printer::c_pretty_printer): Declare.
6706 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6707 c_pretty_printer_init. Adjust.
6708 (print_c_tree): Do not call c_pretty_printer_init.
6709 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6711 2013-08-09 Arnaud Charlet <charlet@adacore.com>
6713 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6715 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6718 * c-common.c (pointer_int_sum): Add bool parameter.
6719 * c-common.h (pointer_int_sum): Adjust declaration.
6721 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6723 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6724 c_pretty_printer variable.
6726 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6728 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6730 (pp_c_base): Likewise. Adjust users.
6731 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6732 (pp_c_whitespace): Do not call pp_base.
6733 (pp_c_left_paren): Likewise.
6734 (pp_c_right_paren): Likewise.
6735 (pp_c_left_brace): Likewise.
6736 (pp_c_right_brace): Likewise.
6737 (pp_c_left_bracket): Likewise.
6738 (pp_c_right_bracket): Likewise.
6739 (pp_c_dot): Likewise.
6740 (pp_c_ampersand): Likewise.
6741 (pp_c_star): Likewise.
6742 (pp_c_arrow): Likewise.
6743 (pp_c_semicolon): Likewise.
6744 (pp_c_complement): Likewise.
6745 (pp_c_exclamation): Likewise.
6746 (pp_c_direct_declarator): Likewise.
6747 (pp_c_ws_string): Likewise.
6748 (pp_c_identifier): Likewise.
6749 (pp_c_statement): Likewise.
6750 (print_c_tree): Likewise.
6752 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6755 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6756 provide useful error strings.
6758 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6760 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6761 printer functions instead of pp_string or operators and punctuators.
6762 (dump_generic_ada_node): Likewise.
6763 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6764 (pp_c_relational_expression): Likewise.
6765 (pp_c_logical_or_expression): Likewise.
6767 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6769 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6770 functions instead of pp_character.
6771 (pp_ada_tree_identifier): Likewise.
6772 (dump_ada_double_name): Likewise.
6773 (dump_ada_function_declaration): Likewise.
6774 (dump_ada_array_domains): Likewise.
6775 (dump_template_types): Likewise.
6776 (dump_generic_ada_node): Likewise.
6777 (print_ada_declaration): Likewise.
6778 (print_ada_struct_decl): Likewise.
6779 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6781 2013-07-23 Tom Tromey <tromey@redhat.com>
6783 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6784 * c-common.c (c_common_reswords): Add _Generic.
6786 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
6788 * c-common.c: Fix typos.
6789 * c-common.h: Likewise.
6791 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
6794 * c-common.c (c_common_attribute_table): Add warn_unused.
6795 (handle_warn_unused_attribute): New.
6797 2013-07-10 Jakub Jelinek <jakub@redhat.com>
6799 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6800 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6802 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6805 * c.opt: Add Wconditionally-supported.
6807 2013-07-08 Graham Stott <graham.stott@btinternet.com>
6809 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6810 unused variables l_length and l_node.
6812 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6815 * c-common.c (complete_array_type): Delay folding first index
6816 like other indices. When folding, check for index overflow.
6818 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
6821 * c-common.h (c_build_vec_perm_expr): New complain argument.
6822 * c-common.c (c_build_vec_perm_expr): Likewise.
6823 Use save_expr also in C++.
6825 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6827 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6828 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6829 * c-opts.c (c_common_post_options): Likewise.
6831 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6833 * array-notation-common.c (length_mismatch_in_expr): Changed the
6834 parameter type's from a dynamic array to a vec_tree. Also removed
6835 the size parameters.
6836 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6839 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6841 * c-common.h (struct cilkplus_an_parts): New structure.
6842 (struct cilkplus_an_loop_parts): Likewise.
6843 (cilkplus_extract_an_triplets): New prototype.
6844 (fix_sec_implicit_args): Likewise.
6845 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6846 (fix_sec_implicit_args): Likewise.
6848 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6850 * array-notation-common.c (find_inv_trees): Removed an unwanted
6852 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6853 enum rid to enum tree_code.
6855 2013-06-11 Jan Hubicka <jh@suse.cz>
6857 * c-common.c (handle_alias_ifunc_attribute): Do not set
6858 DECL_EXTERNAL for weakref variables.
6859 * c-pragma.c (handle_pragma_weak): Make sure aliases
6860 are not declared as external.
6862 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6864 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6865 function from c/c-array-notation.c.
6866 (is_cilkplus_reduce_builtin): Likewise.
6867 (find_rank): Likewise.
6868 (extract_array_notation_exprs): Likewise.
6869 (replace_array_notations): Likewise.
6870 (find_inv_trees): Likewise.
6871 (replace_inv_trees): Likewise.
6872 (contains_array_notation_expr): Likewise.
6873 (find_correct_array_notation_type): Likewise.
6874 * c-common.h (struct inv_list): Moved this struct from the file
6875 c/c-array-notation.c and added a new field called additional tcodes.
6876 (length_mismatch_in_expr_p): New prototype.
6877 (is_cilkplus_reduce_builtin): Likewise.
6878 (find_rank): Likewise.
6879 (extract_array_notation_exprs): Likewise.
6880 (replace_array_notation): Likewise.
6881 (find_inv_trees): Likewise.
6882 (replace_inv_trees): Likewise.
6883 (find_correct_array_notation_type): Likewise.
6885 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6887 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6888 function array_notation_init_builtins is called.
6889 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6890 * c-common.def (ARRAY_NOTATION_REF): New tree.
6891 * c-common.h (build_array_notation_expr): New function declaration.
6892 (build_array_notation_ref): Likewise.
6893 (extract_sec_implicit_index_arg): New extern declaration.
6894 (is_sec_implicit_index_fn): Likewise.
6895 (ARRAY_NOTATION_CHECK): New define.
6896 (ARRAY_NOTATION_ARRAY): Likewise.
6897 (ARRAY_NOTATION_START): Likewise.
6898 (ARRAY_NOTATION_LENGTH): Likewise.
6899 (ARRAY_NOTATION_STRIDE): Likewise.
6900 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6902 (pp_c_expression): Likewise.
6903 * c.opt (flag_enable_cilkplus): New flag.
6904 * array-notation-common.c: New file.
6906 2013-05-14 Jakub Jelinek <jakub@redhat.com>
6909 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6911 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
6913 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6916 2013-05-07 Han Shen <shenhan@google.com>
6918 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6920 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6922 * c-common.c (check_user_alignment): Emit error for negative values.
6924 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6926 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6928 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6930 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6931 __GXX_EXPERIMENTAL_CXX1Y__.
6933 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6934 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6936 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6937 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6938 to simply use OPT_Wpointer_arith.
6939 (c_sizeof_or_alignof_type): Likewise.
6941 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6943 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6945 2013-04-12 Jakub Jelinek <jakub@redhat.com>
6947 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6948 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6951 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6953 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6955 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6957 * c-common.c (pointer_int_sum): Remove dead code.
6959 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6962 * c-common.c (handle_optimize_attribute): Don't call
6963 save_optabs_if_changed.
6965 2013-03-05 Jakub Jelinek <jakub@redhat.com>
6968 * c-pch.c (pch_init): Free target_validity at the end.
6970 2013-03-04 Jakub Jelinek <jakub@redhat.com>
6972 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6974 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6975 Jakub Jelinek <jakub@redhat.com>
6978 * c-common.c (handle_no_sanitize_address_attribute): New function.
6979 (c_common_attribute_table): Add no_sanitize_address attribute.
6980 (handle_no_address_safety_analysis_attribute): Add
6981 no_sanitize_address attribute, not no_address_safety_analysis
6984 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
6987 * c-common.c (handle_optimize_attribute): Call
6988 save_optabs_if_changed.
6990 2013-02-18 Jakub Jelinek <jakub@redhat.com>
6991 Steven Bosscher <steven@gcc.gnu.org>
6994 * c-opts.c (c_common_post_options): If debug info is enabled
6995 and non-dwarf*, refuse to load PCH files and when writing PCH
6998 2013-02-05 Jakub Jelinek <jakub@redhat.com>
7001 * c-common.c (handle_error_attribute): Fix condition.
7003 2013-01-30 Jakub Jelinek <jakub@redhat.com>
7006 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7008 2013-01-18 Jason Merrill <jason@redhat.com>
7011 * c.opt (-fextern-tls-init): New.
7012 * c-opts.c (c_common_post_options): Handle it.
7014 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7017 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7018 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7019 and is either negative or bigger or equal to type precision
7020 of the first operand.
7022 2012-12-03 Marek Polacek <polacek@redhat.com>
7025 * c-common.c (check_user_alignment): Swap order of tests,
7026 check TREE_CODE first.
7028 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7031 * c-common.h (overflow_type): New enum.
7032 (build_userdef_literal): Add overflow_type argument.
7033 (tree_userdef_literal): Add overflow_type.
7034 (USERDEF_LITERAL_OVERFLOW): New access macro.
7035 * c-common.c (build_userdef_literal): Add overflow_type
7037 * c-lex.c (c_lex_with_flags): Add overflow_type to
7038 build_userdef_literal calls.
7039 (interpret_integer, interpret_float): Add overflow_type argument.
7041 2012-11-28 Richard Biener <rguenther@suse.de>
7044 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7045 here and use a type with proper overflow behavior for types that would
7046 need to be promoted for the arithmetic.
7048 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7051 * c-common.c (handle_no_address_safety_analysis_attribute): New
7053 (c_common_attribute_table): Add no_address_safety_analysis.
7055 2012-11-16 Simon Baldwin <simonb@google.com>
7057 * c.opt: Add f[no-]canonical-system-headers.
7058 * c-opts.c (c_common_handle_option): Handle
7059 OPT_fcanonical_system_headers.
7061 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7064 * c-opts.c (c_common_handle_option): Set new flags.
7065 * c.opt: Describe new flags.
7067 2012-11-09 Jason Merrill <jason@redhat.com>
7069 * c.opt (Wabi-tag): New.
7071 2012-11-09 Andi Kleen <ak@linux.intel.com>
7074 * c-common.c (get_atomic_generic_size): Mask with
7077 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7080 * c.opt (Wformat): Make it Alias Wformat=1.
7081 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7082 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7084 (Wformat=): RejectNegative. Use LangEnabledBy.
7085 (Wnonnull): Use LangEnabledBy.
7086 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7087 * c-format.c (set_Wformat): Delete.
7088 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7089 (maybe_read_dollar_number): Likewise.
7090 (avoid_dollar_number): Likewise.
7091 (finish_dollar_format_checking): Likewise.
7092 (check_format_info): Likewise.
7093 (check_format_info_main): Likewise.
7094 (check_format_types): Likewise.
7095 (format_type_warning): Likewise.
7096 * c-common.c (int): Likewise.
7097 (check_function_sentinel): Likewise.
7098 * c-common.h (warn_format,set_Wformat): Do not declare here.
7100 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7103 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7104 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7106 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7108 (Wvariadic-macros): Init(1).
7109 * c-opts.c (c_common_handle_option): Do not handle them
7111 (c_common_post_options): Likewise.
7112 (sanitize_cpp_opts): warn_unused_macros is now
7113 cpp_warn_unused_macros.
7114 (push_command_line_include): Likewise.
7115 * c-common.c (warn_unknown_pragmas): Do not define.
7116 * c-common.h (warn_unknown_pragmas): Do not declare.
7118 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7121 * c-common.c (conversion_warning): Handle conditional expressions.
7123 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7126 * c.opt (Wreturn_local_addr): Define new option.
7128 2012-10-25 Jason Merrill <jason@redhat.com>
7130 * c.opt (Wvirtual-move-assign): New.
7132 * c.opt (Winherited-variadic-ctor): New.
7134 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7137 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7139 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7141 * c-common.h (pch_cpp_save_state): Declare.
7142 * c-target.def (c_preinclude): New hook.
7143 * c-opts.c (done_preinclude): New.
7144 (push_command_line_include): Handle default preincluded header.
7145 (cb_file_change): Call pch_cpp_save_state when calling
7146 push_command_line_include.
7147 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7148 (pch_cpp_save_state): New.
7149 (pch_init): Call pch_cpp_save_state conditionally, instead of
7150 calling cpp_save_state.
7152 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7156 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7157 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7158 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7159 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7160 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7161 * c-opts.c (c_common_handle_option): Remove explicit handling from
7163 (c_common_post_options): Likewise.
7165 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7167 * c-ada-spec.c (LOCATION_COL): Delete.
7168 (compare_location): New function.
7169 (compare_node): Use it.
7170 (compare_comment): Likewise.
7172 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7176 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7177 * c-opts.c (c_common_handle_option): Do not set them here. Add
7179 (c_common_post_options): Likewise.
7181 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7183 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7184 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7185 Remove POINTER_TYPE handling, add large unsigned handling and use
7186 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7188 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7191 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7192 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7193 locs and array of 3 trees instead of just single loc and single
7194 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7195 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7196 For *cmp* builtins that take two sources strings report warnings
7197 about first and second source, not about destination and source.
7199 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7202 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7204 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7206 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7207 declaring something coming from another file.
7209 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7212 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7214 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7217 * c-common.c (warn_about_parentheses): Add location_t parameter;
7218 use EXPR_LOC_OR_LOC.
7219 * c-common.h: Update declaration.
7221 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7224 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7225 more operations. Make error messages optional.
7226 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7227 (scalar_to_vector): Declare.
7229 2012-10-08 Jason Merrill <jason@redhat.com>
7231 * c-common.c (c_common_reswords): Add thread_local.
7233 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7235 PR c++/53528 C++11 attribute support
7236 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7238 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7240 (handle_aligned_attribute): In choose strictest alignment
7241 among many. Use new check_cxx_fundamental_alignment_constraints.
7242 (handle_transparent_union_attribute): In c++11 attribute syntax,
7243 don't look through typedefs.
7245 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7247 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7248 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7251 2012-09-25 Dehao Chen <dehao@google.com>
7254 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7255 map when read in the pch.
7257 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7259 * c-ada-spec.c: Style fixes.
7261 2012-09-18 Thomas Quinot <quinot@adacore.com>
7263 * c.opt (-fada-spec-parent): Define new command line switch.
7264 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7265 is specified, generate binding spec as a child of the specified unit.
7267 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7268 Manuel López-Ibáñez <manu@gcc.gnu.org>
7271 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7273 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7275 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7276 for pointers, and add missing Convention C pragma.
7277 (print_ada_struct_decl): Add missing aliased keyword.
7278 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7280 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7282 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7283 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7284 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7285 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7286 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7288 2012-08-10 Richard Guenther <rguenther@suse.de>
7290 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7292 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7294 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7295 instead of separate pp_newline and pp_flush.
7296 (print_c_tree): Likewise.
7298 2012-07-26 Richard Henderson <rth@redhat.com>
7300 * c-common.c (handle_hot_attribute): Allow labels.
7301 (handle_cold_attribute): Likewise.
7303 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7306 * c-common.c (check_function_nonnull): Handle multiple nonnull
7307 attributes properly.
7309 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7311 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7312 * c-ada-spec.c: Likewise.
7313 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7315 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7317 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7318 Remove code conditional on it.
7320 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7322 * c-gimplify.c: Do not include basic-block.h.
7323 * c-common.c: Do not include linfuncs.h.
7325 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7327 * c-common.h: Include tree.h.
7329 2012-07-02 Jason Merrill <jason@redhat.com>
7332 * c-common.c (get_priority): Call default_conversion.
7334 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7336 * c-pch.c (c_common_write_pch): Remove unused variables.
7338 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7340 * cppspec.c: Moved from gcc/ to here.
7342 2012-06-27 Kai Tietz <ktietz@redhat.com>
7344 PR preprocessor/37215
7345 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7347 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7349 * c-common.h (c_common_print_pch_checksum): Remove.
7350 * c-pch.c: Do not include output.h.
7351 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7352 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7353 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7354 (struct c_pch_header): Remove.
7355 (get_ident): Update gpch version.
7356 (pch_init): Do not print executable_checksum to asm_out_file.
7357 Do not fail if there is no asm_out_file to read back from. Set
7358 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7359 (c_common_write_pch): Verify that nothing was written to asm_out_file
7360 since pch_init was called. Do not write a c_pch_header, and do not
7361 copy from asm_out_file to the PCH.
7362 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7363 the content of asm_out_file from the PCH.
7364 (c_common_print_pch_checksum): Remove.
7365 * c-opts.c (c_common_init): Print out executable_checksum directly.
7367 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7369 * c-target.def (objc_declare_unresolved_class_reference,
7370 objc_declare_class_definition): Add new hooks.
7372 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7374 * c-lex.c: Do not include output.h.
7375 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7376 Remove uses of ASM_OUTPUT_IDENT.
7378 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7381 * c-common.h (c_build_vec_perm_expr): Move decl here.
7382 * c-common.c (c_build_vec_perm_expr): Move definition
7385 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7387 * c.opt (fconserve-space): Turn into a no-op.
7389 2012-06-04 Sterling Augustine <saugustine@google.com>
7391 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7392 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7393 both the start and end of the function.
7395 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7397 * c-common.c: Do not include output.h.
7398 * c-pragma.c: Likewise.
7400 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7402 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7403 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7404 (lang_decl_name): Handle namespace decls.
7406 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7408 * c-ada-spec.c: Do not include output.h.
7409 * c-semantics.c: Likewise.
7411 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7413 * c-common.c: Fix typo.
7415 2012-05-29 Michael Matz <matz@suse.de>
7417 * c-common.h (c_expand_decl): Remove prototype.
7419 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7421 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7422 * c-opts.c (c_common_handle_option): Remove code handling
7423 warn_missing_braces.
7425 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7428 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7431 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7434 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7436 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7438 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7439 * c-opts.c (c_common_handle_option): Do not handle explicitly
7440 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7442 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7444 PR preprocessor/7263
7445 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7446 to cpp_classify_number. For diagnostics, use the precise location
7447 instead of the global input_location.
7449 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7452 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7454 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7456 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7458 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7461 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7462 Wreorder): Use LangEnabledBy.
7463 * c-opts.c (c_common_handle_option): Do not enable them
7464 explicitly. Call lang-specific generated functions.
7465 (c_common_post_options): Do not set them here.
7467 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7469 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7470 Wmissing-field-initializers,Wmissing-parameter-type,
7471 Wold-style-declaration,Woverride-init): Use EnabledBy.
7472 * c-opts.c (c_common_post_options): Do not set here explicitly.
7474 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7477 * c-opts.c (c_common_handle_option): Use handle_generated_option
7478 to enable sub-options.
7480 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7483 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7485 2012-05-10 Richard Guenther <rguenther@suse.de>
7487 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7488 adjust commentary about TYPE_IS_SIZETYPE types.
7490 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7493 * c-common.c (warn_logical_operator): Check that argument of
7494 integer_zerop is not NULL.
7496 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7499 * c-common.c (warn_logical_operator): Do not warn if either side
7500 is already true or false.
7502 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7505 * c-common.c (expr_original_type): New.
7506 (shorten_compare): Do not warn for enumeration types.
7508 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7510 * c.opt (fpermissive): Add Var(flag_permissive).
7512 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
7515 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7516 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7518 2012-04-30 Dodji Seketeli <dodji@redhat.com>
7520 Add -Wvarargs option
7521 * c.opt (Wvarargs): Define new option.
7523 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7525 * c-common.c (check_function_arguments): Replace
7526 Wmissing-format-attribute with Wsuggest-attribute=format.
7528 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7530 * c.opt (Wsuggest-attribute=format): New. Alias of
7531 Wmissing-format-attribute.
7532 * c-format.c (decode_format_type): Replace
7533 Wmissing-format-attribute with Wsuggest-attribute=format.
7534 (check_function_format): Likewise.
7536 2012-04-27 Ollie Wild <aaw@google.com>
7538 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7539 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7540 * c.opt: Add Wliteral-suffix.
7542 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7545 * c.opt (Wpedantic): New.
7546 (pedantic): Alias Wpedantic.
7547 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7548 (c_common_post_options): Likewise.
7549 (sanitize_cpp_opts): Likewise.
7550 * c-lex.c (interpret_float): Likewise.
7551 * c-format.c (check_format_types): Likewise.
7552 * c-common.c (pointer_int_sum): Likewise.
7553 (c_sizeof_or_alignof_type): Likewise.
7554 (c_add_case_label): Likewise.
7555 (c_do_switch_warnings): Likewise.
7556 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7558 2012-04-15 Jason Merrill <jason@redhat.com>
7561 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7562 (C_STD_NAME): Distinguish between C++98 and C++11.
7564 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7567 * c-common.h (uint16_type_node): Rename into...
7568 (c_uint16_type_node): ...this.
7569 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7570 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7572 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7574 * c-common.c (warn_if_unused_value): Move definition to here.
7575 * c-common.h (warn_if_unused_value): Move declaration to here.
7577 2012-03-23 William Bader <williambader@hotmail.com>
7579 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7581 2012-03-20 Jason Merrill <jason@redhat.com>
7583 * c-common.h (enum cxx_dialect): Add cxx1y.
7584 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7586 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7587 * c-opts.c (c_common_post_options): Likewise.
7588 (set_std_cxx1y): New.
7589 (c_common_handle_option): Call it.
7590 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7592 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7595 * c.opt ([Wuseless-cast]): Add.
7597 2012-03-16 Richard Guenther <rguenther@suse.de>
7599 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7601 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7604 * c.opt (ftemplate-backtrace-limit) Add.
7606 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7608 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7610 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7611 (init_pragma): Don't register extern_prefix.
7613 2012-03-12 Richard Guenther <rguenther@suse.de>
7615 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7616 (builtin_type_for_size): Likewise.
7618 2012-02-13 Jakub Jelinek <jakub@redhat.com>
7621 * c-common.c (sync_resolve_params): Don't decide whether to convert
7622 or not based on TYPE_SIZE comparison, convert whenever arg_type
7623 is unsigned INTEGER_TYPE.
7625 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7628 * c.opt ([Wunused-local-typedefs]): Fix description.
7630 2012-01-24 Mike Stump <mikestump@comcast.net>
7632 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7635 2012-01-18 Richard Guenther <rguenther@suse.de>
7637 * c-opts.c (c_common_post_options): Reset LTO flags if
7638 we are about to generate a PCH.
7640 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7643 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7644 use pp_unsigned_wide_integer.
7646 2012-01-10 Richard Guenther <rguenther@suse.de>
7649 * c-opts.c (c_common_handle_option): Move -Werror handling
7650 to language independent code.
7652 2012-01-05 Richard Guenther <rguenther@suse.de>
7655 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7658 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7661 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7662 of array types with an unknown bound.
7664 2011-12-20 Joseph Myers <joseph@codesourcery.com>
7666 * c-common.c (flag_isoc99): Update comment to refer to C11.
7667 (flag_isoc1x): Change to flag_isoc11.
7668 * c-common.h (flag_isoc99): Update comment to refer to C11.
7669 (flag_isoc1x): Change to flag_isoc11.
7670 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7672 * c-opts.c (set_std_c1x): Change to set_std_c11.
7673 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7675 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7676 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7677 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7679 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7680 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7681 (std=gnu1x): Make alias of std=gnu11.
7683 2011-12-19 Jason Merrill <jason@redhat.com>
7686 * c-common.c (handle_transparent_union_attribute): Check the first
7687 field if the type is complete.
7689 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7692 * c-common.c (RID_IS_FINAL): Add.
7693 * c-common.h (RID_IS_FINAL): Add.
7695 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7697 * c.opt (fgnu-runtime): Provide full description.
7698 (fnext-runtime): Likewise.
7699 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7701 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
7703 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7704 predefines in one place. Add LOCK_FREE predefines.
7705 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7708 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
7711 * c-common.c (get_atomic_generic_size): Check for various error
7713 (resolve_overloaded_atomic_exchange,
7714 resolve_overloaded_atomic_compare_exchange,
7715 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7716 error_mark_node for error conditions.
7718 2011-11-08 Richard Guenther <rguenther@suse.de>
7723 2011-11-07 Richard Henderson <rth@redhat.com>
7724 Aldy Hernandez <aldyh@redhat.com>
7725 Torvald Riegel <triegel@redhat.com>
7727 Merged from transactional-memory.
7729 * c-common.c (handle_tm_wrap_attribute,
7730 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7731 (struct c_common_reswords): Added __transaction* keywords.
7732 (struct c_common_attribute_table): Added transaction* and tm_regparm
7734 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7736 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7737 find_tm_attribute): Declare.
7739 2011-11-07 Jason Merrill <jason@redhat.com>
7742 * c-common.c, c-common.h: Revert yesterday's changes.
7744 2011-11-06 Jason Merrill <jason@redhat.com>
7747 * c-common.c (decl_has_visibility_attr): Split out from...
7748 (c_determine_visibility): ...here.
7749 * c-common.h: Declare it.
7751 2011-11-06 Joseph Myers <joseph@codesourcery.com>
7753 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7754 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7756 (check_user_alignment): New. Split out of
7757 handle_aligned_attribute. Disallow integer constants with
7758 noninteger types. Conditionally allow zero.
7759 (handle_aligned_attribute): Use check_user_alignment.
7760 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7762 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
7763 Richard Henderson <rth@redhat.com>
7765 Merged from cxx-mem-model.
7767 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
7768 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
7769 parameters that are the same type size.
7770 (get_atomic_generic_size): New. Find size of generic
7771 atomic function parameters and do typechecking.
7772 (add_atomic_size_parameter): New. Insert size into parameter list.
7773 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7774 either __atomic_exchange_n or external library call.
7775 (resolve_overloaded_atomic_compare_exchange): Restructure
7776 __atomic_compare_exchange to either _n variant or external library call.
7777 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
7778 __atomic_load_n or an external library call.
7779 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7780 __atomic_store_n or an external library call.
7781 (resolve_overloaded_builtin): Handle new __atomic builtins.
7783 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7786 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7787 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7788 <INDIRECT_REF>: Return the argument.
7789 <ARRAY_REF>: Remove special code for negative offset.
7790 Call fold_build_pointer_plus instead of size_binop.
7791 (fold_offsetof): Remove STOP_REF argument and adjust.
7792 * c-common.h (fold_offsetof_1): Declare.
7793 (fold_offsetof): Remove STOP_REF argument.
7795 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7798 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7799 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7800 Wnarrowing for C++0x and C++98.
7801 * c.opt ([Wnarrowing]): Update.
7803 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7806 * c.opt: Add Wzero-as-null-pointer-constant.
7808 2011-10-31 Jason Merrill <jason@redhat.com>
7810 * c.opt (-fdeduce-init-list): Off by default.
7813 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7814 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7816 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7818 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7821 * c.opt (fvisibility-inlines-hidden): Description change.
7823 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7825 Implement C++11 user-defined literals.
7826 * c-common.c (build_userdef_literal): New.
7827 * c-common.def: New tree code.
7828 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7829 * c-lex.c (interpret_float): Add suffix parm.
7830 (c_lex_with_flags): Build literal tokens.
7832 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7836 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7839 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7840 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7841 Wnarrowing for C++0x and C++98.
7842 * c.opt ([Wnarrowing]): Update.
7844 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7847 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7848 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7849 Wnarrowing for C++0x and C++98.
7850 * c.opt ([Wnarrowing]): Update.
7852 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7855 * c-common.c (conversion_warning): Remove code looking for
7856 artificial operands.
7858 2011-10-18 Dodji Seketeli <dodji@redhat.com>
7861 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
7862 !NO_IMPLICIT_EXTERN_C.
7864 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
7866 * c-common.c (c_common_reswords): Add __bases,
7868 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7870 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7873 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7875 2011-10-15 Tom Tromey <tromey@redhat.com>
7876 Dodji Seketeli <dodji@redhat.com>
7878 * c.opt (fdebug-cpp): New option.
7879 * c-opts.c (c_common_handle_option): Handle the option.
7880 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7881 output stream in parameter. Factorized from ...
7882 (maybe_print_line): ... this. Dump location debug information when
7883 -fdebug-cpp is in effect.
7884 (print_line_1): New static function. Takes an output stream in
7885 parameter. Factorized from ...
7886 (print_line): ... here. Dump location information when -fdebug-cpp
7888 (scan_translation_unit): Dump location information when
7889 -fdebug-cpp is in effect.
7891 2011-10-15 Tom Tromey <tromey@redhat.com>
7892 Dodji Seketeli <dodji@redhat.com>
7894 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7896 * c-opts.c (c_common_handle_option)<case
7897 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7898 cases. Handle -ftrack-macro-expansion with and without argument.
7900 2011-10-15 Tom Tromey <tromey@redhat.com>
7901 Dodji Seketeli <dodji@redhat.com>
7903 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7904 (print_line, cb_define, do_line_change): Adjust to avoid touching
7905 the internals of struct line_map. Use the public API instead.
7906 * c-pch.c (c_common_read_pch): Likewise.
7907 * c-lex.c (fe_file_change): Likewise.
7909 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7912 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7914 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7917 * c-pretty-print.c (pp_c_floating_constant): Output
7918 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7920 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7922 * c-common.c (def_builtin_1): Delete old interface with two
7923 parallel arrays to hold standard builtin declarations, and replace
7924 it with a function based interface that can support creating
7925 builtins on the fly in the future. Change all uses, and poison
7926 the old names. Make sure 0 is not a legitimate builtin index.
7927 * c-omp.c (c_finish_omp_barrier): Ditto.
7928 (c_finish_omp_taskwait): Ditto.
7929 (c_finish_omp_flush): Ditto.
7931 2011-10-11 Tristan Gingold <gingold@adacore.com>
7933 * c.opt: (fallow-parameterless-variadic-functions): New.
7935 2011-09-08 Dodji Seketeli <dodji@redhat.com>
7937 PR c++/33255 - Support -Wunused-local-typedefs warning
7938 * c-common.h (struct c_language_function::local_typedefs): New
7940 (record_locally_defined_typedef, maybe_record_typedef_use)
7941 (maybe_warn_unused_local_typedefs): Declare new functions.
7942 * c-common.c (record_locally_defined_typedef)
7943 (maybe_record_typedef_use)
7944 (maybe_warn_unused_local_typedefs): Define new functions.
7945 * c.opt: Declare new -Wunused-local-typedefs flag.
7947 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7950 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7953 2011-09-05 Richard Guenther <rguenther@suse.de>
7955 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7956 of integer_minus_one_node for empty array upper bounds.
7958 2011-08-28 Dodji Seketeli <dodji@redhat.com>
7960 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7961 it's the first time it's being called on this main TU.
7963 2011-08-24 Richard Guenther <rguenther@suse.de>
7966 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7968 2011-08-22 Gabriel Charette <gchare@google.com>
7970 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7971 defined in cpp_init_builtins and c_cpp_builtins.
7973 2011-08-19 Joseph Myers <joseph@codesourcery.com>
7975 * c-common.c (c_common_reswords): Add __builtin_complex.
7976 * c-common.h (RID_BUILTIN_COMPLEX): New.
7978 2011-08-18 Joseph Myers <joseph@codesourcery.com>
7980 * c-common.c (c_common_reswords): Add _Noreturn.
7981 (keyword_is_function_specifier): Handle RID_NORETURN.
7982 * c-common.h (RID_NORETURN): New.
7984 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7986 * c-common.c (unsafe_conversion_p): New function. Check if it is
7987 unsafe to convert an expression to the type.
7988 (conversion_warning): Adjust, use unsafe_conversion_p.
7989 * c-common.h (unsafe_conversion_p): New function declaration.
7991 2011-08-02 Jakub Jelinek <jakub@redhat.com>
7993 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7994 (c_finish_omp_taskyield): New prototype.
7995 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7996 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7997 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7998 or RHS1 have side-effects, evaluate those too in the right spot,
7999 if it is a decl and LHS is also a decl, error out if they
8001 (c_finish_omp_taskyield): New function.
8002 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8003 * c-pragma.c (omp_pragmas): Add taskyield.
8004 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8005 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8006 PRAGMA_OMP_CLAUSE_MERGEABLE.
8008 2011-07-25 Dodji Seketeli <dodji@redhat.com>
8010 * c-common.h (set_underlying_type): Remove parm name from
8013 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8015 * c-pretty-print.h: Search c-common.h in c-family.
8017 2011-07-22 Jason Merrill <jason@redhat.com>
8020 * c.opt (Wnarrowing): New.
8023 * c-common.h: Declare c_linkage_bindings.
8024 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8027 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8028 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8029 as flag_isoc99 for 'restrict'.
8030 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8032 2011-07-21 Ian Lance Taylor <iant@google.com>
8035 * c-common.c (c_disable_warnings): New static function.
8036 (c_enable_warnings): New static function.
8037 (c_fully_fold_internal): Change local unused_p to bool. Call
8038 c_disable_warnings and c_enable_warnings rather than change
8039 c_inhibit_evaluation_warnings.
8041 2011-07-20 Jason Merrill <jason@redhat.com>
8043 PR c++/6709 (DR 743)
8044 PR c++/42603 (DR 950)
8045 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8046 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8047 (CPP_DECLTYPE): New.
8048 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8050 2011-07-19 Richard Guenther <rguenther@suse.de>
8052 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8053 * c-omp.c (c_finish_omp_for): Likewise.
8055 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8057 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8058 body on the next line.
8060 2011-07-08 Jason Merrill <jason@redhat.com>
8063 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8066 * c-common.c (c_apply_type_quals_to_decl): Don't check
8067 TYPE_NEEDS_CONSTRUCTING.
8069 2011-07-06 Richard Guenther <rguenther@suse.de>
8071 * c-common.c (c_common_nodes_and_builtins):
8072 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8074 2011-07-05 Richard Guenther <rguenther@suse.de>
8076 * c-common.c (c_common_nodes_and_builtins): Build all common
8079 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8081 * c-common.h (c_tree_chain_next): New static inline function.
8083 * c-common.c (check_builtin_function_arguments): Handle
8084 BUILT_IN_ASSUME_ALIGNED.
8086 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8088 * c-common.c: Add sync_ or SYNC__ to builtin names.
8089 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8091 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8093 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8095 (gen_pragma_handler): New union.
8096 (internal_pragma_handler): New type.
8097 (c_register_pragma_with_data)
8098 (c_register_pragma_with_expansion_and_data): New functions.
8100 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8101 (c_register_pragma, c_register_pragma_with_expansion)
8102 (c_invoke_pragma_handler): Changed to work with
8103 internal_pragma_handler.
8104 (c_register_pragma_with_data)
8105 (c_register_pragma_with_expansion_and_data): New functions.
8107 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8109 * c-common.c: Include common/common-target.h.
8110 (handle_section_attribute): Use
8111 targetm_common.have_named_sections.
8112 * c-cppbuiltin.c: Include common/common-target.h.
8113 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8115 2011-06-10 Richard Guenther <rguenther@suse.de>
8117 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8118 to print a IDENTIFIER_NODE.
8120 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8121 Joseph Myers <joseph@codesourcery.com>
8123 * c.opt (fbuilding-libgcc): New option.
8124 * c-cppbuiltin.c (c_cpp_builtins): Define
8125 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8127 2011-06-07 Jason Merrill <jason@redhat.com>
8129 * c-common.c (max_tinst_depth): Lower default to 900.
8131 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8133 2011-06-07 Richard Guenther <rguenther@suse.de>
8135 * c-common.c (c_common_nodes_and_builtins): Do not set
8136 size_type_node or call set_sizetype.
8138 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8141 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8142 type when using pointer comparison to compare types.
8144 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8146 * c.opt: Add -Wdelete-non-virtual-dtor.
8147 * c-opts.c (c_common_handle_option): Include it in -Wall.
8149 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8154 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8156 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8159 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8162 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8163 C++ don't call c_common_truthvalue_conversion on void type arms.
8165 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8167 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8168 (stmt_list_stack): Define.
8169 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8170 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8172 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8174 * c-common.c (warning_candidate_p): Check for BLOCKs.
8176 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8178 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8181 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8183 * c-common.c (def_fn_type): Remove extra va_end.
8185 2011-05-23 Jason Merrill <jason@redhat.com>
8188 * c-common.c (c_common_get_narrower): New.
8189 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8191 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8193 * c-common.h (check_function_arguments): Tweak prototype of
8194 check_function_arguments.
8195 * c-common.c (check_function_arguments): Likewise. Adjust
8196 calls to check_function_nonnull, check_function_format, and
8197 check_function_sentinel.
8198 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8199 separate attributes and typelist arguments. Use
8200 FOREACH_FUNCTION_ARGS to iterate over argument types.
8202 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8204 * c-common.c (c_common_reswords): Reorder.
8205 * c-common.h (rid): Likewise.
8207 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8209 * c-common.c (def_fn_type): Don't call build_function_type, call
8210 build_function_type_array or build_varargs_function_type_array
8212 (c_common_nodes_and_builtins): Likewise.
8214 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8216 * c-common.c (c_add_case_label): Omit the loc argument to
8218 * c-common.h (build_case_label): Remove.
8219 * c-semantics.c (build_case_label): Remove.
8221 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8223 * c-objc.h (objc_start_method_definition): Update prototype.
8224 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8226 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8228 * c-common.c (check_main_parameter_types): Reindent. Don't use
8229 TYPE_ARG_TYPES directly.
8230 (handle_nonnull_attribute): Likewise.
8231 (sync_resolve_params): Likewise.
8232 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8233 to check_format_string.
8234 (handle_format_attribute): Likewise.
8235 (check_format_string): Take a function type to examine instead of
8236 a type list. Use a function_arg_iterator to step through argument
8239 2011-05-04 Richard Guenther <rguenther@suse.de>
8241 * c-common.c (fix_string_type): Use size_int for index type bounds.
8242 (start_fname_decls): Do not pass NULL to build_int_cst.
8243 (c_init_attributes): Likewise.
8244 * c-lex.c (c_lex_with_flags): Likewise.
8246 2011-04-27 Jason Merrill <jason@redhat.com>
8248 * c-common.c (make_tree_vector_from_list): New.
8249 * c-common.h: Declare it.
8251 2011-04-26 Richard Guenther <rguenther@suse.de>
8253 PR preprocessor/48248
8254 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8255 for output size with -P.
8257 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8259 * c-common.c (struct c_common_resword): Add __underlying_type.
8260 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8262 2011-04-20 Jim Meyering <meyering@redhat.com>
8264 * c-format.c (init_dollar_format_checking): Remove useless
8267 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8269 * c-objc.h (objc_get_interface_ivars): Removed.
8270 (objc_detect_field_duplicates): New.
8271 * stub-objc.c: Likewise.
8273 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8275 * stub-objc.c (objc_declare_protocols): Renamed to
8276 objc_declare_protocol.
8277 * c-objc.h: Likewise.
8279 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8281 * stub-objc.c (objc_declare_class): Updated argument name.
8283 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8285 * c-common.h (c_common_init_ts): Declare.
8286 * c-common.c (c_common_init_ts): Define.
8288 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8290 * c-objc.h (objc_build_message_expr): Updated prototype.
8291 * stub-objc.c (objc_build_message_expr): Likewise.
8293 2011-04-12 Martin Jambor <mjambor@suse.cz>
8295 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8298 2011-04-11 Richard Guenther <rguenther@suse.de>
8300 * c-common.c (complete_array_type): Build a range type of
8303 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8305 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8306 (handle_type_generic_attribute): Likewise.
8308 2011-04-07 Jason Merrill <jason@redhat.com>
8311 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8312 conversion from C++0x scoped enum.
8314 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8316 * c-target-def.h: New file.
8317 * c-target.def: New file.
8318 * c-target.h: New file.
8319 * c-common.c (targetcm): Don't define here.
8320 * c-common.h (default_handle_c_option): Declare.
8321 * c-format.c: Include c-target.h instead of target.h.
8322 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8324 (default_handle_c_option): Move from targhooks.c.
8326 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8328 PR preprocessor/48248
8329 * c-ppoutput.c (print): Add src_file field.
8330 (init_pp_output): Initialize it.
8331 (maybe_print_line): Don't optimize by adding up to 8 newlines
8332 if map->to_file and print.src_file are different file.
8333 (print_line): Update print.src_file.
8335 2011-03-25 Kai Tietz <ktietz@redhat.com>
8337 * c-ada-spec.c (compare_comment): Use filename_cmp
8338 instead of strcmp for filename.
8340 2011-03-25 Jeff Law <law@redhat.com>
8342 * c-common.c (def_fn_type): Add missing va_end.
8344 2011-03-25 Jason Merrill <jason@redhat.com>
8346 * c.opt: Add -std=c++03.
8348 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8350 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8352 2011-03-17 Kai Tietz <ktietz@redhat.com>
8355 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8356 Display allowed attributes for function pointer types.
8357 (pp_c_attributes_display): New function to display
8358 attributes having affects_type_identity flag set to true.
8359 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8361 * c-common.c (c_common_attribute_table):
8363 (c_common_format_attribute_table): Likewise.
8365 2011-03-18 Jason Merrill <jason@redhat.com>
8367 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8368 * c-common.h: Don't declare it here.
8369 * c-common.c: Or define it here.
8370 * c-opts.c (c_common_handle_option): Or set it here.
8373 * c-common.c (handle_transparent_union_attribute): Don't
8374 make a duplicate type in C++.
8376 2011-03-15 Jason Merrill <jason@redhat.com>
8378 * c-common.c (max_constexpr_depth): New.
8379 * c-common.h: Declare it.
8380 * c-opts.c (c_common_handle_option): Set it.
8381 * c.opt (fconstexpr-depth): New option.
8383 2011-03-11 Jason Merrill <jason@redhat.com>
8385 * c-common.c (attribute_takes_identifier_p): Add missing const.
8388 * c-common.c (attribute_takes_identifier_p): Assume that an
8389 unknown attribute takes an identifier.
8391 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8394 * c-common.c (c_type_hash): Call list_length instead of iterating
8395 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8397 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8400 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8402 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8404 * c.opt (fobjc-abi-version=) New.
8405 (fobjc-nilcheck): New.
8407 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8410 * c-common.h (keyword_is_decl_specifier): Declare.
8411 * c-common.c (keyword_is_decl_specifier): Define.
8412 (keyword_is_function_specifier): New function.
8414 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8417 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8418 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8421 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8423 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8425 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8428 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8429 after init_c_lex if pch_file is set.
8431 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8434 * c.opt (-fkeep-inline-dllexport): New switch.
8436 2011-01-12 Richard Guenther <rguenther@suse.de>
8439 * c-common.c (handle_weak_attribute): Warn instead of error
8440 on declaring an inline function weak.
8442 2011-01-05 Tom Tromey <tromey@redhat.com>
8444 * c-common.h (lvalue_error): Update.
8445 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8448 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8451 * c-objc.h (objc_finish_message_expr): Added argument to
8454 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8456 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8459 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8461 * c-objc.h (objc_maybe_warn_exceptions): New.
8462 * stub-objc.c (objc_maybe_warn_exceptions): New.
8464 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8466 * c-common.h (readonly_error): Declare.
8467 * c-common.c (readonly_error): Define.
8469 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8471 * c-common.h (invalid_indirection_error): Declare.
8472 * c-common.c (invalid_indirection_error): Define.
8474 2010-12-03 Richard Guenther <rguenther@suse.de>
8477 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8478 (pp_c_unary_expression): Likewise.
8479 (pp_c_expression): Likewise.
8481 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8483 * c-common.h (objc_finish_function): New.
8484 (objc_non_volatilized_type): Removed.
8485 (objc_type_quals_match): Removed.
8486 * stub-objc.c (objc_finish_function): New.
8487 (objc_non_volatilized_type): Removed.
8488 (objc_type_quals_match): Removed.
8490 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8492 * c-common.h (parse_optimize_options): Declare.
8493 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8494 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8496 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8498 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8500 * c-pch.c (O_BINARY): Don't define here.
8501 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8503 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8505 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8506 targetm.except_unwind_info.
8508 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8510 * c-opts.c (c_common_handle_option): Pass location to
8511 set_struct_debug_option.
8513 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8515 * c-common.c (visibility_options): Move from ../opts.c.
8516 * c-common.h (struct visibility_flags, visibility_options):
8518 * c-opts.c (finish_options): Rename to c_finish_options.
8519 (c_common_init): Update call to finish_options.
8521 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8524 * c-lex.c (lex_string): Check that each string in an Objective-C
8525 string concat sequence starts with either one or zero '@', and
8526 that there are no spurious '@' signs at the end.
8528 2010-11-20 Joseph Myers <joseph@codesourcery.com>
8530 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8531 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8532 HANDLE_PRAGMA_VISIBILITY.
8533 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8534 HANDLE_PRAGMA_VISIBILITY): Don't define.
8535 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8537 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8542 * c-common.h (keyword_begins_type_specifier): Declare.
8543 (keyword_is_storage_class_specifier): Declare.
8544 (keyword_is_type_qualifier): Declare.
8545 * c-common.c (keyword_begins_type_specifier): New function.
8546 (keyword_is_storage_class_specifier): New function.
8547 (keyword_is_type_qualifier): Declare.
8549 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8552 * c-common.c (in_late_binary_op): Define.
8553 (c_common_truthvalue_conversion): Check in_late_binary_op before
8554 calling c_save_expr.
8555 * c-common.h (in_late_binary_op): Declare.
8557 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8559 * c-opts.c (c_common_handle_option): Update calls to
8560 set_struct_debug_option.
8562 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8564 * c-common.h (objc_declare_protocols): Added additional argument.
8565 * stub-objc.c (objc_declare_protocol): Same change.
8567 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8570 * c-common.h (build_real_imag_expr): Declare.
8571 * c-semantics.c (build_real_imag_expr): Define.
8573 2010-11-17 Joseph Myers <joseph@codesourcery.com>
8575 * c-opts.c (c_common_parse_file): Take no arguments.
8576 * c-common.h (c_common_parse_file): Update prototype.
8578 2010-11-16 Jakub Jelinek <jakub@redhat.com>
8581 * c-common.c (warning_candidate_p): Don't track non-const calls
8584 2010-11-15 Ian Lance Taylor <iant@google.com>
8586 * c-lex.c (init_c_lex): Set macro debug callbacks if
8587 flag_dump_go_spec is set.
8589 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8591 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8592 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8594 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8596 PR preprocessor/45038
8597 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8600 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8602 * c-common.h (c_family_lang_mask): Declare.
8603 * c-opts.c (c_family_lang_mask): Make extern.
8604 * c-pragma.c (handle_pragma_diagnostic): Use
8605 control_warning_option.
8607 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8609 * c-common.c (parse_optimize_options): Update call to
8611 * c-common.h (c_common_handle_option): Update prototype.
8612 * c-opts.c (c_common_handle_option): Take location_t parameter and
8613 pass it to other functions.
8615 2010-11-11 Joseph Myers <joseph@codesourcery.com>
8617 * c-opts.c (warning_as_error_callback): Remove.
8618 (c_common_initialize_diagnostics): Don't call
8619 register_warning_as_error_callback.
8620 (c_common_handle_option): Handle -Werror=normalized= here.
8622 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8624 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8626 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8628 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8629 Remove trailing '.' from diagnostics.
8630 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8632 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8634 * c-common.c (parse_optimize_options): Pass global_dc to
8636 * c-opts.c (c_common_handle_option): Pass &global_options to
8637 set_Wstrict_aliasing.
8638 * c.opt (v): Don't mark Common or document here.
8640 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8643 * c-format.c (format_type): New type gcc_objc_string_format_type.
8644 (valid_stringptr_type_p): New.
8645 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
8646 (check_format_string): Pass expected type, use
8647 valid_stringptr_type_p (), check that the format string types are
8648 consistent with the format specification.
8649 (decode_format_attr): Warn if NSString is used outside objective-c.
8650 (format_types_orig): Add NSString.
8652 (format_flags): New.
8653 (check_format_arg): Handle format strings requiring an external parser.
8654 first_target_format_type: New variable.
8655 (handle_format_attribute): Set up first_target_format_type, pass the
8656 expected format arg string type to check_format_string().
8657 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8658 * stub-objc.c (objc_string_ref_type_p): New.
8659 (objc_check_format_arg): New.
8661 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8663 Fixed using the Objective-C 2.0 dot-syntax with class names.
8664 * c-common.h (objc_build_class_component_ref): New.
8665 * stub-objc.c (objc_build_class_component_ref): New.
8667 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8669 * c.opt (Wproperty-assign-default): New option.
8671 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8673 Implemented -fobjc-std=objc1 flag.
8674 * c.opt (fobjc-std=objc1): New option.
8676 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8678 Implemented format and noreturn attributes for Objective-C methods.
8679 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8680 attribute for Objective-C methods.
8682 2010-10-31 Jason Merrill <jason@redhat.com>
8684 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8687 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8689 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8690 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8691 (objc_add_property_declaration): Removed arguments for copies and
8693 (objc_build_getter_call): Renamed to
8694 objc_maybe_build_component_ref.
8695 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8696 (objc_is_property_ref): New.
8697 * c-common.c (c_common_reswords): Removed copies and ivar.
8698 * stub-objc.c (objc_add_property_declaration): Removed arguments
8699 for copies and ivar.
8700 (objc_build_getter_call): Renamed to
8701 objc_maybe_build_component_ref.
8702 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8703 (objc_is_property_ref): New.
8705 2010-10-29 Arnaud Charlet <charlet@adacore.com>
8706 Matthew Gingell <gingell@adacore.com>
8708 * c-ada-spec.c (separate_class_package): New function.
8709 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8710 name of their enclosing package.
8711 (print_ada_declaration): Use separate_class_package.
8713 2010-10-27 Jason Merrill <jason@redhat.com>
8715 * c-common.c (c_common_reswords): Add __is_literal_type.
8716 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8718 * c-common.c (check_case_value): Remove special C++ code.
8720 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8722 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8723 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8725 (objc_add_property_declaration): Added additional arguments.
8726 (objc_property_attribute_kind): Removed.
8727 (objc_set_property_attr): Removed.
8728 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8730 * stub-objc.c (objc_add_property_declaration): Added additional
8732 (objc_set_property_attr): Removed.
8734 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8736 * c-common.h (objc_add_property_variable): Renamed to
8737 objc_add_property_declaration. Added location argument.
8738 * stub-objc.c (objc_add_property_variable): Same change.
8740 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8742 * c-common.h (objc_maybe_printable_name): New.
8743 * stub-objc.c (objc_maybe_printable_name): New.
8745 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8746 Andrew Pinski <pinskia@gmail.com>
8748 * c-common.h (c_common_mark_addressable_vec): Declare.
8749 * c-common.c (c_common_mark_addressable_vec): New function.
8751 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8753 * c-common.h (objc_set_method_type): Removed.
8754 (objc_add_method_declaration): Added boolean argument.
8755 (objc_start_method_definition): Same change.
8756 (objc_build_method_signature): Same change.
8757 * stub-objc.c (objc_set_method_type): Removed.
8758 (objc_add_method_declaration): Added boolean argument.
8759 (objc_start_method_definition): Same change.
8760 (objc_build_method_signature): Same change.
8762 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8764 * c-common.h (finish_file): Removed.
8765 (objc_write_global_declarations): New.
8766 * c-opts.c (c_common_parse_file): Do not call finish_file.
8767 * stub-objc.c (objc_write_global_declarations): New.
8769 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8771 Implemented parsing @synthesize and @dynamic for
8772 Objective-C/Objective-C++.
8773 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8774 (objc_add_synthesize_declaration): New.
8775 (objc_add_dynamic_declaration): New.
8776 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8777 * stub-objc.c (objc_add_synthesize_declaration): New.
8778 (objc_add_dynamic_declaration): New.
8780 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8783 * c-cppbuiltin.c (mode_has_fma): Move function here from
8784 builtins.c. Don't use the fma optab, instead just use the
8785 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8788 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8790 Merge from 'apple/trunk' branch on FSF servers.
8792 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
8795 * c-common.h (objc_non_volatilized_type): New declaration
8796 * stub-objc.c (objc_non_volatilized_type): New stub.
8798 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8800 Merge from 'apple/trunk' branch on FSF servers.
8802 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
8805 * c-common.h (objc_diagnose_private_ivar): New decl.
8806 * stub-objc.c (objc_diagnose_private_ivar): New stub.
8808 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8810 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8811 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8812 (objc_ivar_visibility_kind): New enum.
8813 (objc_set_visibility): Adjust prototype to use visibility enum.
8814 * stub-objc.c (objc_set_visibility): Adjust stub to use
8817 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8819 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8820 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8821 has the appropriate fma builtins.
8822 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8824 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8826 merge from FSF apple 'trunk' branch.
8827 2006 Fariborz Jahanian <fjahanian@apple.com>
8829 Radars 4436866, 4505126, 4506903, 4517826
8830 * c-common.c (c_common_resword): Define @property and its attributes.
8831 * c-common.h: Define property attribute enum entries.
8832 (OBJC_IS_PATTR_KEYWORD): New.
8833 (objc_property_attribute_kind): New enum.
8834 Declare objc_set_property_attr (), objc_add_property_variable (),
8835 objc_build_getter_call () and objc_build_setter_call ().
8836 * stub-objc.c (objc_set_property_attr): New stub.
8837 (objc_add_property_variable): Likewise.
8838 (objc_build_getter_call): Likewise.
8839 (objc_build_setter_call) Likewise.
8841 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8843 merge from FSF apple 'trunk' branch.
8844 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
8846 Radar 3803157 (method attributes)
8847 * c-common.c (handle_deprecated_attribute): Recognize
8848 objc methods as valid declarations.
8849 * c-common.h: Declare objc_method_decl ().
8850 * stub-objc.c (objc_method_decl): New stub.
8852 2010-10-08 Joseph Myers <joseph@codesourcery.com>
8854 * c-common.c (parse_optimize_options): Call
8855 decode_cmdline_options_to_array_default_mask before
8856 decode_options. Update arguments to decode_options.
8857 * c-common.h (c_common_init_options_struct): Declare.
8858 * c-opts.c (c_common_init_options_struct): New. Split out from
8859 c_common_init_options.
8861 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8863 Implemented fast enumeration for Objective-C.
8864 * c-common.h (objc_finish_foreach_loop): New.
8865 * stub-objc.c (objc_finish_foreach_loop): New.
8867 2010-10-05 Joseph Myers <joseph@codesourcery.com>
8869 * c-common.h (struct diagnostic_context): Don't declare here.
8870 (c_common_initialize_diagnostics): Declare using
8871 diagnostic_context typedef.
8872 * c-opts.c (c_common_handle_option): Pass global_dc to
8873 handle_generated_option.
8875 2010-10-04 Joseph Myers <joseph@codesourcery.com>
8877 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8878 handle_generated_option.
8880 2010-10-03 Ian Lance Taylor <iant@google.com>
8882 * c.opt (-fplan9-extensions): New option.
8884 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8886 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8888 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8889 of duplicating code.
8891 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8893 * c-common.c: Add two new entries for @optional
8894 and @required keywords.
8896 merge from FSF 'apple/trunk' branch.
8897 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
8900 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8901 objective-c keywords.
8902 (objc_set_method_opt): New declaration.
8903 * stub-objc.c (objc_set_method_opt): New stub.
8905 2010-09-30 Joseph Myers <joseph@codesourcery.com>
8907 * c-common.c (handle_optimize_attribute): Pass &global_options to
8908 cl_optimization_save and cl_optimization_restore.
8909 * c-opts.c (c_common_handle_option): Pass &global_options to
8910 handle_generated_option.
8911 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8912 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8913 &global_options to cl_optimization_restore.
8915 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8917 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8918 Objective-C/Objective-C++ keywords.
8920 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8922 Merge from 'apple/trunk' branch on FSF servers.
8924 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
8927 * c-common.h (objc_check_global_decl): New declaration.
8928 * stub-objc.c (objc_check_global_decl): New stub.
8930 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8932 * c.opt: Don't use VarExists.
8934 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8936 * c-common.c (c_cpp_error): Update names of diagnostic_context
8938 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8939 cl_optimization members.
8940 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8941 sanitize_cpp_opts, finish_options): Update names of cpp_options
8944 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8946 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8947 (objc_is_reserved_word): Removed.
8948 * c-common.c: Updated comments.
8949 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8950 objc_is_reserved_word.
8951 * stub-objc.c (objc_is_reserved_word): Removed.
8953 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8955 * c-common.h (objc_add_method_declaration): Adjust prototype to
8957 (objc_start_method_definition): Likewise.
8958 (objc_build_keyword_decl): Likewise.
8959 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8960 (objc_start_method_definition): Likewise.
8961 (objc_build_keyword_decl): Likewise.
8963 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8965 * c-common.h (objc_start_class_interface): Adjust prototype.
8966 (objc_start_category_interface): Likewise.
8967 (objc_start_protocol): Likewise.
8968 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8969 (objc_start_class_interface): Likewise.
8970 (objc_start_category_interface): Likewise.
8972 2010-09-27 Ian Lance Taylor <iant@google.com>
8974 * c-common.c (c_common_attribute_table): Add no_split_stack.
8975 (handle_no_split_stack_attribute): New static function.
8977 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8979 Merge from 'apple/trunk' branch on FSF servers.
8981 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
8984 * c-common.h (objc_have_common_type): New declaration.
8985 * stub-objc.c (objc_have_common_type): New stub.
8987 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8990 * c-common.h (objc_common_type): New prototype.
8991 * stub-objc.c (objc_common_type): New stub.
8993 2010-09-24 Jan Hubicka <jh@suse.cz>
8995 * c-common.c (handle_leaf_attribute): New function.
8996 (struct attribute_spec c_common_att): Add leaf.
8998 2010-09-22 Joseph Myers <joseph@codesourcery.com>
9000 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9001 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9002 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9003 -include-barrier, -include-directory, -include-directory=,
9004 -include-directory-after, -include-directory-after=,
9005 -include-prefix, -include-prefix=, -include-with-prefix,
9006 -include-with-prefix=, -include-with-prefix-after,
9007 -include-with-prefix-after=, -include-with-prefix-before,
9008 -include-with-prefix-before=, -no-integrated-cpp,
9009 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9010 -output=, -pedantic, -pedantic-errors, -preprocess,
9011 -print-missing-file-dependencies, -trace-includes, -traditional,
9012 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9013 -user-dependencies, -verbose, -write-dependencies,
9014 -write-user-dependencies, no-integrated-cpp, traditional): New.
9016 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9019 * c-common.h (objc_start_method_definition): Return bool instead
9021 * stub-objc.c (objc_start_method_definition): Return bool instead
9024 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9027 * c-common.h (objc_get_interface_ivars): New declaration.
9028 * stub-objc.c (objc_get_interface_ivars): New stub.
9030 2010-09-15 Ian Lance Taylor <iant@google.com>
9032 * c-common.c (parse_optimize_options): Do not capitalize warning
9033 messages. Remove period at end of warning message.
9035 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9037 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9038 (handle_alias_attribute): ... here.
9039 (handle_ifunc_attribute): New.
9041 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9043 * c-common.h (do_warn_double_promotion): Declare.
9044 * c-common.c (do_warn_double_promotion): Define.
9046 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9048 * c.opt (Wdouble-promotion): New.
9050 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9052 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9053 fvtable-thunks, fxref): Mark no longer supported in help text.
9055 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9057 * c.opt (Wimport, fall-virtual, falt-external-templates,
9058 fdefault-inline, fenum-int-equiv, fexternal-templates,
9059 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9060 fname-mangling-version-, fnew-abi, fnonnull-objects,
9061 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9062 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9064 (fhandle-exceptions): Mark with Alias and Warn.
9065 * c-opts.c (c_common_handle_option): Don't handle options marked
9068 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9070 * c.opt (Wcomments, Werror-implicit-function-declaration,
9071 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9072 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9074 * c-common.c (option_codes): Use OPT_Wcomment instead of
9076 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9077 Don't handle options marked as aliases.
9079 2010-08-25 Richard Guenther <rguenther@suse.de>
9081 * c-common.c (c_common_get_alias_set): Remove special
9082 handling for pointers.
9084 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9086 * c-common.c: Use FOR_EACH_VEC_ELT.
9087 * c-gimplify.c: Likewise.
9088 * c-pragma.c: Likewise.
9090 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9092 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9094 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9096 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9097 instead of OPT_MDX and OPT_MMDX.
9099 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9101 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9103 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9105 * c.opt (MD, MMD): Change to MDX and MMDX.
9106 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9108 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9110 * c-opts.c (c_common_handle_option): Call handle_generated_option
9111 instead of handle_option.
9113 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9115 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9116 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9118 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9120 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9121 (pending_redefine_extname): Change type to a VEC.
9122 (add_to_renaming_pragma_list): Update for new type of
9123 pending_redefine_extname.
9124 (maybe_apply_renaming_pragma): Likewise.
9126 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9128 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9130 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9131 decide whether a type has already been declared/seen.
9132 Do not go to the original type.
9133 (dump_nested_types): New parameter forward.
9134 Generate forward declaration if needed and mark type as visited.
9135 (print_ada_declaration): Call dump_nested_types if not already done.
9136 Mark types as visited.
9138 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9140 * c.opt (-print-pch-checksum): Remove option.
9141 * c-opts.c (c_common_handle_option): Don't handle
9142 OPT_print_pch_checksum.
9144 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9146 * c-common.h (c_common_handle_option): Update prototype and return
9148 * c-opts.c (c_common_handle_option): Update prototype and return
9149 value type. Update calls to handle_option and
9150 enable_warning_as_error.
9152 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9155 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9157 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9159 * c-common.h (c_common_missing_argument): Remove.
9160 * c-opts.c (c_common_missing_argument): Remove.
9161 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9162 idirafter, imacros, include, isysroot, isystem, iquote): Add
9164 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9166 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9168 * c-common.h (c_common_option_lang_mask,
9169 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9171 (c_common_init_options): Update prototype.
9172 * c-opts.c (c_common_option_lang_mask): New.
9173 (c_common_initialize_diagnostics): Split out of
9174 c_common_init_options.
9175 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9177 (c_common_init_options): Update prototype. Use decoded options in
9178 search for -lang-asm.
9180 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9182 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9183 * c-format.c: Likewise.
9185 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9187 * c-common.h: Include diagnostic-core.h. Error if already
9189 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9191 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9193 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9194 Do not include expr.h
9195 (vector_mode_valid_p): Move here.
9197 2010-06-21 DJ Delorie <dj@redhat.com>
9199 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9200 allow these pragmas anywhere.
9202 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9205 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9206 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9207 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9208 ggc_strdup instead of xstrdup.
9210 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9212 * c-cppbuiltin.c: Include cpp-id-data.h.
9213 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9214 (lazy_hex_fp_value): New function.
9215 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9217 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9219 * c-gimplify.c: Do not include tree-flow.h
9221 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9224 * c-common.c: Rename targetm member:
9225 targetm.enum_va_list -> targetm.enum_va_list_p
9227 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9229 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9231 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9233 * c-cppbuiltin.c: Do not include except.h.
9235 2010-06-24 Andi Kleen <ak@linux.intel.com>
9237 * c-common.c (warn_for_omitted_condop): New.
9238 * c-common.h (warn_for_omitted_condop): Add prototype.
9240 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9242 * c.opt (lang-objc): Remove.
9243 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9245 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9247 * c-opts.c: Include "tm_p.h".
9249 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9251 * c-common.c (parse_optimize_options): Update call to
9254 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9256 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9257 new type of types_used_by_cur_var_decl.
9259 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9262 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9263 for C++ standard compliance.
9265 2010-06-16 Jason Merrill <jason@redhat.com>
9267 * c.opt: Add -Wnoexcept.
9269 2010-06-16 Richard Guenther <rguenther@suse.de>
9272 * c-common.c (c_common_truthvalue_conversion): Remove
9273 premature and wrong optimization concering ADDR_EXPRs.
9275 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9277 * c-ada-spec.c (dump_sloc): Remove column info.
9278 (is_simple_enum): New function.
9279 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9280 enum types when relevant.
9282 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9284 * c-common.c (conversion_warning): Warn at expression
9287 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9289 * c-opts.c (c_common_handle_option): Don't handle
9292 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9294 * c-pragma.c (push_alignment): Use typed GC allocation.
9295 (handle_pragma_push_options): Likewise.
9297 * c-common.c (parse_optimize_options): Likewise.
9299 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9302 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9304 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9305 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9306 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9307 flag_signed_bitfields, warn_strict_null_sentinel,
9308 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9309 flag_gen_declaration, flag_no_gnu_keywords,
9310 flag_implement_inlines, flag_implicit_templates,
9311 flag_implicit_inline_templates, flag_optional_diags,
9312 flag_elide_constructors, flag_default_inline, flag_rtti,
9313 flag_conserve_space, flag_access_control, flag_check_new,
9314 flag_new_for_scope, flag_weak, flag_working_directory,
9315 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9316 flag_enforce_eh_specs, flag_threadsafe_statics,
9317 flag_pretty_templates): Remove.
9318 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9319 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9320 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9321 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9322 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9323 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9324 flag_no_gnu_keywords, flag_implement_inlines,
9325 flag_implicit_templates, flag_implicit_inline_templates,
9326 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9327 flag_rtti, flag_conserve_space, flag_access_control,
9328 flag_check_new, flag_new_for_scope, flag_weak,
9329 flag_working_directory, flag_use_cxa_atexit,
9330 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9331 flag_threadsafe_statics, flag_pretty_templates,
9332 warn_strict_null_sentinel): Remove.
9333 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9334 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9335 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9336 fimplicit-inline-templates, fimplicit-templates,
9337 flax-vector-conversions, fms-extensions, fnil-receivers,
9338 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9339 frtti, fshort-double, fshort-enums, fshort-wchar,
9340 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9341 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9342 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9343 gen-decls, undef): Use Var.
9344 (fdefault-inline, foptional-diags): Document as doing nothing.
9345 * c-opts.c (c_common_handle_option): Remove cases for options now
9346 using Var. Mark ignored options as such.
9348 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9350 * c-common.c: Moved to here from parent directory.
9351 * c-common.def: Likewise.
9352 * c-common.h: Likewise.
9353 * c-cppbuiltin.c: Likewise.
9354 * c-dump.c: Likewise.
9355 * c-format.c: Likewise.
9356 * c-format.h : Likewise.
9357 * c-gimplify.c: Likewise.
9358 * c-lex.c: Likewise.
9359 * c-omp.c: Likewise.
9361 * c-opts.c: Likewise.
9362 * c-pch.c: Likewise.
9363 * c-ppoutput.c: Likewise.
9364 * c-pragma.c: Likewise.
9365 * c-pragma.h: Likewise.
9366 * c-pretty-print.c: Likewise.
9367 * c-pretty-print.h: Likewise.
9368 * c-semantics.c: Likewise.
9369 * stub-objc.c: Likewise.
9371 * c-common.c: Include gt-c-family-c-common.h.
9372 * c-pragma.c: Include gt-c-family-c-pragma.h.
9374 Copyright (C) 2010-2018 Free Software Foundation, Inc.
9376 Copying and distribution of this file, with or without modification,
9377 are permitted in any medium without royalty provided the copyright
9378 notice and this notice are preserved.