1 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3 * c-format.c (format_warning_at_char): Update for introduction of
4 format_string_diagnostic_t.
5 (format_type_warning): Likewise.
7 2018-09-17 Martin Jambor <mjambor@suse.cz>
10 * c.opt (Wabsolute-value): New.
12 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
14 * c-common.c (complete_flexible_array_elts): New helper function.
15 * c-common.h (complete_flexible_array_elts): Declare.
17 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
19 * c-common.c (braced_list_to_string): Remove eval parameter.
20 Add some more checks. Always create zero-terminated STRING_CST.
21 * c-common.h (braced_list_to_string): Adjust prototype.
23 2018-08-27 David Malcolm <dmalcolm@redhat.com>
26 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
28 (maybe_suggest_missing_token_insertion): Likewise.
29 (maybe_add_include_fixit): Add param "override_location". If set,
30 and source-printing is enabled, then override the rich_location's
31 primary location with that of the insertion point for the fix-it
32 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
33 * c-common.h (extern void maybe_add_include_fixit): Add bool
35 * c-format.c (selftest::test_type_mismatch_range_labels): Update
36 for conversion of show_caret_p to a tri-state.
37 * c-warn.c (warn_for_restrict): Likewise.
39 (suggest_missing_header::~suggest_missing_header): Update call to
40 maybe_add_include_fixit to suggest overriding the location, as it
43 2018-08-27 Martin Liska <mliska@suse.cz>
45 * c-common.c (check_function_restrict): Use new function
46 fndecl_built_in_p and remove check for FUNCTION_DECL if
48 (check_builtin_function_arguments): Likewise.
49 (reject_gcc_builtin): Likewise.
50 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
52 2018-08-26 Marek Polacek <polacek@redhat.com>
54 PR c++/87029, Implement -Wredundant-move.
55 * c.opt (Wredundant-move): New option.
57 2018-08-21 Marek Polacek <polacek@redhat.com>
59 PR c++/86981, Implement -Wpessimizing-move.
60 * c.opt (Wpessimizing-move): New option.
62 2018-08-20 David Malcolm <dmalcolm@redhat.com>
65 * c-attribs.c (common_handle_aligned_attribute): Add
66 auto_diagnostic_group instance.
67 * c-indentation.c (warn_for_misleading_indentation): Likewise.
68 * c-opts.c (c_common_post_options): Likewise.
69 * c-warn.c (warn_logical_not_parentheses): Likewise.
70 (warn_duplicated_cond_add_or_warn): Likewise.
71 (warn_for_multistatement_macros): Likewise.
73 2018-08-20 Nathan Sidwell <nathan@acm.org>
75 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
78 2018-08-17 Nathan Sidwell <nathan@acm.org>
80 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
82 (laxy_hex_fp_value_count): Make unsigned.
83 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
85 (builtin_defin_with_hex_fp_value): Adjust callback name, use
88 2018-08-17 David Malcolm <dmalcolm@redhat.com>
90 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
91 (gcc_dump_printf_length_specs): New.
92 (gcc_dump_printf_flag_pairs): New.
93 (gcc_dump_printf_flag_specs): New.
94 (gcc_dump_printf_char_table): New.
95 (format_types_orig): Add entry for "gcc_dump_printf".
96 (init_dynamic_diag_info): Set up length_char_specs and
97 conversion_specs for gcc_dump_printf_format_type.
98 (handle_format_attribute): Handle gcc_dump_printf_format_type.
100 2018-08-17 Nathan Sidwell <nathan@acm.org>
102 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
104 * c-ada-spec.c: Don't #include "cpp-id-data.h"
105 * c-cppbuiltin.c: Likewise.
107 2018-08-17 Martin Liska <mliska@suse.cz>
109 * c.opt: Remove Warn, Init and Report for options with
110 Ignore/Deprecated flag. Warning is done automatically for
113 2018-08-16 David Malcolm <dmalcolm@redhat.com>
116 * c-common.c (selftest::c_family_tests): Call
117 selftest::c_indentation_c_tests.
118 * c-common.h (selftest::c_indentation_c_tests): New decl.
119 * c-indentation.c: Include "selftest.h".
120 (next_tab_stop): Add "tab_width" param, rather than accessing
122 (get_visual_column): Likewise. Clarify comment. Bulletproof
123 against reading past the end of the line.
124 (get_first_nws_vis_column): Add "tab_width" param.
125 (detect_intervening_unindent): Likewise.
126 (should_warn_for_misleading_indentation): Read tab width from
127 cpp_opts and pass around.
128 (selftest::test_next_tab_stop): New test.
129 (selftest::assert_get_visual_column_succeeds): New function.
130 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
131 (selftest::assert_get_visual_column_fails): New function.
132 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
133 (selftest::test_get_visual_column): New test.
134 (selftest::c_indentation_c_tests): New function.
136 2018-08-16 Nathan Sidwell <nathan@acm.org>
138 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
139 (store_ada_macro): Likewise.
140 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
141 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
143 2018-08-15 David Malcolm <dmalcolm@redhat.com>
145 * c-format.c: Include "selftest-diagnostic.h" and
146 "gcc-rich-location.h".
147 (format_warning_at_char): Pass NULL for new label params of
149 (class indirection_suffix): New class.
150 (class range_label_for_format_type_mismatch): New class.
151 (format_type_warning): Move logic for generating "*" suffix to
152 class indirection_suffix. Create "fmt_label" and "param_label"
153 to show their types, and pass them to the
154 format_warning_at_substring calls.
155 (selftest::test_type_mismatch_range_labels): New test.
156 (selftest::c_format_c_tests): Call it.
158 2018-08-13 Martin Sebor <msebor@redhat.com>
160 PR tree-optimization/71625
161 * c-common.c (braced_list_to_string): New function.
162 * c-common.h (braced_list_to_string): Declare it.
164 2018-08-08 Nathan Sidwell <nathan@acm.org>
166 * c-common.c (try_to_locate_new_include_inertion_point): Use
167 linemap_included_from_linemap.
168 * c-lex.c (fe_file_change): Use linemap_included_from.
169 * c-ppoutput.c (pp_file_change): Likewise.
171 2018-08-01 Martin Sebor <msebor@redhat.com>
173 PR tree-optimization/86650
174 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
175 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
176 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
177 * c-format.h (T89_G): Update to be "gimple *" rather than
179 (local_gcall_ptr_node): Rename...
180 (local_gimple_ptr_node): ...to this.
182 2018-07-31 David Malcolm <dmalcolm@redhat.com>
184 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
185 table entries for gcc_diag_char_table, and the 'Z' entry from
186 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
187 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
188 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
189 adding missing "Z" for this table. Remove erroneous "G" and "K"
191 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
192 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
193 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
195 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
197 * c-common.c (speculation_safe_resolve_call): New function.
198 (speculation_safe_resolve_params): New function.
199 (speculation_safe_resolve_return): New function.
200 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
201 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
202 __HAVE_SPECULATION_SAFE_VALUE.
204 2018-07-20 David Malcolm <dmalcolm@redhat.com>
206 * c-common.c (c_cpp_error): Remove redundant "line_table"
207 parameter from call to rich_location::set_range.
208 (maybe_suggest_missing_token_insertion): Likewise.
210 2018-07-20 Martin Sebor <msebor@redhat.com>
213 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
215 2018-07-20 Martin Sebor <msebor@redhat.com>
218 * c-common.h (c_common_handle_option): Change function argument
220 * c-opts.c (c_common_init_options): Same.
221 (c_common_handle_option): Same. Remove special handling of
222 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
223 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
224 options to take a HOST_WIDE_INT argument and accept a byte-size
226 (-Wvla-larger-than): Same.
227 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
228 (-Wno-vla-larger-than): Same.
230 2018-07-12 Jakub Jelinek <jakub@redhat.com>
232 * c-attribs.c (c_common_attribute_table): Add
233 "omp declare target implicit" attribute.
235 2018-07-12 Richard Biener <rguenther@suse.de>
238 * c-attribs.c (handle_packed_attribute): Do not build a variant
239 type with TYPE_PACKED, instead ignore the attribute if we may
240 not apply to the original type.
242 2018-07-10 Jakub Jelinek <jakub@redhat.com>
245 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
246 to contain TREE_LIST for both the original class iterator and the
249 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
251 * c-ada-spec.c (to_ada_name): Remove index parameter.
252 (pp_ada_tree_identifier): Likewise.
253 (dump_ada_macros): Adjust call to to_ada_name.
254 (struct overloaded_name_hash): Delete.
255 (struct overloaded_name_hasher): Likewise.
256 (overloaded_names): Likewise.
257 (compute_overloading_index): Likewise.
258 (dump_ada_decl_name): Do not call compute_overloading_index and
259 adjust calls to pp_ada_tree_identifier.
260 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
261 (dump_ada_import): Add spc parameter and switch to aspect syntax.
262 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
263 (dump_ada_enum_type): Remove type and display_convention parameters.
264 Adjust calls to pp_ada_tree_identifier.
265 (dump_ada_node): Likewise and for dump_ada_structure.
266 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
268 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
270 (print_constructor): Adjust call to pp_ada_tree_identifier.
271 (print_destructor): Likewise.
272 (dump_ada_declaration): Switch to aspect syntax.
273 (dump_ada_structure): Likewise and tidy up. Replace display_convention
274 parameter with nested parameter.
275 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
276 (dump_ada_specs): Do not delete overloaded_names table.
278 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
281 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
284 2018-07-05 Nathan Sidwell <nathan@acm.org>
286 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
287 NO_IMPLICIT_EXTERN_C.
289 2018-06-28 Martin Liska <mliska@suse.cz>
291 * cppspec.c: Include opt-suggestions.h.
293 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
294 Thomas Schwinge <thomas@codesourcery.com>
295 Cesar Philippidis <cesar@codesourcery.com>
297 * c-pragma.h (enum pragma_omp_clause): Add
298 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
299 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
301 2018-06-20 Jakub Jelinek <jakub@redhat.com>
304 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
307 2018-06-18 Martin Sebor <msebor@redhat.com>
310 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
313 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
315 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
317 2018-06-13 Jason Merrill <jason@redhat.com>
319 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
320 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
323 PR c++/86094 - wrong code with defaulted move ctor.
324 * c-opts.c (c_common_post_options): Bump the current ABI version to
325 13. Set warn_abi_version and flag_abi_compat_version to the current
326 version rather than 0. Fix defaulting flag_abi_compat_version from
329 2018-06-12 Martin Sebor <msebor@redhat.com>
332 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
333 sizeof source and destination yields the same value.
335 2018-06-12 Martin Liska <mliska@suse.cz>
337 * c.opt: Make MPX-related options as Deprecated.
339 2018-06-08 David Malcolm <dmalcolm@redhat.com>
341 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
344 2018-06-08 Martin Liska <mliska@suse.cz>
346 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
347 for MPX (macros, related functions, fields in cgraph_node, ...).
348 (handle_bnd_legacy): Likewise.
349 (handle_bnd_instrument): Likewise.
352 2018-06-06 Jakub Jelinek <jakub@redhat.com>
355 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
356 __cpp_transactional_memory to 201500 instead of 210500.
358 2018-06-06 Jason Merrill <jason@redhat.com>
360 PR c++/85710 - ICE with -Wmemset-elt-size.
361 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
363 2018-06-01 Jason Merrill <jason@redhat.com>
365 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
368 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
370 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
371 declaration for a typedef independently of whether the declaration of
372 the subtype is generated.
374 2018-05-31 Martin Sebor <msebor@redhat.com>
377 * c.opt (-Wno-alloc-size-larger-than): New option.
379 2018-04-22 David Pagan <dave.pagan@oracle.com>
382 * c-opts.c (c_common_post_options): Set default for warn_return_type
383 for C++/C++ with ObjC extensions only. For C, makes it possible to
384 differentiate between default (no option), -Wreturn-type, and
387 2018-05-29 Jason Merrill <jason@redhat.com>
389 * c.opt (Winit-list-lifetime): New flag.
391 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
393 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
394 splay_tree_delete_pointers.
396 2018-05-26 Jakub Jelinek <jakub@redhat.com>
399 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
400 noinline variable to workaround broken kernel headers.
402 2018-05-18 Jason Merrill <jason@redhat.com>
404 * c.opt (Wdeprecated-copy): New flag.
406 2018-05-17 Martin Liska <mliska@suse.cz>
408 * c-warn.c (overflow_warning): Do not use
409 space in between 'G_' and '('.
411 2018-05-09 Jason Merrill <jason@redhat.com>
413 * c-common.c (valid_array_size_p): Add complain parameter.
414 * c-common.h: ...which defaults to true.
416 2018-05-11 Jakub Jelinek <jakub@redhat.com>
419 * c-omp.c (c_omp_predetermined_sharing): Return
420 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
422 2018-05-11 Martin Liska <mliska@suse.cz>
425 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
428 2018-05-10 Jakub Jelinek <jakub@redhat.com>
431 * c-common.h (fold_offsetof_1): Removed.
432 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
433 CTX argument defaulted to ERROR_MARK.
434 * c-common.c (fold_offsetof_1): Renamed to ...
435 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
436 argument, convert the pointer constant to TYPE and use size_binop
437 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
438 a pointer type. Adjust recursive calls.
440 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
443 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
445 2018-05-07 Nathan Sidwell <nathan@acm.org>
447 * c.opt (ffor-scope): Remove functionality, issue warning.
449 2018-05-03 Nathan Sidwell <nathan@acm.org>
451 * c.opt (ffriend-injection): Remove functionality, issue warning.
453 2018-05-01 David Malcolm <dmalcolm@redhat.com>
456 * c-format.c (struct format_check_results): Add field
458 (check_format_info): Initialize it, and warn if encountered.
459 (check_format_arg): Distinguish between wide char and
460 everything else when detecting arrays of non-char.
462 2018-04-30 David Malcolm <dmalcolm@redhat.com>
464 * c-format.c (get_corrected_substring): Update for
465 location_get_source_line returning a char_span. Use a char_span
466 when handling the prefix of the correction.
467 * c-indentation.c (get_visual_column): Update for
468 location_get_source_line returning a char_span.
469 (get_first_nws_vis_column): Likewise.
471 2018-03-29 David Malcolm <dmalcolm@redhat.com>
474 * known-headers.cc (get_stdlib_header_for_name): Add various names
475 from <assert.h>, <string.h>, and <memory.h>; add more names from
478 2018-03-27 Jakub Jelinek <jakub@redhat.com>
481 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
482 get_base_address of the second operand is a VAR_P, rather than the
483 operand itself, and use gcc_checking_assert instead of gcc_assert.
485 2018-03-23 Marek Polacek <polacek@redhat.com>
488 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
489 <case RDIV_EXPR>: Tweak condition.
491 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
493 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
495 2018-03-16 Jakub Jelinek <jakub@redhat.com>
498 * c-warn.c (conversion_warning): Replace "to to" with "to" in
502 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
505 2018-03-16 Richard Biener <rguenther@suse.de>
508 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
509 unshare the possibly folded expression.
511 2018-03-15 Richard Biener <rguenther@suse.de>
514 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
516 2018-03-13 Martin Sebor <msebor@redhat.com>
518 PR tree-optimization/84725
519 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
520 with all three narrow character types, including their qualified forms.
522 2018-03-12 Martin Sebor <msebor@redhat.com>
524 PR tree-optimization/83456
525 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
526 Restore checking of bounded built-in functions.
527 (check_function_arguments): Also return the result
528 of warn_for_restrict.
529 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
530 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
532 2018-03-02 Marek Polacek <polacek@redhat.com>
535 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
538 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
540 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
543 2018-03-01 Marek Polacek <polacek@redhat.com>
546 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
547 alignment in computation.
549 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
551 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
552 <REAL_TYPE>: Deal specifically with _Float128/__float128.
554 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
556 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
557 (is_char_array): Take a type instead of a declaration.
558 (dump_ada_array_type): Likewise.
559 (is_simple_enum): Minor tweak.
560 (dump_ada_enum_type): New function extracted from...
561 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
562 <INTEGER_TYPE>: Remove unreachable code.
563 <RECORD_TYPE>: Likewise. Minor tweaks.
564 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
565 <ENUMERAL_TYPE>: New case.
566 <RECORD_TYPE>: Factor out common code.
567 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
568 Minor tweaks. Deal with enumeral types.
569 (dump_ada_structure): Minor tweaks.
571 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
573 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
574 address for incomplete structures.
575 (dump_forward_type): Do not bail out for incomplete structures.
576 (dump_ada_declaration): Do not special-case incomplete structures
577 for subtypes. Dump them as null records for types.
579 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
581 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
582 (is_char_array): Fix formatting.
583 (dump_template_types): Likewise.
584 (dump_generic_ada_node): Rename into...
585 (dump_ada_node): ...this.
586 <POINTER_TYPE>: Remove superfluous space. Use generic address for
587 incomplete structures and not for empty structures. Do not use it
588 when forward declarations are needed.
589 (dump_forward_type): New function.
590 (dump_nested_types): Remove FORWARD parameter. Do not consider
591 TREE_VISITED and do not generate a forward declaration. Only dump
592 original nested types for nested declaration.
593 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
594 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
595 <RECORD_TYPE>: Do not consider TREE_VISITED.
596 (dump_ada_declaration): Use booleans and fix formatting throughout.
597 <TYPE_DECL>: Skip incomplete structures and not empty structures.
598 Call dump_forward_type instead of dump_nested_types for a typedef.
599 Remove superfluous check and adjust call to dump_nested_types.
600 <POINTER_TYPE>: Call dump_forward_type and fall through.
601 (dump_ada_struct_decl): Rename into...
602 (dump_ada_structure): ...this. Do not special-case empty structures.
604 2018-02-27 Martin Sebor <msebor@redhat.com>
607 * c.opt (-Wmissing-attributes): New option.
609 2018-02-21 Martin Liska <mliska@suse.cz>
611 * c.opt (Wcatch-value=): Add IntegerRange.
613 2018-02-15 Jason Merrill <jason@redhat.com>
615 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
617 2018-02-09 Nathan Sidwell <nathan@acm.org>
620 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
622 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
625 2018-02-09 Martin Sebor <msebor@redhat.com>
628 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
629 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
630 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
631 (-Wstrict-overflow, -Wsuggest-attribute): Same.
632 (-Wuninitialized): Same.
634 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
636 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
637 keyword for components.
639 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
641 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
643 2018-02-02 Julia Koval <julia.koval@intel.com>
645 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
647 2018-01-29 Marek Polacek <polacek@redhat.com>
650 * c-format.c (check_function_format): Check current_function_decl.
652 2018-01-27 Jakub Jelinek <jakub@redhat.com>
654 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
656 (LAZY_HEX_FP_VALUES_CNT): Define.
657 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
658 values rather than just 12.
659 (builtin_define_with_hex_fp_value): Likewise.
661 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
664 * c.opt (-fmacro-prefix-map): New option.
665 * c-opts.c (c_common_handle_option): Handle it.
666 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
667 * c-ppoutput.c (init_pp_output): Likewise.
669 2018-01-17 David Malcolm <dmalcolm@redhat.com>
672 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
674 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
676 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
677 Skip 'f' and 'F' characters if it is true.
678 (store_ada_macro): Minor tweak.
679 (dump_ada_macros) <CPP_COMMENT>: Likewise.
680 <CPP_WSTRING>: Likewise.
681 <CPP_STRING>: Output '&' in the buffer if not the first string.
682 <CPP_NUMBER>: Adjust calls to dump_number.
684 2018-01-10 David Malcolm <dmalcolm@redhat.com>
687 * c-common.c: Include "selftest.h".
688 (get_atomic_generic_size): Perform the test for integral type
689 before the range test for any integer constant, fixing indentation
690 of braces. Call fold_for_warn before testing for an INTEGER_CST.
691 (reject_gcc_builtin): Strip any location wrapper from EXPR.
692 (selftest::test_fold_for_warn): New function.
693 (selftest::c_common_c_tests): New function.
694 (selftest::c_family_tests): Call it, and
695 selftest::c_pretty_print_c_tests.
696 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
697 * c-format.c (check_format_arg): Convert VAR_P check to a
699 * c-pretty-print.c: Include "selftest.h".
700 (pp_c_cast_expression): Don't print casts for location wrappers.
701 (selftest::assert_c_pretty_printer_output): New function.
702 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
703 (selftest::test_location_wrappers): New function.
704 (selftest::c_pretty_print_c_tests): New function.
705 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
707 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
708 Alan Hayward <alan.hayward@arm.com>
709 David Sherwood <david.sherwood@arm.com>
711 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
714 Alan Hayward <alan.hayward@arm.com>
715 David Sherwood <david.sherwood@arm.com>
717 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
721 Alan Hayward <alan.hayward@arm.com>
722 David Sherwood <david.sherwood@arm.com>
724 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
725 (convert_vector_to_array_for_subscript): Handle polynomial
726 TYPE_VECTOR_SUBPARTS.
727 (c_common_type_for_mode): Check valid_vector_subparts_p.
728 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
731 2018-01-03 Jakub Jelinek <jakub@redhat.com>
733 Update copyright years.
735 2017-12-22 Mike Stump <mikestump@comcast.net>
736 Eric Botcazou <ebotcazou@adacore.com>
738 * c-pragma.c (init_pragma): Register pragma GCC unroll.
739 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
741 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
745 * c-semantics.c (only_debug_stmts_after_p): New.
746 (pop_stmt_list): Clear side effects in debug-only stmt list.
747 Check for single nondebug stmt followed by debug stmts only.
749 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
752 * c-semantics.c (pop_stmt_list): Propagate side effects from
753 single nondebug stmt to container list.
755 2017-12-19 Jakub Jelinek <jakub@redhat.com>
757 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
758 conditions with typical order conditions.
760 2017-12-18 Marek Polacek <polacek@redhat.com>
762 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
765 2017-12-17 Martin Sebor <msebor@redhat.com>
767 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
768 an error for attribute warn_if_not_aligned.
770 2017-12-16 Martin Sebor <msebor@redhat.com>
772 PR tree-optimization/78918
773 * c-common.c (check_function_restrict): Avoid checking built-ins.
774 * c.opt (-Wrestrict): Include in -Wall.
776 2017-12-15 Jakub Jelinek <jakub@redhat.com>
778 * c-attribs.c (c_common_attribute_table,
779 c_common_format_attribute_table): Swap affects_type_identity
780 and handler fields, adjust comments.
782 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
784 * c.opt (Wcast-function-type): New warning option.
785 * c-lex.c (get_fileinfo): Avoid warning.
786 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
788 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
791 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
792 Adjust the size of buf1 and buf2, add a new buf to avoid
793 format-overflow warning.
795 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
797 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
798 subsequent statement list.
800 2017-12-07 Martin Sebor <msebor@redhat.com>
804 * c-attribs.c (attr_aligned_exclusions): New array.
805 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
806 (attr_common_exclusions, attr_const_pure_exclusions): Same.
807 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
808 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
809 (attr_warn_unused_result_exclusions): Same.
810 (handle_hot_attribute, handle_cold_attribute): Simplify.
811 (handle_const_attribute): Warn on function returning void.
812 (handle_pure_attribute): Same.
813 (handle_aligned_attribute): Diagnose conflicting attribute
815 * c-warn.c (diagnose_mismatched_attributes): Simplify.
817 2017-12-06 David Malcolm <dmalcolm@redhat.com>
820 * c-common.c (selftest::c_family_tests): Call
821 selftest::c_spellcheck_cc_tests.
822 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
823 * c-spellcheck.cc: Include "selftest.h".
824 (name_reserved_for_implementation_p): New function.
825 (should_suggest_as_macro_p): New function.
826 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
827 should_suggest_as_macro_p and call it.
828 (selftest::test_name_reserved_for_implementation_p): New function.
829 (selftest::c_spellcheck_cc_tests): New function.
830 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
832 2017-12-06 David Malcolm <dmalcolm@redhat.com>
834 * c-spellcheck.cc: New file, taken from macro-handling code in
836 * c-spellcheck.h: New file, taken from macro-handling code in
839 2017-12-01 Jakub Jelinek <jakub@redhat.com>
841 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
843 (handle_simd_attribute): Don't check for "cilk simd function"
844 attribute. Reindent, formatting changes.
846 2017-11-30 Julia Koval <julia.koval@intel.com>
848 * c-common.h (inv_list): Remove.
850 2017-11-28 Jakub Jelinek <jakub@redhat.com>
853 * c-common.c (c_switch_covers_all_cases_p_1,
854 c_switch_covers_all_cases_p): New functions.
855 * c-common.h (c_switch_covers_all_cases_p): Declare.
857 2017-11-28 Julia Koval <julia.koval@intel.com>
858 Sebastian Peryt <sebastian.peryt@intel.com>
860 * array-notation-common.c: Delete.
861 * c-cilkplus.c: Ditto.
862 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
863 * c-common.def (ARRAY_NOTATION_REF): Remove.
864 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
865 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
866 c_validate_cilk_plus_loop, cilkplus_an_parts,
867 cilk_ignorable_spawn_rhs_op,
868 cilk_recognize_spawn): Remove.
869 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
870 * c-omp.c: Remove CILK_SIMD check.
872 * c-pragma.h: Remove CILK related pragmas.
873 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
874 ARRAY_NOTATION_REF condition.
875 (c_pretty_printer::expression): Ditto.
876 * c.opt (fcilkplus): Remove.
879 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
881 * c-pretty-print.c (pp_c_additive_expression,
882 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
884 2017-11-21 Jakub Jelinek <jakub@redhat.com>
886 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
889 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
890 instead of tree_to_uhwi, formatting fix.
892 2017-11-20 David Malcolm <dmalcolm@redhat.com>
895 * known-headers.cc: New file, based on material from c/c-decl.c.
896 (suggest_missing_header): Copied as-is.
897 (get_stdlib_header_for_name): New, based on get_c_name_hint but
898 heavily edited to add C++ support. Add some knowledge about
899 <limits.h>, <stdint.h>, and <wchar.h>.
900 * known-headers.h: Likewise.
902 2017-11-20 David Malcolm <dmalcolm@redhat.com>
904 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
905 (lookup_name_fuzzy): Likewise. Convert return type from
906 const char * to name_hint. Add location_t param.
907 * name-hint.h: New header.
909 2017-11-19 Jakub Jelinek <jakub@redhat.com>
913 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
915 2017-11-16 Joseph Myers <joseph@codesourcery.com>
917 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
918 expected publication date of C17.
919 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
921 2017-11-15 Joseph Myers <joseph@codesourcery.com>
924 * c-common.c (c_common_reswords): Add __builtin_tgmath.
925 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
927 2017-11-10 Martin Sebor <msebor@redhat.com>
930 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
931 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
932 * c.opt (-Wstringop-truncation): New option.
934 2017-11-06 Martin Liska <mliska@suse.cz>
937 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
939 * c.opt: Set default value of warn_return_type.
941 2017-10-31 David Malcolm <dmalcolm@redhat.com>
943 * c-common.c (binary_op_error): Update for renaming of
945 (c_parse_error): Likewise.
946 * c-warn.c (warn_logical_not_parentheses): Likewise for
947 renaming of inform_at_rich_loc.
948 (warn_for_restrict): Likewise for renaming of
949 warning_at_rich_loc_n.
951 2017-10-30 Joseph Myers <joseph@codesourcery.com>
953 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
954 * c-opts.c (set_std_c17): New function.
955 (c_common_init_options): Use gnu17 as default C version.
956 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
958 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
960 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
961 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
962 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
965 2017-10-23 Marek Polacek <polacek@redhat.com>
968 * c-warn.c (warnings_for_convert_and_check): Fix typos.
970 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
972 * c-common.c (check_builtin_function_arguments): Also check arguments
973 of __builtin_alloca_with_align_and_max.
975 2017-10-17 David Malcolm <dmalcolm@redhat.com>
977 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
978 rather than NULL to format_warning_va.
979 (check_format_types): Likewise when calling format_type_warning.
980 Remove code to extract source_ranges and source_range * in favor
981 of just a location_t.
982 (format_type_warning): Convert source_range * param to a
985 2017-10-13 Jakub Jelinek <jakub@redhat.com>
987 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
990 2017-10-12 David Malcolm <dmalcolm@redhat.com>
992 * c-common.c (enum missing_token_insertion_kind): New enum.
993 (get_missing_token_insertion_kind): New function.
994 (maybe_suggest_missing_token_insertion): New function.
995 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
997 2017-10-11 Nathan Sidwell <nathan@acm.org>
999 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1000 (c_common_handle_option): Update incpath_kind names.
1002 2017-10-11 Martin Liska <mliska@suse.cz>
1005 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1006 Wattributes warning.
1008 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1010 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1011 operating on trees as wide_ints.
1012 * c-common.c (pointer_int_sum): Likewise.
1013 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1014 * c-warn.c (match_case_to_enum_1): Likewise.
1015 (c_do_switch_warnings): Likewise.
1016 (maybe_warn_shift_overflow): Likewise.
1018 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1021 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1022 instead of wide_int::from.
1024 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1027 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1028 using to_widest use wide_int with the larger of the two precisions.
1030 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1032 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1035 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1037 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1038 when combining the original unconverted comparison operands.
1040 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1042 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1045 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1047 * c-ada-spec.c (to_ada_name): Add index parameter.
1048 (pp_ada_tree_identifier): Likewise.
1049 (dump_ada_macros): Adjust call to to_ada_name.
1050 (struct overloaded_name_hash): New type.
1051 (struct overloaded_name_hasher): Likewise.
1052 (overloaded_names): New hash table.
1053 (compute_overloading_index): New function.
1054 (dump_ada_decl_name): Call it and pass the result to
1055 pp_ada_tree_identifier.
1056 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1057 (dump_ada_function_declaration): Likewise.
1058 (dump_generic_ada_node): Likewise.
1059 (print_constructor): Likewise.
1060 (print_destructor): Likewise.
1061 (dump_ada_specs): Delete overloaded_names table.
1063 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1065 * c-ada-spec.c (max_ada_macros): Move around.
1066 (store_ada_macro_index): Likewise.
1067 (source_file): Rename into...
1068 (macro_source_file): ...this.
1069 (count_ada_macro): Move around.
1070 (store_ada_macro): Likewise.
1071 (compare_macro): Likewise.
1072 (print_ada_macros): Merge in...
1073 (dump_ada_macros): ...this.
1074 (source_file_base): Rename into...
1075 (current_source_file): ...this.
1076 (print_comment): Move around.
1077 (dump_ada_nodes): Call dump_ada_declaration directly.
1078 (struct with): Change type of limited field to bool.
1079 (append_withs): Change type of limited_access parameter to bool.
1080 (pp_ada_tree_identifie): Likewise.
1081 (dump_ada_decl_nam): Likewise.
1082 (dump_generic_ada_node): Likewise. Do not print the return type.
1083 (to_ada_name): Change type of space_found parameter to bool.
1084 (dump_ada_function_declaration): Return void and change type of
1085 parameters to bool. Also print the return type for a function.
1086 (print_ada_methods): Rename into...
1087 (dump_ada_methods): ...this.
1088 (print_ada_declaration): Rename into ...
1089 (dump_ada_declaration): ...this. Do not print the return type.
1090 (print_ada_struct_decl): Rename into...
1091 (dump_ada_struct_decl): ...this.
1093 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1095 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1096 rather than DECL_INITIAL.
1097 (common_handle_aligned_attribute): Likewise.
1099 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1101 * c.opt (gen-decls): Add RejectNegative.
1103 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1104 Jakub Jelinek <jakub@redhat.com>
1106 Add support for -std=c++2a.
1107 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1108 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1109 * c-opts.c (set_std_cxx2a): New.
1110 (c_common_handle_option): Set options when -std=c++2a is enabled.
1111 (c_common_post_options): Adjust comments.
1112 (set_std_cxx14, set_std_cxx17): Likewise.
1114 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1116 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1117 message for non-uniform endianness and issue a warning in C++.
1119 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1121 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1122 (Wc++17-compat): Change from undocumented alias to option.
1123 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1124 change C++1z to C++17 in description.
1125 (std=c++1z, std=gnu++1z): Change from option to undocumented
1127 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1129 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1130 * c-opts.c (set_std_cxx1z): Rename to ...
1131 (set_std_cxx17): ... this.
1132 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1133 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1135 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1138 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1140 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1141 function alignment if warn_if_not_aligned_p is true.
1143 2017-09-12 Nathan Sidwell <nathan@acm.org>
1145 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1146 resort_sorted_fields): Move to c/c-decl.c.
1147 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1148 (struct sorted_fields_type): Move to c/c-lang.h.
1150 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1153 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1155 2017-09-04 Marek Polacek <polacek@redhat.com>
1158 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1159 (warn_tautological_cmp): Call it.
1161 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1163 * c-opts.c (c_common_finish): Write dependency information even if
1166 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1169 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1170 (omp_pragmas_simd): ... here.
1171 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1172 create new clauses list containing just simd clause.
1174 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1175 Alan Hayward <alan.hayward@arm.com>
1176 David Sherwood <david.sherwood@arm.com>
1178 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1179 into scalar_mode_supported_p call.
1180 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1182 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1183 Alan Hayward <alan.hayward@arm.com>
1184 David Sherwood <david.sherwood@arm.com>
1186 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1187 for the mode iterator.
1189 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1190 Alan Hayward <alan.hayward@arm.com>
1191 David Sherwood <david.sherwood@arm.com>
1193 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1194 * c-common.c (c_build_vec_perm_expr): Likewise.
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_type_for_mode): Use as_a <scalar_int_mode>.
1202 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1203 Alan Hayward <alan.hayward@arm.com>
1204 David Sherwood <david.sherwood@arm.com>
1206 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1207 before calling targetm.addr_space.valid_pointer_mode.
1209 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1210 Alan Hayward <alan.hayward@arm.com>
1211 David Sherwood <david.sherwood@arm.com>
1213 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1215 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1216 Alan Hayward <alan.hayward@arm.com>
1217 David Sherwood <david.sherwood@arm.com>
1219 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1221 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
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 (mode_has_fma): Prefix mode names with E_ in
1230 2017-08-29 Martin Liska <mliska@suse.cz>
1233 * c-common.c (parse_optimize_options): Add argument to function
1235 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1237 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1239 * c-lex.c (interpret_float): Use token location
1240 when building an EXCESS_PRECISION_EXPR.
1242 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1244 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1245 it to check_function_format.
1246 * c-common.h (check_function_arguments): Add vec<location_t> *
1248 (check_function_format): Likewise.
1249 * c-format.c (struct format_check_context): Add field "arglocs".
1250 (check_function_format): Add param "arglocs"; pass it to
1252 (check_format_info): Add param "arglocs"; use it to initialize
1253 new field of format_ctx.
1254 (check_format_arg): Pass format_ctx->arglocs to new param of
1255 check_format_info_main.
1256 (class argument_parser): New field "arglocs".
1257 (argument_parser::argument_parser): Add "arglocs_" param and use
1258 it to initialize new field.
1259 (argument_parser::check_argument_type): Pass new arglocs field to
1261 (check_format_info_main): Add param "arglocs", and use it when
1262 constructing arg_parser.
1263 (check_format_types): Add param "arglocs"; use it if non-NULL when
1264 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1266 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1269 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1270 (c_common_attribute_table): Add warn_if_not_aligned.
1271 (handle_aligned_attribute): Renamed to ...
1272 (common_handle_aligned_attribute): Remove argument, name, and add
1273 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1274 (handle_aligned_attribute): New.
1275 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1277 2017-08-14 Martin Sebor <msebor@redhat.com>
1280 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1281 (handle_nonstring_attribute): New function.
1283 2017-08-14 Martin Sebor <msebor@redhat.com>
1286 * c-format.h (T89_G): New macro.
1287 * c-format.c (local_gcall_ptr_node): New variable.
1288 (init_dynamic_diag_info): Initialize it.
1290 2017-08-11 Martin Liska <mliska@suse.cz>
1292 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1293 TARGET_SUPPORTS_ALIASES.
1295 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1297 * c-common.c (c_parse_error): Add rich_location * param, using it
1298 rather implicitly using input_location.
1299 * c-common.h (c_parse_error): Add rich_location * param.
1301 2017-08-09 Marek Polacek <polacek@redhat.com>
1303 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1304 (c_common_truthvalue_conversion): Likewise.
1305 * c-omp.c (c_finish_omp_atomic): Likewise.
1306 * c-common.h (build_binary_op): Update declaration.
1308 2017-08-08 Martin Liska <mliska@suse.cz>
1310 * c-ada-spec.c: Include header files.
1311 * c-ubsan.c: Likewise.
1312 * c-warn.c: Likewise.
1314 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1317 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1319 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1321 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1322 (print_ada_methods): Likewise.
1323 (print_ada_declaration): Likewise.
1325 2017-08-07 Martin Liska <mliska@suse.cz>
1327 * array-notation-common.c: Add new includes.
1328 * c-format.c( handle_format_attribute): Canonicalize a format
1330 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1332 * c-pretty-print.c: Add new include.
1334 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1336 * c-ada-spec.c (has_static_fields): Look only into variables.
1337 (print_constructor): Add TYPE parameter and use it for the name.
1338 (print_destructor): Likewise.
1339 (print_ada_declaration): Adjust to new constructor/destructor names.
1340 Adjust calls to print_constructor and print_destructor.
1341 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1342 Look only into variables in the final loop.
1344 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1346 * c-ada-spec.c (has_static_fields): Look only into fields.
1347 (dump_generic_ada_node): Small tweak.
1348 (dump_nested_types): Look only into fields.
1349 (print_ada_declaration): Look only into methods. Small tweak.
1350 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1352 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1354 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1355 (dump_ada_function_declaration): Likewise.
1356 (dump_generic_ada_node): Likewise.
1357 (print_ada_declaration): Add support for const-qualified variables.
1359 2017-07-31 Martin Liska <mliska@suse.cz>
1362 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1363 Guard condition with flag_sanitize_p also with current_function_decl
1365 (ubsan_maybe_instrument_reference_or_call): Likewise.
1367 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1369 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1371 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1373 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1375 (print_ada_declaration): Add missing guard for record types.
1377 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1380 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1381 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1382 new COMPOUND_EXPRs around the rhs of the comparison.
1384 2017-07-27 Marek Polacek <polacek@redhat.com>
1387 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1390 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1392 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1393 (handle_noipa_attribute): New function.
1395 2017-07-07 Torsten Duwe <duwe@suse.de>
1397 * c-attribs.c (c_common_attribute_table): Add entry for
1398 "patchable_function_entry".
1400 2017-07-20 Nathan Sidwell <nathan@acm.org>
1402 Remove TYPE_METHODS.
1403 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1404 dump_ada_template, print_ada_methods,
1405 print_ada_declaration): Member fns are on TYPE_FIELDS.
1407 2017-07-18 Nathan Sidwell <nathan@acm.org>
1409 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1411 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1413 * c-common.c (try_to_locate_new_include_insertion_point): New
1415 (per_file_includes_t): New typedef.
1416 (added_includes_t): New typedef.
1417 (added_includes): New variable.
1418 (maybe_add_include_fixit): New function.
1419 * c-common.h (maybe_add_include_fixit): New decl.
1421 2017-07-10 Martin Sebor <msebor@redhat.com>
1424 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1426 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1428 * c-common.c (selftest::c_family_tests): New.
1429 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1430 (selftest::c_family_tests): New decl.
1432 2017-07-04 Marek Polacek <polacek@redhat.com>
1435 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1438 2017-07-04 Marek Polacek <polacek@redhat.com>
1440 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1442 2017-06-28 Martin Liska <mliska@suse.cz>
1445 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1446 to a function declaration.
1448 2017-06-28 Martin Liska <mliska@suse.cz>
1451 * c.opt: Add IntegerRange to various options.
1453 2017-06-26 Marek Polacek <polacek@redhat.com>
1456 * c-common.h (warn_for_multistatement_macros): Declare.
1457 * c-warn.c: Include "c-family/c-indentation.h".
1458 (warn_for_multistatement_macros): New function.
1459 * c.opt (Wmultistatement-macros): New option.
1460 * c-indentation.c (guard_tinfo_to_string): No longer static.
1461 Change the parameter type to "enum rid". Handle RID_SWITCH.
1462 * c-indentation.h (guard_tinfo_to_string): Declare.
1464 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1466 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1468 2017-06-15 Martin Sebor <msebor@redhat.com>
1471 * c.opt (-Wclass-memaccess): New option.
1473 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1475 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1477 2017-06-13 Marek Polacek <polacek@redhat.com>
1480 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1483 2017-06-13 Martin Liska <mliska@suse.cz>
1486 * c-attribs.c (add_no_sanitize_value): New function.
1487 (handle_no_sanitize_attribute): Likewise.
1488 (handle_no_sanitize_address_attribute): Use the function.
1489 (handle_no_sanitize_thread_attribute): New function.
1490 (handle_no_address_safety_analysis_attribute): Use
1491 add_no_sanitize_value.
1492 (handle_no_sanitize_undefined_attribute): Likewise.
1493 * c-common.h: Declare new functions.
1494 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1495 (ubsan_instrument_shift): Likewise.
1496 (ubsan_instrument_bounds): Likewise.
1497 (ubsan_maybe_instrument_array_ref): Likewise.
1498 (ubsan_maybe_instrument_reference_or_call): Likewise.
1500 2017-06-11 Jason Merrill <jason@redhat.com>
1502 * c-ada-spec.c, c-pragma.c: Use id_equal.
1504 2017-06-04 Marek Polacek <polacek@redhat.com>
1507 * c-format.c (matching_type_p): Return false if any of the types
1508 requires structural equality.
1510 2017-06-02 Martin Sebor <msebor@redhat.com>
1513 * c-warn.c (conversion_warning): Use -Wconversion for integer
1514 conversion and -Wfloat-conversion for floating one.
1516 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1518 * c.opt (Wsizeof-pointer-div): New warning option.
1520 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1522 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1523 (Wcatch-value=1): Enable by -Wall.
1525 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1527 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1529 * c.opt (fdiagnostics-show-template-tree): New option.
1530 (felide-type): New option.
1532 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1534 * c.opt (Wcatch-value=): New C++ warning flag.
1536 2017-05-24 Nathan Sidwell <nathan@acm.org>
1538 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1539 const casts to avoid warning.
1541 2017-05-24 Martin Sebor <msebor@redhat.com>
1544 * c-common.h (unsafe_conversion_p): Add a function argument.
1545 * c-common.c (unsafe_conversion_p): Same.
1546 Add type names and values to diagnostics.
1547 (scalar_to_vector): Adjust.
1548 * c-warn.c (constant_expression_error): Add a function argument.
1549 Add type names and values to diagnostics.
1550 (conversion_warning): Add a function argument.
1551 Add type names and values to diagnostics.
1552 (warnings_for_convert_and_check): Same.
1554 2017-05-19 Jason Merrill <jason@redhat.com>
1556 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1559 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1561 * c-format.c (locus): Move out of function scope,
1564 2017-05-19 Nathan Sidwell <nathan@acm.org>
1566 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1567 (c_common_parse_file): Remove class dump handling.
1568 (get_dump_info): Likewise.
1570 2017-05-19 Richard Biener <rguenther@suse.de>
1573 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1574 to alias-set zero memory.
1576 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1578 * c-format.c (local_tree_type_node): Add GTY attribute.
1580 2017-05-18 Marek Polacek <polacek@redhat.com>
1582 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1583 (c_common_fixed_point_type_for_size): Likewise.
1584 (c_common_type_for_mode): Likewise.
1585 (shorten_compare): Likewise.
1586 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1587 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1589 2017-05-18 Marek Polacek <polacek@redhat.com>
1591 * c-common.c (self_promoting_args_p): Change the return type to bool.
1592 Use false/true instead of 0/1.
1593 * c-common.h (self_promoting_args_p): Update.
1595 2017-05-17 Marek Polacek <polacek@redhat.com>
1597 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1598 * c-warn.c: Likewise.
1600 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1602 Implement new C++ intrinsics __is_assignable and __is_constructible.
1603 * c-common.c (__is_assignable, __is_constructible): New.
1604 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1606 2017-05-17 Martin Liska <mliska@suse.cz>
1608 * c-common.h: Introduce dump_flags_t type and
1609 use it instead of int type.
1610 * c-gimplify.c (c_genericize): Likewise.
1611 * c-opts.c: Likewise.
1613 2017-05-17 Marek Polacek <polacek@redhat.com>
1615 * c-common.c (c_save_expr): Remove.
1616 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1617 * c-common.h (c_save_expr): Remove declaration.
1619 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1622 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1623 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1624 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1625 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1627 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1629 2017-05-09 Marek Polacek <polacek@redhat.com>
1632 * c-warn.c (unwrap_c_maybe_const): New.
1633 (warn_logical_operator): Call it.
1635 2017-05-09 Nathan Sidwell <nathan@acm.org>
1637 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1638 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1640 2017-05-08 Martin Sebor <msebor@redhat.com>
1642 PR translation/80280
1643 * c-format.h (struct format_flag_spec): Add new member.
1645 * c-format.c (local_tree_type_node): New global.
1646 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1647 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1648 (strfmon_flag_specs): Likewise.
1649 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1650 with distinct quoting properties.
1651 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1652 (flag_chars_t::validate): Add argument and handle bad quoting.
1653 (check_format_info_main): Handle quoting problems.
1654 (init_dynamic_diag_info): Simplify.
1656 2017-05-08 Jason Merrill <jason@redhat.com>
1658 * c-opts.c (c_common_post_options): Update defaults for
1659 flag_abi_version and flag_abi_compat_version.
1661 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1663 * c-common.c (c_cpp_error): Replace report_diagnostic
1664 with diagnostic_report_diagnostic.
1666 2017-05-04 Martin Sebor <msebor@redhat.com>
1668 PR translation/80280
1669 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1670 (handle_weakref_attribute): Same.
1672 2017-05-03 Nathan Sidwell <nathan@acm.org>
1674 Canonicalize canonical type hashing
1675 * c-common.c (complete_array_type): Use type_hash_canon.
1677 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1680 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1682 (cilk_install_body_pedigree_operations): Likewise.
1683 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1685 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1686 (cilk_install_body_pedigree_operations): Likewise.
1687 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1690 2017-04-27 Jakub Jelinek <jakub@redhat.com>
1693 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1694 flag on non-aggregate element types.
1696 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1698 * c-common.c (c_type_hasher, type_hash_table): Remove.
1699 (c_common_get_alias_set): Remove unreachable code.
1700 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1702 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1704 * c.opt (Wextra-semi): New C++ warning flag.
1706 2017-04-20 Jakub Jelinek <jakub@redhat.com>
1709 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1711 2017-04-18 Jakub Jelinek <jakub@redhat.com>
1715 * c-common.c (c_common_type_for_mode): Don't handle
1716 widest_*_literal_type_node here.
1717 c_common_signed_or_unsigned_type): Likewise.
1718 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1719 to *intTI_type_node or *intDI_type_node depending on whether
1720 TImode is supported by the target or not.
1722 2017-04-10 Martin Liska <mliska@suse.cz>
1725 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1726 doing an UBSAN check.
1728 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1730 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1732 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1735 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1737 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1738 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1741 2017-03-31 David Malcolm <dmalcolm@redhat.com>
1743 PR documentation/78732
1744 * c.opt (Wendif-labels): Fix description to refer to
1745 #else rather than #elif.
1747 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1750 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1751 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1753 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1756 * c-common.c (c_common_mark_addressable_vec): Don't set
1757 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1759 2017-03-21 Martin Sebor <msebor@redhat.com>
1762 * c-common.c (set_underlying_type): Mark type used only when
1763 original del is declared unused.
1765 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1767 PR translation/79848
1768 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1771 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1774 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1775 from inform's message, so that xgettext can locate it.
1777 2017-03-09 Marek Polacek <polacek@redhat.com>
1781 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1782 conversion to the attribute list.
1784 2017-03-09 Martin Liska <mliska@suse.cz>
1786 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1788 2017-03-03 Jason Merrill <jason@redhat.com>
1790 * c.opt (Wnoexcept-type): New.
1792 2017-03-02 Richard Biener <rguenther@suse.de>
1795 * c-common.c (c_common_mark_addressable_vec): Look through
1798 2017-02-28 Martin Liska <mliska@suse.cz>
1800 * c.opt: Replace space with tabular for options of <number>
1803 2017-02-28 Martin Liska <mliska@suse.cz>
1805 * c.opt: Fix --help=option -Q for options which are of
1808 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1811 * c-common.c (check_function_restrict): New function.
1812 (check_function_arguments): Add FNDECL argument. Call
1813 check_function_restrict if -Wrestrict.
1814 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1815 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1816 * c-common.h (check_function_arguments): Add FNDECL argument.
1817 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1819 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1821 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1822 treatment of parameters with pointer-to-tagged type and tidy up.
1823 (print_ada_methods): Remove the special treatment of C++ static member
1826 2017-02-22 Martin Liska <mliska@suse.cz>
1828 * c.opt: Replace inequality signs with square brackets
1831 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1834 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1837 2017-02-17 Joseph Myers <joseph@codesourcery.com>
1839 * c-cppbuiltin.c (builtin_define_float_constants): Define
1840 __DECIMAL_DIG__ to the value for long double.
1842 2017-02-15 Marek Polacek <polacek@redhat.com>
1845 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1846 conversion has occured.
1848 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1850 * c-common.c (c_common_reswords): Add "__RTL".
1851 * c-common.h (enum rid): Add RID_RTL.
1853 2017-01-20 Marek Polacek <polacek@redhat.com>
1856 * c-common.h (do_warn_duplicated_branches_r): Declare.
1857 * c-gimplify.c (c_genericize): Walk the function tree calling
1858 do_warn_duplicated_branches_r.
1859 * c-warn.c (expr_from_macro_expansion_r): New.
1860 (do_warn_duplicated_branches): New.
1861 (do_warn_duplicated_branches_r): New.
1862 * c.opt (Wduplicated-branches): New option.
1864 2017-01-17 David Malcolm <dmalcolm@redhat.com>
1867 * c-indentation.c (warn_for_misleading_indentation): Use the past
1868 subjunctive in the note.
1870 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1873 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1874 start type to integer_type.
1876 2017-01-16 Jakub Jelinek <jakub@redhat.com>
1879 * c.opt (gen-decls): Add Driver flag.
1881 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1884 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1887 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1889 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1892 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1894 2017-01-12 Martin Sebor <msebor@redhat.com>
1896 (-Wformat-overflow): ...to this.
1898 2017-01-11 Martin Sebor <msebor@redhat.com>
1901 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1902 Also enable for LTO.
1904 2017-01-10 Jason Merrill <jason@redhat.com>
1906 Implement P0195R2, C++17 variadic using.
1907 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1909 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1911 PR translation/79019
1912 PR translation/79020
1913 * c.opt (Wnormalized=): Fix typo in description.
1915 2017-01-08 Martin Sebor <msebor@redhat.com>
1918 * c.opt (-Wformat-truncation): New option.
1920 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1922 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1923 value to unsigned short to fit in 4 hex digits without
1926 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1928 * c.opt (fsso-struct): Add 'native' value.
1930 2017-01-05 Martin Liska <mliska@suse.cz>
1933 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1936 2017-01-04 Marek Polacek <polacek@redhat.com>
1939 * c.opt (Wpointer-compare): New option.
1941 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1944 * c.opt (fsso-struct=): Add RejectNegative.
1946 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1948 Update copyright years.
1950 2016-12-29 Martin Liska <mliska@suse.cz>
1953 * c.opt (strong-eval-order): Add RejectNegative keyword.
1955 2016-12-22 Jason Merrill <jason@redhat.com>
1957 Implement P0522R0, matching of template template arguments.
1958 * c-cppbuiltin.c (c_cpp_builtins): Define
1959 __cpp_template_template_args.
1961 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1964 * c-common.c (struct nonnull_arg_ctx): New type.
1965 (check_function_nonnull): Return bool instead of void. Use
1966 nonnull_arg_ctx as context rather than just location_t.
1967 (check_nonnull_arg): Adjust for the new context type, set
1968 warned_p to true if a warning has been diagnosed.
1969 (check_function_arguments): Return bool instead of void.
1970 * c-common.h (check_function_arguments): Adjust prototype.
1972 2016-12-21 Jason Merrill <jason@redhat.com>
1974 * c.opt (-fnew-ttp-matching): New flag.
1975 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1977 2016-12-14 Martin Jambor <mjambor@suse.cz>
1979 * c-omp.c: Include omp-general.h instead of omp-low.h.
1980 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1983 2016-12-14 Martin Sebor <msebor@redhat.com>
1986 * c-common.c (check_nonnull_arg): Disable when optimization
1989 2016-12-12 Marek Polacek <polacek@redhat.com>
1992 * c-common.c (attribute_fallthrough_p): Return false for
1995 2016-12-08 Martin Sebor <msebor@redhat.com>
1998 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2000 2016-12-08 Martin Sebor <msebor@redhat.com>
2003 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2006 2016-12-07 Martin Sebor <msebor@redhat.com>
2012 * c.opt (-Wstringop-overflow): New option.
2014 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2016 * c-attribs.c (asan odr indicator): New attribute.
2017 (handle_asan_odr_indicator_attribute): New function.
2019 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2021 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2024 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2026 * c-common.c (excess_precision_mode_join): New.
2027 (c_ts18661_flt_eval_method): New.
2028 (c_c11_flt_eval_method): Likewise.
2029 (c_flt_eval_method): Likewise.
2030 * c-common.h (excess_precision_mode_join): New.
2031 (c_flt_eval_method): Likewise.
2032 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2033 (cpp_iec_559_value): Call it.
2034 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2035 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2036 __FLT_EVAL_METHOD_TS_18661_3__.
2038 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2040 * c-opts.c (c_common_post_options): Add logic to handle the default
2041 case for -fpermitted-flt-eval-methods.
2043 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2045 * c.opt (Wexpansion-to-defined): New.
2047 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2050 * c-pragma.c (handle_pragma_target): Don't replace
2051 current_target_pragma, but chainon the new args to the current one.
2053 2016-11-22 Nathan Sidwell <nathan@acm.org>
2055 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2056 indentation and formatting.
2058 2016-11-21 Martin Sebor <msebor@redhat.com>
2060 * c.opt (-fprintf-return-value): Enable by default.
2062 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2065 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2066 * c-common.c (c_common_nodes_and_builtins): Initialize
2067 const_tm_ptr_type_node.
2069 2016-11-16 Marek Polacek <polacek@redhat.com>
2072 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2074 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2076 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2078 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2079 Richard Biener <rguenther@suse.de>
2081 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2082 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2083 * c.opt (fgimple): New option.
2085 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2088 * c-common.h (warn_for_restrict): Declare.
2089 * c-warn.c: Include gcc-rich-location.h.
2090 (warn_for_restrict): New function.
2091 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2092 (gcc_cdiag_char_table): Likewise.
2093 (gcc_cxxdiag_char_table): Likewise.
2094 * c.opt (Wrestrict): New option.
2096 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2098 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2099 for nested types only if the type is a record or union and dump SLOC.
2101 2016-11-09 Jason Merrill <jason@redhat.com>
2103 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2105 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2107 * c-ubsan.c (ubsan_instrument_shift): Handle split
2108 -fsanitize=shift-base and -fsanitize=shift-exponent.
2110 2016-11-07 Jason Merrill <jason@redhat.com>
2112 * c.opt (Wc++1z-compat): New.
2113 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2115 2016-11-07 Martin Liska <mliska@suse.cz>
2117 * c-warn.c (warn_for_unused_label): Save all labels used
2118 in goto or in &label.
2120 2016-11-03 Jason Merrill <jason@redhat.com>
2122 * c-cppbuiltin.c (c_cpp_builtins): Correct
2123 __cpp_inheriting_constructors.
2125 2016-11-01 Jason Merrill <jason@redhat.com>
2127 * c-cppbuiltin.c (c_cpp_builtins): Update
2128 __cpp_inheriting_constructors.
2130 * c.opt (-fnew-inheriting-ctors): New.
2131 * c-opts.c: Default to on for ABI 11+.
2133 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2136 * c.opt (fext-numeric-literals): Add Var and Init.
2137 * c-opts.c (c_common_handle_option): Don't clear
2138 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2139 (c_common_post_options): Clear it here if not set
2142 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2145 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2148 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2150 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2151 * c-common.c (c_common_reswords): Add __builtin_launder.
2153 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2155 * c-common.c (c_common_truthvalue_conversion): Warn for
2156 multiplications in boolean context. Fix the quoting of '<<' and '<'
2157 in the shift warning.
2159 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2161 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2163 2016-10-20 Jason Merrill <jason@redhat.com>
2165 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2167 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2169 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2170 integer shift ops in boolean context.
2172 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2174 * c.opt (Walloca): New.
2175 (Walloca-larger-than=): New.
2176 (Wvla-larger-than=): New.
2178 2016-10-17 Marek Polacek <polacek@redhat.com>
2180 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2181 Return immediately when finding a match.
2182 (warn_tautological_cmp): Remove a boolean variable that is no longer
2185 2016-10-17 Marek Polacek <polacek@redhat.com>
2187 * c-attribs.c: New file.
2188 * c-common.c: Move attributes handling to c-attribs.c.
2189 (get_nonnull_operand): No longer static.
2190 * c-common.h: Move the declarations from c-attribs.c to its own section.
2192 2016-10-14 Jason Merrill <jason@redhat.com>
2194 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2195 and __cpp_deduction_guides.
2197 2016-10-13 Jason Merrill <jason@redhat.com>
2199 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2201 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2203 * c-cppbuiltin.c: Include memmodel.h.
2204 * c-opts.c: Likewise.
2205 * c-pragma.c: Likewise.
2206 * c-warn.c: Likewise.
2208 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2210 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2211 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2212 * c-opts.c (sanitize_cpp_opts): Initialize
2213 cpp_opts->cpp_warn_implicit_fallthrough.
2215 2016-10-11 Marek Polacek <polacek@redhat.com>
2217 * c-common.c (warning_candidate_p): Change the return type to bool
2218 and return true/false instead of 1/0.
2219 (vector_mode_valid_p): Likewise.
2221 2016-10-11 Marek Polacek <polacek@redhat.com>
2223 * c-common.c (fold_for_warn): No longer static.
2224 (bool_promoted_to_int_p): Likewise.
2225 (c_common_get_narrower): Likewise.
2226 (constant_expression_warning): Move to c-warn.c.
2227 (constant_expression_error): Likewise.
2228 (overflow_warning): Likewise.
2229 (warn_logical_operator): Likewise.
2230 (find_array_ref_with_const_idx_r): Likewise.
2231 (warn_tautological_cmp): Likewise.
2232 (expr_has_boolean_operands_p): Likewise.
2233 (warn_logical_not_parentheses): Likewise.
2234 (warn_if_unused_value): Likewise.
2235 (strict_aliasing_warning): Likewise.
2236 (sizeof_pointer_memaccess_warning): Likewise.
2237 (check_main_parameter_types): Likewise.
2238 (conversion_warning): Likewise.
2239 (warnings_for_convert_and_check): Likewise.
2240 (match_case_to_enum_1): Likewise.
2241 (match_case_to_enum): Likewise.
2242 (c_do_switch_warnings): Likewise.
2243 (warn_for_omitted_condop): Likewise.
2244 (readonly_error): Likewise.
2245 (lvalue_error): Likewise.
2246 (invalid_indirection_error): Likewise.
2247 (warn_array_subscript_with_type_char): Likewise.
2248 (warn_about_parentheses): Likewise.
2249 (warn_for_unused_label): Likewise.
2250 (warn_for_div_by_zero): Likewise.
2251 (warn_for_memset): Likewise.
2252 (warn_for_sign_compare): Likewise.
2253 (do_warn_double_promotion): Likewise.
2254 (do_warn_unused_parameter): Likewise.
2255 (record_locally_defined_typedef): Likewise.
2256 (maybe_record_typedef_use): Likewise.
2257 (maybe_warn_unused_local_typedefs): Likewise.
2258 (maybe_warn_bool_compare): Likewise.
2259 (maybe_warn_shift_overflow): Likewise.
2260 (warn_duplicated_cond_add_or_warn): Likewise.
2261 (diagnose_mismatched_attributes): Likewise.
2262 * c-common.h: Move the declarations from c-warn.c to its own section.
2263 * c-warn.c: New file.
2265 2016-10-08 Jason Merrill <jason@redhat.com>
2267 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2268 into COND_EXPR in C++.
2270 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2272 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2273 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2274 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2276 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2278 Implement LWG2296 helper intrinsic
2279 * c-common.h (enum rid): Add RID_ADDRESSOF.
2280 * c-common.c (c_common_reswords): Add __builtin_addressof.
2282 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2285 * c-common.c (c_common_truthvalue_conversion): Warn also for
2286 suspicious enum values in boolean context.
2288 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2290 Implement P0258R2 - helper for C++17
2291 std::has_unique_object_representations trait
2292 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2293 * c-common.c (c_common_reswords): Add
2294 __has_unique_object_representations.
2296 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2299 * c-ubsan.c (ubsan_instrument_return): Don't call
2300 initialize_sanitizer_builtins here.
2302 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2304 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2305 conditional expression in boolean context when only one arm is
2308 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2311 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2314 * c-common.c (c_common_reswords): Update comment for C++11.
2316 2016-10-04 Jason Merrill <jason@redhat.com>
2318 * c-common.c (make_tree_vector_from_ctor): New.
2319 * c-common.h: Declare it.
2321 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2323 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2324 __LIBGCC_JCR_SECTION_NAME__.
2326 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2328 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2329 left shift in boolean context.
2331 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2333 Implement P0001R1 - C++17 removal of register storage class specifier
2334 * c.opt (Wregister): New warning.
2335 * c-opts.c (c_common_post_options): Enable -Wregister by
2338 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2340 * c-opts.c (c_common_post_options): Remove special case for
2341 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2344 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2346 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2349 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2351 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2353 * c-common.c: Include memmodel.h.
2355 2016-09-26 Marek Polacek <polacek@redhat.com>
2357 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2359 2016-09-26 Marek Polacek <polacek@redhat.com>
2362 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2363 (handle_fallthrough_attribute): New function.
2364 (attribute_fallthrough_p): New function.
2365 * c-common.h (attribute_fallthrough_p): Declare.
2367 2016-09-24 Marek Polacek <polacek@redhat.com>
2370 * c.opt (Wbool-operation): New.
2372 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2374 * c-common.c (c_common_truthvalue_conversion): Inhibit
2375 Wint-in-bool-context warning with from_macro_definition_at.
2376 Mention the expression will always evaluate to true.
2378 2016-09-21 Martin Sebor <msebor@redhat.com>
2381 * c.opt (fprintf-return-value): Temporarily initialize to zero
2382 to unblock bootstrap failures.
2384 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2387 * c.opt (Waligned-new=): Add RejectNegative.
2388 (faligned-new=): Likewise. Spelling fix - change
2389 aligned_new_threshhold to aligned_new_threshold.
2390 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2391 to aligned_new_threshold.
2393 2016-09-20 Martin Sebor <msebor@redhat.com>
2396 * c.opt: Add -Wformat-length and -fprintf-return-value.
2398 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2401 * c.opt (Wint-in-bool-context): New warning.
2402 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2403 constants in boolean context.
2405 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2407 * c-common.c (max_align_t_align): Also consider alignment of
2410 2016-09-15 Jason Merrill <jason@redhat.com>
2412 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2415 2016-09-14 Jason Merrill <jason@redhat.com>
2417 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2418 limit FIELD_DECL, either.
2420 2016-09-14 Marek Polacek <polacek@redhat.com>
2422 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2423 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2424 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2426 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2428 * c-common.c (warn_logical_not_parentheses): Replace
2429 rich_location::add_fixit_insert calls with add_fixit_insert_before
2430 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2432 2016-09-13 Jason Merrill <jason@redhat.com>
2433 Tom de Vries <tom@codesourcery.com>
2436 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2438 2016-09-13 Jason Merrill <jason@redhat.com>
2440 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2443 2016-09-12 Jason Merrill <jason@redhat.com>
2445 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2446 bit/byte confusion, allow large alignment for types.
2448 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2451 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2453 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2456 * c-format.c (argument_parser::check_argument_type): Add params
2457 "type_start" and "conversion_char". Use the former to generate
2458 offset_to_type_start and pass it and conversion_char to
2460 (check_format_info_main): Capture the start of the type
2461 information as "type_start", and pass it an format_char
2462 to arg_parser.check_argument_type.
2463 (check_format_types): Provide an example in the leading comment.
2464 Add params "offset_to_type_start" and "conversion_char"; pass
2465 them to format_type_warning calls.
2466 (test_get_modifier_for_format_len): Likewise.
2467 (matching_type_p): New function.
2468 (get_format_for_type): Add param "conversion_char" and move
2469 implementation into...
2470 (get_format_for_type_1): ...new function, called twice.
2471 Use new function matching_type_p rather than checking for
2472 TYPE_CANONICAL equality.
2473 (get_corrected_substring): New function.
2474 (format_type_warning): Provide an example in the leading comment.
2475 Add params "offset_to_type_start" and "conversion_char". Replace
2476 call to get_format_for_type with call to get_corrected_substring
2477 and move rejection of hints for widths/precisions there.
2478 (assert_format_for_type_streq): Add param "conversion_char".
2479 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2480 (test_get_format_for_type_printf): Add conversion chars to the
2481 tests, adding coverage for various combinations of integer
2482 vs double conversions, and for preserving octal and hexadecimal
2484 (test_get_format_for_type_scanf): Add conversion chars to the
2487 2016-09-10 Tom de Vries <tom@codesourcery.com>
2490 * c-common.c (build_va_arg): Handle more strict
2491 targetm.canonical_va_list_type. Replace first argument type error with
2494 2016-09-09 Martin Sebor <msebor@redhat.com>
2498 * c-format.c (argument_parser::find_format_char_info): Use %qc
2499 format directive unconditionally.
2501 2016-09-09 Jason Merrill <jason@redhat.com>
2503 Implement C++17 new of over-aligned types.
2504 * c.opt: Add -faligned-new and -Waligned-new.
2505 * c-common.c (max_align_t_align): Split out from...
2506 (cxx_fundamental_alignment_p): ...here.
2507 * c-common.h: Declare it.
2508 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2510 2016-09-09 Joseph Myers <joseph@codesourcery.com>
2512 * c-cppbuiltin.c (builtin_define_type_width): New function.
2513 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2516 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2518 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2520 (substring_loc::get_location): Move to substring-locations.c,
2521 keeping implementation as...
2522 (c_get_substring_location): New function, from the above, reworked
2523 to use accessors rather than member lookup.
2524 * c-common.h (class substring_loc): Move to substring-locations.h,
2525 replacing with a forward decl.
2526 (c_get_substring_location): New decl.
2527 * c-format.c: Include "substring-locations.h".
2528 (format_warning_va): Move to substring-locations.c.
2529 (format_warning_at_substring): Likewise.
2531 2016-09-06 Martin Sebor <msebor@redhat.com>
2534 * c-format.c (check_function_format): Avoid issuing warnings for
2535 functions unless they call format functions with non-constant
2538 2016-09-06 Richard Biener <rguenther@suse.de>
2541 * c-common.c (c_common_mark_addressable_vec): Handle
2542 COMPOUND_LITERAL_EXPR.
2544 2016-09-05 Marek Polacek <polacek@redhat.com>
2547 * c-common.c (bool_promoted_to_int_p): New function.
2548 (expr_has_boolean_operands_p): New function.
2549 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2550 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2552 2016-09-04 Tom de Vries <tom@codesourcery.com>
2555 2016-08-29 Tom de Vries <tom@codesourcery.com>
2557 * c-common.c (build_va_arg): Replace first argument type error
2560 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2563 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2564 (c_finish_omp_for): Reject _Atomic qualified iterators.
2566 2016-09-01 Martin Sebor <msebor@redhat.com>
2568 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2569 size to guarantee it fits the output of the formatted function
2570 regardless of its arguments.
2572 2016-09-01 Marek Polacek <polacek@redhat.com>
2575 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2578 2016-08-29 Marek Polacek <polacek@redhat.com>
2581 * c-common.c (warn_logical_not_parentheses): Don't warn for
2582 a comparison or a logical operator.
2584 2016-08-29 Tom de Vries <tom@codesourcery.com>
2586 * c-common.c (build_va_arg): Fix type comparison assert.
2588 2016-08-29 Tom de Vries <tom@codesourcery.com>
2590 * c-common.c (build_va_arg): Replace first argument type error
2593 2016-08-29 Tom de Vries <tom@codesourcery.com>
2596 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2597 with error_mark_node as va_list instead of with illegal va_list.
2599 2016-08-25 Marek Polacek <polacek@redhat.com>
2600 David Malcolm <dmalcolm@redhat.com>
2602 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2603 * c-common.h (warn_logical_not_parentheses): Update declaration.
2605 2016-08-22 Marek Polacek <polacek@redhat.com>
2608 * c-common.c (warn_for_memset): Check type for null.
2610 2016-08-22 Joseph Myers <joseph@codesourcery.com>
2612 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2613 _FloatNx types for suffixes for built-in functions.
2615 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2618 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2619 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2620 (RID_FLOAT128X): New enum rid values.
2621 (CASE_RID_FLOATN_NX): New macro.
2622 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2624 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2625 corresponding complex types.
2626 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2627 _FloatNx and corresponding complex types.
2628 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2629 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2630 and _FloatNx types for the widest type for determining
2631 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2632 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2633 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2635 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2637 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2640 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2642 * c-opts.c (c_diagnostic_finalizer): Update for change to
2643 diagnostic_show_locus.
2645 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2647 * c-common.c: Include "spellcheck.h".
2648 (cb_get_suggestion): New function.
2649 * c-common.h (cb_get_suggestion): New decl.
2650 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2653 2016-08-18 Marek Polacek <polacek@redhat.com>
2656 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2659 2016-08-16 David Malcolm <dmalcolm@redhat.com>
2662 * c-common.c (substring_loc::get_range): Rename to...
2663 (substring_loc::get_location): ...this, converting param from a
2664 source_range * to a location_t *. Call
2665 get_source_location_for_substring rather than
2666 get_source_range_for_substring, and pass in m_caret_idx.
2667 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2668 (substring_loc::get_range): Replace with...
2669 (substring_loc::get_location): ...this.
2670 (substring_loc::set_caret_index): New method.
2671 (substring_loc): Add field m_caret_idx.
2672 * c-format.c (format_warning_va): Update for above changes.
2673 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2674 clashing with type name.
2675 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2676 (check_argument_type): Likewise.
2677 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2678 Use a copy when emitting warnings, setting the caret index from TYPE.
2680 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
2681 Arnaud Charlet <charlet@adacore.com>
2683 * c-ada-spec.c (dump_number): New function.
2684 (handle_escape_character): Likewise.
2685 (print_ada_macros): Add handling of constant integers and strings.
2687 2016-08-12 Marek Polacek <polacek@redhat.com>
2690 * c-common.c (scalar_to_vector): Adjust fall through comment.
2691 * c-opts.c (c_common_handle_option): Likewise.
2692 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2693 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2694 fall through comment.
2695 * cilk.c (extract_free_variables): Add FALLTHRU.
2697 2016-08-10 Jason Merrill <jason@redhat.com>
2699 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2701 2016-08-09 Jason Merrill <jason@redhat.com>
2703 * c-common.c (c_common_attribute_table): vector_size affects type
2706 2016-08-09 Marek Polacek <polacek@redhat.com>
2709 * c-ada-spec.c (dump_generic_ada_node): Add return.
2711 2016-08-09 Jason Merrill <jason@redhat.com>
2713 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2714 C++17 constexpr lambdas.
2716 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2719 * c-common.h (selftest::c_format_c_tests): New declaration.
2720 (selftest::run_c_tests): New declaration.
2721 * c-format.c: Include "selftest.h.
2722 (format_warning_va): Add param "corrected_substring" and use
2723 it to add a replacement fix-it hint.
2724 (format_warning_at_substring): Likewise.
2725 (format_warning_at_char): Update for new param of
2727 (argument_parser::check_argument_type): Pass "fki" to
2729 (check_format_types): Add param "fki" and pass it to
2730 format_type_warning.
2731 (deref_n_times): New function.
2732 (get_modifier_for_format_len): New function.
2733 (selftest::test_get_modifier_for_format_len): New function.
2734 (get_format_for_type): New function.
2735 (format_type_warning): Add param "fki" and use it to attempt
2736 to provide hints for argument types when calling
2737 format_warning_at_substring.
2738 (selftest::get_info): New function.
2739 (selftest::assert_format_for_type_streq): New function.
2740 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2741 (selftest::test_get_format_for_type_printf): New function.
2742 (selftest::test_get_format_for_type_scanf): New function.
2743 (selftest::c_format_c_tests): New function.
2745 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2748 * c-format.c: Include "diagnostic.h".
2749 (location_column_from_byte_offset): Delete.
2750 (location_from_offset): Delete.
2751 (format_warning_va): New function.
2752 (format_warning_at_substring): New function.
2753 (format_warning_at_char): New function.
2754 (check_format_arg): Capture location of format_tree and pass to
2755 check_format_info_main.
2756 (argument_parser): Add fields "start_of_this_format" and
2757 "format_string_cst".
2758 (flag_chars_t::validate): Add param "format_string_cst". Convert
2759 warning_at call using location_from_offset to call to
2760 format_warning_at_char.
2761 (argument_parser::argument_parser): Add param "format_string_cst_"
2762 and use use it to initialize field "format_string_cst".
2763 Initialize new field "start_of_this_format".
2764 (argument_parser::read_format_flags): Convert warning_at call
2765 using location_from_offset to a call to format_warning_at_char.
2766 (argument_parser::read_any_format_left_precision): Likewise.
2767 (argument_parser::read_any_format_precision): Likewise.
2768 (argument_parser::read_any_other_modifier): Likewise.
2769 (argument_parser::find_format_char_info): Likewise, in three places.
2770 (argument_parser::parse_any_scan_set): Likewise, in one place.
2771 (argument_parser::handle_conversions): Likewise, in two places.
2772 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2773 and use it to make a substring_loc. Pass the latter to
2775 (check_format_info_main): Add params "fmt_param_loc" and
2776 "format_string_cst". Convert warning_at calls using
2777 location_from_offset to calls to format_warning_at_char. Pass the
2778 new params to the arg_parser ctor. Pass "format_string_cst" to
2779 flag_chars.validate. Pass "fmt_param_loc" to
2780 arg_parser.check_argument_type.
2781 (check_format_types): Convert first param from a location_t
2782 to a const substring_loc & and rename to "fmt_loc". Attempt
2783 to extract the range of the relevant parameter and pass it
2784 to format_type_warning.
2785 (format_type_warning): Convert first param from a location_t
2786 to a const substring_loc & and rename to "fmt_loc". Add
2787 params "param_range" and "type". Replace calls to warning_at
2788 with calls to format_warning_at_substring.
2790 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2792 * c-format.c (class flag_chars_t): New class.
2793 (struct length_modifier): New struct.
2794 (class argument_parser): New class.
2795 (flag_chars_t::flag_chars_t): New ctor.
2796 (flag_chars_t::has_char_p): New method.
2797 (flag_chars_t::add_char): New method.
2798 (flag_chars_t::validate): New method.
2799 (flag_chars_t::get_alloc_flag): New method.
2800 (flag_chars_t::assignment_suppression_p): New method.
2801 (argument_parser::argument_parser): New ctor.
2802 (argument_parser::read_any_dollar): New method.
2803 (argument_parser::read_format_flags): New method.
2804 (argument_parser::read_any_format_width): New method.
2805 (argument_parser::read_any_format_left_precision): New method.
2806 (argument_parser::read_any_format_precision): New method.
2807 (argument_parser::handle_alloc_chars): New method.
2808 (argument_parser::read_any_length_modifier): New method.
2809 (argument_parser::read_any_other_modifier): New method.
2810 (argument_parser::find_format_char_info): New method.
2811 (argument_parser::validate_flag_pairs): New method.
2812 (argument_parser::give_y2k_warnings): New method.
2813 (argument_parser::parse_any_scan_set): New method.
2814 (argument_parser::handle_conversions): New method.
2815 (argument_parser::check_argument_type): New method.
2816 (check_format_info_main): Introduce classes argument_parser
2817 and flag_chars_t, moving the code within the loop into methods
2818 of these classes. Make various locals "const".
2820 2016-08-05 David Malcolm <dmalcolm@redhat.com>
2822 * c-common.c: Include "substring-locations.h".
2823 (get_cpp_ttype_from_string_type): New function.
2824 (g_string_concat_db): New global.
2825 (substring_loc::get_range): New method.
2826 * c-common.h (g_string_concat_db): New declaration.
2827 (class substring_loc): New class.
2828 * c-lex.c (lex_string): When concatenating strings, capture the
2829 locations of all tokens using a new obstack, and record the
2830 concatenation locations within g_string_concat_db.
2831 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2834 2016-07-29 Marek Polacek <polacek@redhat.com>
2837 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2838 parentheses warning.
2841 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2843 2016-07-28 Martin Liska <mliska@suse.cz>
2845 PR gcov-profile/68025
2846 * c-common.c (handle_no_profile_instrument_function_attribute):
2848 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2850 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2853 2016-07-25 Jason Merrill <jason@redhat.com>
2856 * c.opt (fconstexpr-loop-limit): New.
2858 2016-07-22 Martin Sebor <msebor@redhat.com>
2861 * c-common.c (resolve_overloaded_builtin): Avoid converting
2862 __atomic_compare_exchange_n return type to that of what its
2863 first argument points to.
2865 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2867 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2868 ~(unsigned HOST_WIDE_INT) 0.
2870 2016-07-22 Martin Liska <mliska@suse.cz>
2872 PR gcov-profile/69028
2873 PR gcov-profile/62047
2874 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2875 to the current_function_decl.
2877 2016-07-21 Jason Merrill <jason@redhat.com>
2880 * c-common.c (c_common_truthvalue_conversion): Check
2881 c_inhibit_evaluation_warnings for warning about address of
2884 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2886 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2889 2016-07-15 Jason Merrill <jason@redhat.com>
2891 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2893 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2896 * c-common.h (enum lookup_name_fuzzy_kind): Add
2897 FUZZY_LOOKUP_FUNCTION_NAME.
2899 2016-07-08 Jason Merrill <jason@redhat.com>
2901 P0145: Refining Expression Order for C++.
2902 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2905 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2908 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2910 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2912 * c-pragma.h (enum pragma_kind): Rename
2913 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2916 2016-06-29 Richard Biener <rguenther@suse.de>
2919 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2921 2016-06-24 Jason Merrill <jason@redhat.com>
2923 P0145R2: Refining Expression Order for C++.
2924 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2927 2016-06-24 Jakub Jelinek <jakub@redhat.com>
2929 * c-common.c (check_builtin_function_arguments): Require last
2930 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2931 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2932 if the last argument is pointer to enumerated or boolean type.
2934 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2937 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2938 (lookup_name_fuzzy): New prototype.
2940 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
2942 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2944 2016-06-14 Jason Merrill <jason@redhat.com>
2946 P0145R2: Refining Expression Order for C++.
2947 * c.opt (fargs-in-order): New.
2948 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2950 2016-06-13 Jakub Jelinek <jakub@redhat.com>
2953 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2954 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2956 PR preprocessor/71183
2957 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2958 to cb_get_source_date_epoch.
2960 2016-06-10 Jakub Jelinek <jakub@redhat.com>
2963 * c.opt (Wpsabi): Add Warning flag.
2965 2016-06-10 Martin Sebor <msebor@redhat.com>
2968 * c-common.c (handle_nonnull_attribute): Accept
2969 the nonnull attribute in type-generic builtins.
2971 2016-06-09 Martin Sebor <msebor@redhat.com>
2974 * c-common.c (builtin_function_validate_nargs): Make text of error
2975 message consistent with others like it.
2977 2016-06-08 Martin Sebor <msebor@redhat.com>
2978 Jakub Jelinek <jakub@redhat.com>
2982 * c-common.c (check_builtin_function_arguments): Handle
2983 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2985 2016-06-08 Richard Biener <rguenther@suse.de>
2987 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2989 2016-06-07 Richard Biener <rguenther@suse.de>
2992 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2993 options and warn about others.
2995 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
2997 * c-common.c (get_source_date_epoch): Rename to
2998 cb_get_source_date_epoch.
2999 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3000 message when the parsing fails. Use error_at instead of fatal_error.
3001 * c-common.h (get_source_date_epoch): Rename to
3002 cb_get_source_date_epoch.
3003 * c-common.h (cb_get_source_date_epoch): Prototype.
3004 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3005 * c-common.h (c_omp_region_type): Remove trailing comma.
3006 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3007 * c-lex.c (c_lex_with_flags): Remove initialization of
3008 pfile->source_date_epoch.
3010 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3013 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3014 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3015 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3016 instead of C_OMP_CLAUSE_SPLIT_FOR.
3018 2016-05-24 Richard Biener <rguenther@suse.de>
3022 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3023 (convert_vector_to_array_for_subscript): ... this.
3024 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3025 VIEW_CONVERT_EXPR to an array type. Rename to ...
3026 (convert_vector_to_array_for_subscript): ... this.
3028 2016-05-12 Marek Polacek <polacek@redhat.com>
3031 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3032 size_in_bytes and pass LOC to it.
3034 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3037 * c.opt (Wduplicate-decl-specifier): New option.
3039 2016-05-11 Marek Polacek <polacek@redhat.com>
3042 * c-common.c (diagnose_mismatched_attributes): New function.
3043 * c-common.h (diagnose_mismatched_attributes): Declare.
3045 2016-05-04 Marek Polacek <polacek@redhat.com>
3047 * c.opt (Wdangling-else): New option.
3049 2016-05-03 Marek Polacek <polacek@redhat.com>
3052 * c-common.c (builtin_function_validate_nargs): Add location
3054 (check_builtin_function_arguments): Add location and arguments
3055 parameters. Use them.
3056 * c-common.h (check_builtin_function_arguments): Update declaration.
3058 2016-05-03 Richard Biener <rguenther@suse.de>
3060 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3061 allow call args to gimplify to SSA names.
3063 2016-05-03 Marek Polacek <polacek@redhat.com>
3065 * c-common.h (enum c_omp_region_type): Remove stray comma.
3067 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3069 * c-common.h (enum c_omp_region_type): Define.
3071 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3073 * c-common.c (shorten_compare): Use wi::to_wide.
3075 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3078 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3079 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3080 reduction clauses in acc parallel loops.
3082 2016-04-29 Marek Polacek <polacek@redhat.com>
3085 * c-common.c (warn_for_memset): Check domain before accessing it.
3087 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3090 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3091 "aligned" attribute.
3093 2016-04-28 Jason Merrill <jason@redhat.com>
3095 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3097 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3098 Matthias Klose <doko@debian.org>
3100 * c-common.c (get_source_date_epoch): New function, gets the environment
3101 variable SOURCE_DATE_EPOCH and parses it as long long with error
3103 * c-common.h (get_source_date_epoch): Prototype.
3104 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3106 2015-04-27 Ryan Burn <contact@rnburn.com>
3110 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3111 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3113 (cilk_detect_and_unwrap): Corresponding changes.
3114 (extract_free_variables): Don't extract free variables from
3115 AGGR_INIT_EXPR slot.
3116 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3117 (cilk_recognize_spawn): Likewise.
3119 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3121 * c.opt (Wmemset-elt-size): New option.
3122 * c-common.c (warn_for_memset): New function.
3123 * c-common.h (warn_for_memset): Declare.
3125 2016-04-25 Jason Merrill <jason@redhat.com>
3127 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3129 * c-common.h: Declare it.
3130 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3132 2016-04-22 Jason Merrill <jason@redhat.com>
3134 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3136 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3139 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3140 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3142 2016-04-18 Michael Matz <matz@suse.de>
3144 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3147 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3149 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3150 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3151 to incomplete types.
3152 (dump_nested_type): Remove redundant tests and tidy up.
3153 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3154 a type which is the typedef of an original type.
3156 2016-04-15 Marek Polacek <polacek@redhat.com>
3159 * c-common.c (build_va_arg): Change two asserts into errors and return
3162 2016-04-13 Marek Polacek <polacek@redhat.com>
3165 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3166 for switch statements, too.
3168 2016-03-28 Jason Merrill <jason@redhat.com>
3170 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3172 2016-03-23 Marek Polacek <polacek@redhat.com>
3175 * c.opt (Wignored-attributes): New option.
3177 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3180 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3181 diagnostic text, reversing the order of the warning and note so
3182 that they appear in source order.
3184 2016-03-17 Marek Polacek <polacek@redhat.com>
3187 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3190 2016-03-14 Jason Merrill <jason@redhat.com>
3192 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3194 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3196 2016-03-09 Richard Biener <rguenther@suse.de>
3199 * c-common.c (strict_aliasing_warning): Add back
3200 alias_sets_conflict_p check.
3202 2016-03-08 Jason Merrill <jason@redhat.com>
3204 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3206 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3209 * c-indentation.c (get_visual_column): Move code to determine next
3211 (next_tab_stop): ...this new function.
3212 (line_contains_hash_if): Delete function.
3213 (detect_preprocessor_logic): Delete function.
3214 (get_first_nws_vis_column): New function.
3215 (detect_intervening_unindent): New function.
3216 (should_warn_for_misleading_indentation): Replace call to
3217 detect_preprocessor_logic with a call to
3218 detect_intervening_unindent.
3220 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3223 * c-indentation.c (should_warn_for_misleading_indentation): When
3224 suppressing warnings about cases where the guard and body are on
3225 the same column, only use the first non-whitespace column in place
3226 of the guard token column when dealing with "else" clauses.
3227 When rejecting aligned BODY and NEXT, loosen the requirement
3228 from equality with the first non-whitespace of guard to simply
3229 that they not be indented relative to it.
3231 2016-03-04 Richard Biener <rguenther@suse.de>
3234 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3235 instead of alias_sets_conflict_p.
3237 2016-03-01 Marek Polacek <polacek@redhat.com>
3240 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3243 2016-02-22 Martin Sebor <msebor@redhat.com>
3246 * c-common.c (check_builtin_function_arguments): Validate and
3247 reject invalid arguments to __builtin_alloca_with_align.
3249 2016-02-20 Mark Wielaard <mjw@redhat.com>
3252 * c.opt (Wunused-const-variable): Turn into Alias for...
3253 (Wunused-const-variable=): New option.
3255 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3258 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3260 (c_common_init_options): ...to here.
3261 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3263 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3266 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3267 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3268 flag_preprocess_only.
3270 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3273 * c.opt (Wnonnull-compare): Enable for -Wall.
3275 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3278 * c-common.c (sync_resolve_size): Diagnose too few arguments
3279 even when params is non-NULL empty vector.
3281 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3284 * c.opt (fshort-double): Remove.
3286 2016-02-05 Martin Sebor <msebor@redhat.com>
3289 * c.opt (Warning options): Update -Wplacement-new to take
3290 an optional argument.
3292 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3294 PR preprocessor/69543
3296 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3297 instead of loc to control_warning_option.
3299 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3301 * c.opt (fopenacc-dim=): New option.
3303 2016-01-27 Ryan Burn <contact@rnburn.com>
3306 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3307 gimplify_arg. Removed superfluous post_p argument.
3308 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3309 superfluous post_p argument.
3310 * c-gimplify.c (c_gimplify_expr): Likewise.
3312 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3315 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3316 pp_newline_and_flush with pp_flush.
3318 2016-01-20 Martin Sebor <msebor@redhat.com>
3321 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3322 an incompatible argument when the argument isn't a valid tree node.
3324 2016-01-18 Jason Merrill <jason@redhat.com>
3327 * c-common.c (check_function_arguments_recurse): Fold the whole
3328 COND_EXPR, not just the condition.
3330 2016-01-18 Tom de Vries <tom@codesourcery.com>
3332 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3333 classify as loop clause.
3335 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3338 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3339 C++ FE no longer has limit on number of pragmas.
3341 2015-01-14 Ryan Burn <contact@rnburn.com>
3344 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3345 to add missing cleanup point.
3347 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3350 * c-indentation.c (get_visual_column): Add location_t param.
3351 Handle the column number being zero by effectively disabling the
3352 warning, with an "inform".
3353 (should_warn_for_misleading_indentation): Add location_t argument
3354 for all uses of get_visual_column.
3356 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3359 * c-indentation.c (should_warn_for_misleading_indentation):
3360 Don't warn about do-while statements.
3362 2016-01-07 Martin Sebor <msebor@redhat.com>
3365 * c-common.c (sync_resolve_size): Reject first argument when it's
3368 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3371 * c-indentation.c (get_visual_column): Remove default argument.
3372 (should_warn_for_misleading_indentation): For the multiline case,
3373 update call to get_visual_column for next_stmt_exploc so that it
3374 captures the location of the first non-whitespace character in the
3375 relevant line. Don't issue warnings if there is non-whitespace
3376 before the next statement.
3378 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3380 Update copyright years.
3382 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3384 * c-common.c (binary_op_error): Convert first param from
3385 location_t to rich_location * and use it when emitting an error.
3386 * c-common.h (binary_op_error): Convert first param from
3387 location_t to rich_location *.
3389 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3391 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3392 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3394 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3396 * c-common.c (c_common_attribute_table): Handle "omp declare target
3399 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3402 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3404 2014-12-12 Tobias Burnus <burnus@net-b.de>
3407 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3408 specifiers (%d, %i,%u and %c).
3410 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3412 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3414 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3418 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3419 * c-pragma.c (handle_pragma_diagnostic): Adjust
3420 control_warning_option caller.
3422 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3424 * c-common.c (c_cpp_error): Update for change to
3425 rich_location::set_range.
3427 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3429 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3430 shifting 1 out of the sign bit.
3432 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3434 * c-common.c (c_common_attribute_table[]): Update max arguments
3435 count for "simd" attribute.
3436 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3438 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3440 PR preprocessor/57580
3441 * c-ppoutput.c (print): Change printed field to bool.
3442 Move src_file last for smaller padding.
3443 (init_pp_output): Set print.printed to false instead of 0.
3444 (scan_translation_unit): Fix up formatting. Set print.printed
3445 to true after printing something other than newline.
3446 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3447 (maybe_print_line_1): Set print.printed to false instead of 0.
3448 (print_line_1): Likewise.
3449 (do_line_change): Set print.printed to true instead of 1.
3450 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3451 dump_macro): Set print.printed to false after printing newline.
3453 2015-12-02 Jason Merrill <jason@redhat.com>
3455 * c-common.c (fold_for_warn): New.
3456 (warn_logical_operator, warn_tautological_cmp)
3457 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3459 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3460 (c_fully_fold_internal, decl_constant_value_for_optimization):
3462 * c-common.h: Don't declare decl_constant_value_for_optimization.
3464 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3467 * c-common.h (c_build_qualified_type): Add extra default
3470 2015-12-01 Julian Brown <julian@codesourcery.com>
3471 Cesar Philippidis <cesar@codesourcery.com>
3472 James Norris <James_Norris@mentor.com>
3474 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3475 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3476 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3478 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3480 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3481 (decl_sloc_common): Delete and move bulk of processing to...
3482 (decl_sloc): ...here.
3483 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3484 (dump_ada_double_name): Remove S parameter and compute the suffix.
3485 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3486 element type and deal with an anonymous one.
3487 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3488 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3489 and remove reference to QUAL_UNION_TYPE.
3490 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3491 (dump_nested_type): ...here. New function extracted from above.
3492 Generate a full declaration for anonymous element type of arrays.
3493 (print_ada_declaration): Really skip anonymous declarations. Remove
3494 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3495 Clean up processing of declarations of array types and objects.
3496 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3497 Remove obsolete code and tidy up.
3499 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3502 * c-common.c (handle_transparent_union_attribute): Update
3505 2015-11-27 Martin Liska <mliska@suse.cz>
3508 * array-notation-common.c (cilkplus_extract_an_triplets):
3509 Release vector of vectors.
3510 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3512 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3515 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3516 (print_ada_struct_decl): Likewise.
3518 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3521 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3522 * cilk.c (recognize_spawn): Determine location in a more precise
3525 2015-11-19 Jason Merrill <jason@redhat.com>
3527 * c-common.c (shorten_compare): But look through macros from
3530 2015-11-18 Jason Merrill <jason@redhat.com>
3532 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3533 non-constant operand comes from a macro.
3535 2015-11-17 Jason Merrill <jason@redhat.com>
3538 * c-common.c (warn_tautological_cmp): Fold before checking for
3541 2015-11-16 Marek Polacek <polacek@redhat.com>
3544 * c-common.c (check_case_bounds): Fold low and high cases.
3546 2015-11-16 Marek Polacek <polacek@redhat.com>
3548 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3549 * c-common.c (c_common_get_alias_set): Likewise.
3550 (handle_visibility_attribute): Likewise.
3552 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3554 * c-common.c (handle_simd_attribute): New.
3555 (struct attribute_spec): Add entry for "simd".
3556 (handle_simd_attribute): New.
3558 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
3560 * c-lex.c (interpret_float): Use fold_convert.
3562 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3564 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3565 and store it on the result.
3566 * c-opts.c (c_common_init_options): Set
3567 global_dc->colorize_source_p.
3569 2015-11-12 James Norris <jnorris@codesourcery.com>
3570 Joseph Myers <joseph@codesourcery.com>
3572 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3573 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3574 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3575 PRAGMA_OACC_CLAUSE_LINK.
3577 2015-11-11 Marek Polacek <polacek@redhat.com>
3581 * c-common.c (valid_array_size_p): New function.
3582 * c-common.h (valid_array_size_p): Declare.
3584 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
3587 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3589 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3591 * array-notation-common.c: Remove unused header files.
3592 * c-ada-spec.c: Likewise.
3593 * c-cilkplus.c: Likewise.
3594 * c-common.c: Likewise.
3595 * c-cppbuiltin.c: Likewise.
3596 * c-dump.c: Likewise.
3597 * c-format.c: Likewise.
3598 * c-gimplify.c: Likewise.
3599 * c-indentation.c: Likewise.
3600 * c-lex.c: Likewise.
3601 * c-omp.c: Likewise.
3602 * c-opts.c: Likewise.
3603 * c-pch.c: Likewise.
3604 * c-ppoutput.c: Likewise.
3605 * c-pragma.c: Likewise.
3606 * c-pretty-print.c: Likewise.
3607 * c-semantics.c: Likewise.
3608 * c-ubsan.c: Likewise.
3610 * stub-objc.c: Likewise.
3612 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3613 Cesar Philippidis <cesar@codesourcery.com>
3614 James Norris <jnorris@codesourcery.com>
3615 Julian Brown <julian@codesourcery.com>
3616 Nathan Sidwell <nathan@codesourcery.com>
3618 * c-pragma.c (oacc_pragmas): Add "routine".
3619 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3621 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3623 * c-common.c (c_common_attributes): Add scalar_storage_order.
3624 (handle_scalar_storage_order_attribute): New function.
3625 * c-pragma.c (global_sso): New variable.
3626 (maybe_apply_pragma_scalar_storage_order): New function.
3627 (handle_pragma_scalar_storage_order): Likewise.
3628 (init_pragma): Register scalar_storage_order.
3629 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3630 * c.opt (Wscalar-storage-order): New warning.
3631 (fsso-struct=): New option.
3633 2015-11-08 Martin Sebor <msebor@redhat.com>
3635 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3637 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3639 * c-common.c: Don't undef DEF_BUILTIN.
3641 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3643 * c-common.c (c_cpp_error): Convert parameter from location_t to
3644 rich_location *. Eliminate the "column_override" parameter and
3645 the call to diagnostic_override_column.
3646 Update the "done_lexing" clause to set range 0
3647 on the rich_location, rather than overwriting a location_t.
3648 * c-common.h (c_cpp_error): Convert parameter from location_t to
3649 rich_location *. Eliminate the "column_override" parameter.
3651 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3652 Thomas Schwinge <thomas@codesourcery.com>
3653 James Norris <jnorris@codesourcery.com>
3655 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3656 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3657 clauses with parallel and kernels and loops.
3658 * c-pragma.h (enum pragma_omp_clause): Add entries for
3659 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3660 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3661 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3663 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3665 2015-11-05 Martin Sebor <msebor@redhat.com>
3668 * c.opt (-Wplacement-new): New option.
3670 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3672 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3673 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3674 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3675 save_expr or create_tmp_var* if TEST is true.
3676 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3677 Don't call add_stmt here.
3678 (struct c_omp_check_loop_iv_data): New type.
3679 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3680 c_omp_check_loop_iv_exprs): New functions.
3681 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3683 (c_omp_declare_simd_clauses_to_numbers): Change
3684 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3685 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3686 from numbers to PARM_DECLs.
3688 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3690 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3693 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
3696 * c-common.h (fold_offsetof_1): Add argument.
3697 * c-common.c (fold_offsetof_1): Diagnose more invalid
3698 offsetof expressions that reference elements past the end of
3701 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3702 Chung-Lin Tang <cltang@codesourcery.com>
3704 * c-pragma.c (oacc_pragmas): Add "atomic".
3705 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3707 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3709 * c-common.c (handle_target_clones_attribute): New.
3710 (c_common_attribute_table): Add handle_target_clones_attribute.
3711 (handle_always_inline_attribute): Add check on target_clones attribute.
3712 (handle_target_attribute): Ditto.
3714 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3716 * array-notation-common.c: Reorder #include's and remove duplicates.
3717 * c-ada-spec.c: Likewise.
3718 * c-cilkplus.c: Likewise.
3719 * c-common.c: Likewise.
3720 * c-cppbuiltin.c: Likewise.
3721 * c-dump.c: Likewise.
3722 * c-format.c: Likewise.
3723 * c-gimplify.c: Likewise.
3724 * c-indentation.c: Likewise.
3725 * c-lex.c: Likewise.
3726 * c-omp.c: Likewise.
3727 * c-opts.c: Likewise.
3728 * c-pch.c: Likewise.
3729 * c-ppoutput.c: Likewise.
3730 * c-pragma.c: Likewise.
3731 * c-pretty-print.c: Likewise.
3732 * c-semantics.c: Likewise.
3733 * c-ubsan.c: Likewise.
3735 * stub-objc.c: Likewise.
3737 2015-10-28 Jason Merrill <jason@redhat.com>
3739 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3741 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3742 James Norris <jnorris@codesourcery.com>
3743 Cesar Philippidis <cesar@codesourcery.com>
3747 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3748 * c-omp.c (c_oacc_split_loop_clauses): New function.
3750 2015-10-21 Martin Sebor <msebor@redhat.com>
3753 * c.opt: End each sentence that describes an option with a period.
3755 2015-10-20 Marek Polacek <polacek@redhat.com>
3757 * array-notation-common.c (is_cilkplus_vector_p): Define.
3758 * c-common.h (is_cilkplus_vector_p): Declare.
3760 2015-10-20 Marek Polacek <polacek@redhat.com>
3762 * c.opt (std=gnu++11): Do not describe as experimental.
3763 (std=gnu++14): Likewise.
3765 2015-10-19 Jason Merrill <jason@redhat.com>
3767 * c-cppbuiltin.c (c_cpp_builtins): Define
3768 __cpp_nontype_template_args.
3770 2015-10-19 Jason Merrill <jason@redhat.com>
3772 * c-cppbuiltin.c (c_cpp_builtins): Define
3773 __cpp_enumerator_attributes, __cpp_fold_expressions,
3774 __cpp_unicode_characters.
3776 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3777 Aldy Hernandez <aldyh@redhat.com>
3779 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3780 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3781 (c_define_builtins): Likewise.
3782 * c-common.h (enum c_omp_clause_split): Add
3783 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3784 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3785 (c_finish_omp_for): Add ORIG_DECLV argument.
3786 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3787 201511 instead of 201307.
3788 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3789 OMP_CRITICAL_CLAUSES to it.
3790 (c_finish_omp_ordered): Add CLAUSES argument, set
3791 OMP_ORDERED_CLAUSES to it.
3792 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3793 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3794 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3795 constructs and new OpenMP 4.5 clauses. Clear
3796 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3798 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3799 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3800 (enum pragma_omp_clause): Add
3801 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3802 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3804 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3806 * c-lex.c (interpret_float): Use real_equal instead of
3809 2015-10-04 Jason Merrill <jason@redhat.com>
3811 Implement N4514, C++ Extensions for Transactional Memory.
3812 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3813 (c_common_attribute_table): Add transaction_safe_dynamic.
3814 transaction_safe now affects type identity.
3815 (handle_tm_attribute): Handle transaction_safe_dynamic.
3816 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3817 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3818 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3820 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3821 * c-pretty-print.c (pp_c_attributes_display): Don't print
3822 transaction_safe in C++.
3824 2015-10-02 Marek Polacek <polacek@redhat.com>
3826 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3828 2015-10-02 Marek Polacek <polacek@redhat.com>
3831 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3832 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3833 * c.opt (Wduplicated-cond): New option.
3835 2015-10-01 Joseph Myers <joseph@codesourcery.com>
3837 * c.opt (std=c11): Do not describe as experimental.
3838 (std=gnu11): Likewise.
3839 (std=iso9899:2011): Likewise.
3841 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3843 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3844 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3846 2015-09-25 Marek Polacek <polacek@redhat.com>
3848 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3849 (ubsan_instrument_shift): Likewise.
3851 2015-09-25 Marek Polacek <polacek@redhat.com>
3854 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3856 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3858 * c-indentation.c (should_warn_for_misleading_indentation):
3859 Compare next_stmt_vis_column with guard_line_first_nws instead
3860 of with guard_line_vis_column.
3862 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3866 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3867 options and options not valid for the current language.
3869 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3871 * c-indentation.c (should_warn_for_misleading_indentation):
3872 Float out and consolidate the calls to get_visual_column that
3873 are passed guard_exploc as an argument. Compare
3874 next_stmt_vis_column with guard_line_first_nws instead of with
3875 body_line_first_nws.
3877 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3879 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3880 Wnamespaces): New C++ warnings.
3882 2015-09-22 Jason Merrill <jason@redhat.com>
3884 * c-common.h (abi_compat_version_crosses): New.
3885 (warn_abi_version): Declare.
3886 * c-common.c: Define it.
3887 * c-opts.c (c_common_post_options): Handle it.
3888 flag_abi_compat_version defaults to 8.
3890 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3892 Complete the implementation of N4230, Nested namespace definition.
3893 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3894 __cpp_nested_namespace_definitions.
3896 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3898 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3900 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3902 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3904 * c-pragma.h (pragma_lex): Add optional loc argument.
3906 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3908 * c-format.c (check_format_arg): Adjust to use common block size in all
3911 2015-09-15 David Malcolm <dmalcolm@redhat.com>
3913 * c-format.c (location_from_offset): Update for change in
3914 signature of location_get_source_line.
3915 * c-indentation.c (get_visual_column): Likewise.
3916 (line_contains_hash_if): Likewise.
3918 2015-09-14 Marek Polacek <polacek@redhat.com>
3920 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3921 setting various warnings.
3923 2015-09-14 Marek Polacek <polacek@redhat.com>
3925 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3928 2015-09-11 Mark Wielaard <mjw@redhat.com>
3931 * c.opt (Wunused-variable): Option from common.opt.
3932 (Wunused-const-variable): New option.
3934 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3937 * c.opt ([Wsubobject-linkage]): Add.
3939 2015-09-03 Martin Sebor <msebor@redhat.com>
3942 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3944 * c-common.c (reject_gcc_builtin): Define.
3946 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3949 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3951 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3952 cilk_gimplify_call_params_in_spawned_fn.
3953 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3954 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3957 2015-08-25 Marek Polacek <polacek@redhat.com>
3960 * c-common.c (handle_weak_attribute): Don't check whether the
3961 visibility can be changed here.
3963 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3965 * c-lex.c (c_lex_with_flags): Use explicit locations.
3967 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3969 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3970 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3972 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3975 * c-common.c (check_builtin_function_arguments): Add check
3976 for BUILT_IN_SIGNBIT argument.
3978 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3981 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3984 2015-08-17 Marek Polacek <polacek@redhat.com>
3986 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3987 with whitespaces before qualifier names.
3989 2015-08-12 Marek Polacek <polacek@redhat.com>
3992 * c-common.c (maybe_warn_shift_overflow): Properly handle
3993 left-shifting 1 into the sign bit.
3995 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3997 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3999 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4000 Braden Obrzut <admin@maniacsvault.net>
4001 Jason Merrill <jason@redhat.com>
4003 Add C++ Concepts TS support.
4004 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4005 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4006 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4007 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4008 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4009 * c.opt (fconcepts): New.
4011 2015-08-02 Martin Sebor <msebor@redhat.com>
4013 * c.opt (-Wframe-address): New warning option.
4015 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4017 * c-indentation.c (should_warn_for_misleading_indentation):
4020 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4022 * c-indentation.c (get_visual_column): Add parameter first_nws,
4023 use it. Update comment documenting the function.
4024 (is_first_nonwhitespace_on_line): Remove.
4025 (should_warn_for_misleading_indentation): Replace usage of
4026 of is_first_nonwhitespace_on_line with get_visual_column.
4028 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4030 * c-indentation.h (struct token_indent_info): Define.
4031 (get_token_indent_info): Define.
4032 (warn_for_misleading_information): Declare.
4033 * c-common.h (warn_for_misleading_information): Remove.
4034 * c-identation.c (warn_for_misleading_indentation):
4035 Change declaration to take three token_indent_infos. Adjust
4037 * c-identation.c (should_warn_for_misleading_indentation):
4038 Likewise. Bail out early if the body is a compound statement.
4039 (guard_tinfo_to_string): Define.
4041 2015-07-30 Jason Merrill <jason@redhat.com>
4043 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4044 '*' for reference decay.
4046 2015-07-30 Marek Polacek <polacek@redhat.com>
4048 * c-common.c (warn_tautological_cmp): Bail for float types.
4050 2015-07-27 Marek Polacek <polacek@redhat.com>
4053 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4055 2015-07-27 Marek Polacek <polacek@redhat.com>
4059 * c-common.c (find_array_ref_with_const_idx_r): New function.
4060 (warn_tautological_cmp): New function.
4061 * c-common.h (warn_tautological_cmp): Declare.
4062 * c.opt (Wtautological-compare): New option.
4064 2015-07-23 Marek Polacek <polacek@redhat.com>
4066 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4067 (ubsan_instrument_shift): Likewise.
4069 2015-07-23 Marek Polacek <polacek@redhat.com>
4072 * c-ubsan.c: Include gimplify.h.
4073 (ubsan_instrument_division): Unshare OP0 and OP1.
4074 (ubsan_instrument_shift): Likewise.
4076 2015-07-20 Marek Polacek <polacek@redhat.com>
4077 Richard Sandiford <richard.sandiford@arm.com>
4080 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4081 Use EXPR_LOC_OR_LOC.
4082 (maybe_warn_shift_overflow): New function.
4083 * c-common.h (maybe_warn_shift_overflow): Declare.
4084 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4085 * c.opt (Wshift-overflow): New option.
4087 2015-07-16 Martin Liska <mliska@suse.cz>
4089 * c-format.c (static void check_format_info_main): Use
4090 object_allocator instead of pool_allocator.
4091 (check_format_arg): Likewise.
4092 (check_format_info_main): Likewise.
4094 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4096 * c-opts.c: Remove multiline #include comment.
4098 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4100 * c-common.c: Fix double word typos.
4102 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4104 * c-ada-spec.h (cpp_operation): Revert latest change.
4105 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4106 constructors and destructors.
4108 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4110 * c-common.h: Adjust includes for flags.h changes.
4111 * stub-objc.c: Likewise.
4113 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4115 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4116 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4118 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4120 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4121 are to be removed, return NULL rather than original clauses list.
4123 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4125 * array-notation-common.c: Adjust includes.
4126 * c-ada-spec.c: Likewise.
4127 * c-cilkplus.c: Likewise.
4128 * c-common.h: Likewise.
4129 * c-cppbuiltin.c: Likewise.
4130 * c-dump.c: Likewise.
4131 * c-format.c: Likewise.
4132 * c-gimplify.c: Likewise.
4133 * c-indentation.c: Likewise.
4134 * c-lex.c: Likewise.
4135 * c-omp.c: Likewise.
4136 * c-opts.c: Likewise.
4137 * c-pch.c: Likewise.
4138 * c-ppoutput.c: Likewise.
4139 * c-pragma.c: Likewise.
4140 * c-pretty-print.c: Likewise.
4141 * c-semantics.c: Likewise.
4142 * c-ubsan.c: Likewise.
4144 * stub-objc.c: Likewise.
4146 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4148 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4149 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4151 2015-07-01 Jason Merrill <jason@redhat.com>
4153 * c-common.h (D_CXX11): Rename from D_CXX0X.
4154 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4155 * c-common.c: Adjust.
4157 * c-opts.c (c_common_post_options): Default to C++14.
4159 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4161 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4163 Implement N4197 - Adding u8 character literals
4164 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4166 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4167 CPP_UTF8CHAR_USERDEF tokens.
4168 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4169 and CPP_UTF8CHAR tokens.
4170 (lex_charconst): Treat CPP_UTF8CHAR token.
4172 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4175 * c-common.c (do_warn_unused_parameter): Move here.
4176 * c-common.h (do_warn_unused_parameter): Declare.
4178 2015-06-29 Marek Polacek <polacek@redhat.com>
4181 * c-common.c (check_case_bounds): Add bool * parameter. Set
4183 (c_add_case_label): Add bool * parameter. Pass it down to
4185 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4187 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4190 2015-06-27 Marek Polacek <polacek@redhat.com>
4192 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4193 or VECTOR_INTEGER_TYPE_P throughout.
4194 * c-gimplify.c: Likewise.
4196 2015-06-26 Marek Polacek <polacek@redhat.com>
4198 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4199 * c-common.c (c_fully_fold_internal): Likewise.
4200 (c_alignof_expr): Likewise.
4201 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4202 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4203 * cilk.c (create_parm_list): Likewise.
4205 2015-06-26 Marek Polacek <polacek@redhat.com>
4207 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4209 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4211 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4212 * c-gimplify.c: Likewise.
4213 * c-pragma.c: Likewise.
4214 * c-ubsan.c: Likewise.
4217 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4219 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4222 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4224 * cilk.c: Move calls.h after tm.h in the include chain.
4226 2015-06-25 Marek Polacek <polacek@redhat.com>
4228 * array-notation-common.c: Use VAR_P throughout.
4229 * c-ada-spec.c: Likewise.
4230 * c-common.c: Likewise.
4231 * c-format.c: Likewise.
4232 * c-gimplify.c: Likewise.
4233 * c-omp.c: Likewise.
4234 * c-pragma.c: Likewise.
4235 * c-pretty-print.c: Likewise.
4238 2015-06-25 Marek Polacek <polacek@redhat.com>
4240 * cilk.c (extract_free_variables): Use is_global_var.
4242 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4244 * c-common.c: Don't include target-def.h.
4246 2015-06-23 Marek Polacek <polacek@redhat.com>
4248 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4249 when comparing INTEGER_CSTs.
4251 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4253 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4254 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4255 (dump_ada_template): Skip partially specialized types.
4257 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4259 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4262 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4264 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4265 * c-ada-spec.c: Likewise.
4266 * c-cilkplus.c: Likewise.
4267 * c-common.c: Likewise.
4268 * c-common.h: Likewise.
4269 * c-cppbuiltin.c: Likewise.
4270 * c-dump.c: Likewise.
4271 * c-format.c: Likewise.
4272 * c-gimplify.c: Likewise.
4273 * c-indentation.c: Likewise.
4274 * c-lex.c: Likewise.
4275 * c-omp.c: Likewise.
4276 * c-opts.c: Likewise.
4277 * c-pch.c: Likewise.
4278 * c-ppoutput.c: Likewise.
4279 * c-pragma.c: Likewise.
4280 * c-pretty-print.c: Likewise.
4281 * c-semantics.c: Likewise.
4282 * c-ubsan.c: Likewise.
4284 * stub-objc.c: Likewise.
4286 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4289 * c-common.c (c_common_truthvalue_conversion): Warn when
4290 converting an address of a reference to a truth value.
4292 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4294 * array-notation-common.c : Adjust include files.
4295 * c-ada-spec.c : Likewise.
4296 * c-cilkplus.c : Likewise.
4297 * c-common.c : Likewise.
4298 * c-common.h : Likewise.
4299 * c-cppbuiltin.c : Likewise.
4300 * c-dump.c : Likewise.
4301 * c-format.c : Likewise.
4302 * c-gimplify.c : Likewise.
4303 * c-indentation.c : Likewise.
4304 * c-lex.c : Likewise.
4305 * c-omp.c : Likewise.
4306 * c-opts.c : Likewise.
4307 * c-pch.c : Likewise.
4308 * c-ppoutput.c : Likewise.
4309 * c-pragma.c : Likewise.
4310 * c-pretty-print.c : Likewise.
4311 * c-semantics.c : Likewise.
4312 * c-ubsan.c : Likewise.
4313 * cilk.c : Likewise.
4314 * stub-objc.c : Likewise.
4316 2015-06-08 Marek Polacek <polacek@redhat.com>
4319 * c-format.c (location_from_offset): Return LOC if LINE is null.
4321 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4323 * c-common.h (c_parse_final_cleanups): New prototype.
4324 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4326 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4328 * c-common.c (noplt): New attribute.
4329 (handle_noplt_attribute): New handler.
4331 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4333 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4334 * c-ada-spec.c: Likewise.
4335 * c-cilkplus.c: Likewise.
4336 * c-common.c: Likewise.
4337 * c-common.h: Likewise.
4338 * c-cppbuiltin.c: Likewise.
4339 * c-dump.c: Likewise.
4340 * c-format.c: Likewise.
4341 * c-gimplify.c: Likewise.
4342 * c-indentation.c: Likewise.
4343 * c-lex.c: Likewise.
4344 * c-omp.c: Likewise.
4345 * c-opts.c: Likewise.
4346 * c-pch.c: Likewise.
4347 * c-ppoutput.c: Likewise.
4348 * c-pragma.c: Likewise.
4349 * c-pretty-print.c: Likewise.
4350 * c-semantics.c: Likewise.
4351 * c-ubsan.c: Likewise.
4353 * stub-objc.c: Likewise.
4355 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4358 * c-indentation.c (should_warn_for_misleading_indentation): Use
4359 expand_location rather than expand_location_to_spelling_point.
4360 Don't warn if the guarding statement is more indented than the
4363 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4365 * c-indentation.c (warn_for_misleading_indentation): Bail out
4366 immediately if -Wmisleading-indentation isn't enabled.
4368 2015-06-01 Martin Liska <mliska@suse.cz>
4370 * c-format.c (check_format_arg):Use new type-based pool allocator.
4371 (check_format_info_main) Likewise.
4373 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4375 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4376 (has_nontrivial_methods): Likewise.
4378 2015-05-25 Marek Polacek <polacek@redhat.com>
4380 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4382 2015-05-22 Marek Polacek <polacek@redhat.com>
4385 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4387 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4389 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4390 STACK_GROWS_DOWNWARD.
4392 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4394 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4395 STACK_GROWS_DOWNWARD rather than if it is defined.
4397 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4400 * c-format.c (location_column_from_byte_offset): New.
4401 (location_from_offset): New.
4402 (struct format_wanted_type): Add offset_loc field.
4403 (check_format_info): Move handling of location for extra arguments
4404 closer to the point of warning.
4405 (check_format_info_main): Pass the result of location_from_offset
4407 (format_type_warning): Pass the result of location_from_offset
4410 2015-05-20 Marek Polacek <polacek@redhat.com>
4412 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4414 2015-05-20 Marek Polacek <polacek@redhat.com>
4416 * c-ada-spec.c (dump_sloc): Use DECL_P.
4418 2015-05-20 Marek Polacek <polacek@redhat.com>
4420 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4421 * c-common.c: Likewise.
4423 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4425 * c-common.h (fe_file_change): Strengthen param from
4426 const line_map * to const line_map_ordinary *.
4427 (pp_file_change): Likewise.
4428 * c-lex.c (fe_file_change): Likewise.
4429 (cb_define): Use linemap_check_ordinary when invoking
4431 (cb_undef): Likewise.
4432 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4433 invoking cb_file_change.
4434 (c_finish_options): Likewise.
4435 (push_command_line_include): Likewise.
4436 (cb_file_change): Strengthen param "new_map" from
4437 const line_map * to const line_map_ordinary *.
4438 * c-ppoutput.c (cb_define): Likewise for local "map".
4439 (pp_file_change): Likewise for param "map" and local "from".
4441 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4443 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4445 2015-05-18 Tom de Vries <tom@codesourcery.com>
4447 * c-common.c (build_va_arg_1): New function.
4448 (build_va_arg): Add address operator to va_list operand if necessary.
4450 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4453 * c-common.c (int_safely_convertible_to_real_p): Define.
4454 (unsafe_conversion_p): Check conversions involving complex types.
4455 (conversion_warning): Add new warning message for conversions which
4456 discard imaginary component.
4457 * c-common.h: (enum conversion_safety): Add new enumerator for such
4460 2015-05-14 Marek Polacek <polacek@redhat.com>
4464 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4465 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4466 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4467 use it. If FOR_INT_CONST, require that all evaluated operands be
4470 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4472 * c-common.h (warn_for_misleading_indentation): New prototype.
4473 * c-indentation.c: New file.
4474 * c.opt (Wmisleading-indentation): New option.
4476 2015-05-12 Tom de Vries <tom@codesourcery.com>
4478 PR tree-optimization/66010
4479 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4481 2015-05-09 Jason Merrill <jason@redhat.com>
4483 * c-opts.c (c_common_post_options): Also clear
4484 cpp_opts->cpp_warn_cxx11_compat.
4486 * c-common.h (enum cxx_dialect): Add cxx_unset.
4487 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4488 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4490 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4491 (std=gnu++0x): Mark as Undocumented.
4492 (std=gnu++1y): Add deprecated message.
4494 2015-05-08 Jason Merrill <jason@redhat.com>
4496 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4499 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4501 2015-05-08 Marek Polacek <polacek@redhat.com>
4504 * c.opt (Woverride-init-side-effects): New option.
4506 2015-05-07 Marek Polacek <polacek@redhat.com>
4509 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4511 * c.opt (Wshift-negative-value): New option.
4512 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4513 when -Wextra and C99/C++11 mode.
4515 2015-05-07 Marek Polacek <polacek@redhat.com>
4516 Martin Uecker <uecker@eecs.berkeley.edu>
4518 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4519 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4521 2015-05-05 Jason Merrill <jason@redhat.com>
4523 * c.opt (Wterminate): New.
4525 2015-04-30 Marek Polacek <polacek@redhat.com>
4527 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4528 require that the non-constant be of a boolean type.
4530 2015-04-29 Josh Triplett <josh@joshtriplett.org>
4532 * c-common.c (handle_section_attribute): Refactor to reduce
4533 nesting and distinguish between error cases.
4535 2015-04-29 Marek Polacek <polacek@redhat.com>
4538 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4541 2015-04-29 Jakub Jelinek <jakub@redhat.com>
4543 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4544 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4545 HOST_BITS_PER_WIDE_INT.
4547 2015-04-28 Tom de Vries <tom@codesourcery.com>
4549 PR tree-optimization/65887
4550 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4552 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
4553 Pierre-Marie de Rodat <derodat@adacore.com>
4555 * c-ada-spec.c (in_function): Delete.
4556 (dump_generic_ada_node): Do not change in_function and remove the
4557 redundant code dealing with it.
4558 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4559 (print_ada_methods): Output the static member functions in a nested
4560 package after the regular methods as well as associated renamings.
4562 2015-04-24 Marek Polacek <polacek@redhat.com>
4565 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4566 and OPT_Wshift_count_overflow.
4569 * c-common.c (warn_logical_operator): Warn if the operands have the
4572 2015-04-24 Marek Polacek <polacek@redhat.com>
4575 * c-common.c (warn_logical_operator): Bail if either operand comes
4576 from a macro expansion.
4578 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4581 * c-common.c (c_default_pointer_mode): Add definition.
4582 * c-common.h (c_default_pointer_mode): Add declaration.
4584 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4586 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4587 on record_builtin_type argument.
4589 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4592 * c-common.c (warn_logical_not_parentheses): Don't warn for
4595 2015-03-07 Marek Polacek <polacek@redhat.com>
4598 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4599 before trying to figure out whether we have a flexible array member.
4601 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
4602 Jonathan Wakely <jwakely.gcc@gmail.com>
4604 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4606 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4609 * c-ada-spec.c (print_destructor): Remove obsolete code.
4611 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4613 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4614 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4615 DECL_TEMPLATE_RESULT emulations.
4616 (dump_ada_template)): Add guard for TYPE_METHODS.
4618 2015-02-27 Marek Polacek <polacek@redhat.com>
4621 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4623 2015-02-27 Kai Tietz <ktietz@redhat.com>
4626 * c-pragma.c (handle_pragma_weak): Do not try to create
4627 weak/alias of declarations not being function, or variable
4630 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4633 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4635 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4637 2015-02-16 Marek Polacek <polacek@redhat.com>
4640 * c-format.c (check_format_types): Handle null param.
4642 2015-02-13 Marek Polacek <polacek@redhat.com>
4645 * c-format.c (check_format_types): Don't warn about different
4646 signedness if the original value is in the range of WANTED_TYPE.
4648 2015-02-12 Jason Merrill <jason@redhat.com>
4651 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4652 to the current highest version.
4653 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4655 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4659 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4660 instead of RDIV_EXPR. Use build_binary_op instead of
4663 2015-01-30 Joseph Myers <joseph@codesourcery.com>
4665 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4666 to pass input_location as first argument.
4668 2015-01-23 Tom de Vries <tom@codesourcery.com>
4671 * c.opt (fopenacc): Mark as LTO option.
4673 2015-01-23 Tom de Vries <tom@codesourcery.com>
4676 * c.opt (fopenmp): Mark as LTO option.
4678 2015-01-21 Jakub Jelinek <jakub@redhat.com>
4681 * cilk.c (fill_decls_vec): Only put decls into vector v.
4682 (compare_decls): Fix up formatting.
4684 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4687 * cilk.c: Include vec.h.
4688 (struct cilk_decls): New structure.
4689 (wrapper_parm_cb): Split this function to...
4690 (fill_decls_vec): ...this...
4691 (create_parm_list): ...and this.
4692 (compare_decls): New function.
4693 (for_local_cb): Remove.
4694 (wrapper_local_cb): Ditto.
4695 (build_wrapper_type): For now first traverse and fill vector of
4696 declarations then sort it and then deal with sorted vector.
4697 (cilk_outline): Ditto.
4698 (declare_one_free_variable): Ditto.
4700 2015-01-21 Jason Merrill <jason@redhat.com>
4703 * c-format.c (check_format_arg): Call decl_constant_value.
4705 2015-01-19 Martin Liska <mliska@suse.cz>
4707 * c-common.c (handle_noicf_attribute): New function.
4709 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4710 Bernd Schmidt <bernds@codesourcery.com>
4711 James Norris <jnorris@codesourcery.com>
4712 Cesar Philippidis <cesar@codesourcery.com>
4713 Ilmir Usmanov <i.usmanov@samsung.com>
4714 Jakub Jelinek <jakub@redhat.com>
4716 * c.opt (fopenacc): New option.
4717 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4718 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4720 * c-common.h (c_finish_oacc_wait): New prototype.
4721 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4722 (c_finish_oacc_wait): New function.
4723 * c-pragma.c (oacc_pragmas): New variable.
4724 (c_pp_lookup_pragma, init_pragma): Handle it.
4725 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4726 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4727 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4728 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4729 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4730 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4731 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4732 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4733 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4734 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4735 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4736 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4737 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4738 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4739 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4740 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4741 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4742 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4743 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4744 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4745 PRAGMA_OACC_CLAUSE_WORKER.
4747 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
4749 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4750 for the new option fstack-protector_explicit.
4751 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4752 (handle_stack_protect_attribute): New function.
4754 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
4756 * c.opt: New option -Warray-bounds=.
4758 2015-01-09 Michael Collison <michael.collison@linaro.org>
4760 * array-notation-common.c: Include hash-set.h, machmode.h,
4761 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4762 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4763 * c-ada-spec.c: Ditto.
4764 * c-cilkplus.c: Ditto.
4765 * c-common.c: Include input.h due to flattening of tree.h.
4766 Define macro GCC_C_COMMON_C.
4767 * c-common.h: Flatten tree.h header files into c-common.h.
4768 Remove include of tree-core.h.
4769 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4770 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4771 fold-const.h, wide-int.h, and inchash.h due to
4772 flattening of tree.h.
4774 * c-format.c: Flatten tree.h header files into c-common.h.
4775 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4776 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4777 fold-const.h, wide-int.h, and inchash.h due to
4778 flattening of tree.h.
4779 * c-dump.c: Include hash-set.h, machmode.h,
4780 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4781 fold-const.h, wide-int.h, and inchash.h due to
4782 flattening of tree.h.
4783 * c-format.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, inchash.h and real.h due to
4786 flattening of tree.h.
4787 * c-gimplify.c: Include hash-set.h, machmode.h,
4788 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4789 fold-const.h, wide-int.h, and inchash.h due to
4790 flattening of tree.h.
4796 * c-ppoutput.c: Ditto.
4797 * c-pragma.c: Ditto.
4798 * c-pretty-print.c: Ditto.
4799 * c-semantics.c: Ditto.
4801 * stub-objc.c: Ditto.
4803 2015-01-08 Jason Merrill <jason@redhat.com>
4805 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4806 do_ubsan_in_current_function.
4807 (ubsan_maybe_instrument_reference_or_call): Likewise.
4808 * c-ubsan.h: Declare it.
4810 2015-01-08 Mike Stump <mikestump@comcast.net>
4812 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4814 2015-01-07 Marek Polacek <polacek@redhat.com>
4817 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4818 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4820 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4823 * c.opt (Wsuggest-override): New option.
4825 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4827 Update copyright years.
4829 2015-01-05 Marek Polacek <polacek@redhat.com>
4832 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4834 * c-common.h (warn_array_subscript_with_type_char): Update
4837 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4839 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4840 Control macro with flag_sized_deallocation.
4842 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4844 * c.opt (Wdiscarded-array-qualifiers): New option.
4846 2014-12-19 Jakub Jelinek <jakub@redhat.com>
4848 PR preprocessor/63831
4849 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4850 and __has_cpp_attribute here.
4851 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4852 c_common_has_attribute.
4853 * c-common.h (c_common_has_attribute): New prototype.
4854 * c-lex.c (init_c_lex): Set cb->has_attribute to
4855 c_common_has_attribute instead of cb_has_attribute.
4856 (get_token_no_padding): New function.
4857 (cb_has_attribute): Renamed to ...
4858 (c_common_has_attribute): ... this. No longer static. Use
4859 get_token_no_padding, require ()s, don't build TREE_LIST
4860 unnecessarily, fix up formatting, adjust diagnostics, call
4863 2014-12-15 Jason Merrill <jason@redhat.com>
4865 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4866 (-Wsized-deallocation): New.
4867 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4868 to on in C++14 and up.
4870 2014-12-11 Jason Merrill <jason@redhat.com>
4872 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4874 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4875 we aren't complaining about VLAs.
4877 2014-12-06 Marek Polacek <polacek@redhat.com>
4879 PR tree-optimization/64183
4880 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4881 shift-expression if it is integer_type_node. Use types_compatible_p.
4883 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4885 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4886 last argument from create_tmp_var_raw and create_tmp_var calls.
4887 * cilk.c (gimplify_cilk_spawn): Likewise.
4888 * c-omp.c (c_finish_omp_atomic): Likewise.
4890 2014-11-28 Marek Polacek <polacek@redhat.com>
4892 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4893 instead of unsigned_type_node.
4895 2014-11-28 Marek Polacek <polacek@redhat.com>
4898 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4900 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4901 expression to unsigned_type_node.
4903 2014-11-20 Mark Wielaard <mjw@redhat.com>
4906 * c-opts.c (set_std_c89): Set lang_hooks.name.
4907 (set_std_c99): Likewise.
4908 (set_std_c11): Likewise.
4909 (set_std_cxx98): Likewise.
4910 (set_std_cxx11): Likewise.
4911 (set_std_cxx14): Likewise.
4912 (set_std_cxx1z): Likewise.
4914 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4917 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4918 return type to bool.
4919 * c-common.c: Include gimple-expr.h.
4920 (convert_vector_to_pointer_for_subscript): Change return type to
4921 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4922 and copy it into a TARGET_EXPR and use that instead of *vecp
4925 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4927 Merger of git branch "gimple-classes-v2-option-3".
4928 * ChangeLog.gimple-classes: New.
4929 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4930 from being just a vec<gimple> to a vec<gbind *>.
4932 2014-11-18 Jakub Jelinek <jakub@redhat.com>
4935 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4936 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4937 get_pointer_alignment for non-pointers. Use ptype, or if it is
4938 reference type, corresponding pointer type, as type of kind
4940 (ubsan_maybe_instrument_reference,
4941 ubsan_maybe_instrument_member_call): Adjust callers.
4943 2014-11-15 Marek Polacek <polacek@redhat.com>
4946 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4948 (extract_array_notation_exprs): Return for NULL node.
4950 2014-11-12 Joseph Myers <joseph@codesourcery.com>
4952 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4953 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4955 2014-11-12 Jakub Jelinek <jakub@redhat.com>
4958 * c-common.c (check_builtin_function_arguments): Handle
4959 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4961 2014-11-10 Andi Kleen <ak@linux.intel.com>
4964 * c-common.h (check_no_cilk): Declare.
4965 * cilk.c (get_error_location): New function.
4966 (check_no_cilk): Dito.
4968 2014-11-10 Andi Kleen <ak@linux.intel.com>
4970 * cilk.c (recognize_spawn): Use expression location
4973 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4975 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4977 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4979 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4980 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4981 (__cpp_range_based_for, __cpp_initializer_lists,
4982 __cpp_delegating_constructors, __cpp_nsdmi,
4983 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4984 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4985 __has_cpp_attribute.
4986 * c-lex.c (cb_has_attribute): New callback CPP function;
4987 (init_c_lex): Set has_attribute callback.
4989 2014-11-04 Richard Biener <rguenther@suse.de>
4991 * c-common.c (shorten_compare): Do not shorten mixed
4992 DFP and non-DFP compares.
4994 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4996 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4997 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4998 Commentary and rearrangement of tests.
4999 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5000 Commentary and rearrangement of tests.
5001 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5002 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5004 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5006 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5007 enum from machine_mode.
5009 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5011 * c-common.c: Adjust include files.
5012 * c-gimplify.c: Ditto.
5014 * c-pragma.c: Ditto.
5017 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5019 * c-gimplify.c: Adjust include files.
5021 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5024 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5025 c_common_initialize_diagnostics.
5026 * c-common.h: Likewise.
5028 2014-10-24 Marek Polacek <polacek@redhat.com>
5031 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5032 print "struct"/"union"/"enum" for typedefed names.
5034 2014-10-23 Marek Polacek <polacek@redhat.com>
5036 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5039 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5040 Yury Gribov <y.gribov@samsung.com>
5042 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5043 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5044 instead of flag_sanitize_recover as bool flag.
5046 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5048 * cilk.c: Revert previous change.
5050 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5053 * cilk.c: Include vec.h.
5054 (struct cilk_decls): New structure.
5055 (wrapper_parm_cb): Split this function to...
5056 (fill_decls_vec): ...this...
5057 (create_parm_list): ...and this.
5058 (compare_decls): New function.
5059 (for_local_cb): Remove.
5060 (wrapper_local_cb): Ditto.
5061 (build_wrapper_type): For now first traverse and fill vector of
5062 declarations then sort it and then deal with sorted vector.
5063 (cilk_outline): Ditto.
5064 (declare_one_free_variable): Ditto.
5066 2014-10-17 Marek Polacek <polacek@redhat.com>
5068 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5069 * c.opt (Wimplicit-int): Initialize to -1.
5071 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5073 * c-pragma.c: Adjust include files.
5074 * c-semantics.c: Likewise.
5076 2014-10-16 DJ Delorie <dj@redhat.com>
5078 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5081 2014-10-14 Jason Merrill <jason@redhat.com>
5084 * c-common.h (CPP_PREPARSED_EXPR): New.
5085 (N_CP_TTYPES): Adjust.
5087 2014-10-15 Marek Polacek <polacek@redhat.com>
5089 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5091 2014-10-14 DJ Delorie <dj@redhat.com>
5093 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5094 types, not just __int128.
5095 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5096 types, not just __int128.
5097 (cpp_atomic_builtins): Round pointer sizes up.
5098 (type_suffix): Use type precision, not specific types.
5099 * c-common.c (c_common_reswords): Remove __int128 special case.
5100 (c_common_type_for_size): Check for all __intN types, not just
5102 (c_common_type_for_mode): Likewise.
5103 (c_common_signed_or_unsigned_type): Likewise.
5104 (c_build_bitfield_integer_type): Likewise.
5105 (c_common_nodes_and_builtins): Likewise.
5106 (keyword_begins_type_specifier): Likewise.
5107 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5110 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5112 * c-common.c: Use hash_table instead of hashtab.
5114 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5116 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5119 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5124 * c-common.c (warn_logical_operator): Punt for vectors.
5126 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5128 Implement SD-6: SG10 Feature Test Recommendations
5129 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5130 macros and the __has_header macro.
5132 2014-09-30 Jason Merrill <jason@redhat.com>
5134 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5135 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5136 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5138 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5139 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5141 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5142 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5144 2014-09-24 Marek Polacek <polacek@redhat.com>
5148 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5150 2014-09-23 Andi Kleen <ak@linux.intel.com>
5152 * c-common.c (handle_no_reorder_attribute): New function.
5153 (c_common_attribute_table): Add no_reorder attribute.
5155 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5157 * c-cppbuiltin.c (c_cpp_builtins): Define
5158 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5161 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5163 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5164 for supported floating-point modes.
5166 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5168 * c.opt (Wpsabi): Use LangEnabledBy.
5169 * c-opts.c (c_common_handle_option): Do not handle here.
5171 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5173 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5174 macros for floating-point modes.
5176 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5179 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5180 __*_DENORM_MIN__ without denormals.
5182 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5184 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5185 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5186 ubsan_create_data callers.
5187 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5188 index is constant or BIT_AND_EXPR with constant mask and is
5189 small enough for the bound.
5190 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5191 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5193 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5195 * c.opt: Add CppReason to various flags.
5196 (Wdate-time): Re-sort.
5197 * c-common.c: Include c-common.h earlier.
5198 (struct reason_option_codes_t): Delete.
5199 (c_option_controlling_cpp_error): Prefix global type and struct
5202 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5204 * c.opt (Wnormalized): New.
5205 (Wnormalized=): Use Enum and Reject Negative.
5206 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5208 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5210 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5211 digits of floating-point modes if -fbuilding-libgcc.
5213 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5215 * c-cppbuiltin.c (c_cpp_builtins): Also define
5216 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5217 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5218 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5219 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5220 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5221 __LIBGCC_STACK_GROWS_DOWNWARD__,
5222 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5223 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5224 __LIBGCC_DWARF_FRAME_REGISTERS__,
5225 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5226 __LIBGCC_STACK_POINTER_REGNUM__ and
5227 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5228 (builtin_define_with_value): Handle backslash-escaping in string
5231 2014-09-05 Richard Biener <rguenther@suse.de>
5234 * c-format.c (check_format_arg): Properly handle
5235 effectively signed POINTER_PLUS_EXPR offset.
5237 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5239 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5240 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5241 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5243 * c-opts.c (c_common_handle_option): Do not handle here.
5244 (sanitize_cpp_opts): Likewise.
5245 * c-common.c (struct reason_option_codes_t): Handle
5246 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5248 2014-09-03 Marek Polacek <polacek@redhat.com>
5250 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5252 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5253 Balaji V. Iyer <balaji.v.iyer@intel.com>
5254 Igor Zamyatin <igor.zamyatin@intel.com>
5256 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5257 * c-common.c (c_common_reswords): Added _Cilk_for.
5258 * c-common.h (enum rid): Added RID_CILK_FOR.
5259 (cilk_for_number_of_iterations): Add declaration.
5260 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5262 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5263 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5265 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5267 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5268 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5269 Wundef): Use CPP, Var and Init.
5270 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5272 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5274 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5275 * c-opts.c (c_common_handle_option): Do not handle here.
5277 2014-08-25 Jason Merrill <jason@redhat.com>
5279 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5280 -std=c++14 and -std=gnu++14, rather than the reverse.
5281 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5282 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5283 * c-common.h (cxx_dialect): Remove cxx1y.
5285 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5287 * c-common.h (enum cxx_dialect): Add cxx14.
5288 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5289 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5290 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5292 2014-08-22 Jason Merrill <jason@redhat.com>
5294 * c.opt (std=gnu++17): Fix alias.
5296 2014-08-22 Marek Polacek <polacek@redhat.com>
5299 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5300 check for vector types. Drop LHS argument.
5301 * c-common.h (warn_logical_not_parentheses): Adjust.
5303 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5305 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5306 (Wmultichar): Likewise.
5307 (Wdate-time): Use C-family languages instead of Common. Use CPP
5309 * c-opts.c (c_common_handle_option): Do not handle the above
5311 (sanitize_cpp_opts): Likewise.
5313 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5316 * c-opts.c: Include tree-diagnostics.h.
5317 (c_diagnostic_finalizer): New.
5318 (c_common_initialize_diagnostics): Use it.
5320 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5322 PR preprocessor/51303
5323 * c-common.c (struct reason_option_codes_t option_codes):
5324 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5326 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5330 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5331 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5332 (c_common_post_options): Call init_global_opts_from_cpp.
5333 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5335 2014-08-19 Marek Polacek <polacek@redhat.com>
5338 * c-common.c (maybe_warn_bool_compare): New function.
5339 * c-common.h (maybe_warn_bool_compare): Declare.
5340 * c.opt (Wbool-compare): New option.
5342 2014-08-19 Marek Polacek <polacek@redhat.com>
5344 * c.opt (Wc99-c11-compat): New option.
5346 2014-08-19 Marek Polacek <polacek@redhat.com>
5348 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5349 to warn_c90_c99_compat.
5350 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5353 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5354 Steven Bosscher <steven@gcc.gnu.org>
5357 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5358 format_check_results.
5359 (check_function_format): Use true and add comment for boolean
5361 (finish_dollar_format_checking): Use explicit location when warning.
5362 (check_format_info): Likewise.
5363 (check_format_arg): Set extra_arg_loc and format_string_loc.
5364 (check_format_info_main): Use explicit location when warning.
5365 (check_format_types): Pass explicit location.
5366 (format_type_warning): Likewise.
5368 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5371 * c-format.c: Handle Fortran flags.
5373 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5376 * array-notation-common.c (find_rank): Added handling for other
5377 types of references.
5379 2014-08-10 Marek Polacek <polacek@redhat.com>
5382 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5383 * c.opt (Wc90-c99-compat): Add option.
5385 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5387 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5389 2014-08-03 Marek Polacek <polacek@redhat.com>
5391 * c-common.c (check_case_value): Add location_t parameter. Use it.
5392 (c_add_case_label): Pass loc to check_case_value.
5394 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5396 * cilk.c: Use hash_map instead of pointer_map.
5398 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5400 * c-gimplify.c: Use hash_set instead of pointer_set.
5402 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5405 * array-notation-common.c (extract_array_notation_exprs): Handling
5408 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5410 * c-common.h (min_align_of_type): Removed prototype.
5411 * c-common.c (min_align_of_type): Removed.
5412 * c-ubsan.h (ubsan_maybe_instrument_reference,
5413 ubsan_maybe_instrument_member_call): New prototypes.
5414 * c-ubsan.c: Include stor-layout.h and builtins.h.
5415 (ubsan_maybe_instrument_reference_or_call,
5416 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5419 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5422 * c.opt (-Wreturn-local-addr): Move to common.opt.
5424 2014-07-30 Jason Merrill <jason@redhat.com>
5429 * c.opt (-fuse-all-virtuals): New.
5431 2014-07-30 Tom Tromey <tromey@redhat.com>
5434 * c.opt (Wdesignated-init): New option.
5435 * c-common.c (c_common_attribute_table): Add "designated_init".
5436 (handle_designated_init): New function.
5438 2014-07-24 Marek Polacek <polacek@redhat.com>
5441 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5443 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5445 PR preprocessor/60723 - missing system-ness marks for macro tokens
5446 * c-ppoutput.c (struct print::prev_was_system_token): New data
5448 (init_pp_output): Initialize it.
5449 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5450 (do_line_change): Return a flag saying if a line marker was
5452 (scan_translation_unit): Detect if the system-ness of the token we
5453 are about to emit is different from the one of the previously
5454 emitted token. If so, emit a line marker. Avoid emitting useless
5455 adjacent line markers. Avoid emitting line markers for tokens
5456 originating from the expansion of built-in macros.
5457 (scan_translation_unit_directives_only): Adjust.
5459 2014-07-15 Marek Polacek <polacek@redhat.com>
5461 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5462 TYPE_MAX_VALUE is NULL.
5464 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5467 * c.opt (Wmemset-transposed-args): New warning.
5469 2014-07-10 Jason Merrill <jason@redhat.com>
5473 * c.opt (-fuse-all-virtuals): New.
5475 2014-07-09 Richard Biener <rguenther@suse.de>
5478 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5479 using unsigned arithmetic if overflow does not wrap instead of
5480 if overflow is undefined.
5482 2014-07-06 Marek Polacek <polacek@redhat.com>
5485 * c.opt (Wsizeof-array-argument): New option.
5487 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5489 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5490 comments->count <= 1, as comments->entries might be NULL.
5492 2014-07-01 Marek Polacek <polacek@redhat.com>
5494 * c.opt (Wint-conversion): New option.
5496 2014-07-01 Marek Polacek <polacek@redhat.com>
5499 * c.opt (Wincompatible-pointer-types): New option.
5501 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5504 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5505 Do not discard TYPE_QUALS of type.
5507 2014-06-26 Jason Merrill <jason@redhat.com>
5509 * c-common.h (enum cxx_dialect): Add cxx1z.
5510 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5511 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5513 2014-06-26 Teresa Johnson <tejohnson@google.com>
5515 * c-common.h (get_dump_info): Declare.
5516 * c-gimplify.c (c_genericize): Use saved dump files.
5517 * c-opts.c (c_common_parse_file): Begin and end dumps
5518 once around parsing invocation.
5519 (get_dump_info): New function.
5521 2014-06-23 Marek Polacek <polacek@redhat.com>
5522 Andrew MacLeod <amacleod@redhat.com>
5525 * c-common.c (get_atomic_generic_size): Don't segfault if the
5526 type doesn't have a size.
5528 2014-06-20 Marek Polacek <polacek@redhat.com>
5530 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5531 (ubsan_walk_array_refs_r): New function.
5532 (c_genericize): Instrument array bounds.
5533 * c-ubsan.c: Include "internal-fn.h".
5534 (ubsan_instrument_division): Mark instrumented arrays as having
5535 side effects. Adjust ubsan_type_descriptor call.
5536 (ubsan_instrument_shift): Likewise.
5537 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5538 (ubsan_instrument_bounds): New function.
5539 (ubsan_array_ref_instrumented_p): New function.
5540 (ubsan_maybe_instrument_array_ref): New function.
5541 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5542 (ubsan_array_ref_instrumented_p): Declare.
5543 (ubsan_maybe_instrument_array_ref): Declare.
5545 2014-06-20 Hale Wang <hale.wang@arm.com>
5548 * c.opt (fshort-enums): Add to LTO.
5549 * c.opt (fshort-wchar): Likewise.
5551 2014-06-16 Marek Polacek <polacek@redhat.com>
5554 * c.opt (Wswitch-bool): Add Var.
5556 2014-06-12 Jakub Jelinek <jakub@redhat.com>
5559 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5560 #pragma omp target teams or
5561 #pragma omp {,target }teams distribute simd.
5563 2014-06-12 Jason Merrill <jason@redhat.com>
5565 * c.opt (Wabi=, fabi-compat-version): New.
5566 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5567 (c_common_post_options): Handle flag_abi_compat_version default.
5568 Disallow -fabi-compat-version=1.
5569 * c-common.h (abi_version_crosses): New.
5571 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
5573 * c-common.c (handle_section_attribute): Update handling for
5574 section names that are no longer trees.
5576 2014-06-10 Jakub Jelinek <jakub@redhat.com>
5579 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5580 (omp_pragmas): ... back here.
5582 2014-06-05 Marek Polacek <polacek@redhat.com>
5585 * c-common.c (warn_logical_not_parentheses): New function.
5586 * c-common.h (warn_logical_not_parentheses): Declare.
5587 * c.opt (Wlogical-not-parentheses): New option.
5589 2014-06-04 Marek Polacek <polacek@redhat.com>
5592 * c-common.c (check_case_bounds): Add location parameter.
5594 (c_add_case_label): Pass loc to check_case_bounds.
5596 2014-06-03 Marek Polacek <polacek@redhat.com>
5599 * c.opt (Wswitch-bool): New option.
5601 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5603 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5605 (record_types_used_by_current_var_decl): Move prototype to where
5608 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5609 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5610 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5612 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5614 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5615 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5617 * c-pretty-print.c (pp_c_void_constant): New function.
5618 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5619 (c_pretty_printer::expression): Handle VOID_CST.
5620 * cilk.c (extract_free_variables): Likewise.
5621 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5622 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5624 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5626 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5627 * c-pragma.c (push_alignment): Adjust.
5628 (handle_pragma_push_options): Likewise.
5630 2014-05-09 Marek Polacek <polacek@redhat.com>
5633 * c-common.c (check_user_alignment): Return -1 if alignment is error
5635 (handle_aligned_attribute): Don't call default_conversion on
5637 (handle_vector_size_attribute): Likewise.
5638 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5639 (handle_sentinel_attribute): Call default_conversion and allow even
5640 integral types as an argument.
5642 2014-05-08 Marek Polacek <polacek@redhat.com>
5645 * c-common.c (min_align_of_type): New function factored out from...
5646 (c_sizeof_or_alignof_type): ...here.
5647 * c-common.h (min_align_of_type): Declare.
5649 2014-05-08 Marek Polacek <polacek@redhat.com>
5652 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5653 parameter type of main.
5655 2014-05-07 DJ Delorie <dj@redhat.com>
5657 * c-cppbuiltin.c (print_bits_of_hex): New.
5658 (builtin_define_type_minmax): Print values using hex so as not to
5659 require a pre-computed list of string values.
5661 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5662 Mike Stump <mikestump@comcast.net>
5663 Richard Sandiford <rdsandiford@googlemail.com>
5665 * c-ada-spec.c: Include wide-int.h.
5666 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5667 (dump_generic_ada_node): Use wide-int interfaces.
5668 * c-common.c: Include wide-int-print.h.
5669 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5670 (pointer_int_sum): Use wide-int interfaces.
5671 (c_common_nodes_and_builtins): Use make_int_cst.
5672 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5673 (handle_alloc_size_attribute): Use wide-int interfaces.
5674 (get_nonnull_operand): Likewise.
5675 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5676 * c-lex.c: Include wide-int.h.
5677 (narrowest_unsigned_type): Take a widest_int rather than two
5679 (narrowest_signed_type): Likewise.
5680 (interpret_integer): Update accordingly. Use wide-int interfaces.
5681 (lex_charconst): Use wide-int interfaces.
5682 * c-pretty-print.c: Include wide-int.h.
5683 (pp_c_integer_constant): Use wide-int interfaces.
5684 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5685 INT_CST_LT_UNSIGNED.
5687 2014-05-06 Richard Biener <rguenther@suse.de>
5689 * c-opts.c (c_common_post_options): For -freestanding,
5690 -fno-hosted and -fno-builtin disable pattern recognition
5691 if not enabled explicitely.
5693 2014-05-02 Marek Polacek <polacek@redhat.com>
5695 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5697 2014-05-01 Marek Polacek <polacek@redhat.com>
5700 * c.opt (Wdiscarded-qualifiers): Add.
5702 2014-04-30 Marek Polacek <polacek@redhat.com>
5704 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5705 INT_MIN / -1 sanitization only for integer types.
5707 2014-04-25 Marek Polacek <polacek@redhat.com>
5710 * c-common.c (handle_noinline_attribute): Warn if the attribute
5711 conflicts with always_inline attribute.
5712 (handle_always_inline_attribute): Warn if the attribute conflicts
5713 with noinline attribute.
5715 2014-04-25 Marek Polacek <polacek@redhat.com>
5718 * c-common.c (check_main_parameter_types): Warn about variadic main.
5720 2014-04-24 Mike Stump <mikestump@comcast.net>
5722 * c.opt (Wshadow-ivar): Default to on.
5724 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5726 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5728 2014-04-23 Marek Polacek <polacek@redhat.com>
5730 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5732 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5735 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5736 if flag_sanitize_undefined_trap_on_error.
5737 (ubsan_instrument_division, ubsan_instrument_shift,
5738 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5739 if !flag_sanitize_recover.
5741 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
5744 * c-common.c (registered_builtin_types): Make non-static.
5745 * c-common.h (registered_builtin_types): Declare.
5747 2014-04-14 Richard Biener <rguenther@suse.de>
5748 Marc Glisse <marc.glisse@inria.fr>
5751 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5752 apply may-alias the scalar pointer type when applicable.
5754 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5757 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5758 as possible argument for Cilk_spawn.
5760 2014-04-11 Tobias Burnus <burnus@net-b.de>
5763 * c.opt (Wformat-signedness): Add
5764 * c-format.c(check_format_types): Use it.
5766 2014-04-11 Jason Merrill <jason@redhat.com>
5769 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5770 default_conversion for an array argument.
5772 2014-04-08 Marek Polacek <polacek@redhat.com>
5775 * c-ubsan.c: Include asan.h.
5776 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5778 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5780 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5782 2014-04-02 Marek Polacek <polacek@redhat.com>
5784 * c-common.h (c_expand_expr): Remove declaration.
5786 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5789 * c-common.c (add_atomic_size_parameter): When creating new
5790 params vector, push the size argument first.
5792 2014-03-26 Jakub Jelinek <jakub@redhat.com>
5794 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5795 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5796 ubsan_create_data callers.
5798 2014-03-22 Jakub Jelinek <jakub@redhat.com>
5801 * c-opts.c (c_finish_options): Restore cb_file_change call to
5804 2014-03-13 Jakub Jelinek <jakub@redhat.com>
5807 * c-pragma.c (apply_pragma_weak): Only look at
5808 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5809 DECL_ASSEMBLER_NAME_SET_P (decl).
5810 (maybe_apply_pending_pragma_weaks): Exit early if
5811 vec_safe_is_empty (pending_weaks) rather than only when
5813 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5814 set assembler name back to NULL afterwards.
5816 2014-03-11 Jason Merrill <jason@redhat.com>
5818 * c.opt: Add -std=gnu++14.
5820 2014-03-11 Ian Bolton <ian.bolton@arm.com>
5822 * c-opts.c (c_common_post_options): Don't override
5823 -ffp-contract=fast if unsafe-math-optimizations is on.
5825 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
5827 * c.opt: Enable LTO FE for fshort-double.
5829 2014-03-07 Jason Merrill <jason@redhat.com>
5831 * c.opt: Add -std=c++14.
5833 2014-03-06 Marek Polacek <polacek@redhat.com>
5836 * cilk.c (contains_cilk_spawn_stmt): New function.
5837 (contains_cilk_spawn_stmt_walker): Likewise.
5838 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5839 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5841 2014-03-03 Jakub Jelinek <jakub@redhat.com>
5843 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5844 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5845 even when flag_preprocess_only.
5847 2014-02-26 Jason Merrill <jason@redhat.com>
5851 * c-common.c (shorten_compare): Don't check
5852 c_inhibit_evaluation_warnings.
5854 2014-02-19 Jakub Jelinek <jakub@redhat.com>
5857 * c-common.c (c_common_nodes_and_builtins): When initializing
5858 c_uint{16,32,64}_type_node, also set corresponding
5859 uint{16,32,64}_type_node to the same value.
5862 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5863 for PRAGMA_IVDEP if flag_preprocess_only.
5865 2014-02-12 Jakub Jelinek <jakub@redhat.com>
5868 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5869 if false, add ADD itself, rather than vice versa.
5870 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5871 copy. For SAVE_EXPR, only call merge_tlist once.
5873 2014-02-08 Jakub Jelinek <jakub@redhat.com>
5876 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5878 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5880 (c_common_attribute_table): Add alloc_align and assume_aligned
5883 2014-02-06 Marek Polacek <polacek@redhat.com>
5886 * c-common.c (warn_for_sign_compare): Call warning_at with location
5889 2014-02-05 Marek Polacek <polacek@redhat.com>
5892 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5895 2014-02-04 Marek Polacek <polacek@redhat.com>
5898 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5901 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
5905 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5906 handle_vector_size_attribute, handle_nonnull_attribute): Call
5907 default_conversion on the attribute argument.
5908 (handle_nonnull_attribute): Increment the argument number.
5910 2014-01-31 Marek Polacek <polacek@redhat.com>
5913 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5914 build_function_call_vec.
5915 (resolve_overloaded_builtin): Likewise.
5916 * c-common.h (build_function_call_vec): Adjust declaration.
5918 2014-01-30 Marek Polacek <polacek@redhat.com>
5921 * c-common.h (unsafe_conversion_p): Adjust declaration.
5922 (warnings_for_convert_and_check): Likewise.
5923 (convert_and_check): Likewise.
5924 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5925 expansion_point_location_if_in_system_header on it.
5926 (warnings_for_convert_and_check): Add location parameter. Call
5927 expansion_point_location_if_in_system_header on it. Use it.
5928 (convert_and_check): Add location parameter. Use it.
5929 (conversion_warning): Likewise.
5930 (c_add_case_label): Adjust convert_and_check calls.
5931 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5933 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5935 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5937 * c-pragma.c (init_pragma): Likewise.
5940 2014-01-23 Marek Polacek <polacek@redhat.com>
5943 * c-common.c (shorten_compare): Add location_t parameter.
5944 * c-common.h (shorten_binary_op): Adjust declaration.
5946 2014-01-23 Marek Polacek <polacek@redhat.com>
5949 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5950 * c-common.h: Declare it.
5952 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5954 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5955 * c-ada-spec.c (dump_ads): Likewise.
5956 (cpp_check): Likewise.
5957 (dump_ada_specs): Likewise.
5959 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
5962 * c-common.c (handle_no_instrument_function_attribute): Allow
5963 no_instrument_function attribute in class member
5964 definition/declaration.
5966 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5969 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5970 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5971 being COMPOUND_EXPR.
5972 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5973 operand a SAVE_EXPR and second MODIFY_EXPR.
5975 2014-01-09 Jakub Jelinek <jakub@redhat.com>
5978 * c-pch.c (c_common_write_pch): Call
5979 prepare_target_option_nodes_for_pch.
5981 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5983 Update copyright years
5985 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5987 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5988 the copyright notice.
5990 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5992 * c-ada-spec.c (print_constructor): New function.
5993 (print_destructor): Retrieve the origin of the destructor.
5994 (print_ada_declaration): Revamp handling of constructors/destructors.
5996 2013-12-23 Stuart Hastings <stuart@apple.com>
5997 Bill Maddox <maddox@google.com>
5998 Jason Merrill <jason@redhat.com>
6000 * c.opt: Add -fdeclone-ctor-dtor.
6001 * c-opts.c (c_common_post_options): Default to on iff -Os.
6003 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6005 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6007 * c-pragma.h (enum pragma_cilk_clause): Remove.
6008 (enum pragma_omp_clause): Added the following fields:
6009 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6010 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6011 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6012 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6013 PRAGMA_CILK_CLAUSE_UNIFORM.
6016 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6018 * cilk.c (cilk_outline): Made this function non-static.
6019 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6020 (create_cilk_wrapper): Added a new parameter: a function pointer.
6021 (c_install_body_w_frame_cleanup): Remove
6022 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6023 * c-common.h (cilk_outline): New prototype.
6024 (gimplify_cilk_spawn): Removed two parameters.
6025 (cilk_install_body_with_frame_cleanup): New prototype.
6026 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6027 CILK_SPAWN_STMT case.
6029 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6031 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6033 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6034 (int_array_type_node): Remove.
6035 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6037 2013-12-05 Marek Polacek <polacek@redhat.com>
6040 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6041 [ADJUST_FIELD_ALIGN].
6043 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6046 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6047 and check field alignment if set.
6048 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6049 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6051 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6052 Marek Polacek <polacek@redhat.com>
6054 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6055 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6057 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6060 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6063 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6066 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6067 goto invalid. If it is error_mark_node, don't issue further
6070 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6072 * c.opt (Wopenmp-simd): New.
6074 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6076 * c-ubsan.h (ubsan_instrument_return): New prototype.
6077 * c-ubsan.c (ubsan_instrument_return): New function.
6079 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6081 * c-common.c: Add required include files from gimple.h.
6082 * c-gimplify.c: Likewise
6085 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6087 * c-common.c (unsafe_conversion_p): Remove use of
6088 EXPR_LOC_OR_HERE macro.
6089 (conversion_warning): Likewise.
6090 (warnings_for_convert_and_check): Likewise.
6091 (warn_for_collisions_1): Likewise.
6092 (shorten_compare): Likewise, and remove use of in_system_header
6093 macro, using the location from the former.
6094 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6095 (cb_def_pragma): Remove use of in_system_header macro.
6096 (lex_string): Likewise.
6097 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6099 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6100 Mike Stump <mikestump@comcast.net>
6101 Richard Sandiford <rdsandiford@googlemail.com>
6103 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6104 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6105 tree_fits_shwi_p or tree_fits_uhwi_p.
6106 (dump_generic_ada_node): Likewise.
6107 * c-format.c (check_format_arg): Likewise.
6108 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6110 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6112 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6114 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6117 * c-common.c (unsafe_conversion_p): Make this function
6118 return an enumeration with more detail.
6119 (conversion_warning): Use the new return type of
6120 unsafe_conversion_p to separately warn either about conversions
6121 that lower floating point number precision or about the other
6122 kinds of conversions.
6123 * c-common.h (enum conversion_safety): New enumeration.
6124 (unsafe_conversion_p): switching return type to
6125 conversion_safety enumeration.
6126 * c.opt: Adding new warning -Wfloat-conversion and
6127 enabling it with -Wconversion.
6129 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6131 * c-opts.c: Include plugin.h.
6132 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6134 2013-11-19 Marek Polacek <polacek@redhat.com>
6136 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6138 (ubsan_instrument_shift): Likewise.
6139 (ubsan_instrument_vla): Likewise.
6141 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6143 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6144 cast to unsigned type.
6146 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6148 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6150 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6151 rather than tree_low_cst.
6153 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6155 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6156 tree_to_uhwi throughout.
6158 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6160 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6161 tree_low_cst (..., 0) with tree_to_shwi throughout.
6163 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6165 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6166 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6168 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6170 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6171 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6173 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6175 * c-cilkplus.c: New file.
6176 * c-common.c (readonly_error): Add location argument.
6177 * c-common.h (readonly_error): Same.
6178 (c_finish_cilk_clauses): Protoize.
6179 (c_check_cilk_loop): Same.
6180 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6181 Do not fail on error_mark_node.
6182 Abstract increment canonicalization to here...
6183 (c_omp_for_incr_canonicalize_ptr): New.
6184 c-pragma.c (init_pragma): Register "simd" pragma.
6185 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6186 (enum pragma_cilk_clause): New.
6188 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6190 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6191 wchar_type and host_integerp checks.
6193 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6195 * c-common.c: Likewise.
6196 * c-gimplify.c: Likewise.
6199 2013-11-14 Diego Novillo <dnovillo@google.com>
6201 * c-common.c: Include fold-const.h.
6202 Include stor-layout.h.
6204 Include stringpool.h.
6207 Include trans-mem.h.
6208 * c-cppbuiltin.c: Include stor-layout.h.
6209 Include stringpool.h.
6210 * c-format.c: Include stringpool.h.
6211 * c-lex.c: Include stringpool.h.
6212 Include stor-layout.h.
6213 * c-pragma.c: Include stringpool.h.
6216 Include gcc-symtab.h.
6217 * c-pretty-print.c: Include stor-layout.h.
6219 * cilk.c: Include stringpool.h.
6222 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6224 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6225 * c-common.c (c_common_reswords): Add __auto_type.
6226 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6228 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6230 * c-common.c: Include gimplify.h.
6231 * c-gimplify.c: Likewise.
6233 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6234 * c-ubsan.c: Don't include gimple.h.
6236 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6238 * c-common.c (c_common_reswords): Add _Thread_local.
6240 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6242 * c-common.c (atomic_size_supported_p): New function.
6243 (resolve_overloaded_atomic_exchange)
6244 (resolve_overloaded_atomic_compare_exchange)
6245 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6246 Use it instead of comparing size with a local list of sizes.
6248 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6249 Joseph Myers <joseph@codesourcery.com>
6251 * c-common.h (enum rid): Add RID_ATOMIC.
6252 * c-common.c (c_common_reswords): Add _Atomic.
6253 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6254 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6255 * c-format.c (check_format_types): Check for extra _Atomic
6256 qualifiers in format argument.
6257 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6258 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6260 2013-11-06 Tobias Burnus <burnus@net-b.de>
6262 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6264 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6266 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6268 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6269 to mean lack of IEEE 754 support.
6271 2013-11-05 Tobias Burnus <burnus@net-b.de>
6273 * c.opt (-Wdate-time): New option
6274 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6276 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6278 * c-cppbuiltin.c (cpp_iec_559_value): Test
6279 flag_excess_precision_cmdline not flag_excess_precision.
6281 2013-11-05 Tobias Burnus <burnus@net-b.de>
6283 * c.opt (fopenmp-simd): New option.
6284 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6285 (omp_pragmas): ... this new struct.
6286 (c_pp_lookup_pragma): Also walk omp_pragmas.
6287 (init_pragma): Init pragmas for -fopenmp-simd.
6289 2013-11-04 Marek Polacek <polacek@redhat.com>
6292 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6294 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6296 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6298 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6300 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6302 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6303 (dump_ada_specs): Adjust prototype of second callback.
6304 * c-ada-spec.c (cpp_check): New global variable.
6305 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6306 (print_generic_ada_decl): Likewise.
6307 (has_static_fields): Change return type to bool and add guard.
6308 (has_nontrivial_methods): New predicate.
6309 (is_tagged_type): Change return type to bool.
6310 (separate_class_package): Call has_nontrivial_methods.
6311 (pp_ada_tree_identifier): Minor tweaks.
6312 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6313 (dump_ada_array_domains): Likewise.
6314 (dump_ada_array_type): Likewise.
6315 (dump_template_types): Remove cpp_check parameter and do not pass it to
6316 dump_generic_ada_node.
6317 (dump_ada_template): Likewise.
6318 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6320 (print_ada_methods): Change return type to integer. Remove cpp_check
6321 parameter and do not pass it down.
6322 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6323 dump_generic_ada_node.
6324 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6326 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6327 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6328 value of print_ada_methods.
6329 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6330 Set cpp_check to it before invoking dump_ada_nodes.
6331 (dump_ada_specs): Likewise.
6333 2013-11-03 Marek Polacek <polacek@redhat.com>
6335 * c-ubsan.c: Don't include hash-table.h.
6336 (ubsan_instrument_vla): New function.
6337 * c-ubsan.h: Declare it.
6339 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6341 Automated part of renaming of symtab_node_base to symtab_node.
6343 Patch autogenerated by rename_symtab.py from
6344 https://github.com/davidmalcolm/gcc-refactoring-scripts
6345 revision 58bb219cc090b2f4516a9297d868c245495ee622
6347 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6348 symtab_node_base to symtab_node.
6350 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6352 Implement C++14 digit separators.
6353 * c-lex.c (interpret_float): Remove digit separators from scratch string
6354 before building real literal.
6356 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6358 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6360 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6362 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6364 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6366 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6367 (insert_cilk_frame): New prototype.
6368 (cilk_init_builtins): Likewise.
6369 (gimplify_cilk_spawn): Likewise.
6370 (c_cilk_install_body_w_frame_cleanup): Likewise.
6371 (cilk_detect_spawn_and_unwrap): Likewise.
6372 (cilk_set_spawn_marker): Likewise.
6373 (build_cilk_sync): Likewise.
6374 (build_cilk_spawn): Likewise.
6377 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6379 Patch autogenerated by refactor_symtab.py from
6380 https://github.com/davidmalcolm/gcc-refactoring-scripts
6381 revision 58bb219cc090b2f4516a9297d868c245495ee622
6383 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6384 to a true class hierarchy.
6385 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6387 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6389 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6391 2013-10-26 Jeff Law <law@redhat.com>
6393 * c-common.c (c_define_builtins): Remove mudflap support.
6394 * c.opt: Ignore and warn for mudflap options.
6396 2013-10-24 Tobias Burnus <burnus@net-b.de>
6399 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6400 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6402 2013-10-23 Jason Merrill <jason@redhat.com>
6404 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6406 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6408 * c-common.h (omp_clause_mask::operator !=): New method.
6409 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6410 instead of if (mask & something) tests everywhere.
6412 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6413 201307 instead of 201107.
6414 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6415 (c_common_attribute_table): Add "omp declare target" and
6416 "omp declare simd" attributes.
6417 (handle_omp_declare_target_attribute,
6418 handle_omp_declare_simd_attribute): New functions.
6419 * c-omp.c: Include c-pragma.h.
6420 (c_finish_omp_taskgroup): New function.
6421 (c_finish_omp_atomic): Add swapped argument, if true,
6422 build the operation first with rhs, lhs arguments and use NOP_EXPR
6424 (c_finish_omp_for): Add code argument, pass it down to make_code.
6425 (c_omp_split_clauses): New function.
6426 (c_split_parallel_clauses): Removed.
6427 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6428 c_omp_declare_simd_clauses_to_decls): New functions.
6429 * c-common.h (omp_clause_mask): New type.
6430 (OMP_CLAUSE_MASK_1): Define.
6431 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6432 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6433 omp_clause_mask::operator |, omp_clause_mask::operator &,
6434 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6435 omp_clause_mask::operator ==): New methods.
6436 (enum c_omp_clause_split): New.
6437 (c_finish_omp_taskgroup): New prototype.
6438 (c_finish_omp_atomic): Add swapped argument.
6439 (c_finish_omp_for): Add code argument.
6440 (c_omp_split_clauses): New prototype.
6441 (c_split_parallel_clauses): Removed.
6442 (c_omp_declare_simd_clauses_to_numbers,
6443 c_omp_declare_simd_clauses_to_decls): New prototypes.
6444 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6445 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6446 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6447 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6448 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6449 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6450 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6451 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6452 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6453 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6454 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6455 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6456 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6457 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6458 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6459 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6460 PRAGMA_OMP_CLAUSE_UNIFORM.
6462 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6464 PR tree-optimization/20318
6465 * c-common.c (handle_returns_nonnull_attribute): New function.
6466 (c_common_attribute_table): Add returns_nonnull.
6468 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6471 * c.opt (fcheck-new): Move to common.opt.
6473 2013-09-25 Marek Polacek <polacek@redhat.com>
6474 Jakub Jelinek <jakub@redhat.com>
6477 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6478 an expression if we can prove it is correct.
6479 (ubsan_instrument_division): Likewise. Remove unnecessary
6482 2013-09-18 Marek Polacek <polacek@redhat.com>
6485 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6487 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6489 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6492 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6493 fobjc-gc, freplace-objc-classes): Accept for LTO.
6495 2013-09-13 Jacek Caban <jacek@codeweavers.com>
6497 * c-target.def: New hook
6499 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6502 * c.opt (Wdelete-incomplete): Add.
6504 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6506 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6507 (vector_types_compatible_elements_p): New function.
6508 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6510 (vector_types_compatible_elements_p): Declare.
6512 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6514 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6515 a virtual member function.
6516 (pp_simple_type_specifier): Remove.
6517 (pp_c_type_specifier): Likewise.
6518 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6519 Rename from pp_c_type_specifier. Adjust.
6520 (c_pretty_printer::c_pretty_printer): Do not assign to
6521 simple_type_specifier.
6523 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6525 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6527 (c_pretty_printer::storage_class_specifier): Likewise.
6528 (c_pretty_printer::initializer): Likewise.
6529 (pp_declaration): Remove.
6530 (pp_declaration_specifiers): Likewise.
6531 (pp_abstract_declarator): Likewise.
6532 (pp_declarator): Likewise.
6533 (pp_type_id): Likewise.
6534 (pp_statement): Likewise.
6535 (pp_constant): Likewise.
6536 (pp_id_expression): Likewise.
6537 (pp_primary_expression): Likewise.
6538 (pp_unary_expression): Likewise.
6539 (pp_multiplicative_expression): Likewise.
6540 (pp_conditional_expression): Likewise.
6541 (pp_assignment_expression): Likewise.
6542 (pp_expression): Likewise.
6543 (pp_c_type_id): Likewise.
6544 (pp_c_storage_class_specifier): Likewise.
6545 * c-pretty-print.c (pp_c_type_cast): Tidy.
6546 (pp_c_pointer): Likewise.
6547 (pp_c_type_specifier): Likewise.
6548 (pp_c_parameter_type_list): Likewise.
6549 (pp_c_function_definition): Likewise.
6550 (pp_c_init_declarator): Likewise.
6551 (pp_c_initializer_list): Likewise.
6552 (pp_c_constructor_elts): Likewise.
6553 (c_pretty_printer::direct_abstract_declarator): Likewise.
6554 (c_pretty_printer::declaration_specifiers): Likewise.
6555 (c_pretty_printer::primary_expression): Likewise.
6556 (c_pretty_printer::postfix_expression): Likewise.
6557 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6558 (c_pretty_printer::storage_class_specifier): Rename from
6559 pp_c_storage_class_specifier.
6560 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6561 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6562 storage_class_specifier, initializer, offset_list, flags.
6564 2013-08-30 Marek Polacek <polacek@redhat.com>
6566 * c-ubsan.c: New file.
6567 * c-ubsan.h: New file.
6569 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6571 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6573 (c_pretty_printer::declaration_specifiers): Likewise.
6574 (c_pretty_printer::declarator): Likewise.
6575 (c_pretty_printer::abstract_declarator): Likewise.
6576 (c_pretty_printer::direct_abstract_declarator): Likewise.
6577 (c_pretty_printer::direct_declarator): Likewise.
6578 (c_pretty_printer::function_specifier): Likewise.
6579 (pp_declaration): Adjust.
6580 (pp_declaration_specifiers): Likewise.
6581 (pp_abstract_declarator): Likewise.
6582 (pp_direct_declarator): Likewise.
6583 (pp_function_specifier): Likewise.
6584 (pp_direct_abstract_declarator): Remove as unused.
6585 (pp_c_declaration): Remove.
6586 (pp_c_declaration_specifiers): Likewise.
6587 (pp_c_declarator): Likewise.
6588 (pp_c_direct_declarator): Likewise.
6589 (pp_c_function_specifier): Likewise.
6590 (pp_c_direct_abstract_declarator): Likewise.
6591 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6592 from pp_c_abstract_declarator. Adjust.
6593 (c_pretty_printer::direct_abstract_declarator): Rename from
6594 pp_c_direct_abstract_declarator. Adjust.
6595 (c_pretty_printer::function_specifier): Rename from
6596 pp_c_function_specifier. Adjust.
6597 (c_pretty_printer::declaration_specifiers): Rename from
6598 pp_c_declaration_specifiers. Adjust.
6599 (c_pretty_printer::direct_declarator): Rename from
6600 pp_c_direct_declarator. Adjust.
6601 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6602 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6603 (c_pretty_printer::c_pretty_printer): Do not assign to
6604 declaration, declaration_specifiers, declarator,
6605 direct_declarator, direct_abstract_declarator, function_specifier.
6607 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6609 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6610 virtual member function.
6611 (c_pretty_printer::multiplicative_expression): Likewise.
6612 (c_pretty_printer::conditional_expression): Likewise.
6613 (c_pretty_printer::assignment_expression): Likewise.
6614 (c_pretty_printer::expression): Likewise.
6615 (pp_unary_expression): Adjust.
6616 (pp_multiplicative_expression): Likewise.
6617 (pp_assignment_expression): Likewise.
6618 (pp_conditional_expression): Likewise.
6619 (pp_expression): Likewise.
6620 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6621 from pp_c_unary_expression. Adjust.
6622 (c_pretty_printer::multiplicative_expression): Rename from
6623 pp_c_multiplicative_expression. Adjust.
6624 (c_pretty_printer::conditional_expression): Rename from
6625 pp_c_conditional_expression. Adjust.
6626 (c_pretty_printer::assignment_expression): Rename from
6627 pp_c_assignment_expression. Adjust.
6628 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6629 (c_pretty_printer::c_pretty_printer): Do not assign to
6630 unary_expression, multiplicative_expression,
6631 conditional_expression, expression.
6633 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6635 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6636 virtual member function.
6637 (pp_postfix_expression): Adjust.
6638 (pp_c_postfix_expression): Remove.
6639 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6640 from pp_c_postfix_expression. Adjust.
6641 (c_pretty_printer::c_pretty_printer): Do not assign to
6644 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6646 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6647 virtua member function.
6648 (pp_primary_expression): Adjust.
6649 (pp_c_primary_expression): Remove.
6650 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6651 from pp_c_primary_expression. Adjust.
6652 (pp_c_initializer_list): Use pp_primary_expression.
6653 (c_pretty_printer::c_pretty_printer): Do not assign to
6656 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6658 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6659 * c-pretty-print.c (M_): Remove.
6660 (c_pretty_printer::translate_string): Define.
6661 (pp_c_type_specifier): Use it.
6662 (pp_c_primary_expression): Likewise.
6663 (pp_c_expression): Likewise.
6665 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6667 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6669 (pp_c_id_expression): Remove.
6670 (pp_id_expression): Adjust.
6671 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6672 pp_c_id_expression. Adjust.
6673 (pp_c_postfix_expression): Use pp_id_expression.
6674 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6676 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6678 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6680 (pp_constant): Adjust.
6681 (pp_c_constant): Remove.
6682 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6683 pp_c_constant. Adjust.
6685 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6686 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6688 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6690 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6691 (c_pretty_printer::c_pretty_printer): Declare.
6692 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6693 c_pretty_printer_init. Adjust.
6694 (print_c_tree): Do not call c_pretty_printer_init.
6695 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6697 2013-08-09 Arnaud Charlet <charlet@adacore.com>
6699 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6701 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6704 * c-common.c (pointer_int_sum): Add bool parameter.
6705 * c-common.h (pointer_int_sum): Adjust declaration.
6707 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6709 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6710 c_pretty_printer variable.
6712 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6714 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6716 (pp_c_base): Likewise. Adjust users.
6717 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6718 (pp_c_whitespace): Do not call pp_base.
6719 (pp_c_left_paren): Likewise.
6720 (pp_c_right_paren): Likewise.
6721 (pp_c_left_brace): Likewise.
6722 (pp_c_right_brace): Likewise.
6723 (pp_c_left_bracket): Likewise.
6724 (pp_c_right_bracket): Likewise.
6725 (pp_c_dot): Likewise.
6726 (pp_c_ampersand): Likewise.
6727 (pp_c_star): Likewise.
6728 (pp_c_arrow): Likewise.
6729 (pp_c_semicolon): Likewise.
6730 (pp_c_complement): Likewise.
6731 (pp_c_exclamation): Likewise.
6732 (pp_c_direct_declarator): Likewise.
6733 (pp_c_ws_string): Likewise.
6734 (pp_c_identifier): Likewise.
6735 (pp_c_statement): Likewise.
6736 (print_c_tree): Likewise.
6738 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6741 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6742 provide useful error strings.
6744 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6746 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6747 printer functions instead of pp_string or operators and punctuators.
6748 (dump_generic_ada_node): Likewise.
6749 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6750 (pp_c_relational_expression): Likewise.
6751 (pp_c_logical_or_expression): Likewise.
6753 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6755 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6756 functions instead of pp_character.
6757 (pp_ada_tree_identifier): Likewise.
6758 (dump_ada_double_name): Likewise.
6759 (dump_ada_function_declaration): Likewise.
6760 (dump_ada_array_domains): Likewise.
6761 (dump_template_types): Likewise.
6762 (dump_generic_ada_node): Likewise.
6763 (print_ada_declaration): Likewise.
6764 (print_ada_struct_decl): Likewise.
6765 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6767 2013-07-23 Tom Tromey <tromey@redhat.com>
6769 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6770 * c-common.c (c_common_reswords): Add _Generic.
6772 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
6774 * c-common.c: Fix typos.
6775 * c-common.h: Likewise.
6777 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
6780 * c-common.c (c_common_attribute_table): Add warn_unused.
6781 (handle_warn_unused_attribute): New.
6783 2013-07-10 Jakub Jelinek <jakub@redhat.com>
6785 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6786 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6788 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6791 * c.opt: Add Wconditionally-supported.
6793 2013-07-08 Graham Stott <graham.stott@btinternet.com>
6795 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6796 unused variables l_length and l_node.
6798 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6801 * c-common.c (complete_array_type): Delay folding first index
6802 like other indices. When folding, check for index overflow.
6804 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
6807 * c-common.h (c_build_vec_perm_expr): New complain argument.
6808 * c-common.c (c_build_vec_perm_expr): Likewise.
6809 Use save_expr also in C++.
6811 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6813 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6814 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6815 * c-opts.c (c_common_post_options): Likewise.
6817 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6819 * array-notation-common.c (length_mismatch_in_expr): Changed the
6820 parameter type's from a dynamic array to a vec_tree. Also removed
6821 the size parameters.
6822 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6825 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6827 * c-common.h (struct cilkplus_an_parts): New structure.
6828 (struct cilkplus_an_loop_parts): Likewise.
6829 (cilkplus_extract_an_triplets): New prototype.
6830 (fix_sec_implicit_args): Likewise.
6831 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6832 (fix_sec_implicit_args): Likewise.
6834 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6836 * array-notation-common.c (find_inv_trees): Removed an unwanted
6838 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6839 enum rid to enum tree_code.
6841 2013-06-11 Jan Hubicka <jh@suse.cz>
6843 * c-common.c (handle_alias_ifunc_attribute): Do not set
6844 DECL_EXTERNAL for weakref variables.
6845 * c-pragma.c (handle_pragma_weak): Make sure aliases
6846 are not declared as external.
6848 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6850 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6851 function from c/c-array-notation.c.
6852 (is_cilkplus_reduce_builtin): Likewise.
6853 (find_rank): Likewise.
6854 (extract_array_notation_exprs): Likewise.
6855 (replace_array_notations): Likewise.
6856 (find_inv_trees): Likewise.
6857 (replace_inv_trees): Likewise.
6858 (contains_array_notation_expr): Likewise.
6859 (find_correct_array_notation_type): Likewise.
6860 * c-common.h (struct inv_list): Moved this struct from the file
6861 c/c-array-notation.c and added a new field called additional tcodes.
6862 (length_mismatch_in_expr_p): New prototype.
6863 (is_cilkplus_reduce_builtin): Likewise.
6864 (find_rank): Likewise.
6865 (extract_array_notation_exprs): Likewise.
6866 (replace_array_notation): Likewise.
6867 (find_inv_trees): Likewise.
6868 (replace_inv_trees): Likewise.
6869 (find_correct_array_notation_type): Likewise.
6871 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6873 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6874 function array_notation_init_builtins is called.
6875 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6876 * c-common.def (ARRAY_NOTATION_REF): New tree.
6877 * c-common.h (build_array_notation_expr): New function declaration.
6878 (build_array_notation_ref): Likewise.
6879 (extract_sec_implicit_index_arg): New extern declaration.
6880 (is_sec_implicit_index_fn): Likewise.
6881 (ARRAY_NOTATION_CHECK): New define.
6882 (ARRAY_NOTATION_ARRAY): Likewise.
6883 (ARRAY_NOTATION_START): Likewise.
6884 (ARRAY_NOTATION_LENGTH): Likewise.
6885 (ARRAY_NOTATION_STRIDE): Likewise.
6886 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6888 (pp_c_expression): Likewise.
6889 * c.opt (flag_enable_cilkplus): New flag.
6890 * array-notation-common.c: New file.
6892 2013-05-14 Jakub Jelinek <jakub@redhat.com>
6895 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6897 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
6899 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6902 2013-05-07 Han Shen <shenhan@google.com>
6904 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6906 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6908 * c-common.c (check_user_alignment): Emit error for negative values.
6910 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6912 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6914 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6916 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6917 __GXX_EXPERIMENTAL_CXX1Y__.
6919 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6920 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6922 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6923 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6924 to simply use OPT_Wpointer_arith.
6925 (c_sizeof_or_alignof_type): Likewise.
6927 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6929 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6931 2013-04-12 Jakub Jelinek <jakub@redhat.com>
6933 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6934 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6937 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6939 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6941 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6943 * c-common.c (pointer_int_sum): Remove dead code.
6945 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6948 * c-common.c (handle_optimize_attribute): Don't call
6949 save_optabs_if_changed.
6951 2013-03-05 Jakub Jelinek <jakub@redhat.com>
6954 * c-pch.c (pch_init): Free target_validity at the end.
6956 2013-03-04 Jakub Jelinek <jakub@redhat.com>
6958 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6960 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6961 Jakub Jelinek <jakub@redhat.com>
6964 * c-common.c (handle_no_sanitize_address_attribute): New function.
6965 (c_common_attribute_table): Add no_sanitize_address attribute.
6966 (handle_no_address_safety_analysis_attribute): Add
6967 no_sanitize_address attribute, not no_address_safety_analysis
6970 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
6973 * c-common.c (handle_optimize_attribute): Call
6974 save_optabs_if_changed.
6976 2013-02-18 Jakub Jelinek <jakub@redhat.com>
6977 Steven Bosscher <steven@gcc.gnu.org>
6980 * c-opts.c (c_common_post_options): If debug info is enabled
6981 and non-dwarf*, refuse to load PCH files and when writing PCH
6984 2013-02-05 Jakub Jelinek <jakub@redhat.com>
6987 * c-common.c (handle_error_attribute): Fix condition.
6989 2013-01-30 Jakub Jelinek <jakub@redhat.com>
6992 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6994 2013-01-18 Jason Merrill <jason@redhat.com>
6997 * c.opt (-fextern-tls-init): New.
6998 * c-opts.c (c_common_post_options): Handle it.
7000 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7003 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7004 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7005 and is either negative or bigger or equal to type precision
7006 of the first operand.
7008 2012-12-03 Marek Polacek <polacek@redhat.com>
7011 * c-common.c (check_user_alignment): Swap order of tests,
7012 check TREE_CODE first.
7014 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7017 * c-common.h (overflow_type): New enum.
7018 (build_userdef_literal): Add overflow_type argument.
7019 (tree_userdef_literal): Add overflow_type.
7020 (USERDEF_LITERAL_OVERFLOW): New access macro.
7021 * c-common.c (build_userdef_literal): Add overflow_type
7023 * c-lex.c (c_lex_with_flags): Add overflow_type to
7024 build_userdef_literal calls.
7025 (interpret_integer, interpret_float): Add overflow_type argument.
7027 2012-11-28 Richard Biener <rguenther@suse.de>
7030 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7031 here and use a type with proper overflow behavior for types that would
7032 need to be promoted for the arithmetic.
7034 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7037 * c-common.c (handle_no_address_safety_analysis_attribute): New
7039 (c_common_attribute_table): Add no_address_safety_analysis.
7041 2012-11-16 Simon Baldwin <simonb@google.com>
7043 * c.opt: Add f[no-]canonical-system-headers.
7044 * c-opts.c (c_common_handle_option): Handle
7045 OPT_fcanonical_system_headers.
7047 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7050 * c-opts.c (c_common_handle_option): Set new flags.
7051 * c.opt: Describe new flags.
7053 2012-11-09 Jason Merrill <jason@redhat.com>
7055 * c.opt (Wabi-tag): New.
7057 2012-11-09 Andi Kleen <ak@linux.intel.com>
7060 * c-common.c (get_atomic_generic_size): Mask with
7063 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7066 * c.opt (Wformat): Make it Alias Wformat=1.
7067 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7068 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7070 (Wformat=): RejectNegative. Use LangEnabledBy.
7071 (Wnonnull): Use LangEnabledBy.
7072 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7073 * c-format.c (set_Wformat): Delete.
7074 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7075 (maybe_read_dollar_number): Likewise.
7076 (avoid_dollar_number): Likewise.
7077 (finish_dollar_format_checking): Likewise.
7078 (check_format_info): Likewise.
7079 (check_format_info_main): Likewise.
7080 (check_format_types): Likewise.
7081 (format_type_warning): Likewise.
7082 * c-common.c (int): Likewise.
7083 (check_function_sentinel): Likewise.
7084 * c-common.h (warn_format,set_Wformat): Do not declare here.
7086 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7089 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7090 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7092 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7094 (Wvariadic-macros): Init(1).
7095 * c-opts.c (c_common_handle_option): Do not handle them
7097 (c_common_post_options): Likewise.
7098 (sanitize_cpp_opts): warn_unused_macros is now
7099 cpp_warn_unused_macros.
7100 (push_command_line_include): Likewise.
7101 * c-common.c (warn_unknown_pragmas): Do not define.
7102 * c-common.h (warn_unknown_pragmas): Do not declare.
7104 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7107 * c-common.c (conversion_warning): Handle conditional expressions.
7109 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7112 * c.opt (Wreturn_local_addr): Define new option.
7114 2012-10-25 Jason Merrill <jason@redhat.com>
7116 * c.opt (Wvirtual-move-assign): New.
7118 * c.opt (Winherited-variadic-ctor): New.
7120 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7123 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7125 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7127 * c-common.h (pch_cpp_save_state): Declare.
7128 * c-target.def (c_preinclude): New hook.
7129 * c-opts.c (done_preinclude): New.
7130 (push_command_line_include): Handle default preincluded header.
7131 (cb_file_change): Call pch_cpp_save_state when calling
7132 push_command_line_include.
7133 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7134 (pch_cpp_save_state): New.
7135 (pch_init): Call pch_cpp_save_state conditionally, instead of
7136 calling cpp_save_state.
7138 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7142 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7143 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7144 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7145 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7146 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7147 * c-opts.c (c_common_handle_option): Remove explicit handling from
7149 (c_common_post_options): Likewise.
7151 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7153 * c-ada-spec.c (LOCATION_COL): Delete.
7154 (compare_location): New function.
7155 (compare_node): Use it.
7156 (compare_comment): Likewise.
7158 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7162 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7163 * c-opts.c (c_common_handle_option): Do not set them here. Add
7165 (c_common_post_options): Likewise.
7167 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7169 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7170 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7171 Remove POINTER_TYPE handling, add large unsigned handling and use
7172 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7174 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7177 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7178 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7179 locs and array of 3 trees instead of just single loc and single
7180 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7181 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7182 For *cmp* builtins that take two sources strings report warnings
7183 about first and second source, not about destination and source.
7185 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7188 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7190 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7192 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7193 declaring something coming from another file.
7195 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7198 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7200 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7203 * c-common.c (warn_about_parentheses): Add location_t parameter;
7204 use EXPR_LOC_OR_LOC.
7205 * c-common.h: Update declaration.
7207 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7210 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7211 more operations. Make error messages optional.
7212 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7213 (scalar_to_vector): Declare.
7215 2012-10-08 Jason Merrill <jason@redhat.com>
7217 * c-common.c (c_common_reswords): Add thread_local.
7219 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7221 PR c++/53528 C++11 attribute support
7222 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7224 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7226 (handle_aligned_attribute): In choose strictest alignment
7227 among many. Use new check_cxx_fundamental_alignment_constraints.
7228 (handle_transparent_union_attribute): In c++11 attribute syntax,
7229 don't look through typedefs.
7231 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7233 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7234 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7237 2012-09-25 Dehao Chen <dehao@google.com>
7240 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7241 map when read in the pch.
7243 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7245 * c-ada-spec.c: Style fixes.
7247 2012-09-18 Thomas Quinot <quinot@adacore.com>
7249 * c.opt (-fada-spec-parent): Define new command line switch.
7250 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7251 is specified, generate binding spec as a child of the specified unit.
7253 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7254 Manuel López-Ibáñez <manu@gcc.gnu.org>
7257 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7259 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7261 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7262 for pointers, and add missing Convention C pragma.
7263 (print_ada_struct_decl): Add missing aliased keyword.
7264 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7266 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7268 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7269 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7270 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7271 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7272 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7274 2012-08-10 Richard Guenther <rguenther@suse.de>
7276 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7278 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7280 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7281 instead of separate pp_newline and pp_flush.
7282 (print_c_tree): Likewise.
7284 2012-07-26 Richard Henderson <rth@redhat.com>
7286 * c-common.c (handle_hot_attribute): Allow labels.
7287 (handle_cold_attribute): Likewise.
7289 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7292 * c-common.c (check_function_nonnull): Handle multiple nonnull
7293 attributes properly.
7295 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7297 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7298 * c-ada-spec.c: Likewise.
7299 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7301 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7303 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7304 Remove code conditional on it.
7306 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7308 * c-gimplify.c: Do not include basic-block.h.
7309 * c-common.c: Do not include linfuncs.h.
7311 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7313 * c-common.h: Include tree.h.
7315 2012-07-02 Jason Merrill <jason@redhat.com>
7318 * c-common.c (get_priority): Call default_conversion.
7320 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7322 * c-pch.c (c_common_write_pch): Remove unused variables.
7324 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7326 * cppspec.c: Moved from gcc/ to here.
7328 2012-06-27 Kai Tietz <ktietz@redhat.com>
7330 PR preprocessor/37215
7331 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7333 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7335 * c-common.h (c_common_print_pch_checksum): Remove.
7336 * c-pch.c: Do not include output.h.
7337 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7338 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7339 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7340 (struct c_pch_header): Remove.
7341 (get_ident): Update gpch version.
7342 (pch_init): Do not print executable_checksum to asm_out_file.
7343 Do not fail if there is no asm_out_file to read back from. Set
7344 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7345 (c_common_write_pch): Verify that nothing was written to asm_out_file
7346 since pch_init was called. Do not write a c_pch_header, and do not
7347 copy from asm_out_file to the PCH.
7348 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7349 the content of asm_out_file from the PCH.
7350 (c_common_print_pch_checksum): Remove.
7351 * c-opts.c (c_common_init): Print out executable_checksum directly.
7353 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7355 * c-target.def (objc_declare_unresolved_class_reference,
7356 objc_declare_class_definition): Add new hooks.
7358 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7360 * c-lex.c: Do not include output.h.
7361 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7362 Remove uses of ASM_OUTPUT_IDENT.
7364 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7367 * c-common.h (c_build_vec_perm_expr): Move decl here.
7368 * c-common.c (c_build_vec_perm_expr): Move definition
7371 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7373 * c.opt (fconserve-space): Turn into a no-op.
7375 2012-06-04 Sterling Augustine <saugustine@google.com>
7377 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7378 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7379 both the start and end of the function.
7381 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7383 * c-common.c: Do not include output.h.
7384 * c-pragma.c: Likewise.
7386 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7388 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7389 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7390 (lang_decl_name): Handle namespace decls.
7392 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7394 * c-ada-spec.c: Do not include output.h.
7395 * c-semantics.c: Likewise.
7397 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7399 * c-common.c: Fix typo.
7401 2012-05-29 Michael Matz <matz@suse.de>
7403 * c-common.h (c_expand_decl): Remove prototype.
7405 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7407 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7408 * c-opts.c (c_common_handle_option): Remove code handling
7409 warn_missing_braces.
7411 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7414 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7417 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7420 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7422 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7424 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7425 * c-opts.c (c_common_handle_option): Do not handle explicitly
7426 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7428 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7430 PR preprocessor/7263
7431 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7432 to cpp_classify_number. For diagnostics, use the precise location
7433 instead of the global input_location.
7435 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7438 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7440 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7442 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7444 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7447 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7448 Wreorder): Use LangEnabledBy.
7449 * c-opts.c (c_common_handle_option): Do not enable them
7450 explicitly. Call lang-specific generated functions.
7451 (c_common_post_options): Do not set them here.
7453 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7455 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7456 Wmissing-field-initializers,Wmissing-parameter-type,
7457 Wold-style-declaration,Woverride-init): Use EnabledBy.
7458 * c-opts.c (c_common_post_options): Do not set here explicitly.
7460 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7463 * c-opts.c (c_common_handle_option): Use handle_generated_option
7464 to enable sub-options.
7466 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7469 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7471 2012-05-10 Richard Guenther <rguenther@suse.de>
7473 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7474 adjust commentary about TYPE_IS_SIZETYPE types.
7476 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7479 * c-common.c (warn_logical_operator): Check that argument of
7480 integer_zerop is not NULL.
7482 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7485 * c-common.c (warn_logical_operator): Do not warn if either side
7486 is already true or false.
7488 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7491 * c-common.c (expr_original_type): New.
7492 (shorten_compare): Do not warn for enumeration types.
7494 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7496 * c.opt (fpermissive): Add Var(flag_permissive).
7498 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
7501 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7502 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7504 2012-04-30 Dodji Seketeli <dodji@redhat.com>
7506 Add -Wvarargs option
7507 * c.opt (Wvarargs): Define new option.
7509 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7511 * c-common.c (check_function_arguments): Replace
7512 Wmissing-format-attribute with Wsuggest-attribute=format.
7514 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7516 * c.opt (Wsuggest-attribute=format): New. Alias of
7517 Wmissing-format-attribute.
7518 * c-format.c (decode_format_type): Replace
7519 Wmissing-format-attribute with Wsuggest-attribute=format.
7520 (check_function_format): Likewise.
7522 2012-04-27 Ollie Wild <aaw@google.com>
7524 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7525 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7526 * c.opt: Add Wliteral-suffix.
7528 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7531 * c.opt (Wpedantic): New.
7532 (pedantic): Alias Wpedantic.
7533 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7534 (c_common_post_options): Likewise.
7535 (sanitize_cpp_opts): Likewise.
7536 * c-lex.c (interpret_float): Likewise.
7537 * c-format.c (check_format_types): Likewise.
7538 * c-common.c (pointer_int_sum): Likewise.
7539 (c_sizeof_or_alignof_type): Likewise.
7540 (c_add_case_label): Likewise.
7541 (c_do_switch_warnings): Likewise.
7542 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7544 2012-04-15 Jason Merrill <jason@redhat.com>
7547 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7548 (C_STD_NAME): Distinguish between C++98 and C++11.
7550 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7553 * c-common.h (uint16_type_node): Rename into...
7554 (c_uint16_type_node): ...this.
7555 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7556 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7558 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7560 * c-common.c (warn_if_unused_value): Move definition to here.
7561 * c-common.h (warn_if_unused_value): Move declaration to here.
7563 2012-03-23 William Bader <williambader@hotmail.com>
7565 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7567 2012-03-20 Jason Merrill <jason@redhat.com>
7569 * c-common.h (enum cxx_dialect): Add cxx1y.
7570 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7572 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7573 * c-opts.c (c_common_post_options): Likewise.
7574 (set_std_cxx1y): New.
7575 (c_common_handle_option): Call it.
7576 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7578 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7581 * c.opt ([Wuseless-cast]): Add.
7583 2012-03-16 Richard Guenther <rguenther@suse.de>
7585 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7587 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7590 * c.opt (ftemplate-backtrace-limit) Add.
7592 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7594 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7596 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7597 (init_pragma): Don't register extern_prefix.
7599 2012-03-12 Richard Guenther <rguenther@suse.de>
7601 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7602 (builtin_type_for_size): Likewise.
7604 2012-02-13 Jakub Jelinek <jakub@redhat.com>
7607 * c-common.c (sync_resolve_params): Don't decide whether to convert
7608 or not based on TYPE_SIZE comparison, convert whenever arg_type
7609 is unsigned INTEGER_TYPE.
7611 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7614 * c.opt ([Wunused-local-typedefs]): Fix description.
7616 2012-01-24 Mike Stump <mikestump@comcast.net>
7618 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7621 2012-01-18 Richard Guenther <rguenther@suse.de>
7623 * c-opts.c (c_common_post_options): Reset LTO flags if
7624 we are about to generate a PCH.
7626 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7629 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7630 use pp_unsigned_wide_integer.
7632 2012-01-10 Richard Guenther <rguenther@suse.de>
7635 * c-opts.c (c_common_handle_option): Move -Werror handling
7636 to language independent code.
7638 2012-01-05 Richard Guenther <rguenther@suse.de>
7641 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7644 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7647 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7648 of array types with an unknown bound.
7650 2011-12-20 Joseph Myers <joseph@codesourcery.com>
7652 * c-common.c (flag_isoc99): Update comment to refer to C11.
7653 (flag_isoc1x): Change to flag_isoc11.
7654 * c-common.h (flag_isoc99): Update comment to refer to C11.
7655 (flag_isoc1x): Change to flag_isoc11.
7656 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7658 * c-opts.c (set_std_c1x): Change to set_std_c11.
7659 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7661 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7662 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7663 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7665 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7666 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7667 (std=gnu1x): Make alias of std=gnu11.
7669 2011-12-19 Jason Merrill <jason@redhat.com>
7672 * c-common.c (handle_transparent_union_attribute): Check the first
7673 field if the type is complete.
7675 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7678 * c-common.c (RID_IS_FINAL): Add.
7679 * c-common.h (RID_IS_FINAL): Add.
7681 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7683 * c.opt (fgnu-runtime): Provide full description.
7684 (fnext-runtime): Likewise.
7685 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7687 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
7689 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7690 predefines in one place. Add LOCK_FREE predefines.
7691 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7694 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
7697 * c-common.c (get_atomic_generic_size): Check for various error
7699 (resolve_overloaded_atomic_exchange,
7700 resolve_overloaded_atomic_compare_exchange,
7701 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7702 error_mark_node for error conditions.
7704 2011-11-08 Richard Guenther <rguenther@suse.de>
7709 2011-11-07 Richard Henderson <rth@redhat.com>
7710 Aldy Hernandez <aldyh@redhat.com>
7711 Torvald Riegel <triegel@redhat.com>
7713 Merged from transactional-memory.
7715 * c-common.c (handle_tm_wrap_attribute,
7716 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7717 (struct c_common_reswords): Added __transaction* keywords.
7718 (struct c_common_attribute_table): Added transaction* and tm_regparm
7720 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7722 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7723 find_tm_attribute): Declare.
7725 2011-11-07 Jason Merrill <jason@redhat.com>
7728 * c-common.c, c-common.h: Revert yesterday's changes.
7730 2011-11-06 Jason Merrill <jason@redhat.com>
7733 * c-common.c (decl_has_visibility_attr): Split out from...
7734 (c_determine_visibility): ...here.
7735 * c-common.h: Declare it.
7737 2011-11-06 Joseph Myers <joseph@codesourcery.com>
7739 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7740 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7742 (check_user_alignment): New. Split out of
7743 handle_aligned_attribute. Disallow integer constants with
7744 noninteger types. Conditionally allow zero.
7745 (handle_aligned_attribute): Use check_user_alignment.
7746 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7748 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
7749 Richard Henderson <rth@redhat.com>
7751 Merged from cxx-mem-model.
7753 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
7754 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
7755 parameters that are the same type size.
7756 (get_atomic_generic_size): New. Find size of generic
7757 atomic function parameters and do typechecking.
7758 (add_atomic_size_parameter): New. Insert size into parameter list.
7759 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7760 either __atomic_exchange_n or external library call.
7761 (resolve_overloaded_atomic_compare_exchange): Restructure
7762 __atomic_compare_exchange to either _n variant or external library call.
7763 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
7764 __atomic_load_n or an external library call.
7765 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7766 __atomic_store_n or an external library call.
7767 (resolve_overloaded_builtin): Handle new __atomic builtins.
7769 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7772 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7773 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7774 <INDIRECT_REF>: Return the argument.
7775 <ARRAY_REF>: Remove special code for negative offset.
7776 Call fold_build_pointer_plus instead of size_binop.
7777 (fold_offsetof): Remove STOP_REF argument and adjust.
7778 * c-common.h (fold_offsetof_1): Declare.
7779 (fold_offsetof): Remove STOP_REF argument.
7781 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7784 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7785 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7786 Wnarrowing for C++0x and C++98.
7787 * c.opt ([Wnarrowing]): Update.
7789 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7792 * c.opt: Add Wzero-as-null-pointer-constant.
7794 2011-10-31 Jason Merrill <jason@redhat.com>
7796 * c.opt (-fdeduce-init-list): Off by default.
7799 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7800 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7802 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7804 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7807 * c.opt (fvisibility-inlines-hidden): Description change.
7809 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7811 Implement C++11 user-defined literals.
7812 * c-common.c (build_userdef_literal): New.
7813 * c-common.def: New tree code.
7814 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7815 * c-lex.c (interpret_float): Add suffix parm.
7816 (c_lex_with_flags): Build literal tokens.
7818 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7822 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7825 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7826 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7827 Wnarrowing for C++0x and C++98.
7828 * c.opt ([Wnarrowing]): Update.
7830 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7833 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7834 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7835 Wnarrowing for C++0x and C++98.
7836 * c.opt ([Wnarrowing]): Update.
7838 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7841 * c-common.c (conversion_warning): Remove code looking for
7842 artificial operands.
7844 2011-10-18 Dodji Seketeli <dodji@redhat.com>
7847 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
7848 !NO_IMPLICIT_EXTERN_C.
7850 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
7852 * c-common.c (c_common_reswords): Add __bases,
7854 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7856 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7859 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7861 2011-10-15 Tom Tromey <tromey@redhat.com>
7862 Dodji Seketeli <dodji@redhat.com>
7864 * c.opt (fdebug-cpp): New option.
7865 * c-opts.c (c_common_handle_option): Handle the option.
7866 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7867 output stream in parameter. Factorized from ...
7868 (maybe_print_line): ... this. Dump location debug information when
7869 -fdebug-cpp is in effect.
7870 (print_line_1): New static function. Takes an output stream in
7871 parameter. Factorized from ...
7872 (print_line): ... here. Dump location information when -fdebug-cpp
7874 (scan_translation_unit): Dump location information when
7875 -fdebug-cpp is in effect.
7877 2011-10-15 Tom Tromey <tromey@redhat.com>
7878 Dodji Seketeli <dodji@redhat.com>
7880 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7882 * c-opts.c (c_common_handle_option)<case
7883 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7884 cases. Handle -ftrack-macro-expansion with and without argument.
7886 2011-10-15 Tom Tromey <tromey@redhat.com>
7887 Dodji Seketeli <dodji@redhat.com>
7889 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7890 (print_line, cb_define, do_line_change): Adjust to avoid touching
7891 the internals of struct line_map. Use the public API instead.
7892 * c-pch.c (c_common_read_pch): Likewise.
7893 * c-lex.c (fe_file_change): Likewise.
7895 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7898 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7900 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7903 * c-pretty-print.c (pp_c_floating_constant): Output
7904 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7906 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7908 * c-common.c (def_builtin_1): Delete old interface with two
7909 parallel arrays to hold standard builtin declarations, and replace
7910 it with a function based interface that can support creating
7911 builtins on the fly in the future. Change all uses, and poison
7912 the old names. Make sure 0 is not a legitimate builtin index.
7913 * c-omp.c (c_finish_omp_barrier): Ditto.
7914 (c_finish_omp_taskwait): Ditto.
7915 (c_finish_omp_flush): Ditto.
7917 2011-10-11 Tristan Gingold <gingold@adacore.com>
7919 * c.opt: (fallow-parameterless-variadic-functions): New.
7921 2011-09-08 Dodji Seketeli <dodji@redhat.com>
7923 PR c++/33255 - Support -Wunused-local-typedefs warning
7924 * c-common.h (struct c_language_function::local_typedefs): New
7926 (record_locally_defined_typedef, maybe_record_typedef_use)
7927 (maybe_warn_unused_local_typedefs): Declare new functions.
7928 * c-common.c (record_locally_defined_typedef)
7929 (maybe_record_typedef_use)
7930 (maybe_warn_unused_local_typedefs): Define new functions.
7931 * c.opt: Declare new -Wunused-local-typedefs flag.
7933 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7936 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7939 2011-09-05 Richard Guenther <rguenther@suse.de>
7941 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7942 of integer_minus_one_node for empty array upper bounds.
7944 2011-08-28 Dodji Seketeli <dodji@redhat.com>
7946 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7947 it's the first time it's being called on this main TU.
7949 2011-08-24 Richard Guenther <rguenther@suse.de>
7952 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7954 2011-08-22 Gabriel Charette <gchare@google.com>
7956 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7957 defined in cpp_init_builtins and c_cpp_builtins.
7959 2011-08-19 Joseph Myers <joseph@codesourcery.com>
7961 * c-common.c (c_common_reswords): Add __builtin_complex.
7962 * c-common.h (RID_BUILTIN_COMPLEX): New.
7964 2011-08-18 Joseph Myers <joseph@codesourcery.com>
7966 * c-common.c (c_common_reswords): Add _Noreturn.
7967 (keyword_is_function_specifier): Handle RID_NORETURN.
7968 * c-common.h (RID_NORETURN): New.
7970 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7972 * c-common.c (unsafe_conversion_p): New function. Check if it is
7973 unsafe to convert an expression to the type.
7974 (conversion_warning): Adjust, use unsafe_conversion_p.
7975 * c-common.h (unsafe_conversion_p): New function declaration.
7977 2011-08-02 Jakub Jelinek <jakub@redhat.com>
7979 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7980 (c_finish_omp_taskyield): New prototype.
7981 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7982 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7983 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7984 or RHS1 have side-effects, evaluate those too in the right spot,
7985 if it is a decl and LHS is also a decl, error out if they
7987 (c_finish_omp_taskyield): New function.
7988 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7989 * c-pragma.c (omp_pragmas): Add taskyield.
7990 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7991 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7992 PRAGMA_OMP_CLAUSE_MERGEABLE.
7994 2011-07-25 Dodji Seketeli <dodji@redhat.com>
7996 * c-common.h (set_underlying_type): Remove parm name from
7999 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8001 * c-pretty-print.h: Search c-common.h in c-family.
8003 2011-07-22 Jason Merrill <jason@redhat.com>
8006 * c.opt (Wnarrowing): New.
8009 * c-common.h: Declare c_linkage_bindings.
8010 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8013 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8014 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8015 as flag_isoc99 for 'restrict'.
8016 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8018 2011-07-21 Ian Lance Taylor <iant@google.com>
8021 * c-common.c (c_disable_warnings): New static function.
8022 (c_enable_warnings): New static function.
8023 (c_fully_fold_internal): Change local unused_p to bool. Call
8024 c_disable_warnings and c_enable_warnings rather than change
8025 c_inhibit_evaluation_warnings.
8027 2011-07-20 Jason Merrill <jason@redhat.com>
8029 PR c++/6709 (DR 743)
8030 PR c++/42603 (DR 950)
8031 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8032 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8033 (CPP_DECLTYPE): New.
8034 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8036 2011-07-19 Richard Guenther <rguenther@suse.de>
8038 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8039 * c-omp.c (c_finish_omp_for): Likewise.
8041 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8043 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8044 body on the next line.
8046 2011-07-08 Jason Merrill <jason@redhat.com>
8049 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8052 * c-common.c (c_apply_type_quals_to_decl): Don't check
8053 TYPE_NEEDS_CONSTRUCTING.
8055 2011-07-06 Richard Guenther <rguenther@suse.de>
8057 * c-common.c (c_common_nodes_and_builtins):
8058 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8060 2011-07-05 Richard Guenther <rguenther@suse.de>
8062 * c-common.c (c_common_nodes_and_builtins): Build all common
8065 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8067 * c-common.h (c_tree_chain_next): New static inline function.
8069 * c-common.c (check_builtin_function_arguments): Handle
8070 BUILT_IN_ASSUME_ALIGNED.
8072 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8074 * c-common.c: Add sync_ or SYNC__ to builtin names.
8075 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8077 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8079 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8081 (gen_pragma_handler): New union.
8082 (internal_pragma_handler): New type.
8083 (c_register_pragma_with_data)
8084 (c_register_pragma_with_expansion_and_data): New functions.
8086 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8087 (c_register_pragma, c_register_pragma_with_expansion)
8088 (c_invoke_pragma_handler): Changed to work with
8089 internal_pragma_handler.
8090 (c_register_pragma_with_data)
8091 (c_register_pragma_with_expansion_and_data): New functions.
8093 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8095 * c-common.c: Include common/common-target.h.
8096 (handle_section_attribute): Use
8097 targetm_common.have_named_sections.
8098 * c-cppbuiltin.c: Include common/common-target.h.
8099 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8101 2011-06-10 Richard Guenther <rguenther@suse.de>
8103 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8104 to print a IDENTIFIER_NODE.
8106 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8107 Joseph Myers <joseph@codesourcery.com>
8109 * c.opt (fbuilding-libgcc): New option.
8110 * c-cppbuiltin.c (c_cpp_builtins): Define
8111 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8113 2011-06-07 Jason Merrill <jason@redhat.com>
8115 * c-common.c (max_tinst_depth): Lower default to 900.
8117 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8119 2011-06-07 Richard Guenther <rguenther@suse.de>
8121 * c-common.c (c_common_nodes_and_builtins): Do not set
8122 size_type_node or call set_sizetype.
8124 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8127 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8128 type when using pointer comparison to compare types.
8130 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8132 * c.opt: Add -Wdelete-non-virtual-dtor.
8133 * c-opts.c (c_common_handle_option): Include it in -Wall.
8135 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8140 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8142 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8145 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8148 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8149 C++ don't call c_common_truthvalue_conversion on void type arms.
8151 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8153 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8154 (stmt_list_stack): Define.
8155 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8156 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8158 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8160 * c-common.c (warning_candidate_p): Check for BLOCKs.
8162 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8164 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8167 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8169 * c-common.c (def_fn_type): Remove extra va_end.
8171 2011-05-23 Jason Merrill <jason@redhat.com>
8174 * c-common.c (c_common_get_narrower): New.
8175 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8177 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8179 * c-common.h (check_function_arguments): Tweak prototype of
8180 check_function_arguments.
8181 * c-common.c (check_function_arguments): Likewise. Adjust
8182 calls to check_function_nonnull, check_function_format, and
8183 check_function_sentinel.
8184 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8185 separate attributes and typelist arguments. Use
8186 FOREACH_FUNCTION_ARGS to iterate over argument types.
8188 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8190 * c-common.c (c_common_reswords): Reorder.
8191 * c-common.h (rid): Likewise.
8193 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8195 * c-common.c (def_fn_type): Don't call build_function_type, call
8196 build_function_type_array or build_varargs_function_type_array
8198 (c_common_nodes_and_builtins): Likewise.
8200 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8202 * c-common.c (c_add_case_label): Omit the loc argument to
8204 * c-common.h (build_case_label): Remove.
8205 * c-semantics.c (build_case_label): Remove.
8207 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8209 * c-objc.h (objc_start_method_definition): Update prototype.
8210 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8212 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8214 * c-common.c (check_main_parameter_types): Reindent. Don't use
8215 TYPE_ARG_TYPES directly.
8216 (handle_nonnull_attribute): Likewise.
8217 (sync_resolve_params): Likewise.
8218 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8219 to check_format_string.
8220 (handle_format_attribute): Likewise.
8221 (check_format_string): Take a function type to examine instead of
8222 a type list. Use a function_arg_iterator to step through argument
8225 2011-05-04 Richard Guenther <rguenther@suse.de>
8227 * c-common.c (fix_string_type): Use size_int for index type bounds.
8228 (start_fname_decls): Do not pass NULL to build_int_cst.
8229 (c_init_attributes): Likewise.
8230 * c-lex.c (c_lex_with_flags): Likewise.
8232 2011-04-27 Jason Merrill <jason@redhat.com>
8234 * c-common.c (make_tree_vector_from_list): New.
8235 * c-common.h: Declare it.
8237 2011-04-26 Richard Guenther <rguenther@suse.de>
8239 PR preprocessor/48248
8240 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8241 for output size with -P.
8243 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8245 * c-common.c (struct c_common_resword): Add __underlying_type.
8246 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8248 2011-04-20 Jim Meyering <meyering@redhat.com>
8250 * c-format.c (init_dollar_format_checking): Remove useless
8253 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8255 * c-objc.h (objc_get_interface_ivars): Removed.
8256 (objc_detect_field_duplicates): New.
8257 * stub-objc.c: Likewise.
8259 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8261 * stub-objc.c (objc_declare_protocols): Renamed to
8262 objc_declare_protocol.
8263 * c-objc.h: Likewise.
8265 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8267 * stub-objc.c (objc_declare_class): Updated argument name.
8269 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8271 * c-common.h (c_common_init_ts): Declare.
8272 * c-common.c (c_common_init_ts): Define.
8274 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8276 * c-objc.h (objc_build_message_expr): Updated prototype.
8277 * stub-objc.c (objc_build_message_expr): Likewise.
8279 2011-04-12 Martin Jambor <mjambor@suse.cz>
8281 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8284 2011-04-11 Richard Guenther <rguenther@suse.de>
8286 * c-common.c (complete_array_type): Build a range type of
8289 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8291 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8292 (handle_type_generic_attribute): Likewise.
8294 2011-04-07 Jason Merrill <jason@redhat.com>
8297 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8298 conversion from C++0x scoped enum.
8300 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8302 * c-target-def.h: New file.
8303 * c-target.def: New file.
8304 * c-target.h: New file.
8305 * c-common.c (targetcm): Don't define here.
8306 * c-common.h (default_handle_c_option): Declare.
8307 * c-format.c: Include c-target.h instead of target.h.
8308 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8310 (default_handle_c_option): Move from targhooks.c.
8312 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8314 PR preprocessor/48248
8315 * c-ppoutput.c (print): Add src_file field.
8316 (init_pp_output): Initialize it.
8317 (maybe_print_line): Don't optimize by adding up to 8 newlines
8318 if map->to_file and print.src_file are different file.
8319 (print_line): Update print.src_file.
8321 2011-03-25 Kai Tietz <ktietz@redhat.com>
8323 * c-ada-spec.c (compare_comment): Use filename_cmp
8324 instead of strcmp for filename.
8326 2011-03-25 Jeff Law <law@redhat.com>
8328 * c-common.c (def_fn_type): Add missing va_end.
8330 2011-03-25 Jason Merrill <jason@redhat.com>
8332 * c.opt: Add -std=c++03.
8334 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8336 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8338 2011-03-17 Kai Tietz <ktietz@redhat.com>
8341 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8342 Display allowed attributes for function pointer types.
8343 (pp_c_attributes_display): New function to display
8344 attributes having affects_type_identity flag set to true.
8345 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8347 * c-common.c (c_common_attribute_table):
8349 (c_common_format_attribute_table): Likewise.
8351 2011-03-18 Jason Merrill <jason@redhat.com>
8353 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8354 * c-common.h: Don't declare it here.
8355 * c-common.c: Or define it here.
8356 * c-opts.c (c_common_handle_option): Or set it here.
8359 * c-common.c (handle_transparent_union_attribute): Don't
8360 make a duplicate type in C++.
8362 2011-03-15 Jason Merrill <jason@redhat.com>
8364 * c-common.c (max_constexpr_depth): New.
8365 * c-common.h: Declare it.
8366 * c-opts.c (c_common_handle_option): Set it.
8367 * c.opt (fconstexpr-depth): New option.
8369 2011-03-11 Jason Merrill <jason@redhat.com>
8371 * c-common.c (attribute_takes_identifier_p): Add missing const.
8374 * c-common.c (attribute_takes_identifier_p): Assume that an
8375 unknown attribute takes an identifier.
8377 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8380 * c-common.c (c_type_hash): Call list_length instead of iterating
8381 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8383 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8386 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8388 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8390 * c.opt (fobjc-abi-version=) New.
8391 (fobjc-nilcheck): New.
8393 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8396 * c-common.h (keyword_is_decl_specifier): Declare.
8397 * c-common.c (keyword_is_decl_specifier): Define.
8398 (keyword_is_function_specifier): New function.
8400 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8403 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8404 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8407 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8409 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8411 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8414 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8415 after init_c_lex if pch_file is set.
8417 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8420 * c.opt (-fkeep-inline-dllexport): New switch.
8422 2011-01-12 Richard Guenther <rguenther@suse.de>
8425 * c-common.c (handle_weak_attribute): Warn instead of error
8426 on declaring an inline function weak.
8428 2011-01-05 Tom Tromey <tromey@redhat.com>
8430 * c-common.h (lvalue_error): Update.
8431 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8434 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8437 * c-objc.h (objc_finish_message_expr): Added argument to
8440 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8442 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8445 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8447 * c-objc.h (objc_maybe_warn_exceptions): New.
8448 * stub-objc.c (objc_maybe_warn_exceptions): New.
8450 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8452 * c-common.h (readonly_error): Declare.
8453 * c-common.c (readonly_error): Define.
8455 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8457 * c-common.h (invalid_indirection_error): Declare.
8458 * c-common.c (invalid_indirection_error): Define.
8460 2010-12-03 Richard Guenther <rguenther@suse.de>
8463 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8464 (pp_c_unary_expression): Likewise.
8465 (pp_c_expression): Likewise.
8467 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8469 * c-common.h (objc_finish_function): New.
8470 (objc_non_volatilized_type): Removed.
8471 (objc_type_quals_match): Removed.
8472 * stub-objc.c (objc_finish_function): New.
8473 (objc_non_volatilized_type): Removed.
8474 (objc_type_quals_match): Removed.
8476 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8478 * c-common.h (parse_optimize_options): Declare.
8479 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8480 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8482 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8484 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8486 * c-pch.c (O_BINARY): Don't define here.
8487 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8489 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8491 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8492 targetm.except_unwind_info.
8494 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8496 * c-opts.c (c_common_handle_option): Pass location to
8497 set_struct_debug_option.
8499 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8501 * c-common.c (visibility_options): Move from ../opts.c.
8502 * c-common.h (struct visibility_flags, visibility_options):
8504 * c-opts.c (finish_options): Rename to c_finish_options.
8505 (c_common_init): Update call to finish_options.
8507 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8510 * c-lex.c (lex_string): Check that each string in an Objective-C
8511 string concat sequence starts with either one or zero '@', and
8512 that there are no spurious '@' signs at the end.
8514 2010-11-20 Joseph Myers <joseph@codesourcery.com>
8516 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8517 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8518 HANDLE_PRAGMA_VISIBILITY.
8519 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8520 HANDLE_PRAGMA_VISIBILITY): Don't define.
8521 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8523 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8528 * c-common.h (keyword_begins_type_specifier): Declare.
8529 (keyword_is_storage_class_specifier): Declare.
8530 (keyword_is_type_qualifier): Declare.
8531 * c-common.c (keyword_begins_type_specifier): New function.
8532 (keyword_is_storage_class_specifier): New function.
8533 (keyword_is_type_qualifier): Declare.
8535 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8538 * c-common.c (in_late_binary_op): Define.
8539 (c_common_truthvalue_conversion): Check in_late_binary_op before
8540 calling c_save_expr.
8541 * c-common.h (in_late_binary_op): Declare.
8543 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8545 * c-opts.c (c_common_handle_option): Update calls to
8546 set_struct_debug_option.
8548 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8550 * c-common.h (objc_declare_protocols): Added additional argument.
8551 * stub-objc.c (objc_declare_protocol): Same change.
8553 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8556 * c-common.h (build_real_imag_expr): Declare.
8557 * c-semantics.c (build_real_imag_expr): Define.
8559 2010-11-17 Joseph Myers <joseph@codesourcery.com>
8561 * c-opts.c (c_common_parse_file): Take no arguments.
8562 * c-common.h (c_common_parse_file): Update prototype.
8564 2010-11-16 Jakub Jelinek <jakub@redhat.com>
8567 * c-common.c (warning_candidate_p): Don't track non-const calls
8570 2010-11-15 Ian Lance Taylor <iant@google.com>
8572 * c-lex.c (init_c_lex): Set macro debug callbacks if
8573 flag_dump_go_spec is set.
8575 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8577 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8578 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8580 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8582 PR preprocessor/45038
8583 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8586 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8588 * c-common.h (c_family_lang_mask): Declare.
8589 * c-opts.c (c_family_lang_mask): Make extern.
8590 * c-pragma.c (handle_pragma_diagnostic): Use
8591 control_warning_option.
8593 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8595 * c-common.c (parse_optimize_options): Update call to
8597 * c-common.h (c_common_handle_option): Update prototype.
8598 * c-opts.c (c_common_handle_option): Take location_t parameter and
8599 pass it to other functions.
8601 2010-11-11 Joseph Myers <joseph@codesourcery.com>
8603 * c-opts.c (warning_as_error_callback): Remove.
8604 (c_common_initialize_diagnostics): Don't call
8605 register_warning_as_error_callback.
8606 (c_common_handle_option): Handle -Werror=normalized= here.
8608 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8610 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8612 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8614 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8615 Remove trailing '.' from diagnostics.
8616 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8618 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8620 * c-common.c (parse_optimize_options): Pass global_dc to
8622 * c-opts.c (c_common_handle_option): Pass &global_options to
8623 set_Wstrict_aliasing.
8624 * c.opt (v): Don't mark Common or document here.
8626 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8629 * c-format.c (format_type): New type gcc_objc_string_format_type.
8630 (valid_stringptr_type_p): New.
8631 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
8632 (check_format_string): Pass expected type, use
8633 valid_stringptr_type_p (), check that the format string types are
8634 consistent with the format specification.
8635 (decode_format_attr): Warn if NSString is used outside objective-c.
8636 (format_types_orig): Add NSString.
8638 (format_flags): New.
8639 (check_format_arg): Handle format strings requiring an external parser.
8640 first_target_format_type: New variable.
8641 (handle_format_attribute): Set up first_target_format_type, pass the
8642 expected format arg string type to check_format_string().
8643 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8644 * stub-objc.c (objc_string_ref_type_p): New.
8645 (objc_check_format_arg): New.
8647 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8649 Fixed using the Objective-C 2.0 dot-syntax with class names.
8650 * c-common.h (objc_build_class_component_ref): New.
8651 * stub-objc.c (objc_build_class_component_ref): New.
8653 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8655 * c.opt (Wproperty-assign-default): New option.
8657 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8659 Implemented -fobjc-std=objc1 flag.
8660 * c.opt (fobjc-std=objc1): New option.
8662 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8664 Implemented format and noreturn attributes for Objective-C methods.
8665 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8666 attribute for Objective-C methods.
8668 2010-10-31 Jason Merrill <jason@redhat.com>
8670 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8673 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8675 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8676 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8677 (objc_add_property_declaration): Removed arguments for copies and
8679 (objc_build_getter_call): Renamed to
8680 objc_maybe_build_component_ref.
8681 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8682 (objc_is_property_ref): New.
8683 * c-common.c (c_common_reswords): Removed copies and ivar.
8684 * stub-objc.c (objc_add_property_declaration): Removed arguments
8685 for copies and ivar.
8686 (objc_build_getter_call): Renamed to
8687 objc_maybe_build_component_ref.
8688 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8689 (objc_is_property_ref): New.
8691 2010-10-29 Arnaud Charlet <charlet@adacore.com>
8692 Matthew Gingell <gingell@adacore.com>
8694 * c-ada-spec.c (separate_class_package): New function.
8695 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8696 name of their enclosing package.
8697 (print_ada_declaration): Use separate_class_package.
8699 2010-10-27 Jason Merrill <jason@redhat.com>
8701 * c-common.c (c_common_reswords): Add __is_literal_type.
8702 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8704 * c-common.c (check_case_value): Remove special C++ code.
8706 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8708 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8709 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8711 (objc_add_property_declaration): Added additional arguments.
8712 (objc_property_attribute_kind): Removed.
8713 (objc_set_property_attr): Removed.
8714 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8716 * stub-objc.c (objc_add_property_declaration): Added additional
8718 (objc_set_property_attr): Removed.
8720 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8722 * c-common.h (objc_add_property_variable): Renamed to
8723 objc_add_property_declaration. Added location argument.
8724 * stub-objc.c (objc_add_property_variable): Same change.
8726 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8728 * c-common.h (objc_maybe_printable_name): New.
8729 * stub-objc.c (objc_maybe_printable_name): New.
8731 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8732 Andrew Pinski <pinskia@gmail.com>
8734 * c-common.h (c_common_mark_addressable_vec): Declare.
8735 * c-common.c (c_common_mark_addressable_vec): New function.
8737 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8739 * c-common.h (objc_set_method_type): Removed.
8740 (objc_add_method_declaration): Added boolean argument.
8741 (objc_start_method_definition): Same change.
8742 (objc_build_method_signature): Same change.
8743 * stub-objc.c (objc_set_method_type): Removed.
8744 (objc_add_method_declaration): Added boolean argument.
8745 (objc_start_method_definition): Same change.
8746 (objc_build_method_signature): Same change.
8748 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8750 * c-common.h (finish_file): Removed.
8751 (objc_write_global_declarations): New.
8752 * c-opts.c (c_common_parse_file): Do not call finish_file.
8753 * stub-objc.c (objc_write_global_declarations): New.
8755 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8757 Implemented parsing @synthesize and @dynamic for
8758 Objective-C/Objective-C++.
8759 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8760 (objc_add_synthesize_declaration): New.
8761 (objc_add_dynamic_declaration): New.
8762 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8763 * stub-objc.c (objc_add_synthesize_declaration): New.
8764 (objc_add_dynamic_declaration): New.
8766 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8769 * c-cppbuiltin.c (mode_has_fma): Move function here from
8770 builtins.c. Don't use the fma optab, instead just use the
8771 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8774 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8776 Merge from 'apple/trunk' branch on FSF servers.
8778 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
8781 * c-common.h (objc_non_volatilized_type): New declaration
8782 * stub-objc.c (objc_non_volatilized_type): New stub.
8784 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8786 Merge from 'apple/trunk' branch on FSF servers.
8788 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
8791 * c-common.h (objc_diagnose_private_ivar): New decl.
8792 * stub-objc.c (objc_diagnose_private_ivar): New stub.
8794 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8796 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8797 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8798 (objc_ivar_visibility_kind): New enum.
8799 (objc_set_visibility): Adjust prototype to use visibility enum.
8800 * stub-objc.c (objc_set_visibility): Adjust stub to use
8803 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8805 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8806 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8807 has the appropriate fma builtins.
8808 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8810 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8812 merge from FSF apple 'trunk' branch.
8813 2006 Fariborz Jahanian <fjahanian@apple.com>
8815 Radars 4436866, 4505126, 4506903, 4517826
8816 * c-common.c (c_common_resword): Define @property and its attributes.
8817 * c-common.h: Define property attribute enum entries.
8818 (OBJC_IS_PATTR_KEYWORD): New.
8819 (objc_property_attribute_kind): New enum.
8820 Declare objc_set_property_attr (), objc_add_property_variable (),
8821 objc_build_getter_call () and objc_build_setter_call ().
8822 * stub-objc.c (objc_set_property_attr): New stub.
8823 (objc_add_property_variable): Likewise.
8824 (objc_build_getter_call): Likewise.
8825 (objc_build_setter_call) Likewise.
8827 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8829 merge from FSF apple 'trunk' branch.
8830 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
8832 Radar 3803157 (method attributes)
8833 * c-common.c (handle_deprecated_attribute): Recognize
8834 objc methods as valid declarations.
8835 * c-common.h: Declare objc_method_decl ().
8836 * stub-objc.c (objc_method_decl): New stub.
8838 2010-10-08 Joseph Myers <joseph@codesourcery.com>
8840 * c-common.c (parse_optimize_options): Call
8841 decode_cmdline_options_to_array_default_mask before
8842 decode_options. Update arguments to decode_options.
8843 * c-common.h (c_common_init_options_struct): Declare.
8844 * c-opts.c (c_common_init_options_struct): New. Split out from
8845 c_common_init_options.
8847 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8849 Implemented fast enumeration for Objective-C.
8850 * c-common.h (objc_finish_foreach_loop): New.
8851 * stub-objc.c (objc_finish_foreach_loop): New.
8853 2010-10-05 Joseph Myers <joseph@codesourcery.com>
8855 * c-common.h (struct diagnostic_context): Don't declare here.
8856 (c_common_initialize_diagnostics): Declare using
8857 diagnostic_context typedef.
8858 * c-opts.c (c_common_handle_option): Pass global_dc to
8859 handle_generated_option.
8861 2010-10-04 Joseph Myers <joseph@codesourcery.com>
8863 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8864 handle_generated_option.
8866 2010-10-03 Ian Lance Taylor <iant@google.com>
8868 * c.opt (-fplan9-extensions): New option.
8870 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8872 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8874 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8875 of duplicating code.
8877 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8879 * c-common.c: Add two new entries for @optional
8880 and @required keywords.
8882 merge from FSF 'apple/trunk' branch.
8883 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
8886 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8887 objective-c keywords.
8888 (objc_set_method_opt): New declaration.
8889 * stub-objc.c (objc_set_method_opt): New stub.
8891 2010-09-30 Joseph Myers <joseph@codesourcery.com>
8893 * c-common.c (handle_optimize_attribute): Pass &global_options to
8894 cl_optimization_save and cl_optimization_restore.
8895 * c-opts.c (c_common_handle_option): Pass &global_options to
8896 handle_generated_option.
8897 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8898 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8899 &global_options to cl_optimization_restore.
8901 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8903 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8904 Objective-C/Objective-C++ keywords.
8906 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8908 Merge from 'apple/trunk' branch on FSF servers.
8910 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
8913 * c-common.h (objc_check_global_decl): New declaration.
8914 * stub-objc.c (objc_check_global_decl): New stub.
8916 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8918 * c.opt: Don't use VarExists.
8920 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8922 * c-common.c (c_cpp_error): Update names of diagnostic_context
8924 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8925 cl_optimization members.
8926 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8927 sanitize_cpp_opts, finish_options): Update names of cpp_options
8930 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8932 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8933 (objc_is_reserved_word): Removed.
8934 * c-common.c: Updated comments.
8935 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8936 objc_is_reserved_word.
8937 * stub-objc.c (objc_is_reserved_word): Removed.
8939 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8941 * c-common.h (objc_add_method_declaration): Adjust prototype to
8943 (objc_start_method_definition): Likewise.
8944 (objc_build_keyword_decl): Likewise.
8945 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8946 (objc_start_method_definition): Likewise.
8947 (objc_build_keyword_decl): Likewise.
8949 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8951 * c-common.h (objc_start_class_interface): Adjust prototype.
8952 (objc_start_category_interface): Likewise.
8953 (objc_start_protocol): Likewise.
8954 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8955 (objc_start_class_interface): Likewise.
8956 (objc_start_category_interface): Likewise.
8958 2010-09-27 Ian Lance Taylor <iant@google.com>
8960 * c-common.c (c_common_attribute_table): Add no_split_stack.
8961 (handle_no_split_stack_attribute): New static function.
8963 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8965 Merge from 'apple/trunk' branch on FSF servers.
8967 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
8970 * c-common.h (objc_have_common_type): New declaration.
8971 * stub-objc.c (objc_have_common_type): New stub.
8973 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8976 * c-common.h (objc_common_type): New prototype.
8977 * stub-objc.c (objc_common_type): New stub.
8979 2010-09-24 Jan Hubicka <jh@suse.cz>
8981 * c-common.c (handle_leaf_attribute): New function.
8982 (struct attribute_spec c_common_att): Add leaf.
8984 2010-09-22 Joseph Myers <joseph@codesourcery.com>
8986 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8987 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8988 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8989 -include-barrier, -include-directory, -include-directory=,
8990 -include-directory-after, -include-directory-after=,
8991 -include-prefix, -include-prefix=, -include-with-prefix,
8992 -include-with-prefix=, -include-with-prefix-after,
8993 -include-with-prefix-after=, -include-with-prefix-before,
8994 -include-with-prefix-before=, -no-integrated-cpp,
8995 -no-line-commands, -no-standard-includes, -no-warnings, -output,
8996 -output=, -pedantic, -pedantic-errors, -preprocess,
8997 -print-missing-file-dependencies, -trace-includes, -traditional,
8998 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8999 -user-dependencies, -verbose, -write-dependencies,
9000 -write-user-dependencies, no-integrated-cpp, traditional): New.
9002 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9005 * c-common.h (objc_start_method_definition): Return bool instead
9007 * stub-objc.c (objc_start_method_definition): Return bool instead
9010 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9013 * c-common.h (objc_get_interface_ivars): New declaration.
9014 * stub-objc.c (objc_get_interface_ivars): New stub.
9016 2010-09-15 Ian Lance Taylor <iant@google.com>
9018 * c-common.c (parse_optimize_options): Do not capitalize warning
9019 messages. Remove period at end of warning message.
9021 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9023 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9024 (handle_alias_attribute): ... here.
9025 (handle_ifunc_attribute): New.
9027 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9029 * c-common.h (do_warn_double_promotion): Declare.
9030 * c-common.c (do_warn_double_promotion): Define.
9032 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9034 * c.opt (Wdouble-promotion): New.
9036 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9038 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9039 fvtable-thunks, fxref): Mark no longer supported in help text.
9041 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9043 * c.opt (Wimport, fall-virtual, falt-external-templates,
9044 fdefault-inline, fenum-int-equiv, fexternal-templates,
9045 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9046 fname-mangling-version-, fnew-abi, fnonnull-objects,
9047 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9048 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9050 (fhandle-exceptions): Mark with Alias and Warn.
9051 * c-opts.c (c_common_handle_option): Don't handle options marked
9054 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9056 * c.opt (Wcomments, Werror-implicit-function-declaration,
9057 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9058 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9060 * c-common.c (option_codes): Use OPT_Wcomment instead of
9062 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9063 Don't handle options marked as aliases.
9065 2010-08-25 Richard Guenther <rguenther@suse.de>
9067 * c-common.c (c_common_get_alias_set): Remove special
9068 handling for pointers.
9070 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9072 * c-common.c: Use FOR_EACH_VEC_ELT.
9073 * c-gimplify.c: Likewise.
9074 * c-pragma.c: Likewise.
9076 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9078 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9080 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9082 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9083 instead of OPT_MDX and OPT_MMDX.
9085 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9087 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9089 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9091 * c.opt (MD, MMD): Change to MDX and MMDX.
9092 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9094 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9096 * c-opts.c (c_common_handle_option): Call handle_generated_option
9097 instead of handle_option.
9099 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9101 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9102 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9104 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9106 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9107 (pending_redefine_extname): Change type to a VEC.
9108 (add_to_renaming_pragma_list): Update for new type of
9109 pending_redefine_extname.
9110 (maybe_apply_renaming_pragma): Likewise.
9112 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9114 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9116 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9117 decide whether a type has already been declared/seen.
9118 Do not go to the original type.
9119 (dump_nested_types): New parameter forward.
9120 Generate forward declaration if needed and mark type as visited.
9121 (print_ada_declaration): Call dump_nested_types if not already done.
9122 Mark types as visited.
9124 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9126 * c.opt (-print-pch-checksum): Remove option.
9127 * c-opts.c (c_common_handle_option): Don't handle
9128 OPT_print_pch_checksum.
9130 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9132 * c-common.h (c_common_handle_option): Update prototype and return
9134 * c-opts.c (c_common_handle_option): Update prototype and return
9135 value type. Update calls to handle_option and
9136 enable_warning_as_error.
9138 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9141 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9143 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9145 * c-common.h (c_common_missing_argument): Remove.
9146 * c-opts.c (c_common_missing_argument): Remove.
9147 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9148 idirafter, imacros, include, isysroot, isystem, iquote): Add
9150 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9152 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9154 * c-common.h (c_common_option_lang_mask,
9155 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9157 (c_common_init_options): Update prototype.
9158 * c-opts.c (c_common_option_lang_mask): New.
9159 (c_common_initialize_diagnostics): Split out of
9160 c_common_init_options.
9161 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9163 (c_common_init_options): Update prototype. Use decoded options in
9164 search for -lang-asm.
9166 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9168 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9169 * c-format.c: Likewise.
9171 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9173 * c-common.h: Include diagnostic-core.h. Error if already
9175 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9177 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9179 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9180 Do not include expr.h
9181 (vector_mode_valid_p): Move here.
9183 2010-06-21 DJ Delorie <dj@redhat.com>
9185 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9186 allow these pragmas anywhere.
9188 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9191 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9192 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9193 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9194 ggc_strdup instead of xstrdup.
9196 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9198 * c-cppbuiltin.c: Include cpp-id-data.h.
9199 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9200 (lazy_hex_fp_value): New function.
9201 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9203 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9205 * c-gimplify.c: Do not include tree-flow.h
9207 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9210 * c-common.c: Rename targetm member:
9211 targetm.enum_va_list -> targetm.enum_va_list_p
9213 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9215 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9217 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9219 * c-cppbuiltin.c: Do not include except.h.
9221 2010-06-24 Andi Kleen <ak@linux.intel.com>
9223 * c-common.c (warn_for_omitted_condop): New.
9224 * c-common.h (warn_for_omitted_condop): Add prototype.
9226 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9228 * c.opt (lang-objc): Remove.
9229 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9231 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9233 * c-opts.c: Include "tm_p.h".
9235 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9237 * c-common.c (parse_optimize_options): Update call to
9240 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9242 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9243 new type of types_used_by_cur_var_decl.
9245 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9248 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9249 for C++ standard compliance.
9251 2010-06-16 Jason Merrill <jason@redhat.com>
9253 * c.opt: Add -Wnoexcept.
9255 2010-06-16 Richard Guenther <rguenther@suse.de>
9258 * c-common.c (c_common_truthvalue_conversion): Remove
9259 premature and wrong optimization concering ADDR_EXPRs.
9261 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9263 * c-ada-spec.c (dump_sloc): Remove column info.
9264 (is_simple_enum): New function.
9265 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9266 enum types when relevant.
9268 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9270 * c-common.c (conversion_warning): Warn at expression
9273 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9275 * c-opts.c (c_common_handle_option): Don't handle
9278 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9280 * c-pragma.c (push_alignment): Use typed GC allocation.
9281 (handle_pragma_push_options): Likewise.
9283 * c-common.c (parse_optimize_options): Likewise.
9285 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9288 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9290 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9291 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9292 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9293 flag_signed_bitfields, warn_strict_null_sentinel,
9294 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9295 flag_gen_declaration, flag_no_gnu_keywords,
9296 flag_implement_inlines, flag_implicit_templates,
9297 flag_implicit_inline_templates, flag_optional_diags,
9298 flag_elide_constructors, flag_default_inline, flag_rtti,
9299 flag_conserve_space, flag_access_control, flag_check_new,
9300 flag_new_for_scope, flag_weak, flag_working_directory,
9301 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9302 flag_enforce_eh_specs, flag_threadsafe_statics,
9303 flag_pretty_templates): Remove.
9304 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9305 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9306 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9307 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9308 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9309 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9310 flag_no_gnu_keywords, flag_implement_inlines,
9311 flag_implicit_templates, flag_implicit_inline_templates,
9312 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9313 flag_rtti, flag_conserve_space, flag_access_control,
9314 flag_check_new, flag_new_for_scope, flag_weak,
9315 flag_working_directory, flag_use_cxa_atexit,
9316 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9317 flag_threadsafe_statics, flag_pretty_templates,
9318 warn_strict_null_sentinel): Remove.
9319 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9320 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9321 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9322 fimplicit-inline-templates, fimplicit-templates,
9323 flax-vector-conversions, fms-extensions, fnil-receivers,
9324 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9325 frtti, fshort-double, fshort-enums, fshort-wchar,
9326 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9327 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9328 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9329 gen-decls, undef): Use Var.
9330 (fdefault-inline, foptional-diags): Document as doing nothing.
9331 * c-opts.c (c_common_handle_option): Remove cases for options now
9332 using Var. Mark ignored options as such.
9334 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9336 * c-common.c: Moved to here from parent directory.
9337 * c-common.def: Likewise.
9338 * c-common.h: Likewise.
9339 * c-cppbuiltin.c: Likewise.
9340 * c-dump.c: Likewise.
9341 * c-format.c: Likewise.
9342 * c-format.h : Likewise.
9343 * c-gimplify.c: Likewise.
9344 * c-lex.c: Likewise.
9345 * c-omp.c: Likewise.
9347 * c-opts.c: Likewise.
9348 * c-pch.c: Likewise.
9349 * c-ppoutput.c: Likewise.
9350 * c-pragma.c: Likewise.
9351 * c-pragma.h: Likewise.
9352 * c-pretty-print.c: Likewise.
9353 * c-pretty-print.h: Likewise.
9354 * c-semantics.c: Likewise.
9355 * stub-objc.c: Likewise.
9357 * c-common.c: Include gt-c-family-c-common.h.
9358 * c-pragma.c: Include gt-c-family-c-pragma.h.
9360 Copyright (C) 2010-2018 Free Software Foundation, Inc.
9362 Copying and distribution of this file, with or without modification,
9363 are permitted in any medium without royalty provided the copyright
9364 notice and this notice are preserved.