1 2016-12-21 Release Manager
5 2016-12-14 Nathan Sidwell <nathan@acm.org>
8 * pt.c (type_unification_real): Check tsubst arg doesn't have
9 remaining template parms before converting it.
11 2016-12-08 Nathan Sidwell <nathan@acm.org>
14 * constexpr.c (extract_string_elt): New. Broken out of ...
15 (cxx_eval_array_reference): ... here. Call it.
16 (cxx_eval_store_expression): Convert init by STRING_CST into
17 CONSTRUCTOR, if needed.
19 2016-12-07 Jakub Jelinek <jakub@redhat.com>
21 Backported from mainline
22 2016-12-02 Jakub Jelinek <jakub@redhat.com>
25 * pt.c (tsubst_init): Don't call build_value_init if decl's type
28 2016-11-28 Jakub Jelinek <jakub@redhat.com>
29 Jason Merrill <jason@redhat.com>
32 * decl.c (finish_enum_value_list): Call fixup_type_variants on
33 current_class_type after
34 insert_late_enum_def_into_classtype_sorted_fields.
36 2016-11-28 Jakub Jelinek <jakub@redhat.com>
39 * typeck.c (maybe_warn_about_returning_address_of_local): Optimize
40 whats_returned through fold_for_warn.
42 2016-11-23 Jakub Jelinek <jakub@redhat.com>
45 * cp-gimplify.c (cp_gimplify_tree) <case VEC_INIT_EXPR>: Pass
46 false as handle_invisiref_parm_p to cp_genericize_tree.
47 (struct cp_genericize_data): Add handle_invisiref_parm_p field.
48 (cp_genericize_r): Don't wrap is_invisiref_parm into references
49 if !wtd->handle_invisiref_parm_p.
50 (cp_genericize_tree): Add handle_invisiref_parm_p argument,
51 set wtd.handle_invisiref_parm_p to it.
52 (cp_genericize): Pass true as handle_invisiref_parm_p to
53 cp_genericize_tree. Formatting fix.
55 2016-11-18 Jakub Jelinek <jakub@redhat.com>
58 * mangle.c (mangle_tls_init_fn, mangle_tls_wrapper_fn): Call
61 2016-10-31 Jakub Jelinek <jakub@redhat.com>
64 * parser.c (cp_parser_postfix_expression): Replace return statement in
65 the first switch with setting postfix_expression to the return
66 expression and break;.
68 2016-09-28 Jakub Jelinek <jakub@redhat.com>
71 * constexpr.c (enum constexpr_switch_state): New.
72 (struct constexpr_ctx): Add css_state field.
73 (label_matches): Add CTX and STMT arguments, remove I and
74 DEFAULT_LABEL. For CASE_LABEL_EXPR assert ctx->css_state != NULL,
75 handle default labels according to css_state.
76 (cxx_eval_statement_list): Remove statement skipping, label_matches
77 and default_label handling code.
78 (cxx_eval_loop_expr): Exit after first iteration even if
79 switches (jump_target).
80 (cxx_eval_switch_expr): Set up css_state field in ctx, if default
81 label has been seen in the body, but no cases matched, evaluate
83 (cxx_eval_constant_expression): Handle stmt skipping and label_matches
84 here. Handle PREDICT_EXPR. For MODIFY_EXPR or INIT_EXPR, assert
85 statement is not skipped. For COND_EXPR during skipping, don't
86 evaluate condition, just the then block and if still skipping at the
87 end also the else block.
88 (cxx_eval_outermost_constant_expr): Adjust constexpr_ctx initializer.
89 (is_sub_constant_expr): Likewise.
91 2016-09-27 Jakub Jelinek <jakub@redhat.com>
94 * cp-gimplify.c (cp_ubsan_maybe_instrument_return): Instrument also
95 functions that have just a STATEMENT_LIST instead of BIND_EXPR, or
96 BIND_EXPR with some statement rather than STATEMENT_LIST as body.
98 2016-09-20 Jakub Jelinek <jakub@redhat.com>
101 * parser.c (cp_parser_template_declaration_after_parameter): For 2
102 argument operator"" template set ok to false for
103 parm == error_mark_node.
106 * parser.c (cp_parser_std_attribute_list): Reject ... without
109 2016-09-16 Jakub Jelinek <jakub@redhat.com>
112 * error.c (dump_simple_decl): Only check DECL_DECLARED_CONCEPT_P
113 if DECL_LANG_SPECIFIC is non-NULL. Fix up formatting.
116 * class.c (check_bases): Set CLASSTYPE_HAS_MUTABLE if any
117 TYPE_HAS_MUTABLE_P for any bases.
119 2016-12-06 Jason Merrill <jason@redhat.com>
122 * decl2.c (maybe_instantiate_decl): Split out from mark_used.
123 (decl_constant_var_p): Use it instead.
126 * pt.c (resolve_typename_type): Try to avoid calling
127 currently_open_class.
130 * constexpr.c (cxx_eval_constant_expression): Use cp_fold_convert.
133 * pt.c (do_type_instantiation): Don't mess with non-user-provided
136 2016-11-18 Jason Merrill <jason@redhat.com>
138 PR c++/67631 - list-init and explicit conversions
139 * semantics.c (finish_compound_literal): Call digest_init_flags.
140 * typeck2.c (digest_init_flags): Add complain parm.
141 (store_init_value): Pass it.
143 2016-11-17 Jason Merrill <jason@redhat.com>
146 * parser.c (cp_parser_fold_expression): Check TREE_NO_WARNING.
148 2016-11-05 Martin Sebor <msebor@redhat.com>
151 * class.c (diagnose_flexarrays): Avoid rejecting an invalid flexible
152 array member with a hard error when it is followed by another member
153 in a different struct, and instead issue just a pedantic warning.
155 2016-10-14 Martin Sebor <msebor@redhat.com>
158 * class.c (struct flexmems_t): Add members.
159 (find_flexarrays): Add arguments. Correct handling of anonymous
161 (diagnose_flexarrays): Adjust to issue warnings in addition to errors.
162 (check_flexarrays): Add argument.
163 (diagnose_invalid_flexarray): New functions.
165 2016-10-04 Martin Sebor <msebor@redhat.com>
168 * init.c (warn_placement_new_too_small): Avoid assuming an array type
171 2016-09-22 Paolo Carlini <paolo.carlini@oracle.com>
174 * class.c (build_base_path): Allow for lookup_base returning
177 2016-09-16 Jakub Jelinek <jakub@redhat.com>
179 Backported from mainline
180 2016-09-13 Jakub Jelinek <jakub@redhat.com>
183 * constexpr.c (cxx_fold_pointer_plus_expression): New function.
184 (cxx_eval_binary_expression): Use it for POINTER_PLUS_EXPR.
185 (cxx_eval_pointer_plus_expression): Remove.
186 (cxx_eval_constant_expression) <case POINTER_PLUS_EXPR>: Don't
187 call cxx_eval_pointer_plus_expression.
189 2016-09-14 Nathan Sidwell <nathan@acm.org>
192 * constexpr.c (get_fundef_copy): Use the original function for
193 non-recursive evaluations.
194 (save_fundef_copy): Always expect a slot to be available.
196 2016-08-22 Release Manager
198 * GCC 6.2.0 released.
200 2016-08-13 Jason Merrill <jason@redhat.com>
203 * constexpr.c (cxx_eval_array_reference): Handle looking for the
204 value of an element we're currently modifying.
206 2016-08-11 Jakub Jelinek <jakub@redhat.com>
209 * constexpr.c (label_matches): Handle case range expressions.
211 2016-08-11 Jason Merrill <jason@redhat.com>
214 * logic.cc (non_atomic_constraint_p): Handle EXPR_PACK_EXPANSION.
216 2016-08-08 Paolo Carlini <paolo.carlini@oracle.com>
219 * lambda.c (add_capture): Check lambda_capture_field_type return
220 value for error_mark_node.
222 2016-08-05 Nathan Sidwell <nathan@acm.org>
225 * pt.c (unify): TRAIT_EXPR is an expr.
227 2016-08-04 Jason Merrill <jason@redhat.com>
230 * pt.c (tsubst_pack_expansion): Pull a single pack expansion out
233 2016-07-29 Jason Merrill <jason@redhat.com>
236 * init.c (expand_aggr_init_1): Only handle value-init of bases.
237 * constexpr.c (build_data_member_initialization): Handle multiple
238 initializers for the same field.
240 2016-07-25 Jason Merrill <jason@redhat.com>
243 * call.c (convert_like_real): Use lvalue_kind.
246 * pt.c (coerce_template_parameter_pack): Fix logic for
249 2016-07-23 Jason Merrill <jason@redhat.com>
253 * init.c (expand_aggr_init_1): Handle list-initialization from {}.
256 * class.c (walk_subobject_offsets): Handle 0-length array.
259 * pt.c (tsubst): Also substitute into the template of a
260 BOUND_TEMPLATE_TEMPLATE_PARM.
263 * pt.c (lookup_template_class_1): Handle getting template from tsubst.
266 * decl.c (reshape_init_r): Check complain for missing braces warning.
268 2016-07-22 Jason Merrill <jason@redhat.com>
272 * pt.c (tsubst_baselink): Call
273 adjust_result_of_qualified_name_lookup for unqualified
276 2016-07-21 Jason Merrill <jason@redhat.com>
279 * semantics.c (apply_deduced_return_type): Call
280 complete_type_or_else before building the new RESULT_DECL.
283 * pt.c (instantiate_decl): Fix pattern_defined for namespace scope
287 * call.c (unsafe_copy_elision_p): It's OK to elide when
288 initializing an unknown object.
290 2016-07-21 Jakub Jelinek <jakub@redhat.com>
293 * constexpr.c (potential_constant_expression_1) <case GOTO_EXPR>:
294 Replace assert with test, return false if the goto isn't break
295 or continue. Formatting fix.
297 2016-07-21 Jakub Jelinek <jakub@redhat.com>
300 * cp-gimplify.c (cp_genericize): For nested cp_genericize calls
301 save/restore bc_label array.
303 2016-07-21 Patrick Palka <ppalka@gcc.gnu.org>
307 * cp-tree.h (REF_PARENTHESIZED_P): Make this flag apply to
309 * pt.c (tsubst_qualified_id): If REF_PARENTHESIZED_P is set
310 on the qualified_id then propagate it to the resulting
312 (do_auto_deduction): Check REF_PARENTHESIZED_P on SCOPE_REFs
314 * semantics.c (force_paren_expr): If given a SCOPE_REF, just set
315 its REF_PARENTHESIZED_P flag.
317 2016-07-21 Andrew Sutton <andrew.n.sutton@gmail.com>
318 Jason Merrill <jason@redhat.com>
320 Improving concepts performance and diagnostics.
324 * cp-tree.def (CHECK_CONSTR): New.
325 * cp-tree.h (CHECK_CONSTR_CONCEPT): New.
326 (CHECK_CONSTR_ARGS): New.
327 * constraint.cc (make_predicate_constraint): Remove in favor of
328 normalize_expression.
329 (resolve_constraint_check): Actually return error_mark_node when
331 (resolve_variable_concept_check): Perform coercion as if processing
332 a template. Also return errors on resolution failure.
333 (lift_*): Remove all of these functions. Don't unnecessarily inline
335 (learn_*): Add facilities to memoize implications for subsumption
336 during normalization.
337 (expanding_concept): New.
338 (expand_concept): New. Return the inlined and normalized definition
339 of a concept when needed.
340 (transform_*, xform_*): Rename to normalize_* to better reflect the
341 responsibility of those functions.
342 (normalize_template_id_expression): Check for non-boolean operands
343 when possible. Generate check constraints instead of normal variable
345 (normalize_call_expression): Report errors when resolution fails.
346 (check_for_logical_overloads): Rewrite this check to more accurately
348 (normalize_atom): Check for overloaded calls and invalid types before
349 determining if the expression refers to a concept.
350 (build_constraints): Don't cache normalized constraints or decomposed
352 (finish_shorthand_constraint): Return a normalized expression instead
353 of a predicate constraint.
354 (finish_template_introduction): Same.
355 (placeholder_extract_concept_and_args): Rewrite this since we only
356 ever get check constraints here.
357 (equivalent_placeholder_constraints): Rewrite in terms of check
358 constraints, and handle error_mark_nodes correctly.
359 (tsubst_check_constraint, tsubst_expr_constr, tsubst_type_constr)
360 (tsubst_implicit_conversion_constr)
361 (tsubst_argument_deduction_constr, tsubst_exception_constr)
362 (tsubst_parameterized_constraint, tsubst_constraint): New.
363 (tsbust_conjunection): Replace with tsubst_logical_operator and
364 actually generate the right kind of constraint.
365 (tsubst_requirement_body): Reverse the order of substituted arguments
366 so that they appear in the order written (helps diagnostics).
367 (satisfy_check_constraint): New.
368 (satisfy_conjunction): Simplify.
369 (satisfy_disjunction): Same.
370 (satisfy_constraint_1): Handle check constraints.
371 (eval_constr): New (private) global state.
372 (evaluating_constraints_sentinel): New. Manages eval_constr.
373 (satisfy_constraint): Add timing variables.
374 (satisfy_associated_constraints): Add hooks for memoization.
375 (evaluate_function_concept): Build a check constraint instead of
376 normalizing its definition.
377 (evaluate_variable_concept): Same.
378 (evaluate_constraint_expression): Normalize, but in the current
379 declaration processing context.
380 (evaluating_constraints_p): New.
381 (elide_constraint_failure_p): Actually emit constraint_thresh errors.
382 (diagnose_*): Remove artificial indentation. Add a new parameter to
383 each that tracks the current (complete) constraint prior to any
385 (diagnose_expression): Removed.
386 (diagnose_call_expression): Same.
387 (diagnose_template_id): Same.
388 (diagnose_template_id): New.
389 (diagnose_logical_constraint): New.
390 (diagnose_expression_constraint): Show the original expression.
391 (diagnose_type_constraint): Show the original type.
392 (diagnose_implicit_conversion_constraint): Be specific about
393 failures, don't re-diagnose a known-to-be-failed substitutions,
394 and manage elisions properly.
395 (diagnose_argument_deduction_constraint): Same.
396 (diagnose_exception_constraint): Same.
397 (diagnose_parameterized_constraint): Same.
398 (constraint_p): Allow EXPR_PACK_EXPANSION.
399 * logic.cc (next_by_distance): Removed. No longer used.
400 (any_p): Renamed from any_of.
401 (term_entry, term_hasher): New.
402 (term_list): Rewrite to include a hash table for quick lookup.
403 Also, make less stateful.
404 (proof_state): Extend to allow goals to be discharged once
406 (non_atomic_constraint_p): New.
407 (any_non_atomic_constraints_p): New.
408 (...rest...): Previous implementation completely replaced with an
409 iterative algorithm that opportunistically prunes the search space
410 before committing to using more memory.
411 * parser.c: (cp_parser_type_parameter): Normalize constraints.
412 (cp_parser_explicit_template_declaration): Same.
413 * pt.c: (finish_template_variable): Be less redundant with this error
415 (template_args_equal): No longer static.
416 (tsubst_decl): Don't try to find specializations of variables that
417 have already been instantiated.
418 (build_non_dependent_expr): Avoid infinite recursion during concept
420 (make_constrained_auto): Normalize constraints.
421 (do_auto_deduction): When doing auto deduction from a
422 partial-concept-id, be sure to include the explicit args checking
424 (constraint_sat_*): New. Memoize satisfied constraints.
425 (concept_spec_*): New. Memoize expressions associated with a concept
427 (constraint_memos, concept_memos): New.
428 (lookup_constraint_satisfaction, memoize_constraint_satisfaction): New.
429 (lookup_concept_satisfaction, memoize_concept_satisfaction): New.
430 (get_concept_expansion, save_concept_expansion): New.
431 (hash_subsumption_args): New.
432 (comp_subsumption_args): New.
433 (subsumption_*): New. Memoize parts of the subsumption relation.
434 (lookup_subsumption_result, save_subsumption_result): New.
435 (init_constraint_processing): Initialize memo tables.
436 (get_constraints): Shortcut if !flag_concepts.
437 * decl.c (grokfndecl): Normalize constraints.
438 * error.c (dump_simple_decl): Print "concept" when appropriate.
439 (dump_function_decl): Same.
440 (dump_template_decl): Don't write requirements when we're not
442 (dump_expr): Handle fold expressions.
443 * cxx-pretty-print.c (cxx_pretty_printer::expression): Handle
445 (get_fold_operator): New.
446 (pp_cxx_unary_left_fold_expression): New.
447 (pp_cxx_unary_right_fold_expression): New.
448 (pp_cxx_binary_fold_expression): New.
449 (pp_cxx_check_constraint): New.
450 (pp_cxx_*_constraint): Rewrite the grammar of internal constraints
451 to make them easier to read when debugging.
452 * search.c (accessible_p): Don't shortcut when evaluating constraints.
453 * tree.c (cp_tree_equal): Handle CHECK_CONSTR.
455 2016-07-21 Jason Merrill <jason@redhat.com>
458 * parser.c (cp_parser_lambda_expression): Unset OK if there was an
459 error parsing the lambda-declarator.
462 * constexpr.c (cxx_eval_binary_expression): Handle comparison
463 between lowered and unlowered PTRMEM_CST.
466 * constexpr.c (cxx_eval_call_expression): Fail quietly when cgraph
467 threw away DECL_SAVED_TREE.
471 * call.c (add_template_conv_candidate): Disable if there are
475 * call.c (convert_like_real): Mask complain.
478 * typeck2.c (cxx_incomplete_type_diagnostic): Handle DECLTYPE_TYPE.
481 * pt.c (tsubst_attributes): Fix loop logic.
485 * parser.c (cp_parser_range_for): Modify IDENTIFIER_BINDING directly.
486 (cp_parser_simple_declaration): Diagnose type definition in
487 for-range-declaration.
490 * operators.def: Add *_FOLD_EXPR.
491 * cp-tree.h (FOLD_EXPR_P): Parenthesize.
492 * mangle.c (write_expression): Handle fold-expressions.
493 * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold)
494 (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle
495 partial instantiation.
498 * mangle.c (write_expression): Handle sizeof... an argument pack.
501 * pt.c (push_tinst_level_loc): Set at_eof before fatal_error.
504 * init.c (constant_value_1): Don't instantiated DECL_INITIAL of
505 artificial variables.
507 * lambda.c (maybe_add_lambda_conv_op): Fix null object argument.
509 2016-07-20 Jakub Jelinek <jakub@redhat.com>
512 * parser.c (cp_parser_save_member_function_body): Consume
513 __transaction_relaxed or __transaction_atomic with optional
514 attribute. Only skip catch with block if try keyword is seen.
516 2016-07-19 Jakub Jelinek <jakub@redhat.com>
518 Backported from mainline
519 2016-07-18 Jakub Jelinek <jakub@redhat.com>
522 * call.c (build_op_call_1): Use convert_like_with_context only
523 if cand->fn is a decl.
526 * constexpr.c (cxx_eval_constant_expression) <case REALPART_EXPR>:
527 For lval don't use cxx_eval_unary_expression and instead recurse
528 and if needed rebuild the reference.
531 * cp-gimplify.c (cp_gimplify_expr) <case VEC_INIT_EXPR>: Recursively
532 fold *expr_p before genericizing it.
535 * typeck.c (build_x_conditional_expr): Revert the 2012-10-25 change.
537 2016-07-07 Jakub Jelinek <jakub@redhat.com>
538 Kai Tietz <ktietz70@googlemail.com>
542 * cp-gimplify.c (cp_genericize_r): For DECL_EXPR for non-static
543 artificial vars, genericize their initializers.
545 2016-06-21 Jakub Jelinek <jakub@redhat.com>
547 Backported from mainline
548 2016-06-17 Jakub Jelinek <jakub@redhat.com>
550 * semantics.c (handle_omp_array_sections_1): Don't ICE when
551 processing_template_decl when checking for bitfields and unions.
552 Look through REFERENCE_REF_P as base of COMPONENT_REF.
553 (finish_omp_clauses): Look through REFERENCE_REF_P even for
554 array sections with COMPONENT_REF bases.
556 2016-06-16 Jakub Jelinek <jakub@redhat.com>
558 * parser.c (cp_parser_omp_var_list_no_open): Call
559 convert_from_reference before cp_parser_postfix_dot_deref_expression.
560 * semantics.c (finish_omp_clauses): Don't ICE when
561 processing_template_decl when checking for bitfields and unions.
562 Look through REFERENCE_REF_P as base of COMPONENT_REF.
564 2016-06-14 Jakub Jelinek <jakub@redhat.com>
567 * decl.c (duplicate_decls): For DECL_INITIALIZED_P non-external
568 olddecl vars, preserve their TREE_READONLY bit.
570 2016-06-14 Paolo Carlini <paolo.carlini@oracle.com>
573 * decl.c (cp_finish_decl): Check do_auto_deduction return value
574 and return immediately in case of erroneous code.
576 2016-06-14 Jakub Jelinek <jakub@redhat.com>
579 * decl.c (complete_vars): Handle gracefully type == error_mark_node.
581 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
584 Backport from trunk r237290:
585 * parser.c (cp_parser_omp_var_list_no_open) <OMP_CLAUSE__CACHE_>:
588 2016-06-08 Jakub Jelinek <jakub@redhat.com>
591 * pt.c (tsubst_copy): Only set TREE_USED on DECLs.
593 2016-06-06 Jakub Jelinek <jakub@redhat.com>
594 Patrick Palka <ppalka@gcc.gnu.org>
599 * cp-gimplify.c (cp_fold_r): Set *walk_subtrees = 0 and return NULL
600 right after cp_fold call if cp_fold has returned the same stmt
601 already in some earlier cp_fold_r call.
602 (cp_fold_function): Add pset automatic variable, pass its address
605 2016-06-02 Jakub Jelinek <jakub@redhat.com>
608 * cp-gimplify.c (cp_fold): For INDIRECT_REF, if the folded expression
609 is INDIRECT_REF or MEM_REF, copy over TREE_READONLY, TREE_SIDE_EFFECTS
610 and TREE_THIS_VOLATILE flags. For ARRAY_REF and ARRAY_RANGE_REF, copy
611 over TREE_READONLY, TREE_SIDE_EFFECTS and TREE_THIS_VOLATILE flags
612 to the newly built tree.
614 2016-06-02 Paolo Carlini <paolo.carlini@oracle.com>
617 * method.c (forward_parm): Use cp_build_reference_type.
619 2016-05-31 Jason Merrill <jason@redhat.com>
622 * decl2.c (c_parse_final_cleanups): Don't call fini_constexpr.
625 * pt.c (check_explicit_specialization): Give better diagnostic about
626 specializing a hidden friend.
631 * pt.c (instantiate_template_1): Don't put the partial
632 specialization in DECL_TI_TEMPLATE.
633 (partial_specialization_p, impartial_args): Remove.
634 (regenerate_decl_from_template): Add args parm.
635 (instantiate_decl): Look up the partial specialization again.
639 * cp-tree.h (enum tag_types): Add scope_type.
640 * parser.c (cp_parser_class_name): Use scope_type.
641 (prefer_type_arg): Handle scope_type.
642 (cp_parser_lookup_name): Use prefer_type_arg.
643 * name-lookup.c (lookup_qualified_name): Change bool is_type_p to
644 int prefer_type, use lookup_flags.
645 * name-lookup.h: Adjust.
648 * cp-gimplify.c (cp_fold_maybe_rvalue): Loop in case cp_fold
650 (cp_fold) [INDIRECT_REF]: Call maybe_undo_parenthesized_ref.
653 * pt.c (tsubst_copy): Just return a local variable from
654 non-template context. Don't call rest_of_decl_compilation for
655 duplicated static locals.
656 (tsubst_decl): Set DECL_CONTEXT of local static from another
659 2016-05-31 Martin Sebor <msebor@redhat.com>
662 * init.c (warn_placement_new_too_small): Handle placement new arguments
663 that are elements of arrays more carefully. Remove a pointless loop.
665 2016-05-30 Jakub Jelinek <jakub@redhat.com>
668 * parser.c (cp_parser_omp_for): Don't disallow nowait clause
669 when combined with target construct.
670 (cp_parser_omp_parallel): Pass cclauses == NULL as last argument
671 to cp_parser_omp_all_clauses.
673 2016-05-29 Paolo Carlini <paolo.carlini@oracle.com>
676 * lambda.c (maybe_add_lambda_conv_op): Early return also when
677 LAMBDA_EXPR_DEFAULT_CAPTURE_MODE != CPLD_NONE.
679 2016-05-24 Martin Sebor <msebor@redhat.com>
682 * decl.c (layout_var_decl, grokdeclarator): Use
683 complete_or_array_type_p.
684 * pt.c (instantiate_class_template_1): Try to complete the element
685 type of a flexible array member.
686 (can_complete_type_without_circularity): Handle arrays of unknown bound.
687 * typeck.c (complete_type): Also complete the type of the elements of
688 arrays with an unspecified bound.
690 2016-05-24 Paolo Carlini <paolo.carlini@oracle.com>
693 * typeck2.c (check_narrowing): Check pedwarn return value.
695 2016-05-24 Jakub Jelinek <jakub@redhat.com>
698 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>:
699 For OMP_CLAUSE_LINEAR_REF don't require type to be
702 2016-05-23 Jason Merrill <jason@redhat.com>
705 * constexpr.c (cxx_eval_call_expression): Check for
706 fun == current_function_decl again.
708 2016-05-19 David Malcolm <dmalcolm@redhat.com>
710 Backport from trunk r236483.
712 * parser.c (cp_parser_operator): For array new/delete, check that
713 cp_parser_require returned a non-NULL token before dereferencing
716 2016-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
718 Backport from mainline
719 2016-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
721 * decl.c (finish_enum_value_list): Use the specified mode.
723 2016-05-18 Paolo Carlini <paolo.carlini@oracle.com>
726 * call.c (convert_like_real): Check that we are actually converting
729 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
732 * parser.c (cp_parser_oacc_loop): Don't augment mask with
733 OACC_LOOP_CLAUSE_MASK.
734 (cp_parser_oacc_kernels_parallel): Update call to
735 c_oacc_split_loop_clauses.
737 2016-04-28 Paolo Carlini <paolo.carlini@oracle.com>
740 * semantics.c (process_outer_var_ref): Unconditionally return
741 error_mark_node when mark_used returns false.
743 2016-04-27 Release Manager
745 * GCC 6.1.0 released.
747 2016-04-26 Jakub Jelinek <jakub@redhat.com>
750 * pt.c (build_non_dependent_expr): Temporarily disable flag_checking
753 2016-04-22 Jason Merrill <jason@redhat.com>
757 * constexpr.c (potential_constant_expression_1): Handle LOOP_EXPR
761 * name-lookup.c (qualified_lookup_using_namespace): Look through
764 2016-04-19 Jason Merrill <jason@redhat.com>
767 * expr.c (mark_exp_read): Handle NON_DEPENDENT_EXPR.
768 * pt.c (make_pack_expansion): Call mark_exp_read.
769 * semantics.c (finish_id_expression): Call mark_type_use in
772 2016-04-18 Jason Merrill <jason@redhat.com>
776 * class.c (type_maybe_constexpr_default_constructor): New.
777 (type_has_constexpr_default_constructor): Revert.
780 * pt.c (tsubst_baselink): Give the new TEMPLATE_ID_EXPR
781 unknown_type_node, too.
783 2016-04-15 Jason Merrill <jason@redhat.com>
786 * constexpr.c (get_fundef_copy): Handle null *slot.
788 2016-04-15 Jason Merrill <jason@redhat.com>
789 Nathan Sidwell <nathan@acm.org>
792 * constexpr.c (constexpr_call_table): Preserve in GC.
793 (struct fundef_copy, struct fundef_copies_table_t): Delete.
794 (fundef_copies_table): Preserve in GC. Change to pointer to
796 (maybe_initialize_fundef_copies_table): Adjust.
797 (get_fundef_copy): Return a TREE_LIST. Use non-inserting search.
798 (save_fundef_copy): Adjust for a TREE_LIST.
799 (cxx_eval_call_expression): Adjust for a fundef_copy TREE_LIST.
800 (fini_constexpr): New.
801 * cp-tree.h (fini_constexpr): Declare.
802 * decl2.c (c_parse_final_cleanups): Call fini_constexpr.
804 2016-04-15 Jakub Jelinek <jakub@redhat.com>
807 * parser.c (cp_parser_pragma): Add IF_P argument, pass it down
809 (cp_parser_declaration_seq_opt, cp_parser_member_specification_opt,
810 cp_parser_objc_interstitial_code, cp_parser_omp_declare_simd,
811 cp_parser_oacc_routine): Adjust cp_parser_pragma callers.
812 (cp_parser_statement): Likewise. Adjust cp_parser_cilk_for caller.
813 (cp_parser_omp_structured_block): Add IF_P argument, pass it down to
815 (cp_parser_oacc_data, cp_parser_oacc_host_data, cp_parser_oacc_loop,
816 cp_parser_oacc_kernels_parallel, cp_parser_omp_critical,
817 cp_parser_omp_simd, cp_parser_omp_for, cp_parser_omp_master,
818 cp_parser_omp_ordered, cp_parser_omp_parallel, cp_parser_omp_single,
819 cp_parser_omp_task, cp_parser_omp_taskgroup, cp_parser_omp_distribute,
820 cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target,
821 cp_parser_omp_taskloop, cp_parser_omp_construct,
822 cp_parser_cilk_grainsize, cp_parser_cilk_simd, cp_parser_cilk_for):
823 Add IF_P argument, pass it down where needed.
824 (cp_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
825 (cp_parser_omp_sections_scope): Adjust cp_parser_omp_structured_block
828 2016-04-14 Jason Merrill <jason@redhat.com>
831 * decl.c (cxx_maybe_build_cleanup): Handle non-decls.
832 * typeck2.c (split_nonconstant_init_1): Use it.
835 * class.c (type_has_constexpr_default_constructor): Return true
836 for an implicitly declared constructor.
839 * parser.c (cp_parser_init_declarator): Add auto_result parm.
840 (cp_parser_simple_declaration): Pass it.
841 (strip_declarator_types): New.
844 * pt.c (value_dependent_expression_p) [VAR_DECL]: A type-dependent
845 initializer also makes the variable value-dependent.
848 * constexpr.c (cxx_eval_store_expression): Also copy
849 CONSTRUCTOR_NO_IMPLICIT_ZERO.
851 2016-04-14 Martin Sebor <msebor@redhat.com>
856 * cp-tree.h, decl.c, init.c, typeck2.c: Revert.
858 2016-04-14 Jason Merrill <jason@redhat.com>
860 * call.c, decl.c, error.c, cp-tree.h, decl.c: Revert empty
861 parameter ABI change.
863 2016-04-13 Martin Sebor <msebor@redhat.com>
868 * cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
870 * decl.c (check_initializer, cp_finish_decl): Call them.
871 (reshape_init_r): Reject incompletely braced intializer-lists
873 * init.c (throw_bad_array_length, build_vla_check)
874 (build_vla_size_check, build_vla_init_check): Define new functions.
875 * typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
877 (store_init_value): Same.
879 2016-04-13 Jason Merrill <jason@redhat.com>
881 Warn about empty parameter ABI with -Wabi=9.
882 * call.c (empty_class_msg, mark_for_abi_warning)
883 (warn_empty_class_abi): New.
884 (build_call_a): Use them.
885 * decl.c (store_parm_decls): Use mark_for_abi_warning.
886 * error.c (pp_format_to_string): New.
888 Pass empty class parameters like C.
889 * call.c (pass_as_empty_struct, empty_class_arg): New.
890 (type_passed_as, build_x_va_arg): Use pass_as_empty_struct.
891 (build_call_a): Use empty_class_arg.
892 * cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New.
893 * decl.c (cxx_init_decl_processing): Create empty_struct_type.
895 2016-04-13 Jason Merrill <jason@redhat.com>
898 * decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE.
900 2016-04-13 Paolo Carlini <paolo.carlini@oracle.com>
903 * pt.c (resolve_typename_type): Fix typos in infinite recursion
906 2016-04-13 Jason Merrill <jason@redhat.com>
909 * pt.c (instantiation_dependent_uneval_expression_p): Split out
910 from instantiation_dependent_expression_p.
911 (value_dependent_expression_p): Use it for unevaluated operands.
912 (instantiation_dependent_r): Don't check value-dependence.
913 (instantiation_dependent_expression_p): Check
914 value-dependence of the expression as a whole.
915 * cp-tree.h: Declare instantiation_dependent_uneval_expression_p.
916 * semantics.c (finish_decltype_type): Use it.
918 * constexpr.c (potential_nondependent_constant_expression): New.
919 (potential_nondependent_static_init_expression): New.
920 (maybe_constant_value_1, fold_non_dependent_expr)
921 (maybe_constant_init): Use them.
922 * pt.c (instantiate_non_dependent_expr_sfinae)
923 (instantiate_non_dependent_or_null, convert_nontype_argument): Use
925 * cp-tree.h: Declare them.
927 2016-04-13 Jakub Jelinek <jakub@redhat.com>
930 * decl.c (pop_labels_1): Removed.
931 (note_label, sort_labels): New functions.
932 (pop_labels): During named_labels traversal, just push the slot
933 pointers into a vector, then qsort it by DECL_UID and only then
934 call pop_label and chain it into BLOCK_VARS.
936 2016-04-13 Jason Merrill <jason@redhat.com>
939 * cp-gimplify.c (cp_genericize_r): Expand PTRMEM_CST here.
940 (cp_gimplify_expr): Not here.
942 2016-04-12 Patrick Palka <ppalka@gcc.gnu.org>
945 * tree.c (lvalue_kind) [NON_DEPENDENT_EXPR]: Unconditionally
947 * typeck.c (build_x_conditional_expr): Unconditionally remember
948 that the result is an lvalue or xvalue.
950 2016-04-12 Jason Merrill <jason@redhat.com>
952 * class.c (is_really_empty_class): A zero-length array is empty.
953 An unnamed bit-field doesn't make a class non-empty.
955 2016-04-12 Paolo Carlini <paolo.carlini@oracle.com>
958 * parser.c (cp_parser_cache_defarg): When file ends in default
959 argument simply return error_mark_node.
961 2016-04-12 Nathan Sidwell <nathan@acm.org>
964 * constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE
967 2016-04-11 Jason Merrill <jason@redhat.com>
969 * mangle.c (decl_is_template_id): The template itself counts as a
972 2016-04-08 Patrick Palka <ppalka@gcc.gnu.org>
976 * constexpr.c (cxx_eval_outermost_expression): Call unshare_expr
977 on the result if it's not a CONSTRUCTOR.
979 2016-04-07 Patrick Palka <ppalka@gcc.gnu.org>
982 * constexpr.c (find_constructor): New function.
983 (unshare_constructor): New function.
984 (cxx_eval_call_expression): Use unshare_constructor instead of
986 (find_array_ctor_elt): Likewise.
987 (cxx_eval_vec_init_1): Likewise.
988 (cxx_eval_store_expression): Likewise.
989 (cxx_eval_constant_expression): Likewise.
991 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
994 * cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid
995 potentially generating a future -Wparentheses warning in its
998 2016-04-06 Jason Merrill <jason@redhat.com>
1000 * class.c (check_abi_tags): Fix function template handling.
1002 2016-04-05 Nathan Sidwell <nathan@acm.org>
1005 * class.c (fixup_may_alias): New.
1006 (fixup_attribute_variants): Call it.
1008 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
1011 * constexpr.c (struct fundef_copy): New struct.
1012 (struct fundef_copies_table_t): New struct.
1013 (fundef_copies_table): New static variable.
1014 (maybe_initialize_fundef_copies_table): New static function.
1015 (get_fundef_copy): New static function.
1016 (save_fundef_copy): New static function.
1017 (cxx_eval_call_expression): Use get_fundef_copy, and
1019 (constexpr_call_table): Add "deletable" GTY marker.
1021 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
1024 * cp-tree.h (class cache_map): Remove.
1025 * constexpr.c (cv_cache): Change type to
1026 GTY((deletable)) hash_map<tree, tree> *.
1027 (maybe_constant_value): Adjust following the change to cv_cache.
1028 (clear_cv_cache): New static function.
1029 (clear_cv_and_fold_caches): Use it.
1030 * cp-gimplify.c (fold_cache): Change type to
1031 GTY((deletable)) hash_map<tree, tree> *.
1032 (clear_fold_cache): Adjust following the change to fold_cache.
1033 (cp_fold): Likewise.
1035 2016-04-02 Martin Sebor <msebor@redhat.com>
1041 * constexpr.c (diag_array_subscript): New function.
1042 (cxx_eval_array_reference): Detect out of bounds array indices.
1044 2016-04-01 Jason Merrill <jason@redhat.com>
1048 * pt.c (instantiate_decl): A function isn't fully defined if
1049 DECL_INITIAL is error_mark_node.
1050 * constexpr.c (cxx_eval_call_expression): Likewise.
1052 2016-04-01 Jakub Jelinek <jakub@redhat.com>
1053 Marek Polacek <polacek@redhat.com>
1056 * init.c (warn_placement_new_too_small): Test whether
1057 DECL_SIZE_UNIT or TYPE_SIZE_UNIT are integers that fit into uhwi.
1059 2016-04-01 Nathan Sidwell <nathan@acm.org>
1062 * decl.c (check_redeclaration_exception_specification): Check
1063 regardless of -fno-exceptions.
1064 * typeck2.c (merge_exception_specifiers): Relax assert by checking
1065 flag_exceptions too.
1067 2016-03-31 Nathan Sidwell <nathan@acm.org>
1069 * decl.c (start_preparsed_function): Remove unnecessary bracing.
1070 (finish_destructor_body): Don't emit operator delete here.
1072 2016-03-31 Nathan Sidwell <nathan@acm.org>
1075 * constexpr.c (cxx_eval_store_expression): Keep CONSTRUCTOR
1076 elements in field order.
1078 2016-03-31 Marek Polacek <polacek@redhat.com>
1081 * decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1083 2016-03-31 Richard Biener <rguenther@suse.de>
1086 * typeck.c (cp_build_binary_op): Fix operand order of vector
1087 conditional in truth op handling.
1089 2016-03-29 Jason Merrill <jason@redhat.com>
1092 * decl.c (make_rtl_for_nonlocal_decl): Don't defer local statics
1093 in constexpr functions.
1095 2016-03-28 Jason Merrill <jason@redhat.com>
1100 * decl.c, pt.c, constexpr.c: Revert last patch.
1102 2016-03-25 Jason Merrill <jason@redhat.com>
1103 Martin Liška <mliska@suse.cz>
1108 * decl.c (cp_fname_init): Decay the initializer to pointer.
1109 (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P,
1110 DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1111 Don't call cp_finish_decl.
1112 * pt.c (tsubst_expr) [DECL_EXPR]: Set DECL_VALUE_EXPR,
1113 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. Don't call cp_finish_decl.
1114 * constexpr.c (cxx_eval_constant_expression) [VAR_DECL]:
1115 Handle DECL_VALUE_EXPR.
1117 2016-03-24 Jason Merrill <jason@redhat.com>
1120 * constexpr.c (cxx_eval_bare_aggregate): Handle PMFs.
1123 * constexpr.c (cxx_eval_call_expression): Don't cache result if
1126 2016-03-24 Patrick Palka <ppalka@gcc.gnu.org>
1129 * tree.c (build_cplus_array_type): Determine type-dependentess
1130 with uses_template_parms instead of with dependent_type_p.
1132 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
1135 * typeck.c (process_init_constructor_union): If the initializer
1136 is empty, use the union's NSDMI if it has one.
1138 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
1141 * pt.c (tsubst_copy) [PARM_DECL]: Handle the use of 'this' in an
1142 NSDMI that's part of an aggregrate initialization.
1144 2016-03-23 Jakub Jelinek <jakub@redhat.com>
1147 * constexpr.c (cxx_eval_vec_init_1): Reuse CONSTRUCTOR initializers
1148 for 1..max even for multi-dimensional arrays. Call unshare_expr
1152 * constexpr.c (cxx_eval_constant_expression): Diagnose overflow
1153 on TREE_OVERFLOW constants.
1156 * cp-gimplify.c (genericize_omp_for_stmt): Don't walk OMP_FOR_CLAUSES
1157 for OMP_TASKLOOP here.
1158 (cp_genericize_r): Handle OMP_TASKLOOP like OMP_TASK, except do call
1159 genericize_omp_for_stmt instead of cp_walk_tree on OMP_BODY.
1161 2016-03-23 Alexandre Oliva <aoliva@redhat.com>
1162 Jason Merrill <jason@redhat.com>
1163 Jakub Jelinek <jakub@redhat.com>
1166 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): Remove.
1167 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): Remove.
1168 (finish_function): Don't set or test them.
1169 * decl2.c (mark_used): Don't handle defer_mark_used_calls.
1171 2016-03-23 Jason Merrill <jason@redhat.com>
1174 * constexpr.c (cxx_eval_call_expression): Catch invalid recursion.
1176 2016-03-23 Marek Polacek <polacek@redhat.com>
1179 * pt.c (canonicalize_type_argument): Use OPT_Wignored_attributes.
1181 2016-03-22 Ilya Enkovich <enkovich.gnu@gmail.com>
1183 * call.c (build_conditional_expr_1): Always use original
1184 condition type for vector type checks and build.
1186 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
1189 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl.
1191 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
1194 * constexpr.c (non_const_var_error): Check
1195 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1197 2016-03-21 Richard Henderson <rth@redhat.com>
1200 * decl.c (notice_forced_label_r): New.
1201 (cp_finish_decl): Use it.
1203 2016-03-21 Jason Merrill <jason@redhat.com>
1206 * cp-gimplify.c (cp_fold) [COND_EXPR]: Handle bit-fields.
1208 2016-03-18 Jason Merrill <jason@redhat.com>
1211 * constexpr.c (cxx_eval_call_expression): Fix trivial copy.
1214 * class.c (vptr_via_virtual_p): New.
1215 (most_primary_binfo): Factor out of build_rtti_vtbl_entries.
1216 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Don't clear
1217 a vptr from any virtual base in a not-in-charge 'structor.
1219 * decl.c (build_clobber_this): Factor out of
1220 start_preparsed_function and begin_destructor_body. Handle
1221 virtual bases better.
1223 * class.c (build_if_in_charge): Split out from build_base_path.
1224 * init.c (expand_virtual_init, expand_default_init): Use it.
1225 * call.c (build_special_member_call): Use it.
1227 2016-03-18 Jakub Jelinek <jakub@redhat.com>
1230 * init.c (build_new_1): Complain and return error_mark_node
1231 if alloc_fn is not _Jv_AllocObject function returning pointer.
1233 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
1236 * search.c (adjust_result_of_qualified_name_lookup): Don't
1237 update the BASELINK_BINFO of DECL if the second call
1238 to lookup_base fails.
1240 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
1243 * parser.c (cp_parser_lambda_expression): Move call to
1244 pop_deferring_access_checks ahead of the call to
1245 cp_parser_end_tentative_firewall.
1247 2016-03-17 Jakub Jelinek <jakub@redhat.com>
1250 * cp-tree.h (magic_varargs_p): Return int instead of bool.
1251 * call.c (magic_varargs_p): Return int instead of bool, return 2 for
1252 Cilk+ reductions, otherwise 1 for magic varargs and 0 for normal
1254 (build_over_call): If magic_varargs_p == 2, call reject_gcc_builtin,
1255 if magic_varargs_p == 1, call decay_conversion
1256 instead of mark_type_use. Don't store error_mark_node arguments to
1257 argarray, instead return error_mark_node.
1260 * decl.c (begin_destructor_body): Don't insert clobber if
1261 is_empty_class (current_class_type).
1263 2016-03-17 Marek Polacek <polacek@redhat.com>
1266 * typeck.c (warn_for_null_address): New function.
1267 (cp_build_binary_op): Call it.
1269 2016-03-16 Jason Merrill <jason@redhat.com>
1272 * decl.c (start_preparsed_function): Don't clobber an empty base.
1274 2016-03-16 Jakub Jelinek <jakub@redhat.com>
1277 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Conditionalize
1278 BINFO_VIRTUAL_P vtable clearing on current_in_charge_parm.
1281 * cp-ubsan.c (cp_ubsan_maybe_initialize_vtbl_ptrs): Temporarily
1282 set in_base_initializer.
1284 2016-03-15 Marek Polacek <polacek@redhat.com>
1287 * tree.c (strip_typedefs): Call strip_typedefs again on the
1288 DECL_ORIGINAL_TYPE result.
1290 2016-03-15 Jason Merrill <jason@redhat.com>
1293 * pt.c (instantiate_decl): Fix call to variable_template_p.
1296 * pt.c (for_each_template_parm_r): Always walk into TYPENAME_TYPE.
1298 2016-03-14 Casey Carter <casey@carter.net>
1299 Jason Merrill <jason@redhat.com>
1301 P0184R0: Generalizing the Range-Based For Loop
1302 * parser.c (cp_convert_range_for): Set the type of __end separately.
1303 (cp_parser_perform_range_for_lookup): Allow different begin/end
1304 types if they are comparable.
1306 2016-03-12 Patrick Palka <ppalka@gcc.gnu.org>
1309 * semantics.c (force_paren_expr): Just build a PAREN_EXPR when
1310 processing_template_decl and EXPR is a SCOPE_REF.
1312 2016-03-10 Patrick Palka <ppalka@gcc.gnu.org>
1313 Jakub Jelinek <jakub@redhat.com>
1316 * constexpr.c (cxx_eval_vec_init_1): For pre_init case, reuse
1317 return value from cxx_eval_constant_expression from earlier
1318 elements if it is valid constant initializer requiring no
1321 2016-03-10 Marek Polacek <polacek@redhat.com>
1324 * cp-gimplify.c (cp_fold): Handle UNARY_PLUS_EXPR.
1326 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1328 * parser.c (cp_parser_oacc_loop): Update cclauses and clauses
1329 when calling c_finish_omp_clauses.
1331 2016-03-08 Jason Merrill <jason@redhat.com>
1333 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
1334 diagnostic for use of "concept".
1335 (cp_parser_requires_clause_opt): And "requires".
1336 (cp_parser_type_parameter, cp_parser_late_return_type_opt)
1337 (cp_parser_explicit_template_declaration): Adjust.
1338 * Make-lang.in (check-c++-all): Add "concepts" to std list.
1340 P0036R0: Unary Folds and Empty Parameter Packs
1341 * pt.c (expand_empty_fold): Remove special cases for *,+,&,|.
1343 2016-03-08 Jakub Jelinek <jakub@redhat.com>
1346 * constexpr.c (cxx_eval_loop_expr): Forget saved values of SAVE_EXPRs
1347 even after the last iteration of the loop.
1349 * decl.c (duplicate_decls): Fix spelling - becuase -> because.
1351 2016-03-07 Patrick Palka <ppalka@gcc.gnu.org>
1354 * pt.c (get_template_info): Handle PARM_DECL.
1355 (template_class_depth): Check DECL_P instead of
1356 VAR_OR_FUNCTION_DECL_P.
1358 2016-03-05 Jason Merrill <jason@redhat.com>
1361 * constexpr.c (cxx_eval_store_expression): Replace
1362 CONSTRUCTOR_ELTS in nested CONSTRUCTORs, too.
1364 2016-03-05 Patrick Palka <ppalka@gcc.gnu.org>
1367 * pt.c (template_class_depth): Given a lambda type, iterate
1368 into its LAMBDA_TYPE_EXTRA_SCOPE field instead of its
1369 TYPE_CONTEXT. Given a VAR_DECL, iterate into its
1372 2016-03-04 Jason Merrill <jason@redhat.com>
1375 * cp-tree.h (COND_EXPR_IS_VEC_DELETE): New.
1376 * init.c (build_vec_delete_1): Set it.
1377 * constexpr.c (potential_constant_expression_1) [COND_EXPR]: Check it.
1379 2016-03-04 Jakub Jelinek <jakub@redhat.com>
1381 * decl.c (start_preparsed_function): Don't emit start clobber at the
1382 start of constructor clones.
1385 * cp-tree.h (cp_ubsan_maybe_initialize_vtbl_ptrs): New prototype.
1386 * decl.c (start_preparsed_function): Call
1387 cp_ubsan_maybe_initialize_vtbl_ptrs if needed.
1388 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs,
1389 cp_ubsan_maybe_initialize_vtbl_ptrs): New functions.
1391 2016-03-04 Jason Merrill <jason@redhat.com>
1394 * constexpr.c (cxx_eval_component_reference): Further tweak.
1396 * constexpr.c (struct constexpr_ctx): Add save_exprs field.
1397 (cxx_eval_loop_expr): Discard SAVE_EXPR values before looping.
1398 (cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set.
1399 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize.
1402 * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
1405 2016-03-03 Jason Merrill <jason@redhat.com>
1407 * method.c (synthesized_method_walk): operator= can also be constexpr.
1409 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Get
1410 LAMBDA_EXPR_RETURN_TYPE from the instantiated closure.
1413 * pt.c (copy_template_args): New.
1414 (tsubst_pack_expansion): Use it.
1416 * call.c (build_aggr_conv): Use get_nsdmi.
1419 * typeck.c (build_static_cast_1): Avoid folding back to lvalue.
1422 * constexpr.c (cxx_eval_component_reference): Just return an empty
1423 CONSTRUCTOR for an empty class.
1425 2016-03-01 Jason Merrill <jason@redhat.com>
1428 * parser.c (cp_parser_requires_clause): Call
1429 check_for_bare_parameter_packs.
1432 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1436 * constexpr.c (cxx_eval_call_expression): Unshare arg.
1437 (cxx_eval_constant_expression) [DECL_EXPR]: Unshare init.
1438 [TARGET_EXPR]: Unshare init.
1440 2016-03-01 Patrick Palka <ppalka@gcc.gnu.org>
1444 * pt.c (tsubst_baselink): Reinstate the check for an invalid
1447 2016-02-28 Jason Merrill <jason@redhat.com>
1450 * constexpr.c (cxx_eval_store_expression): Unshare init.
1452 2016-02-26 Jason Merrill <jason@redhat.com>
1455 * pt.c (make_argument_pack): New.
1456 (tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
1457 (tsubst_copy_and_build): Likewise.
1459 2016-02-25 Jason Merrill <jason@redhat.com>
1462 * cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
1463 * tree.c (build_aggr_init_expr): Set it.
1464 * semantics.c (simplify_aggr_init_expr): Check it.
1465 * cp-gimplify.c (cp_genericize_r): Don't walk into
1466 a call/aggr_init from a thunk.
1469 * method.c (forward_parm): Handle parameter packs.
1470 * lambda.c (maybe_add_lambda_conv_op): Use it for them.
1473 * constexpr.c (cxx_eval_component_reference): Don't complain about
1474 unevaluated empty classes.
1477 * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.
1479 2016-02-25 Patrick Palka <ppalka@gcc.gnu.org>
1482 * cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
1483 (maybe_undo_parenthesized_ref): Declare.
1484 * semantics.c (maybe_undo_parenthesized_ref): Split out from
1486 (finish_call_expr): Use it.
1487 * typeck.c (check_return_expr): Use it.
1488 * pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
1489 REF_PARENTHESIZED_P flag.
1491 2016-02-24 Jakub Jelinek <jakub@redhat.com>
1494 * class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
1496 * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
1498 * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
1499 unless they are folded into INTEGER_CST, error_mark_node or some
1500 comparison with NULL, avoid folding them and use either the original
1501 comparison or non-folded comparison of folded arguments.
1502 * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
1503 comparison, don't fold the comparison right away.
1505 2016-02-24 Jason Merrill <jason@redhat.com>
1508 * friend.c (make_friend_class): Likewise.
1509 * decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.
1511 2016-02-24 Jason Merrill <jason@redhat.com>
1514 * pt.c (instantiate_class_template_1): Set
1515 processing_template_decl before substituting friend_type.
1517 016-02-24 Martin Sebor <msebor@redhat.com>
1520 * tree.c (build_ctor_subob_ref): Compare types' main variants
1521 instead of the types as they are.
1523 2016-02-24 Jason Merrill <jason@redhat.com>
1525 * decl.c (start_preparsed_function): Condition ctor clobber on
1526 flag_lifetime_dse > 1.
1528 * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
1530 2016-02-19 Jason Merrill <jason@redhat.com>
1533 * call.c (remaining_arguments): No longer static.
1534 * cp-tree.h: Declare it.
1535 * pt.c (more_specialized_fn): Use it.
1537 2016-02-19 Jakub Jelinek <jakub@redhat.com>
1538 Bernd Edlinger <bernd.edlinger@hotmail.de>
1540 * Make-lang.in: Invoke gperf with -L C++.
1541 * cfns.gperf: Remove prototypes for hash and libc_name_p
1543 * cfns.h: Regenerated.
1544 * except.c (nothrow_libfn_p): Adjust.
1546 2016-02-19 Jakub Jelinek <jakub@redhat.com>
1549 * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
1550 NE_EXPR instead of EQ_EXPR and swap last two arguments on COND_EXPR.
1552 2016-02-19 Patrick Palka <ppalka@gcc.gnu.org>
1555 * pt.c (tsubst_baselink): Don't diagnose an invalid constructor
1557 * semantics.c (finish_call_expr): Don't assume a constructor
1558 call is dependent if only the "this" pointer is dependent. When
1559 building a constructor call, always use a dummy object.
1561 2016-02-19 Jakub Jelinek <jakub@redhat.com>
1564 * init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR
1566 * cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary
1567 operators if folding preserved the binop, just with different
1571 * parser.c (cp_parser_std_attribute_spec_seq): Don't assume
1572 attr_spec is always single element chain, chain all the attributes
1573 properly together in the right order.
1575 2016-02-18 Jason Merrill <jason@redhat.com>
1577 * mangle.c (maybe_check_abi_tags): Add for_decl parm. Call
1579 (mangle_decl): Call maybe_check_abi_tags for function scope.
1580 (mangle_guard_variable): Call maybe_check_abi_tags here.
1581 (write_guarded_var_name): Not here.
1583 2016-02-17 Jason Merrill <jason@redhat.com>
1586 * constexpr.c (build_constexpr_constructor_member_initializers):
1587 Handle an additional STATEMENT_LIST.
1590 * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection.
1593 * decl2.c (reset_type_linkage_2): Look through member templates.
1595 2016-02-17 Jakub Jelinek <jakub@redhat.com>
1598 * init.c (build_delete): Set TREE_NO_WARNING on ifexp.
1600 2016-02-17 Jason Merrill <jason@redhat.com>
1603 * method.c (forward_parm): Split out from...
1604 (add_one_base_init): ...here.
1605 * lambda.c (maybe_add_lambda_conv_op): Use it.
1607 2016-02-16 Jason Merrill <jason@redhat.com>
1611 * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c,
1612 tree.c, typeck2.c: Revert earlier changes.
1613 * parser.c (cp_parser_lookup_name): Ignore namespace-scope
1614 non-type templates after -> or .
1616 2016-02-16 Jakub Jelinek <jakub@redhat.com>
1619 * typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
1621 2016-02-16 Jason Merrill <jason@redhat.com>
1624 * name-lookup.c (lookup_qualified_name): Add find_hidden parm.
1625 (set_decl_namespace): Pass it. Complain about finding a hidden friend.
1626 * name-lookup.h: Adjust.
1628 2016-02-16 James Norris <jnorris@codesourcery.com>
1630 * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking.
1631 * semantics.c (finish_omp_clauses): Add deviceptr checking.
1633 2016-02-15 Jakub Jelinek <jakub@redhat.com>
1636 * init.c (expand_default_init): Only call reshape_init
1637 in the direct-initialization from an initializer list case.
1639 2016-02-15 Jason Merrill <jason@redhat.com>
1642 * semantics.c (finish_call_expr): Implicit 'this' does not make
1644 * search.c (any_dependent_bases_p): Split out...
1645 * name-lookup.c (do_class_using_decl): ...from here.
1646 * call.c (build_new_method_call_1): Don't complain about missing object
1647 if there are dependent bases. Tweak error.
1648 * tree.c (non_static_member_function_p): Remove.
1649 * pt.c (type_dependent_expression_p): A member template of a
1650 dependent type is dependent.
1651 * cp-tree.h: Adjust.
1654 * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check.
1656 2016-02-12 Patrick Palka <ppalka@gcc.gnu.org>
1659 * pt.c (lookup_and_finish_template_variable): New function,
1661 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here. Use it.
1662 (tsubst_qualified_id): Consider that EXPR might be a variable
1664 * typeck.c (check_template_keyword): Don't emit an error
1665 if DECL is a variable template.
1667 2016-02-12 Jakub Jelinek <jakub@redhat.com>
1669 * error.c: Spelling fixes - behaviour -> behavior and
1670 neighbour -> neighbor.
1672 * typeck.c (cp_build_binary_op): Fix up behavior spelling in
1674 * init.c (build_delete): Likewise.
1676 2016-02-11 Jakub Jelinek <jakub@redhat.com>
1679 * typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
1680 arguments for -Waddress warning. Fix up formatting.
1682 2016-02-11 Paolo Carlini <paolo.carlini@oracle.com>
1685 * pt.c (lookup_template_class_1): Check tsubst return value for
1688 2016-02-10 Jason Merrill <jason@redhat.com>
1691 * pt.c (resolve_nondeduced_context): Add complain parm.
1692 (do_auto_deduction): Pass it.
1693 * cvt.c (convert_to_void): Likewise.
1694 * decl.c (cp_finish_decl): Likewise.
1695 * init.c (build_new): Likewise.
1696 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1697 * semantics.c (finish_decltype_type): Likewise.
1698 * typeck.c (decay_conversion): Likewise.
1699 * cp-tree.h: Adjust declaration.
1700 * call.c (standard_conversion): Add complain parm, pass it along.
1701 (implicit_conversion): Pass it.
1704 * name-lookup.c (ambiguous_decl): Call remove_hidden_names.
1705 (lookup_name_real_1): Likewise.
1706 (remove_hidden_names): Handle non-functions too.
1709 * parser.c (cp_parser_lookup_name): When looking for a template
1710 after . or ->, only consider class templates.
1711 (cp_parser_postfix_dot_deref_expression): Handle the current
1712 instantiation. Remember a dependent object expression.
1713 * typeck2.c (build_x_arrow): Handle the current instantiation.
1715 * ptree.c (debug_tree): Implement for cp_expr.
1717 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
1720 * parser.c (cp_parser_simple_type_specifier): Make the check
1721 for disambiguating between an 'auto' placeholder and an implicit
1722 template parameter more robust.
1724 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
1728 * decl2.c (mark_used): When given a TEMPLATE_DECL, return after
1729 setting its TREE_USED flag.
1731 2016-02-08 Jason Merrill <jason@redhat.com>
1734 * name-lookup.c (do_nonmember_using_decl): Leave anticipated
1737 2016-02-08 Jakub Jelinek <jakub@redhat.com>
1740 * parser.c (cp_parser_omp_declare_reduction): Set assembler name
1741 of the DECL_OMP_DECLARE_REDUCTION_P decls.
1743 2016-02-08 Marek Polacek <polacek@redhat.com>
1746 * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache.
1747 Call clear_fold_cache.
1748 * cp-tree.h: Adjust declaration.
1749 * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches
1750 rather than clear_cv_cache and clear_fold_cache.
1751 * typeck2.c (store_init_value): Call clear_cv_and_fold_caches.
1753 2016-02-08 Jason Merrill <jason@redhat.com>
1755 * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New.
1756 * cvt.c (convert): Pass CONV_BACKEND_CONVERT.
1757 (ocp_convert): Use *_maybe_fold.
1758 (cp_convert_to_pointer): Add dofold parameter.
1759 * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert.
1761 2016-02-05 Martin Sebor <msebor@redhat.com>
1764 * init.c (find_field_init): New function.
1765 (warn_placement_new_too_small): Call it. Handle one-element arrays
1766 at ends of structures special.
1768 2016-02-05 Jason Merrill <jason@redhat.com>
1771 * semantics.c (finish_expr_stmt): If expr is error_mark_node,
1772 make sure we've seen_error().
1774 2016-02-05 Patrick Palka <ppalka@gcc.gnu.org>
1777 * pt.c (tsubst_baselink): Diagnose an invalid constructor call
1778 if lookup_fnfields returns NULL_TREE and the name being looked
1779 up has the form A::A.
1781 2016-02-04 Patrick Palka <ppalka@gcc.gnu.org>
1783 * constexpr.c (cxx_eval_binary_expression): Fold equality
1784 comparisons involving PTRMEM_CSTs.
1786 2016-02-04 Jakub Jelinek <jakub@redhat.com>
1788 * class.c (find_flexarrays): Don't declare dom variable.
1789 (diagnose_flexarray): Likewise.
1791 2016-02-02 Martain Sebor <msebor@redhat.com>
1798 * class.c (walk_subobject_offsets): Avoid testing the upper bound
1799 of a flexible array member for equality to null.
1800 (find_flexarrays): Remove spurious whitespace introduced in r231665.
1801 (diagnose_flexarrays): Avoid checking the upper bound of arrays.
1802 (check_flexarrays): Same.
1803 * decl.c (compute_array_index_type): Avoid special case for flexible
1805 (grokdeclarator): Avoid calling compute_array_index_type for flexible
1807 * error.c (dump_type_suffix): Revert changes introduced in r231665
1808 and rendered unnecessary by the changes above.
1809 * pt.c (tsubst): Same.
1810 * tree.c (build_ctor_subob_ref): Handle flexible array members.
1811 * typeck2.c (digest_init_r): Revert changes introduced in r231665.
1812 (process_init_constructor_array): Same.
1813 (process_init_constructor_record): Same.
1815 2016-02-03 Patrick Palka <ppalka@gcc.gnu.org>
1818 * pt.c (try_one_overload): Handle comparing argument packs so
1819 that there is no conflict if we deduced more arguments of an
1820 argument pack than were explicitly specified.
1822 2016-01-31 Jakub Jelinek <jakub@redhat.com>
1823 Jason Merrill <jason@redhat.com>
1826 * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
1827 function type if nothing is changing.
1829 2016-01-31 Jason Merrill <jason@redhat.com>
1832 * pt.c (partial_specialization_p, impartial_args): New.
1833 (instantiate_decl): Call impartial_args.
1835 * mangle.c (maybe_check_abi_tags): New.
1836 (write_guarded_var_name): Call it.
1837 (mangle_ref_init_variable): Call check_abi_tags.
1839 * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
1840 between template and instantiation.
1842 2016-01-29 Jakub Jelinek <jakub@redhat.com>
1845 * decl.c (wrapup_globals_for_namespace): Warn about unused static
1846 function declarations.
1848 2016-01-29 Marek Polacek <polacek@redhat.com>
1852 * constexpr.c (cxx_eval_array_reference): Give the "array subscript
1853 out of bound" error earlier.
1854 * init.c (build_vec_init): Change NE_EXPR into GT_EXPR. Update the
1857 2016-01-29 Patrick Palka <ppalka@gcc.gnu.org>
1859 * name-lookup.c (begin_scope): After reusing a cp_binding_level
1860 structure, update free_binding_level before the structure's
1861 level_chain field gets cleared, not after.
1863 2016-01-28 Jason Merrill <jason@redhat.com>
1866 * search.c (dfs_walk_once, dfs_walk_once_r)
1867 (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use
1868 hash_set instead of BINFO_MARKED.
1869 (dfs_unmark_r): Remove.
1871 2016-01-28 Patrick Palka <ppalka@gcc.gnu.org>
1874 * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro.
1875 (cp_lexer_debugging_p): Use it.
1876 (cp_lexer_start_debugging): Likewise.
1877 (cp_lexer_stop_debugging): Likewise.
1879 2016-01-27 Marek Polacek <polacek@redhat.com>
1882 * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
1883 needed. Add -Wsign-compare warning.
1885 2016-01-27 Ryan Burn <contact@rnburn.com>
1888 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
1889 superfluous post_p argument in call to
1890 cilk_gimplify_call_params_in_spawned_fn.
1892 2016-01-27 Marek Polacek <polacek@redhat.com>
1895 * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
1896 wrapped in NOP_EXPRs.
1898 2016-01-27 Martin Sebor <msebor@redhat.com>
1901 * mangle.c (mangle_decl): Reference the correct (saved) version
1902 of the ABI in -Wabi diagnostics.
1904 2016-01-27 Marek Polacek <polacek@redhat.com>
1907 * constexpr.c (cxx_eval_array_reference): Evaluate the number of
1908 elements of the array.
1910 2016-01-26 Jason Merrill <jason@redhat.com>
1913 * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
1914 (cxx_eval_call_expression): Don't look through clones.
1915 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
1916 * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
1917 maybe-in-charge *tor.
1919 2016-01-26 Jason Merrill <jason@redhat.com>
1922 * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
1923 and TREE_SIDE_EFFECTS.
1924 (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
1925 verify_constructor_flags.
1927 2016-01-26 Jakub Jelinek <jakub@redhat.com>
1930 * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
1931 return error_mark_node instead of building trees with error_mark_node
1934 2016-01-26 David Malcolm <dmalcolm@redhat.com>
1937 * error.c (print_instantiation_partial_context_line): Add missing
1938 newlines from output for the t == NULL case.
1939 (print_instantiation_partial_context): Remove call to pp_newline.
1941 2016-01-24 Patrick Palka <ppalka@gcc.gnu.org>
1944 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
1949 * decl.c (grokdeclarator): Don't decay array parameter type to
1950 a pointer type if it's dependent.
1951 (grokparms): Invoke strip_top_quals instead of directly invoking
1952 cp_build_qualified_type.
1953 * pt.c (decay_dependent_array_parm_type): New static function.
1954 (type_unification_real): Call decay_dependent_array_parm_type
1955 to decay a dependent array parameter type to its corresponding
1956 pointer type before unification.
1957 (more_specialized_fn): Likewise.
1958 (get_bindings): Likewise.
1959 * tree.c (cp_build_qualified_type): Trivial typofix in
1962 2016-01-23 Martin Sebor <msebor@redhat.com>
1966 * decl2.c (is_late_template_attribute): Handle dependent argument
1967 to attribute align and attribute vector_size.
1969 2016-01-21 Jason Merrill <jason@redhat.com>
1972 * lambda.c (lambda_capture_field_type): Handle 'this' specially
1973 for init-capture, too.
1976 * decl.c (type_is_deprecated): Don't look into a typedef.
1980 * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
1983 * decl.c (start_enum): Add attributes parameter.
1984 * parser.c (cp_parser_enum_specifier): Pass it.
1985 * pt.c (lookup_template_class_1): Pass it.
1986 * cp-tree.h: Adjust.
1988 2016-01-19 Jason Merrill <jason@redhat.com>
1991 * pt.c (convert_template_argument): Handle VAR_DECL properly.
1993 2016-01-19 Marek Polacek <polacek@redhat.com>
1996 * constexpr.c (clear_cv_cache): New.
1997 * cp-gimplify.c (clear_fold_cache): New.
1998 * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
1999 * decl.c (finish_enum_value_list): Call them.
2002 * pt.c (tsubst_copy): Mark elements in expanded vector as used.
2004 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
2009 * decl.c (grokdeclarator): Don't decay array parameter type to
2010 a pointer type if it's dependent.
2011 (grokparms): Invoke strip_top_quals instead of directly invoking
2012 cp_build_qualified_type.
2013 * pt.c (decay_dependent_array_parm_type): New static function.
2014 (type_unification_real): Call decay_dependent_array_parm_type
2015 to decay a dependent array parameter type to its corresponding
2016 pointer type before unification.
2017 (more_specialized_fn): Likewise.
2018 (get_bindings): Likewise.
2019 * tree.c (cp_build_qualified_type): Trivial typofix in
2022 2016-01-18 Jason Merrill <jason@redhat.com>
2024 * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
2026 * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
2029 * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify. Do fold COND_EXPR.
2030 (contains_label_1, contains_label_p): Remove.
2032 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
2035 * pt.c (type_dependent_expression_p): For a function template
2036 specialization, a type is dependent iff any of its template
2039 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
2041 * cp-array-notation.c (cp_expand_cond_array_notations): Return
2042 error_mark_node only if find_rank failed, not if it was
2045 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
2048 * tree.c (build_min_non_dep_call_vec): Don't retain the
2049 KOENIG_LOOKUP_P flag of the non-dependent expression that's
2051 (build_min_non_dep_op_overload): Instead, do it here.
2053 2016-01-15 Jakub Jelinek <jakub@redhat.com>
2056 * parser.h (cp_token): Remove pragma_kind field. Add comment
2057 with number of unused bits.
2058 * parser.c (eof_token): Remove pragma_kind field initializer.
2059 (cp_lexer_get_preprocessor_token): Don't set pragma_kind
2060 field, don't clear CPP_PRAGMA u.value.
2061 (cp_parser_pragma_kind): New function.
2062 (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
2063 cp_parser_omp_construct, cp_parser_initial_pragma,
2064 cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
2067 2016-01-15 Jason Merrill <jason@redhat.com>
2070 * call.c (build_cxx_call): Use fold_non_dependent_expr.
2072 * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
2076 * typeck.c (decay_conversion): Don't call mark_rvalue_use for
2077 array/function-to-pointer conversion. Call
2078 complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
2079 * call.c (convert_like_real): Print call context if
2080 decay_conversion errors.
2082 2016-01-14 Tom de Vries <tom@codesourcery.com>
2084 PR tree-optimization/68773
2085 * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
2088 2016-01-14 Jason Merrill <jason@redhat.com>
2091 * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
2093 2016-01-12 Marek Polacek <polacek@redhat.com>
2096 * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
2097 error_at and adjust the return value.
2099 2016-01-12 Jakub Jelinek <jakub@redhat.com>
2103 * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
2104 GS_ERROR whenever seen_error (), only if *expr_p contains
2105 cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
2109 * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
2111 2016-01-11 Jason Merrill <jason@redhat.com>
2114 * method.c (walk_field_subobs): Add dtor_from_ctor parm.
2115 (process_subob_fn): Likewise. Don't consider triviality if true.
2116 (synthesize_method_walk): Pass it.
2118 2016-01-11 David Malcolm <dmalcolm@redhat.com>
2121 * parser.c (cp_parser_postfix_expression): Initialize
2122 close_paren_loc to UNKNOWN_LOCATION; only use it if
2123 it has been written to by
2124 cp_parser_parenthesized_expression_list.
2125 (cp_parser_parenthesized_expression_list): Document the behavior
2126 with respect to the CLOSE_PAREN_LOC param.
2128 2016-01-11 Jakub Jelinek <jakub@redhat.com>
2131 * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
2132 folded operands have side-effects, but folding changed any of them,
2133 build a new tree with the folded operands instead of returning the
2136 2016-01-09 Marek Polacek <polacek@redhat.com>
2139 * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
2141 2016-01-09 Jakub Jelinek <jakub@redhat.com>
2144 * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
2146 2016-01-08 Jason Merrill <jason@redhat.com>
2149 * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
2152 2016-01-08 Marek Polacek <polacek@redhat.com>
2155 * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
2157 2016-01-08 Jason Merrill <jason@redhat.com>
2159 * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
2164 * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
2165 TREE_ADDRESSABLE type.
2169 * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
2171 2016-01-05 Nathan Sidwell <nathan@acm.org>
2174 * pt.c (build_non_dependent_expr): Don't try a checking fold when
2177 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2179 Update copyright years.
2181 Copyright (C) 2016 Free Software Foundation, Inc.
2183 Copying and distribution of this file, with or without modification,
2184 are permitted in any medium without royalty provided the copyright
2185 notice and this notice are preserved.