1 2014-12-20 Jason Merrill <jason@redhat.com>
4 * pt.c (iterative_hash_template_arg): Hash alias specializations
5 differently from their TYPE_CANONICAL.
6 (alias_template_specialization_p): Optimize.
7 (template_args_equal): Optimize alias handling.
8 (dependent_alias_template_spec_p): Only check innermost args.
10 2014-12-19 Kai Tietz <ktietz@redhat.com>
13 * pt.c (most_general_template): Don't break for template-alias.
15 2014-12-18 Jason Merrill <jason@redhat.com>
18 * parser.c (cp_parser_simple_type_specifier): Make auto parameter
19 before -std=c++14 an error.
22 * pt.c (tsubst_copy_and_build): Pass complain to mark_used.
25 * decl2.c (mark_used): Don't mark if in_template_function.
27 2014-12-18 Paolo Carlini <paolo.carlini@oracle.com>
30 * pt.c (struct warning_sentinel): Move it...
31 * cp-tree.h: ... here.
32 * semantics.c (force_paren_expr): Use it.
34 2014-12-17 Jason Merrill <jason@redhat.com>
37 * constexpr.c (cxx_bind_parameters_in_call): non_constant_args parm.
38 (cxx_eval_call_expression): Don't cache calls with non-constant args.
39 (cxx_eval_constant_expression) [COMPOUND_EXPR]: Pass true for lval.
40 (cxx_eval_unary_expression, cxx_eval_binary_expression)
41 (cxx_eval_conditional_expression): Pass false for lval.
43 * constexpr.c: Change "addr" parm names to "lval".
45 * constexpr.c: Tweak comments and formatting.
47 2014-12-16 Paolo Carlini <paolo.carlini@oracle.com>
50 * parser.c (cp_parser_member_declaration): Fix error recovery for
51 initialized non-static data member declared friend.
53 2014-12-15 Jan Hubicka <hubicka@ucw.cz>
55 * decl2.c (decl_needed_p): When not optimizing, do not consider external
58 2014-12-15 Jason Merrill <jason@redhat.com>
61 * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
63 N3778: Sized Deallocation
64 * call.c (non_placement_deallocation_fn_p): A global sized
65 operator delete is not a usual deallocation function until C++14.
66 (build_op_delete_call): Choose the global sized op delete if we
68 * cp-tree.h: Declare non_placement_deallocation_fn_p.
69 (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
70 (global_delete_fndecl): Remove.
71 * decl.c (cxx_init_decl_processing): Also declare sized op deletes.
72 (grok_op_properties): Warn about sized dealloc without the flag.
73 * init.c (build_builtin_delete_call): Remove.
74 (build_vec_delete_1, build_delete): Don't call it.
75 * decl2.c (maybe_warn_sized_delete): New.
76 (cp_write_global_declarations): Call it.
78 2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
81 * decl.c (check_array_designated_initializer): Diagnose gracefully
82 C99 designators which aren't integral constant-expressions; allow
83 constexpr user-defined type conversion operators.
85 2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
88 * semantics.c (finish_omp_reduction_clause): Early return true
89 if DECL_SAVED_TREE (id) is NULL_TREE.
91 2014-12-12 Jason Merrill <jason@redhat.com>
94 * pt.c (do_auto_deduction): In direct-init context, { x } deduces
97 * cp-tree.h (NAMESPACE_ABI_TAG): New.
98 * name-lookup.c (handle_namespace_attrs): Set it.
99 * class.c (check_tag): Split out from find_abi_tags_r.
100 (find_abi_tags_r): Also check namespace tags.
101 (mark_type_abi_tags): Also mark namespace tags.
103 2014-12-12 Kai Tietz <ktietz@redhat.com>
106 * constexpr.c (cxx_eval_loop_expr): Don't loop
107 endless on none-constant expression.
109 2014-12-12 Jason Merrill <jason@redhat.com>
112 * lambda.c (add_capture): Don't pass a dependent type to
113 variably_modified_type_p.
115 2014-12-11 Jason Merrill <jason@redhat.com>
117 Remove N3639 "array of runtime length" from -std=c++14.
118 * decl.c (compute_array_index_type): VLAs are not part of C++14.
119 (create_array_type_for_decl, grokdeclarator): Likewise.
120 * lambda.c (add_capture): Likewise.
121 * pt.c (tsubst): Likewise.
122 * rtti.c (get_tinfo_decl): Likewise.
123 * semantics.c (finish_decltype_type): Likewise.
124 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
125 (cp_build_addr_expr_1): Likewise.
126 * init.c (build_vec_init): Don't throw bad_array_length.
130 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
131 (cp_parser_primary_expression): Not here.
134 * typeck2.c (split_nonconstant_init_1): Handle arrays here.
135 (store_init_value): Not here.
136 (split_nonconstant_init): Look through TARGET_EXPR. No longer static.
137 * cp-tree.h: Declare split_nonconstant_init.
138 * call.c (set_up_extended_ref_temp): Use split_nonconstant_init.
140 2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
142 * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
145 2014-12-10 Kai Tietz <ktietz@redhat.com>
148 * parser.c (cp_parser_diagnose_invalid_type_name): Check id
149 for being an identifier before accessing it.
152 * typeck.c (lookup_destructor): Handle incomplete type.
154 2014-12-09 Jason Merrill <jason@redhat.com>
157 * decl.c (grokdeclarator): Recover from variable template
158 specialization declared as function.
161 * parser.c (cp_parser_unqualified_id): Don't declare fname while
162 parsing function parms.
164 2014-12-03 Jason Merrill <jason@redhat.com>
167 * decl.c (grok_reference_init): Complete array type.
170 * constexpr.c (cxx_eval_store_expression): Handle non-decl store
173 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com>
176 * decl.c (identify_goto): Return a bool if diagnostic is emitted.
177 (check_previous_goto_1): Consistently emit permerror + inform.
178 (check_goto): Likewise.
180 2014-12-03 Richard Biener <rguenther@suse.de>
182 * constexpr.c (cxx_eval_builtin_function_call): Use
183 fold_build_call_array_loc.
185 2014-12-02 Marek Polacek <polacek@redhat.com>
187 * constexpr.c (cxx_eval_check_shift_p): New function.
188 (cxx_eval_binary_expression): Call it. Set NON_CONSTANT_P if it
191 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
194 * decl.c (reshape_init_r): Do not reject value-initialization of
195 scalar array element.
197 2014-12-01 Marek Polacek <polacek@redhat.com>
200 * constexpr.c: Include ubsan.h.
201 (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
202 internal functions and for ubsan builtins.
203 * error.c: Include internal-fn.h.
204 (dump_expr): Add printing of internal functions.
206 2014-12-01 Marek Polacek <polacek@redhat.com>
208 * constexpr.c (literal_type_p): Return true for void type in C++14.
210 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
213 * typeck.c (finish_class_member_access_expr): Use %q#T instead of
214 %qD in error message.
216 2014-11-29 Jakub Jelinek <jakub@redhat.com>
218 * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
219 from create_tmp_var calls.
221 2014-11-28 Marek Polacek <polacek@redhat.com>
224 * typeck.c (cp_build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
225 convert the right operand to integer type.
227 2014-11-27 Kai Tietz <ktietz@redhat.com>
230 * constexpr.c (cxx_eval_vec_init_1): Avoid
233 2014-11-26 Jason Merrill <jason@redhat.com>
235 Allow partial specialization of variable templates.
236 * cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
237 * decl.c (duplicate_decls): Copy it.
238 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
239 * parser.c (cp_parser_decltype_expr): Do call finish_id_expression
241 * pt.c (register_specialization): Remember variable template insts.
242 (instantiate_template_1): Find the matching partial specialization.
243 (check_explicit_specialization): Allow variable partial specialization.
244 (process_partial_specialization): Likewise.
245 (push_template_decl_real): Likewise.
246 (more_specialized_partial_spec): Rename from more_specialized_class.
247 (most_specialized_partial_spec): Rename from most_specialized_class.
248 (get_partial_spec_bindings): Rename from get_class_bindings.
250 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
253 * call.c (standard_conversion): Do not require expr to be non-null
254 when NULLPTR_TYPE_P (from) is true.
256 2014-11-26 Jason Merrill <jason@redhat.com>
258 * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
261 * constexpr.c (cxx_eval_call_expression): Don't talk about
262 flowing off the end if we're already non-constant.
264 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
266 Diagnose string constant conversion to char* in c++11 and above
267 as forbidden, not deprecated.
268 * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
269 change the diagnostic for the Wwrite-strings case for c++11 and above.
271 2014-11-24 Jason Merrill <jason@redhat.com>
273 * pt.c (lookup_template_variable): Always unknown_type_node.
275 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
278 * parser.c (cp_parser_label_for_labeled_statement): Check the case
279 with check_for_bare_parameter_packs.
281 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
282 Paolo Carlini <paolo.carlini@oracle.com>
285 * decl.c (initialize_local_var): Add -Winit-self warning for
286 references initialized with themselves.
288 2014-11-24 Jason Merrill <jason@redhat.com>
291 * mangle.c (mangle_decl): If we aren't going to create a symbol
292 alias, don't build the alias DECL either.
294 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
297 * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
299 2014-11-21 Jason Merrill <jason@redhat.com>
303 * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
304 if the temporary has a non-trivial destructor.
305 * decl.c (poplevel): Don't look through references.
308 * name-lookup.c (supplement_binding_1): Override a mangling alias.
309 * mangle.c (maybe_remove_implicit_alias): New.
310 (mangle_decl): Always avoid creating conflicting alias.
314 * mangle.c (decl_mangling_context): Use template_type_parameter_p.
317 * pt.c (uses_template_parms): Handle null argument.
319 2014-11-21 Jakub Jelinek <jakub@redhat.com>
322 * typeck.c (cp_build_array_ref): Adjust
323 convert_vector_to_pointer_for_subscript caller. If it returns true,
324 call non_lvalue_loc on the result.
326 2014-11-20 Jason Merrill <jason@redhat.com>
329 * pt.c (convert_nontype_argument): Call convert_from_reference.
330 (check_instantiated_arg): Don't be confused by reference refs.
331 (unify): Look through reference refs on the arg, too.
332 * mangle.c (write_template_arg): Look through reference refs.
334 * error.c (dump_expr): Avoid printing (*&i) for references.
336 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
339 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
341 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
343 * cp-objcp-common.c: Use hash_table instead of htab.
345 2014-11-19 Jason Merrill <jason@redhat.com>
348 * cp-tree.h (struct processing_template_decl_sentinel): New.
349 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
350 (instantiate_non_dependent_expr_sfinae): Here.
351 (convert_nontype_argument): Use them.
352 * constexpr.c (fold_non_dependent_expr): Use them.
355 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
356 complain yet about a reference.
357 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
358 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
359 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
360 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
363 * init.c (decl_really_constant_value): Rename from
364 integral_constant_value.
365 (scalar_constant_value): Similar but limited to scalar results.
366 (decl_constant_value_safe): Remove.
367 (constant_value_1): Respect return_aggregate_cst_ok_p.
368 * typeck.c (decay_conversion): Use scalar_constant_value.
369 * call.c (convert_like_real): Likewise.
370 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
371 * typeck.c (decay_conversion): Or ARRAY_TYPE.
372 * constexpr.c (struct constexpr_ctx): Add strict field.
373 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
374 decl_constant_value and decl_really_constant_value.
375 (cxx_eval_outermost_constant_expr): Add strict parm.
376 (maybe_constant_init): Not strict.
377 (potential_constant_expression_1): Add strict parm.
378 Shorten most internal calls with RECUR macro.
379 * cp-tree.h, pt.c, semantics.c: Adjust.
381 2014-11-19 Jason Merrill <jason@redhat.com>
384 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
386 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
389 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
390 and __PRETTY_FUNCTION__.
392 2014-11-18 Jason Merrill <jason@redhat.com>
395 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
396 from a variable of empty class type is constant.
398 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
399 (potential_constant_expression_1): Handle STMT_EXPR.
401 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
403 (lots): Omit NULL jump_target arguments.
405 * constexpr.c (struct constexpr_ctx): Add quiet field.
406 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
407 (lots): Replace allow_non_constant parameter with ctx->quiet.
410 * constexpr.c (cxx_eval_binary_expression): Don't assume the
411 expression was already folded.
412 (cxx_eval_unary_expression): Likewise.
414 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
417 * rtti.c (emit_support_tinfos): Handle __float128.
419 2014-11-18 Jason Merrill <jason@redhat.com>
422 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
425 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
426 rather than VOID_TYPE_P.
428 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
431 * typeck2.c (store_init_value): Set it.
432 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
433 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
435 2014-11-17 Jason Merrill <jason@redhat.com>
438 * call.c (build_call_a): Don't warn_deprecated_use here.
439 (build_over_call): Or here.
440 * decl2.c (mark_used): Do it here.
441 (is_late_template_attribute): Attribute deprecated is not deferred.
442 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
443 * parser.c (cp_parser_template_name): Warn about deprecated template.
444 (cp_parser_template_argument): Likewise.
447 * decl.c (cp_finish_decl): Don't try to process a non-dependent
448 constant initializer for a reference.
449 * pt.c (value_dependent_expression_p): A reference is always
451 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
454 Handle C++14 constexpr flow control.
455 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
456 (cxx_eval_statement_list): New.
457 (cxx_eval_constant_expression): Handle LABEL_EXPR,
458 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
459 semantics of RETURN_EXPR.
460 (many functions): Add jump_target parameter.
461 (returns, breaks, continues, switches, label_matches): New.
462 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
463 * cp-gimplify.c (begin_bc_block): Set them.
465 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
466 (genericize_for_stmt): Handle null statement-list.
468 * constexpr.c (use_new_call): Always use new call handling.
470 C++14 constexpr support (minus loops and multiple returns)
471 * constexpr.c (use_new_call): New macro.
472 (build_data_member_initialization): Ignore non-mem-inits.
473 (check_constexpr_bind_expr_vars): Remove C++14 checks.
474 (constexpr_fn_retval): Likewise.
475 (check_constexpr_ctor_body): Do nothing in C++14.
476 (massage_constexpr_body): In C++14 only collect mem-inits.
477 (get_function_named_in_call): Handle null CALL_EXPR_FN.
478 (cxx_bind_parameters_in_call): Build bindings in same order as
479 parameters. Don't treat iniviref parms specially in new call mode.
480 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
481 based on DECL_SAVED_TREE rather than the massaged constexpr body.
482 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
483 (is_sub_constant_expr): Don't mess with ctx.ctor here.
484 (cxx_eval_component_reference): A null element means we're mid-
486 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
487 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
488 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
489 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
490 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
491 constexpr functions. In new-call mode find parms in the values table.
492 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
493 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
494 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
495 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
496 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
497 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
498 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
499 SWITCH_STMT, ASM_EXPR.
500 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
501 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
502 caller wants an lvalue.
503 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
504 (maybe_constant_init): Look through INIT_EXPR.
505 (ensure_literal_type_for_constexpr_object): Set
506 cp_function_chain->invalid_constexpr.
507 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
508 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
509 (check_for_uninitialized_const_var): Likewise.
510 (maybe_save_function_definition): Check it.
511 * parser.c (cp_parser_jump_statement): Set
512 cp_function_chain->invalid_constexpr.
513 (cp_parser_asm_definition): Likewise.
516 * decl.c (build_ptrmemfunc_type): Don't build a different
517 RECORD_TYPE for a qualified PMF.
518 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
519 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
520 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
521 * tree.c (cp_walk_subtrees): Likewise.
522 (cp_build_qualified_type_real): Remove special PMF handling.
524 2014-11-15 Jason Merrill <jason@redhat.com>
526 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
529 * constexpr.c (cxx_eval_builtin_function_call): Use
530 fold_builtin_call_array.
532 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
534 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
536 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
537 * parser.c (cp_parser_omp_clause_collapse): Likewise.
538 (cp_parser_enumerator_definition): Don't call
539 instantiate_non_dependent_expr...
540 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
541 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
542 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
543 the final gcc_assert.
545 * constexpr.c (fold_non_dependent_expr): Add.
546 * cp-tree.h (fold_non_dependent_expr): Declare it.
547 * call.c (null_ptr_cst_p): Use it.
548 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
549 * semantics.c (begin_maybe_infinite_loop): Likewise.
550 * typeck.c (cp_build_binary_op): Likewise.
551 * typeck2.c (check_narrowing): Likewise.
553 * pt.c (fold_non_dependent_expr): Rename to
554 instantiate_non_dependent_expr.
555 (fold_non_dependent_expr_sfinae): Rename to
556 instantiate_non_dependent_expr_sfinae.
557 (convert_nontype_argument, build_non_dependent_expr): Adjust.
558 * decl.c (compute_array_index_type): Likewise.
559 * parser.c (cp_parser_parenthesized_expression_list,
560 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
562 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
564 * typeck.c (cxx_alignas_expr): Likewise.
565 * typeck2.c (store_init_value, massage_init_elt): Likewise.
566 * call.c: Adjust comments.
568 * constexpr.c: Likewise.
572 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
574 * mangle.c (find_substitution): Look for abi_tag on class templates.
576 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
577 Thomas Schwinge <thomas@codesourcery.com>
578 Ilya Verbin <ilya.verbin@intel.com>
579 Andrey Turetskiy <andrey.turetskiy@intel.com>
581 * Make-lang.in (c++.install-common): Do not install for the offload
584 2014-11-13 Kai Tietz <ktietz@redhat.com>
586 * cp-tree.h (cp_build_function_call): Remove prototype.
587 (cp_build_addr_expr_strict): Likewise.
588 (build_typed_address): Likewise.
589 * typeck.c (build_typed_address): Removed.
590 (cp_build_addr_expr_strict): Make static.
591 (cp_build_function_call): Likewise.
593 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
597 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
598 * decl.c (grokdeclarator): Use it.
599 * parser.c (cp_parser_simple_type_specifier): Likewise.
600 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
602 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
605 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
606 constant the condition.
608 2014-11-10 Andi Kleen <ak@linux.intel.com>
610 * semantics.c (finish_goto_stmt): Call check_no_cilk.
611 (finish_while_stmt_cond): Dito.
612 (finish_do_stmt): Dito.
613 (finish_for_cond): Dito.
614 (finish_switch_cond): Dito.
616 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
618 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
619 OPT_Wshift_count_overflow in the warnings.
621 2014-11-09 Jason Merrill <jason@redhat.com>
624 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
625 same scalar type is an rvalue.
628 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
630 2014-11-07 Jason Merrill <jason@redhat.com>
633 * pt.c (dependent_alias_template_spec_p): New.
634 (dependent_type_p_r): Handle dependent alias template specialization.
635 (template_args_equal): A dependent alias template specializations
636 is not equal to its underlying type as a template argument.
637 * tree.c (strip_typedefs): Don't strip a dependent alias
640 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
641 (cp_parser_primary_expression): Not here.
643 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
646 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
648 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
650 * constexpr.c: Remove redundant enum from machine_mode.
652 2014-10-28 Jason Merrill <jason@redhat.com>
654 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
656 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
658 * call.c: Adjust include files.
667 * semantics.c: Ditto.
669 * vtable-class-hierarchy.c: Ditto.
671 2014-10-24 Jason Merrill <jason@redhat.com>
673 Implement N3653 (Member initializers and aggregates) and fix
674 references to 'this' in constexpr constructors.
675 * class.c (check_field_decls): In C++14 an NSDMI does not make the
677 * constexpr.c (struct constexpr_ctx): New.
678 (cxx_bind_parameters_in_call): Handle 'this'.
679 (cxx_eval_call_expression): Create new constexpr_ctx.
680 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
681 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
682 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
683 (cxx_eval_vec_init_1): Likewise.
684 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
685 [TARGET_EXPR]: Build new constexpr_ctx.
686 [PLACEHOLDER_EXPR]: New.
687 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
689 (is_sub_constant_expr): Build new constexpr_ctx.
690 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
692 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
693 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
694 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
695 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
696 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
697 (build_ctor_subob_ref, replace_placeholders): New.
698 * typeck2.c (store_init_value): Use replace_placeholders.
699 (process_init_constructor_record): Make zero-init before NSDMI
702 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
704 * cp-gimplify.c: Adjust include files.
706 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
709 * cp-objcp-common.c: Do not include new.
710 (cxx_initialize_diagnostics): Move from here to ...
711 * error.c (cxx_initialize_diagnostics): : ... here. Move
712 diagnostics initialization here from init_error.
713 (cxx_pp): Use a real pointer not a macro.
714 (init_error): Just initialize cxx_pp.
715 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
716 not set maximum line length.
718 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
721 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
723 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
725 * parser.c (cp_parser_unary_expression): Add default arguments.
726 (cp_parser_cast_expression, cp_parser_sizeof_operand,
727 cp_parser_omp_atomic): Adjust.
729 2014-10-20 Jason Merrill <jason@redhat.com>
732 * lambda.c (current_nonlambda_function): New.
733 * semantics.c (finish_this_expr): Use it.
734 * cp-tree.h: Declare it.
736 2014-10-17 Alan Modra <amodra@gmail.com>
739 * decl.c (merge_decls): Don't merge section name, comdat group or
740 tls model to newdecl symtab node, instead merge to olddecl.
741 Override existing olddecl section name. Set tls_model for all
742 thread-local vars, not just OMP thread-private ones. Remove
745 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
747 * cp-tree.h: Adjust include files.
749 2014-10-15 Jason Merrill <jason@redhat.com>
752 * pt.c (lookup_template_variable): Call coerce_template_parms.
754 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
756 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
757 ensure_literal_type_for_constexpr_object,
758 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
759 retrieve_constexpr_fundef, is_valid_constexpr_fn,
760 build_anon_member_initialization, build_data_member_initialization,
761 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
762 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
763 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
764 massage_constexpr_body, cx_check_missing_mem_inits,
765 register_constexpr_fundef, explain_invalid_constexpr_fn,
766 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
767 maybe_initialize_constexpr_call_table, get_function_named_in_call,
768 get_nth_callarg, lookup_parameter_binding,
769 cxx_eval_builtin_function_call, adjust_temp_type,
770 cxx_bind_parameters_in_call, push_cx_call_context,
771 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
772 reduced_constant_expression_p, verify_constant,
773 cxx_eval_unary_expression, cxx_eval_binary_expression,
774 cxx_eval_conditional_expression, cxx_eval_array_reference,
775 cxx_eval_component_reference, cxx_eval_bit_field_ref,
776 cxx_eval_logical_expression, base_field_constructor_elt,
777 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
778 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
779 cxx_eval_trinary_expression, var_in_constexpr_fn,
780 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
781 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
782 maybe_constant_init, potential_constant_expression_1,
783 potential_constant_expression, potential_rvalue_constant_expression,
784 require_potential_constant_expression,
785 require_potential_rvalue_constant_expression): Moved definitions...
786 * constexpr.c: ... here, new file.
787 * Make-lang.in: Update.
788 * config-lang.in: Likewise.
790 2014-10-14 Jason Merrill <jason@redhat.com>
793 * parser.c (struct saved_token_sentinel): New.
794 (cp_parser_statement): Use it.
795 (cp_parser_start_tentative_firewall): New.
796 (cp_parser_end_tentative_firewall): New.
797 (cp_parser_lambda_expression): Use them.
798 (cp_parser_statement_expr): New.
799 (cp_parser_primary_expression): Use it.
801 2014-10-14 DJ Delorie <dj@redhat.com>
803 * typeck.c (cp_common_type): Check for all __intN types, not just
805 * decl.c (grokdeclarator): Likewise.
806 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
808 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
809 for all __intN types, not just __int128.
810 (cp_parser_simple_type_specifier): Likewise.
811 * mangle.c (integer_type_codes): Remove int128-specific codes.
812 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
813 __intN was specified.
814 * lex.c (init_reswords): Reserve all __intN keywords.
816 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
818 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
820 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
822 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
824 (print_template_statistics): Cast size and elements to long.
826 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
828 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
829 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
832 2014-10-10 Jason Merrill <jason@redhat.com>
835 * class.c (build_base_path): Preserve rvalueness.
836 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
837 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
840 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
842 * method.c (implicitly_declare_fn): Handle deleted lambda default
843 ctor and copy assop here.
844 * class.c (check_bases_and_members): Not here.
845 (add_implicitly_declared_members): And don't set
846 CLASSTYPE_LAZY_MOVE_ASSIGN.
848 * semantics.c (finish_id_expression): Check for error_mark_node.
850 2014-10-09 Jason Merrill <jason@redhat.com>
853 * semantics.c (outer_var_p): Non-static.
854 (process_outer_var_ref): Split out from finish_id_expression.
855 * pt.c (tsubst_copy_and_build): Call them.
856 * cp-tree.h: Declare them.
858 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
860 * semantics.c (check_constexpr_ctor_body_1): New.
861 (check_constexpr_ctor_body): Use it; add bool parameter.
862 (build_data_member_initialization): Handle BIND_EXPR and
863 USING_STMT in the main conditional.
864 (build_constexpr_constructor_member_initializers): Do not
865 handle BIND_EXPR here.
866 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
867 (massage_constexpr_body): Don't do it here.
868 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
869 Adjust check_constexpr_ctor_body call.
870 (cp_parser_compound_statement): Do not pedwarn for compound-statement
871 in constexpr function in C++14 mode.
872 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
874 2014-10-09 Jason Merrill <jason@redhat.com>
877 * parser.c (cp_parser_class_head): push_template_decl for members
881 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
882 (iterative_hash_template_arg): Likewise.
885 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
886 * semantics.c (force_paren_expr): And set it.
887 * typeck.c (check_return_expr): And handle it.
889 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
891 * decl.c (grokdeclarator): constexpr only implies const in C++11.
893 2014-10-08 Jason Merrill <jason@redhat.com>
896 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
899 * tree.c (build_cplus_array_type): Look for a type with no
900 typedef-name or attributes.
902 * call.c (call_copy_ctor): New.
903 (build_over_call): Use it to avoid infinite recursion on invalid code.
905 2014-10-07 Jason Merrill <jason@redhat.com>
907 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
909 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
911 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
913 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
916 * semantics.c (check_constexpr_bind_expr_vars): New.
917 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
918 (build_constexpr_constructor_member_initializers): Handle
919 BIND_EXPR in the main conditional.
921 2014-10-02 Mark Wielaard <mjw@redhat.com>
924 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
925 (cp_function_decl_deleted_p): New prototype.
926 * cp-objcp-common.c (cp_function_deleted_p): New function.
928 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
933 * typeck.c (cp_build_binary_op): save_expr after convert to save
934 redundant operations.
935 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
936 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
938 2014-10-03 Jason Merrill <jason@redhat.com>
940 * decl.c (start_decl): Complain about static/thread_local vars
941 in constexpr function.
942 (check_for_uninitialized_const_var): Also uninitialized vars.
943 * parser.c (cp_parser_jump_statement): And gotos.
944 (cp_parser_asm_operand_list): And asm.
945 (cp_parser_try_block): And try.
946 * semantics.c (ensure_literal_type_for_constexpr_object): And
949 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
950 (var_in_constexpr_fn): New.
951 (cxx_eval_constant_expression): Look into DECL_INITIAL.
952 (potential_constant_expression_1): Allow constexpr-local vars.
955 * tree.c (strip_typedefs): Handle TREE_LIST.
957 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
959 * parser.c (cp_parser_assignment_expression,
960 cp_parser_constant_expression): Add default arguments.
961 (cp_parser_primary_expression,
962 cp_parser_postfix_open_square_expression,
963 cp_parser_parenthesized_expression_list,
964 cp_parser_question_colon_clause,
965 cp_parser_expression, cp_parser_constant_expression,
966 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
967 cp_parser_template_argument, cp_parser_enumerator_definition,
968 cp_parser_member_declaration, cp_parser_constant_initializer,
969 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
970 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
971 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
972 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
973 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
974 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
975 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
977 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
980 * cp-tree.h (struct saved_scope): Add noexcept_operand.
981 (cp_noexcept_operand): Define.
982 * call.c (build_over_call): Use it.
983 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
984 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
986 2014-10-01 Jason Merrill <jason@redhat.com>
989 * method.c (constructible_expr): Handle value-init of non-class.
990 * parser.c (cp_parser_trait_expr): Allow pack expansion.
991 * pt.c (tsubst_copy_and_build): Handle pack expansion.
994 * class.c (type_has_non_user_provided_default_constructor): Rename
995 from type_has_user_provided_default_constructor, reverse sense.
996 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
997 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
998 * call.c (build_new_method_call_1): Adjust.
1000 * decl.c (grok_special_member_properties): Don't set
1001 TYPE_HAS_COMPLEX_DFLT.
1002 * init.c (build_value_init_noctor): Don't use
1003 type_has_user_provided_default_constructor.
1005 2014-09-30 Jason Merrill <jason@redhat.com>
1007 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
1008 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
1009 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
1010 * parser.c (cp_parser_primary_expression): Likewise.
1011 (cp_parser_trait_expr): Likewise. Handle variadic trait.
1012 * semantics.c (trait_expr_value): Likewise.
1013 (finish_trait_expr): Likewise.
1014 (check_trait_type): Handle variadic trait. Return bool.
1015 * method.c (build_stub_object): Add rvalue reference here.
1016 (locate_fn_flags): Not here.
1017 (check_nontriv, assignable_expr, constructible_expr): New.
1018 (is_trivially_xible): New.
1020 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
1021 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
1022 * parser.c (cp_parser_primary_expression): Likewise.
1023 (cp_parser_trait_expr): Likewise.
1024 * semantics.c (trait_expr_value): Likewise.
1025 (finish_trait_expr): Likewise.
1027 * method.c (build_stub_object): Use CONVERT_EXPR.
1028 * tree.c (build_dummy_object): Likewise.
1029 (is_dummy_object): Adjust.
1031 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
1032 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
1033 * semantics.c (trait_expr_value): Likewise.
1034 (finish_trait_expr): Likewise.
1035 * parser.c (cp_parser_primary_expression): Likewise.
1036 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
1038 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1041 * error.c (print_instantiation_context): Delete.
1042 * typeck2.c (build_x_arrow): Record location when pushing
1043 template instantiation.
1044 * pt.c (push_tinst_level): Make it a wrapper around ...
1045 (push_tinst_level_loc): ... this. New function. Make excessive
1046 template instantiation depth a fatal error. Record location. Use
1047 bool as return type.
1048 (instantiate_pending_templates): Make excessive
1049 template instantiation depth a fatal error.
1050 (problematic_instantiation_changed): Use bool as return type.
1051 * cp-tree.h (print_instantiation_context): Delete.
1052 (push_tinst_level): Update declaration.
1053 (problematic_instantiation_changed): Likewise.
1054 (push_tinst_level_loc): New.
1056 2014-09-29 Richard Biener <rguenther@suse.de>
1058 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
1061 2014-09-26 Jason Merrill <jason@redhat.com>
1063 * mangle.c (find_substitution): Use write_abi_tags.
1065 2014-09-25 Marek Polacek <polacek@redhat.com>
1068 * class.c (warn_hidden): Check for FUNCTION_DECL.
1070 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1073 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
1074 on low_bound and length.
1076 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1078 * class.c, decl.c, optimize.c: Rename all instances of
1079 DECL_ABSTRACT to DECL_ABSTRACT_P.
1081 2014-09-24 Marek Polacek <polacek@redhat.com>
1085 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
1086 * tree.c (bot_manip): Add default case.
1087 * parser.c (cp_parser_primary_expression): Cast the controlling
1088 expression of a switch to an int.
1089 (cp_parser_unqualified_id): Likewise.
1091 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
1094 * parser.c (cp_parser_skip_to_closing_square_bracket,
1095 cp_parser_array_designator_p): New.
1096 (cp_parser_initializer_list): Use the latter.
1098 2014-09-22 Jason Merrill <jason@redhat.com>
1100 * semantics.c (finish_non_static_data_member): In diagnostic, give
1101 error at point of use and note at point of declaration.
1106 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
1109 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
1112 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
1114 2014-09-22 Jason Merrill <jason@redhat.com>
1116 * decl.c (poplevel): Don't warn about unused vars in template scope.
1117 * error.c (dump_decl): Handle variable templates.
1119 2014-09-20 Jason Merrill <jason@redhat.com>
1122 * decl.c (begin_destructor_body): Only clobber the as-base part of
1125 2014-09-19 Jason Merrill <jason@redhat.com>
1128 * mangle.c (write_expression): Use unresolved-name mangling for
1132 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
1133 after pulling out an element from a CONSTRUCTOR.
1135 2014-09-18 Jakub Jelinek <jakub@redhat.com>
1138 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
1139 on type of type dependent expressions, and don't call it if
1140 handle_omp_array_sections has kept TREE_LIST because something
1142 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
1143 Use keep_next_level, begin_omp_structured_block and
1144 finish_omp_structured_block instead of push_stmt_list and
1147 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1150 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
1151 for final class types.
1153 2014-09-15 Jason Merrill <jason@redhat.com>
1155 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
1156 necessary. Call inherit_targ_abi_tags here.
1157 * class.c (check_bases_and_members): Not here.
1158 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
1159 * cp-tree.h: Declare inherit_targ_abi_tags.
1161 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1163 Do not diagnose lambda default arguments in c++14 modes.
1164 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
1167 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1169 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
1172 2014-09-13 Marek Polacek <polacek@redhat.com>
1175 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
1176 location of a call expression.
1178 2014-09-11 Jason Merrill <jason@redhat.com>
1181 * decl.c (start_decl): Handle specialization of member variable
1183 * pt.c (check_explicit_specialization): Adjust error.
1185 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
1188 * typeck2.c (process_init_constructor_record): Do not warn about
1189 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
1191 2014-09-11 Jason Merrill <jason@redhat.com>
1194 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
1195 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
1197 2014-09-10 Jason Merrill <jason@redhat.com>
1200 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
1201 (duplicate_decls, start_decl): Likewise.
1202 * pt.c (check_explicit_specialization): Likewise.
1203 (push_template_decl_real): Or static templates.
1205 2014-09-08 Jason Merrill <jason@redhat.com>
1207 * typeck.c (build_class_member_access_expr): Move
1208 -Winvalid-offsetof code...
1209 * semantics.c (finish_offsetof): ...here.
1210 * parser.c (cp_parser_builtin_offsetof): Remember the location of
1212 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
1215 * pt.c (instantiate_decl): Handle recursive instantiation of
1218 2014-09-05 Jason Merrill <jason@redhat.com>
1221 * semantics.c (potential_constant_expression_1): Handle un-folded
1222 pointer to member constants.
1224 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
1227 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
1228 newdecl, not olddecl.
1230 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1233 * class.c (check_field_decls): A class of literal type cannot have
1234 volatile non-static data members and base classes.
1235 (explain_non_literal_class): Update.
1237 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1238 Balaji V. Iyer <balaji.v.iyer@intel.com>
1239 Igor Zamyatin <igor.zamyatin@intel.com>
1241 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
1243 * parser.c (cp_parser_cilk_for): New function.
1244 (cp_parser_cilk_grainsize): Likewise.
1245 (cp_parser_statement): Added RID_CILK_FOR case.
1246 (cp_parser_omp_for_cond): Added CILK_FOR check.
1247 (cp_parser_omp_for_loop_init): Change function argument to accept
1248 tree_code instead just a bool flag; change the check to use that
1249 tree_code; check for initialization declaration in case of Cilk_for.
1250 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
1251 changed call to cp_parser_omp_for_loop_init according new arguments'
1253 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1254 * pt.c (tsubst_expr): Added CILK_FOR case.
1255 * semantics.c: Include convert.h.
1256 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
1257 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
1258 (handle_omp_for_class_iterator): New argument lastp and its usage;
1260 (finish_omp_for): Changed call to handle_omp_for_class_iterator
1261 according new arguments' list; in case of Cilk_for save very first
1262 decl and create empty stmt_list block; use block to build correct
1265 2014-08-31 Jason Merrill <jason@redhat.com>
1268 * optimize.c (cdtor_comdat_group): Just look at the
1269 DECL_ASSEMBLER_NAME of the 'tors.
1271 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1274 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
1275 result of cxx_eval_constant_expression.
1277 2014-08-26 Jason Merrill <jason@redhat.com>
1280 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
1281 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
1282 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
1285 2014-08-25 Jason Merrill <jason@redhat.com>
1287 * pt.c (check_explicit_specialization): Don't complain about
1288 non-template variable.
1289 (template_for_substitution): Allow variable templates.
1290 (check_template_variable): Fix logic for member var template.
1291 * decl.c (start_decl): Don't complain about extra template header
1294 * decl.c (start_decl): Look through member variable template.
1295 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
1296 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
1299 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
1302 * cp-tree.h (TFF_POINTER): Add.
1303 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1305 * error.c (dump_type_suffix): Actually print the const and noreturn
1306 attribute when appropriate.
1308 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1310 * decl.c (compute_array_index_type, grokdeclarator,
1311 undeduced_auto_decl): Change from cxx1y to cxx14.
1312 *lambda.c(add_capture()): Change error message from C++1y to C++14.
1313 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1314 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1315 cp_parser_decltype, cp_parser_conversion_type_id,
1316 cp_parser_simple_type_specifier, cp_parser_type_id_1,
1317 cp_parser_template_type_arg, cp_parser_std_attribute,
1318 cp_parser_template_declaration_after_export): Ditto.
1319 * pt.c (tsubst): Ditto.
1320 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1321 * tree.c: Change comment.
1322 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1323 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1325 2014-08-23 Jason Merrill <jason@redhat.com>
1327 Allow non-constexpr variable templates.
1328 * decl2.c (note_variable_template_instantiation): New.
1329 * cp-tree.h: Declare it.
1330 * pt.c (instantiate_decl): Call it.
1331 (push_template_decl_real): Allow non-constexpr variable templates.
1332 * semantics.c (finish_id_expression): Mark the variable template
1333 instantiation as used.
1334 * mangle.c (write_mangled_name): Variable template instantiations
1336 * parser.c (cp_parser_init_declarator): Complain about
1337 non-function implicit templates.
1339 2014-08-22 Marek Polacek <polacek@redhat.com>
1342 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1343 preceded with logical not. Adjust call to
1344 warn_logical_not_parentheses.
1346 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1349 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1350 declaration shadows a function declaration, unless the former
1351 declares a function, pointer to function or pointer to member
1352 function, because this is a common and valid case in real-world
1354 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1355 Improve description.
1357 2014-08-22 Jason Merrill <jason@redhat.com>
1360 * class.c (outermost_open_class): Fix logic.
1361 * decl.c (complete_vars): Fix logic.
1363 2014-08-22 Jason Merrill <jason@redhat.com>
1366 * class.c (outermost_open_class): New.
1367 * cp-tree.h: Declare it.
1368 * decl.c (maybe_register_incomplete_var): Use it.
1369 (complete_vars): Handle any constant variable.
1370 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1372 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1375 * cp-array-notation.c (build_array_notation_ref): Added correct
1376 handling of case with incorrect array.
1378 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1381 * error.c (cp_diagnostic_finalizer): Delete.
1382 (init_error): Do not set diagnostic_finalizer here.
1384 2014-08-19 Marek Polacek <polacek@redhat.com>
1387 * call.c (build_new_op_1): Remember the type of arguments for
1388 a comparison. If either operand of a comparison is a boolean
1389 expression, call maybe_warn_bool_compare.
1391 2014-08-19 Jason Merrill <jason@redhat.com>
1393 PR tree-optimization/62091
1394 * decl2.c (decl_needed_p): Return true for virtual functions when
1399 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1402 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1404 * class.c (contains_empty_class_p): Remove.
1406 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1408 * parser.c (cp_parser_expression): Add default arguments.
1409 (cp_parser_primary_expression, cp_parser_postfix_expression,
1410 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1411 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1412 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1413 cp_parser_lambda_body, cp_parser_expression_statement,
1414 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1415 cp_parser_iteration_statement, cp_parser_jump_statement,
1416 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1417 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1418 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1419 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1420 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1421 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1422 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1423 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1424 cp_parser_transaction_expression): Adjust.
1426 2014-08-15 Jason Merrill <jason@redhat.com>
1429 * pt.c (lookup_template_class_1): Revert recent change.
1430 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1433 * pt.c (instantiate_class_template_1): Ignore lambda on
1434 CLASSTYPE_DECL_LIST.
1435 (push_template_decl_real): A lambda is not primary.
1436 (lookup_template_class_1): Don't look for a lambda partial
1438 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1439 currently in a function and the lambda living in a function.
1440 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1442 2014-08-15 Richard Biener <rguenther@suse.de>
1443 Jason Merrill <jason@redhat.com>
1446 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1447 (build_cplus_array_type): ...from here. Only call build_array_type
1450 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1454 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1458 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1459 cv-qualifiers of function types.
1461 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1463 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1465 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1467 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1468 cp_build_array_ref, cp_build_function_call_vec): When a
1469 pedwarn is suppressed under SFINAE, return error_mark_node.
1471 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1472 tf_warning_or_error, where complain is a bool, glitch.
1474 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1477 * decl.c (grokdeclarator): Move the check for friend initializers..
1478 * decl2.c (grokfield) ..here. Postpone early return for friends
1479 until after the initializer check.
1481 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1484 * pt.c (coerce_template_parms): Improve error message vs default
1487 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1489 * parser.c (cp_parser_init_declarator): Remove redundant check of
1490 decl_specifiers->type.
1492 2014-08-13 Jason Merrill <jason@redhat.com>
1494 * call.c (build_x_va_arg): Support passing non-POD through ....
1495 (convert_arg_to_ellipsis): Likewise.
1497 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1499 * pt.c (lookup_template_variable): Make dependent variable templates
1502 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1504 * parser.c (cp_parser_elaborated_type_specifier): Handle
1505 specially cp_parser_template_id returning a BASELINK.
1507 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1509 * parser.c (cp_parser_diagnose_invalid_type_name,
1510 cp_parser_make_typename_type): Remove scope parameter.
1511 (cp_parser_parse_and_diagnose_invalid_type_name,
1512 cp_parser_elaborated_type_specifier): Adjust calls.
1514 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1516 Reject virt-specifiers on friends and member templates
1517 * friend.c (do_friend): Diagnose virt-specifiers.
1518 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1520 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1522 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1523 return type to bool; in C++11 for constants give errors, not pedwarns.
1524 * cp-tree.h (check_narrowing): Adjust declaration.
1525 * call.c (convert_like_real): Update calls.
1526 * semantics.c (finish_compound_literal): Likewise.
1528 2014-08-08 Jason Merrill <jason@redhat.com>
1530 * pt.c (lookup_template_class_1): Copy abi_tag.
1532 2014-08-08 Kai Tietz <ktietz@redhat.com>
1534 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1535 that we operate on a true inline.
1537 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1539 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1540 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1542 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1545 * decl.c (build_enumerator): Handle class types with conversion
1546 operators via perform_implicit_conversion_flags and
1547 build_expr_type_conversion.
1549 * cvt.c (build_expr_type_conversion): Replace pair of errors
1550 with error + inform.
1552 2014-08-07 Jason Merrill <jason@redhat.com>
1555 * parser.c (c_parse_file): Change sorry to fatal_error.
1558 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1560 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1562 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1564 2014-08-06 Jason Merrill <jason@redhat.com>
1566 * init.c (build_vec_init): Fix constant initialization of
1568 (build_value_init_noctor): Call maybe_constant_init.
1569 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1573 * init.c (build_vec_init): Reorganize earlier change a bit.
1576 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1577 if we're just returning an INIT_EXPR.
1579 2014-08-06 Jason Merrill <jason@redhat.com>
1580 Braden Obrzut <admin@maniacsvault.net>
1582 * pt.c (check_explicit_specialization): Don't test
1583 DECL_DECLARED_INLINE_P for a variable template.
1585 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1588 * typeck.c (cp_build_binary_op): Extend to more cases the
1591 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1593 Implement constexpr variable templates
1594 * decl.c (grokvardecl): Handle specializations of variable templates.
1595 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1596 return from grokvardecl.
1597 * decl2.c (check_member_template): Allow declaration of template member
1599 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1601 * pt.c (check_template_variable): Accept variable temploids at
1603 (push_template_decl_real): The current instantiation of a template
1605 (determine_specialization): Accept variable templates.
1606 (check_explicit_specialization): Handle and check for malformed
1607 variable template specializations.
1608 (lookup_template_variable): New.
1609 (tsubst_decl): Handle variable template specializations.
1610 (do_decl_instantiation): Handle template variables.
1611 (instantiate_decl): Handle template variables.
1612 * semantics.c (finish_template_variable): New.
1613 (finish_id_expression): Instantiate variable templates.
1614 * cp-tree.h (variable_template_p): New.
1616 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1619 * decl.c (check_redeclaration_no_default_args): New.
1620 (duplicate_decls): Use it, handle default arguments
1621 in redeclarations of function templates.
1623 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1625 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1627 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1629 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1630 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1631 instead of pointer_set.
1633 2014-08-01 Jason Merrill <jason@redhat.com>
1636 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1637 init-list for trailing elements.
1638 * typeck2.c (process_init_constructor_array): Likewise.
1640 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1643 * decl.c (duplicate_decls): Handle static member functions too.
1645 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1647 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1650 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1653 * parser.c (cp_parser_array_notation): Added check for array_type.
1655 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1658 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1659 DECL_EXPR improved. Changed handling for INIT_EXPR.
1661 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1663 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1665 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1667 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1668 -fsanitize=alignment call ubsan_maybe_instrument_reference
1669 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1670 for calls to member functions.
1672 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1675 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1676 whether it is returning the address of a local variable.
1677 (check_return_expr): Return 0 instead of the address of a local
1680 2014-07-30 Jason Merrill <jason@redhat.com>
1684 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1686 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1689 * pt.c (unify_arity): Add boolean parameter.
1690 (unify_too_few_arguments): Likewise.
1691 (type_unification_real): Diagnose correctly insufficient
1692 arguments in the presence of trailing variadic parameters;
1693 deducing multiple trailing packs as empty is fine.
1695 2014-07-30 Jason Merrill <jason@redhat.com>
1700 * decl2.c (mark_all_virtuals): New variable.
1701 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1702 (cp_write_global_declarations): Set it and give helpful diagnostic
1703 if it introduces errors.
1704 * class.c (finish_struct_1): Check it.
1708 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1709 (check_explicit_specialization): Clear it on specializations.
1710 * decl.c (duplicate_decls, start_decl): Likewise.
1711 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1712 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1713 linkage after setting the appropriate flags.
1714 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1715 * decl2.c (mark_needed): Mark clones.
1716 (import_export_decl): Not here.
1718 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1720 Implement N4051 - Allow typename in a template template parameter
1721 * parser.c (cp_parser_type_parameter_key): New funtion;
1722 (cp_parser_token_is_type_parameter_key): Ditto;
1723 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1724 but pedwarn for less than cxx1z.
1726 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1729 * call.c (standard_conversion): Use resolve_nondeduced_context
1730 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1732 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1735 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1738 2014-07-15 Jason Merrill <jason@redhat.com>
1741 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1745 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1746 * class.c (finish_struct): Reject invalid definition of
1747 std::initializer_list.
1749 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1751 * call.c (convert_like_real): Call print_z_candidate and inform only
1752 if permerror returns true.
1754 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1756 * class.c (build_clone): Do not clear assembler names of
1758 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1759 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1760 as a special case return sizeof (struct tree_decl_non_common)
1762 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1763 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1764 * cp/cp-tree.h (tree_template_decl): New structure.
1765 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1766 (union cp_lang_tree_node): Add template_decl.
1767 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1769 2014-07-14 Jason Merrill <jason@redhat.com>
1773 * pt.c (instantiate_decl): Don't check defer_ok for local class
1776 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1779 * cp-tree.h (LITERAL_ZERO_P): Define.
1780 * parser.c (cp_parser_parenthesized_expression_list): Add
1781 want_literal_zero_p argument, if true, for literal zeros
1782 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1783 (cp_parser_postfix_expression): Adjust
1784 cp_parser_parenthesized_expression_list caller, handle
1785 -Wmemset-transposed-args.
1786 (literal_zeros): New variable.
1788 2014-07-13 Jason Merrill <jason@redhat.com>
1791 * semantics.c (is_instantiation_of_constexpr): Return true for
1792 defaulted functions, too.
1793 (explain_invalid_constexpr_fn): Only use
1794 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1795 * method.c (explain_implicit_non_constexpr): Pass
1796 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1799 * decl.c (check_initializer): Don't finish_compound_literal
1800 on erroneous constexpr init.
1803 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1806 * decl.c (create_array_type_for_decl): Only check for auto once.
1809 * call.c (build_list_conv): Don't try to build a list of references.
1811 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1813 PR C++/60209 - Declaration of user-defined literal operator cause error
1814 * parser.c (cp_parser_operator): Fold treatment of strings
1815 and user-defined string literals. Use the full string parser.
1816 (cp_parser_string_literal): Add flag to not look for literal operator.
1818 2014-07-11 Jason Merrill <jason@redhat.com>
1822 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1824 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1827 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1829 * decl.c (check_initializer): Don't call check_narrowing here,
1830 set LOOKUP_NO_NARROWING.
1831 * typeck2.c (digest_init_r): Likewise.
1833 2014-07-10 Jason Merrill <jason@redhat.com>
1836 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1840 * decl2.c (mark_all_virtuals): New variable.
1841 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1842 (cp_write_global_declarations): Set it and give helpful diagnostic
1843 if it introduces errors.
1844 * class.c (finish_struct_1): Check it.
1845 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1847 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1850 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1851 outside class declaration, in friend declaration, and neither on
1852 constructor nor conversion operator.
1854 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1858 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1859 cv-qualifiers of function types.
1861 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1862 Paolo Carlini <paolo.carlini@oracle.com>
1865 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1868 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1870 * class.c (check_for_override): Wrap the 'final' and 'override'
1871 keywords in %< and %>.
1873 2014-07-06 Marek Polacek <polacek@redhat.com>
1876 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1877 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1878 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1881 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1883 * pt.c (convert_template_argument): Use inform instead of error in
1886 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1891 * parser.c (cp_parser_userdef_string_literal): Take a tree
1893 (cp_parser_string_literal): Don't hack the token stream.
1895 2014-06-30 Jason Merrill <jason@redhat.com>
1899 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1901 * init.c (build_vtbl_address): Don't mark destructor.
1902 * class.c (finish_struct_1): Add all classes to keyed_classes
1906 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1909 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1911 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1912 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1913 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1914 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1915 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1916 * pt.c (unify): Also check whether the argument is a PMF.
1918 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1921 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1922 a '[' can also start a primary-expression.
1923 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1924 when cp_parser_tokens_start_cast_expression returns -1.
1926 2014-06-30 Jason Merrill <jason@redhat.com>
1929 * pt.c (unify_one_argument): Type/expression mismatch just causes
1932 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1935 2014-06-30 Marek Polacek <polacek@redhat.com>
1937 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1938 function has no_sanitize_undefined attribute.
1939 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1940 function has no_sanitize_undefined attribute.
1942 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1945 * cp-array-notation.c (expand_sec_reduce_builtin):
1946 Check that bultin argument is correct.
1947 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1949 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1953 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1954 types aren't the same.
1956 2014-06-27 Jason Merrill <jason@redhat.com>
1959 * error.c (dump_template_bindings): Don't tsubst in a clone.
1961 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1964 * semantics.c (finish_compound_literal): Revert r204228.
1966 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1968 * parser.c (cp_parser_compound_literal_p): New.
1969 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1971 2014-06-26 Jason Merrill <jason@redhat.com>
1973 * parser.c (cp_parser_for_init_statement): Change range-for error
1976 N3994 Ranged-based for-loops: The Next Generation
1977 * parser.c (cp_lexer_nth_token_is): New.
1978 (cp_parser_for_init_statement): Allow "for (id : init)".
1980 2014-06-26 Teresa Johnson <tejohnson@google.com>
1982 * class.c (dump_class_hierarchy): Use saved dump files.
1983 (dump_vtable): Ditto.
1986 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1989 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1990 parameter lists outside of function parameter scope.
1992 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1996 * typeck2.c (process_init_constructor_record): Do not complain about
1997 uninitialized const members, because within aggregate-initialization,
1998 members without explicit initializers are value-initialized.
2000 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2002 * semantics.c (finish_omp_clauses): Make sure
2003 OMP_CLAUSE_LINEAR_STEP has correct type.
2005 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
2007 * class.c (check_methods, create_vtable_ptr, determine_key_method,
2008 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
2009 FUNCTION_DECL check.
2010 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
2011 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
2012 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
2013 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
2015 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
2018 * decl.c (grokdeclarator): Do not early check for operator-function-id
2021 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2023 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
2026 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2028 * parser.c (cp_parser_omp_for_loop): For
2029 #pragma omp parallel for simd move lastprivate clause from parallel
2030 to for rather than simd.
2032 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
2036 * decl.c (grokparms): Accept a single parameter of type 'void'.
2038 2014-06-20 Jason Merrill <jason@redhat.com>
2041 * call.c (add_function_candidate): Avoid special 'this' handling
2042 if we have a ref-qualifier.
2045 * call.c (build_over_call): Call build_this in template path.
2047 2014-06-19 Jason Merrill <jason@redhat.com>
2050 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
2052 2014-06-18 Jason Merrill <jason@redhat.com>
2055 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
2056 ref-qualifier handling.
2059 * pt.c (resolve_overloaded_unification): Preserve
2060 ARGUMENT_PACK_EXPLICIT_ARGS.
2062 2014-06-18 Jakub Jelinek <jakub@redhat.com>
2064 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
2066 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
2068 2014-06-17 Jason Merrill <jason@redhat.com>
2071 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
2073 2014-06-15 Jason Merrill <jason@redhat.com>
2076 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
2079 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
2081 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2083 * decl.c (grokvardecl): Fix pasto in previous patch.
2085 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2087 * decl.c (duplicate_decls): Use set_decl_tls_model.
2088 (grokdeclarator): Likewise.
2089 * semantics.c (finish_id_expression): Check TLS only for
2091 (finish_omp_threadprivate): Use decl_default_tls_model.
2092 * decl2.c (get_guard): Likewise.
2093 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
2095 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2098 * decl.c (grokparms): Improve error message about void parameters.
2099 * error.c (type_to_string): Fix aka cut off code.
2101 2014-06-12 Jason Merrill <jason@redhat.com>
2103 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
2104 * cvt.c (type_promotes_to): Likewise.
2105 * mangle.c (write_type, write_expression): Likewise.
2106 (write_name, write_template_arg): Likewise.
2107 (mangle_decl): Make alias based on flag_abi_compat_version.
2108 Emit -Wabi warning here.
2109 (finish_mangling_internal): Not here. Drop warn parm.
2110 (finish_mangling_get_identifier, finish_mangling): Adjust.
2111 (mangle_type_string, mangle_special_for_type): Adjust.
2112 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
2113 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
2114 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
2116 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
2117 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
2118 (layout_nonempty_base_or_field, end_of_class): Likewise.
2119 (layout_empty_base, build_base_field, layout_class_type): Likewise.
2120 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
2121 (layout_virtual_bases): Likewise.
2122 * decl.c (compute_array_index_type): Likewise.
2123 * mangle.c (write_mangled_name, write_prefix): Likewise.
2124 (write_template_prefix, write_integer_cst, write_expression): Likewise.
2125 (write_template_arg, write_array_type): Likewise.
2126 * method.c (lazily_declare_fn): Likewise.
2127 * rtti.c (get_pseudo_ti_index): Likewise.
2128 * typeck.c (comp_array_types): Likewise.
2130 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
2132 * vtable-class-hierarchy.c: Update handling for section names
2133 that are no longer trees.
2134 * decl.c (duplicate_decls): Likewise.
2136 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2139 * parser.c (cp_parser_init_declarator): Actually pass friend_p
2140 to cp_parser_declarator.
2142 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2145 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
2146 * name-lookup.c (validate_nonmember_using_decl): Adjust error
2149 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2152 * parser.c (cp_parser_declarator): Add bool parameter.
2153 (cp_parser_direct_declarator): Likewise, use it.
2154 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
2155 (cp_parser_condition, cp_parser_explicit_instantiation,
2156 cp_parser_init_declarator, cp_parser_type_id_1,
2157 cp_parser_parameter_declaration, cp_parser_exception_declaration,
2158 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
2159 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
2161 * decl.c (grokdeclarator): Fix handling of friend declared in
2162 namespace scope (g++.dg/parse/friend10.C).
2164 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
2166 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
2168 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
2169 (maybe_clone_body): Move symbol across comdat groups.
2170 * method.c (use_thunk): Copy implicit section flag.
2172 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2175 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
2177 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2179 * method.c (use_thunk): Use set_decl_section_name.
2180 * optimize.c (maybe_clone_body): Use set_decl_section_name.
2181 * decl.c (duplicate_decls): Likewise.
2182 * vtable-class-hierarchy.c: Likewise.
2184 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
2187 * class.c (check_field_decls): In C++11 mode do not reject
2188 static data members and reference-type members in unions.
2190 2014-06-05 Jason Merrill <jason@redhat.com>
2193 * decl.c (check_initializer): Collapse a TREE_LIST here.
2194 * typeck2.c (store_init_value): Not here.
2196 2014-06-05 Richard Biener <rguenther@suse.de>
2197 Paolo Carlini <paolo.carlini@oracle.com>
2200 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
2201 handling of empty classes.
2203 2014-06-04 Jason Merrill <jason@redhat.com>
2205 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
2206 for noexcept and thread_local, too.
2209 * decl.c (check_initializer): Maybe clear
2210 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2212 2014-06-05 Richard Biener <rguenther@suse.de>
2215 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
2216 warnings for accessing empty classes.
2218 2014-06-05 Marek Polacek <polacek@redhat.com>
2221 * parser.c (cp_parser_binary_expression): Warn when logical not is
2222 used on the left hand side operand of a comparison.
2224 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
2227 * typeck.c (cp_build_modify_expr): Handle array of characters
2228 initialized by a string literal.
2229 * decl.c (check_initializer): Handle parenthesized string literal
2231 * typeck2.c (store_init_value): Remove redundant check.
2233 2014-06-04 Jason Merrill <jason@redhat.com>
2237 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
2238 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
2240 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2243 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
2246 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2250 * call.c (standard_conversion): Convert nullptr to bool only
2251 in case of direct-initialization.
2252 (convert_like_real): Provide informative error message.
2254 2014-06-03 Marek Polacek <polacek@redhat.com>
2257 * semantics.c (finish_switch_cond): Warn if switch condition has
2260 2014-06-03 Jason Merrill <jason@redhat.com>
2263 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
2264 variable to local_specializations.
2267 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
2269 2014-06-02 Jason Merrill <jason@redhat.com>
2272 * decl.c (reshape_init_class): Handle un-folded
2273 constant-expressions.
2276 * pt.c (pack_deducible_p): Handle canonicalization.
2278 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2280 * pt.c (tsubst_function_type): Initialize arg_types.
2282 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
2285 * class.c (handle_using_decl): Pass the correct scope to
2286 cp_emit_debug_info_for_using.
2288 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2292 * search.c (accessible_p): Use current_nonlambda_class_type.
2293 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2295 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2297 * decl.c: Include builtins.h.
2298 * semantics.c: Likewise.
2300 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
2304 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2305 * pt.c (tsubst_function_type): Inject the this parameter; do the
2306 substitutions in the order mandated by the DR.
2307 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2308 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2309 (static_fn_type): Copy it.
2310 * decl2.c (build_memfn_type, change_return_type,
2311 cp_reconstruct_complex_type): Likewise.
2312 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2313 * tree.c (strip_typedefs): Likewise.
2314 * typeck.c (merge_types): Likewise.
2316 2014-05-30 Jason Merrill <jason@redhat.com>
2319 * pt.c (instantiate_decl): Check that defer_ok is not set for
2320 local class members.
2323 * pt.c (tsubst_init): Split out from...
2324 (tsubst_expr) [DECL_EXPR]: Here.
2325 (tsubst_copy) [VAR_DECL]: Use it.
2326 * semantics.c (finish_id_expression): Return the decl for static/const.
2328 2014-05-28 Jason Merrill <jason@redhat.com>
2331 * decl.c (cxx_comdat_group): Return a decl.
2332 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2334 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2338 * call.c (build_aggr_conv): Ignore passed in flags.
2339 (build_array_conv, build_complex_conv): Likewise.
2341 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2343 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2344 (maybe_clone_body): Likewise.
2345 * decl.c (duplicate_decls): Update code duplicating comdat group;
2346 do not copy symtab pointer; before freeing newdecl remove it
2348 * decl2.c (constrain_visibility): Use set_comdat_group.
2350 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2352 * rtti.c: Include tm_p.h
2353 (emit_tinfo_decl): Force RTTI data to be aligned to required
2356 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2358 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2359 ignoring other target adjustments.
2361 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2363 * semantics.c (finish_omp_clauses): Remove duplicated variable
2366 * parser.c (cp_parser_omp_target): Return bool values.
2368 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2371 * lambda.c (add_capture): Enforce that capture by value requires
2373 * typeck2.c (cxx_incomplete_type_inform): Early return if
2374 TYPE_MAIN_DECL is null.
2376 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2379 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2381 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2384 * lambda.c (build_capture_proxy, add_capture): Treat normal
2385 captures and init-captures identically.
2387 2014-05-21 Mark Wielaard <mjw@redhat.com>
2390 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2391 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2393 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2395 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2396 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2397 (expand_array_notation): Handle VOID_CST.
2398 * error.c (dump_expr): Likewise.
2399 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2400 (cxx_pretty_printer::expression): Likewise.
2401 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2402 * decl.c (register_dtor_fn): Likewise.
2403 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2404 (build_delete, push_base_cleanups): Likewise.
2405 * mangle.c (write_expression): Likewise.
2406 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2407 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2408 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2409 * tree.c (cp_tree_equal): Likewise.
2410 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2411 instead of void_zero_node.
2412 * typeck.c (check_return_expr): Likewise.
2413 * typeck2.c (build_functional_cast): Likewise.
2415 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2418 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2420 (cp_parser_statement): ...here. Make sure only semicolon can go after
2423 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2428 * typeck2.c (digest_nsdmi_init): New.
2429 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2430 * init.c (get_nsdmi): Likewise.
2431 * cp-tree.h (digest_nsdmi_init): Declare.
2433 2014-05-20 Jason Merrill <jason@redhat.com>
2435 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2436 up a virtual function in a dummy object.
2438 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2441 * decl.c (duplicate_decls): Replace pair of warning_at with
2442 warning_at + inform.
2443 (maybe_commonize_var): Likewise.
2445 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2448 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2449 (tsubst_copy_and_build): Perform recursive substitutions in a
2450 deterministic order.
2452 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2455 * typeck2.c (cxx_incomplete_type_inform): New.
2456 (cxx_incomplete_type_diagnostic): Use it.
2457 * decl.c (grokdeclarator): Check the element type of an
2458 incomplete array type; call the above.
2459 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2461 2014-05-19 Jason Merrill <jason@redhat.com>
2464 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2465 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2467 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2469 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2470 * parser.c (cp_parser_enum_specifier): Likewise.
2472 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2474 * class.c (sorted_fields_type_new): Adjust.
2475 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2476 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2477 * cp-tree.h: Remove usage of variable_size gty attribute.
2478 * decl.c (make_label_decl): Adjust.
2479 (check_goto): Likewise.
2480 (start_preparsed_function): Likewise.
2481 (save_function_data): Likewise.
2482 * lex.c (init_reswords): Likewise.
2483 (retrofit_lang_decl): Likewise.
2484 (cxx_dup_lang_specific_decl): Likewise.
2485 (copy_lang_type): Likewise.
2486 (cxx_make_type): Likewise.
2487 * name-lookup.c (binding_entry_make): Likewise.
2488 (binding_table_construct): Likewise.
2489 (binding_table_new): Likewise.
2490 (cxx_binding_make): Likewise.
2491 (pushdecl_maybe_friend_1): Likewise.
2492 (begin_scope): Likewise.
2493 (push_to_top_level): Likewise.
2494 * parser.c (cp_lexer_alloc): Likewise.
2495 (cp_lexer_new_from_tokens): Likewise.
2496 (cp_token_cache_new): Likewise.
2497 (cp_parser_context_new): Likewise.
2498 (cp_parser_new): Likewise.
2499 (cp_parser_nested_name_specifier_opt): Likewise.
2500 (cp_parser_template_id): Likewise.
2501 * pt.c (maybe_process_partial_specialization): Likewise.
2502 (register_specialization): Likewise.
2503 (add_pending_template): Likewise.
2504 (lookup_template_class_1): Likewise.
2505 (push_tinst_level): Likewise.
2506 * semantics.c (register_constexpr_fundef): Likewise.
2507 (cxx_eval_call_expression): Likewise.
2508 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2510 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2513 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2514 when cp_parser_lookup_name sets ambiguous_decls.
2516 2014-05-15 Jason Merrill <jason@redhat.com>
2518 * call.c (print_conversion_rejection): Use loc consistently.
2520 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2522 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2523 * call.c (convert_like_real, build_new_method_call_1): Use it.
2524 * decl2.c (grokfield): Likewise.
2525 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2526 build_new_1): Likewise.
2527 * mangle.c (write_expression): Likewise.
2528 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2530 2014-05-14 Jason Merrill <jason@redhat.com>
2534 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2535 dropped cv-quals as a bad conversion.
2536 (convert_like_real) [ck_ref_bind]: Explain them.
2537 (compare_ics): Check badness before stripping reference
2538 bindings. Handle comparing bad reference bindings.
2539 * typeck.c (comp_cv_qualification): Add overload that just takes
2541 * cp-tree.h: Declare it.
2543 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2544 (arg_conversion_rejection, bad_arg_conversion_rejection)
2545 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2546 (add_function_candidate): Pass actual argument, rather than type, to
2547 bad_arg_conversion_rejection.
2548 (print_conversion_rejection): Explain what's wrong with the conversion.
2549 (print_z_candidates): Say "candidate:" before each candidate.
2550 (splice_viable): Be strict if we see a viable or template candidate.
2551 (build_user_type_conversion_1): Pass false to strict parameter.
2552 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2553 (build_new_op_1, build_new_method_call_1): Likewise.
2554 (build_op_call_1): Pass true to strict parameter.
2556 2014-05-13 Jason Merrill <jason@redhat.com>
2558 * call.c (print_error_for_call_failure): Say "no match" rather
2559 than "ambiguous" if there were no strict matches.
2560 (build_new_method_call_1): Likewise.
2563 * semantics.c (is_this_parameter): Allow capture proxies too.
2565 2014-05-12 Jason Merrill <jason@redhat.com>
2567 * call.c (maybe_print_user_conv_context): New.
2568 (convert_like_real): Use it. Print call context for bad
2569 user-defined conversion.
2570 (build_over_call): Print call context for bad 'this' conversion.
2572 * call.c (convert_like_real): Use inform for identifying the
2575 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2577 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2578 complain & tf_error is false.
2580 * decl.c (make_unbound_class_template): Prefer inform for
2581 "declared here"-type message.
2583 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2587 * lambda.c (lambda_expr_this_capture): Add new parameter
2588 add_capture_p controlling whether the functions will try to
2589 capture 'this' via the default capture.
2590 (maybe_resolve_dummy): Likewise.
2591 * cp-tree.h: Adjust prototypes.
2592 * call.c, semantics.c: Change callers of these functions.
2593 * call.c (build_new_method_call_1): Use the actual 'this' that
2594 would be potentially captured for the overload resolution, instead
2595 of the dummy object.
2597 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2599 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2601 (convert_nontype_argument): Adjust calls.
2602 (coerce_template_parameter_pack): Add missing complain & tf_error
2605 2014-05-09 Jason Merrill <jason@redhat.com>
2609 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2610 non-class lvalues and xvalues that differ only in cv-qualifiers.
2614 * call.c (build_user_type_conversion_1): The copy-init temporary
2618 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2621 * call.c (build_conditional_expr_1): If overload resolution finds
2622 no match, just say "different types".
2625 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2628 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2629 if we didn't find a conversion.
2630 Don't accept a bad conversion too early.
2632 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2635 * typeck.c (convert_for_assignment): Provide an inform for pointers
2636 to incomplete class types.
2638 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2641 * pt.c (convert_nontype_argument): Protect all the error calls
2642 with complain & tf_error.
2644 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2647 * pt.c (instantiate_decl): Avoid generating the body of a
2650 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2653 * pt.c (maybe_begin_member_template_processing): Use
2654 uses_template_parms.
2656 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2657 Mike Stump <mikestump@comcast.net>
2658 Richard Sandiford <rdsandiford@googlemail.com>
2660 * call.c: Include wide-int.h.
2661 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2662 (convert_for_arg_passing): Likewise.
2663 * class.c: Include wide-int.h.
2664 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2665 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2666 (include_empty_classes): Likewise
2667 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2668 * cvt.c: Include wide-int.h.
2669 (ignore_overflows): Use wide_int_to_tree.
2670 * decl.c: Include wide-int.h.
2671 (check_array_designated_initializer): Use wide-int interfaces.
2672 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2673 (finish_enum_value_list): Use signop.
2674 (build_enumerator): Use wide-int interfaces.
2675 * init.c: Include wide-int.h.
2676 (build_new_1): Use wide-int interfaces.
2677 * mangle.c: Include wide-int.h.
2678 (write_integer_cst): Use wide-int interfaces.
2679 (write_array_type): Likewise.
2680 * tree.c: Include wide-int.h.
2681 (cp_tree_equal): Use tree_int_cst_equal.
2682 * typeck2.c: Include wide-int.h.
2683 (process_init_constructor_array): Use wide-int interfaces.
2685 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2688 * decl.c (grokfndecl): Check duplicate_decls return value for
2690 * pt.c (instantiate_decl): A deleted function is defined.
2692 2014-05-02 Jason Merrill <jason@redhat.com>
2694 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2697 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2699 (add_capture): Check for VLA before calling it.
2700 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2701 just the current one. Make non-static.
2702 * cp-tree.h: Declare it.
2703 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2704 the operand was static or constant.
2706 2014-05-02 Marek Polacek <polacek@redhat.com>
2708 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2711 2014-05-01 Marek Polacek <polacek@redhat.com>
2714 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2715 between label and variable when warning about returning local address.
2717 2014-04-30 Jason Merrill <jason@redhat.com>
2720 * init.c (build_value_init): Don't try to call an array constructor.
2723 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2725 2014-04-30 Marek Polacek <polacek@redhat.com>
2727 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2728 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2729 for non-integer types.
2731 2014-04-29 Jason Merrill <jason@redhat.com>
2734 Represent the unevaluated exception specification of an implicitly
2735 declared or deleted function with a simple placeholder, not a list
2737 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2738 * except.c (unevaluated_noexcept_spec): New.
2739 * class.c (deduce_noexcept_on_destructor): Use it.
2740 * decl.c (check_redeclaration_exception_specification): Call
2741 maybe_instantiate_noexcept.
2742 (duplicate_decls): Call it before merge_types.
2743 (start_preparsed_function): Call maybe_instantiate_noexcept.
2744 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2745 * init.c (get_nsdmi): Factor out of perform_member_init.
2746 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2747 (walk_field_subobs): Consider NSDMI for EH spec.
2748 (get_defaulted_eh_spec): New.
2749 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2750 (defaulted_late_check): Defer EH checking in non-template classes.
2751 (after_nsdmi_defaulted_late_checks): New.
2752 * parser.c (cp_parser_class_specifier_1): Use it.
2753 (unparsed_classes): New macro.
2754 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2755 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2756 Remove list-of-functions handling.
2757 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2758 handling and FN parameter.
2759 * typeck.c (merge_types): Adjust.
2761 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2764 * parser.c (cp_parser_alias_declaration): Check return value of
2767 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2769 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2770 atomic-clause, allow comma in between atomic-clause and
2773 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2776 * rtti.c (emit_support_tinfos): Do not iterate on
2777 registered_builtin_types (partial revert).
2779 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2782 * semantics.c (apply_deduced_return_type): Complete non-void type
2783 before estimating whether the type is aggregate.
2785 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2788 * rtti.c (emit_support_tinfo_1): New function, extracted from
2789 emit_support_tinfos.
2790 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2792 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2795 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2796 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2798 2014-04-18 Jason Merrill <jason@redhat.com>
2801 * call.c (reference_binding): Recurse on user-defined conversion.
2804 * call.c (standard_conversion): Don't try to apply restrict to void.
2806 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2808 * decl.c (reshape_init_r): Handle a single element of vector type.
2810 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2813 * decl2.c (cplus_decl_attributes): Handle
2814 pointer-to-member-function declarations.
2816 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2819 * call.c (build_user_type_coversion): Use build_dummy_object
2820 to create the placeholder object for a constructor method call.
2821 (build_special_member_call): Likewise.
2822 (build_over_call): Check for the placeholder object with
2824 (build_new_method_call_1): Likewise. Don't attempt to resolve
2825 a dummy object for a constructor method call.
2827 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2830 * friend.c (add_friend, make_friend_class): Move repeated friend
2831 warning under Wredundant_decls.
2833 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2835 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2836 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2837 (do_class_using_decl): Likewise.
2838 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2840 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2843 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2845 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2847 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2849 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2851 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2853 2014-04-11 Jason Merrill <jason@redhat.com>
2855 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2857 (cp_lexer_get_preprocessor_token): Always clear it.
2858 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2862 * decl.c (reshape_init_r): Handle a single element of class type.
2865 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2866 built-in operator new.
2868 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2871 * name-lookup.c (parse_using_directive): Return early if the
2872 attribs argument is error_mark_node; use get_attribute_name.
2874 2014-04-11 Jason Merrill <jason@redhat.com>
2878 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2879 * call.c (struct z_candidate): Add flags field.
2880 (add_candidate): Add flags parm.
2881 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2882 (add_template_candidate_real): Pass it.
2883 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2884 * tree.c (build_aggr_init_expr): Copy it.
2885 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2887 2014-04-10 Richard Biener <rguenther@suse.de>
2888 Jakub Jelinek <jakub@redhat.com>
2891 * error.c (dump_decl) <case FUNCTION_DECL>: If
2892 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2893 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2896 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2898 * pt.c (check_template_variable): Check for the return of pedwarn
2899 before emitting a note.
2900 * parser.c (cp_parser_lambda_introducer): Likewise.
2902 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2905 * pt.c (process_template_parm): For an invalid non-type parameter
2906 only set TREE_TYPE to error_mark_node.
2907 (push_inline_template_parms_recursive, comp_template_parms,
2908 redeclare_class_template, coerce_template_template_parm,
2909 coerce_template_template_parms, unify): Use error_operand_p.
2911 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2913 * class.c (check_bases_and_members): Warn about non-virtual dtors
2914 in public bases only. Check warn_ecpp before complaining about
2915 non-polymorphic bases.
2917 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2919 * decl.c (duplicate_decls): Check for the return of warning_at
2920 before emitting a note.
2921 (warn_misplaced_attr_for_class_type): Likewise.
2922 (check_tag_decl): Likewise.
2924 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2927 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2929 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2932 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2933 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2934 instantiating a variable-sized type.
2937 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2939 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2941 * class.c (find_abi_tags_r): Check for the return of warning
2942 before emitting a note.
2943 (one_inherited_ctor): Likewise.
2945 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2947 * decl.c (duplicate_decls): Check for the return of permerror
2948 before emitting a note.
2950 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2952 * class.c (accessible_nvdtor_p): New.
2953 (check_bases): Don't check base destructor here ...
2954 (check_bases_and_members): ... check them here. Trigger on
2955 Wnon-virtual-dtor flag.
2956 (finish_struct_1): Use accessible_nvdtor_p.
2958 2014-04-01 Jason Merrill <jason@redhat.com>
2960 * pt.c (process_partial_specialization): Say "not deducible"
2961 rather than "not used". Use inform.
2964 * pt.c (coerce_template_parms): Check that the pack expansion
2965 pattern works with the first matching parameter.
2967 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2969 * init.c (perform_member_init): Homogenize uninitialized
2972 2014-04-01 Jason Merrill <jason@redhat.com>
2975 * call.c (build_array_conv): Call complete_type.
2978 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2979 (picflag_from_initializer): Return it.
2980 (process_init_constructor): Handle it.
2983 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2984 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2985 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2986 (most_general_template): Handle more kinds of template.
2987 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2988 instantiations and specializations.
2990 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2993 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2994 COMPONENT_REFs and ARRAY_REFs sooner.
2996 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2999 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
3000 usage in non-functions with pushed scope.
3002 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
3005 * name-lookup.h (cp_binding_level): New transient field defining_class_p
3006 to indicate whether a scope is in the process of defining a class.
3007 * semantics.c (begin_class_definition): Set defining_class_p.
3008 * name-lookup.c (leave_scope): Reset defining_class_p.
3009 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
3010 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
3011 unwinding to class-defining scope to handle the erroneous definition of
3012 a generic function of an arbitrarily nested class within an enclosing
3015 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
3018 * method.c (walk_field_subobs): Improve the diagnostic
3019 locations for both REFERENCE_TYPEs and non-static const members.
3020 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
3021 instead of %qD to be consistent with the c++11 diagnostic.
3023 2014-03-25 Jason Merrill <jason@redhat.com>
3027 * class.c (build_vtbl_initializer): Handle abstract dtors here.
3028 * search.c (get_pure_virtuals): Not here.
3031 * parser.c (cp_parser_lambda_expression): Don't parse the body of
3032 a lambda in unevaluated context.
3035 * decl.c (create_array_type_for_decl): Complain about array of auto.
3037 2014-03-25 Jakub Jelinek <jakub@redhat.com>
3040 * semantics.c (potential_constant_expression_1): Handle
3043 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
3046 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
3047 introducing an implicit function template parameter within an explicit
3050 2014-03-22 Jason Merrill <jason@redhat.com>
3053 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
3056 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
3059 * name-lookup.c (push_class_level_binding_1): Check identifier_p
3060 on the name argument.
3062 2014-03-20 Jakub Jelinek <jakub@redhat.com>
3065 * init.c (build_zero_init_1): Ignore fields with error_mark_node
3068 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
3071 * call.c (build_new_method_call_1): Handle pure virtuals called by
3074 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
3077 * parser.c (cp_parser_member_declaration): Don't allow
3078 finish_fully_implicit_template to consider friend declarations to be
3079 class member templates.
3080 (synthesize_implicit_template_parm): Handling winding back through class
3081 scope to the class being defined in order to inject a template argument
3085 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
3086 function scope as per cp_parser_skip_to_end_of_statement.
3088 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
3091 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
3093 2014-03-14 Jason Merrill <jason@redhat.com>
3097 * search.c (get_pure_virtuals): Handle abstract dtor here.
3098 (dfs_get_pure_virtuals): Not here.
3101 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
3102 abstract class as pure.
3104 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3107 * pt.c (maybe_process_partial_specialization): Check return value
3108 of check_specialization_namespace.
3110 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3113 * semantics.c (finish_static_assert): Call cxx_constant_value only
3114 if require_potential_rvalue_constant_expression returns true.
3116 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
3119 * method.c (get_inherited_ctor): New.
3120 * cp-tree.h (get_inherited_ctor): Declare it.
3121 * semantics.c (is_valid_constexpr_fn): Use it.
3123 2014-03-10 Jason Merrill <jason@redhat.com>
3126 * call.c (convert_default_arg): Remove special handling for
3130 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
3131 when deciding whether to call push_template_decl for a member class.
3132 * pt.c (push_template_decl_real): Return after wrong levels error.
3134 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
3137 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
3138 lambda, remove the lambda's own template argument list prior to fetching
3142 * parser.c (cp_parser_parameter_declaration_clause): Move generic
3143 function template unwinding on error into a more general location, ...
3144 (cp_parser_skip_to_end_of_statement): ... here.
3146 2014-03-07 Jason Merrill <jason@redhat.com>
3148 * Make-lang.in (check_g++_parallelize): Split dg.exp.
3150 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
3151 we're in a trailing return type.
3153 * typeck.c (comp_template_parms_position): 'auto' and
3154 'decltype(auto)' are different from real template parms.
3156 * parser.c (cp_parser_using_declaration): Consume the semicolon
3157 after bare parameter pack error.
3159 * cp-tree.h (REF_PARENTHESIZED_P): New.
3160 * semantics.c (force_paren_expr): Set it.
3161 * pt.c (do_auto_deduction): Check it.
3162 (tsubst) [COMPONENT_REF]: Copy it.
3163 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
3165 * decl.c (create_array_type_for_decl): Only warn about invalid
3166 C++1y VLA if flag_iso or warn_vla>0.
3167 (grokdeclarator): Likewise.
3168 * pt.c (tsubst): Likewise.
3169 * semantics.c (finish_decltype_type): Likewise.
3170 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
3171 (cp_build_addr_expr_1): Likewise.
3172 * init.c (build_new_1): Improve diagnostics.
3174 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3177 * decl.c (check_initializer): Return NULL_TREE after error;
3178 consistently use inform.
3180 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3182 * decl.c (check_initializer): Remove dead code.
3184 2014-03-06 Marek Polacek <polacek@redhat.com>
3187 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
3188 of checking tree code.
3190 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3192 * parser.c (cp_lexer_set_source_position): New.
3193 (cp_parser_mem_initializer): Use it.
3194 (cp_parser_postfix_open_square_expression): Likewise.
3195 (cp_parser_parenthesized_expression_list): Likewise.
3196 (cp_parser_new_initializer): Likewise.
3197 (cp_parser_jump_statement): Likewise.
3198 (cp_parser_initializer): Likewise.
3199 (cp_parser_functional_cast): Likewise.
3201 2014-03-05 Jason Merrill <jason@redhat.com>
3204 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
3205 dependent expression.
3208 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
3209 if re-parsing might succeed.
3210 * semantics.c (finish_id_expression): Use of a parameter outside
3211 the function body is a parse error.
3213 * parser.c (cp_parser_mem_initializer): Set input_location
3214 properly for init-list warning.
3215 (cp_parser_postfix_open_square_expression): Likewise.
3216 (cp_parser_parenthesized_expression_list): Likewise.
3217 (cp_parser_new_initializer): Likewise.
3218 (cp_parser_jump_statement): Likewise.
3219 (cp_parser_initializer): Likewise.
3220 (cp_parser_functional_cast): Likewise.
3222 2014-03-04 Jason Merrill <jason@redhat.com>
3225 * typeck2.c (process_init_constructor_record): Set
3226 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
3230 * parser.c (cp_parser_direct_declarator): Set declarator to
3231 cp_error_declarator on invalid qualified-id.
3233 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
3236 * parser.c (cp_parser_using_declaration): Early return when
3237 cp_parser_nested_name_specifier errors out.
3239 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
3242 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
3243 function scope on parse error in function parameter list.
3245 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3247 * method.c (implicitly_declare_fn): Remove redundant
3248 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
3249 * semantics.c (is_instantiation_of_constexpr): Likewise.
3250 * error.c (dump_function_decl): Likewise.
3252 2014-03-01 Jason Merrill <jason@redhat.com>
3255 * semantics.c (begin_maybe_infinite_loop): Use
3256 fold_non_dependent_expr_sfinae.
3258 2014-02-28 Jason Merrill <jason@redhat.com>
3261 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
3263 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
3266 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
3267 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
3268 * lambda.c (maybe_add_lambda_conv_op): Likewise.
3270 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
3273 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
3276 2014-02-27 Jason Merrill <jason@redhat.com>
3280 * decl2.c (tentative_decl_linkage): Don't mess with functions that
3281 are not yet defined.
3283 2014-02-26 Jason Merrill <jason@redhat.com>
3287 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
3288 * init.c (build_vtbl_address): Do it here.
3294 * pt.c (struct warning_sentinel): New.
3295 (tsubst_copy_and_build): Use it instead of
3296 c_inhibit_evaluation_warnings.
3297 * typeck.c (maybe_warn_about_useless_cast): Remove
3298 c_inhibit_evaluation_warnings check.
3301 * pt.c (get_template_parm_index): New.
3302 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3303 (process_template_parm): Allow bare packs in template template
3304 parm template parms.
3305 (coerce_template_parameter_pack): Handle fixed template template
3306 parm packs and fixed packs not at the end of the parm list.
3307 (coerce_template_parms): Handle template parm packs not at the end
3309 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3312 * pt.c (unify): Ignore alias templates when deducing a template
3318 * call.c (reference_binding): Recurse on user-defined conversion.
3319 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3321 2014-02-25 Jason Merrill <jason@redhat.com>
3324 * call.c (reference_binding): Recurse on user-defined conversion.
3325 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3327 * call.c (print_conversion_rejection): Handle n_arg of -2.
3328 (build_user_type_conversion_1): Pass it.
3331 * decl2.c (no_linkage_error): Handle C++98 semantics.
3332 (reset_type_linkage): Move from decl.c.
3333 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3334 (bt_reset_linkage_2, reset_decl_linkage): New.
3335 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3336 (cp_write_global_declarations): Move condition into no_linkage_error.
3337 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3338 * semantics.c (expand_or_defer_fn_1): Factor out
3339 tentative_decl_linkage.
3340 * cp-tree.h: Adjust.
3342 * decl2.c (finish_static_data_member_decl): Diagnose static data
3343 member in unnamed class.
3344 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3347 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3348 defaulted virtual dtor.
3352 * pt.c (get_underlying_template): Fix equivalence calculation.
3354 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3357 * parser.c (function_being_declared_is_template_p): Return false when
3358 processing a template parameter list.
3359 (cp_parser_parameter_declaration_clause): Don't set
3360 auto_is_implicit_function_template_parm_p when processing a
3361 template parameter list.
3363 * parser.c (synthesize_implicit_template_parm): Inject new template
3364 argument list appropriately when a generic member function
3365 of a class template is declared out-of-line.
3368 * parser.c (cp_parser_direct_declarator): Don't save and
3369 restore num_template_parameter_lists around call to
3370 cp_parser_parameter_declaration_list.
3371 (function_being_declared_is_template_p): New predicate.
3372 (cp_parser_parameter_declaration_list): Use
3373 function_being_declared_is_template_p as predicate for
3374 inspecting current function template parameter list length
3375 rather than num_template_parameter_lists.
3377 2014-02-24 Jason Merrill <jason@redhat.com>
3380 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3381 DECL_EXPR initialize a non-class iterator.
3384 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3386 2014-02-21 Jason Merrill <jason@redhat.com>
3389 * parser.c (cp_parser_type_name): Always check dependency.
3390 (cp_parser_type_specifier_seq): Call
3391 cp_parser_parse_and_diagnose_invalid_type_name.
3394 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3397 * parser.c (cp_parser_default_argument): Clear
3398 current_class_ptr/current_class_ref like tsubst_default_argument.
3401 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3402 than current_binding_level.
3405 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3408 * parser.c (cp_parser_enum_specifier): Call
3409 check_for_bare_parameter_packs.
3412 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3416 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3417 of the partial instantiation, not the most general template.
3418 (maybe_process_partial_specialization): Reassign everything on
3422 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3423 (check_explicit_specialization): Don't clone.
3426 * pt.c (coerce_template_parms): Bail if argument packing fails.
3429 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3430 Don't get confused by a CONSTRUCTOR that already has a type.
3433 * call.c (build_array_conv): Don't crash on VLA.
3436 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3439 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3440 in declaration context.
3444 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3447 * parser.c (cp_parser_direct_declarator): Don't wrap a
3448 type-dependent expression in a NOP_EXPR.
3451 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3456 * parser.c (cp_parser_template_argument): Restore dereference.
3457 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3458 (process_partial_specialization): Handle deref.
3461 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3465 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3466 implicit_template_scope upon leaving an out-of-line generic member
3467 function definition.
3469 2014-02-20 Kai Tietz <ktietz@redhat.com>
3472 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3473 valued type argument as error_mark_node.
3476 * semantics.c (finish_fname): Handle error_mark_node.
3478 2014-02-19 Jason Merrill <jason@redhat.com>
3481 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3482 spec from template context.
3484 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3487 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3488 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3491 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3493 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3496 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3499 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3502 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3503 During error recovery allow_non_constant may be false.
3505 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3508 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3509 scope whenever a template parameter list has been started, independent
3510 of whether the function call operator was well-formed or not.
3513 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3514 scope for generic friend declarations as well as for non-friends.
3516 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3519 * method.c (implicitly_declare_fn): A constructor of a class with
3520 virtual base classes isn't constexpr (7.1.5p4).
3522 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3524 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3526 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3529 * parser.c (cp_parser_omp_declare_reduction): Save and free
3532 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3536 * tree.c (handle_init_priority_attribute): Call default_conversion on
3537 the attribute argument.
3539 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3542 * method.c (synthesized_method_walk): If vbases is non-null but
3543 is_empty is true, likewise don't worry about the virtual bases.
3545 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3548 * typeck2.c (process_init_constructor_record): Just skip unnamed
3551 2014-01-31 Jason Merrill <jason@redhat.com>
3554 * pt.c (mark_decl_instantiated): Call mark_needed.
3557 * decl2.c (handle_tls_init): Handle null init fn.
3560 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3562 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3565 * class.c (build_vfield_ref): Early return error_mark_node if
3566 TYPE_VFIELD (type) is null.
3567 (build_base_path): Check return value of build_vfield_ref.
3569 2014-01-31 Jason Merrill <jason@redhat.com>
3572 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3573 [ck_list]: Check for error_mark_node.
3574 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3577 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3578 during partial ordering.
3580 2014-01-31 Marek Polacek <polacek@redhat.com>
3583 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3585 2014-01-30 Jason Merrill <jason@redhat.com>
3588 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3589 (local_specializations): New macro.
3590 * pt.c (local_specializations): Remove variable.
3592 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3595 * parser.c (make_string_pack): Use double_int::from_buffer.
3597 2014-01-30 Marek Polacek <polacek@redhat.com>
3600 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3602 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3603 with input_location.
3604 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3607 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3610 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3612 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3615 * pt.c (lookup_template_class_1): Check start_enum return value
3616 for error_mark_node.
3618 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3620 * decl.c (duplicate_decls, typename_hash, typename_compare):
3621 Use TYPE_IDENTIFIER.
3622 * error.c (dump_type): Likewise.
3623 * mangle.c (dump_substitution_candidates): Likewise.
3625 2014-01-30 Jason Merrill <jason@redhat.com>
3628 * decl2.c (attributes_naming_typedef_ok): New.
3629 * cp-tree.h: Declare it.
3630 * decl.c (grokdeclarator): Check it.
3631 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3633 2014-01-29 Jason Merrill <jason@redhat.com>
3636 * call.c (add_builtin_candidate): Catch dependent types.
3639 * pt.c (expand_template_argument_pack): Correct
3640 non_default_args_count calculation.
3643 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3646 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3647 have a friend template in a class template.
3648 * pt.c (tsubst_friend_function): Look through it.
3649 (push_template_decl_real): A friend member template is
3652 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3655 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3658 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3661 * pt.c (instantiate_template_1): Check for error_mark_node the second
3664 2014-01-29 Jason Merrill <jason@redhat.com>
3667 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3668 cdtor_returns_this case.
3671 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3673 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3676 * semantics.c (finish_omp_reduction_clause): Check type for
3679 2014-01-28 Jason Merrill <jason@redhat.com>
3682 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3683 (tsubst_copy): Use it if lookup fails.
3686 * pt.c (tsubst_function_type): Make sure we keep the same function
3690 * semantics.c (build_anon_member_initialization): Stop walking
3691 when we run out of COMPONENT_REFs.
3694 * decl.c (lookup_and_check_tag): Ignore template parameters if
3695 scope == ts_current.
3696 * pt.c (check_template_shadow): Don't complain about the injected
3699 * decl.c (duplicate_decls): Tweak.
3702 * mangle.c (write_unqualified_name): Handle operator auto.
3704 2014-01-27 Jason Merrill <jason@redhat.com>
3708 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3709 list-initialization. A conversion to rvalue ref that involves
3710 an lvalue-rvalue conversion is bad.
3711 (convert_like_real): Give helpful error message.
3714 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3717 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3721 * pt.c (template_parm_to_arg): Call convert_from_reference.
3722 (tsubst_template_arg): Don't strip reference refs.
3725 * call.c (build_aggr_conv): Reject value-initialization of reference.
3729 * call.c (convert_like_real): Give helpful error about excess braces
3730 for ck_rvalue of scalar type.
3733 * call.c (reference_binding): Only elide braces if the single
3734 element is reference-related.
3737 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3741 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3745 * decl.c (compute_array_index_type): Don't call
3746 maybe_constant_value for a non-integral expression.
3748 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3750 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3752 * cp-gimplify.c (cp_genericize): Likewise.
3753 * decl.c (grokfndecl): Likewise.
3754 * parser.c (cp_parser_postfix_expression): Likewise.
3755 (cp_parser_postfix_open_square_expression): Likewise.
3756 (cp_parser_direct_declarator): Likewise.
3757 (is_cilkplus_vector_p): Likewise.
3758 (cp_parser_omp_clause_name): Likewise.
3759 (cp_parser_omp_all_clauses): Likewise.
3760 * pt.c (apply_late_template_attributes): Likewise.
3761 * typeck.c (cp_build_array_ref): Likewise.
3762 (cp_build_compound_expr): Likewise.
3763 (check_return_expr): Likewise.
3765 2014-01-24 Jason Merrill <jason@redhat.com>
3768 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3773 * typeck2.c (process_init_constructor_array): Don't create
3776 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3778 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3779 handling for RANGE_ARRAY case.
3781 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3784 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3786 2014-01-23 Marek Polacek <polacek@redhat.com>
3789 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3791 2014-01-23 Marek Polacek <polacek@redhat.com>
3794 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3797 2014-01-23 Jason Merrill <jason@redhat.com>
3800 * cp-tree.h (struct language_function): Add infinite_loop and
3802 (current_function_infinite_loop): New.
3803 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3804 (break_maybe_infinite_loop): New.
3805 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3806 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3807 (begin_range_for_stmt): Use them.
3808 * decl.c (finish_function): Don't warn about missing return
3809 if current_function_infinite_loop.
3810 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3811 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3813 * call.c (build_op_delete_call): Use make_tree_vector and
3814 release_tree_vector.
3816 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3819 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3820 nested_name_specifier.
3822 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3824 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3825 see if there is an attribute after function decl. If so, then
3827 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3828 enabled function late parsing.
3829 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3830 attribute for a SIMD-enabled function.
3831 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3832 the function is used by SIMD-enabled function (indicated by NULL
3833 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3834 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3835 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3836 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3837 vectorlength clause. Added a new bool parameter to differentiate
3839 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3840 (is_cilkplus_vector_p): Likewise.
3841 (cp_parser_late_parsing_elem_fn_info): Likewise.
3842 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3843 and "vectorlength" clauses when Cilk Plus is enabled.
3844 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3845 and emit a sorry message when step size is a parameter.
3846 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3847 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3849 * pt.c (apply_late_template_attributes): Likewise.
3851 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3854 * semantics.c (finish_omp_reduction_clause): Reject
3855 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3857 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3860 * parser.c (cp_parser_class_head): Push the class before parsing
3861 the base-clause, pop after it.
3863 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3865 * decl2.c (cpp_check): Revert prototype change.
3867 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3871 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3874 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3877 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3878 only when errorcount == 0.
3880 2014-01-17 Marek Polacek <polacek@redhat.com>
3883 * cvt.c (ocp_convert): Don't segfault on non-existing
3884 ENUM_UNDERLYING_TYPE.
3886 2014-01-16 Jason Merrill <jason@redhat.com>
3889 * tree.c (bot_manip): Update the location of builtin_LINE and
3892 2014-01-14 Jason Merrill <jason@redhat.com>
3895 * typeck2.c (massage_init_elt): New.
3896 (process_init_constructor_record)
3897 (process_init_constructor_union): Use it.
3898 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3899 (split_nonconstant_init_1): Handle it.
3900 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3902 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3905 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3906 and replaced an existing if-statement with else-if statement.
3907 Changed an existing error message wording to match the one from the C
3910 2014-01-08 Jason Merrill <jason@redhat.com>
3913 * class.c (abi_tag_data): Add tags field.
3914 (check_abi_tags): Initialize it.
3915 (find_abi_tags_r): Support collecting missing tags.
3916 (mark_type_abi_tags): Don't look at template args.
3917 (inherit_targ_abi_tags): New.
3918 (check_bases_and_members): Use it.
3919 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3920 * mangle.c (write_abi_tags): Check it.
3922 2014-01-07 Jason Merrill <jason@redhat.com>
3925 * pt.c (num_innermost_template_parms): New.
3926 (get_underlying_template): Use it.
3929 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3931 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3933 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3934 the letter of 20.11.6 about Base and Derived naming the same
3935 class type modulo cv-qualifiers.
3937 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3940 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3941 function as unimplemented for generic lambdas with varargs.
3944 * parser.c (cp_parser_template_parameter): Early out with
3945 error_mark_node if parameter declaration was not parsed.
3948 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3949 auto_is_implicit_function_template_parm_p around lambda body.
3952 * parser.c (cp_parser_init_declarator): Undo fully implicit
3953 template parameter list when declarator is not a function.
3955 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3958 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3960 2014-01-03 Tobias Burnus <burnus@net-b.de>
3963 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3965 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3969 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3970 as include_std to perform_koenig_lookup.
3971 (cp_parser_postfix_expression): Adjust.
3972 * pt.c (tsubst_copy_and_build): Likewise.
3973 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3974 (omp_reduction_lookup): Adjust.
3975 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3976 (lookup_arg_dependent): Likewise.
3977 (lookup_function_nonclass): Adjust.
3978 * name-lookup.h: Adjust declaration.
3979 * cp-tree.h: Likewise.
3981 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3984 * parser.c (cp_parser_userdef_numeric_literal): Mention
3985 -fext-numeric-literals in the message.
3987 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3990 * call.c (build_conditional_expr_1): Check the return value of
3993 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3995 * call.c (convert_like_real): Check complain.
3997 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
4000 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
4003 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4005 Update copyright years
4007 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4009 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
4010 the standard form for the copyright notice.
4012 Copyright (C) 2014 Free Software Foundation, Inc.
4014 Copying and distribution of this file, with or without modification,
4015 are permitted in any medium without royalty provided the copyright
4016 notice and this notice are preserved.