1 2015-06-26 Jason Merrill <jason@redhat.com>
4 * class.c (finish_struct): Call fixup_attribute_variants.
7 * typeck2.c (merge_exception_specifiers): Allow different
8 noexcept-specifiers if we've had errors.
11 * pt.c (check_unstripped_args): Split out from...
12 (retrieve_specialization): ...here. Allow typedefs in the type of
16 * mangle.c (write_nested_name): Limit TYPENAME_TYPE handling to
18 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
21 * typeck2.c (digest_init_r): Only expect reshaping if the class is
24 2015-06-26 Marek Polacek <polacek@redhat.com>
26 * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
27 * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
29 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
31 * call.c: Remove ipa-ref.h and plugin-api.h from include list.
33 * cp-ubsan.c: Likewise.
39 * optimize.c: Likewise.
41 * semantics.c: Likewise.
43 * vtable-class-hierarchy.c: Likewise.
45 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
47 * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash
48 rather than ggc_hasher.
49 (constexpr_call_hasher): Likewise.
50 * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise.
51 * decl.c (typename_hasher): Likewise.
52 * mangle.c (conv_type_hasher): Likewise.
53 * pt.c (spec_hasher): Likewise.
54 * tree.c (cplus_array_hasher, list_hasher): Likewise.
55 * typeck2.c (abstract_type_hasher): Likewise.
57 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
59 * class.c (fixed_type_or_null_ref_ht): Inherit from nofree_ptr_hash
60 rather than pointer_hash.
61 (fixed_type_or_null): Use nofree_ptr_hash instead of pointer_hash.
62 * semantics.c (nrv_data): Likewise.
63 * tree.c (verify_stmt_tree_r, verify_stmt_tree): Likewise.
65 2015-06-24 Jason Merrill <jason@redhat.com>
68 * pt.c (dependent_type_p_r): Check for dependent alias template
69 specialization sooner.
72 * class.c (type_has_nontrivial_assignment): Remove.
73 * cp-tree.h: Remove declaration.
74 * init.c (vec_copy_assign_is_trivial): New.
75 (build_vec_init): Use it.
77 2015-06-24 Edward Smith-Rowland <3dw4rd@verizon.net>
79 Implement N3928 - Extending static_assert
80 * parser.c (cp_parser_static_assert): Support static_assert with
81 no message string. Supply an empty string in this case.
82 * semantics.c (finish_static_assert): Don't try to print a message if
83 the message strnig is empty.
85 2015-06-24 Adam Butcher <adam@jessamine.co.uk>
88 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
89 implicit template parm if 'auto' is a placeholder for trailing
92 2015-06-24 Patrick Palka <ppalka@gcc.gnu.org>
95 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
98 * parser.c (cp_parser_template_parameter_list): Update
99 current_template_parms right after processing a paramater.
100 * pt.c (template_parms_to_args): Remove obsolete hack for
101 giving template template arguments the proper level.
102 (check_default_tmpl_args): Account for tested template
104 (splite_late_return_type): Remove obsolete hack for giving
105 template template arguments the proper level.
107 2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
110 * decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
112 2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
115 * parser.c (cp_parser_template_parameter_list): Update
116 current_template_parms right after processing a paramater.
117 * pt.c (template_parms_to_args): Remove obsolete hack for
118 giving template template arguments the proper level.
119 (check_default_tmpl_args): Account for tested template
121 (splite_late_return_type): Remove obsolete hack for giving
122 template template arguments the proper level.
124 2015-06-23 Jason Merrill <jason@redhat.com>
127 * decl.c (grokfndecl): Check the linkage of ctype, not just
129 * tree.c (no_linkage_check): Skip the 'this' pointer.
132 * class.c (type_has_nontrivial_assignment): New.
133 * init.c (build_vec_init): Use it.
134 * cp-tree.h: Declare it.
135 * method.c (trivial_fn_p): Templates aren't trivial.
138 * decl.c (expand_static_init): Make sure the destructor is callable
139 here even if we have an initializer.
141 2015-06-04 Pierre-Marie de Rodat <derodat@adacore.com>
143 * lang-specs.h: Pass "-o %g.s" to cc1plus for headers even if
144 -fdump-ada-spec is passed.
146 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
148 * decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.
150 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
152 * decl.c (grokdeclarator): Use declspecs->locations[ds_virtual].
154 2015-06-22 Paolo Carlini <paolo.carlini@oracle.com>
156 * decl.c (grokdeclarator): Remove pointless code.
158 2015-06-22 Jason Merrill <jason@redhat.com>
161 * call.c (implicit_conversion): Only reshape for classes.
163 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
165 * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
167 * semantics.c (finish_omp_atomic): Likewise.
168 * typeck.c (cp_build_array_ref): Likewise.
170 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
173 * call.c (build_new_op_1): Check tf_warning flag in all cases.
175 2015-06-19 Jason Merrill <jason@redhat.com>
178 * pt.c (instantiate_class_template_1): Clear
179 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
182 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
184 * typeck.c (merge_types): build_ptrmemfunc_type before applying
185 quals and attributes.
188 * constexpr.c (build_constexpr_constructor_member_initializers):
189 Handle an empty STATEMENT_LIST.
192 * pt.c (tsubst_copy_and_build): Register a capture proxy in
193 local_specializations.
195 2015-06-17 Jason Merrill <jason@redhat.com>
198 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
200 (potential_constant_expression_1): Likewise.
202 2015-06-17 Jason Merrill <jason@redhat.com>
205 * call.c (implicit_conversion): Call reshape_init here, early.
206 (build_aggr_conv): Not here.
208 2015-06-17 Jakub Jelinek <jakub@redhat.com>
211 * pt.c (tsubst_omp_clause_decl): New function.
212 (tsubst_omp_clauses): Use it or tsubst_copy instead of
213 tsubst_expr on OMP_CLAUSE_DECL.
215 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
217 * cp-lang.c (cxx_dwarf_name): Use anon_aggrname_p.
218 * cp-tree.h (TYPE_ANONYMOUS_P): Likewise.
219 * decl.c (grokdeclarator, xref_tag_1): Likewise.
220 * error.c (dump_aggr_type): likewise.
221 * pt.c (push_template_decl_real): Likewise.
222 * name-lookup.c (make_anon_name): Use anon_aggrname_format.
224 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
226 * call.c: Do not include input.h, line-map.h or is-a.h.
228 * constexpr.c: Likewise.
229 * cp-array-notation.c: Likewise.
230 * cp-gimplify.c: Likewise.
231 * cp-lang.c: Likewise.
232 * cp-objcp-common.c: Likewise.
233 * cp-tree.h: Likewise.
234 * cp-ubsan.c: Likewise.
240 * except.c: Likewise.
242 * friend.c: Likewise.
244 * lambda.c: Likewise.
246 * mangle.c: Likewise.
247 * method.c: Likewise.
248 * name-lookup.c: Likewise.
249 * optimize.c: Likewise.
250 * parser.c: Likewise.
255 * search.c: Likewise.
256 * semantics.c: Likewise.
258 * typeck.c: Likewise.
259 * typeck2.c: Likewise.
260 * vtable-class-hierarchy.c: Likewise.
262 2015-06-16 Paolo Carlini <paolo.carlini@oracle.com>
265 * parser.c (cp_parser_new_placement): Reject an empty expression-list.
267 2015-06-16 Jason Merrill <jason@redhat.com>
270 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
274 * tree.c (bot_manip): Remap SAVE_EXPR.
277 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
279 2015-06-15 Nathan Sidwell <nathan@acm.org>
282 * cp-tree.h (DECL_INSTANTIATING_NSDMI_P): New.
283 * init.c (get_nsdmi): Check for DEFAULT_ARG in template case and
284 protect it from recursive instantiation.
286 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
289 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
290 using a local type is pure virtual.
292 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
294 * call.c: Remove comment documenting the long-deleted
295 function build_method_call.
297 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
300 * typeck.c (cp_build_binary_op): Warn when comparing an address
301 of a reference against NULL.
303 2015-06-12 Jason Merrill <jason@redhat.com>
306 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
307 variables as DECL_NOT_REALLY_EXTERN.
309 2015-06-11 Jason Merrill <jason@redhat.com>
312 * constexpr.c (potential_constant_expression_1): Handle a
313 DECL_EXPR of TYPE_DECL.
316 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
319 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
321 * decl.c (cxx_init_decl_processing): Register the main
322 translation unit through the new debug hook.
324 2015-06-10 Jason Merrill <jason@redhat.com>
327 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
328 * pt.c (push_template_decl_real): Set it.
329 (dependent_alias_template_spec_p): Use it.
330 (dependent_type_p_r): Use dependent_alias_template_spec_p.
331 (uses_all_template_parms_data, uses_all_template_parms_r)
332 (complex_alias_template_p): New.
333 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
335 2015-06-09 Jason Merrill <jason@redhat.com>
339 * typeck2.c (digest_init_r): Replace previous change with
343 * semantics.c (process_outer_var_ref): Make sure the value is
344 actually constant before returning it.
345 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
348 2015-06-09 Paolo Carlini <paolo.carlini@oracle.com>
351 * typeck2.c (digest_nsdmi_init): On aggregates use reshape_init.
352 * init.c (expand_default_init): Likewise.
354 2015-06-09 Jason Merrill <jason@redhat.com>
357 * tree.c (replace_placeholders_r): Handle placeholders for an
359 * typeck2.c (store_init_value): Only replace_placeholders for
360 objects of class type.
362 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
364 * call.c : Adjust include files.
365 * class.c : Likewise.
366 * constexpr.c : Likewise.
367 * cp-array-notation.c : Likewise.
368 * cp-cilkplus.c : Likewise.
369 * cp-gimplify.c : Likewise.
370 * cp-lang.c : Likewise.
371 * cp-objcp-common.c : Likewise.
372 * cp-tree.h : Likewise.
373 * cp-ubsan.c : Likewise.
376 * decl2.c : Likewise.
378 * error.c : Likewise.
379 * except.c : Likewise.
381 * friend.c : Likewise.
383 * lambda.c : Likewise.
385 * mangle.c : Likewise.
386 * method.c : Likewise.
387 * name-lookup.c : Likewise.
388 * optimize.c : Likewise.
389 * parser.c : Likewise.
391 * ptree.c : Likewise.
394 * search.c : Likewise.
395 * semantics.c : Likewise.
397 * typeck.c : Likewise.
398 * typeck2.c : Likewise.
399 * vtable-class-hierarchy.c : Likewise.
401 2015-06-05 Jason Merrill <jason@redhat.com>
404 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
405 the expansion has extra args.
406 (use_pack_expansion_extra_args_p): Return true in that case.
409 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
410 dependent even if it has a type.
412 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
414 * cp-objcp-common.c: Adjust comment for
415 cxx_warn_unused_global_decl.
416 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove
417 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
418 * cp-tree.h (note_mangling_alias): Protoize.
419 (cp_write_global_declarations): Remove.
420 (cxx_post_compilation_parsing_cleanups): Protoize.
421 * decl.c (wrapup_globals_for_namespace): Remove use of DATA
423 * decl2.c (mangling_aliases): New global.
424 (build_java_method_aliases): New. Adapted from
425 collect_candidates_for_java_method_aliases.
426 (collect_candidates_for_java_method_aliases): Remove.
427 (build_java_method_aliases): Remove.
428 (generate_mangling_aliases): New.
429 (note_mangling_alias): New. Moved from mangle_decl.
430 (locus_at_end_of_parsing): New global.
431 (c_parse_final_cleanups): Rename from
432 cp_write_global_declarations.
433 Use locus_at_end_of_parsing.
434 Call generate_mangling_aliases.
435 Rename call to collect_candidates_for_java_method_aliases into
436 build_java_method_aliases.
437 Remove call to finalize_compilation_unit.
438 Move vtable handling into cxx_post_compilation_parsing_cleanups.
439 Do not call check_global_declarations or
440 emit_debug_global_declarations.
441 (cxx_post_compilation_parsing_cleanups): New.
442 * mangle.c (mangle_decl): Move code to note_mangling_alias.
443 * name-lookup.c (do_namespace_alias): Call early_global_decl.
445 2015-06-05 Nathan Sidwell <nathan@acm.org>
448 * parser.c (cp_parser_cache_defarg): Continue looking for
449 declarators when scanning a potential template argument list of an
452 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
454 * call.c: Adjust includes for restructured coretypes.h.
456 * constexpr.c: Likewise.
457 * cp-array-notation.c: Likewise.
458 * cp-gimplify.c: Likewise.
459 * cp-lang.c: Likewise.
460 * cp-objcp-common.c: Likewise.
461 * cp-tree.h: Likewise.
462 * cp-ubsan.c: Likewise.
468 * except.c: Likewise.
470 * friend.c: Likewise.
472 * lambda.c: Likewise.
474 * mangle.c: Likewise.
475 * method.c: Likewise.
476 * name-lookup.c: Likewise.
477 * optimize.c: Likewise.
478 * parser.c: Likewise.
483 * search.c: Likewise.
484 * semantics.c: Likewise.
486 * typeck.c: Likewise.
487 * typeck2.c: Likewise.
488 * vtable-class-hierarchy.c: Likewise.
490 2015-06-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
494 * cp-tree.h (get_guard_cond): Adjust declaration
495 * decl.c (expand_static_init): Use atomic load acquire
496 and adjust call to get_guard_cond.
497 * decl2.c (build_atomic_load_byte): New function.
498 (get_guard_cond): Handle thread_safety.
499 (one_static_initialization_or_destruction): Adjust call to
502 2015-06-03 Jason Merrill <jason@redhat.com>
505 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
506 (write_CV_qualifiers_for_type): Set G.need_abi_warning.
507 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
508 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
510 2015-06-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
511 Paolo Carlini <paolo.carlini@oracle.com>
514 * typeck.c (invalid_nonstatic_memfn_p): Add location_t parameter and
515 use it in the diagnostic.
516 (decay_conversion): Adjust call.
517 * semantics.c (finish_decltype_type): Likewise.
518 * call.c (resolve_args, build_new_op_1,
519 perform_implicit_conversion_flags): Adjust calls.
520 * cvt.c (ocp_convert, convert_to_void): Likewise.
521 * cp-tree.h (invalid_nonstatic_memfn_p): Update declaration.
523 2015-06-03 Paolo Carlini <paolo.carlini@oracle.com>
525 * decl.c (check_tag_decl): Use declspecs->locations as locations in
526 error_at and warning_at calls.
528 2015-06-03 Marek Polacek <polacek@redhat.com>
531 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
532 (cp_genericize_r): Don't instrument static initializers.
533 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
535 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
537 * decl.c (start_function): Call plugin before parsing.
538 (finish_function): Call plugin after parsing.
540 2015-06-02 Patrick Palka <patrick@parcs.ath.cx>
542 * cp-tree.h (init_error): Remove declaration.
543 * error.c (scratch_pretty_printer): Rename to ...
544 (actual_pretty_printer): ... this.
545 (cxx_pp): Constify and update accordingly.
546 (init_error): Remove definition.
547 * lex.c (cxx_init): Do not call init_error.
549 2015-06-02 Paolo Carlini <paolo.carlini@oracle.com>
552 * parser.c (cp_parser_mem_initializer): Allow for decltype-specifier.
554 2015-06-01 Jason Merrill <jason@redhat.com>
557 * decl2.c (mark_used): Don't always instantiate constexpr fns.
558 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
561 * mangle.c (attr_strcmp): New.
562 (write_CV_qualifiers_for_type): Also write out attributes that
563 affect type identity.
564 (write_type): Strip all attributes after writing qualifiers.
566 2015-05-31 Jason Merrill <jason@redhat.com>
568 * constexpr.c (cxx_eval_indirect_ref): Try folding first.
571 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
572 with the wrong type as non-constant.
574 2015-05-27 Jason Merrill <jason@redhat.com>
576 * decl.c (check_redeclaration_exception_specification): Depend on
577 -Wsystem-headers rather than -pedantic.
579 * decl.c (warn_extern_redeclared_static): Use the location of
580 newdecl in diagnostics, not input_location.
581 (validate_constexpr_redeclaration): Likewise.
582 (check_redeclaration_no_default_args): Likewise.
583 (duplicate_decls): Likewise.
584 (check_redeclaration_exception_specification): Likewise.
585 Change second diagnostic to inform.
587 2015-05-24 Nathan Sidwell <nathan@acm.org>
590 * decl.c (build_enumerator): Don't silently convert scoped enums.
592 2015-05-24 Jan Hubicka <hubicka@ucw.cz>
595 * mangle.c (mangle_decl): Mangle anonymous namespace types as
598 2015-05-23 Nathan Sidwell <nathan@acm.org>
601 * pt.c (lookup_template_class_1): Copy may_alias attribute too.
603 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
605 * Make-lang.in (check_g++_parallelize): Update comment.
607 2015-05-22 Paolo Carlini <paolo.carlini@oracle.com>
610 * decl.c (grokdeclarator): Use the correct location in error
611 messages about 'explicit'.
613 2015-05-22 Marek Polacek <polacek@redhat.com>
614 Edward Smith-Rowland <3dw4rd@verizon.net>
617 * cp-tree.h (build_enumerator): Update declaration.
618 * decl.c (build_enumerator): Add attributes parameter. Call
619 cplus_decl_attributes.
620 * init.c (constant_value_1): Pass tf_none to mark_used.
621 * parser.c (cp_parser_enumerator_definition): Parse attributes and
622 pass them down to build_enumerator.
623 * pt.c (tsubst_enum): Pass decl attributes to build_enumerator.
624 * semantics.c (finish_id_expression): Don't warn_deprecated_use here.
626 2015-05-21 Nathan Sidwell <nathan@acm.org>
629 * decl2.c (change_return_type): Propagate FUNCTION_REF_QUALIFIED.
631 2015-05-21 Marek Polacek <polacek@redhat.com>
633 * typeck.c (warn_args_num): Don't print "declare here" for builtins.
635 2015-05-20 Jason Merrill <jason@redhat.com>
637 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
638 before register_specialization.
640 * decl.c (grok_op_properties): Don't complain about size_t
641 placement delete here.
642 * call.c (second_parm_is_size_t): Split out from...
643 (non_placement_deallocation_fn_p): ...here.
644 (build_op_delete_call): Warn about size_t placement delete with
647 2015-05-19 Nathan Sidwell <nathan@acm.org>
650 * typeck.c (finish_class_member_access_expr): Diagnose failed
651 lookup of enum class member.
653 2015-05-19 Jakub Jelinek <jakub@redhat.com>
656 * parser.c (cp_parser_omp_for_loop): Don't add
657 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
658 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
659 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
662 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
664 * typeck.c (composite_pointer_type): Use std::swap instead of explicit
667 2015-05-18 Jason Merrill <jason@redhat.com>
669 * pt.c (retrieve_specialization): Make sure our arguments have
670 gone through strip_typedefs.
672 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
673 (determine_specialization): Call coerce_template_parms.
676 * pt.c (type_unification_real): Check convertibility here.
677 (unify_one_argument): Not here.
679 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
680 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
681 [TREE_LIST]: Fix no-change case.
683 * ptree.c (cxx_print_xnode): Handle TRAIT_EXPR.
685 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
688 * error.c (cp_diagnostic_starter): Use diagnostic_location
690 (cp_print_error_function): Likewise.
691 (cp_printer): Replace locus pointer with accessor function.
693 2015-05-12 David Malcolm <dmalcolm@redhat.com>
695 * parser.c (cp_parser_selection_statement): Add location and
696 guard_kind arguments to calls to
697 cp_parser_implicitly_scoped_statement.
698 (cp_parser_iteration_statement): Likewise for calls to
699 cp_parser_already_scoped_statement.
700 (cp_parser_implicitly_scoped_statement): Add "guard_loc" and
701 "guard_kind" params; use them to warn for misleading
703 (cp_parser_already_scoped_statement): Likewise.
705 2015-05-11 Jan Hubicka <hubicka@ucw.cz>
707 * class.c (fixup_type_variants): Do not copy TYPE_METHODS
708 (one_inheriting_sig): Assert tat we always set TYPE_METHODS of main variant.
709 * semantics.c (finish_member_declaration): Likewise.
710 * method.c (lazily_declare_fn): Allways add method to main variant list.
712 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
715 * decl2.c (note_mangling_alias): Declare arguments as unused.
717 2015-05-08 Jason Merrill <jason@redhat.com>
719 * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
722 2015-05-08 Jason Merrill <jason@redhat.com>
724 * decl2.c (mangling_aliases): New variable.
725 (note_mangling_alias, generate_mangling_aliases): New.
726 (cp_write_global_declarations): Call generate_mangling_aliases.
727 (generate_mangling_alias): Split out from...
728 * mangle.c (mangle_decl): ...here.
729 * cp-tree.h: Declare note_mangling_alias.
731 2015-05-08 Aldy Hernandez <aldyh@redhat.com>
733 * decl2.c (collect_candidates_for_java_method_aliases): Remove.
734 (build_java_method_aliases): Adapt to use create_same_body_alias
735 instead of assemble_alias. Move variable declarations to
736 definition and tidy up.
737 (cp_write_global_declarations): Call build_java_method_aliases
738 instead of collecting candidates first.
740 2015-05-07 Jason Merrill <jason@redhat.com>
743 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
744 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
745 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
746 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
747 (apply_late_template_attributes): Handle attribute pack expansion.
749 2015-05-07 Marek Polacek <polacek@redhat.com>
752 * typeck.c (cp_build_binary_op): Warn when left shifting a negative
755 2015-05-07 Jason Merrill <jason@redhat.com>
759 * typeck2.c (digest_init_r): Fix single element list.
761 2015-05-05 Jason Merrill <jason@redhat.com>
763 * cp-gimplify.c (cp_genericize_r): Track TRY_BLOCK and
764 MUST_NOT_THROW_EXPR, warn about a THROW_EXPR directly within a
766 (cp_genericize_data): Add try_block field.
767 (cp_genericize_tree): Initialize it.
768 * except.c (expand_end_catch_block): Set TREE_NO_WARNING on
771 * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
774 * semantics.c (finish_call_expr): Check complain.
776 * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a
777 maybe-in-charge constructor.
779 * decl.c (start_decl): Don't push the plain VAR_DECL for a
786 * call.c (convert_like_real): Check value-initialization before
788 * typeck2.c (process_init_constructor_record): Don't set
789 CONSTRUCTOR_IS_DIRECT_INIT.
790 (process_init_constructor_array): Likewise.
791 * init.c (build_vec_init): Likewise.
793 2015-05-05 David Malcolm <dmalcolm@redhat.com>
795 * parser.c (cp_parser_asm_definition): Only test for
796 error_mark_node if "outputs" was just set. Likewise for "inputs".
798 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
799 Jakub Jelinek <jakub@redhat.com>
802 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
803 result in an actual error.
805 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
806 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
809 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
812 2015-04-30 David Malcolm <dmalcolm@redhat.com>
814 * cp-tree.h (ARGUMENT_PACK_SELECT_ARG): Remove spurious
817 2015-04-29 Jason Merrill <jason@redhat.com>
820 * tree.c (apply_identity_attributes): Fix handling of classes.
822 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
824 * parser.c (cp_parser_oacc_enter_exit_data): Use
825 OMP_STANDALONE_CLAUSES.
827 2015-04-29 Paolo Carlini <paolo.carlini@oracle.com>
830 * init.c (perform_member_init): Handle references for -Winit-self.
832 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
834 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
835 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
837 2015-04-28 Jason Merrill <jason@redhat.com>
840 * constexpr.c (cxx_eval_store_expression): Don't try to actually
841 store an empty class.
844 * constexpr.c (cxx_eval_builtin_function_call): Fix
845 __builtin_constant_p.
848 * tree.c (strip_typedefs): Add remove_attributes parm.
849 (strip_typedefs_expr): Likewise.
850 (apply_identity_attributes): New subroutine of strip_typedefs.
851 * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs.
852 (convert_nontype_argument, unify): Likewise.
856 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
858 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
860 * class.c (layout_class_type): Remove check if
861 PCC_BITFIELD_TYPE_MATTERS is defined.
863 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
865 * Make-lang.in (c++.mostlyclean): Remove xg++, g++-cross, and cc1plus.
867 2015-04-24 Jason Merrill <jason@redhat.com>
870 * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL.
872 * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
873 Remove obsolete code.
876 2015-04-23 Jason Merrill <jason@redhat.com>
879 * pt.c (check_explicit_specialization): Don't
880 SET_DECL_TEMPLATE_SPECIALIZATION for a variable with no template
882 * decl.c (grokvardecl): Revert earlier fix.
884 2015-04-20 Paolo Carlini <paolo.carlini@oracle.com>
887 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
888 suppresses the diagnostic.
890 2015-04-20 Ville Voutilainen <ville.voutilainen@gmail.com>
892 Reject trailing return type for an operator auto().
893 * decl.c (grokdeclarator): Reject trailing return types for
894 all conversion operators, don't handle conversion operators
895 in the previous checks that deal with auto.
897 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
899 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
901 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
903 * class.c (resolve_address_of_overloaded_function, instantiate_type):
904 Rename tsubst_flags_t parameter flags -> complain.
906 2015-04-16 Paolo Carlini <paolo.carlini@oracle.com>
908 * call.c (build_op_delete_call, build_over_call): Check mark_used
910 * class.c (resolve_address_of_overloaded_function): Likewise.
911 * decl.c (cxx_maybe_build_cleanup): Likewise.
912 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
913 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
914 * rtti.c (build_dynamic_cast_1): Likewise.
915 * semantics.c (process_outer_var_ref): Likewise.
916 * typeck.c (build_class_member_access_expr,
917 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
919 2015-04-15 Jason Merrill <jason@redhat.com>
921 * constexpr.c (cxx_eval_store_expression): Ignore clobbers.
922 (build_constexpr_constructor_member_initializers): Loop to find
924 * decl.c (start_preparsed_function): Clobber the object at the
925 beginning of a constructor.
927 * decl.c (grokmethod): Only set DECL_COMDAT if TREE_PUBLIC is set.
928 * method.c (implicitly_declare_fn): Likewise.
929 * decl2.c (vague_linkage_p): Check TREE_PUBLIC first.
931 * decl2.c (determine_visibility): Use get_template_info.
933 2015-04-15 Jason Merrill <jason@redhat.com>
934 Marek Polacek <polacek@redhat.com>
937 * lambda.c (lambda_expr_this_capture): In unevaluated context go
938 through the normal loop, just don't capture.
939 (maybe_resolve_dummy): Handle null return.
941 2015-04-15 Paolo Carlini <paolo.carlini@oracle.com>
943 * call.c (enforce_access): Emit error + inform.
945 2015-04-15 Marek Polacek <polacek@redhat.com>
947 * constexpr.c (use_new_call): Remove #define.
948 (lookup_parameter_binding): Remove function.
949 (cxx_bind_parameters_in_call): Remove unused code.
950 (cxx_eval_call_expression): Likewise.
951 (cxx_eval_constant_expression): Likewise.
953 2015-04-14 Mikhail Maltsev <maltsevm@gmail.com>
955 * tree.c (replace_placeholders_t): Remove unused type.
956 (replace_placeholders): Remove unused pset.
958 2015-04-14 Jason Merrill <jason@redhat.com>
960 * pt.c (lookup_template_class_1): Use coerce_innermost_template_parms.
963 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
966 * name-lookup.c (do_class_using_decl): Complain about specifying
967 the current class even if there are dependent bases.
969 2015-04-14 David Krauss <david_work@me.com>
972 * decl.c (grokdeclarator): Do not flag friends with deduced return.
974 2015-04-14 Momchil Velikov <momchil.velikov@gmail.com>
975 Jason Merrill <jason@redhat.com>
978 * parser.c (cp_parser_class_name): Add enum_ok parameter.
979 (cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
980 (cp_parser_diagnose_invalid_type_name): Don't assume a template is
983 2015-04-12 Jakub Jelinek <jakub@redhat.com>
986 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
987 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
988 the expression to the original type at the end.
990 2015-04-09 Jakub Jelinek <jakub@redhat.com>
993 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
997 * tree.c (build_cplus_array_type): Layout type before variants are
998 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1001 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1004 * lambda.c (add_capture): Use dependent_type_p for capture by
1007 2015-04-02 Marek Polacek <polacek@redhat.com>
1010 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1011 cxx_eval_constant_expression on the first operand.
1013 2015-04-01 Jason Merrill <jason@redhat.com>
1016 * decl.c (make_typename_type): Handle seeing a variable template.
1018 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1021 * pt.c (instantiating_current_function_p): New.
1022 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1023 * cp-tree.h (instantiating_current_function_p): Declare.
1025 2015-04-01 Jason Merrill <jason@redhat.com>
1028 * decl.c (grokvardecl): Don't call check_explicit_specialization
1029 for non-template members of a class template.
1031 2015-04-01 Marek Polacek <polacek@redhat.com>
1034 * class.c (finish_struct): Require that the second field of a
1035 user-defined initializer_list be of size type.
1037 2015-03-31 Marek Polacek <polacek@redhat.com>
1040 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1041 checking for constness.
1043 2015-03-30 Marek Polacek <polacek@redhat.com>
1046 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1047 *(&A[i] p+ j) => A[i + j] transformation here.
1048 (cxx_eval_pointer_plus_expression): New function.
1049 (cxx_eval_constant_expression): Use it here.
1051 2015-03-27 Tobias Burnus <burnus@net-b.de>
1054 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1055 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1056 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1059 2015-03-27 Marek Polacek <polacek@redhat.com>
1062 * semantics.c (finish_switch_cond): If the unlowered type is not an
1063 enum, use the type of the condition.
1065 2015-03-27 Jason Merrill <jason@redhat.com>
1068 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1071 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1074 * init.c (build_vec_init): Fix initializing aggregates
1075 with empty init list.
1077 2015-03-26 Jason Merrill <jason@redhat.com>
1080 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1082 2015-03-25 Marek Polacek <polacek@redhat.com>
1085 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1086 on an anonymous namespace.
1088 2015-03-25 Marek Polacek <polacek@redhat.com>
1091 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1093 2015-03-24 Jason Merrill <jason@redhat.com>
1096 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1097 * parser.c (cp_parser_namespace_definition): Don't set it.
1098 * name-lookup.c (handle_namespace_attrs): Check
1099 DECL_NAMESPACE_ASSOCIATIONS instead.
1102 * pt.c (get_mostly_instantiated_function_type): Just return the
1103 type of the partially instantiated template in DECL_TI_TEMPLATE.
1105 2015-03-20 Marek Polacek <polacek@redhat.com>
1108 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1111 2015-03-20 Marek Polacek <polacek@redhat.com>
1114 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1117 2015-03-19 Jason Merrill <jason@redhat.com>
1120 Automatically propagate ABI tags to variables and functions
1121 from their (return) type.
1122 * class.c (check_tag): Handle variables and functions.
1123 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1124 (mark_or_check_tags): Likewise.
1125 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1126 (check_abi_tags): Add single argument overload for decls.
1127 Handle inheriting tags for decls.
1128 * mangle.c (write_mangled_name): Call it.
1129 (mangle_return_type_p): Split out from write_encoding.
1130 (unmangled_name_p): Split out from write_mangled_name.
1131 (write_mangled_name): Ignore abi_tag on namespace.
1132 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1133 * parser.c (cp_parser_namespace_definition): Set it.
1134 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1135 about abi_tag attribute on non-inline namespace.
1136 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1137 (handle_abi_tag_attribute): Allow tags on variables.
1139 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1141 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1142 attribute for DECL_EXTERNAL VAR_DECLs.
1144 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1147 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1149 * decl2.c (mark_used): Inline the require_deduced_type call and
1150 guard the error call.
1152 2015-03-16 Jason Merrill <jason@redhat.com>
1155 * parser.c (cp_parser_template_name): Call strip_using_decl.
1157 2015-03-16 Marek Polacek <polacek@redhat.com>
1161 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1163 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1166 * decl.c (check_default_argument): Don't call
1167 maybe_warn_zero_as_null_pointer_constant.
1169 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1171 * cp-gimplify.c (simple_empty_class_p): New.
1172 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1173 the code for empty class copies into simple_empty_class_p, and
1174 adapt it to handle COMPOUND_EXPRs.
1176 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1179 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1180 only if the location of newdecl doesn't match the location of olddecl.
1182 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1185 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1188 2015-03-10 Jason Merrill <jason@redhat.com>
1192 * pt.c (dependent_type_p_r): Check both class and alias template args.
1194 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1197 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1198 before preparing arguments to warn_logical_not_parentheses.
1199 Use maybe_constant_value on rhs.
1201 2015-03-09 Jason Merrill <jason@redhat.com>
1204 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1206 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1209 * parser.c (cp_parser_binary_expression): Don't warn for
1210 !!x == y or !b == y where b is bool.
1212 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1214 * ptree.c (cxx_print_lambda_node): New.
1215 (cxx_print_xnode): Handle LAMBDA_EXPR.
1217 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1220 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1221 RESULT_DECL handling.
1223 2015-02-26 Marek Polacek <polacek@redhat.com>
1226 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1227 a RETURN_EXPR if its operand is null.
1229 2015-02-25 Jason Merrill <jason@redhat.com>
1232 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1234 (constrain_visibility_for_template): Handle reference arguments.
1237 * decl.c (start_preparsed_function): Use create_artificial_label
1240 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1241 Jakub Jelinek <jakub@redhat.com>
1244 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1245 implicit typedefs for lambda types.
1247 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1250 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1252 2015-02-13 Jason Merrill <jason@redhat.com>
1255 * pt.c (template_args_equal): Look through conversions here.
1256 * tree.c (cp_tree_equal): Not here.
1258 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1261 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1262 pragma_external context.
1264 2015-02-13 Jason Merrill <jason@redhat.com>
1267 * call.c (reference_binding): Don't look for bad conversion
1268 if TO is incomplete.
1270 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1273 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1274 to lookup_template_class.
1276 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1279 * decl.c (start_preparsed_function): Use void_type_node instead
1280 of NULL_TREE as LABEL_DECL type.
1282 2015-02-12 Jason Merrill <jason@redhat.com>
1285 * mangle.c (write_mangled_name): Fix test for variable template
1288 * decl.c (begin_destructor_body): Condition clobber on
1291 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1294 * parser.c (lookup_literal_operator): Return all candidates.
1295 (cp_parser_userdef_char_literal): Simplify error handling.
1296 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1297 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1298 Also give higher priority to standard string UDL operator.
1300 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1303 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1304 * decl.c (poplevel): If functionbody, try not to create an extra
1305 BLOCK for function body and use subblocks as that, if it is non-NULL
1306 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1307 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1310 * except.c (check_noexcept_r): Return NULL for internal
1313 2015-02-10 Jason Merrill <jason@redhat.com>
1316 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1318 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1321 * method.c (use_thunk): Do not check for stdarg thunks.
1323 2015-02-06 Jason Merrill <jason@redhat.com>
1326 * init.c (build_vec_init): Handle default-initialized array with
1327 constexpr default constructor.
1329 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1333 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1335 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1338 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1339 for generated expressions.
1341 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1344 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1347 2015-02-02 Jason Merrill <jason@redhat.com>
1349 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1351 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1353 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1354 changed to pass input_location as first argument.
1356 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1359 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1362 2015-01-29 Jason Merrill <jason@redhat.com>
1365 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1366 erroneous return statement.
1369 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1372 2015-01-27 Caroline Tice <cmtice@google.com>
1374 Committing VTV Cywin/Ming patch for Patrick Wollgast
1375 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1376 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1378 2015-01-27 Jason Merrill <jason@redhat.com>
1381 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1382 current_function_decl.
1385 * pt.c (finish_template_variable): Move from semantics.c.
1386 Handle multiple template arg levels. Handle coercion here.
1387 (lookup_template_variable): Not here.
1389 2015-01-23 Jason Merrill <jason@redhat.com>
1393 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1394 that has been completely split out.
1397 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1401 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1404 2015-01-21 Jason Merrill <jason@redhat.com>
1407 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1408 constant CONSTRUCTORs.
1411 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1412 give a hard error in a template instantiation.
1414 2015-01-21 Richard Biener <rguenther@suse.de>
1417 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1418 for builtins the user declared correctly.
1420 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1423 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1424 TREE_TYPE (elt) == error_mark_node.
1426 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1428 PR tree-optimization/62053
1429 * tree.c (build_cplus_array_type): Layout type after variants are set.
1431 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1433 * cp-gimplify.c (cp_genericize_r): Call
1434 cp_ubsan_maybe_instrument_member_call for member calls.
1435 (cp_ubsan_check_member_access_r): New function.
1436 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1437 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1438 cp_ubsan_instrument_member_accesses,
1439 cp_ubsan_maybe_instrument_downcast,
1440 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1441 * cp-ubsan.c: New file.
1442 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1443 * constexpr.c (cxx_eval_call_expression): Return void_node
1445 (potential_constant_expression_1): Return true for
1446 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1447 * typeck.c (build_class_member_access_expr): Provide locus
1449 (build_static_cast_1): Instrument downcasts.
1450 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1451 add ubsan instrumentation for virtual_access.
1452 * call.c: Include internal-fn.h.
1453 (set_flags_from_callee): Handle internal calls.
1455 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1458 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1459 and function templates, declared only in the class.
1460 * decl.c (duplicate_decls): Reveal hidden friend functions or
1461 function templates, if they are redeclared outside the class.
1463 2015-01-15 Jason Merrill <jason@redhat.com>
1466 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1469 * constexpr.c (potential_constant_expression_1): Handle reference
1472 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1473 James Norris <jnorris@codesourcery.com>
1474 Cesar Philippidis <cesar@codesourcery.com>
1475 Ilmir Usmanov <i.usmanov@samsung.com>
1476 Jakub Jelinek <jakub@redhat.com>
1478 * parser.c: Include "gomp-constants.h".
1479 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1480 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1481 Use OMP_CLAUSE_SET_MAP_KIND.
1482 (cp_parser_omp_construct, cp_parser_pragma): Handle
1483 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1484 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1485 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1486 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1487 "create", "delete", "deviceptr", "host", "num_gangs",
1488 "num_workers", "present", "present_or_copy", "pcopy",
1489 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1490 "present_or_create", "pcreate", "vector_length", "wait".
1491 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1492 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1493 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1494 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1495 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1496 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1497 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1498 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1499 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1500 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1501 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1502 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1503 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1504 (cp_parser_oacc_wait): New functions.
1505 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1506 (finish_oacc_parallel): New prototypes.
1507 * semantics.c: Include "gomp-constants.h".
1508 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1509 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1510 OMP_CLAUSE_SET_MAP_KIND.
1511 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1512 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1513 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1514 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1517 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1520 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1521 self-initialization.
1523 2015-01-13 Jason Merrill <jason@redhat.com>
1527 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1528 pointer expressions.
1529 (cxx_eval_increment_expression): Likewise.
1532 * pt.c (coerce_template_parameter_pack): Return NULL for a
1533 zero-length fixed parameter pack with a pack expansion arg.
1536 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1538 2015-01-12 Jason Merrill <jason@redhat.com>
1541 * constexpr.c (cxx_eval_call_expression): A call to a void
1542 function doesn't need to return a value.
1544 2015-01-09 Michael Collison <michael.collison@linaro.org>
1546 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1547 input.h, alias.h, symtab.h, options.h, fold-const.h,
1548 wide-int.h, and inchash.h due to flattening of tree.h.
1550 * constexpr.c: Ditto.
1551 * cp-array-notation.c: Ditto.
1552 * cp-gimplify.c: Ditto.
1554 * cp-objcp-common.c: Ditto.
1567 * name-lookup.c: Ditto.
1568 * optimize.c: Ditto.
1575 * semantics.c: Ditto.
1580 2015-01-08 Jason Merrill <jason@redhat.com>
1582 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1583 * decl.c (compute_array_index_type): Likewise.
1584 * init.c (build_vec_init): Likewise.
1585 * typeck.c (cp_build_binary_op): Likewise.
1587 2015-01-08 Jason Merrill <jason@redhat.com>
1589 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1590 whether an initializer-list is too big for a VLA.
1591 (throw_bad_array_length): Remove.
1592 * cp-tree.h: Remove prototype.
1594 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1597 * decl.c (grokfndecl): Add bool parameter.
1598 (grokdeclarator): Adjust calls.
1599 (start_decl): Don't set DECL_DELETED_FN here.
1601 2015-01-06 Jason Merrill <jason@redhat.com>
1603 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1607 * pt.c (type_dependent_expression_p): Handle variable templates.
1608 * constexpr.c (potential_constant_expression_1): Use it.
1611 * semantics.c (finish_offsetof): Handle templates here.
1612 * parser.c (cp_parser_builtin_offsetof): Not here.
1615 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1618 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1621 * class.c (check_field_decls): Make copy assignment operators
1622 complex only in c++98 mode.
1624 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1627 * class.c (check_for_override): Warn when a virtual function is an
1628 override not marked override.
1630 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1632 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1634 (get_basefndecls): Adjust.
1636 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1638 Update copyright years.
1640 2015-01-05 Marek Polacek <polacek@redhat.com>
1643 * typeck.c (cp_build_array_ref): Pass loc down to
1644 warn_array_subscript_with_type_char.
1647 Copyright (C) 2015 Free Software Foundation, Inc.
1649 Copying and distribution of this file, with or without modification,
1650 are permitted in any medium without royalty provided the copyright
1651 notice and this notice are preserved.