1 2014-12-24 Paolo Carlini <paolo.carlini@oracle.com>
4 * parser.c (cp_parser_init_declarator): Add location_t* parameter.
5 (cp_parser_simple_declaration): Provide proper diagnostic for
6 multiple declarations and initializers in range-based for loops.
7 (cp_parser_single_declaration): Adjust call.
9 2014-12-20 Jason Merrill <jason@redhat.com>
12 * pt.c (iterative_hash_template_arg): Hash alias specializations
13 differently from their TYPE_CANONICAL.
14 (alias_template_specialization_p): Optimize.
15 (template_args_equal): Optimize alias handling.
16 (dependent_alias_template_spec_p): Only check innermost args.
18 2014-12-19 Kai Tietz <ktietz@redhat.com>
21 * pt.c (most_general_template): Don't break for template-alias.
23 2014-12-18 Jason Merrill <jason@redhat.com>
26 * parser.c (cp_parser_simple_type_specifier): Make auto parameter
27 before -std=c++14 an error.
30 * pt.c (tsubst_copy_and_build): Pass complain to mark_used.
33 * decl2.c (mark_used): Don't mark if in_template_function.
35 2014-12-18 Paolo Carlini <paolo.carlini@oracle.com>
38 * pt.c (struct warning_sentinel): Move it...
39 * cp-tree.h: ... here.
40 * semantics.c (force_paren_expr): Use it.
42 2014-12-17 Jason Merrill <jason@redhat.com>
45 * constexpr.c (cxx_bind_parameters_in_call): non_constant_args parm.
46 (cxx_eval_call_expression): Don't cache calls with non-constant args.
47 (cxx_eval_constant_expression) [COMPOUND_EXPR]: Pass true for lval.
48 (cxx_eval_unary_expression, cxx_eval_binary_expression)
49 (cxx_eval_conditional_expression): Pass false for lval.
51 * constexpr.c: Change "addr" parm names to "lval".
53 * constexpr.c: Tweak comments and formatting.
55 2014-12-16 Paolo Carlini <paolo.carlini@oracle.com>
58 * parser.c (cp_parser_member_declaration): Fix error recovery for
59 initialized non-static data member declared friend.
61 2014-12-15 Jan Hubicka <hubicka@ucw.cz>
63 * decl2.c (decl_needed_p): When not optimizing, do not consider external
66 2014-12-15 Jason Merrill <jason@redhat.com>
69 * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
71 N3778: Sized Deallocation
72 * call.c (non_placement_deallocation_fn_p): A global sized
73 operator delete is not a usual deallocation function until C++14.
74 (build_op_delete_call): Choose the global sized op delete if we
76 * cp-tree.h: Declare non_placement_deallocation_fn_p.
77 (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
78 (global_delete_fndecl): Remove.
79 * decl.c (cxx_init_decl_processing): Also declare sized op deletes.
80 (grok_op_properties): Warn about sized dealloc without the flag.
81 * init.c (build_builtin_delete_call): Remove.
82 (build_vec_delete_1, build_delete): Don't call it.
83 * decl2.c (maybe_warn_sized_delete): New.
84 (cp_write_global_declarations): Call it.
86 2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
89 * decl.c (check_array_designated_initializer): Diagnose gracefully
90 C99 designators which aren't integral constant-expressions; allow
91 constexpr user-defined type conversion operators.
93 2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
96 * semantics.c (finish_omp_reduction_clause): Early return true
97 if DECL_SAVED_TREE (id) is NULL_TREE.
99 2014-12-12 Jason Merrill <jason@redhat.com>
102 * pt.c (do_auto_deduction): In direct-init context, { x } deduces
105 * cp-tree.h (NAMESPACE_ABI_TAG): New.
106 * name-lookup.c (handle_namespace_attrs): Set it.
107 * class.c (check_tag): Split out from find_abi_tags_r.
108 (find_abi_tags_r): Also check namespace tags.
109 (mark_type_abi_tags): Also mark namespace tags.
111 2014-12-12 Kai Tietz <ktietz@redhat.com>
114 * constexpr.c (cxx_eval_loop_expr): Don't loop
115 endless on none-constant expression.
117 2014-12-12 Jason Merrill <jason@redhat.com>
120 * lambda.c (add_capture): Don't pass a dependent type to
121 variably_modified_type_p.
123 2014-12-11 Jason Merrill <jason@redhat.com>
125 Remove N3639 "array of runtime length" from -std=c++14.
126 * decl.c (compute_array_index_type): VLAs are not part of C++14.
127 (create_array_type_for_decl, grokdeclarator): Likewise.
128 * lambda.c (add_capture): Likewise.
129 * pt.c (tsubst): Likewise.
130 * rtti.c (get_tinfo_decl): Likewise.
131 * semantics.c (finish_decltype_type): Likewise.
132 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
133 (cp_build_addr_expr_1): Likewise.
134 * init.c (build_vec_init): Don't throw bad_array_length.
138 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
139 (cp_parser_primary_expression): Not here.
142 * typeck2.c (split_nonconstant_init_1): Handle arrays here.
143 (store_init_value): Not here.
144 (split_nonconstant_init): Look through TARGET_EXPR. No longer static.
145 * cp-tree.h: Declare split_nonconstant_init.
146 * call.c (set_up_extended_ref_temp): Use split_nonconstant_init.
148 2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
150 * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
153 2014-12-10 Kai Tietz <ktietz@redhat.com>
156 * parser.c (cp_parser_diagnose_invalid_type_name): Check id
157 for being an identifier before accessing it.
160 * typeck.c (lookup_destructor): Handle incomplete type.
162 2014-12-09 Jason Merrill <jason@redhat.com>
165 * decl.c (grokdeclarator): Recover from variable template
166 specialization declared as function.
169 * parser.c (cp_parser_unqualified_id): Don't declare fname while
170 parsing function parms.
172 2014-12-03 Jason Merrill <jason@redhat.com>
175 * decl.c (grok_reference_init): Complete array type.
178 * constexpr.c (cxx_eval_store_expression): Handle non-decl store
181 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com>
184 * decl.c (identify_goto): Return a bool if diagnostic is emitted.
185 (check_previous_goto_1): Consistently emit permerror + inform.
186 (check_goto): Likewise.
188 2014-12-03 Richard Biener <rguenther@suse.de>
190 * constexpr.c (cxx_eval_builtin_function_call): Use
191 fold_build_call_array_loc.
193 2014-12-02 Marek Polacek <polacek@redhat.com>
195 * constexpr.c (cxx_eval_check_shift_p): New function.
196 (cxx_eval_binary_expression): Call it. Set NON_CONSTANT_P if it
199 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
202 * decl.c (reshape_init_r): Do not reject value-initialization of
203 scalar array element.
205 2014-12-01 Marek Polacek <polacek@redhat.com>
208 * constexpr.c: Include ubsan.h.
209 (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
210 internal functions and for ubsan builtins.
211 * error.c: Include internal-fn.h.
212 (dump_expr): Add printing of internal functions.
214 2014-12-01 Marek Polacek <polacek@redhat.com>
216 * constexpr.c (literal_type_p): Return true for void type in C++14.
218 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
221 * typeck.c (finish_class_member_access_expr): Use %q#T instead of
222 %qD in error message.
224 2014-11-29 Jakub Jelinek <jakub@redhat.com>
226 * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
227 from create_tmp_var calls.
229 2014-11-28 Marek Polacek <polacek@redhat.com>
232 * typeck.c (cp_build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
233 convert the right operand to integer type.
235 2014-11-27 Kai Tietz <ktietz@redhat.com>
238 * constexpr.c (cxx_eval_vec_init_1): Avoid
241 2014-11-26 Jason Merrill <jason@redhat.com>
243 Allow partial specialization of variable templates.
244 * cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
245 * decl.c (duplicate_decls): Copy it.
246 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
247 * parser.c (cp_parser_decltype_expr): Do call finish_id_expression
249 * pt.c (register_specialization): Remember variable template insts.
250 (instantiate_template_1): Find the matching partial specialization.
251 (check_explicit_specialization): Allow variable partial specialization.
252 (process_partial_specialization): Likewise.
253 (push_template_decl_real): Likewise.
254 (more_specialized_partial_spec): Rename from more_specialized_class.
255 (most_specialized_partial_spec): Rename from most_specialized_class.
256 (get_partial_spec_bindings): Rename from get_class_bindings.
258 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
261 * call.c (standard_conversion): Do not require expr to be non-null
262 when NULLPTR_TYPE_P (from) is true.
264 2014-11-26 Jason Merrill <jason@redhat.com>
266 * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
269 * constexpr.c (cxx_eval_call_expression): Don't talk about
270 flowing off the end if we're already non-constant.
272 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
274 Diagnose string constant conversion to char* in c++11 and above
275 as forbidden, not deprecated.
276 * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
277 change the diagnostic for the Wwrite-strings case for c++11 and above.
279 2014-11-24 Jason Merrill <jason@redhat.com>
281 * pt.c (lookup_template_variable): Always unknown_type_node.
283 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
286 * parser.c (cp_parser_label_for_labeled_statement): Check the case
287 with check_for_bare_parameter_packs.
289 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
290 Paolo Carlini <paolo.carlini@oracle.com>
293 * decl.c (initialize_local_var): Add -Winit-self warning for
294 references initialized with themselves.
296 2014-11-24 Jason Merrill <jason@redhat.com>
299 * mangle.c (mangle_decl): If we aren't going to create a symbol
300 alias, don't build the alias DECL either.
302 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
305 * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
307 2014-11-21 Jason Merrill <jason@redhat.com>
311 * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
312 if the temporary has a non-trivial destructor.
313 * decl.c (poplevel): Don't look through references.
316 * name-lookup.c (supplement_binding_1): Override a mangling alias.
317 * mangle.c (maybe_remove_implicit_alias): New.
318 (mangle_decl): Always avoid creating conflicting alias.
322 * mangle.c (decl_mangling_context): Use template_type_parameter_p.
325 * pt.c (uses_template_parms): Handle null argument.
327 2014-11-21 Jakub Jelinek <jakub@redhat.com>
330 * typeck.c (cp_build_array_ref): Adjust
331 convert_vector_to_pointer_for_subscript caller. If it returns true,
332 call non_lvalue_loc on the result.
334 2014-11-20 Jason Merrill <jason@redhat.com>
337 * pt.c (convert_nontype_argument): Call convert_from_reference.
338 (check_instantiated_arg): Don't be confused by reference refs.
339 (unify): Look through reference refs on the arg, too.
340 * mangle.c (write_template_arg): Look through reference refs.
342 * error.c (dump_expr): Avoid printing (*&i) for references.
344 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
347 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
349 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
351 * cp-objcp-common.c: Use hash_table instead of htab.
353 2014-11-19 Jason Merrill <jason@redhat.com>
356 * cp-tree.h (struct processing_template_decl_sentinel): New.
357 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
358 (instantiate_non_dependent_expr_sfinae): Here.
359 (convert_nontype_argument): Use them.
360 * constexpr.c (fold_non_dependent_expr): Use them.
363 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
364 complain yet about a reference.
365 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
366 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
367 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
368 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
371 * init.c (decl_really_constant_value): Rename from
372 integral_constant_value.
373 (scalar_constant_value): Similar but limited to scalar results.
374 (decl_constant_value_safe): Remove.
375 (constant_value_1): Respect return_aggregate_cst_ok_p.
376 * typeck.c (decay_conversion): Use scalar_constant_value.
377 * call.c (convert_like_real): Likewise.
378 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
379 * typeck.c (decay_conversion): Or ARRAY_TYPE.
380 * constexpr.c (struct constexpr_ctx): Add strict field.
381 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
382 decl_constant_value and decl_really_constant_value.
383 (cxx_eval_outermost_constant_expr): Add strict parm.
384 (maybe_constant_init): Not strict.
385 (potential_constant_expression_1): Add strict parm.
386 Shorten most internal calls with RECUR macro.
387 * cp-tree.h, pt.c, semantics.c: Adjust.
389 2014-11-19 Jason Merrill <jason@redhat.com>
392 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
394 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
397 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
398 and __PRETTY_FUNCTION__.
400 2014-11-18 Jason Merrill <jason@redhat.com>
403 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
404 from a variable of empty class type is constant.
406 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
407 (potential_constant_expression_1): Handle STMT_EXPR.
409 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
411 (lots): Omit NULL jump_target arguments.
413 * constexpr.c (struct constexpr_ctx): Add quiet field.
414 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
415 (lots): Replace allow_non_constant parameter with ctx->quiet.
418 * constexpr.c (cxx_eval_binary_expression): Don't assume the
419 expression was already folded.
420 (cxx_eval_unary_expression): Likewise.
422 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
425 * rtti.c (emit_support_tinfos): Handle __float128.
427 2014-11-18 Jason Merrill <jason@redhat.com>
430 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
433 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
434 rather than VOID_TYPE_P.
436 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
439 * typeck2.c (store_init_value): Set it.
440 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
441 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
443 2014-11-17 Jason Merrill <jason@redhat.com>
446 * call.c (build_call_a): Don't warn_deprecated_use here.
447 (build_over_call): Or here.
448 * decl2.c (mark_used): Do it here.
449 (is_late_template_attribute): Attribute deprecated is not deferred.
450 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
451 * parser.c (cp_parser_template_name): Warn about deprecated template.
452 (cp_parser_template_argument): Likewise.
455 * decl.c (cp_finish_decl): Don't try to process a non-dependent
456 constant initializer for a reference.
457 * pt.c (value_dependent_expression_p): A reference is always
459 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
462 Handle C++14 constexpr flow control.
463 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
464 (cxx_eval_statement_list): New.
465 (cxx_eval_constant_expression): Handle LABEL_EXPR,
466 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
467 semantics of RETURN_EXPR.
468 (many functions): Add jump_target parameter.
469 (returns, breaks, continues, switches, label_matches): New.
470 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
471 * cp-gimplify.c (begin_bc_block): Set them.
473 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
474 (genericize_for_stmt): Handle null statement-list.
476 * constexpr.c (use_new_call): Always use new call handling.
478 C++14 constexpr support (minus loops and multiple returns)
479 * constexpr.c (use_new_call): New macro.
480 (build_data_member_initialization): Ignore non-mem-inits.
481 (check_constexpr_bind_expr_vars): Remove C++14 checks.
482 (constexpr_fn_retval): Likewise.
483 (check_constexpr_ctor_body): Do nothing in C++14.
484 (massage_constexpr_body): In C++14 only collect mem-inits.
485 (get_function_named_in_call): Handle null CALL_EXPR_FN.
486 (cxx_bind_parameters_in_call): Build bindings in same order as
487 parameters. Don't treat iniviref parms specially in new call mode.
488 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
489 based on DECL_SAVED_TREE rather than the massaged constexpr body.
490 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
491 (is_sub_constant_expr): Don't mess with ctx.ctor here.
492 (cxx_eval_component_reference): A null element means we're mid-
494 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
495 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
496 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
497 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
498 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
499 constexpr functions. In new-call mode find parms in the values table.
500 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
501 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
502 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
503 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
504 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
505 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
506 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
507 SWITCH_STMT, ASM_EXPR.
508 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
509 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
510 caller wants an lvalue.
511 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
512 (maybe_constant_init): Look through INIT_EXPR.
513 (ensure_literal_type_for_constexpr_object): Set
514 cp_function_chain->invalid_constexpr.
515 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
516 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
517 (check_for_uninitialized_const_var): Likewise.
518 (maybe_save_function_definition): Check it.
519 * parser.c (cp_parser_jump_statement): Set
520 cp_function_chain->invalid_constexpr.
521 (cp_parser_asm_definition): Likewise.
524 * decl.c (build_ptrmemfunc_type): Don't build a different
525 RECORD_TYPE for a qualified PMF.
526 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
527 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
528 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
529 * tree.c (cp_walk_subtrees): Likewise.
530 (cp_build_qualified_type_real): Remove special PMF handling.
532 2014-11-15 Jason Merrill <jason@redhat.com>
534 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
537 * constexpr.c (cxx_eval_builtin_function_call): Use
538 fold_builtin_call_array.
540 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
542 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
544 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
545 * parser.c (cp_parser_omp_clause_collapse): Likewise.
546 (cp_parser_enumerator_definition): Don't call
547 instantiate_non_dependent_expr...
548 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
549 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
550 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
551 the final gcc_assert.
553 * constexpr.c (fold_non_dependent_expr): Add.
554 * cp-tree.h (fold_non_dependent_expr): Declare it.
555 * call.c (null_ptr_cst_p): Use it.
556 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
557 * semantics.c (begin_maybe_infinite_loop): Likewise.
558 * typeck.c (cp_build_binary_op): Likewise.
559 * typeck2.c (check_narrowing): Likewise.
561 * pt.c (fold_non_dependent_expr): Rename to
562 instantiate_non_dependent_expr.
563 (fold_non_dependent_expr_sfinae): Rename to
564 instantiate_non_dependent_expr_sfinae.
565 (convert_nontype_argument, build_non_dependent_expr): Adjust.
566 * decl.c (compute_array_index_type): Likewise.
567 * parser.c (cp_parser_parenthesized_expression_list,
568 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
570 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
572 * typeck.c (cxx_alignas_expr): Likewise.
573 * typeck2.c (store_init_value, massage_init_elt): Likewise.
574 * call.c: Adjust comments.
576 * constexpr.c: Likewise.
580 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
582 * mangle.c (find_substitution): Look for abi_tag on class templates.
584 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
585 Thomas Schwinge <thomas@codesourcery.com>
586 Ilya Verbin <ilya.verbin@intel.com>
587 Andrey Turetskiy <andrey.turetskiy@intel.com>
589 * Make-lang.in (c++.install-common): Do not install for the offload
592 2014-11-13 Kai Tietz <ktietz@redhat.com>
594 * cp-tree.h (cp_build_function_call): Remove prototype.
595 (cp_build_addr_expr_strict): Likewise.
596 (build_typed_address): Likewise.
597 * typeck.c (build_typed_address): Removed.
598 (cp_build_addr_expr_strict): Make static.
599 (cp_build_function_call): Likewise.
601 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
605 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
606 * decl.c (grokdeclarator): Use it.
607 * parser.c (cp_parser_simple_type_specifier): Likewise.
608 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
610 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
613 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
614 constant the condition.
616 2014-11-10 Andi Kleen <ak@linux.intel.com>
618 * semantics.c (finish_goto_stmt): Call check_no_cilk.
619 (finish_while_stmt_cond): Dito.
620 (finish_do_stmt): Dito.
621 (finish_for_cond): Dito.
622 (finish_switch_cond): Dito.
624 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
626 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
627 OPT_Wshift_count_overflow in the warnings.
629 2014-11-09 Jason Merrill <jason@redhat.com>
632 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
633 same scalar type is an rvalue.
636 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
638 2014-11-07 Jason Merrill <jason@redhat.com>
641 * pt.c (dependent_alias_template_spec_p): New.
642 (dependent_type_p_r): Handle dependent alias template specialization.
643 (template_args_equal): A dependent alias template specializations
644 is not equal to its underlying type as a template argument.
645 * tree.c (strip_typedefs): Don't strip a dependent alias
648 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
649 (cp_parser_primary_expression): Not here.
651 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
654 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
656 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
658 * constexpr.c: Remove redundant enum from machine_mode.
660 2014-10-28 Jason Merrill <jason@redhat.com>
662 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
664 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
666 * call.c: Adjust include files.
675 * semantics.c: Ditto.
677 * vtable-class-hierarchy.c: Ditto.
679 2014-10-24 Jason Merrill <jason@redhat.com>
681 Implement N3653 (Member initializers and aggregates) and fix
682 references to 'this' in constexpr constructors.
683 * class.c (check_field_decls): In C++14 an NSDMI does not make the
685 * constexpr.c (struct constexpr_ctx): New.
686 (cxx_bind_parameters_in_call): Handle 'this'.
687 (cxx_eval_call_expression): Create new constexpr_ctx.
688 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
689 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
690 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
691 (cxx_eval_vec_init_1): Likewise.
692 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
693 [TARGET_EXPR]: Build new constexpr_ctx.
694 [PLACEHOLDER_EXPR]: New.
695 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
697 (is_sub_constant_expr): Build new constexpr_ctx.
698 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
700 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
701 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
702 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
703 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
704 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
705 (build_ctor_subob_ref, replace_placeholders): New.
706 * typeck2.c (store_init_value): Use replace_placeholders.
707 (process_init_constructor_record): Make zero-init before NSDMI
710 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
712 * cp-gimplify.c: Adjust include files.
714 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
717 * cp-objcp-common.c: Do not include new.
718 (cxx_initialize_diagnostics): Move from here to ...
719 * error.c (cxx_initialize_diagnostics): : ... here. Move
720 diagnostics initialization here from init_error.
721 (cxx_pp): Use a real pointer not a macro.
722 (init_error): Just initialize cxx_pp.
723 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
724 not set maximum line length.
726 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
729 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
731 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
733 * parser.c (cp_parser_unary_expression): Add default arguments.
734 (cp_parser_cast_expression, cp_parser_sizeof_operand,
735 cp_parser_omp_atomic): Adjust.
737 2014-10-20 Jason Merrill <jason@redhat.com>
740 * lambda.c (current_nonlambda_function): New.
741 * semantics.c (finish_this_expr): Use it.
742 * cp-tree.h: Declare it.
744 2014-10-17 Alan Modra <amodra@gmail.com>
747 * decl.c (merge_decls): Don't merge section name, comdat group or
748 tls model to newdecl symtab node, instead merge to olddecl.
749 Override existing olddecl section name. Set tls_model for all
750 thread-local vars, not just OMP thread-private ones. Remove
753 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
755 * cp-tree.h: Adjust include files.
757 2014-10-15 Jason Merrill <jason@redhat.com>
760 * pt.c (lookup_template_variable): Call coerce_template_parms.
762 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
764 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
765 ensure_literal_type_for_constexpr_object,
766 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
767 retrieve_constexpr_fundef, is_valid_constexpr_fn,
768 build_anon_member_initialization, build_data_member_initialization,
769 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
770 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
771 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
772 massage_constexpr_body, cx_check_missing_mem_inits,
773 register_constexpr_fundef, explain_invalid_constexpr_fn,
774 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
775 maybe_initialize_constexpr_call_table, get_function_named_in_call,
776 get_nth_callarg, lookup_parameter_binding,
777 cxx_eval_builtin_function_call, adjust_temp_type,
778 cxx_bind_parameters_in_call, push_cx_call_context,
779 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
780 reduced_constant_expression_p, verify_constant,
781 cxx_eval_unary_expression, cxx_eval_binary_expression,
782 cxx_eval_conditional_expression, cxx_eval_array_reference,
783 cxx_eval_component_reference, cxx_eval_bit_field_ref,
784 cxx_eval_logical_expression, base_field_constructor_elt,
785 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
786 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
787 cxx_eval_trinary_expression, var_in_constexpr_fn,
788 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
789 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
790 maybe_constant_init, potential_constant_expression_1,
791 potential_constant_expression, potential_rvalue_constant_expression,
792 require_potential_constant_expression,
793 require_potential_rvalue_constant_expression): Moved definitions...
794 * constexpr.c: ... here, new file.
795 * Make-lang.in: Update.
796 * config-lang.in: Likewise.
798 2014-10-14 Jason Merrill <jason@redhat.com>
801 * parser.c (struct saved_token_sentinel): New.
802 (cp_parser_statement): Use it.
803 (cp_parser_start_tentative_firewall): New.
804 (cp_parser_end_tentative_firewall): New.
805 (cp_parser_lambda_expression): Use them.
806 (cp_parser_statement_expr): New.
807 (cp_parser_primary_expression): Use it.
809 2014-10-14 DJ Delorie <dj@redhat.com>
811 * typeck.c (cp_common_type): Check for all __intN types, not just
813 * decl.c (grokdeclarator): Likewise.
814 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
816 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
817 for all __intN types, not just __int128.
818 (cp_parser_simple_type_specifier): Likewise.
819 * mangle.c (integer_type_codes): Remove int128-specific codes.
820 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
821 __intN was specified.
822 * lex.c (init_reswords): Reserve all __intN keywords.
824 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
826 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
828 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
830 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
832 (print_template_statistics): Cast size and elements to long.
834 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
836 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
837 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
840 2014-10-10 Jason Merrill <jason@redhat.com>
843 * class.c (build_base_path): Preserve rvalueness.
844 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
845 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
848 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
850 * method.c (implicitly_declare_fn): Handle deleted lambda default
851 ctor and copy assop here.
852 * class.c (check_bases_and_members): Not here.
853 (add_implicitly_declared_members): And don't set
854 CLASSTYPE_LAZY_MOVE_ASSIGN.
856 * semantics.c (finish_id_expression): Check for error_mark_node.
858 2014-10-09 Jason Merrill <jason@redhat.com>
861 * semantics.c (outer_var_p): Non-static.
862 (process_outer_var_ref): Split out from finish_id_expression.
863 * pt.c (tsubst_copy_and_build): Call them.
864 * cp-tree.h: Declare them.
866 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
868 * semantics.c (check_constexpr_ctor_body_1): New.
869 (check_constexpr_ctor_body): Use it; add bool parameter.
870 (build_data_member_initialization): Handle BIND_EXPR and
871 USING_STMT in the main conditional.
872 (build_constexpr_constructor_member_initializers): Do not
873 handle BIND_EXPR here.
874 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
875 (massage_constexpr_body): Don't do it here.
876 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
877 Adjust check_constexpr_ctor_body call.
878 (cp_parser_compound_statement): Do not pedwarn for compound-statement
879 in constexpr function in C++14 mode.
880 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
882 2014-10-09 Jason Merrill <jason@redhat.com>
885 * parser.c (cp_parser_class_head): push_template_decl for members
889 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
890 (iterative_hash_template_arg): Likewise.
893 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
894 * semantics.c (force_paren_expr): And set it.
895 * typeck.c (check_return_expr): And handle it.
897 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
899 * decl.c (grokdeclarator): constexpr only implies const in C++11.
901 2014-10-08 Jason Merrill <jason@redhat.com>
904 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
907 * tree.c (build_cplus_array_type): Look for a type with no
908 typedef-name or attributes.
910 * call.c (call_copy_ctor): New.
911 (build_over_call): Use it to avoid infinite recursion on invalid code.
913 2014-10-07 Jason Merrill <jason@redhat.com>
915 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
917 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
919 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
921 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
924 * semantics.c (check_constexpr_bind_expr_vars): New.
925 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
926 (build_constexpr_constructor_member_initializers): Handle
927 BIND_EXPR in the main conditional.
929 2014-10-02 Mark Wielaard <mjw@redhat.com>
932 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
933 (cp_function_decl_deleted_p): New prototype.
934 * cp-objcp-common.c (cp_function_deleted_p): New function.
936 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
941 * typeck.c (cp_build_binary_op): save_expr after convert to save
942 redundant operations.
943 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
944 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
946 2014-10-03 Jason Merrill <jason@redhat.com>
948 * decl.c (start_decl): Complain about static/thread_local vars
949 in constexpr function.
950 (check_for_uninitialized_const_var): Also uninitialized vars.
951 * parser.c (cp_parser_jump_statement): And gotos.
952 (cp_parser_asm_operand_list): And asm.
953 (cp_parser_try_block): And try.
954 * semantics.c (ensure_literal_type_for_constexpr_object): And
957 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
958 (var_in_constexpr_fn): New.
959 (cxx_eval_constant_expression): Look into DECL_INITIAL.
960 (potential_constant_expression_1): Allow constexpr-local vars.
963 * tree.c (strip_typedefs): Handle TREE_LIST.
965 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
967 * parser.c (cp_parser_assignment_expression,
968 cp_parser_constant_expression): Add default arguments.
969 (cp_parser_primary_expression,
970 cp_parser_postfix_open_square_expression,
971 cp_parser_parenthesized_expression_list,
972 cp_parser_question_colon_clause,
973 cp_parser_expression, cp_parser_constant_expression,
974 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
975 cp_parser_template_argument, cp_parser_enumerator_definition,
976 cp_parser_member_declaration, cp_parser_constant_initializer,
977 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
978 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
979 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
980 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
981 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
982 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
983 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
985 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
988 * cp-tree.h (struct saved_scope): Add noexcept_operand.
989 (cp_noexcept_operand): Define.
990 * call.c (build_over_call): Use it.
991 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
992 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
994 2014-10-01 Jason Merrill <jason@redhat.com>
997 * method.c (constructible_expr): Handle value-init of non-class.
998 * parser.c (cp_parser_trait_expr): Allow pack expansion.
999 * pt.c (tsubst_copy_and_build): Handle pack expansion.
1002 * class.c (type_has_non_user_provided_default_constructor): Rename
1003 from type_has_user_provided_default_constructor, reverse sense.
1004 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
1005 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
1006 * call.c (build_new_method_call_1): Adjust.
1007 * cp-tree.h: Adjust.
1008 * decl.c (grok_special_member_properties): Don't set
1009 TYPE_HAS_COMPLEX_DFLT.
1010 * init.c (build_value_init_noctor): Don't use
1011 type_has_user_provided_default_constructor.
1013 2014-09-30 Jason Merrill <jason@redhat.com>
1015 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
1016 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
1017 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
1018 * parser.c (cp_parser_primary_expression): Likewise.
1019 (cp_parser_trait_expr): Likewise. Handle variadic trait.
1020 * semantics.c (trait_expr_value): Likewise.
1021 (finish_trait_expr): Likewise.
1022 (check_trait_type): Handle variadic trait. Return bool.
1023 * method.c (build_stub_object): Add rvalue reference here.
1024 (locate_fn_flags): Not here.
1025 (check_nontriv, assignable_expr, constructible_expr): New.
1026 (is_trivially_xible): New.
1028 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
1029 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
1030 * parser.c (cp_parser_primary_expression): Likewise.
1031 (cp_parser_trait_expr): Likewise.
1032 * semantics.c (trait_expr_value): Likewise.
1033 (finish_trait_expr): Likewise.
1035 * method.c (build_stub_object): Use CONVERT_EXPR.
1036 * tree.c (build_dummy_object): Likewise.
1037 (is_dummy_object): Adjust.
1039 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
1040 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
1041 * semantics.c (trait_expr_value): Likewise.
1042 (finish_trait_expr): Likewise.
1043 * parser.c (cp_parser_primary_expression): Likewise.
1044 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
1046 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1049 * error.c (print_instantiation_context): Delete.
1050 * typeck2.c (build_x_arrow): Record location when pushing
1051 template instantiation.
1052 * pt.c (push_tinst_level): Make it a wrapper around ...
1053 (push_tinst_level_loc): ... this. New function. Make excessive
1054 template instantiation depth a fatal error. Record location. Use
1055 bool as return type.
1056 (instantiate_pending_templates): Make excessive
1057 template instantiation depth a fatal error.
1058 (problematic_instantiation_changed): Use bool as return type.
1059 * cp-tree.h (print_instantiation_context): Delete.
1060 (push_tinst_level): Update declaration.
1061 (problematic_instantiation_changed): Likewise.
1062 (push_tinst_level_loc): New.
1064 2014-09-29 Richard Biener <rguenther@suse.de>
1066 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
1069 2014-09-26 Jason Merrill <jason@redhat.com>
1071 * mangle.c (find_substitution): Use write_abi_tags.
1073 2014-09-25 Marek Polacek <polacek@redhat.com>
1076 * class.c (warn_hidden): Check for FUNCTION_DECL.
1078 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1081 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
1082 on low_bound and length.
1084 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1086 * class.c, decl.c, optimize.c: Rename all instances of
1087 DECL_ABSTRACT to DECL_ABSTRACT_P.
1089 2014-09-24 Marek Polacek <polacek@redhat.com>
1093 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
1094 * tree.c (bot_manip): Add default case.
1095 * parser.c (cp_parser_primary_expression): Cast the controlling
1096 expression of a switch to an int.
1097 (cp_parser_unqualified_id): Likewise.
1099 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
1102 * parser.c (cp_parser_skip_to_closing_square_bracket,
1103 cp_parser_array_designator_p): New.
1104 (cp_parser_initializer_list): Use the latter.
1106 2014-09-22 Jason Merrill <jason@redhat.com>
1108 * semantics.c (finish_non_static_data_member): In diagnostic, give
1109 error at point of use and note at point of declaration.
1114 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
1117 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
1120 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
1122 2014-09-22 Jason Merrill <jason@redhat.com>
1124 * decl.c (poplevel): Don't warn about unused vars in template scope.
1125 * error.c (dump_decl): Handle variable templates.
1127 2014-09-20 Jason Merrill <jason@redhat.com>
1130 * decl.c (begin_destructor_body): Only clobber the as-base part of
1133 2014-09-19 Jason Merrill <jason@redhat.com>
1136 * mangle.c (write_expression): Use unresolved-name mangling for
1140 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
1141 after pulling out an element from a CONSTRUCTOR.
1143 2014-09-18 Jakub Jelinek <jakub@redhat.com>
1146 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
1147 on type of type dependent expressions, and don't call it if
1148 handle_omp_array_sections has kept TREE_LIST because something
1150 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
1151 Use keep_next_level, begin_omp_structured_block and
1152 finish_omp_structured_block instead of push_stmt_list and
1155 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1158 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
1159 for final class types.
1161 2014-09-15 Jason Merrill <jason@redhat.com>
1163 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
1164 necessary. Call inherit_targ_abi_tags here.
1165 * class.c (check_bases_and_members): Not here.
1166 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
1167 * cp-tree.h: Declare inherit_targ_abi_tags.
1169 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1171 Do not diagnose lambda default arguments in c++14 modes.
1172 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
1175 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1177 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
1180 2014-09-13 Marek Polacek <polacek@redhat.com>
1183 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
1184 location of a call expression.
1186 2014-09-11 Jason Merrill <jason@redhat.com>
1189 * decl.c (start_decl): Handle specialization of member variable
1191 * pt.c (check_explicit_specialization): Adjust error.
1193 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
1196 * typeck2.c (process_init_constructor_record): Do not warn about
1197 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
1199 2014-09-11 Jason Merrill <jason@redhat.com>
1202 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
1203 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
1205 2014-09-10 Jason Merrill <jason@redhat.com>
1208 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
1209 (duplicate_decls, start_decl): Likewise.
1210 * pt.c (check_explicit_specialization): Likewise.
1211 (push_template_decl_real): Or static templates.
1213 2014-09-08 Jason Merrill <jason@redhat.com>
1215 * typeck.c (build_class_member_access_expr): Move
1216 -Winvalid-offsetof code...
1217 * semantics.c (finish_offsetof): ...here.
1218 * parser.c (cp_parser_builtin_offsetof): Remember the location of
1220 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
1223 * pt.c (instantiate_decl): Handle recursive instantiation of
1226 2014-09-05 Jason Merrill <jason@redhat.com>
1229 * semantics.c (potential_constant_expression_1): Handle un-folded
1230 pointer to member constants.
1232 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
1235 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
1236 newdecl, not olddecl.
1238 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1241 * class.c (check_field_decls): A class of literal type cannot have
1242 volatile non-static data members and base classes.
1243 (explain_non_literal_class): Update.
1245 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1246 Balaji V. Iyer <balaji.v.iyer@intel.com>
1247 Igor Zamyatin <igor.zamyatin@intel.com>
1249 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
1251 * parser.c (cp_parser_cilk_for): New function.
1252 (cp_parser_cilk_grainsize): Likewise.
1253 (cp_parser_statement): Added RID_CILK_FOR case.
1254 (cp_parser_omp_for_cond): Added CILK_FOR check.
1255 (cp_parser_omp_for_loop_init): Change function argument to accept
1256 tree_code instead just a bool flag; change the check to use that
1257 tree_code; check for initialization declaration in case of Cilk_for.
1258 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
1259 changed call to cp_parser_omp_for_loop_init according new arguments'
1261 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1262 * pt.c (tsubst_expr): Added CILK_FOR case.
1263 * semantics.c: Include convert.h.
1264 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
1265 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
1266 (handle_omp_for_class_iterator): New argument lastp and its usage;
1268 (finish_omp_for): Changed call to handle_omp_for_class_iterator
1269 according new arguments' list; in case of Cilk_for save very first
1270 decl and create empty stmt_list block; use block to build correct
1273 2014-08-31 Jason Merrill <jason@redhat.com>
1276 * optimize.c (cdtor_comdat_group): Just look at the
1277 DECL_ASSEMBLER_NAME of the 'tors.
1279 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1282 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
1283 result of cxx_eval_constant_expression.
1285 2014-08-26 Jason Merrill <jason@redhat.com>
1288 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
1289 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
1290 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
1293 2014-08-25 Jason Merrill <jason@redhat.com>
1295 * pt.c (check_explicit_specialization): Don't complain about
1296 non-template variable.
1297 (template_for_substitution): Allow variable templates.
1298 (check_template_variable): Fix logic for member var template.
1299 * decl.c (start_decl): Don't complain about extra template header
1302 * decl.c (start_decl): Look through member variable template.
1303 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
1304 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
1307 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
1310 * cp-tree.h (TFF_POINTER): Add.
1311 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1313 * error.c (dump_type_suffix): Actually print the const and noreturn
1314 attribute when appropriate.
1316 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1318 * decl.c (compute_array_index_type, grokdeclarator,
1319 undeduced_auto_decl): Change from cxx1y to cxx14.
1320 *lambda.c(add_capture()): Change error message from C++1y to C++14.
1321 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1322 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1323 cp_parser_decltype, cp_parser_conversion_type_id,
1324 cp_parser_simple_type_specifier, cp_parser_type_id_1,
1325 cp_parser_template_type_arg, cp_parser_std_attribute,
1326 cp_parser_template_declaration_after_export): Ditto.
1327 * pt.c (tsubst): Ditto.
1328 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1329 * tree.c: Change comment.
1330 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1331 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1333 2014-08-23 Jason Merrill <jason@redhat.com>
1335 Allow non-constexpr variable templates.
1336 * decl2.c (note_variable_template_instantiation): New.
1337 * cp-tree.h: Declare it.
1338 * pt.c (instantiate_decl): Call it.
1339 (push_template_decl_real): Allow non-constexpr variable templates.
1340 * semantics.c (finish_id_expression): Mark the variable template
1341 instantiation as used.
1342 * mangle.c (write_mangled_name): Variable template instantiations
1344 * parser.c (cp_parser_init_declarator): Complain about
1345 non-function implicit templates.
1347 2014-08-22 Marek Polacek <polacek@redhat.com>
1350 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1351 preceded with logical not. Adjust call to
1352 warn_logical_not_parentheses.
1354 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1357 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1358 declaration shadows a function declaration, unless the former
1359 declares a function, pointer to function or pointer to member
1360 function, because this is a common and valid case in real-world
1362 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1363 Improve description.
1365 2014-08-22 Jason Merrill <jason@redhat.com>
1368 * class.c (outermost_open_class): Fix logic.
1369 * decl.c (complete_vars): Fix logic.
1371 2014-08-22 Jason Merrill <jason@redhat.com>
1374 * class.c (outermost_open_class): New.
1375 * cp-tree.h: Declare it.
1376 * decl.c (maybe_register_incomplete_var): Use it.
1377 (complete_vars): Handle any constant variable.
1378 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1380 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1383 * cp-array-notation.c (build_array_notation_ref): Added correct
1384 handling of case with incorrect array.
1386 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1389 * error.c (cp_diagnostic_finalizer): Delete.
1390 (init_error): Do not set diagnostic_finalizer here.
1392 2014-08-19 Marek Polacek <polacek@redhat.com>
1395 * call.c (build_new_op_1): Remember the type of arguments for
1396 a comparison. If either operand of a comparison is a boolean
1397 expression, call maybe_warn_bool_compare.
1399 2014-08-19 Jason Merrill <jason@redhat.com>
1401 PR tree-optimization/62091
1402 * decl2.c (decl_needed_p): Return true for virtual functions when
1407 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1410 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1412 * class.c (contains_empty_class_p): Remove.
1414 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1416 * parser.c (cp_parser_expression): Add default arguments.
1417 (cp_parser_primary_expression, cp_parser_postfix_expression,
1418 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1419 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1420 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1421 cp_parser_lambda_body, cp_parser_expression_statement,
1422 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1423 cp_parser_iteration_statement, cp_parser_jump_statement,
1424 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1425 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1426 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1427 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1428 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1429 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1430 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1431 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1432 cp_parser_transaction_expression): Adjust.
1434 2014-08-15 Jason Merrill <jason@redhat.com>
1437 * pt.c (lookup_template_class_1): Revert recent change.
1438 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1441 * pt.c (instantiate_class_template_1): Ignore lambda on
1442 CLASSTYPE_DECL_LIST.
1443 (push_template_decl_real): A lambda is not primary.
1444 (lookup_template_class_1): Don't look for a lambda partial
1446 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1447 currently in a function and the lambda living in a function.
1448 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1450 2014-08-15 Richard Biener <rguenther@suse.de>
1451 Jason Merrill <jason@redhat.com>
1454 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1455 (build_cplus_array_type): ...from here. Only call build_array_type
1458 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1462 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1466 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1467 cv-qualifiers of function types.
1469 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1471 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1473 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1475 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1476 cp_build_array_ref, cp_build_function_call_vec): When a
1477 pedwarn is suppressed under SFINAE, return error_mark_node.
1479 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1480 tf_warning_or_error, where complain is a bool, glitch.
1482 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1485 * decl.c (grokdeclarator): Move the check for friend initializers..
1486 * decl2.c (grokfield) ..here. Postpone early return for friends
1487 until after the initializer check.
1489 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1492 * pt.c (coerce_template_parms): Improve error message vs default
1495 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1497 * parser.c (cp_parser_init_declarator): Remove redundant check of
1498 decl_specifiers->type.
1500 2014-08-13 Jason Merrill <jason@redhat.com>
1502 * call.c (build_x_va_arg): Support passing non-POD through ....
1503 (convert_arg_to_ellipsis): Likewise.
1505 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1507 * pt.c (lookup_template_variable): Make dependent variable templates
1510 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1512 * parser.c (cp_parser_elaborated_type_specifier): Handle
1513 specially cp_parser_template_id returning a BASELINK.
1515 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1517 * parser.c (cp_parser_diagnose_invalid_type_name,
1518 cp_parser_make_typename_type): Remove scope parameter.
1519 (cp_parser_parse_and_diagnose_invalid_type_name,
1520 cp_parser_elaborated_type_specifier): Adjust calls.
1522 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1524 Reject virt-specifiers on friends and member templates
1525 * friend.c (do_friend): Diagnose virt-specifiers.
1526 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1528 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1530 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1531 return type to bool; in C++11 for constants give errors, not pedwarns.
1532 * cp-tree.h (check_narrowing): Adjust declaration.
1533 * call.c (convert_like_real): Update calls.
1534 * semantics.c (finish_compound_literal): Likewise.
1536 2014-08-08 Jason Merrill <jason@redhat.com>
1538 * pt.c (lookup_template_class_1): Copy abi_tag.
1540 2014-08-08 Kai Tietz <ktietz@redhat.com>
1542 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1543 that we operate on a true inline.
1545 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1547 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1548 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1550 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1553 * decl.c (build_enumerator): Handle class types with conversion
1554 operators via perform_implicit_conversion_flags and
1555 build_expr_type_conversion.
1557 * cvt.c (build_expr_type_conversion): Replace pair of errors
1558 with error + inform.
1560 2014-08-07 Jason Merrill <jason@redhat.com>
1563 * parser.c (c_parse_file): Change sorry to fatal_error.
1566 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1568 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1570 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1572 2014-08-06 Jason Merrill <jason@redhat.com>
1574 * init.c (build_vec_init): Fix constant initialization of
1576 (build_value_init_noctor): Call maybe_constant_init.
1577 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1581 * init.c (build_vec_init): Reorganize earlier change a bit.
1584 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1585 if we're just returning an INIT_EXPR.
1587 2014-08-06 Jason Merrill <jason@redhat.com>
1588 Braden Obrzut <admin@maniacsvault.net>
1590 * pt.c (check_explicit_specialization): Don't test
1591 DECL_DECLARED_INLINE_P for a variable template.
1593 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1596 * typeck.c (cp_build_binary_op): Extend to more cases the
1599 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1601 Implement constexpr variable templates
1602 * decl.c (grokvardecl): Handle specializations of variable templates.
1603 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1604 return from grokvardecl.
1605 * decl2.c (check_member_template): Allow declaration of template member
1607 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1609 * pt.c (check_template_variable): Accept variable temploids at
1611 (push_template_decl_real): The current instantiation of a template
1613 (determine_specialization): Accept variable templates.
1614 (check_explicit_specialization): Handle and check for malformed
1615 variable template specializations.
1616 (lookup_template_variable): New.
1617 (tsubst_decl): Handle variable template specializations.
1618 (do_decl_instantiation): Handle template variables.
1619 (instantiate_decl): Handle template variables.
1620 * semantics.c (finish_template_variable): New.
1621 (finish_id_expression): Instantiate variable templates.
1622 * cp-tree.h (variable_template_p): New.
1624 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1627 * decl.c (check_redeclaration_no_default_args): New.
1628 (duplicate_decls): Use it, handle default arguments
1629 in redeclarations of function templates.
1631 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1633 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1635 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1637 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1638 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1639 instead of pointer_set.
1641 2014-08-01 Jason Merrill <jason@redhat.com>
1644 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1645 init-list for trailing elements.
1646 * typeck2.c (process_init_constructor_array): Likewise.
1648 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1651 * decl.c (duplicate_decls): Handle static member functions too.
1653 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1655 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1658 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1661 * parser.c (cp_parser_array_notation): Added check for array_type.
1663 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1666 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1667 DECL_EXPR improved. Changed handling for INIT_EXPR.
1669 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1671 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1673 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1675 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1676 -fsanitize=alignment call ubsan_maybe_instrument_reference
1677 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1678 for calls to member functions.
1680 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1683 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1684 whether it is returning the address of a local variable.
1685 (check_return_expr): Return 0 instead of the address of a local
1688 2014-07-30 Jason Merrill <jason@redhat.com>
1692 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1694 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1697 * pt.c (unify_arity): Add boolean parameter.
1698 (unify_too_few_arguments): Likewise.
1699 (type_unification_real): Diagnose correctly insufficient
1700 arguments in the presence of trailing variadic parameters;
1701 deducing multiple trailing packs as empty is fine.
1703 2014-07-30 Jason Merrill <jason@redhat.com>
1708 * decl2.c (mark_all_virtuals): New variable.
1709 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1710 (cp_write_global_declarations): Set it and give helpful diagnostic
1711 if it introduces errors.
1712 * class.c (finish_struct_1): Check it.
1716 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1717 (check_explicit_specialization): Clear it on specializations.
1718 * decl.c (duplicate_decls, start_decl): Likewise.
1719 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1720 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1721 linkage after setting the appropriate flags.
1722 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1723 * decl2.c (mark_needed): Mark clones.
1724 (import_export_decl): Not here.
1726 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1728 Implement N4051 - Allow typename in a template template parameter
1729 * parser.c (cp_parser_type_parameter_key): New funtion;
1730 (cp_parser_token_is_type_parameter_key): Ditto;
1731 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1732 but pedwarn for less than cxx1z.
1734 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1737 * call.c (standard_conversion): Use resolve_nondeduced_context
1738 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1740 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1743 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1746 2014-07-15 Jason Merrill <jason@redhat.com>
1749 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1753 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1754 * class.c (finish_struct): Reject invalid definition of
1755 std::initializer_list.
1757 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1759 * call.c (convert_like_real): Call print_z_candidate and inform only
1760 if permerror returns true.
1762 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1764 * class.c (build_clone): Do not clear assembler names of
1766 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1767 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1768 as a special case return sizeof (struct tree_decl_non_common)
1770 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1771 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1772 * cp/cp-tree.h (tree_template_decl): New structure.
1773 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1774 (union cp_lang_tree_node): Add template_decl.
1775 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1777 2014-07-14 Jason Merrill <jason@redhat.com>
1781 * pt.c (instantiate_decl): Don't check defer_ok for local class
1784 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1787 * cp-tree.h (LITERAL_ZERO_P): Define.
1788 * parser.c (cp_parser_parenthesized_expression_list): Add
1789 want_literal_zero_p argument, if true, for literal zeros
1790 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1791 (cp_parser_postfix_expression): Adjust
1792 cp_parser_parenthesized_expression_list caller, handle
1793 -Wmemset-transposed-args.
1794 (literal_zeros): New variable.
1796 2014-07-13 Jason Merrill <jason@redhat.com>
1799 * semantics.c (is_instantiation_of_constexpr): Return true for
1800 defaulted functions, too.
1801 (explain_invalid_constexpr_fn): Only use
1802 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1803 * method.c (explain_implicit_non_constexpr): Pass
1804 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1807 * decl.c (check_initializer): Don't finish_compound_literal
1808 on erroneous constexpr init.
1811 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1814 * decl.c (create_array_type_for_decl): Only check for auto once.
1817 * call.c (build_list_conv): Don't try to build a list of references.
1819 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1821 PR C++/60209 - Declaration of user-defined literal operator cause error
1822 * parser.c (cp_parser_operator): Fold treatment of strings
1823 and user-defined string literals. Use the full string parser.
1824 (cp_parser_string_literal): Add flag to not look for literal operator.
1826 2014-07-11 Jason Merrill <jason@redhat.com>
1830 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1832 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1835 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1837 * decl.c (check_initializer): Don't call check_narrowing here,
1838 set LOOKUP_NO_NARROWING.
1839 * typeck2.c (digest_init_r): Likewise.
1841 2014-07-10 Jason Merrill <jason@redhat.com>
1844 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1848 * decl2.c (mark_all_virtuals): New variable.
1849 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1850 (cp_write_global_declarations): Set it and give helpful diagnostic
1851 if it introduces errors.
1852 * class.c (finish_struct_1): Check it.
1853 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1855 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1858 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1859 outside class declaration, in friend declaration, and neither on
1860 constructor nor conversion operator.
1862 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1866 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1867 cv-qualifiers of function types.
1869 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1870 Paolo Carlini <paolo.carlini@oracle.com>
1873 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1876 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1878 * class.c (check_for_override): Wrap the 'final' and 'override'
1879 keywords in %< and %>.
1881 2014-07-06 Marek Polacek <polacek@redhat.com>
1884 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1885 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1886 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1889 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1891 * pt.c (convert_template_argument): Use inform instead of error in
1894 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1899 * parser.c (cp_parser_userdef_string_literal): Take a tree
1901 (cp_parser_string_literal): Don't hack the token stream.
1903 2014-06-30 Jason Merrill <jason@redhat.com>
1907 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1909 * init.c (build_vtbl_address): Don't mark destructor.
1910 * class.c (finish_struct_1): Add all classes to keyed_classes
1914 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1917 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1919 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1920 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1921 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1922 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1923 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1924 * pt.c (unify): Also check whether the argument is a PMF.
1926 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1929 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1930 a '[' can also start a primary-expression.
1931 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1932 when cp_parser_tokens_start_cast_expression returns -1.
1934 2014-06-30 Jason Merrill <jason@redhat.com>
1937 * pt.c (unify_one_argument): Type/expression mismatch just causes
1940 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1943 2014-06-30 Marek Polacek <polacek@redhat.com>
1945 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1946 function has no_sanitize_undefined attribute.
1947 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1948 function has no_sanitize_undefined attribute.
1950 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1953 * cp-array-notation.c (expand_sec_reduce_builtin):
1954 Check that bultin argument is correct.
1955 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1957 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1961 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1962 types aren't the same.
1964 2014-06-27 Jason Merrill <jason@redhat.com>
1967 * error.c (dump_template_bindings): Don't tsubst in a clone.
1969 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1972 * semantics.c (finish_compound_literal): Revert r204228.
1974 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1976 * parser.c (cp_parser_compound_literal_p): New.
1977 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1979 2014-06-26 Jason Merrill <jason@redhat.com>
1981 * parser.c (cp_parser_for_init_statement): Change range-for error
1984 N3994 Ranged-based for-loops: The Next Generation
1985 * parser.c (cp_lexer_nth_token_is): New.
1986 (cp_parser_for_init_statement): Allow "for (id : init)".
1988 2014-06-26 Teresa Johnson <tejohnson@google.com>
1990 * class.c (dump_class_hierarchy): Use saved dump files.
1991 (dump_vtable): Ditto.
1994 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1997 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1998 parameter lists outside of function parameter scope.
2000 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
2004 * typeck2.c (process_init_constructor_record): Do not complain about
2005 uninitialized const members, because within aggregate-initialization,
2006 members without explicit initializers are value-initialized.
2008 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2010 * semantics.c (finish_omp_clauses): Make sure
2011 OMP_CLAUSE_LINEAR_STEP has correct type.
2013 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
2015 * class.c (check_methods, create_vtable_ptr, determine_key_method,
2016 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
2017 FUNCTION_DECL check.
2018 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
2019 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
2020 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
2021 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
2023 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
2026 * decl.c (grokdeclarator): Do not early check for operator-function-id
2029 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2031 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
2034 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2036 * parser.c (cp_parser_omp_for_loop): For
2037 #pragma omp parallel for simd move lastprivate clause from parallel
2038 to for rather than simd.
2040 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
2044 * decl.c (grokparms): Accept a single parameter of type 'void'.
2046 2014-06-20 Jason Merrill <jason@redhat.com>
2049 * call.c (add_function_candidate): Avoid special 'this' handling
2050 if we have a ref-qualifier.
2053 * call.c (build_over_call): Call build_this in template path.
2055 2014-06-19 Jason Merrill <jason@redhat.com>
2058 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
2060 2014-06-18 Jason Merrill <jason@redhat.com>
2063 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
2064 ref-qualifier handling.
2067 * pt.c (resolve_overloaded_unification): Preserve
2068 ARGUMENT_PACK_EXPLICIT_ARGS.
2070 2014-06-18 Jakub Jelinek <jakub@redhat.com>
2072 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
2074 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
2076 2014-06-17 Jason Merrill <jason@redhat.com>
2079 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
2081 2014-06-15 Jason Merrill <jason@redhat.com>
2084 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
2087 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
2089 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2091 * decl.c (grokvardecl): Fix pasto in previous patch.
2093 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2095 * decl.c (duplicate_decls): Use set_decl_tls_model.
2096 (grokdeclarator): Likewise.
2097 * semantics.c (finish_id_expression): Check TLS only for
2099 (finish_omp_threadprivate): Use decl_default_tls_model.
2100 * decl2.c (get_guard): Likewise.
2101 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
2103 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2106 * decl.c (grokparms): Improve error message about void parameters.
2107 * error.c (type_to_string): Fix aka cut off code.
2109 2014-06-12 Jason Merrill <jason@redhat.com>
2111 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
2112 * cvt.c (type_promotes_to): Likewise.
2113 * mangle.c (write_type, write_expression): Likewise.
2114 (write_name, write_template_arg): Likewise.
2115 (mangle_decl): Make alias based on flag_abi_compat_version.
2116 Emit -Wabi warning here.
2117 (finish_mangling_internal): Not here. Drop warn parm.
2118 (finish_mangling_get_identifier, finish_mangling): Adjust.
2119 (mangle_type_string, mangle_special_for_type): Adjust.
2120 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
2121 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
2122 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
2124 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
2125 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
2126 (layout_nonempty_base_or_field, end_of_class): Likewise.
2127 (layout_empty_base, build_base_field, layout_class_type): Likewise.
2128 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
2129 (layout_virtual_bases): Likewise.
2130 * decl.c (compute_array_index_type): Likewise.
2131 * mangle.c (write_mangled_name, write_prefix): Likewise.
2132 (write_template_prefix, write_integer_cst, write_expression): Likewise.
2133 (write_template_arg, write_array_type): Likewise.
2134 * method.c (lazily_declare_fn): Likewise.
2135 * rtti.c (get_pseudo_ti_index): Likewise.
2136 * typeck.c (comp_array_types): Likewise.
2138 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
2140 * vtable-class-hierarchy.c: Update handling for section names
2141 that are no longer trees.
2142 * decl.c (duplicate_decls): Likewise.
2144 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2147 * parser.c (cp_parser_init_declarator): Actually pass friend_p
2148 to cp_parser_declarator.
2150 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2153 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
2154 * name-lookup.c (validate_nonmember_using_decl): Adjust error
2157 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2160 * parser.c (cp_parser_declarator): Add bool parameter.
2161 (cp_parser_direct_declarator): Likewise, use it.
2162 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
2163 (cp_parser_condition, cp_parser_explicit_instantiation,
2164 cp_parser_init_declarator, cp_parser_type_id_1,
2165 cp_parser_parameter_declaration, cp_parser_exception_declaration,
2166 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
2167 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
2169 * decl.c (grokdeclarator): Fix handling of friend declared in
2170 namespace scope (g++.dg/parse/friend10.C).
2172 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
2174 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
2176 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
2177 (maybe_clone_body): Move symbol across comdat groups.
2178 * method.c (use_thunk): Copy implicit section flag.
2180 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2183 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
2185 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2187 * method.c (use_thunk): Use set_decl_section_name.
2188 * optimize.c (maybe_clone_body): Use set_decl_section_name.
2189 * decl.c (duplicate_decls): Likewise.
2190 * vtable-class-hierarchy.c: Likewise.
2192 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
2195 * class.c (check_field_decls): In C++11 mode do not reject
2196 static data members and reference-type members in unions.
2198 2014-06-05 Jason Merrill <jason@redhat.com>
2201 * decl.c (check_initializer): Collapse a TREE_LIST here.
2202 * typeck2.c (store_init_value): Not here.
2204 2014-06-05 Richard Biener <rguenther@suse.de>
2205 Paolo Carlini <paolo.carlini@oracle.com>
2208 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
2209 handling of empty classes.
2211 2014-06-04 Jason Merrill <jason@redhat.com>
2213 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
2214 for noexcept and thread_local, too.
2217 * decl.c (check_initializer): Maybe clear
2218 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2220 2014-06-05 Richard Biener <rguenther@suse.de>
2223 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
2224 warnings for accessing empty classes.
2226 2014-06-05 Marek Polacek <polacek@redhat.com>
2229 * parser.c (cp_parser_binary_expression): Warn when logical not is
2230 used on the left hand side operand of a comparison.
2232 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
2235 * typeck.c (cp_build_modify_expr): Handle array of characters
2236 initialized by a string literal.
2237 * decl.c (check_initializer): Handle parenthesized string literal
2239 * typeck2.c (store_init_value): Remove redundant check.
2241 2014-06-04 Jason Merrill <jason@redhat.com>
2245 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
2246 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
2248 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2251 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
2254 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2258 * call.c (standard_conversion): Convert nullptr to bool only
2259 in case of direct-initialization.
2260 (convert_like_real): Provide informative error message.
2262 2014-06-03 Marek Polacek <polacek@redhat.com>
2265 * semantics.c (finish_switch_cond): Warn if switch condition has
2268 2014-06-03 Jason Merrill <jason@redhat.com>
2271 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
2272 variable to local_specializations.
2275 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
2277 2014-06-02 Jason Merrill <jason@redhat.com>
2280 * decl.c (reshape_init_class): Handle un-folded
2281 constant-expressions.
2284 * pt.c (pack_deducible_p): Handle canonicalization.
2286 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2288 * pt.c (tsubst_function_type): Initialize arg_types.
2290 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
2293 * class.c (handle_using_decl): Pass the correct scope to
2294 cp_emit_debug_info_for_using.
2296 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2300 * search.c (accessible_p): Use current_nonlambda_class_type.
2301 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2303 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2305 * decl.c: Include builtins.h.
2306 * semantics.c: Likewise.
2308 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
2312 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2313 * pt.c (tsubst_function_type): Inject the this parameter; do the
2314 substitutions in the order mandated by the DR.
2315 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2316 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2317 (static_fn_type): Copy it.
2318 * decl2.c (build_memfn_type, change_return_type,
2319 cp_reconstruct_complex_type): Likewise.
2320 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2321 * tree.c (strip_typedefs): Likewise.
2322 * typeck.c (merge_types): Likewise.
2324 2014-05-30 Jason Merrill <jason@redhat.com>
2327 * pt.c (instantiate_decl): Check that defer_ok is not set for
2328 local class members.
2331 * pt.c (tsubst_init): Split out from...
2332 (tsubst_expr) [DECL_EXPR]: Here.
2333 (tsubst_copy) [VAR_DECL]: Use it.
2334 * semantics.c (finish_id_expression): Return the decl for static/const.
2336 2014-05-28 Jason Merrill <jason@redhat.com>
2339 * decl.c (cxx_comdat_group): Return a decl.
2340 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2342 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2346 * call.c (build_aggr_conv): Ignore passed in flags.
2347 (build_array_conv, build_complex_conv): Likewise.
2349 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2351 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2352 (maybe_clone_body): Likewise.
2353 * decl.c (duplicate_decls): Update code duplicating comdat group;
2354 do not copy symtab pointer; before freeing newdecl remove it
2356 * decl2.c (constrain_visibility): Use set_comdat_group.
2358 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2360 * rtti.c: Include tm_p.h
2361 (emit_tinfo_decl): Force RTTI data to be aligned to required
2364 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2366 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2367 ignoring other target adjustments.
2369 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2371 * semantics.c (finish_omp_clauses): Remove duplicated variable
2374 * parser.c (cp_parser_omp_target): Return bool values.
2376 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2379 * lambda.c (add_capture): Enforce that capture by value requires
2381 * typeck2.c (cxx_incomplete_type_inform): Early return if
2382 TYPE_MAIN_DECL is null.
2384 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2387 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2389 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2392 * lambda.c (build_capture_proxy, add_capture): Treat normal
2393 captures and init-captures identically.
2395 2014-05-21 Mark Wielaard <mjw@redhat.com>
2398 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2399 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2401 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2403 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2404 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2405 (expand_array_notation): Handle VOID_CST.
2406 * error.c (dump_expr): Likewise.
2407 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2408 (cxx_pretty_printer::expression): Likewise.
2409 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2410 * decl.c (register_dtor_fn): Likewise.
2411 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2412 (build_delete, push_base_cleanups): Likewise.
2413 * mangle.c (write_expression): Likewise.
2414 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2415 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2416 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2417 * tree.c (cp_tree_equal): Likewise.
2418 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2419 instead of void_zero_node.
2420 * typeck.c (check_return_expr): Likewise.
2421 * typeck2.c (build_functional_cast): Likewise.
2423 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2426 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2428 (cp_parser_statement): ...here. Make sure only semicolon can go after
2431 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2436 * typeck2.c (digest_nsdmi_init): New.
2437 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2438 * init.c (get_nsdmi): Likewise.
2439 * cp-tree.h (digest_nsdmi_init): Declare.
2441 2014-05-20 Jason Merrill <jason@redhat.com>
2443 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2444 up a virtual function in a dummy object.
2446 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2449 * decl.c (duplicate_decls): Replace pair of warning_at with
2450 warning_at + inform.
2451 (maybe_commonize_var): Likewise.
2453 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2456 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2457 (tsubst_copy_and_build): Perform recursive substitutions in a
2458 deterministic order.
2460 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2463 * typeck2.c (cxx_incomplete_type_inform): New.
2464 (cxx_incomplete_type_diagnostic): Use it.
2465 * decl.c (grokdeclarator): Check the element type of an
2466 incomplete array type; call the above.
2467 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2469 2014-05-19 Jason Merrill <jason@redhat.com>
2472 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2473 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2475 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2477 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2478 * parser.c (cp_parser_enum_specifier): Likewise.
2480 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2482 * class.c (sorted_fields_type_new): Adjust.
2483 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2484 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2485 * cp-tree.h: Remove usage of variable_size gty attribute.
2486 * decl.c (make_label_decl): Adjust.
2487 (check_goto): Likewise.
2488 (start_preparsed_function): Likewise.
2489 (save_function_data): Likewise.
2490 * lex.c (init_reswords): Likewise.
2491 (retrofit_lang_decl): Likewise.
2492 (cxx_dup_lang_specific_decl): Likewise.
2493 (copy_lang_type): Likewise.
2494 (cxx_make_type): Likewise.
2495 * name-lookup.c (binding_entry_make): Likewise.
2496 (binding_table_construct): Likewise.
2497 (binding_table_new): Likewise.
2498 (cxx_binding_make): Likewise.
2499 (pushdecl_maybe_friend_1): Likewise.
2500 (begin_scope): Likewise.
2501 (push_to_top_level): Likewise.
2502 * parser.c (cp_lexer_alloc): Likewise.
2503 (cp_lexer_new_from_tokens): Likewise.
2504 (cp_token_cache_new): Likewise.
2505 (cp_parser_context_new): Likewise.
2506 (cp_parser_new): Likewise.
2507 (cp_parser_nested_name_specifier_opt): Likewise.
2508 (cp_parser_template_id): Likewise.
2509 * pt.c (maybe_process_partial_specialization): Likewise.
2510 (register_specialization): Likewise.
2511 (add_pending_template): Likewise.
2512 (lookup_template_class_1): Likewise.
2513 (push_tinst_level): Likewise.
2514 * semantics.c (register_constexpr_fundef): Likewise.
2515 (cxx_eval_call_expression): Likewise.
2516 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2518 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2521 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2522 when cp_parser_lookup_name sets ambiguous_decls.
2524 2014-05-15 Jason Merrill <jason@redhat.com>
2526 * call.c (print_conversion_rejection): Use loc consistently.
2528 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2530 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2531 * call.c (convert_like_real, build_new_method_call_1): Use it.
2532 * decl2.c (grokfield): Likewise.
2533 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2534 build_new_1): Likewise.
2535 * mangle.c (write_expression): Likewise.
2536 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2538 2014-05-14 Jason Merrill <jason@redhat.com>
2542 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2543 dropped cv-quals as a bad conversion.
2544 (convert_like_real) [ck_ref_bind]: Explain them.
2545 (compare_ics): Check badness before stripping reference
2546 bindings. Handle comparing bad reference bindings.
2547 * typeck.c (comp_cv_qualification): Add overload that just takes
2549 * cp-tree.h: Declare it.
2551 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2552 (arg_conversion_rejection, bad_arg_conversion_rejection)
2553 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2554 (add_function_candidate): Pass actual argument, rather than type, to
2555 bad_arg_conversion_rejection.
2556 (print_conversion_rejection): Explain what's wrong with the conversion.
2557 (print_z_candidates): Say "candidate:" before each candidate.
2558 (splice_viable): Be strict if we see a viable or template candidate.
2559 (build_user_type_conversion_1): Pass false to strict parameter.
2560 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2561 (build_new_op_1, build_new_method_call_1): Likewise.
2562 (build_op_call_1): Pass true to strict parameter.
2564 2014-05-13 Jason Merrill <jason@redhat.com>
2566 * call.c (print_error_for_call_failure): Say "no match" rather
2567 than "ambiguous" if there were no strict matches.
2568 (build_new_method_call_1): Likewise.
2571 * semantics.c (is_this_parameter): Allow capture proxies too.
2573 2014-05-12 Jason Merrill <jason@redhat.com>
2575 * call.c (maybe_print_user_conv_context): New.
2576 (convert_like_real): Use it. Print call context for bad
2577 user-defined conversion.
2578 (build_over_call): Print call context for bad 'this' conversion.
2580 * call.c (convert_like_real): Use inform for identifying the
2583 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2585 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2586 complain & tf_error is false.
2588 * decl.c (make_unbound_class_template): Prefer inform for
2589 "declared here"-type message.
2591 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2595 * lambda.c (lambda_expr_this_capture): Add new parameter
2596 add_capture_p controlling whether the functions will try to
2597 capture 'this' via the default capture.
2598 (maybe_resolve_dummy): Likewise.
2599 * cp-tree.h: Adjust prototypes.
2600 * call.c, semantics.c: Change callers of these functions.
2601 * call.c (build_new_method_call_1): Use the actual 'this' that
2602 would be potentially captured for the overload resolution, instead
2603 of the dummy object.
2605 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2607 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2609 (convert_nontype_argument): Adjust calls.
2610 (coerce_template_parameter_pack): Add missing complain & tf_error
2613 2014-05-09 Jason Merrill <jason@redhat.com>
2617 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2618 non-class lvalues and xvalues that differ only in cv-qualifiers.
2622 * call.c (build_user_type_conversion_1): The copy-init temporary
2626 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2629 * call.c (build_conditional_expr_1): If overload resolution finds
2630 no match, just say "different types".
2633 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2636 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2637 if we didn't find a conversion.
2638 Don't accept a bad conversion too early.
2640 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2643 * typeck.c (convert_for_assignment): Provide an inform for pointers
2644 to incomplete class types.
2646 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2649 * pt.c (convert_nontype_argument): Protect all the error calls
2650 with complain & tf_error.
2652 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2655 * pt.c (instantiate_decl): Avoid generating the body of a
2658 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2661 * pt.c (maybe_begin_member_template_processing): Use
2662 uses_template_parms.
2664 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2665 Mike Stump <mikestump@comcast.net>
2666 Richard Sandiford <rdsandiford@googlemail.com>
2668 * call.c: Include wide-int.h.
2669 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2670 (convert_for_arg_passing): Likewise.
2671 * class.c: Include wide-int.h.
2672 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2673 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2674 (include_empty_classes): Likewise
2675 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2676 * cvt.c: Include wide-int.h.
2677 (ignore_overflows): Use wide_int_to_tree.
2678 * decl.c: Include wide-int.h.
2679 (check_array_designated_initializer): Use wide-int interfaces.
2680 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2681 (finish_enum_value_list): Use signop.
2682 (build_enumerator): Use wide-int interfaces.
2683 * init.c: Include wide-int.h.
2684 (build_new_1): Use wide-int interfaces.
2685 * mangle.c: Include wide-int.h.
2686 (write_integer_cst): Use wide-int interfaces.
2687 (write_array_type): Likewise.
2688 * tree.c: Include wide-int.h.
2689 (cp_tree_equal): Use tree_int_cst_equal.
2690 * typeck2.c: Include wide-int.h.
2691 (process_init_constructor_array): Use wide-int interfaces.
2693 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2696 * decl.c (grokfndecl): Check duplicate_decls return value for
2698 * pt.c (instantiate_decl): A deleted function is defined.
2700 2014-05-02 Jason Merrill <jason@redhat.com>
2702 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2705 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2707 (add_capture): Check for VLA before calling it.
2708 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2709 just the current one. Make non-static.
2710 * cp-tree.h: Declare it.
2711 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2712 the operand was static or constant.
2714 2014-05-02 Marek Polacek <polacek@redhat.com>
2716 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2719 2014-05-01 Marek Polacek <polacek@redhat.com>
2722 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2723 between label and variable when warning about returning local address.
2725 2014-04-30 Jason Merrill <jason@redhat.com>
2728 * init.c (build_value_init): Don't try to call an array constructor.
2731 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2733 2014-04-30 Marek Polacek <polacek@redhat.com>
2735 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2736 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2737 for non-integer types.
2739 2014-04-29 Jason Merrill <jason@redhat.com>
2742 Represent the unevaluated exception specification of an implicitly
2743 declared or deleted function with a simple placeholder, not a list
2745 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2746 * except.c (unevaluated_noexcept_spec): New.
2747 * class.c (deduce_noexcept_on_destructor): Use it.
2748 * decl.c (check_redeclaration_exception_specification): Call
2749 maybe_instantiate_noexcept.
2750 (duplicate_decls): Call it before merge_types.
2751 (start_preparsed_function): Call maybe_instantiate_noexcept.
2752 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2753 * init.c (get_nsdmi): Factor out of perform_member_init.
2754 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2755 (walk_field_subobs): Consider NSDMI for EH spec.
2756 (get_defaulted_eh_spec): New.
2757 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2758 (defaulted_late_check): Defer EH checking in non-template classes.
2759 (after_nsdmi_defaulted_late_checks): New.
2760 * parser.c (cp_parser_class_specifier_1): Use it.
2761 (unparsed_classes): New macro.
2762 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2763 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2764 Remove list-of-functions handling.
2765 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2766 handling and FN parameter.
2767 * typeck.c (merge_types): Adjust.
2769 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2772 * parser.c (cp_parser_alias_declaration): Check return value of
2775 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2777 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2778 atomic-clause, allow comma in between atomic-clause and
2781 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2784 * rtti.c (emit_support_tinfos): Do not iterate on
2785 registered_builtin_types (partial revert).
2787 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2790 * semantics.c (apply_deduced_return_type): Complete non-void type
2791 before estimating whether the type is aggregate.
2793 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2796 * rtti.c (emit_support_tinfo_1): New function, extracted from
2797 emit_support_tinfos.
2798 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2800 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2803 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2804 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2806 2014-04-18 Jason Merrill <jason@redhat.com>
2809 * call.c (reference_binding): Recurse on user-defined conversion.
2812 * call.c (standard_conversion): Don't try to apply restrict to void.
2814 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2816 * decl.c (reshape_init_r): Handle a single element of vector type.
2818 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2821 * decl2.c (cplus_decl_attributes): Handle
2822 pointer-to-member-function declarations.
2824 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2827 * call.c (build_user_type_coversion): Use build_dummy_object
2828 to create the placeholder object for a constructor method call.
2829 (build_special_member_call): Likewise.
2830 (build_over_call): Check for the placeholder object with
2832 (build_new_method_call_1): Likewise. Don't attempt to resolve
2833 a dummy object for a constructor method call.
2835 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2838 * friend.c (add_friend, make_friend_class): Move repeated friend
2839 warning under Wredundant_decls.
2841 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2843 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2844 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2845 (do_class_using_decl): Likewise.
2846 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2848 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2851 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2853 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2855 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2857 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2859 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2861 2014-04-11 Jason Merrill <jason@redhat.com>
2863 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2865 (cp_lexer_get_preprocessor_token): Always clear it.
2866 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2870 * decl.c (reshape_init_r): Handle a single element of class type.
2873 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2874 built-in operator new.
2876 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2879 * name-lookup.c (parse_using_directive): Return early if the
2880 attribs argument is error_mark_node; use get_attribute_name.
2882 2014-04-11 Jason Merrill <jason@redhat.com>
2886 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2887 * call.c (struct z_candidate): Add flags field.
2888 (add_candidate): Add flags parm.
2889 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2890 (add_template_candidate_real): Pass it.
2891 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2892 * tree.c (build_aggr_init_expr): Copy it.
2893 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2895 2014-04-10 Richard Biener <rguenther@suse.de>
2896 Jakub Jelinek <jakub@redhat.com>
2899 * error.c (dump_decl) <case FUNCTION_DECL>: If
2900 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2901 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2904 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2906 * pt.c (check_template_variable): Check for the return of pedwarn
2907 before emitting a note.
2908 * parser.c (cp_parser_lambda_introducer): Likewise.
2910 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2913 * pt.c (process_template_parm): For an invalid non-type parameter
2914 only set TREE_TYPE to error_mark_node.
2915 (push_inline_template_parms_recursive, comp_template_parms,
2916 redeclare_class_template, coerce_template_template_parm,
2917 coerce_template_template_parms, unify): Use error_operand_p.
2919 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2921 * class.c (check_bases_and_members): Warn about non-virtual dtors
2922 in public bases only. Check warn_ecpp before complaining about
2923 non-polymorphic bases.
2925 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2927 * decl.c (duplicate_decls): Check for the return of warning_at
2928 before emitting a note.
2929 (warn_misplaced_attr_for_class_type): Likewise.
2930 (check_tag_decl): Likewise.
2932 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2935 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2937 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2940 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2941 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2942 instantiating a variable-sized type.
2945 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2947 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2949 * class.c (find_abi_tags_r): Check for the return of warning
2950 before emitting a note.
2951 (one_inherited_ctor): Likewise.
2953 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2955 * decl.c (duplicate_decls): Check for the return of permerror
2956 before emitting a note.
2958 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2960 * class.c (accessible_nvdtor_p): New.
2961 (check_bases): Don't check base destructor here ...
2962 (check_bases_and_members): ... check them here. Trigger on
2963 Wnon-virtual-dtor flag.
2964 (finish_struct_1): Use accessible_nvdtor_p.
2966 2014-04-01 Jason Merrill <jason@redhat.com>
2968 * pt.c (process_partial_specialization): Say "not deducible"
2969 rather than "not used". Use inform.
2972 * pt.c (coerce_template_parms): Check that the pack expansion
2973 pattern works with the first matching parameter.
2975 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2977 * init.c (perform_member_init): Homogenize uninitialized
2980 2014-04-01 Jason Merrill <jason@redhat.com>
2983 * call.c (build_array_conv): Call complete_type.
2986 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2987 (picflag_from_initializer): Return it.
2988 (process_init_constructor): Handle it.
2991 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2992 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2993 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2994 (most_general_template): Handle more kinds of template.
2995 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2996 instantiations and specializations.
2998 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
3001 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
3002 COMPONENT_REFs and ARRAY_REFs sooner.
3004 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
3007 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
3008 usage in non-functions with pushed scope.
3010 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
3013 * name-lookup.h (cp_binding_level): New transient field defining_class_p
3014 to indicate whether a scope is in the process of defining a class.
3015 * semantics.c (begin_class_definition): Set defining_class_p.
3016 * name-lookup.c (leave_scope): Reset defining_class_p.
3017 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
3018 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
3019 unwinding to class-defining scope to handle the erroneous definition of
3020 a generic function of an arbitrarily nested class within an enclosing
3023 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
3026 * method.c (walk_field_subobs): Improve the diagnostic
3027 locations for both REFERENCE_TYPEs and non-static const members.
3028 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
3029 instead of %qD to be consistent with the c++11 diagnostic.
3031 2014-03-25 Jason Merrill <jason@redhat.com>
3035 * class.c (build_vtbl_initializer): Handle abstract dtors here.
3036 * search.c (get_pure_virtuals): Not here.
3039 * parser.c (cp_parser_lambda_expression): Don't parse the body of
3040 a lambda in unevaluated context.
3043 * decl.c (create_array_type_for_decl): Complain about array of auto.
3045 2014-03-25 Jakub Jelinek <jakub@redhat.com>
3048 * semantics.c (potential_constant_expression_1): Handle
3051 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
3054 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
3055 introducing an implicit function template parameter within an explicit
3058 2014-03-22 Jason Merrill <jason@redhat.com>
3061 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
3064 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
3067 * name-lookup.c (push_class_level_binding_1): Check identifier_p
3068 on the name argument.
3070 2014-03-20 Jakub Jelinek <jakub@redhat.com>
3073 * init.c (build_zero_init_1): Ignore fields with error_mark_node
3076 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
3079 * call.c (build_new_method_call_1): Handle pure virtuals called by
3082 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
3085 * parser.c (cp_parser_member_declaration): Don't allow
3086 finish_fully_implicit_template to consider friend declarations to be
3087 class member templates.
3088 (synthesize_implicit_template_parm): Handling winding back through class
3089 scope to the class being defined in order to inject a template argument
3093 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
3094 function scope as per cp_parser_skip_to_end_of_statement.
3096 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
3099 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
3101 2014-03-14 Jason Merrill <jason@redhat.com>
3105 * search.c (get_pure_virtuals): Handle abstract dtor here.
3106 (dfs_get_pure_virtuals): Not here.
3109 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
3110 abstract class as pure.
3112 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3115 * pt.c (maybe_process_partial_specialization): Check return value
3116 of check_specialization_namespace.
3118 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3121 * semantics.c (finish_static_assert): Call cxx_constant_value only
3122 if require_potential_rvalue_constant_expression returns true.
3124 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
3127 * method.c (get_inherited_ctor): New.
3128 * cp-tree.h (get_inherited_ctor): Declare it.
3129 * semantics.c (is_valid_constexpr_fn): Use it.
3131 2014-03-10 Jason Merrill <jason@redhat.com>
3134 * call.c (convert_default_arg): Remove special handling for
3138 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
3139 when deciding whether to call push_template_decl for a member class.
3140 * pt.c (push_template_decl_real): Return after wrong levels error.
3142 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
3145 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
3146 lambda, remove the lambda's own template argument list prior to fetching
3150 * parser.c (cp_parser_parameter_declaration_clause): Move generic
3151 function template unwinding on error into a more general location, ...
3152 (cp_parser_skip_to_end_of_statement): ... here.
3154 2014-03-07 Jason Merrill <jason@redhat.com>
3156 * Make-lang.in (check_g++_parallelize): Split dg.exp.
3158 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
3159 we're in a trailing return type.
3161 * typeck.c (comp_template_parms_position): 'auto' and
3162 'decltype(auto)' are different from real template parms.
3164 * parser.c (cp_parser_using_declaration): Consume the semicolon
3165 after bare parameter pack error.
3167 * cp-tree.h (REF_PARENTHESIZED_P): New.
3168 * semantics.c (force_paren_expr): Set it.
3169 * pt.c (do_auto_deduction): Check it.
3170 (tsubst) [COMPONENT_REF]: Copy it.
3171 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
3173 * decl.c (create_array_type_for_decl): Only warn about invalid
3174 C++1y VLA if flag_iso or warn_vla>0.
3175 (grokdeclarator): Likewise.
3176 * pt.c (tsubst): Likewise.
3177 * semantics.c (finish_decltype_type): Likewise.
3178 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
3179 (cp_build_addr_expr_1): Likewise.
3180 * init.c (build_new_1): Improve diagnostics.
3182 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3185 * decl.c (check_initializer): Return NULL_TREE after error;
3186 consistently use inform.
3188 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3190 * decl.c (check_initializer): Remove dead code.
3192 2014-03-06 Marek Polacek <polacek@redhat.com>
3195 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
3196 of checking tree code.
3198 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3200 * parser.c (cp_lexer_set_source_position): New.
3201 (cp_parser_mem_initializer): Use it.
3202 (cp_parser_postfix_open_square_expression): Likewise.
3203 (cp_parser_parenthesized_expression_list): Likewise.
3204 (cp_parser_new_initializer): Likewise.
3205 (cp_parser_jump_statement): Likewise.
3206 (cp_parser_initializer): Likewise.
3207 (cp_parser_functional_cast): Likewise.
3209 2014-03-05 Jason Merrill <jason@redhat.com>
3212 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
3213 dependent expression.
3216 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
3217 if re-parsing might succeed.
3218 * semantics.c (finish_id_expression): Use of a parameter outside
3219 the function body is a parse error.
3221 * parser.c (cp_parser_mem_initializer): Set input_location
3222 properly for init-list warning.
3223 (cp_parser_postfix_open_square_expression): Likewise.
3224 (cp_parser_parenthesized_expression_list): Likewise.
3225 (cp_parser_new_initializer): Likewise.
3226 (cp_parser_jump_statement): Likewise.
3227 (cp_parser_initializer): Likewise.
3228 (cp_parser_functional_cast): Likewise.
3230 2014-03-04 Jason Merrill <jason@redhat.com>
3233 * typeck2.c (process_init_constructor_record): Set
3234 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
3238 * parser.c (cp_parser_direct_declarator): Set declarator to
3239 cp_error_declarator on invalid qualified-id.
3241 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
3244 * parser.c (cp_parser_using_declaration): Early return when
3245 cp_parser_nested_name_specifier errors out.
3247 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
3250 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
3251 function scope on parse error in function parameter list.
3253 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3255 * method.c (implicitly_declare_fn): Remove redundant
3256 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
3257 * semantics.c (is_instantiation_of_constexpr): Likewise.
3258 * error.c (dump_function_decl): Likewise.
3260 2014-03-01 Jason Merrill <jason@redhat.com>
3263 * semantics.c (begin_maybe_infinite_loop): Use
3264 fold_non_dependent_expr_sfinae.
3266 2014-02-28 Jason Merrill <jason@redhat.com>
3269 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
3271 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
3274 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
3275 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
3276 * lambda.c (maybe_add_lambda_conv_op): Likewise.
3278 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
3281 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
3284 2014-02-27 Jason Merrill <jason@redhat.com>
3288 * decl2.c (tentative_decl_linkage): Don't mess with functions that
3289 are not yet defined.
3291 2014-02-26 Jason Merrill <jason@redhat.com>
3295 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
3296 * init.c (build_vtbl_address): Do it here.
3302 * pt.c (struct warning_sentinel): New.
3303 (tsubst_copy_and_build): Use it instead of
3304 c_inhibit_evaluation_warnings.
3305 * typeck.c (maybe_warn_about_useless_cast): Remove
3306 c_inhibit_evaluation_warnings check.
3309 * pt.c (get_template_parm_index): New.
3310 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3311 (process_template_parm): Allow bare packs in template template
3312 parm template parms.
3313 (coerce_template_parameter_pack): Handle fixed template template
3314 parm packs and fixed packs not at the end of the parm list.
3315 (coerce_template_parms): Handle template parm packs not at the end
3317 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3320 * pt.c (unify): Ignore alias templates when deducing a template
3326 * call.c (reference_binding): Recurse on user-defined conversion.
3327 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3329 2014-02-25 Jason Merrill <jason@redhat.com>
3332 * call.c (reference_binding): Recurse on user-defined conversion.
3333 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3335 * call.c (print_conversion_rejection): Handle n_arg of -2.
3336 (build_user_type_conversion_1): Pass it.
3339 * decl2.c (no_linkage_error): Handle C++98 semantics.
3340 (reset_type_linkage): Move from decl.c.
3341 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3342 (bt_reset_linkage_2, reset_decl_linkage): New.
3343 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3344 (cp_write_global_declarations): Move condition into no_linkage_error.
3345 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3346 * semantics.c (expand_or_defer_fn_1): Factor out
3347 tentative_decl_linkage.
3348 * cp-tree.h: Adjust.
3350 * decl2.c (finish_static_data_member_decl): Diagnose static data
3351 member in unnamed class.
3352 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3355 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3356 defaulted virtual dtor.
3360 * pt.c (get_underlying_template): Fix equivalence calculation.
3362 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3365 * parser.c (function_being_declared_is_template_p): Return false when
3366 processing a template parameter list.
3367 (cp_parser_parameter_declaration_clause): Don't set
3368 auto_is_implicit_function_template_parm_p when processing a
3369 template parameter list.
3371 * parser.c (synthesize_implicit_template_parm): Inject new template
3372 argument list appropriately when a generic member function
3373 of a class template is declared out-of-line.
3376 * parser.c (cp_parser_direct_declarator): Don't save and
3377 restore num_template_parameter_lists around call to
3378 cp_parser_parameter_declaration_list.
3379 (function_being_declared_is_template_p): New predicate.
3380 (cp_parser_parameter_declaration_list): Use
3381 function_being_declared_is_template_p as predicate for
3382 inspecting current function template parameter list length
3383 rather than num_template_parameter_lists.
3385 2014-02-24 Jason Merrill <jason@redhat.com>
3388 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3389 DECL_EXPR initialize a non-class iterator.
3392 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3394 2014-02-21 Jason Merrill <jason@redhat.com>
3397 * parser.c (cp_parser_type_name): Always check dependency.
3398 (cp_parser_type_specifier_seq): Call
3399 cp_parser_parse_and_diagnose_invalid_type_name.
3402 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3405 * parser.c (cp_parser_default_argument): Clear
3406 current_class_ptr/current_class_ref like tsubst_default_argument.
3409 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3410 than current_binding_level.
3413 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3416 * parser.c (cp_parser_enum_specifier): Call
3417 check_for_bare_parameter_packs.
3420 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3424 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3425 of the partial instantiation, not the most general template.
3426 (maybe_process_partial_specialization): Reassign everything on
3430 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3431 (check_explicit_specialization): Don't clone.
3434 * pt.c (coerce_template_parms): Bail if argument packing fails.
3437 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3438 Don't get confused by a CONSTRUCTOR that already has a type.
3441 * call.c (build_array_conv): Don't crash on VLA.
3444 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3447 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3448 in declaration context.
3452 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3455 * parser.c (cp_parser_direct_declarator): Don't wrap a
3456 type-dependent expression in a NOP_EXPR.
3459 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3464 * parser.c (cp_parser_template_argument): Restore dereference.
3465 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3466 (process_partial_specialization): Handle deref.
3469 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3473 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3474 implicit_template_scope upon leaving an out-of-line generic member
3475 function definition.
3477 2014-02-20 Kai Tietz <ktietz@redhat.com>
3480 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3481 valued type argument as error_mark_node.
3484 * semantics.c (finish_fname): Handle error_mark_node.
3486 2014-02-19 Jason Merrill <jason@redhat.com>
3489 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3490 spec from template context.
3492 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3495 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3496 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3499 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3501 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3504 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3507 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3510 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3511 During error recovery allow_non_constant may be false.
3513 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3516 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3517 scope whenever a template parameter list has been started, independent
3518 of whether the function call operator was well-formed or not.
3521 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3522 scope for generic friend declarations as well as for non-friends.
3524 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3527 * method.c (implicitly_declare_fn): A constructor of a class with
3528 virtual base classes isn't constexpr (7.1.5p4).
3530 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3532 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3534 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3537 * parser.c (cp_parser_omp_declare_reduction): Save and free
3540 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3544 * tree.c (handle_init_priority_attribute): Call default_conversion on
3545 the attribute argument.
3547 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3550 * method.c (synthesized_method_walk): If vbases is non-null but
3551 is_empty is true, likewise don't worry about the virtual bases.
3553 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3556 * typeck2.c (process_init_constructor_record): Just skip unnamed
3559 2014-01-31 Jason Merrill <jason@redhat.com>
3562 * pt.c (mark_decl_instantiated): Call mark_needed.
3565 * decl2.c (handle_tls_init): Handle null init fn.
3568 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3570 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3573 * class.c (build_vfield_ref): Early return error_mark_node if
3574 TYPE_VFIELD (type) is null.
3575 (build_base_path): Check return value of build_vfield_ref.
3577 2014-01-31 Jason Merrill <jason@redhat.com>
3580 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3581 [ck_list]: Check for error_mark_node.
3582 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3585 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3586 during partial ordering.
3588 2014-01-31 Marek Polacek <polacek@redhat.com>
3591 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3593 2014-01-30 Jason Merrill <jason@redhat.com>
3596 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3597 (local_specializations): New macro.
3598 * pt.c (local_specializations): Remove variable.
3600 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3603 * parser.c (make_string_pack): Use double_int::from_buffer.
3605 2014-01-30 Marek Polacek <polacek@redhat.com>
3608 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3610 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3611 with input_location.
3612 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3615 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3618 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3620 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3623 * pt.c (lookup_template_class_1): Check start_enum return value
3624 for error_mark_node.
3626 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3628 * decl.c (duplicate_decls, typename_hash, typename_compare):
3629 Use TYPE_IDENTIFIER.
3630 * error.c (dump_type): Likewise.
3631 * mangle.c (dump_substitution_candidates): Likewise.
3633 2014-01-30 Jason Merrill <jason@redhat.com>
3636 * decl2.c (attributes_naming_typedef_ok): New.
3637 * cp-tree.h: Declare it.
3638 * decl.c (grokdeclarator): Check it.
3639 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3641 2014-01-29 Jason Merrill <jason@redhat.com>
3644 * call.c (add_builtin_candidate): Catch dependent types.
3647 * pt.c (expand_template_argument_pack): Correct
3648 non_default_args_count calculation.
3651 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3654 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3655 have a friend template in a class template.
3656 * pt.c (tsubst_friend_function): Look through it.
3657 (push_template_decl_real): A friend member template is
3660 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3663 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3666 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3669 * pt.c (instantiate_template_1): Check for error_mark_node the second
3672 2014-01-29 Jason Merrill <jason@redhat.com>
3675 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3676 cdtor_returns_this case.
3679 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3681 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3684 * semantics.c (finish_omp_reduction_clause): Check type for
3687 2014-01-28 Jason Merrill <jason@redhat.com>
3690 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3691 (tsubst_copy): Use it if lookup fails.
3694 * pt.c (tsubst_function_type): Make sure we keep the same function
3698 * semantics.c (build_anon_member_initialization): Stop walking
3699 when we run out of COMPONENT_REFs.
3702 * decl.c (lookup_and_check_tag): Ignore template parameters if
3703 scope == ts_current.
3704 * pt.c (check_template_shadow): Don't complain about the injected
3707 * decl.c (duplicate_decls): Tweak.
3710 * mangle.c (write_unqualified_name): Handle operator auto.
3712 2014-01-27 Jason Merrill <jason@redhat.com>
3716 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3717 list-initialization. A conversion to rvalue ref that involves
3718 an lvalue-rvalue conversion is bad.
3719 (convert_like_real): Give helpful error message.
3722 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3725 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3729 * pt.c (template_parm_to_arg): Call convert_from_reference.
3730 (tsubst_template_arg): Don't strip reference refs.
3733 * call.c (build_aggr_conv): Reject value-initialization of reference.
3737 * call.c (convert_like_real): Give helpful error about excess braces
3738 for ck_rvalue of scalar type.
3741 * call.c (reference_binding): Only elide braces if the single
3742 element is reference-related.
3745 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3749 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3753 * decl.c (compute_array_index_type): Don't call
3754 maybe_constant_value for a non-integral expression.
3756 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3758 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3760 * cp-gimplify.c (cp_genericize): Likewise.
3761 * decl.c (grokfndecl): Likewise.
3762 * parser.c (cp_parser_postfix_expression): Likewise.
3763 (cp_parser_postfix_open_square_expression): Likewise.
3764 (cp_parser_direct_declarator): Likewise.
3765 (is_cilkplus_vector_p): Likewise.
3766 (cp_parser_omp_clause_name): Likewise.
3767 (cp_parser_omp_all_clauses): Likewise.
3768 * pt.c (apply_late_template_attributes): Likewise.
3769 * typeck.c (cp_build_array_ref): Likewise.
3770 (cp_build_compound_expr): Likewise.
3771 (check_return_expr): Likewise.
3773 2014-01-24 Jason Merrill <jason@redhat.com>
3776 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3781 * typeck2.c (process_init_constructor_array): Don't create
3784 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3786 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3787 handling for RANGE_ARRAY case.
3789 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3792 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3794 2014-01-23 Marek Polacek <polacek@redhat.com>
3797 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3799 2014-01-23 Marek Polacek <polacek@redhat.com>
3802 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3805 2014-01-23 Jason Merrill <jason@redhat.com>
3808 * cp-tree.h (struct language_function): Add infinite_loop and
3810 (current_function_infinite_loop): New.
3811 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3812 (break_maybe_infinite_loop): New.
3813 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3814 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3815 (begin_range_for_stmt): Use them.
3816 * decl.c (finish_function): Don't warn about missing return
3817 if current_function_infinite_loop.
3818 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3819 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3821 * call.c (build_op_delete_call): Use make_tree_vector and
3822 release_tree_vector.
3824 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3827 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3828 nested_name_specifier.
3830 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3832 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3833 see if there is an attribute after function decl. If so, then
3835 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3836 enabled function late parsing.
3837 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3838 attribute for a SIMD-enabled function.
3839 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3840 the function is used by SIMD-enabled function (indicated by NULL
3841 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3842 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3843 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3844 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3845 vectorlength clause. Added a new bool parameter to differentiate
3847 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3848 (is_cilkplus_vector_p): Likewise.
3849 (cp_parser_late_parsing_elem_fn_info): Likewise.
3850 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3851 and "vectorlength" clauses when Cilk Plus is enabled.
3852 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3853 and emit a sorry message when step size is a parameter.
3854 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3855 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3857 * pt.c (apply_late_template_attributes): Likewise.
3859 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3862 * semantics.c (finish_omp_reduction_clause): Reject
3863 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3865 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3868 * parser.c (cp_parser_class_head): Push the class before parsing
3869 the base-clause, pop after it.
3871 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3873 * decl2.c (cpp_check): Revert prototype change.
3875 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3879 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3882 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3885 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3886 only when errorcount == 0.
3888 2014-01-17 Marek Polacek <polacek@redhat.com>
3891 * cvt.c (ocp_convert): Don't segfault on non-existing
3892 ENUM_UNDERLYING_TYPE.
3894 2014-01-16 Jason Merrill <jason@redhat.com>
3897 * tree.c (bot_manip): Update the location of builtin_LINE and
3900 2014-01-14 Jason Merrill <jason@redhat.com>
3903 * typeck2.c (massage_init_elt): New.
3904 (process_init_constructor_record)
3905 (process_init_constructor_union): Use it.
3906 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3907 (split_nonconstant_init_1): Handle it.
3908 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3910 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3913 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3914 and replaced an existing if-statement with else-if statement.
3915 Changed an existing error message wording to match the one from the C
3918 2014-01-08 Jason Merrill <jason@redhat.com>
3921 * class.c (abi_tag_data): Add tags field.
3922 (check_abi_tags): Initialize it.
3923 (find_abi_tags_r): Support collecting missing tags.
3924 (mark_type_abi_tags): Don't look at template args.
3925 (inherit_targ_abi_tags): New.
3926 (check_bases_and_members): Use it.
3927 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3928 * mangle.c (write_abi_tags): Check it.
3930 2014-01-07 Jason Merrill <jason@redhat.com>
3933 * pt.c (num_innermost_template_parms): New.
3934 (get_underlying_template): Use it.
3937 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3939 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3941 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3942 the letter of 20.11.6 about Base and Derived naming the same
3943 class type modulo cv-qualifiers.
3945 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3948 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3949 function as unimplemented for generic lambdas with varargs.
3952 * parser.c (cp_parser_template_parameter): Early out with
3953 error_mark_node if parameter declaration was not parsed.
3956 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3957 auto_is_implicit_function_template_parm_p around lambda body.
3960 * parser.c (cp_parser_init_declarator): Undo fully implicit
3961 template parameter list when declarator is not a function.
3963 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3966 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3968 2014-01-03 Tobias Burnus <burnus@net-b.de>
3971 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3973 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3977 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3978 as include_std to perform_koenig_lookup.
3979 (cp_parser_postfix_expression): Adjust.
3980 * pt.c (tsubst_copy_and_build): Likewise.
3981 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3982 (omp_reduction_lookup): Adjust.
3983 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3984 (lookup_arg_dependent): Likewise.
3985 (lookup_function_nonclass): Adjust.
3986 * name-lookup.h: Adjust declaration.
3987 * cp-tree.h: Likewise.
3989 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3992 * parser.c (cp_parser_userdef_numeric_literal): Mention
3993 -fext-numeric-literals in the message.
3995 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3998 * call.c (build_conditional_expr_1): Check the return value of
4001 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
4003 * call.c (convert_like_real): Check complain.
4005 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
4008 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
4011 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4013 Update copyright years
4015 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4017 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
4018 the standard form for the copyright notice.
4020 Copyright (C) 2014 Free Software Foundation, Inc.
4022 Copying and distribution of this file, with or without modification,
4023 are permitted in any medium without royalty provided the copyright
4024 notice and this notice are preserved.