1 2016-06-14 Paolo Carlini <paolo.carlini@oracle.com>
3 * typeck2.c (digest_init_r): Use EXPR_LOC_OR_LOC on init.
5 2016-06-13 Paolo Carlini <paolo.carlini@oracle.com>
7 * decl.c (grokdeclarator): Fix typo in pedwarn text.
9 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
12 * parser.c (cp_parser_omp_var_list_no_open) <OMP_CLAUSE__CACHE_>:
15 2016-06-09 Paolo Carlini <paolo.carlini@oracle.com>
19 2016-06-04 Paolo Carlini <paolo.carlini@oracle.com>
22 * parser.c (cp_parser_class_head): When xref_basetypes fails and
23 emits an error do not zero the type.
25 2016-06-08 Paolo Carlini <paolo.carlini@oracle.com>
27 * decl.c (maybe_deduce_size_from_array_init): Use
28 DECL_SOURCE_LOCATION in error_at.
29 (layout_var_decl): Likewise.
30 (check_array_initializer): Likewise.
31 (check_initializer): Likewise.
32 (duplicate_decls, check_elaborated_type_specifier): Tidy.
34 2016-06-08 Martin Sebor <msebor@redhat.com>
35 Jakub Jelinek <jakub@redhat.com>
39 * constexpr.c: Include gimple-fold.h.
40 (cxx_eval_internal_function): New function.
41 (cxx_eval_call_expression): Call it.
42 (potential_constant_expression_1): Handle integer arithmetic
44 * tree.c (builtin_valid_in_constant_expr_p): Handle
45 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
47 2016-06-08 Paolo Carlini <paolo.carlini@oracle.com>
49 * pt.c (tsubst, case TYPENAME_TYPE): Don't delay checking the
50 return value of tsubst_aggr_type for error_mark_node.
52 2016-06-08 Jakub Jelinek <jakub@redhat.com>
55 * pt.c (tsubst_copy): Only set TREE_USED on DECLs.
57 2016-06-06 Jakub Jelinek <jakub@redhat.com>
58 Patrick Palka <ppalka@gcc.gnu.org>
63 * cp-gimplify.c (cp_fold_r): Set *walk_subtrees = 0 and return NULL
64 right after cp_fold call if cp_fold has returned the same stmt
65 already in some earlier cp_fold_r call.
66 (cp_fold_function): Add pset automatic variable, pass its address
69 2016-06-04 Paolo Carlini <paolo.carlini@oracle.com>
72 * parser.c (cp_parser_class_head): When xref_basetypes fails and
73 emits an error do not zero the type.
75 2016-06-03 Patrick Palka <ppalka@gcc.gnu.org>
78 * decl.c (duplicate_decls): Properly copy the
79 DECL_PENDING_INLINE_P, DECL_PENDING_INLINE_INFO and
80 DECL_SAVED_FUNCTION_DATA fields from OLDDECL to NEWDECL.
82 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
84 * semantics.c (finish_omp_clauses): Mark OpenACC reduction
85 arguments as addressable when async clause exists.
87 2016-06-02 Jan Hubicka <jh@suse.cz>
89 * cp-gimplify.c (genericize_continue_stmt): Force addition of
92 2016-06-02 Paolo Carlini <paolo.carlini@oracle.com>
94 * decl.c (xref_tag_1): Change pairs of errors to error + inform.
95 (start_enum): Likewise.
96 * parser.c (cp_parser_class_head): Likewise.
98 2016-06-02 Jakub Jelinek <jakub@redhat.com>
101 * cp-gimplify.c (cp_fold): For INDIRECT_REF, if the folded expression
102 is INDIRECT_REF or MEM_REF, copy over TREE_READONLY, TREE_SIDE_EFFECTS
103 and TREE_THIS_VOLATILE flags. For ARRAY_REF and ARRAY_RANGE_REF, copy
104 over TREE_READONLY, TREE_SIDE_EFFECTS and TREE_THIS_VOLATILE flags
105 to the newly built tree.
107 2016-05-31 Jason Merrill <jason@redhat.com>
109 * pt.c (instantiate_decl): Avoid recalculation.
114 * pt.c (instantiate_template_1): Don't put the partial
115 specialization in DECL_TI_TEMPLATE.
116 (partial_specialization_p, impartial_args): Remove.
117 (regenerate_decl_from_template): Add args parm.
118 (instantiate_decl): Look up the partial specialization again.
121 * pt.c (check_explicit_specialization): Give better diagnostic about
122 specializing a hidden friend.
124 2016-05-31 Paolo Carlini <paolo.carlini@oracle.com>
127 * decl.c (check_static_variable_definition): Use DECL_SOURCE_LOCATION
128 to obtain correct locations; avoid redundant diagnostics on
129 out-of-class definitions.
131 2016-05-30 Martin Sebor <msebor@redhat.com>
134 * init.c (warn_placement_new_too_small): Handle placement new arguments
135 that are elements of arrays more carefully. Remove a pointless loop.
137 2016-05-30 Jakub Jelinek <jakub@redhat.com>
140 * parser.c (cp_parser_omp_for): Don't disallow nowait clause
141 when combined with target construct.
142 (cp_parser_omp_parallel): Pass cclauses == NULL as last argument
143 to cp_parser_omp_all_clauses.
145 2016-05-30 Paolo Carlini <paolo.carlini@oracle.com>
148 * lex.c (unqualified_name_lookup_error): Take a location too.
149 (unqualified_fn_lookup_error): Take a cp_expr.
150 * cp-tree.h (unqualified_name_lookup_error,
151 unqualified_fn_lookup_error): Adjust declarations.
152 * semantics.c (perform_koenig_lookup): Adjust
153 unqualified_fn_lookup_error call, pass the location of
154 the identifier too as part of a cp_expr.
156 2016-05-30 Paolo Carlini <paolo.carlini@oracle.com>
159 * parser.c (cp_parser_function_specifier_opt): Use current_class_type
160 to improve the diagnostic about wrong uses of 'virtual'.
162 2016-05-29 Paolo Carlini <paolo.carlini@oracle.com>
165 * lambda.c (maybe_add_lambda_conv_op): Early return also when
166 LAMBDA_EXPR_DEFAULT_CAPTURE_MODE != CPLD_NONE.
168 2016-05-28 Ville Voutilainen <ville.voutilainen@gmail.com>
172 * name-lookup.c (pushdecl_maybe_friend_1): Push local function
173 decls into the global scope after stripping template bits
174 and setting DECL_ANTICIPATED.
176 2016-05-27 Paolo Carlini <paolo.carlini@oracle.com>
179 * name-lookup.c (push_namespace): Return bool, false when pushdecl
181 * name-lookup.h (push_namespace): Adjust declaration.
182 * parser.c (cp_parser_namespace_definition): Check push_namespace
185 2016-05-27 Ville Voutilainen <ville.voutilainen@gmail.com>
188 * name-lookup.c (pushdecl_maybe_friend_1): Push local function
189 decls into the global scope after stripping template bits
190 and setting DECL_ANTICIPATED.
192 2016-05-26 Jakub Jelinek <jakub@redhat.com>
194 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_SCHEDULE>: Warn
195 if OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
197 2016-05-26 Patrick Palka <ppalka@gcc.gnu.org>
201 * cp-tree.h (REF_PARENTHESIZED_P): Make this flag apply to
203 * pt.c (tsubst_qualified_id): If REF_PARENTHESIZED_P is set
204 on the qualified_id then propagate it to the resulting
206 (do_auto_deduction): Check REF_PARENTHESIZED_P on SCOPE_REFs
208 * semantics.c (force_paren_expr): If given a SCOPE_REF, just set
209 its REF_PARENTHESIZED_P flag.
211 2016-05-25 Jason Merrill <jason@redhat.com>
215 * cp-tree.h (enum tag_types): Add scope_type.
216 * parser.c (cp_parser_class_name): Use scope_type.
217 (prefer_type_arg): Handle scope_type.
218 (cp_parser_lookup_name): Use prefer_type_arg.
219 * name-lookup.c (lookup_qualified_name): Change bool is_type_p to
220 int prefer_type, use lookup_flags.
221 * name-lookup.h: Adjust.
223 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
225 * parser.c (cp_parser_oacc_declare): Add support for
226 GOMP_MAP_FIRSTPRIVATE_POINTER.
227 * semantics.c (handle_omp_array_sections_1): Replace bool is_omp
228 argument with enum c_omp_region_type ort. Don't privatize OpenACC
230 (handle_omp_array_sections): Replace bool is_omp argument with enum
231 c_omp_region_type ort. Update call to handle_omp_array_sections_1.
232 (finish_omp_clauses): Add specific errors and warning messages for
233 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
234 call to handle_omp_array_sections.
236 2016-05-24 Jason Merrill <jason@redhat.com>
239 * cp-gimplify.c (cp_fold_maybe_rvalue): Loop in case cp_fold
241 (cp_fold) [INDIRECT_REF]: Don't fold to an rvalue.
243 2016-05-24 Martin Sebor <msebor@redhat.com>
246 * decl.c (layout_var_decl, grokdeclarator): Use complete_or_array_type_p.
247 * pt.c (instantiate_class_template_1): Try to complete the element
248 type of a flexible array member.
249 (can_complete_type_without_circularity): Handle arrays of unknown bound.
250 * typeck.c (complete_type): Also complete the type of the elements of
251 arrays with an unspecified bound.
253 2016-05-24 Paolo Carlini <paolo.carlini@oracle.com>
256 * typeck2.c (check_narrowing): Check pedwarn return value.
258 2016-05-24 Jakub Jelinek <jakub@redhat.com>
261 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>:
262 For OMP_CLAUSE_LINEAR_REF don't require type to be
265 2016-05-24 Richard Biener <rguenther@suse.de>
269 * expr.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
270 * constexpr.c (cxx_eval_array_reference): Handle indexed
272 * typeck.c (cp_build_array_ref): Adjust.
274 2016-05-23 Jason Merrill <jason@redhat.com>
277 * constexpr.c (cxx_eval_call_expression): Check for
278 fun == current_function_decl again.
281 * cp-gimplify.c (cp_fold) [INDIRECT_REF]: Call
282 maybe_undo_parenthesized_ref.
285 * pt.c (tsubst_copy): Just return a local variable from
286 non-template context. Don't call rest_of_decl_compilation for
287 duplicated static locals.
288 (tsubst_decl): Set DECL_CONTEXT of local static from another
291 2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
294 * method.c (forward_parm): Use cp_build_reference_type.
296 2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
299 * parser.c (cp_parser_initializer): Use check_for_bare_parameter_packs.
301 2016-05-23 Paolo Carlini <paolo.carlini@oracle.com>
303 * pt.c (check_for_bare_parameter_packs): Improve error message
304 location for expressions.
306 2016-05-20 Nathan Sidwell <nathan@acm.org>
308 * constexpr.c (cxx_bind_parameters_in_call): Avoid gratuitous if
310 (cxx_eval_call_expression): Fix comment grammar.
312 2016-05-20 Paolo Carlini <paolo.carlini@oracle.com>
315 * decl.c (cp_finish_decl): Check do_auto_deduction return value
316 and return immediately in case of erroneous code.
318 2016-05-19 Marek Polacek <polacek@redhat.com>
321 * pt.c (unify_template_argument_mismatch): Use %qE instead of %qD.
323 2016-05-19 Jason Merrill <jason@redhat.com>
326 * pt.c (fn_type_unification): Add outer template args if needed.
327 (type_unification_real): Handle getting full args.
329 2016-05-19 David Malcolm <dmalcolm@redhat.com>
332 * parser.c (cp_parser_operator): For array new/delete, check that
333 cp_parser_require returned a non-NULL token before dereferencing
336 2016-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
338 * decl.c (finish_enum_value_list): Use the specified mode.
340 2016-05-18 Jason Merrill <jason@redhat.com>
342 * pt.c (value_dependent_expression_p): Tweak new cases to better
343 match the wording in the standard.
345 2016-05-18 Paolo Carlini <paolo.carlini@oracle.com>
348 * parser.c (cp_parser_template_id): Don't call cp_lexer_peek_nth_token
349 when the previous cp_lexer_peek_token returns CPP_EOF.
351 2016-05-18 Paolo Carlini <paolo.carlini@oracle.com>
354 * call.c (convert_like_real): Check that we are actually converting
357 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
359 * decl.c (grokdeclarator): Remove errmsg and use of
360 targetm.invalid_return_type.
361 (grokparms): Remove errmsg and use of
362 targetm.invalid_parameter_type.
364 2016-05-13 Jason Merrill <jason@redhat.com>
368 * pt.c (tsubst_decl): Use uses_template_parms.
369 (instantiate_template_1): Handle non-dependent calls in templates.
370 (value_dependent_expression_p): Handle BASELINK, FUNCTION_DECL.
371 (type_dependent_expression_p): Only consider innermost template args.
372 (dependent_template_arg_p): Check enclosing class of a template here.
373 (dependent_template_p): Not here.
374 (type_dependent_object_expression_p): New.
375 * typeck.c (finish_class_member_access_expr): Use it.
376 * parser.c (cp_parser_postfix_expression): Use it.
377 (cp_parser_postfix_dot_deref_expression): Use it. Use comptypes
378 to detect the current instantiation.
379 (cp_parser_lookup_name): Really implement DR 141.
380 * search.c (lookup_field_r): Prefer a dependent using-declaration.
381 (any_dependent_bases_p): Split out from...
382 * name-lookup.c (do_class_using_decl): ...here.
383 * call.c (build_new_method_call_1): Use it.
384 * semantics.c (finish_call_expr): 'this' doesn't make a call dependent.
385 * tree.c (non_static_member_function_p): Remove.
386 * typeck2.c (build_x_arrow): Use dependent_scope_p.
388 * parser.c (cp_parser_postfix_dot_deref_expression): Use
389 complete_type_or_else for unknown_type_node, too.
391 2016-05-12 Marek Polacek <polacek@redhat.com>
394 * call.c (build_new_op_1): Pass LOC to cp_build_modify_expr.
395 * cp-tree.h (cp_build_modify_expr): Update declaration.
396 (cxx_incomplete_type_error, cxx_incomplete_type_diagnostic): New inline
398 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Pass INPUT_LOCATION to
399 cp_build_modify_expr.
400 * decl2.c (set_guard): Likewise.
401 (handle_tls_init): Likewise.
402 * init.c (perform_member_init): Likewise.
403 (expand_virtual_init): Likewise.
404 (build_new_1): Likewise.
405 (build_vec_delete_1): Likewise.
406 (get_temp_regvar): Likewise.
407 (build_vec_init): Likewise.
408 * method.c (do_build_copy_assign): Likewise.
409 (assignable_expr): Likewise.
410 * semantics.c (finish_omp_for): Likewise.
411 * typeck.c (cp_build_binary_op): Pass LOCATION to pointer_diff and
413 (cp_pointer_int_sum): Add location parameter. Pass it down to
415 (pointer_diff): Add location parameter. Use it.
416 (build_modify_expr): Pass location down to cp_build_modify_expr.
417 (cp_build_modify_expr): Add location parameter. Use it.
418 (build_x_modify_expr): Pass location down to cp_build_modify_expr.
419 * typeck2.c (cxx_incomplete_type_diagnostic,
420 cxx_incomplete_type_error): Add location parameter.
422 2016-05-11 Marek Polacek <polacek@redhat.com>
425 * decl.c (duplicate_decls): Call diagnose_mismatched_decls.
427 2016-05-05 Jakub Jelinek <jakub@redhat.com>
429 * parser.c (cp_parser_selection_statement): For RID_SWITCH,
430 pass if_p instead of NULL to cp_parser_implicitly_scoped_statement.
432 2016-05-04 Marek Polacek <polacek@redhat.com>
434 * parser.c (cp_parser_selection_statement): Replace OPT_Wparentheses
435 with OPT_Wdangling_else.
437 2016-05-03 Martin Sebor <msebor@redhat.com>
440 * tree.c (builtin_valid_in_constant_expr_p): Treat BUILT_IN_FILE,
441 BUILT_IN_FUNCTION, and BUILT_IN_LINE as constant expressions.
443 2016-05-03 Marek Polacek <polacek@redhat.com>
446 * call.c (build_cxx_call): Pass location and vNULL down to
447 check_builtin_function_arguments.
449 2016-05-03 Richard Biener <rguenther@suse.de>
451 * Make-lang.in (cc1plus-checksum.c): For stage-final re-use
452 the checksum from the previous stage.
454 2016-05-02 David Malcolm <dmalcolm@redhat.com>
457 * typeck.c (finish_class_member_access_expr): When
458 giving a hint about a possibly-misspelled member name,
459 add a fix-it replacement hint.
461 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
463 * cp-tree.h (finish_omp_clauses): Update prototype.
464 * parser.c (cp_parser_oacc_all_clauses): Update call to
466 (cp_parser_omp_all_clauses): Likewise.
467 (cp_parser_omp_for_loop): Likewise.
468 (cp_omp_split_clauses): Likewise.
469 (cp_parser_oacc_cache): Likewise.
470 (cp_parser_oacc_loop): Likewise.
471 (cp_parser_omp_declare_target):
472 (cp_parser_cilk_simd_all_clauses): Likewise.
473 (cp_parser_cilk_for): Likewise.
474 * pt.c (tsubst_omp_clauses): Replace allow_fields and declare_simd
475 arguments with enum c_omp_region_type ort.
476 (tsubst_omp_clauses): Update calls to finish_omp_clauses.
477 (tsubst_omp_attribute): Update calls to tsubst_omp_clauses.
478 (tsubst_omp_for_iterator): Update calls to finish_omp_clauses.
479 (tsubst_expr): Update calls to tsubst_omp_clauses.
480 * semantics.c (finish_omp_clauses): Replace bool arguments
481 allow_fields, declare_simd, and is_cilk with bitmask ort.
482 (finish_omp_for): Update call to finish_omp_clauses.
484 2016-05-02 David Malcolm <dmalcolm@redhat.com>
487 * parser.c (cp_parser_class_head): Capture the start location;
488 use it to emit a fix-it insertion hint when complaining
489 about missing "template <> " in explicit specializations.
491 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
493 * init.c (build_new_1): Use shift operators instead of wi:: shifts.
495 2016-05-02 Richard Biener <rguenther@suse.de>
497 * decl.c (grokdeclarator): Properly insert a DECL_EXPR for
500 2016-04-29 Paolo Carlini <paolo.carlini@oracle.com>
503 * class.c (check_field_decl): Remove final int* parameter, change
504 the return type to bool; fix logic in order not to reject multiple
505 initialized fields in anonymous struct.
506 (check_field_decls): Adjust call.
508 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
511 * parser.c (cp_parser_oacc_loop): Don't augment mask with
512 OACC_LOOP_CLAUSE_MASK.
513 (cp_parser_oacc_kernels_parallel): Update call to
514 c_oacc_split_loop_clauses.
516 2016-04-28 Jason Merrill <jason@redhat.com>
518 Implement C++17 [[nodiscard]] attribute.
521 * parser.c (cp_parser_std_attribute): Handle [[nodiscard]].
522 * tree.c (handle_nodiscard_attribute): New.
523 (cxx_attribute_table): Add [[nodiscard]].
524 * cvt.c (cp_get_fndecl_from_callee, cp_get_callee_fndecl): New.
525 (maybe_warn_nodiscard): New.
526 (convert_to_void): Call it.
528 * cvt.c (cp_get_callee): New.
529 * constexpr.c (get_function_named_in_call): Use it.
530 * cxx-pretty-print.c (postfix_expression): Use it.
531 * except.c (check_noexcept_r): Use it.
532 * method.c (check_nontriv): Use it.
533 * tree.c (build_aggr_init_expr): Use it.
534 * cp-tree.h: Declare it.
536 2015-04-27 Ryan Burn <contact@rnburn.com>
537 Jeff Law <law@redhat.com>
541 * cp-gimplify.c (cp_gimplify_expr): Call cilk_cp_detect_spawn_and_unwrap
542 instead of cilk_detect_spawn_and_unwrap.
543 * cp-cilkplus.c (is_conversion_operator_function_decl_p): New.
545 (cilk_cp_detect_spawn_and_unwrap): New.
546 * lambda.c: Include cp-cilkplus.h.
547 * parser.c: Include cp-cilkplus.h.
548 * cp-tree.h (cpp_validate_cilk_plus_loop): Move prototype into...
549 * cp-cilkpus.h: New file.
551 2016-04-27 Nathan Sidwell <nathan@acm.org>
553 * constexpr.c (get_fundef_copy): Use the original function for
554 non-recursive evaluations.
555 (save_fundef_copy): Always expect a slot to be available.
557 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
559 * parser.c (cp_parser_postfix_expression): Call
560 warn_for_memset instead of warning directly here.
562 2016-04-26 Patrick Palka <ppalka@gcc.gnu.org>
565 * decl.c (build_enumerator): Set current_access_specifier when
566 declaring an enumerator belonging to an in-class enumeration.
567 * parser.c (cp_parser_check_access_in_redecleration): Also
568 consider in-class enumerations.
570 2016-04-26 Marek Polacek <polacek@redhat.com>
573 * call.c (build_conditional_expr_1): Call cp_stabilize_reference
574 instead of stabilize_reference.
575 (build_over_call): Likewise.
576 * cp-tree.h (cp_stabilize_reference): Declare.
577 * tree.c (cp_stabilize_reference): New function.
578 * typeck.c (cp_build_unary_op): Call cp_stabilize_reference instead of
580 (unary_complex_lvalue): Likewise.
581 (cp_build_modify_expr): Likewise.
583 2016-04-26 Jakub Jelinek <jakub@redhat.com>
586 * pt.c (build_non_dependent_expr): Use flag_checking > 1 instead of
589 2016-04-25 Jason Merrill <jason@redhat.com>
591 * tree.c (std_attribute_table): New.
592 (init_tree): Register it.
594 2016-04-22 Jason Merrill <jason@redhat.com>
596 * parser.c (cp_parser_perform_range_for_lookup): Decay the array.
598 2016-04-21 Patrick Palka <ppalka@gcc.gnu.org>
600 * name-lookup.c (free_saved_scope): New free list of saved_scope
602 (push_to_top_level): Attempt to reuse a saved_scope struct
603 from free_saved_scope instead of allocating a new one each time.
604 (pop_from_top_level_1): Chain the now-unused saved_scope structure
605 onto free_saved_scope.
607 2016-04-21 Paolo Carlini <paolo.carlini@oracle.com>
610 * semantics.c (process_outer_var_ref): Unconditionally return
611 error_mark_node when mark_used returns false.
613 2016-04-21 Marek Polacek <polacek@redhat.com>
616 * parser.c (cp_parser_enum_specifier): Check and possibly error for
619 2016-04-20 Nathan Sidwell <nathan@acm.org>
622 * init.c (build_vec_delete_1): Protect operator delete call in try
624 (build_delete): Likewise.
625 * optimize.c (build_delete_destructor_body): Likewise.
627 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
630 * cp-tree.h (finish_omp_clauses): Add new default argument.
631 * parser.c (cp_parser_cilk_simd_all_clauses): Use finish_omp_clauses
632 instead of c_finish_cilk_clauses.
633 * semantics.c (finish_omp_clauses): Add new argument. Allow
634 floating-point variables in the linear clause for Cilk Plus.
636 2016-04-20 Nathan Sidwell <nathan@acm.org>
638 * semantics.c (finish_compound_lteral): Don't wrap VECTOR_TYPEs in a
641 2016-04-19 Jason Merrill <jason@redhat.com>
644 * expr.c (mark_exp_read): Handle NON_DEPENDENT_EXPR.
645 * pt.c (make_pack_expansion): Call mark_exp_read.
646 * semantics.c (finish_id_expression): Call mark_type_use in
650 * call.c (implicit_conversion): If we choose a copy constructor
651 for list-initialization from the same type, the conversion is an
654 * constexpr.c (breaks): Handle EXIT_EXPR.
655 (cxx_eval_loop_expr): Handle COMPOUND_EXPR body.
656 (cxx_eval_constant_expression): Handle EXIT_EXPR, improve handling
661 * constexpr.c (potential_constant_expression_1): Handle LOOP_EXPR
664 * pt.c (tsubst_expr): Remove shadowing declaration.
665 (tsubst_pack_expansion): Add assert.
667 * semantics.c (add_decl_expr): Use DECL_SOURCE_LOCATION.
670 * name-lookup.c (qualified_lookup_using_namespace): Look through
673 2016-04-18 Michael Matz <matz@suse.de>
675 * class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
676 (layout_class_type): Ditto.
677 (build_base_field): Use SET_DECL_ALIGN.
678 (fixup_attribute_variants): Use SET_TYPE_ALIGN.
679 * decl.c (duplicate_decls): Use SET_DECL_ALIGN.
680 (record_unknown_type): Use SET_TYPE_ALIGN.
681 (cxx_init_decl_processing): Ditto.
682 (copy_type_enum): Ditto.
683 (grokfndecl): Use SET_DECL_ALIGN.
684 (copy_type_enum): Use SET_TYPE_ALIGN.
685 * pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN.
687 * tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN.
688 * lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN.
689 * method.c (implicitly_declare_fn): Use SET_DECL_ALIGN.
690 * rtti.c (emit_tinfo_decl): Ditto.
692 2016-04-18 Jason Merrill <jason@redhat.com>
696 * class.c (type_maybe_constexpr_default_constructor): New.
697 (type_has_constexpr_default_constructor): Revert.
699 2016-04-16 Sandra Loosemore <sandra@codesourcery.com>
703 * tree.c (cxx_attribute_table): Remove "com_interface" entry.
704 (handle_com_interface_attribute): Delete.
706 2016-04-15 Jason Merrill <jason@redhat.com>
709 * constexpr.c (get_fundef_copy): Handle null *slot.
712 * pt.c (tsubst_baselink): Give the new TEMPLATE_ID_EXPR
713 unknown_type_node, too.
715 2016-04-15 Jason Merrill <jason@redhat.com>
716 Nathan Sidwell <nathan@acm.org>
719 * constexpr.c (constexpr_call_table): Preserve in GC.
720 (struct fundef_copy, struct fundef_copies_table_t): Delete.
721 (fundef_copies_table): Preserve in GC. Change to pointer to
723 (maybe_initialize_fundef_copies_table): Adjust.
724 (get_fundef_copy): Return a TREE_LIST. Use non-inserting search.
725 (save_fundef_copy): Adjust for a TREE_LIST.
726 (cxx_eval_call_expression): Adjust for a fundef_copy TREE_LIST.
727 (fini_constexpr): New.
728 * cp-tree.h (fini_constexpr): Declare.
729 * decl2.c (c_parse_final_cleanups): Call fini_constexpr.
731 2016-04-15 Jakub Jelinek <jakub@redhat.com>
734 * parser.c (cp_parser_pragma): Add IF_P argument, pass it down
736 (cp_parser_declaration_seq_opt, cp_parser_member_specification_opt,
737 cp_parser_objc_interstitial_code, cp_parser_omp_declare_simd,
738 cp_parser_oacc_routine): Adjust cp_parser_pragma callers.
739 (cp_parser_statement): Likewise. Adjust cp_parser_cilk_for caller.
740 (cp_parser_omp_structured_block): Add IF_P argument, pass it down to
742 (cp_parser_oacc_data, cp_parser_oacc_host_data, cp_parser_oacc_loop,
743 cp_parser_oacc_kernels_parallel, cp_parser_omp_critical,
744 cp_parser_omp_simd, cp_parser_omp_for, cp_parser_omp_master,
745 cp_parser_omp_ordered, cp_parser_omp_parallel, cp_parser_omp_single,
746 cp_parser_omp_task, cp_parser_omp_taskgroup, cp_parser_omp_distribute,
747 cp_parser_omp_teams, cp_parser_omp_target_data, cp_parser_omp_target,
748 cp_parser_omp_taskloop, cp_parser_omp_construct,
749 cp_parser_cilk_grainsize, cp_parser_cilk_simd, cp_parser_cilk_for):
750 Add IF_P argument, pass it down where needed.
751 (cp_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
752 (cp_parser_omp_sections_scope): Adjust cp_parser_omp_structured_block
755 2016-04-14 Jason Merrill <jason@redhat.com>
758 * decl.c (cxx_maybe_build_cleanup): Handle non-decls.
759 * typeck2.c (split_nonconstant_init_1): Use it.
762 * class.c (type_has_constexpr_default_constructor): Return true
763 for an implicitly declared constructor.
766 * parser.c (cp_parser_init_declarator): Add auto_result parm.
767 (cp_parser_simple_declaration): Pass it.
768 (strip_declarator_types): New.
771 * pt.c (value_dependent_expression_p) [VAR_DECL]: A type-dependent
772 initializer also makes the variable value-dependent.
775 * constexpr.c (cxx_eval_store_expression): Also copy
776 CONSTRUCTOR_NO_IMPLICIT_ZERO.
778 2016-04-14 Martin Sebor <msebor@redhat.com>
783 * cp-tree.h, decl.c, init.c, typeck2.c: Revert.
785 2016-04-14 Jason Merrill <jason@redhat.com>
787 * call.c, decl.c, error.c, cp-tree.h, decl.c: Revert empty
788 parameter ABI change.
790 2016-04-13 Martin Sebor <msebor@redhat.com>
795 * cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
797 * decl.c (check_initializer, cp_finish_decl): Call them.
798 (reshape_init_r): Reject incompletely braced intializer-lists
800 * init.c (throw_bad_array_length, build_vla_check)
801 (build_vla_size_check, build_vla_init_check): Define new functions.
802 * typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
804 (store_init_value): Same.
806 2016-04-13 Jason Merrill <jason@redhat.com>
808 Warn about empty parameter ABI with -Wabi=9.
809 * call.c (empty_class_msg, mark_for_abi_warning)
810 (warn_empty_class_abi): New.
811 (build_call_a): Use them.
812 * decl.c (store_parm_decls): Use mark_for_abi_warning.
813 * error.c (pp_format_to_string): New.
815 Pass empty class parameters like C.
816 * call.c (pass_as_empty_struct, empty_class_arg): New.
817 (type_passed_as, build_x_va_arg): Use pass_as_empty_struct.
818 (build_call_a): Use empty_class_arg.
819 * cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New.
820 * decl.c (cxx_init_decl_processing): Create empty_struct_type.
822 2016-04-13 Jason Merrill <jason@redhat.com>
825 * decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE.
827 2016-04-13 Paolo Carlini <paolo.carlini@oracle.com>
830 * pt.c (resolve_typename_type): Fix typos in infinite recursion
833 2016-04-13 Jason Merrill <jason@redhat.com>
836 * pt.c (instantiation_dependent_uneval_expression_p): Split out
837 from instantiation_dependent_expression_p.
838 (value_dependent_expression_p): Use it for unevaluated operands.
839 (instantiation_dependent_r): Don't check value-dependence.
840 (instantiation_dependent_expression_p): Check
841 value-dependence of the expression as a whole.
842 * cp-tree.h: Declare instantiation_dependent_uneval_expression_p.
843 * semantics.c (finish_decltype_type): Use it.
845 * constexpr.c (potential_nondependent_constant_expression): New.
846 (potential_nondependent_static_init_expression): New.
847 (maybe_constant_value_1, fold_non_dependent_expr)
848 (maybe_constant_init): Use them.
849 * pt.c (instantiate_non_dependent_expr_sfinae)
850 (instantiate_non_dependent_or_null, convert_nontype_argument): Use
852 * cp-tree.h: Declare them.
854 2016-04-13 Jakub Jelinek <jakub@redhat.com>
857 * decl.c (pop_labels_1): Removed.
858 (note_label, sort_labels): New functions.
859 (pop_labels): During named_labels traversal, just push the slot
860 pointers into a vector, then qsort it by DECL_UID and only then
861 call pop_label and chain it into BLOCK_VARS.
863 2016-04-13 Jason Merrill <jason@redhat.com>
866 * cp-gimplify.c (cp_genericize_r): Expand PTRMEM_CST here.
867 (cp_gimplify_expr): Not here.
869 2016-04-12 Patrick Palka <ppalka@gcc.gnu.org>
872 * tree.c (lvalue_kind) [NON_DEPENDENT_EXPR]: Unconditionally
874 * typeck.c (build_x_conditional_expr): Unconditionally remember
875 that the result is an lvalue or xvalue.
877 2016-04-12 Jason Merrill <jason@redhat.com>
879 * class.c (is_really_empty_class): A zero-length array is empty.
880 An unnamed bit-field doesn't make a class non-empty.
882 2016-04-12 Paolo Carlini <paolo.carlini@oracle.com>
885 * parser.c (cp_parser_cache_defarg): When file ends in default
886 argument simply return error_mark_node.
888 2016-04-12 Nathan Sidwell <nathan@acm.org>
891 * constexpr.c (cxx_eval_bare_aggregate): Handle VECTOR_TYPE
894 2016-04-11 Jason Merrill <jason@redhat.com>
896 * mangle.c (decl_is_template_id): The template itself counts as a
899 2016-04-08 Patrick Palka <ppalka@gcc.gnu.org>
903 * constexpr.c (cxx_eval_outermost_expression): Call unshare_expr
904 on the result if it's not a CONSTRUCTOR.
906 2016-04-07 Patrick Palka <ppalka@gcc.gnu.org>
909 * constexpr.c (find_constructor): New function.
910 (unshare_constructor): New function.
911 (cxx_eval_call_expression): Use unshare_constructor instead of
913 (find_array_ctor_elt): Likewise.
914 (cxx_eval_vec_init_1): Likewise.
915 (cxx_eval_store_expression): Likewise.
916 (cxx_eval_constant_expression): Likewise.
918 2016-04-06 Patrick Palka <ppalka@gcc.gnu.org>
921 * cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid
922 potentially generating a future -Wparentheses warning in its
925 2016-04-06 Jason Merrill <jason@redhat.com>
927 * class.c (check_abi_tags): Fix function template handling.
929 2016-04-05 Nathan Sidwell <nathan@acm.org>
932 * class.c (fixup_may_alias): New.
933 (fixup_attribute_variants): Call it.
935 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
938 * constexpr.c (struct fundef_copy): New struct.
939 (struct fundef_copies_table_t): New struct.
940 (fundef_copies_table): New static variable.
941 (maybe_initialize_fundef_copies_table): New static function.
942 (get_fundef_copy): New static function.
943 (save_fundef_copy): New static function.
944 (cxx_eval_call_expression): Use get_fundef_copy, and
946 (constexpr_call_table): Add "deletable" GTY marker.
948 2016-04-05 Patrick Palka <ppalka@gcc.gnu.org>
951 * cp-tree.h (class cache_map): Remove.
952 * constexpr.c (cv_cache): Change type to
953 GTY((deletable)) hash_map<tree, tree> *.
954 (maybe_constant_value): Adjust following the change to cv_cache.
955 (clear_cv_cache): New static function.
956 (clear_cv_and_fold_caches): Use it.
957 * cp-gimplify.c (fold_cache): Change type to
958 GTY((deletable)) hash_map<tree, tree> *.
959 (clear_fold_cache): Adjust following the change to fold_cache.
962 2016-04-02 Martin Sebor <msebor@redhat.com>
968 * constexpr.c (diag_array_subscript): New function.
969 (cxx_eval_array_reference): Detect out of bounds array indices.
971 2016-04-01 Jason Merrill <jason@redhat.com>
975 * pt.c (instantiate_decl): A function isn't fully defined if
976 DECL_INITIAL is error_mark_node.
977 * constexpr.c (cxx_eval_call_expression): Likewise.
979 2016-04-01 Jakub Jelinek <jakub@redhat.com>
980 Marek Polacek <polacek@redhat.com>
983 * init.c (warn_placement_new_too_small): Test whether
984 DECL_SIZE_UNIT or TYPE_SIZE_UNIT are integers that fit into uhwi.
986 2016-04-01 Nathan Sidwell <nathan@acm.org>
989 * decl.c (check_redeclaration_exception_specification): Check
990 regardless of -fno-exceptions.
991 * typeck2.c (merge_exception_specifiers): Relax assert by checking
994 2016-03-31 Nathan Sidwell <nathan@acm.org>
996 * decl.c (start_preparsed_function): Remove unnecessary bracing.
997 (finish_destructor_body): Don't emit operator delete here.
999 2016-03-31 Nathan Sidwell <nathan@acm.org>
1002 * constexpr.c (cxx_eval_store_expression): Keep CONSTRUCTOR
1003 elements in field order.
1005 2016-03-31 Marek Polacek <polacek@redhat.com>
1008 * decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1010 2016-03-31 Richard Biener <rguenther@suse.de>
1013 * typeck.c (cp_build_binary_op): Fix operand order of vector
1014 conditional in truth op handling.
1016 2016-03-29 Jason Merrill <jason@redhat.com>
1019 * decl.c (make_rtl_for_nonlocal_decl): Don't defer local statics
1020 in constexpr functions.
1022 2016-03-28 Jason Merrill <jason@redhat.com>
1027 * decl.c, pt.c, constexpr.c: Revert last patch.
1029 2016-03-25 Jason Merrill <jason@redhat.com>
1030 Martin Liška <mliska@suse.cz>
1035 * decl.c (cp_fname_init): Decay the initializer to pointer.
1036 (cp_make_fname_decl): Set DECL_DECLARED_CONSTEXPR_P,
1037 DECL_VALUE_EXPR, DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1038 Don't call cp_finish_decl.
1039 * pt.c (tsubst_expr) [DECL_EXPR]: Set DECL_VALUE_EXPR,
1040 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. Don't call cp_finish_decl.
1041 * constexpr.c (cxx_eval_constant_expression) [VAR_DECL]:
1042 Handle DECL_VALUE_EXPR.
1044 2016-03-24 Jason Merrill <jason@redhat.com>
1047 * constexpr.c (cxx_eval_bare_aggregate): Handle PMFs.
1050 * constexpr.c (cxx_eval_call_expression): Don't cache result if
1053 2016-03-24 Patrick Palka <ppalka@gcc.gnu.org>
1056 * tree.c (build_cplus_array_type): Determine type-dependentess
1057 with uses_template_parms instead of with dependent_type_p.
1059 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
1062 * typeck.c (process_init_constructor_union): If the initializer
1063 is empty, use the union's NSDMI if it has one.
1065 2016-03-23 Patrick Palka <ppalka@gcc.gnu.org>
1068 * pt.c (tsubst_copy) [PARM_DECL]: Handle the use of 'this' in an
1069 NSDMI that's part of an aggregrate initialization.
1071 2016-03-23 Jakub Jelinek <jakub@redhat.com>
1074 * constexpr.c (cxx_eval_vec_init_1): Reuse CONSTRUCTOR initializers
1075 for 1..max even for multi-dimensional arrays. Call unshare_expr
1079 * constexpr.c (cxx_eval_constant_expression): Diagnose overflow
1080 on TREE_OVERFLOW constants.
1083 * cp-gimplify.c (genericize_omp_for_stmt): Don't walk OMP_FOR_CLAUSES
1084 for OMP_TASKLOOP here.
1085 (cp_genericize_r): Handle OMP_TASKLOOP like OMP_TASK, except do call
1086 genericize_omp_for_stmt instead of cp_walk_tree on OMP_BODY.
1088 2016-03-23 Alexandre Oliva <aoliva@redhat.com>
1089 Jason Merrill <jason@redhat.com>
1090 Jakub Jelinek <jakub@redhat.com>
1093 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): Remove.
1094 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): Remove.
1095 (finish_function): Don't set or test them.
1096 * decl2.c (mark_used): Don't handle defer_mark_used_calls.
1098 2016-03-23 Jason Merrill <jason@redhat.com>
1101 * constexpr.c (cxx_eval_call_expression): Catch invalid recursion.
1103 2016-03-23 Marek Polacek <polacek@redhat.com>
1106 * pt.c (canonicalize_type_argument): Use OPT_Wignored_attributes.
1108 2016-03-22 Ilya Enkovich <enkovich.gnu@gmail.com>
1110 * call.c (build_conditional_expr_1): Always use original
1111 condition type for vector type checks and build.
1113 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
1116 * pt.c (tsubst_decl): Clear the DECL_MODE of the new decl.
1118 2016-03-22 Patrick Palka <ppalka@gcc.gnu.org>
1121 * constexpr.c (non_const_var_error): Check
1122 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1124 2016-03-21 Richard Henderson <rth@redhat.com>
1127 * decl.c (notice_forced_label_r): New.
1128 (cp_finish_decl): Use it.
1130 2016-03-21 Jason Merrill <jason@redhat.com>
1133 * cp-gimplify.c (cp_fold) [COND_EXPR]: Handle bit-fields.
1135 2016-03-18 Jason Merrill <jason@redhat.com>
1138 * constexpr.c (cxx_eval_call_expression): Fix trivial copy.
1141 * class.c (vptr_via_virtual_p): New.
1142 (most_primary_binfo): Factor out of build_rtti_vtbl_entries.
1143 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Don't clear
1144 a vptr from any virtual base in a not-in-charge 'structor.
1146 * decl.c (build_clobber_this): Factor out of
1147 start_preparsed_function and begin_destructor_body. Handle
1148 virtual bases better.
1150 * class.c (build_if_in_charge): Split out from build_base_path.
1151 * init.c (expand_virtual_init, expand_default_init): Use it.
1152 * call.c (build_special_member_call): Use it.
1154 2016-03-18 Jakub Jelinek <jakub@redhat.com>
1157 * init.c (build_new_1): Complain and return error_mark_node
1158 if alloc_fn is not _Jv_AllocObject function returning pointer.
1160 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
1163 * search.c (adjust_result_of_qualified_name_lookup): Don't
1164 update the BASELINK_BINFO of DECL if the second call
1165 to lookup_base fails.
1167 2016-03-18 Patrick Palka <ppalka@gcc.gnu.org>
1170 * parser.c (cp_parser_lambda_expression): Move call to
1171 pop_deferring_access_checks ahead of the call to
1172 cp_parser_end_tentative_firewall.
1174 2016-03-17 Jakub Jelinek <jakub@redhat.com>
1177 * cp-tree.h (magic_varargs_p): Return int instead of bool.
1178 * call.c (magic_varargs_p): Return int instead of bool, return 2 for
1179 Cilk+ reductions, otherwise 1 for magic varargs and 0 for normal
1181 (build_over_call): If magic_varargs_p == 2, call reject_gcc_builtin,
1182 if magic_varargs_p == 1, call decay_conversion
1183 instead of mark_type_use. Don't store error_mark_node arguments to
1184 argarray, instead return error_mark_node.
1187 * decl.c (begin_destructor_body): Don't insert clobber if
1188 is_empty_class (current_class_type).
1190 2016-03-17 Marek Polacek <polacek@redhat.com>
1193 * typeck.c (warn_for_null_address): New function.
1194 (cp_build_binary_op): Call it.
1196 2016-03-16 Jason Merrill <jason@redhat.com>
1199 * decl.c (start_preparsed_function): Don't clobber an empty base.
1201 2016-03-16 Jakub Jelinek <jakub@redhat.com>
1204 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Conditionalize
1205 BINFO_VIRTUAL_P vtable clearing on current_in_charge_parm.
1208 * cp-ubsan.c (cp_ubsan_maybe_initialize_vtbl_ptrs): Temporarily
1209 set in_base_initializer.
1211 2016-03-15 Marek Polacek <polacek@redhat.com>
1214 * tree.c (strip_typedefs): Call strip_typedefs again on the
1215 DECL_ORIGINAL_TYPE result.
1217 2016-03-15 Jason Merrill <jason@redhat.com>
1220 * pt.c (instantiate_decl): Fix call to variable_template_p.
1223 * pt.c (for_each_template_parm_r): Always walk into TYPENAME_TYPE.
1225 2016-03-14 Casey Carter <casey@carter.net>
1226 Jason Merrill <jason@redhat.com>
1228 P0184R0: Generalizing the Range-Based For Loop
1229 * parser.c (cp_convert_range_for): Set the type of __end separately.
1230 (cp_parser_perform_range_for_lookup): Allow different begin/end
1231 types if they are comparable.
1233 2016-03-12 Patrick Palka <ppalka@gcc.gnu.org>
1236 * semantics.c (force_paren_expr): Just build a PAREN_EXPR when
1237 processing_template_decl and EXPR is a SCOPE_REF.
1239 2016-03-10 Patrick Palka <ppalka@gcc.gnu.org>
1240 Jakub Jelinek <jakub@redhat.com>
1243 * constexpr.c (cxx_eval_vec_init_1): For pre_init case, reuse
1244 return value from cxx_eval_constant_expression from earlier
1245 elements if it is valid constant initializer requiring no
1248 2016-03-10 Marek Polacek <polacek@redhat.com>
1251 * cp-gimplify.c (cp_fold): Handle UNARY_PLUS_EXPR.
1253 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1255 * parser.c (cp_parser_oacc_loop): Update cclauses and clauses
1256 when calling c_finish_omp_clauses.
1258 2016-03-08 Jason Merrill <jason@redhat.com>
1260 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
1261 diagnostic for use of "concept".
1262 (cp_parser_requires_clause_opt): And "requires".
1263 (cp_parser_type_parameter, cp_parser_late_return_type_opt)
1264 (cp_parser_explicit_template_declaration): Adjust.
1265 * Make-lang.in (check-c++-all): Add "concepts" to std list.
1267 P0036R0: Unary Folds and Empty Parameter Packs
1268 * pt.c (expand_empty_fold): Remove special cases for *,+,&,|.
1270 2016-03-08 Jakub Jelinek <jakub@redhat.com>
1273 * constexpr.c (cxx_eval_loop_expr): Forget saved values of SAVE_EXPRs
1274 even after the last iteration of the loop.
1276 * decl.c (duplicate_decls): Fix spelling - becuase -> because.
1278 2016-03-07 Patrick Palka <ppalka@gcc.gnu.org>
1281 * pt.c (get_template_info): Handle PARM_DECL.
1282 (template_class_depth): Check DECL_P instead of
1283 VAR_OR_FUNCTION_DECL_P.
1285 2016-03-05 Jason Merrill <jason@redhat.com>
1288 * constexpr.c (cxx_eval_store_expression): Replace
1289 CONSTRUCTOR_ELTS in nested CONSTRUCTORs, too.
1291 2016-03-05 Patrick Palka <ppalka@gcc.gnu.org>
1294 * pt.c (template_class_depth): Given a lambda type, iterate
1295 into its LAMBDA_TYPE_EXTRA_SCOPE field instead of its
1296 TYPE_CONTEXT. Given a VAR_DECL, iterate into its
1299 2016-03-04 Jason Merrill <jason@redhat.com>
1302 * cp-tree.h (COND_EXPR_IS_VEC_DELETE): New.
1303 * init.c (build_vec_delete_1): Set it.
1304 * constexpr.c (potential_constant_expression_1) [COND_EXPR]: Check it.
1306 2016-03-04 Jakub Jelinek <jakub@redhat.com>
1308 * decl.c (start_preparsed_function): Don't emit start clobber at the
1309 start of constructor clones.
1312 * cp-tree.h (cp_ubsan_maybe_initialize_vtbl_ptrs): New prototype.
1313 * decl.c (start_preparsed_function): Call
1314 cp_ubsan_maybe_initialize_vtbl_ptrs if needed.
1315 * cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs,
1316 cp_ubsan_maybe_initialize_vtbl_ptrs): New functions.
1318 2016-03-04 Jason Merrill <jason@redhat.com>
1321 * constexpr.c (cxx_eval_component_reference): Further tweak.
1323 * constexpr.c (struct constexpr_ctx): Add save_exprs field.
1324 (cxx_eval_loop_expr): Discard SAVE_EXPR values before looping.
1325 (cxx_eval_constant_expression) [SAVE_EXPR]: Add it to the set.
1326 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Initialize.
1329 * tree.c (strip_typedefs): Handle TYPENAME_TYPE lookup finding the
1332 2016-03-03 Jason Merrill <jason@redhat.com>
1334 * method.c (synthesized_method_walk): operator= can also be constexpr.
1336 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Get
1337 LAMBDA_EXPR_RETURN_TYPE from the instantiated closure.
1340 * pt.c (copy_template_args): New.
1341 (tsubst_pack_expansion): Use it.
1343 * call.c (build_aggr_conv): Use get_nsdmi.
1346 * typeck.c (build_static_cast_1): Avoid folding back to lvalue.
1349 * constexpr.c (cxx_eval_component_reference): Just return an empty
1350 CONSTRUCTOR for an empty class.
1352 2016-03-01 Jason Merrill <jason@redhat.com>
1355 * parser.c (cp_parser_requires_clause): Call
1356 check_for_bare_parameter_packs.
1359 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
1363 * constexpr.c (cxx_eval_call_expression): Unshare arg.
1364 (cxx_eval_constant_expression) [DECL_EXPR]: Unshare init.
1365 [TARGET_EXPR]: Unshare init.
1367 2016-03-01 Patrick Palka <ppalka@gcc.gnu.org>
1371 * pt.c (tsubst_baselink): Reinstate the check for an invalid
1374 2016-02-28 Jason Merrill <jason@redhat.com>
1377 * constexpr.c (cxx_eval_store_expression): Unshare init.
1379 2016-02-26 Jason Merrill <jason@redhat.com>
1382 * pt.c (make_argument_pack): New.
1383 (tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
1384 (tsubst_copy_and_build): Likewise.
1386 2016-02-25 Jason Merrill <jason@redhat.com>
1389 * cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
1390 * tree.c (build_aggr_init_expr): Set it.
1391 * semantics.c (simplify_aggr_init_expr): Check it.
1392 * cp-gimplify.c (cp_genericize_r): Don't walk into
1393 a call/aggr_init from a thunk.
1396 * method.c (forward_parm): Handle parameter packs.
1397 * lambda.c (maybe_add_lambda_conv_op): Use it for them.
1400 * constexpr.c (cxx_eval_component_reference): Don't complain about
1401 unevaluated empty classes.
1404 * tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.
1406 2016-02-25 Patrick Palka <ppalka@gcc.gnu.org>
1409 * cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
1410 (maybe_undo_parenthesized_ref): Declare.
1411 * semantics.c (maybe_undo_parenthesized_ref): Split out from
1413 (finish_call_expr): Use it.
1414 * typeck.c (check_return_expr): Use it.
1415 * pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
1416 REF_PARENTHESIZED_P flag.
1418 2016-02-24 Jakub Jelinek <jakub@redhat.com>
1421 * class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
1423 * init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
1425 * cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
1426 unless they are folded into INTEGER_CST, error_mark_node or some
1427 comparison with NULL, avoid folding them and use either the original
1428 comparison or non-folded comparison of folded arguments.
1429 * cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
1430 comparison, don't fold the comparison right away.
1432 2016-02-24 Jason Merrill <jason@redhat.com>
1435 * friend.c (make_friend_class): Likewise.
1436 * decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.
1438 2016-02-24 Jason Merrill <jason@redhat.com>
1441 * pt.c (instantiate_class_template_1): Set
1442 processing_template_decl before substituting friend_type.
1444 016-02-24 Martin Sebor <msebor@redhat.com>
1447 * tree.c (build_ctor_subob_ref): Compare types' main variants
1448 instead of the types as they are.
1450 2016-02-24 Jason Merrill <jason@redhat.com>
1452 * decl.c (start_preparsed_function): Condition ctor clobber on
1453 flag_lifetime_dse > 1.
1455 * cp-gimplify.c (cp_fold): Don't fold constexpr calls if -fno-inline.
1457 2016-02-19 Jason Merrill <jason@redhat.com>
1460 * call.c (remaining_arguments): No longer static.
1461 * cp-tree.h: Declare it.
1462 * pt.c (more_specialized_fn): Use it.
1464 2016-02-19 Jakub Jelinek <jakub@redhat.com>
1465 Bernd Edlinger <bernd.edlinger@hotmail.de>
1467 * Make-lang.in: Invoke gperf with -L C++.
1468 * cfns.gperf: Remove prototypes for hash and libc_name_p
1470 * cfns.h: Regenerated.
1471 * except.c (nothrow_libfn_p): Adjust.
1473 2016-02-19 Jakub Jelinek <jakub@redhat.com>
1476 * rtti.c (ifnonnull): Set TREE_NO_WARNING on the condition, use
1477 NE_EXPR instead of EQ_EXPR and swap last two arguments on COND_EXPR.
1479 2016-02-19 Patrick Palka <ppalka@gcc.gnu.org>
1482 * pt.c (tsubst_baselink): Don't diagnose an invalid constructor
1484 * semantics.c (finish_call_expr): Don't assume a constructor
1485 call is dependent if only the "this" pointer is dependent. When
1486 building a constructor call, always use a dummy object.
1488 2016-02-19 Jakub Jelinek <jakub@redhat.com>
1491 * init.c (build_vec_delete_1): Set TREE_NO_WARNING on the NE_EXPR
1493 * cp-gimplify.c (cp_fold): Propagate TREE_NO_WARNING from binary
1494 operators if folding preserved the binop, just with different
1498 * parser.c (cp_parser_std_attribute_spec_seq): Don't assume
1499 attr_spec is always single element chain, chain all the attributes
1500 properly together in the right order.
1502 2016-02-18 Jason Merrill <jason@redhat.com>
1504 * mangle.c (maybe_check_abi_tags): Add for_decl parm. Call
1506 (mangle_decl): Call maybe_check_abi_tags for function scope.
1507 (mangle_guard_variable): Call maybe_check_abi_tags here.
1508 (write_guarded_var_name): Not here.
1510 2016-02-17 Jason Merrill <jason@redhat.com>
1513 * constexpr.c (build_constexpr_constructor_member_initializers):
1514 Handle an additional STATEMENT_LIST.
1517 * constexpr.c (cxx_eval_bare_aggregate): Fix 'changed' detection.
1520 * decl2.c (reset_type_linkage_2): Look through member templates.
1522 2016-02-17 Jakub Jelinek <jakub@redhat.com>
1525 * init.c (build_delete): Set TREE_NO_WARNING on ifexp.
1527 2016-02-17 Jason Merrill <jason@redhat.com>
1530 * method.c (forward_parm): Split out from...
1531 (add_one_base_init): ...here.
1532 * lambda.c (maybe_add_lambda_conv_op): Use it.
1534 2016-02-16 Jason Merrill <jason@redhat.com>
1538 * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c,
1539 tree.c, typeck2.c: Revert earlier changes.
1540 * parser.c (cp_parser_lookup_name): Ignore namespace-scope
1541 non-type templates after -> or .
1543 2016-02-16 Jakub Jelinek <jakub@redhat.com>
1546 * typeck.c (cp_build_binary_op): Revert 2015-09-09 change.
1548 2016-02-16 Jason Merrill <jason@redhat.com>
1551 * name-lookup.c (lookup_qualified_name): Add find_hidden parm.
1552 (set_decl_namespace): Pass it. Complain about finding a hidden friend.
1553 * name-lookup.h: Adjust.
1555 2016-02-16 James Norris <jnorris@codesourcery.com>
1557 * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking.
1558 * semantics.c (finish_omp_clauses): Add deviceptr checking.
1560 2016-02-15 Jakub Jelinek <jakub@redhat.com>
1563 * init.c (expand_default_init): Only call reshape_init
1564 in the direct-initialization from an initializer list case.
1566 2016-02-15 Jason Merrill <jason@redhat.com>
1569 * semantics.c (finish_call_expr): Implicit 'this' does not make
1571 * search.c (any_dependent_bases_p): Split out...
1572 * name-lookup.c (do_class_using_decl): ...from here.
1573 * call.c (build_new_method_call_1): Don't complain about missing object
1574 if there are dependent bases. Tweak error.
1575 * tree.c (non_static_member_function_p): Remove.
1576 * pt.c (type_dependent_expression_p): A member template of a
1577 dependent type is dependent.
1578 * cp-tree.h: Adjust.
1581 * constexpr.c (verify_ctor_sanity): Remove CONSTRUCTOR_NELTS check.
1583 2016-02-12 Patrick Palka <ppalka@gcc.gnu.org>
1586 * pt.c (lookup_and_finish_template_variable): New function,
1588 (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: ... here. Use it.
1589 (tsubst_qualified_id): Consider that EXPR might be a variable
1591 * typeck.c (check_template_keyword): Don't emit an error
1592 if DECL is a variable template.
1594 2016-02-12 Jakub Jelinek <jakub@redhat.com>
1596 * error.c: Spelling fixes - behaviour -> behavior and
1597 neighbour -> neighbor.
1599 * typeck.c (cp_build_binary_op): Fix up behavior spelling in
1601 * init.c (build_delete): Likewise.
1603 2016-02-11 Jakub Jelinek <jakub@redhat.com>
1606 * typeck.c (cp_build_binary_op): cp_fully_fold integer_zerop
1607 arguments for -Waddress warning. Fix up formatting.
1609 2016-02-11 Paolo Carlini <paolo.carlini@oracle.com>
1612 * pt.c (lookup_template_class_1): Check tsubst return value for
1615 2016-02-10 Jason Merrill <jason@redhat.com>
1618 * pt.c (resolve_nondeduced_context): Add complain parm.
1619 (do_auto_deduction): Pass it.
1620 * cvt.c (convert_to_void): Likewise.
1621 * decl.c (cp_finish_decl): Likewise.
1622 * init.c (build_new): Likewise.
1623 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1624 * semantics.c (finish_decltype_type): Likewise.
1625 * typeck.c (decay_conversion): Likewise.
1626 * cp-tree.h: Adjust declaration.
1627 * call.c (standard_conversion): Add complain parm, pass it along.
1628 (implicit_conversion): Pass it.
1631 * name-lookup.c (ambiguous_decl): Call remove_hidden_names.
1632 (lookup_name_real_1): Likewise.
1633 (remove_hidden_names): Handle non-functions too.
1636 * parser.c (cp_parser_lookup_name): When looking for a template
1637 after . or ->, only consider class templates.
1638 (cp_parser_postfix_dot_deref_expression): Handle the current
1639 instantiation. Remember a dependent object expression.
1640 * typeck2.c (build_x_arrow): Handle the current instantiation.
1642 * ptree.c (debug_tree): Implement for cp_expr.
1644 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
1647 * parser.c (cp_parser_simple_type_specifier): Make the check
1648 for disambiguating between an 'auto' placeholder and an implicit
1649 template parameter more robust.
1651 2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
1655 * decl2.c (mark_used): When given a TEMPLATE_DECL, return after
1656 setting its TREE_USED flag.
1658 2016-02-08 Jason Merrill <jason@redhat.com>
1661 * name-lookup.c (do_nonmember_using_decl): Leave anticipated
1664 2016-02-08 Jakub Jelinek <jakub@redhat.com>
1667 * parser.c (cp_parser_omp_declare_reduction): Set assembler name
1668 of the DECL_OMP_DECLARE_REDUCTION_P decls.
1670 2016-02-08 Marek Polacek <polacek@redhat.com>
1673 * constexpr.c (clear_cv_and_fold_caches): Renamed from clear_cv_cache.
1674 Call clear_fold_cache.
1675 * cp-tree.h: Adjust declaration.
1676 * decl.c (finish_enum_value_list): Call clear_cv_and_fold_caches
1677 rather than clear_cv_cache and clear_fold_cache.
1678 * typeck2.c (store_init_value): Call clear_cv_and_fold_caches.
1680 2016-02-08 Jason Merrill <jason@redhat.com>
1682 * cp-tree.h (CONV_FOLD, CONV_BACKEND_CONVERT): New.
1683 * cvt.c (convert): Pass CONV_BACKEND_CONVERT.
1684 (ocp_convert): Use *_maybe_fold.
1685 (cp_convert_to_pointer): Add dofold parameter.
1686 * cp-gimplify.c (cp_fold) [CONVERT_EXPR]: Call convert.
1688 2016-02-05 Martin Sebor <msebor@redhat.com>
1691 * init.c (find_field_init): New function.
1692 (warn_placement_new_too_small): Call it. Handle one-element arrays
1693 at ends of structures special.
1695 2016-02-05 Jason Merrill <jason@redhat.com>
1698 * semantics.c (finish_expr_stmt): If expr is error_mark_node,
1699 make sure we've seen_error().
1701 2016-02-05 Patrick Palka <ppalka@gcc.gnu.org>
1704 * pt.c (tsubst_baselink): Diagnose an invalid constructor call
1705 if lookup_fnfields returns NULL_TREE and the name being looked
1706 up has the form A::A.
1708 2016-02-04 Patrick Palka <ppalka@gcc.gnu.org>
1710 * constexpr.c (cxx_eval_binary_expression): Fold equality
1711 comparisons involving PTRMEM_CSTs.
1713 2016-02-04 Jakub Jelinek <jakub@redhat.com>
1715 * class.c (find_flexarrays): Don't declare dom variable.
1716 (diagnose_flexarray): Likewise.
1718 2016-02-02 Martain Sebor <msebor@redhat.com>
1725 * class.c (walk_subobject_offsets): Avoid testing the upper bound
1726 of a flexible array member for equality to null.
1727 (find_flexarrays): Remove spurious whitespace introduced in r231665.
1728 (diagnose_flexarrays): Avoid checking the upper bound of arrays.
1729 (check_flexarrays): Same.
1730 * decl.c (compute_array_index_type): Avoid special case for flexible
1732 (grokdeclarator): Avoid calling compute_array_index_type for flexible
1734 * error.c (dump_type_suffix): Revert changes introduced in r231665
1735 and rendered unnecessary by the changes above.
1736 * pt.c (tsubst): Same.
1737 * tree.c (build_ctor_subob_ref): Handle flexible array members.
1738 * typeck2.c (digest_init_r): Revert changes introduced in r231665.
1739 (process_init_constructor_array): Same.
1740 (process_init_constructor_record): Same.
1742 2016-02-03 Patrick Palka <ppalka@gcc.gnu.org>
1745 * pt.c (try_one_overload): Handle comparing argument packs so
1746 that there is no conflict if we deduced more arguments of an
1747 argument pack than were explicitly specified.
1749 2016-01-31 Jakub Jelinek <jakub@redhat.com>
1750 Jason Merrill <jason@redhat.com>
1753 * tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
1754 function type if nothing is changing.
1756 2016-01-31 Jason Merrill <jason@redhat.com>
1759 * pt.c (partial_specialization_p, impartial_args): New.
1760 (instantiate_decl): Call impartial_args.
1762 * mangle.c (maybe_check_abi_tags): New.
1763 (write_guarded_var_name): Call it.
1764 (mangle_ref_init_variable): Call check_abi_tags.
1766 * pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
1767 between template and instantiation.
1769 2016-01-29 Jakub Jelinek <jakub@redhat.com>
1772 * decl.c (wrapup_globals_for_namespace): Warn about unused static
1773 function declarations.
1775 2016-01-29 Marek Polacek <polacek@redhat.com>
1779 * constexpr.c (cxx_eval_array_reference): Give the "array subscript
1780 out of bound" error earlier.
1781 * init.c (build_vec_init): Change NE_EXPR into GT_EXPR. Update the
1784 2016-01-29 Patrick Palka <ppalka@gcc.gnu.org>
1786 * name-lookup.c (begin_scope): After reusing a cp_binding_level
1787 structure, update free_binding_level before the structure's
1788 level_chain field gets cleared, not after.
1790 2016-01-28 Jason Merrill <jason@redhat.com>
1793 * search.c (dfs_walk_once, dfs_walk_once_r)
1794 (dfs_walk_once_accessible_r, dfs_walk_once_accessible): Use
1795 hash_set instead of BINFO_MARKED.
1796 (dfs_unmark_r): Remove.
1798 2016-01-28 Patrick Palka <ppalka@gcc.gnu.org>
1801 * parser.c (LEXER_DEBUGGING_ENABLED_P): New macro.
1802 (cp_lexer_debugging_p): Use it.
1803 (cp_lexer_start_debugging): Likewise.
1804 (cp_lexer_stop_debugging): Likewise.
1806 2016-01-27 Marek Polacek <polacek@redhat.com>
1809 * typeck.c (cp_build_binary_op): Promote operand to unsigned, if
1810 needed. Add -Wsign-compare warning.
1812 2016-01-27 Ryan Burn <contact@rnburn.com>
1815 * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
1816 superfluous post_p argument in call to
1817 cilk_gimplify_call_params_in_spawned_fn.
1819 2016-01-27 Marek Polacek <polacek@redhat.com>
1822 * constexpr.c (cxx_eval_constant_expression): Handle PTRMEM_CSTs
1823 wrapped in NOP_EXPRs.
1825 2016-01-27 Martin Sebor <msebor@redhat.com>
1828 * mangle.c (mangle_decl): Reference the correct (saved) version
1829 of the ABI in -Wabi diagnostics.
1831 2016-01-27 Marek Polacek <polacek@redhat.com>
1834 * constexpr.c (cxx_eval_array_reference): Evaluate the number of
1835 elements of the array.
1837 2016-01-26 Jason Merrill <jason@redhat.com>
1840 * constexpr.c (register_constexpr_fundef): Keep the un-massaged body.
1841 (cxx_eval_call_expression): Don't look through clones.
1842 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE of the alias.
1843 * semantics.c (expand_or_defer_fn_1): Keep DECL_SAVED_TREE of
1844 maybe-in-charge *tor.
1846 2016-01-26 Jason Merrill <jason@redhat.com>
1849 * constexpr.c (cxx_eval_bare_aggregate): Update TREE_CONSTANT
1850 and TREE_SIDE_EFFECTS.
1851 (cxx_eval_constant_expression) [CONSTRUCTOR]: Call
1852 verify_constructor_flags.
1854 2016-01-26 Jakub Jelinek <jakub@redhat.com>
1857 * cp-gimplify.c (cp_fold): If some operand folds to error_mark_node,
1858 return error_mark_node instead of building trees with error_mark_node
1861 2016-01-26 David Malcolm <dmalcolm@redhat.com>
1864 * error.c (print_instantiation_partial_context_line): Add missing
1865 newlines from output for the t == NULL case.
1866 (print_instantiation_partial_context): Remove call to pp_newline.
1868 2016-01-24 Patrick Palka <ppalka@gcc.gnu.org>
1871 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
1876 * decl.c (grokdeclarator): Don't decay array parameter type to
1877 a pointer type if it's dependent.
1878 (grokparms): Invoke strip_top_quals instead of directly invoking
1879 cp_build_qualified_type.
1880 * pt.c (decay_dependent_array_parm_type): New static function.
1881 (type_unification_real): Call decay_dependent_array_parm_type
1882 to decay a dependent array parameter type to its corresponding
1883 pointer type before unification.
1884 (more_specialized_fn): Likewise.
1885 (get_bindings): Likewise.
1886 * tree.c (cp_build_qualified_type): Trivial typofix in
1889 2016-01-23 Martin Sebor <msebor@redhat.com>
1893 * decl2.c (is_late_template_attribute): Handle dependent argument
1894 to attribute align and attribute vector_size.
1896 2016-01-21 Jason Merrill <jason@redhat.com>
1899 * lambda.c (lambda_capture_field_type): Handle 'this' specially
1900 for init-capture, too.
1903 * decl.c (type_is_deprecated): Don't look into a typedef.
1907 * decl.c (copy_type_enum): Respect TYPE_USER_ALIGN.
1910 * decl.c (start_enum): Add attributes parameter.
1911 * parser.c (cp_parser_enum_specifier): Pass it.
1912 * pt.c (lookup_template_class_1): Pass it.
1913 * cp-tree.h: Adjust.
1915 2016-01-19 Jason Merrill <jason@redhat.com>
1918 * pt.c (convert_template_argument): Handle VAR_DECL properly.
1920 2016-01-19 Marek Polacek <polacek@redhat.com>
1923 * constexpr.c (clear_cv_cache): New.
1924 * cp-gimplify.c (clear_fold_cache): New.
1925 * cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
1926 * decl.c (finish_enum_value_list): Call them.
1929 * pt.c (tsubst_copy): Mark elements in expanded vector as used.
1931 2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
1936 * decl.c (grokdeclarator): Don't decay array parameter type to
1937 a pointer type if it's dependent.
1938 (grokparms): Invoke strip_top_quals instead of directly invoking
1939 cp_build_qualified_type.
1940 * pt.c (decay_dependent_array_parm_type): New static function.
1941 (type_unification_real): Call decay_dependent_array_parm_type
1942 to decay a dependent array parameter type to its corresponding
1943 pointer type before unification.
1944 (more_specialized_fn): Likewise.
1945 (get_bindings): Likewise.
1946 * tree.c (cp_build_qualified_type): Trivial typofix in
1949 2016-01-18 Jason Merrill <jason@redhat.com>
1951 * cp-gimplify.c (cp_fold) [CONSTRUCTOR]: Don't clobber the input.
1953 * cp-gimplify.c (cp_fold): Remove unnecessary special cases.
1956 * cp-gimplify.c (cp_fold) [COND_EXPR]: Simplify. Do fold COND_EXPR.
1957 (contains_label_1, contains_label_p): Remove.
1959 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1962 * pt.c (type_dependent_expression_p): For a function template
1963 specialization, a type is dependent iff any of its template
1966 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1968 * cp-array-notation.c (cp_expand_cond_array_notations): Return
1969 error_mark_node only if find_rank failed, not if it was
1972 2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
1975 * tree.c (build_min_non_dep_call_vec): Don't retain the
1976 KOENIG_LOOKUP_P flag of the non-dependent expression that's
1978 (build_min_non_dep_op_overload): Instead, do it here.
1980 2016-01-15 Jakub Jelinek <jakub@redhat.com>
1983 * parser.h (cp_token): Remove pragma_kind field. Add comment
1984 with number of unused bits.
1985 * parser.c (eof_token): Remove pragma_kind field initializer.
1986 (cp_lexer_get_preprocessor_token): Don't set pragma_kind
1987 field, don't clear CPP_PRAGMA u.value.
1988 (cp_parser_pragma_kind): New function.
1989 (cp_parser_omp_sections_scope, cp_parser_oacc_kernels_parallel,
1990 cp_parser_omp_construct, cp_parser_initial_pragma,
1991 cp_parser_pragma): Use cp_parser_pragma_kind instead of accessing
1994 2016-01-15 Jason Merrill <jason@redhat.com>
1997 * call.c (build_cxx_call): Use fold_non_dependent_expr.
1999 * typeck2.c (cxx_incomplete_type_diagnostic): Use the location of
2003 * typeck.c (decay_conversion): Don't call mark_rvalue_use for
2004 array/function-to-pointer conversion. Call
2005 complete_type_or_maybe_complain for lvalue-to-rvalue conversion.
2006 * call.c (convert_like_real): Print call context if
2007 decay_conversion errors.
2009 2016-01-14 Tom de Vries <tom@codesourcery.com>
2011 PR tree-optimization/68773
2012 * parser.c (cp_parser_oacc_declare, cp_parser_omp_declare_target): Don't
2015 2016-01-14 Jason Merrill <jason@redhat.com>
2018 * constexpr.c (find_array_ctor_elt): Handle splitting RANGE_EXPR.
2020 2016-01-12 Marek Polacek <polacek@redhat.com>
2023 * constexpr.c (cxx_eval_check_shift_p): Use permerror rather than
2024 error_at and adjust the return value.
2026 2016-01-12 Jakub Jelinek <jakub@redhat.com>
2030 * cp-gimplify.c (cp_gimplify_expr) <case INIT_EXPR>: Don't return
2031 GS_ERROR whenever seen_error (), only if *expr_p contains
2032 cilk spawn stmt, but cilk_detect_spawn_and_unwrap failed.
2036 * pt.c (tsubst_decl): If not local_p, clear DECL_TEMPLATE_INFO.
2038 2016-01-11 Jason Merrill <jason@redhat.com>
2041 * method.c (walk_field_subobs): Add dtor_from_ctor parm.
2042 (process_subob_fn): Likewise. Don't consider triviality if true.
2043 (synthesize_method_walk): Pass it.
2045 2016-01-11 David Malcolm <dmalcolm@redhat.com>
2048 * parser.c (cp_parser_postfix_expression): Initialize
2049 close_paren_loc to UNKNOWN_LOCATION; only use it if
2050 it has been written to by
2051 cp_parser_parenthesized_expression_list.
2052 (cp_parser_parenthesized_expression_list): Document the behavior
2053 with respect to the CLOSE_PAREN_LOC param.
2055 2016-01-11 Jakub Jelinek <jakub@redhat.com>
2058 * cp-gimplify.c (cp_fold): If COMPOUND_EXPR or MODIFY_EXPR
2059 folded operands have side-effects, but folding changed any of them,
2060 build a new tree with the folded operands instead of returning the
2063 2016-01-09 Marek Polacek <polacek@redhat.com>
2066 * decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
2068 2016-01-09 Jakub Jelinek <jakub@redhat.com>
2071 * class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.
2073 2016-01-08 Jason Merrill <jason@redhat.com>
2076 * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
2079 2016-01-08 Marek Polacek <polacek@redhat.com>
2082 * constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
2084 2016-01-08 Jason Merrill <jason@redhat.com>
2086 * constexpr.c (cxx_eval_call_expression): Remove convert_to_void
2091 * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
2092 TREE_ADDRESSABLE type.
2096 * call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.
2098 2016-01-05 Nathan Sidwell <nathan@acm.org>
2101 * pt.c (build_non_dependent_expr): Don't try a checking fold when
2104 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2106 Update copyright years.
2108 Copyright (C) 2016 Free Software Foundation, Inc.
2110 Copying and distribution of this file, with or without modification,
2111 are permitted in any medium without royalty provided the copyright
2112 notice and this notice are preserved.