1 2017-10-10 Release Manager
5 2017-09-18 Jason Merrill <jason@redhat.com>
7 PR c++/80294 - ICE with constexpr and inheritance.
8 * constexpr.c (reduced_constant_expression_p):
9 A null constructor element is non-constant.
10 (cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before
11 returning an empty base.
13 PR c++/79607 - ICE with T{} initializer
14 * decl.c (type_dependent_init_p): Check the type of a CONSTRUCTOR.
17 * init.c (expand_aggr_init_1): Only handle value-init of bases.
18 * constexpr.c (build_data_member_initialization): Handle multiple
19 initializers for the same field.
23 * init.c (expand_aggr_init_1): Handle list-initialization from {}.
25 2017-09-16 Jakub Jelinek <jakub@redhat.com>
27 Backported from mainline
28 2017-06-21 Jakub Jelinek <jakub@redhat.com>
31 * semantics.c (handle_omp_array_sections_1, finish_omp_clauses):
32 Complain about t not being a variable if t is OVERLOAD even
33 when processing_template_decl.
35 2017-06-13 Jakub Jelinek <jakub@redhat.com>
38 * cp-gimplify.c (cp_genericize): Only look for VAR_DECLs in
39 BLOCK_VARS (outer) chain.
40 (cxx_omp_const_qual_no_mutable): Likewise.
42 2017-06-08 Jakub Jelinek <jakub@redhat.com>
45 * semantics.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
46 to sizetype before size_binop.
48 2017-05-30 Jakub Jelinek <jakub@redhat.com>
50 Backported from mainline
51 2017-04-11 Jakub Jelinek <jakub@redhat.com>
54 * error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.
56 2017-04-10 Jakub Jelinek <jakub@redhat.com>
59 * tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
60 operand, if it is a static member function, recurse on the
63 2017-03-22 Jakub Jelinek <jakub@redhat.com>
66 * semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
67 case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
68 processing_template_decl.
70 2017-03-10 Jakub Jelinek <jakub@redhat.com>
73 * decl.c (finish_enum_value_list): If value is error_mark_node,
74 don't copy it and change its type.
75 * init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
76 of CONST_DECL is error_mark_node.
78 2017-02-22 Jakub Jelinek <jakub@redhat.com>
81 * parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
82 SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
83 * constexpr.c (potential_constant_expression_1): Handle
84 OMP_*, OACC_* and CILK_* trees.
86 2017-02-16 Jakub Jelinek <jakub@redhat.com>
89 * parser.c (cp_parser_omp_target): For -fopenmp-simd
90 ignore #pragma omp target even when not followed by identifier.
92 2017-01-11 Jakub Jelinek <jakub@redhat.com>
95 * parser.c (cp_parser_std_attribute_spec): Remove over-eager
96 assertion. Formatting fix.
98 2017-01-04 Jakub Jelinek <jakub@redhat.com>
101 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
104 2016-12-02 Jakub Jelinek <jakub@redhat.com>
107 * pt.c (tsubst_init): Don't call build_value_init if decl's type
110 2016-11-23 Jakub Jelinek <jakub@redhat.com>
113 * cp-gimplify.c (cp_gimplify_tree) <case VEC_INIT_EXPR>: Pass
114 false as handle_invisiref_parm_p to cp_genericize_tree.
115 (struct cp_genericize_data): Add handle_invisiref_parm_p field.
116 (cp_genericize_r): Don't wrap is_invisiref_parm into references
117 if !wtd->handle_invisiref_parm_p.
118 (cp_genericize_tree): Add handle_invisiref_parm_p argument,
119 set wtd.handle_invisiref_parm_p to it.
120 (cp_genericize): Pass true as handle_invisiref_parm_p to
121 cp_genericize_tree. Formatting fix.
123 2016-11-18 Jakub Jelinek <jakub@redhat.com>
126 * mangle.c (mangle_tls_init_fn, mangle_tls_wrapper_fn): Call
129 2016-10-31 Jakub Jelinek <jakub@redhat.com>
132 * parser.c (cp_parser_postfix_expression): Replace return statement in
133 the first switch with setting postfix_expression to the return
134 expression and break;.
136 2016-09-28 Jakub Jelinek <jakub@redhat.com>
139 * constexpr.c (enum constexpr_switch_state): New.
140 (struct constexpr_ctx): Add css_state field.
141 (label_matches): Add CTX and STMT arguments, remove I and
142 DEFAULT_LABEL. For CASE_LABEL_EXPR assert ctx->css_state != NULL,
143 handle default labels according to css_state.
144 (cxx_eval_statement_list): Remove statement skipping, label_matches
145 and default_label handling code.
146 (cxx_eval_loop_expr): Exit after first iteration even if
147 switches (jump_target).
148 (cxx_eval_switch_expr): Set up css_state field in ctx, if default
149 label has been seen in the body, but no cases matched, evaluate
150 the body second time.
151 (cxx_eval_constant_expression): Handle stmt skipping and label_matches
152 here. Handle PREDICT_EXPR. For MODIFY_EXPR or INIT_EXPR, assert
153 statement is not skipped. For COND_EXPR during skipping, don't
154 evaluate condition, just the then block and if still skipping at the
155 end also the else block.
156 (cxx_eval_outermost_constant_expr): Adjust constexpr_ctx initializer.
157 (is_sub_constant_expr): Likewise.
159 2016-09-27 Jakub Jelinek <jakub@redhat.com>
162 * cp-gimplify.c (cp_ubsan_maybe_instrument_return): Instrument also
163 functions that have just a STATEMENT_LIST instead of BIND_EXPR, or
164 BIND_EXPR with some statement rather than STATEMENT_LIST as body.
166 2016-09-20 Jakub Jelinek <jakub@redhat.com>
169 * parser.c (cp_parser_std_attribute_list): Reject ... without
172 2016-09-16 Jakub Jelinek <jakub@redhat.com>
175 * class.c (check_bases): Set CLASSTYPE_HAS_MUTABLE if any
176 TYPE_HAS_MUTABLE_P for any bases.
178 2016-08-11 Jakub Jelinek <jakub@redhat.com>
181 * constexpr.c (label_matches): Handle case range expressions.
183 2017-01-12 Nathan Sidwell <nathan@acm.org>
186 * name-lookup.c (set_namespace_binding_1): An overload of 1 decl
189 2016-12-08 Nathan Sidwell <nathan@acm.org>
192 * constexpr.c (extract_string_elt): New. Broken out of ...
193 (cxx_eval_array_reference): ... here. Call it.
194 (cxx_eval_store_expression): Convert init by STRING_CST into
195 CONSTRUCTOR, if needed.
197 2016-08-05 Nathan Sidwell <nathan@acm.org>
200 * pt.c (unify): TRAIT_EXPR is an expr.
202 2016-07-25 Jason Merrill <jason@redhat.com>
205 * pt.c (coerce_template_parameter_pack): Fix logic for
208 2016-07-21 Jason Merrill <jason@redhat.com>
211 * semantics.c (apply_deduced_return_type): Call
212 complete_type_or_else before building the new RESULT_DECL.
215 * pt.c (instantiate_decl): Fix pattern_defined for namespace scope
219 * call.c (unsafe_copy_elision_p): It's OK to elide when
220 initializing an unknown object.
222 2016-07-20 Jakub Jelinek <jakub@redhat.com>
225 * parser.c (cp_parser_save_member_function_body): Consume
226 __transaction_relaxed or __transaction_atomic with optional
227 attribute. Only skip catch with block if try keyword is seen.
229 2016-07-19 Jakub Jelinek <jakub@redhat.com>
231 Backported from mainline
232 2016-07-18 Jakub Jelinek <jakub@redhat.com>
235 * typeck.c (build_x_conditional_expr): Revert the 2012-10-25 change.
237 2016-07-07 Jakub Jelinek <jakub@redhat.com>
239 Backported from mainline
240 2016-06-14 Jakub Jelinek <jakub@redhat.com>
243 * decl.c (duplicate_decls): For DECL_INITIALIZED_P non-external
244 olddecl vars, preserve their TREE_READONLY bit.
247 * decl.c (complete_vars): Handle gracefully type == error_mark_node.
249 2016-06-08 Jakub Jelinek <jakub@redhat.com>
252 * pt.c (tsubst_copy): Only set TREE_USED on DECLs.
254 2016-06-03 Release Manager
256 * GCC 5.4.0 released.
258 2016-05-23 Richard Biener <rguenther@suse.de>
260 Backport from mainline
261 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
264 * typeck.c (process_init_constructor_union): If the initializer
265 is empty, use the union's NSDMI if it has one.
267 2016-05-20 Paolo Carlini <paolo.carlini@oracle.com>
270 * call.c (convert_like_real): Check that we are actually converting
273 2016-05-18 Jason Merrill <jason@redhat.com>
276 * pt.c (tsubst_baselink): Give the new TEMPLATE_ID_EXPR
277 unknown_type_node, too.
280 * decl.c (cxx_maybe_build_cleanup): Handle non-decls.
281 * typeck2.c (split_nonconstant_init_1): Use it.
284 * constexpr.c (cxx_eval_store_expression): Also copy
285 CONSTRUCTOR_NO_IMPLICIT_ZERO.
288 * decl.c (make_rtl_for_nonlocal_decl): Don't defer local statics
289 in constexpr functions.
292 * pt.c (instantiate_decl): Fix call to variable_template_p.
294 2016-05-18 Jason Merrill <jason@redhat.com>
295 Jakub Jelinek <jakub@redhat.com>
298 * constexpr.c (struct constexpr_ctx): Add save_exprs field.
299 (cxx_eval_loop_expr): Discard SAVE_EXPR values before looping.
300 (cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set.
301 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize.
303 2016-05-18 Jason Merrill <jason@redhat.com>
305 * method.c (synthesized_method_walk): operator= can also be constexpr.
307 2016-05-03 Paolo Carlini <paolo.carlini@oracle.com>
310 * pt.c (resolve_typename_type): Fix typos in infinite recursion
313 2016-04-18 Marek Polacek <polacek@redhat.com>
315 Backport from mainline
316 2016-03-31 Marek Polacek <polacek@redhat.com>
319 * decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
321 2016-04-18 Marek Polacek <polacek@redhat.com>
323 Backport from mainline
324 2015-11-11 Jason Merrill <jason@redhat.com>
326 * decl.c (duplicate_decls): When combining typedefs, remove the
327 new type from the variants list.
329 2016-04-15 Jason Merrill <jason@redhat.com>
331 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Get
332 LAMBDA_EXPR_RETURN_TYPE from the instantiated closure.
335 * pt.c (copy_template_args): New.
336 (tsubst_pack_expansion): Use it.
338 2016-04-13 Alan Modra <amodra@gmail.com>
340 Backport from mainline
341 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
344 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl.
346 2016-04-06 Richard Biener <rguenther@suse.de>
348 Backport from mainline
349 2016-03-31 Richard Biener <rguenther@suse.de>
352 * typeck.c (cp_build_binary_op): Fix operand order of vector
353 conditional in truth op handling.
355 2016-03-31 Nathan Sidwell <nathan@acm.org>
358 * constexpr.c (cxx_eval_store_expression): Keep CONSTRUCTOR
359 elements in field order.
361 2016-03-30 Jakub Jelinek <jakub@redhat.com>
363 Backported from mainline
364 2016-03-17 Jakub Jelinek <jakub@redhat.com>
367 * decl.c (begin_destructor_body): Don't insert clobber if
368 is_empty_class (current_class_type).
370 2016-02-19 Jakub Jelinek <jakub@redhat.com>
373 * parser.c (cp_parser_std_attribute_spec_seq): Don't assume
374 attr_spec is always single element chain, chain all the attributes
375 properly together in the right order.
377 2016-03-21 Marek Polacek <polacek@redhat.com>
379 Backported from mainline
380 2016-03-15 Marek Polacek <polacek@redhat.com>
383 * tree.c (strip_typedefs): Call strip_typedefs again on the
384 DECL_ORIGINAL_TYPE result.
386 2016-03-18 Jason Merrill <jason@redhat.com>
389 * constexpr.c (cxx_eval_call_expression): Don't shortcut trivial copy.
391 2016-03-05 Jason Merrill <jason@redhat.com>
394 * constexpr.c (cxx_eval_store_expression): Replace
395 CONSTRUCTOR_ELTS in nested CONSTRUCTORs, too.
397 2016-03-04 Jason Merrill <jason@redhat.com>
400 * constexpr.c (cxx_eval_component_reference): Further tweak.
403 * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
406 2016-03-03 Jason Merrill <jason@redhat.com>
408 * call.c (build_aggr_conv): Use get_nsdmi.
411 * typeck.c (build_static_cast_1): Avoid folding back to lvalue.
414 * constexpr.c (cxx_eval_component_reference): Just return an empty
415 CONSTRUCTOR for an empty class.
417 2016-03-01 Paolo Carlini <paolo.carlini@oracle.com>
419 * call.c (build_op_delete_call, build_over_call): Check mark_used
421 * class.c (resolve_address_of_overloaded_function): Likewise.
422 * decl.c (cxx_maybe_build_cleanup): Likewise.
423 * pt.c (gen_elem_of_pack_expansion_instantiation, tsubst_baselink,
424 tsubst_qualified_id, tsubst_copy, tsubst_copy_and_build): Likewise.
425 * rtti.c (build_dynamic_cast_1): Likewise.
426 * semantics.c (process_outer_var_ref): Likewise.
427 * typeck.c (build_class_member_access_expr,
428 cp_build_function_call_vec, cp_build_addr_expr_1): Likewise.
430 2016-03-01 Jason Merrill <jason@redhat.com>
433 * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
435 2016-03-01 Markus Trippelsdorf <markus@trippelsdorf.de>
436 Paolo Carlini <paolo.carlini@oracle.com>
439 * constexpr.c (cxx_eval_array_reference): Use tree_fits_shwi_p before
440 tree_to_shwi to avoid ICEs.
442 2016-03-01 Jason Merrill <jason@redhat.com>
445 * constexpr.c (array_index_cmp, find_array_ctor_elt): New.
446 (cxx_eval_array_reference, cxx_eval_store_expression): Use them.
449 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
453 * constexpr.c (cxx_eval_call_expression): Unshare arg.
454 (cxx_eval_constant_expression) [DECL_EXPR]: Unshare init.
455 [TARGET_EXPR]: Unshare init.
457 2016-02-29 Jason Merrill <jason@redhat.com>
460 * constexpr.c (cxx_eval_store_expression): Unshare init.
463 * constexpr.c (build_constexpr_constructor_member_initializers):
464 Handle an additional STATEMENT_LIST.
466 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
468 Backported from mainline
469 2016-02-19 Jakub Jelinek <jakub@redhat.com>
470 Bernd Edlinger <bernd.edlinger@hotmail.de>
472 * Make-lang.in: Invoke gperf with -L C++.
473 * cfns.gperf: Remove prototypes for hash and libc_name_p
475 * cfns.h: Regenerated.
476 * except.c (nothrow_libfn_p): Adjust.
478 2016-02-25 Jason Merrill <jason@redhat.com>
481 * constexpr.c (cxx_eval_component_reference): Don't complain about
482 unevaluated empty classes.
485 * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.
487 2016-02-24 Jason Merrill <jason@redhat.com>
490 * pt.c (instantiate_class_template_1): Set
491 processing_template_decl before substituting friend_type.
493 2016-02-19 Jason Merrill <jason@redhat.com>
496 * call.c (remaining_arguments): No longer static.
497 * cp-tree.h: Declare it.
498 * pt.c (more_specialized_fn): Use it.
500 2016-02-17 Jason Merrill <jason@redhat.com>
503 * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection.
506 * decl2.c (reset_type_linkage_2): Look through member templates.
508 2016-02-15 Jason Merrill <jason@redhat.com>
511 * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check.
513 2016-02-10 Jason Merrill <jason@redhat.com>
516 * pt.c (resolve_nondeduced_context): Add complain parm.
517 (do_auto_deduction): Pass it.
518 * cvt.c (convert_to_void): Likewise.
519 * decl.c (cp_finish_decl): Likewise.
520 * init.c (build_new): Likewise.
521 * rtti.c (get_tinfo_decl_dynamic): Likewise.
522 * semantics.c (finish_decltype_type): Likewise.
523 * typeck.c (decay_conversion): Likewise.
524 * cp-tree.h: Adjust declaration.
525 * call.c (standard_conversion): Add complain parm, pass it along.
526 (implicit_conversion): Pass it.
528 2016-02-10 Jakub Jelinek <jakub@redhat.com>
530 Backported from mainline
531 2016-02-08 Jakub Jelinek <jakub@redhat.com>
534 * parser.c (cp_parser_omp_declare_reduction): Set assembler name
535 of the DECL_OMP_DECLARE_REDUCTION_P decls.
537 2016-01-31 Jason Merrill <jason@redhat.com>
540 * pt.c (partial_specialization_p, impartial_args): New.
541 (instantiate_decl): Call impartial_args.
543 2016-01-27 Marek Polacek <polacek@redhat.com>
545 Backport from mainline
546 2016-01-27 Marek Polacek <polacek@redhat.com>
549 * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
550 needed. Add -Wsign-compare warning.
552 2016-01-27 Jason Merrill <jason@redhat.com>
555 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
556 * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
557 maybe-in-charge *tor.
560 * method.c (walk_field_subobs): Add dtor_from_ctor parm.
561 (process_subob_fn): Likewise. Don't consider triviality if true.
562 (synthesize_method_walk): Pass it.
564 2016-01-19 Marek Polacek <polacek@redhat.com>
566 Backported from mainline
567 2016-01-19 Marek Polacek <polacek@redhat.com>
570 * pt.c (tsubst_copy): Mark elements in expanded vector as used.
572 2016-01-08 Marek Polacek <polacek@redhat.com>
575 * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
577 2016-01-07 Jason Merrill <jason@redhat.com>
581 * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
583 2015-12-22 Jason Merrill <jason@redhat.com>
586 * decl.c (cp_complete_array_type): Allow an initializer that
587 already has array type.
590 * parser.c (cp_parser_elaborated_type_specifier): Use CLASS_TYPE_P
591 rather than check for RECORD_TYPE.
593 2015-12-20 Jason Merrill <jason@redhat.com>
596 * decl2.c (decl_maybe_constant_var_p): Use DECL_HAS_VALUE_EXPR_P.
599 * decl2.c (decl_maybe_constant_var_p): A proxy isn't constant.
601 2015-12-17 Jason Merrill <jason@redhat.com>
604 * init.c (constant_value_1): Don't return a CONSTRUCTOR missing
605 non-constant elements.
609 * rtti.c (build_typeid): Use save_expr, not stabilize_reference.
611 2015-12-16 Joseph Myers <joseph@codesourcery.com>
614 * tree.c (c_build_qualified_type): Add extra arguments.
616 2015-12-16 Jason Merrill <jason@redhat.com>
619 * pt.c (tsubst_pack_expansion): Also make dummy decls if
620 retrieve_local_specialization fails.
622 2015-12-04 Markus Trippelsdorf <markus@trippelsdorf.de>
625 * mangle.c (write_template_prefix): Guard against context==NULL.
627 2015-12-04 Release Manager
629 * GCC 5.3.0 released.
631 2015-11-26 Jakub Jelinek <jakub@redhat.com>
634 * cp-tree.h (cp_ubsan_maybe_instrument_downcast): Add INTYPE argument.
635 * cp-ubsan.c (cp_ubsan_maybe_instrument_downcast): Likewise. Use
636 it instead of or in addition to TREE_TYPE (op). Use
637 is_properly_derived_from, return NULL_TREE if TREE_TYPE (intype) and
638 TREE_TYPE (type) are the same type minus qualifiers.
639 * typeck.c (build_static_cast_1): Adjust callers.
641 2015-11-25 Jakub Jelinek <jakub@redhat.com>
643 Backported from mainline
644 2015-11-20 Jakub Jelinek <jakub@redhat.com>
647 * cp-tree.h (defer_mangling_aliases): Declare.
648 (generate_mangling_aliases): New prototype.
649 * decl2.c (defer_mangling_aliases): New variable.
650 (note_mangling_alias): Use !defer_mangling_aliases
652 (generate_mangling_aliases): No longer static. Clear
653 defer_mangling_aliases.
654 * optimize.c (maybe_thunk_body): Defer emitting mangling aliases
655 if !defer_mangling_aliases until the fns are put into the same
658 2015-05-09 Aldy Hernandez <aldyh@redhat.com>
661 * decl2.c (note_mangling_alias): Declare arguments as unused.
663 2015-05-08 Jason Merrill <jason@redhat.com>
665 * decl2.c (mangling_aliases): New variable.
666 (note_mangling_alias, generate_mangling_aliases): New.
667 (cp_write_global_declarations): Call generate_mangling_aliases.
668 (generate_mangling_alias): Split out from...
669 * mangle.c (mangle_decl): ...here.
670 * cp-tree.h: Declare note_mangling_alias.
672 2015-11-25 Jason Merrill <jason@redhat.com>
675 * lambda.c (maybe_add_lambda_conv_op): Mark _FUN as
676 no_sanitize_undefined.
679 * cp-tree.h (PACK_EXPANSION_SIZEOF_P): New.
680 * parser.c (cp_parser_sizeof_pack): Set it.
681 * pt.c (tsubst_copy) [SIZEOF_EXPR]: Likewise.
682 (tsubst_pack_expansion): Improve T... shortcut when set.
685 * constexpr.c (cxx_eval_store_expression): Always use *valp if
688 2015-11-25 Markus Trippelsdorf <markus@trippelsdorf.de>
689 Paolo Carlini <paolo.carlini@oracle.com>
692 * constexpr.c (cxx_eval_array_reference): Use tree_fits_shwi_p before
693 tree_to_shwi to avoid ICEs.
695 2015-11-19 Jakub Jelinek <jakub@redhat.com>
696 Manuel López-Ibáñez <manu@gcc.gnu.org>
699 * decl.c (identify_goto): Add LOC and DIAG_KIND arguments, call
700 emit_diagnostic instead of permerror.
701 (check_previous_goto_1): Adjust identify_goto callers, treat all
702 cases but crossing initialization and entering scope of decl with
703 non-trivial dtor as unconditional hard errors.
704 (check_goto): Use identify_goto. Treat all cases but crossing
705 initialization and entering scope of decl with non-trivial dtor
706 as unconditional hard errors.
708 2015-10-20 Jason Merrill <jason@redhat.com>
711 * init.c (innermost_aggr_scope): New.
712 (sort_mem_initializers): Use it.
715 * call.c (is_base_field_ref): New.
716 (unsafe_copy_elision_p): New.
717 (build_over_call): Use it.
719 2015-09-12 Paolo Carlini <paolo.carlini@oracle.com>
721 Backport from mainline
722 2015-06-15 Paolo Carlini <paolo.carlini@oracle.com>
725 * decl2.c (no_linkage_error): Do not issue a permerror if the DECL
726 using a local type is pure virtual.
728 2015-09-10 Jakub Jelinek <jakub@redhat.com>
731 * semantics.c (handle_omp_array_sections_1): Only run
732 type_dependent_expression_p on VAR_DECL/PARM_DECLs.
733 (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Likewise.
734 Don't adjust OMP_CLAUSE_LINEAR_STEP if OMP_CLAUSE_DECL
735 is not a VAR_DECL/PARM_DECL.
738 * semantics.c (handle_omp_for_class_iterator): Don't wrap
739 error_mark_node into a NOP_EXPR to void_type_node.
741 2015-09-09 Jakub Jelinek <jakub@redhat.com>
744 * parser.c (cp_parser_omp_clause_collapse): Test tree_fits_shwi_p
745 before INTEGRAL_TYPE_P test.
747 2015-09-08 Paolo Carlini <paolo.carlini@oracle.com>
750 * pt.c (tsubst_copy, [case FUNCTION_DECL]): Do not call tsubst
751 if the first argument isn't a template.
753 2015-08-17 Jason Merrill <jason@redhat.com>
756 * search.c (protected_accessible_p): Revert fix for 38579.
758 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com>
761 * pt.c (tsubst_copy): Pass complain to mark_used, check return value.
763 2015-08-17 Jason Merrill <jason@redhat.com>
766 * pt.c (tsubst_copy_and_build): Call insert_pending_capture_proxies.
769 * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.
772 * constexpr.c (cxx_eval_array_reference): Handle sparse
775 2015-08-14 Jason Merrill <jason@redhat.com>
778 * decl2.c (mark_vtable_entries): Suppress -Wdeprecated.
780 2015-08-14 Patrick Palka <ppalka@gcc.gnu.org>
783 * cvt.c (ocp_convert): Don't call scalar_constant_value when
784 converting to a class type.
786 2015-08-12 Jason Merrill <jason@redhat.com>
789 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Pass
790 TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS.
792 2015-08-06 Jason Merrill <jason@redhat.com>
795 * parser.c (cp_parser_primary_expression): Don't skip to the end
796 of the statement if we're parsing tentatively.
801 * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
803 * pt.c (tsubst_copy_and_build): Check for argument substitution
806 2015-08-05 Jason Merrill <jason@redhat.com>
812 * pt.c (lookup_template_variable): Use NULL_TREE for type.
813 (instantiate_template_1): Also set DECL_TI_ARGS based on
814 the immediate parent.
815 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle variable templates.
816 (finish_template_variable): Add complain parm.
821 * semantics.c (finish_id_expression): Call convert_from_reference
822 for variable template.
825 * pt.c (find_parameter_packs_r): Handle variable templates.
826 (variable_template_specialization_p): New.
827 * cp-tree.h: Declare it.
829 2015-07-30 Jason Merrill <jason@redhat.com>
833 * pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
835 2015-07-16 Marek Polacek <polacek@redhat.com>
837 Backported from mainline
838 2015-07-08 Marek Polacek <polacek@redhat.com>
841 * tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
842 accessing TYPE_LANG_SPECIFIC node.
844 2015-07-16 Release Manager
846 * GCC 5.2.0 released.
848 2015-07-10 Jakub Jelinek <jakub@redhat.com>
850 Backported from mainline
851 2015-07-08 Jakub Jelinek <jakub@redhat.com>
853 * decl.c (grokfndecl): Handle flag_openmp_simd like flag_openmp.
854 * pt.c (apply_late_template_attributes): Likewise.
856 2015-07-02 Jason Merrill <jason@redhat.com>
859 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use
860 TYPE_VALUES_RAW rather than TYPE_FIELDS.
862 2015-06-30 Jason Merrill <jason@redhat.com>
865 * decl.c (cxx_init_decl_processing): Set TYPE_ALIGN of nullptr_t.
866 * class.c (layout_nonempty_base_or_field): Warn if that affects
867 the offset of a field.
869 2015-06-29 Adam Butcher <adam@jessamine.co.uk>
872 * parser.c (cp_parser_simple_type_specifier): Don't synthesize
873 implicit template parm if 'auto' is a placeholder for trailing
876 2015-06-26 Jason Merrill <jason@redhat.com>
879 * class.c (finish_struct): Call fixup_attribute_variants.
882 * mangle.c (write_template_args): Handle 0 length TREE_VEC.
884 2015-06-24 Jason Merrill <jason@redhat.com>
887 * mangle.c (mangle_decl): Always SET_IDENTIFIER_GLOBAL_VALUE.
888 (decl_implicit_alias_p): Split out from maybe_remove_implicit_alias.
889 * cp-tree.h (DECL_REALLY_EXTERN): Handle null DECL_LANG_SPECIFIC.
892 * pt.c (dependent_type_p_r): Check for dependent alias template
893 specialization sooner.
896 * init.c (vec_copy_assign_is_trivial): New.
897 (build_vec_init): Use it.
899 2015-06-24 Mikhail Maltsev <maltsevm@gmail.com>
901 Backport from mainline:
902 2015-06-20 Mikhail Maltsev <maltsevm@gmail.com>
905 * call.c (build_new_op_1): Check tf_warning flag in all cases.
907 2015-06-23 Jason Merrill <jason@redhat.com>
910 * tree.c (no_linkage_check): Skip the 'this' pointer.
912 2015-06-19 Jason Merrill <jason@redhat.com>
915 * call.c (implicit_conversion): Call reshape_init here, early.
916 (build_aggr_conv): Not here.
919 * pt.c (instantiate_class_template_1): Clear
920 cp_unevaluated_operand and c_inhibit_evaluation_warnings.
923 * decl.c (build_ptrmemfunc_type): Check TYPE_GET_PTRMEMFUNC_TYPE after
927 * constexpr.c (build_constexpr_constructor_member_initializers):
928 Handle an empty STATEMENT_LIST.
931 * pt.c (tsubst_copy_and_build): Register a capture proxy in
932 local_specializations.
934 2015-06-17 Jason Merrill <jason@redhat.com>
937 * constexpr.c (cxx_eval_constant_expression): Handle TRY_BLOCK and
939 (potential_constant_expression_1): Likewise.
941 2015-06-17 Jakub Jelinek <jakub@redhat.com>
944 * pt.c (tsubst_omp_clause_decl): New function.
945 (tsubst_omp_clauses): Use it or tsubst_copy instead of
946 tsubst_expr on OMP_CLAUSE_DECL.
948 2015-06-17 Jason Merrill <jason@redhat.com>
951 * tree.c (replace_placeholders_r) [CONSTRUCTOR]: Handle type
955 * tree.c (bot_manip): Remap SAVE_EXPR.
958 * pt.c (tsubst_copy) [VAR_DECL]: Use process_outer_var_ref.
961 * constexpr.c (cxx_eval_store_expression): Avoid messing up outer
965 * cp-tree.h (TEMPLATE_DECL_COMPLEX_ALIAS_P): New.
966 * pt.c (push_template_decl_real): Set it.
967 (dependent_alias_template_spec_p): Use it.
968 (dependent_type_p_r): Use dependent_alias_template_spec_p.
969 (uses_all_template_parms_data, uses_all_template_parms_r)
970 (complex_alias_template_p): New.
971 (get_template_parm_index): Handle BOUND_TEMPLATE_TEMPLATE_PARM.
973 2015-06-12 Jason Merrill <jason@redhat.com>
976 * pt.c (tsubst_decl) [VAR_DECL]: Mark namespace-scope
977 variables as DECL_NOT_REALLY_EXTERN.
979 2015-06-11 Jason Merrill <jason@redhat.com>
982 * constexpr.c (potential_constant_expression_1): Handle a
983 DECL_EXPR of TYPE_DECL.
985 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
987 * decl.c (cxx_init_decl_processing): Register the main
988 translation unit through the new debug hook.
990 2015-06-09 Jason Merrill <jason@redhat.com>
993 * semantics.c (process_outer_var_ref): Make sure the value is
994 actually constant before returning it.
995 * typeck.c (cp_build_array_ref): Allow subscripting non-lvalue
999 * tree.c (replace_placeholders_r): Handle placeholders for an
1001 * typeck2.c (store_init_value): Only replace_placeholders for
1002 objects of class type.
1004 2015-06-05 Jason Merrill <jason@redhat.com>
1007 * pt.c (argument_pack_element_is_expansion_p): Return 2 if
1008 the expansion has extra args.
1009 (use_pack_expansion_extra_args_p): Return true in that case.
1012 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is
1013 dependent even if it has a type.
1015 2015-06-05 Jason Merrill <jason@redhat.com>
1018 * decl2.c (mark_used): Don't always instantiate constexpr fns.
1019 * constexpr.c (cxx_eval_call_expression): Instantiate them here.
1021 2015-06-04 Marek Polacek <polacek@redhat.com>
1023 Backported from mainline
1024 2015-06-03 Marek Polacek <polacek@redhat.com>
1027 * cp-gimplify.c (struct cp_genericize_data): Add no_sanitize_p.
1028 (cp_genericize_r): Don't instrument static initializers.
1029 (cp_genericize_tree): Initialize wtd.no_sanitize_p.
1031 2015-05-31 Jason Merrill <jason@redhat.com>
1034 * constexpr.c (cxx_eval_constant_expression): Treat a placeholder
1035 with the wrong type as non-constant.
1037 * pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
1038 before register_specialization.
1040 2015-05-22 Jakub Jelinek <jakub@redhat.com>
1042 Backported from mainline
1043 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1046 * parser.c (cp_parser_omp_for_loop): Don't add
1047 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1048 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1049 (cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1052 2015-05-18 Jason Merrill <jason@redhat.com>
1054 * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms.
1055 (determine_specialization): Call coerce_template_parms.
1057 * tree.c (strip_typedefs_expr) [TRAIT_EXPR]: Fix typo.
1058 (strip_typedefs) [DECLTYPE_TYPE]: Fix typedef of decltype.
1059 [TREE_LIST]: Fix no-change case.
1061 2015-05-07 Jason Merrill <jason@redhat.com>
1064 * parser.c (cp_parser_std_attribute_list): Handle attribute expansion.
1065 (cp_parser_std_attribute_spec): Handle alignas pack expansion.
1066 * decl2.c (is_late_template_attribute): An attribute exp is dependent.
1067 * pt.c (make_pack_expansion): Allow TREE_LIST for attribute expansion.
1068 (apply_late_template_attributes): Handle attribute pack expansion.
1072 * typeck2.c (digest_init_r): Fix single element list.
1074 2015-05-05 Jason Merrill <jason@redhat.com>
1076 * decl.c (start_decl): Don't push the plain VAR_DECL for a
1079 2015-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1080 Jakub Jelinek <jakub@redhat.com>
1083 * typeck2.c (check_narrowing): Check by-hand that the pedwarn didn't
1084 result in an actual error.
1086 2015-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1087 Prathamesh Kulharni <prathamesh.kulkarni@linaro.org>
1090 * typeck2.c (check_narrowing): Set ok = true when pedwarn returns
1093 2015-04-30 Paolo Carlini <paolo.carlini@oracle.com>
1096 * typeck2.c (check_narrowing): In C++11 mode too, -Wno-narrowing
1097 suppresses the diagnostic.
1099 2015-04-30 Jason Merrill <jason@redhat.com>
1102 * constexpr.c (cxx_eval_call_expression): Fail gracefully if cgraph
1103 threw away DECL_SAVED_TREE.
1105 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1107 Backport from trunk r222564:
1109 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1111 * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
1112 OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
1114 2015-04-28 Jason Merrill <jason@redhat.com>
1117 * constexpr.c (cxx_eval_store_expression): Don't try to actually
1118 store an empty class.
1120 2015-04-22 Marek Polacek <polacek@redhat.com>
1123 * lambda.c (maybe_resolve_dummy): Handle null return.
1125 2015-04-22 Jason Merrill <jason@redhat.com>
1128 * cvt.c (cp_fold_convert): Avoid wrapping PTRMEM_CST in NOP_EXPR.
1131 * name-lookup.c (do_class_using_decl): Complain about specifying
1132 the current class even if there are dependent bases.
1134 2015-04-22 David Krauss <david_work@me.com>
1137 * decl.c (grokdeclarator): Do not flag friends with deduced return.
1139 2015-04-22 Release Manager
1141 * GCC 5.1.0 released.
1143 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1145 * parser.c (cp_parser_omp_target_update): Add missed %> to error_at ().
1147 2015-04-12 Jakub Jelinek <jakub@redhat.com>
1150 * constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
1151 don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
1152 the expression to the original type at the end.
1154 2015-04-09 Jakub Jelinek <jakub@redhat.com>
1157 * tree.c (cp_build_qualified_type_real): Copy TYPE_ALIGN and
1161 * tree.c (build_cplus_array_type): Layout type before variants are
1162 set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
1165 2015-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1168 * lambda.c (add_capture): Use dependent_type_p for capture by
1171 2015-04-02 Marek Polacek <polacek@redhat.com>
1174 * constexpr.c (cxx_eval_pointer_plus_expression): Call
1175 cxx_eval_constant_expression on the first operand.
1177 2015-04-01 Jason Merrill <jason@redhat.com>
1180 * decl.c (make_typename_type): Handle seeing a variable template.
1182 2015-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1185 * pt.c (instantiating_current_function_p): New.
1186 * name-lookup.c (pushdecl_maybe_friend_1): Use it.
1187 * cp-tree.h (instantiating_current_function_p): Declare.
1189 2015-04-01 Jason Merrill <jason@redhat.com>
1192 * decl.c (grokvardecl): Don't call check_explicit_specialization
1193 for non-template members of a class template.
1195 2015-04-01 Marek Polacek <polacek@redhat.com>
1198 * class.c (finish_struct): Require that the second field of a
1199 user-defined initializer_list be of size type.
1201 2015-03-31 Marek Polacek <polacek@redhat.com>
1204 * tree.c (build_cplus_array_type): Use dependent_type_p rather than
1205 checking for constness.
1207 2015-03-30 Marek Polacek <polacek@redhat.com>
1210 * constexpr.c (cxx_fold_indirect_ref): Don't perform the
1211 *(&A[i] p+ j) => A[i + j] transformation here.
1212 (cxx_eval_pointer_plus_expression): New function.
1213 (cxx_eval_constant_expression): Use it here.
1215 2015-03-27 Tobias Burnus <burnus@net-b.de>
1218 * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
1219 cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
1220 cp_parser_omp_declare): Don't show error for skipped omp pragmas with
1223 2015-03-27 Marek Polacek <polacek@redhat.com>
1226 * semantics.c (finish_switch_cond): If the unlowered type is not an
1227 enum, use the type of the condition.
1229 2015-03-27 Jason Merrill <jason@redhat.com>
1232 * decl.c (make_rtl_for_nonlocal_decl): Don't defer static
1235 2015-03-26 Mikhail Maltsev <maltsevm@gmail.com>
1238 * init.c (build_vec_init): Fix initializing aggregates
1239 with empty init list.
1241 2015-03-26 Jason Merrill <jason@redhat.com>
1244 * constexpr.c (potential_constant_expression_1): Handle MEM_REF.
1246 2015-03-25 Marek Polacek <polacek@redhat.com>
1249 * name-lookup.c (handle_namespace_attrs): Ignore abi_tag attribute
1250 on an anonymous namespace.
1252 2015-03-25 Marek Polacek <polacek@redhat.com>
1255 * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
1257 2015-03-24 Jason Merrill <jason@redhat.com>
1260 * cp-tree.h (NAMESPACE_IS_INLINE): Remove.
1261 * parser.c (cp_parser_namespace_definition): Don't set it.
1262 * name-lookup.c (handle_namespace_attrs): Check
1263 DECL_NAMESPACE_ASSOCIATIONS instead.
1266 * pt.c (get_mostly_instantiated_function_type): Just return the
1267 type of the partially instantiated template in DECL_TI_TEMPLATE.
1269 2015-03-20 Marek Polacek <polacek@redhat.com>
1272 * constexpr.c (cxx_fold_indirect_ref): Transform *(&A[i] p+ j) into
1275 2015-03-20 Marek Polacek <polacek@redhat.com>
1278 * typeck.c (lookup_anon_field): Make sure we're dealing with the main
1281 2015-03-19 Jason Merrill <jason@redhat.com>
1284 Automatically propagate ABI tags to variables and functions
1285 from their (return) type.
1286 * class.c (check_tag): Handle variables and functions.
1287 (mark_or_check_attr_tags): Split out from find_abi_tags_r.
1288 (mark_or_check_tags): Likewise.
1289 (mark_abi_tags): Use it. Rename from mark_type_abi_tags.
1290 (check_abi_tags): Add single argument overload for decls.
1291 Handle inheriting tags for decls.
1292 * mangle.c (write_mangled_name): Call it.
1293 (mangle_return_type_p): Split out from write_encoding.
1294 (unmangled_name_p): Split out from write_mangled_name.
1295 (write_mangled_name): Ignore abi_tag on namespace.
1296 * cp-tree.h (NAMESPACE_IS_INLINE): Replace NAMESPACE_ABI_TAG.
1297 * parser.c (cp_parser_namespace_definition): Set it.
1298 * name-lookup.c (handle_namespace_attrs): Use arguments. Warn
1299 about abi_tag attribute on non-inline namespace.
1300 * tree.c (check_abi_tag_args): Split out from handle_abi_tag_attribute.
1301 (handle_abi_tag_attribute): Allow tags on variables.
1303 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1305 * decl2.c (cplus_decl_attributes): Also add "omp declare target"
1306 attribute for DECL_EXTERNAL VAR_DECLs.
1308 2015-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1311 * call.c (build_over_call): Pass the tsubst_flags_t argument to
1313 * decl2.c (mark_used): Inline the require_deduced_type call and
1314 guard the error call.
1316 2015-03-16 Jason Merrill <jason@redhat.com>
1319 * parser.c (cp_parser_template_name): Call strip_using_decl.
1321 2015-03-16 Marek Polacek <polacek@redhat.com>
1325 * decl.c (grokdeclarator): Allow volatile and constexpr together.
1327 2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1330 * decl.c (check_default_argument): Don't call
1331 maybe_warn_zero_as_null_pointer_constant.
1333 2015-03-11 Aldy Hernandez <aldyh@redhat.com>
1335 * cp-gimplify.c (simple_empty_class_p): New.
1336 * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract
1337 the code for empty class copies into simple_empty_class_p, and
1338 adapt it to handle COMPOUND_EXPRs.
1340 2015-03-10 Paolo Carlini <paolo.carlini@oracle.com>
1343 * decl.c (duplicate_decls): Call check_redeclaration_no_default_args
1344 only if the location of newdecl doesn't match the location of olddecl.
1346 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1349 * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
1352 2015-03-10 Jason Merrill <jason@redhat.com>
1356 * pt.c (dependent_type_p_r): Check both class and alias template args.
1358 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1361 * parser.c (cp_parser_binary_expression): Check for tcc_comparison
1362 before preparing arguments to warn_logical_not_parentheses.
1363 Use maybe_constant_value on rhs.
1365 2015-03-09 Jason Merrill <jason@redhat.com>
1368 * call.c: Don't call maybe_resolve_dummy when calling a constructor.
1370 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1373 * parser.c (cp_parser_binary_expression): Don't warn for
1374 !!x == y or !b == y where b is bool.
1376 2015-03-06 Aldy Hernandez <aldyh@redhat.com>
1378 * ptree.c (cxx_print_lambda_node): New.
1379 (cxx_print_xnode): Handle LAMBDA_EXPR.
1381 2015-03-03 Aldy Hernandez <aldyh@redhat.com>
1384 * constexpr.c (cxx_eval_constant_expression): Remove assert in
1385 RESULT_DECL handling.
1387 2015-02-26 Marek Polacek <polacek@redhat.com>
1390 * constexpr.c (cxx_eval_constant_expression): Don't evaluate
1391 a RETURN_EXPR if its operand is null.
1393 2015-02-25 Jason Merrill <jason@redhat.com>
1396 * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
1398 (constrain_visibility_for_template): Handle reference arguments.
1401 * decl.c (start_preparsed_function): Use create_artificial_label
1404 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
1405 Jakub Jelinek <jakub@redhat.com>
1408 * constexpr.c (check_constexpr_bind_expr_vars): Allow
1409 implicit typedefs for lambda types.
1411 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1414 * decl.c (lookup_and_check_tag): Use strip_using_decl.
1416 2015-02-13 Jason Merrill <jason@redhat.com>
1419 * pt.c (template_args_equal): Look through conversions here.
1420 * tree.c (cp_tree_equal): Not here.
1422 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1425 * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
1426 pragma_external context.
1428 2015-02-13 Jason Merrill <jason@redhat.com>
1431 * call.c (reference_binding): Don't look for bad conversion
1432 if TO is incomplete.
1434 2015-02-13 Paolo Carlini <paolo.carlini@oracle.com>
1437 * decl.c (make_typename_type): Pass tsubst_flags_t argument
1438 to lookup_template_class.
1440 2015-02-13 Jakub Jelinek <jakub@redhat.com>
1443 * decl.c (start_preparsed_function): Use void_type_node instead
1444 of NULL_TREE as LABEL_DECL type.
1446 2015-02-12 Jason Merrill <jason@redhat.com>
1449 * mangle.c (write_mangled_name): Fix test for variable template
1452 * decl.c (begin_destructor_body): Condition clobber on
1455 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
1458 * parser.c (lookup_literal_operator): Return all candidates.
1459 (cp_parser_userdef_char_literal): Simplify error handling.
1460 (cp_parser_userdef_numeric_literal): Pass tf_warning_or_error.
1461 (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
1462 Also give higher priority to standard string UDL operator.
1464 2015-02-12 Jakub Jelinek <jakub@redhat.com>
1467 * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
1468 * decl.c (poplevel): If functionbody, try not to create an extra
1469 BLOCK for function body and use subblocks as that, if it is non-NULL
1470 and doesn't have siblings. Set BLOCK_OUTER_CURLY_BRACE_P flag.
1471 (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
1474 * except.c (check_noexcept_r): Return NULL for internal
1477 2015-02-10 Jason Merrill <jason@redhat.com>
1480 * constexpr.c (cxx_eval_call_expression): Walk the clone list.
1482 2015-02-10 Jan Hubicka <hubicka@ucw.cz>
1485 * method.c (use_thunk): Do not check for stdarg thunks.
1487 2015-02-06 Jason Merrill <jason@redhat.com>
1490 * init.c (build_vec_init): Handle default-initialized array with
1491 constexpr default constructor.
1493 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1497 * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
1499 2015-02-03 Paolo Carlini <paolo.carlini@oracle.com>
1502 * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
1503 for generated expressions.
1505 2015-02-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1508 * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
1511 2015-02-02 Jason Merrill <jason@redhat.com>
1513 * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
1515 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1517 * class.c, except.c, parser.c, pt.c: All callers of fatal_error
1518 changed to pass input_location as first argument.
1520 2015-01-29 Jakub Jelinek <jakub@redhat.com>
1523 * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
1526 2015-01-29 Jason Merrill <jason@redhat.com>
1529 * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
1530 erroneous return statement.
1533 * repo.c (repo_emit_p): It's OK for a clone to be extern at this
1536 2015-01-27 Caroline Tice <cmtice@google.com>
1538 Committing VTV Cywin/Ming patch for Patrick Wollgast
1539 * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
1540 check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
1542 2015-01-27 Jason Merrill <jason@redhat.com>
1545 * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
1546 current_function_decl.
1549 * pt.c (finish_template_variable): Move from semantics.c.
1550 Handle multiple template arg levels. Handle coercion here.
1551 (lookup_template_variable): Not here.
1553 2015-01-23 Jason Merrill <jason@redhat.com>
1557 * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
1558 that has been completely split out.
1561 * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
1565 * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
1568 2015-01-21 Jason Merrill <jason@redhat.com>
1571 * constexpr.c (cxx_eval_constant_expression): Only shortcut
1572 constant CONSTRUCTORs.
1575 * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
1576 give a hard error in a template instantiation.
1578 2015-01-21 Richard Biener <rguenther@suse.de>
1581 * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
1582 for builtins the user declared correctly.
1584 2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1587 * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
1588 TREE_TYPE (elt) == error_mark_node.
1590 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
1592 PR tree-optimization/62053
1593 * tree.c (build_cplus_array_type): Layout type after variants are set.
1595 2015-01-15 Jakub Jelinek <jakub@redhat.com>
1597 * cp-gimplify.c (cp_genericize_r): Call
1598 cp_ubsan_maybe_instrument_member_call for member calls.
1599 (cp_ubsan_check_member_access_r): New function.
1600 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
1601 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
1602 cp_ubsan_instrument_member_accesses,
1603 cp_ubsan_maybe_instrument_downcast,
1604 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
1605 * cp-ubsan.c: New file.
1606 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
1607 * constexpr.c (cxx_eval_call_expression): Return void_node
1609 (potential_constant_expression_1): Return true for
1610 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
1611 * typeck.c (build_class_member_access_expr): Provide locus
1613 (build_static_cast_1): Instrument downcasts.
1614 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
1615 add ubsan instrumentation for virtual_access.
1616 * call.c: Include internal-fn.h.
1617 (set_flags_from_callee): Handle internal calls.
1619 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
1622 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
1623 and function templates, declared only in the class.
1624 * decl.c (duplicate_decls): Reveal hidden friend functions or
1625 function templates, if they are redeclared outside the class.
1627 2015-01-15 Jason Merrill <jason@redhat.com>
1630 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
1633 * constexpr.c (potential_constant_expression_1): Handle reference
1636 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1637 James Norris <jnorris@codesourcery.com>
1638 Cesar Philippidis <cesar@codesourcery.com>
1639 Ilmir Usmanov <i.usmanov@samsung.com>
1640 Jakub Jelinek <jakub@redhat.com>
1642 * parser.c: Include "gomp-constants.h".
1643 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1644 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1645 Use OMP_CLAUSE_SET_MAP_KIND.
1646 (cp_parser_omp_construct, cp_parser_pragma): Handle
1647 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
1648 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
1649 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
1650 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
1651 "create", "delete", "deviceptr", "host", "num_gangs",
1652 "num_workers", "present", "present_or_copy", "pcopy",
1653 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1654 "present_or_create", "pcreate", "vector_length", "wait".
1655 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
1656 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1657 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1658 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1659 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
1660 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
1661 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
1662 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
1663 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
1664 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
1665 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
1666 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
1667 (cp_parser_oacc_parallel, cp_parser_oacc_update)
1668 (cp_parser_oacc_wait): New functions.
1669 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
1670 (finish_oacc_parallel): New prototypes.
1671 * semantics.c: Include "gomp-constants.h".
1672 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1673 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1674 OMP_CLAUSE_SET_MAP_KIND.
1675 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
1676 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
1677 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1678 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
1681 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
1684 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
1685 self-initialization.
1687 2015-01-13 Jason Merrill <jason@redhat.com>
1691 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1692 pointer expressions.
1693 (cxx_eval_increment_expression): Likewise.
1696 * pt.c (coerce_template_parameter_pack): Return NULL for a
1697 zero-length fixed parameter pack with a pack expansion arg.
1700 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
1702 2015-01-12 Jason Merrill <jason@redhat.com>
1705 * constexpr.c (cxx_eval_call_expression): A call to a void
1706 function doesn't need to return a value.
1708 2015-01-09 Michael Collison <michael.collison@linaro.org>
1710 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1711 input.h, alias.h, symtab.h, options.h, fold-const.h,
1712 wide-int.h, and inchash.h due to flattening of tree.h.
1714 * constexpr.c: Ditto.
1715 * cp-array-notation.c: Ditto.
1716 * cp-gimplify.c: Ditto.
1718 * cp-objcp-common.c: Ditto.
1731 * name-lookup.c: Ditto.
1732 * optimize.c: Ditto.
1739 * semantics.c: Ditto.
1744 2015-01-08 Jason Merrill <jason@redhat.com>
1746 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
1747 * decl.c (compute_array_index_type): Likewise.
1748 * init.c (build_vec_init): Likewise.
1749 * typeck.c (cp_build_binary_op): Likewise.
1751 2015-01-08 Jason Merrill <jason@redhat.com>
1753 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
1754 whether an initializer-list is too big for a VLA.
1755 (throw_bad_array_length): Remove.
1756 * cp-tree.h: Remove prototype.
1758 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
1761 * decl.c (grokfndecl): Add bool parameter.
1762 (grokdeclarator): Adjust calls.
1763 (start_decl): Don't set DECL_DELETED_FN here.
1765 2015-01-06 Jason Merrill <jason@redhat.com>
1767 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
1771 * pt.c (type_dependent_expression_p): Handle variable templates.
1772 * constexpr.c (potential_constant_expression_1): Use it.
1775 * semantics.c (finish_offsetof): Handle templates here.
1776 * parser.c (cp_parser_builtin_offsetof): Not here.
1779 * semantics.c (process_outer_var_ref): Diagnose lambda in local
1782 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1785 * class.c (check_field_decls): Make copy assignment operators
1786 complex only in c++98 mode.
1788 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1791 * class.c (check_for_override): Warn when a virtual function is an
1792 override not marked override.
1794 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
1796 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
1798 (get_basefndecls): Adjust.
1800 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1802 Update copyright years.
1804 2015-01-05 Marek Polacek <polacek@redhat.com>
1807 * typeck.c (cp_build_array_ref): Pass loc down to
1808 warn_array_subscript_with_type_char.
1811 Copyright (C) 2015 Free Software Foundation, Inc.
1813 Copying and distribution of this file, with or without modification,
1814 are permitted in any medium without royalty provided the copyright
1815 notice and this notice are preserved.