1 2014-12-15 Jason Merrill <jason@redhat.com>
4 * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
6 N3778: Sized Deallocation
7 * call.c (non_placement_deallocation_fn_p): A global sized
8 operator delete is not a usual deallocation function until C++14.
9 (build_op_delete_call): Choose the global sized op delete if we
11 * cp-tree.h: Declare non_placement_deallocation_fn_p.
12 (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
13 (global_delete_fndecl): Remove.
14 * decl.c (cxx_init_decl_processing): Also declare sized op deletes.
15 (grok_op_properties): Warn about sized dealloc without the flag.
16 * init.c (build_builtin_delete_call): Remove.
17 (build_vec_delete_1, build_delete): Don't call it.
18 * decl2.c (maybe_warn_sized_delete): New.
19 (cp_write_global_declarations): Call it.
21 2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
24 * decl.c (check_array_designated_initializer): Diagnose gracefully
25 C99 designators which aren't integral constant-expressions; allow
26 constexpr user-defined type conversion operators.
28 2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
31 * semantics.c (finish_omp_reduction_clause): Early return true
32 if DECL_SAVED_TREE (id) is NULL_TREE.
34 2014-12-12 Jason Merrill <jason@redhat.com>
37 * pt.c (do_auto_deduction): In direct-init context, { x } deduces
40 * cp-tree.h (NAMESPACE_ABI_TAG): New.
41 * name-lookup.c (handle_namespace_attrs): Set it.
42 * class.c (check_tag): Split out from find_abi_tags_r.
43 (find_abi_tags_r): Also check namespace tags.
44 (mark_type_abi_tags): Also mark namespace tags.
46 2014-12-12 Kai Tietz <ktietz@redhat.com>
49 * constexpr.c (cxx_eval_loop_expr): Don't loop
50 endless on none-constant expression.
52 2014-12-12 Jason Merrill <jason@redhat.com>
55 * lambda.c (add_capture): Don't pass a dependent type to
56 variably_modified_type_p.
58 2014-12-11 Jason Merrill <jason@redhat.com>
60 Remove N3639 "array of runtime length" from -std=c++14.
61 * decl.c (compute_array_index_type): VLAs are not part of C++14.
62 (create_array_type_for_decl, grokdeclarator): Likewise.
63 * lambda.c (add_capture): Likewise.
64 * pt.c (tsubst): Likewise.
65 * rtti.c (get_tinfo_decl): Likewise.
66 * semantics.c (finish_decltype_type): Likewise.
67 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
68 (cp_build_addr_expr_1): Likewise.
69 * init.c (build_vec_init): Don't throw bad_array_length.
73 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
74 (cp_parser_primary_expression): Not here.
77 * typeck2.c (split_nonconstant_init_1): Handle arrays here.
78 (store_init_value): Not here.
79 (split_nonconstant_init): Look through TARGET_EXPR. No longer static.
80 * cp-tree.h: Declare split_nonconstant_init.
81 * call.c (set_up_extended_ref_temp): Use split_nonconstant_init.
83 2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
85 * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
88 2014-12-10 Kai Tietz <ktietz@redhat.com>
91 * parser.c (cp_parser_diagnose_invalid_type_name): Check id
92 for being an identifier before accessing it.
95 * typeck.c (lookup_destructor): Handle incomplete type.
97 2014-12-09 Jason Merrill <jason@redhat.com>
100 * decl.c (grokdeclarator): Recover from variable template
101 specialization declared as function.
104 * parser.c (cp_parser_unqualified_id): Don't declare fname while
105 parsing function parms.
107 2014-12-03 Jason Merrill <jason@redhat.com>
110 * decl.c (grok_reference_init): Complete array type.
113 * constexpr.c (cxx_eval_store_expression): Handle non-decl store
116 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com>
119 * decl.c (identify_goto): Return a bool if diagnostic is emitted.
120 (check_previous_goto_1): Consistently emit permerror + inform.
121 (check_goto): Likewise.
123 2014-12-03 Richard Biener <rguenther@suse.de>
125 * constexpr.c (cxx_eval_builtin_function_call): Use
126 fold_build_call_array_loc.
128 2014-12-02 Marek Polacek <polacek@redhat.com>
130 * constexpr.c (cxx_eval_check_shift_p): New function.
131 (cxx_eval_binary_expression): Call it. Set NON_CONSTANT_P if it
134 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
137 * decl.c (reshape_init_r): Do not reject value-initialization of
138 scalar array element.
140 2014-12-01 Marek Polacek <polacek@redhat.com>
143 * constexpr.c: Include ubsan.h.
144 (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
145 internal functions and for ubsan builtins.
146 * error.c: Include internal-fn.h.
147 (dump_expr): Add printing of internal functions.
149 2014-12-01 Marek Polacek <polacek@redhat.com>
151 * constexpr.c (literal_type_p): Return true for void type in C++14.
153 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
156 * typeck.c (finish_class_member_access_expr): Use %q#T instead of
157 %qD in error message.
159 2014-11-29 Jakub Jelinek <jakub@redhat.com>
161 * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
162 from create_tmp_var calls.
164 2014-11-28 Marek Polacek <polacek@redhat.com>
167 * typeck.c (cp_build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
168 convert the right operand to integer type.
170 2014-11-27 Kai Tietz <ktietz@redhat.com>
173 * constexpr.c (cxx_eval_vec_init_1): Avoid
176 2014-11-26 Jason Merrill <jason@redhat.com>
178 Allow partial specialization of variable templates.
179 * cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
180 * decl.c (duplicate_decls): Copy it.
181 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
182 * parser.c (cp_parser_decltype_expr): Do call finish_id_expression
184 * pt.c (register_specialization): Remember variable template insts.
185 (instantiate_template_1): Find the matching partial specialization.
186 (check_explicit_specialization): Allow variable partial specialization.
187 (process_partial_specialization): Likewise.
188 (push_template_decl_real): Likewise.
189 (more_specialized_partial_spec): Rename from more_specialized_class.
190 (most_specialized_partial_spec): Rename from most_specialized_class.
191 (get_partial_spec_bindings): Rename from get_class_bindings.
193 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
196 * call.c (standard_conversion): Do not require expr to be non-null
197 when NULLPTR_TYPE_P (from) is true.
199 2014-11-26 Jason Merrill <jason@redhat.com>
201 * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
204 * constexpr.c (cxx_eval_call_expression): Don't talk about
205 flowing off the end if we're already non-constant.
207 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
209 Diagnose string constant conversion to char* in c++11 and above
210 as forbidden, not deprecated.
211 * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
212 change the diagnostic for the Wwrite-strings case for c++11 and above.
214 2014-11-24 Jason Merrill <jason@redhat.com>
216 * pt.c (lookup_template_variable): Always unknown_type_node.
218 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
221 * parser.c (cp_parser_label_for_labeled_statement): Check the case
222 with check_for_bare_parameter_packs.
224 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
225 Paolo Carlini <paolo.carlini@oracle.com>
228 * decl.c (initialize_local_var): Add -Winit-self warning for
229 references initialized with themselves.
231 2014-11-24 Jason Merrill <jason@redhat.com>
234 * mangle.c (mangle_decl): If we aren't going to create a symbol
235 alias, don't build the alias DECL either.
237 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
240 * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
242 2014-11-21 Jason Merrill <jason@redhat.com>
246 * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
247 if the temporary has a non-trivial destructor.
248 * decl.c (poplevel): Don't look through references.
251 * name-lookup.c (supplement_binding_1): Override a mangling alias.
252 * mangle.c (maybe_remove_implicit_alias): New.
253 (mangle_decl): Always avoid creating conflicting alias.
257 * mangle.c (decl_mangling_context): Use template_type_parameter_p.
260 * pt.c (uses_template_parms): Handle null argument.
262 2014-11-21 Jakub Jelinek <jakub@redhat.com>
265 * typeck.c (cp_build_array_ref): Adjust
266 convert_vector_to_pointer_for_subscript caller. If it returns true,
267 call non_lvalue_loc on the result.
269 2014-11-20 Jason Merrill <jason@redhat.com>
272 * pt.c (convert_nontype_argument): Call convert_from_reference.
273 (check_instantiated_arg): Don't be confused by reference refs.
274 (unify): Look through reference refs on the arg, too.
275 * mangle.c (write_template_arg): Look through reference refs.
277 * error.c (dump_expr): Avoid printing (*&i) for references.
279 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
282 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
284 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
286 * cp-objcp-common.c: Use hash_table instead of htab.
288 2014-11-19 Jason Merrill <jason@redhat.com>
291 * cp-tree.h (struct processing_template_decl_sentinel): New.
292 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
293 (instantiate_non_dependent_expr_sfinae): Here.
294 (convert_nontype_argument): Use them.
295 * constexpr.c (fold_non_dependent_expr): Use them.
298 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
299 complain yet about a reference.
300 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
301 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
302 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
303 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
306 * init.c (decl_really_constant_value): Rename from
307 integral_constant_value.
308 (scalar_constant_value): Similar but limited to scalar results.
309 (decl_constant_value_safe): Remove.
310 (constant_value_1): Respect return_aggregate_cst_ok_p.
311 * typeck.c (decay_conversion): Use scalar_constant_value.
312 * call.c (convert_like_real): Likewise.
313 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
314 * typeck.c (decay_conversion): Or ARRAY_TYPE.
315 * constexpr.c (struct constexpr_ctx): Add strict field.
316 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
317 decl_constant_value and decl_really_constant_value.
318 (cxx_eval_outermost_constant_expr): Add strict parm.
319 (maybe_constant_init): Not strict.
320 (potential_constant_expression_1): Add strict parm.
321 Shorten most internal calls with RECUR macro.
322 * cp-tree.h, pt.c, semantics.c: Adjust.
324 2014-11-19 Jason Merrill <jason@redhat.com>
327 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
329 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
332 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
333 and __PRETTY_FUNCTION__.
335 2014-11-18 Jason Merrill <jason@redhat.com>
338 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
339 from a variable of empty class type is constant.
341 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
342 (potential_constant_expression_1): Handle STMT_EXPR.
344 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
346 (lots): Omit NULL jump_target arguments.
348 * constexpr.c (struct constexpr_ctx): Add quiet field.
349 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
350 (lots): Replace allow_non_constant parameter with ctx->quiet.
353 * constexpr.c (cxx_eval_binary_expression): Don't assume the
354 expression was already folded.
355 (cxx_eval_unary_expression): Likewise.
357 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
360 * rtti.c (emit_support_tinfos): Handle __float128.
362 2014-11-18 Jason Merrill <jason@redhat.com>
365 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
368 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
369 rather than VOID_TYPE_P.
371 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
374 * typeck2.c (store_init_value): Set it.
375 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
376 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
378 2014-11-17 Jason Merrill <jason@redhat.com>
381 * call.c (build_call_a): Don't warn_deprecated_use here.
382 (build_over_call): Or here.
383 * decl2.c (mark_used): Do it here.
384 (is_late_template_attribute): Attribute deprecated is not deferred.
385 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
386 * parser.c (cp_parser_template_name): Warn about deprecated template.
387 (cp_parser_template_argument): Likewise.
390 * decl.c (cp_finish_decl): Don't try to process a non-dependent
391 constant initializer for a reference.
392 * pt.c (value_dependent_expression_p): A reference is always
394 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
397 Handle C++14 constexpr flow control.
398 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
399 (cxx_eval_statement_list): New.
400 (cxx_eval_constant_expression): Handle LABEL_EXPR,
401 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
402 semantics of RETURN_EXPR.
403 (many functions): Add jump_target parameter.
404 (returns, breaks, continues, switches, label_matches): New.
405 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
406 * cp-gimplify.c (begin_bc_block): Set them.
408 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
409 (genericize_for_stmt): Handle null statement-list.
411 * constexpr.c (use_new_call): Always use new call handling.
413 C++14 constexpr support (minus loops and multiple returns)
414 * constexpr.c (use_new_call): New macro.
415 (build_data_member_initialization): Ignore non-mem-inits.
416 (check_constexpr_bind_expr_vars): Remove C++14 checks.
417 (constexpr_fn_retval): Likewise.
418 (check_constexpr_ctor_body): Do nothing in C++14.
419 (massage_constexpr_body): In C++14 only collect mem-inits.
420 (get_function_named_in_call): Handle null CALL_EXPR_FN.
421 (cxx_bind_parameters_in_call): Build bindings in same order as
422 parameters. Don't treat iniviref parms specially in new call mode.
423 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
424 based on DECL_SAVED_TREE rather than the massaged constexpr body.
425 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
426 (is_sub_constant_expr): Don't mess with ctx.ctor here.
427 (cxx_eval_component_reference): A null element means we're mid-
429 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
430 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
431 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
432 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
433 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
434 constexpr functions. In new-call mode find parms in the values table.
435 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
436 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
437 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
438 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
439 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
440 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
441 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
442 SWITCH_STMT, ASM_EXPR.
443 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
444 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
445 caller wants an lvalue.
446 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
447 (maybe_constant_init): Look through INIT_EXPR.
448 (ensure_literal_type_for_constexpr_object): Set
449 cp_function_chain->invalid_constexpr.
450 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
451 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
452 (check_for_uninitialized_const_var): Likewise.
453 (maybe_save_function_definition): Check it.
454 * parser.c (cp_parser_jump_statement): Set
455 cp_function_chain->invalid_constexpr.
456 (cp_parser_asm_definition): Likewise.
459 * decl.c (build_ptrmemfunc_type): Don't build a different
460 RECORD_TYPE for a qualified PMF.
461 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
462 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
463 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
464 * tree.c (cp_walk_subtrees): Likewise.
465 (cp_build_qualified_type_real): Remove special PMF handling.
467 2014-11-15 Jason Merrill <jason@redhat.com>
469 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
472 * constexpr.c (cxx_eval_builtin_function_call): Use
473 fold_builtin_call_array.
475 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
477 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
479 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
480 * parser.c (cp_parser_omp_clause_collapse): Likewise.
481 (cp_parser_enumerator_definition): Don't call
482 instantiate_non_dependent_expr...
483 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
484 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
485 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
486 the final gcc_assert.
488 * constexpr.c (fold_non_dependent_expr): Add.
489 * cp-tree.h (fold_non_dependent_expr): Declare it.
490 * call.c (null_ptr_cst_p): Use it.
491 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
492 * semantics.c (begin_maybe_infinite_loop): Likewise.
493 * typeck.c (cp_build_binary_op): Likewise.
494 * typeck2.c (check_narrowing): Likewise.
496 * pt.c (fold_non_dependent_expr): Rename to
497 instantiate_non_dependent_expr.
498 (fold_non_dependent_expr_sfinae): Rename to
499 instantiate_non_dependent_expr_sfinae.
500 (convert_nontype_argument, build_non_dependent_expr): Adjust.
501 * decl.c (compute_array_index_type): Likewise.
502 * parser.c (cp_parser_parenthesized_expression_list,
503 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
505 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
507 * typeck.c (cxx_alignas_expr): Likewise.
508 * typeck2.c (store_init_value, massage_init_elt): Likewise.
509 * call.c: Adjust comments.
511 * constexpr.c: Likewise.
515 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
517 * mangle.c (find_substitution): Look for abi_tag on class templates.
519 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
520 Thomas Schwinge <thomas@codesourcery.com>
521 Ilya Verbin <ilya.verbin@intel.com>
522 Andrey Turetskiy <andrey.turetskiy@intel.com>
524 * Make-lang.in (c++.install-common): Do not install for the offload
527 2014-11-13 Kai Tietz <ktietz@redhat.com>
529 * cp-tree.h (cp_build_function_call): Remove prototype.
530 (cp_build_addr_expr_strict): Likewise.
531 (build_typed_address): Likewise.
532 * typeck.c (build_typed_address): Removed.
533 (cp_build_addr_expr_strict): Make static.
534 (cp_build_function_call): Likewise.
536 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
540 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
541 * decl.c (grokdeclarator): Use it.
542 * parser.c (cp_parser_simple_type_specifier): Likewise.
543 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
545 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
548 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
549 constant the condition.
551 2014-11-10 Andi Kleen <ak@linux.intel.com>
553 * semantics.c (finish_goto_stmt): Call check_no_cilk.
554 (finish_while_stmt_cond): Dito.
555 (finish_do_stmt): Dito.
556 (finish_for_cond): Dito.
557 (finish_switch_cond): Dito.
559 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
561 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
562 OPT_Wshift_count_overflow in the warnings.
564 2014-11-09 Jason Merrill <jason@redhat.com>
567 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
568 same scalar type is an rvalue.
571 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
573 2014-11-07 Jason Merrill <jason@redhat.com>
576 * pt.c (dependent_alias_template_spec_p): New.
577 (dependent_type_p_r): Handle dependent alias template specialization.
578 (template_args_equal): A dependent alias template specializations
579 is not equal to its underlying type as a template argument.
580 * tree.c (strip_typedefs): Don't strip a dependent alias
583 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
584 (cp_parser_primary_expression): Not here.
586 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
589 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
591 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
593 * constexpr.c: Remove redundant enum from machine_mode.
595 2014-10-28 Jason Merrill <jason@redhat.com>
597 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
599 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
601 * call.c: Adjust include files.
610 * semantics.c: Ditto.
612 * vtable-class-hierarchy.c: Ditto.
614 2014-10-24 Jason Merrill <jason@redhat.com>
616 Implement N3653 (Member initializers and aggregates) and fix
617 references to 'this' in constexpr constructors.
618 * class.c (check_field_decls): In C++14 an NSDMI does not make the
620 * constexpr.c (struct constexpr_ctx): New.
621 (cxx_bind_parameters_in_call): Handle 'this'.
622 (cxx_eval_call_expression): Create new constexpr_ctx.
623 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
624 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
625 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
626 (cxx_eval_vec_init_1): Likewise.
627 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
628 [TARGET_EXPR]: Build new constexpr_ctx.
629 [PLACEHOLDER_EXPR]: New.
630 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
632 (is_sub_constant_expr): Build new constexpr_ctx.
633 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
635 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
636 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
637 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
638 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
639 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
640 (build_ctor_subob_ref, replace_placeholders): New.
641 * typeck2.c (store_init_value): Use replace_placeholders.
642 (process_init_constructor_record): Make zero-init before NSDMI
645 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
647 * cp-gimplify.c: Adjust include files.
649 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
652 * cp-objcp-common.c: Do not include new.
653 (cxx_initialize_diagnostics): Move from here to ...
654 * error.c (cxx_initialize_diagnostics): : ... here. Move
655 diagnostics initialization here from init_error.
656 (cxx_pp): Use a real pointer not a macro.
657 (init_error): Just initialize cxx_pp.
658 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
659 not set maximum line length.
661 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
664 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
666 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
668 * parser.c (cp_parser_unary_expression): Add default arguments.
669 (cp_parser_cast_expression, cp_parser_sizeof_operand,
670 cp_parser_omp_atomic): Adjust.
672 2014-10-20 Jason Merrill <jason@redhat.com>
675 * lambda.c (current_nonlambda_function): New.
676 * semantics.c (finish_this_expr): Use it.
677 * cp-tree.h: Declare it.
679 2014-10-17 Alan Modra <amodra@gmail.com>
682 * decl.c (merge_decls): Don't merge section name, comdat group or
683 tls model to newdecl symtab node, instead merge to olddecl.
684 Override existing olddecl section name. Set tls_model for all
685 thread-local vars, not just OMP thread-private ones. Remove
688 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
690 * cp-tree.h: Adjust include files.
692 2014-10-15 Jason Merrill <jason@redhat.com>
695 * pt.c (lookup_template_variable): Call coerce_template_parms.
697 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
699 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
700 ensure_literal_type_for_constexpr_object,
701 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
702 retrieve_constexpr_fundef, is_valid_constexpr_fn,
703 build_anon_member_initialization, build_data_member_initialization,
704 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
705 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
706 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
707 massage_constexpr_body, cx_check_missing_mem_inits,
708 register_constexpr_fundef, explain_invalid_constexpr_fn,
709 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
710 maybe_initialize_constexpr_call_table, get_function_named_in_call,
711 get_nth_callarg, lookup_parameter_binding,
712 cxx_eval_builtin_function_call, adjust_temp_type,
713 cxx_bind_parameters_in_call, push_cx_call_context,
714 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
715 reduced_constant_expression_p, verify_constant,
716 cxx_eval_unary_expression, cxx_eval_binary_expression,
717 cxx_eval_conditional_expression, cxx_eval_array_reference,
718 cxx_eval_component_reference, cxx_eval_bit_field_ref,
719 cxx_eval_logical_expression, base_field_constructor_elt,
720 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
721 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
722 cxx_eval_trinary_expression, var_in_constexpr_fn,
723 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
724 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
725 maybe_constant_init, potential_constant_expression_1,
726 potential_constant_expression, potential_rvalue_constant_expression,
727 require_potential_constant_expression,
728 require_potential_rvalue_constant_expression): Moved definitions...
729 * constexpr.c: ... here, new file.
730 * Make-lang.in: Update.
731 * config-lang.in: Likewise.
733 2014-10-14 Jason Merrill <jason@redhat.com>
736 * parser.c (struct saved_token_sentinel): New.
737 (cp_parser_statement): Use it.
738 (cp_parser_start_tentative_firewall): New.
739 (cp_parser_end_tentative_firewall): New.
740 (cp_parser_lambda_expression): Use them.
741 (cp_parser_statement_expr): New.
742 (cp_parser_primary_expression): Use it.
744 2014-10-14 DJ Delorie <dj@redhat.com>
746 * typeck.c (cp_common_type): Check for all __intN types, not just
748 * decl.c (grokdeclarator): Likewise.
749 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
751 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
752 for all __intN types, not just __int128.
753 (cp_parser_simple_type_specifier): Likewise.
754 * mangle.c (integer_type_codes): Remove int128-specific codes.
755 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
756 __intN was specified.
757 * lex.c (init_reswords): Reserve all __intN keywords.
759 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
761 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
763 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
765 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
767 (print_template_statistics): Cast size and elements to long.
769 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
771 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
772 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
775 2014-10-10 Jason Merrill <jason@redhat.com>
778 * class.c (build_base_path): Preserve rvalueness.
779 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
780 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
783 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
785 * method.c (implicitly_declare_fn): Handle deleted lambda default
786 ctor and copy assop here.
787 * class.c (check_bases_and_members): Not here.
788 (add_implicitly_declared_members): And don't set
789 CLASSTYPE_LAZY_MOVE_ASSIGN.
791 * semantics.c (finish_id_expression): Check for error_mark_node.
793 2014-10-09 Jason Merrill <jason@redhat.com>
796 * semantics.c (outer_var_p): Non-static.
797 (process_outer_var_ref): Split out from finish_id_expression.
798 * pt.c (tsubst_copy_and_build): Call them.
799 * cp-tree.h: Declare them.
801 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
803 * semantics.c (check_constexpr_ctor_body_1): New.
804 (check_constexpr_ctor_body): Use it; add bool parameter.
805 (build_data_member_initialization): Handle BIND_EXPR and
806 USING_STMT in the main conditional.
807 (build_constexpr_constructor_member_initializers): Do not
808 handle BIND_EXPR here.
809 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
810 (massage_constexpr_body): Don't do it here.
811 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
812 Adjust check_constexpr_ctor_body call.
813 (cp_parser_compound_statement): Do not pedwarn for compound-statement
814 in constexpr function in C++14 mode.
815 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
817 2014-10-09 Jason Merrill <jason@redhat.com>
820 * parser.c (cp_parser_class_head): push_template_decl for members
824 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
825 (iterative_hash_template_arg): Likewise.
828 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
829 * semantics.c (force_paren_expr): And set it.
830 * typeck.c (check_return_expr): And handle it.
832 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
834 * decl.c (grokdeclarator): constexpr only implies const in C++11.
836 2014-10-08 Jason Merrill <jason@redhat.com>
839 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
842 * tree.c (build_cplus_array_type): Look for a type with no
843 typedef-name or attributes.
845 * call.c (call_copy_ctor): New.
846 (build_over_call): Use it to avoid infinite recursion on invalid code.
848 2014-10-07 Jason Merrill <jason@redhat.com>
850 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
852 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
854 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
856 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
859 * semantics.c (check_constexpr_bind_expr_vars): New.
860 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
861 (build_constexpr_constructor_member_initializers): Handle
862 BIND_EXPR in the main conditional.
864 2014-10-02 Mark Wielaard <mjw@redhat.com>
867 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
868 (cp_function_decl_deleted_p): New prototype.
869 * cp-objcp-common.c (cp_function_deleted_p): New function.
871 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
876 * typeck.c (cp_build_binary_op): save_expr after convert to save
877 redundant operations.
878 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
879 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
881 2014-10-03 Jason Merrill <jason@redhat.com>
883 * decl.c (start_decl): Complain about static/thread_local vars
884 in constexpr function.
885 (check_for_uninitialized_const_var): Also uninitialized vars.
886 * parser.c (cp_parser_jump_statement): And gotos.
887 (cp_parser_asm_operand_list): And asm.
888 (cp_parser_try_block): And try.
889 * semantics.c (ensure_literal_type_for_constexpr_object): And
892 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
893 (var_in_constexpr_fn): New.
894 (cxx_eval_constant_expression): Look into DECL_INITIAL.
895 (potential_constant_expression_1): Allow constexpr-local vars.
898 * tree.c (strip_typedefs): Handle TREE_LIST.
900 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
902 * parser.c (cp_parser_assignment_expression,
903 cp_parser_constant_expression): Add default arguments.
904 (cp_parser_primary_expression,
905 cp_parser_postfix_open_square_expression,
906 cp_parser_parenthesized_expression_list,
907 cp_parser_question_colon_clause,
908 cp_parser_expression, cp_parser_constant_expression,
909 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
910 cp_parser_template_argument, cp_parser_enumerator_definition,
911 cp_parser_member_declaration, cp_parser_constant_initializer,
912 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
913 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
914 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
915 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
916 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
917 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
918 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
920 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
923 * cp-tree.h (struct saved_scope): Add noexcept_operand.
924 (cp_noexcept_operand): Define.
925 * call.c (build_over_call): Use it.
926 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
927 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
929 2014-10-01 Jason Merrill <jason@redhat.com>
932 * method.c (constructible_expr): Handle value-init of non-class.
933 * parser.c (cp_parser_trait_expr): Allow pack expansion.
934 * pt.c (tsubst_copy_and_build): Handle pack expansion.
937 * class.c (type_has_non_user_provided_default_constructor): Rename
938 from type_has_user_provided_default_constructor, reverse sense.
939 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
940 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
941 * call.c (build_new_method_call_1): Adjust.
943 * decl.c (grok_special_member_properties): Don't set
944 TYPE_HAS_COMPLEX_DFLT.
945 * init.c (build_value_init_noctor): Don't use
946 type_has_user_provided_default_constructor.
948 2014-09-30 Jason Merrill <jason@redhat.com>
950 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
951 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
952 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
953 * parser.c (cp_parser_primary_expression): Likewise.
954 (cp_parser_trait_expr): Likewise. Handle variadic trait.
955 * semantics.c (trait_expr_value): Likewise.
956 (finish_trait_expr): Likewise.
957 (check_trait_type): Handle variadic trait. Return bool.
958 * method.c (build_stub_object): Add rvalue reference here.
959 (locate_fn_flags): Not here.
960 (check_nontriv, assignable_expr, constructible_expr): New.
961 (is_trivially_xible): New.
963 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
964 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
965 * parser.c (cp_parser_primary_expression): Likewise.
966 (cp_parser_trait_expr): Likewise.
967 * semantics.c (trait_expr_value): Likewise.
968 (finish_trait_expr): Likewise.
970 * method.c (build_stub_object): Use CONVERT_EXPR.
971 * tree.c (build_dummy_object): Likewise.
972 (is_dummy_object): Adjust.
974 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
975 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
976 * semantics.c (trait_expr_value): Likewise.
977 (finish_trait_expr): Likewise.
978 * parser.c (cp_parser_primary_expression): Likewise.
979 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
981 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
984 * error.c (print_instantiation_context): Delete.
985 * typeck2.c (build_x_arrow): Record location when pushing
986 template instantiation.
987 * pt.c (push_tinst_level): Make it a wrapper around ...
988 (push_tinst_level_loc): ... this. New function. Make excessive
989 template instantiation depth a fatal error. Record location. Use
991 (instantiate_pending_templates): Make excessive
992 template instantiation depth a fatal error.
993 (problematic_instantiation_changed): Use bool as return type.
994 * cp-tree.h (print_instantiation_context): Delete.
995 (push_tinst_level): Update declaration.
996 (problematic_instantiation_changed): Likewise.
997 (push_tinst_level_loc): New.
999 2014-09-29 Richard Biener <rguenther@suse.de>
1001 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
1004 2014-09-26 Jason Merrill <jason@redhat.com>
1006 * mangle.c (find_substitution): Use write_abi_tags.
1008 2014-09-25 Marek Polacek <polacek@redhat.com>
1011 * class.c (warn_hidden): Check for FUNCTION_DECL.
1013 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1016 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
1017 on low_bound and length.
1019 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1021 * class.c, decl.c, optimize.c: Rename all instances of
1022 DECL_ABSTRACT to DECL_ABSTRACT_P.
1024 2014-09-24 Marek Polacek <polacek@redhat.com>
1028 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
1029 * tree.c (bot_manip): Add default case.
1030 * parser.c (cp_parser_primary_expression): Cast the controlling
1031 expression of a switch to an int.
1032 (cp_parser_unqualified_id): Likewise.
1034 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
1037 * parser.c (cp_parser_skip_to_closing_square_bracket,
1038 cp_parser_array_designator_p): New.
1039 (cp_parser_initializer_list): Use the latter.
1041 2014-09-22 Jason Merrill <jason@redhat.com>
1043 * semantics.c (finish_non_static_data_member): In diagnostic, give
1044 error at point of use and note at point of declaration.
1049 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
1052 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
1055 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
1057 2014-09-22 Jason Merrill <jason@redhat.com>
1059 * decl.c (poplevel): Don't warn about unused vars in template scope.
1060 * error.c (dump_decl): Handle variable templates.
1062 2014-09-20 Jason Merrill <jason@redhat.com>
1065 * decl.c (begin_destructor_body): Only clobber the as-base part of
1068 2014-09-19 Jason Merrill <jason@redhat.com>
1071 * mangle.c (write_expression): Use unresolved-name mangling for
1075 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
1076 after pulling out an element from a CONSTRUCTOR.
1078 2014-09-18 Jakub Jelinek <jakub@redhat.com>
1081 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
1082 on type of type dependent expressions, and don't call it if
1083 handle_omp_array_sections has kept TREE_LIST because something
1085 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
1086 Use keep_next_level, begin_omp_structured_block and
1087 finish_omp_structured_block instead of push_stmt_list and
1090 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1093 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
1094 for final class types.
1096 2014-09-15 Jason Merrill <jason@redhat.com>
1098 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
1099 necessary. Call inherit_targ_abi_tags here.
1100 * class.c (check_bases_and_members): Not here.
1101 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
1102 * cp-tree.h: Declare inherit_targ_abi_tags.
1104 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1106 Do not diagnose lambda default arguments in c++14 modes.
1107 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
1110 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1112 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
1115 2014-09-13 Marek Polacek <polacek@redhat.com>
1118 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
1119 location of a call expression.
1121 2014-09-11 Jason Merrill <jason@redhat.com>
1124 * decl.c (start_decl): Handle specialization of member variable
1126 * pt.c (check_explicit_specialization): Adjust error.
1128 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
1131 * typeck2.c (process_init_constructor_record): Do not warn about
1132 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
1134 2014-09-11 Jason Merrill <jason@redhat.com>
1137 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
1138 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
1140 2014-09-10 Jason Merrill <jason@redhat.com>
1143 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
1144 (duplicate_decls, start_decl): Likewise.
1145 * pt.c (check_explicit_specialization): Likewise.
1146 (push_template_decl_real): Or static templates.
1148 2014-09-08 Jason Merrill <jason@redhat.com>
1150 * typeck.c (build_class_member_access_expr): Move
1151 -Winvalid-offsetof code...
1152 * semantics.c (finish_offsetof): ...here.
1153 * parser.c (cp_parser_builtin_offsetof): Remember the location of
1155 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
1158 * pt.c (instantiate_decl): Handle recursive instantiation of
1161 2014-09-05 Jason Merrill <jason@redhat.com>
1164 * semantics.c (potential_constant_expression_1): Handle un-folded
1165 pointer to member constants.
1167 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
1170 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
1171 newdecl, not olddecl.
1173 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1176 * class.c (check_field_decls): A class of literal type cannot have
1177 volatile non-static data members and base classes.
1178 (explain_non_literal_class): Update.
1180 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1181 Balaji V. Iyer <balaji.v.iyer@intel.com>
1182 Igor Zamyatin <igor.zamyatin@intel.com>
1184 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
1186 * parser.c (cp_parser_cilk_for): New function.
1187 (cp_parser_cilk_grainsize): Likewise.
1188 (cp_parser_statement): Added RID_CILK_FOR case.
1189 (cp_parser_omp_for_cond): Added CILK_FOR check.
1190 (cp_parser_omp_for_loop_init): Change function argument to accept
1191 tree_code instead just a bool flag; change the check to use that
1192 tree_code; check for initialization declaration in case of Cilk_for.
1193 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
1194 changed call to cp_parser_omp_for_loop_init according new arguments'
1196 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1197 * pt.c (tsubst_expr): Added CILK_FOR case.
1198 * semantics.c: Include convert.h.
1199 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
1200 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
1201 (handle_omp_for_class_iterator): New argument lastp and its usage;
1203 (finish_omp_for): Changed call to handle_omp_for_class_iterator
1204 according new arguments' list; in case of Cilk_for save very first
1205 decl and create empty stmt_list block; use block to build correct
1208 2014-08-31 Jason Merrill <jason@redhat.com>
1211 * optimize.c (cdtor_comdat_group): Just look at the
1212 DECL_ASSEMBLER_NAME of the 'tors.
1214 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1217 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
1218 result of cxx_eval_constant_expression.
1220 2014-08-26 Jason Merrill <jason@redhat.com>
1223 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
1224 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
1225 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
1228 2014-08-25 Jason Merrill <jason@redhat.com>
1230 * pt.c (check_explicit_specialization): Don't complain about
1231 non-template variable.
1232 (template_for_substitution): Allow variable templates.
1233 (check_template_variable): Fix logic for member var template.
1234 * decl.c (start_decl): Don't complain about extra template header
1237 * decl.c (start_decl): Look through member variable template.
1238 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
1239 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
1242 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
1245 * cp-tree.h (TFF_POINTER): Add.
1246 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1248 * error.c (dump_type_suffix): Actually print the const and noreturn
1249 attribute when appropriate.
1251 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1253 * decl.c (compute_array_index_type, grokdeclarator,
1254 undeduced_auto_decl): Change from cxx1y to cxx14.
1255 *lambda.c(add_capture()): Change error message from C++1y to C++14.
1256 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1257 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1258 cp_parser_decltype, cp_parser_conversion_type_id,
1259 cp_parser_simple_type_specifier, cp_parser_type_id_1,
1260 cp_parser_template_type_arg, cp_parser_std_attribute,
1261 cp_parser_template_declaration_after_export): Ditto.
1262 * pt.c (tsubst): Ditto.
1263 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1264 * tree.c: Change comment.
1265 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1266 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1268 2014-08-23 Jason Merrill <jason@redhat.com>
1270 Allow non-constexpr variable templates.
1271 * decl2.c (note_variable_template_instantiation): New.
1272 * cp-tree.h: Declare it.
1273 * pt.c (instantiate_decl): Call it.
1274 (push_template_decl_real): Allow non-constexpr variable templates.
1275 * semantics.c (finish_id_expression): Mark the variable template
1276 instantiation as used.
1277 * mangle.c (write_mangled_name): Variable template instantiations
1279 * parser.c (cp_parser_init_declarator): Complain about
1280 non-function implicit templates.
1282 2014-08-22 Marek Polacek <polacek@redhat.com>
1285 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1286 preceded with logical not. Adjust call to
1287 warn_logical_not_parentheses.
1289 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1292 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1293 declaration shadows a function declaration, unless the former
1294 declares a function, pointer to function or pointer to member
1295 function, because this is a common and valid case in real-world
1297 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1298 Improve description.
1300 2014-08-22 Jason Merrill <jason@redhat.com>
1303 * class.c (outermost_open_class): Fix logic.
1304 * decl.c (complete_vars): Fix logic.
1306 2014-08-22 Jason Merrill <jason@redhat.com>
1309 * class.c (outermost_open_class): New.
1310 * cp-tree.h: Declare it.
1311 * decl.c (maybe_register_incomplete_var): Use it.
1312 (complete_vars): Handle any constant variable.
1313 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1315 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1318 * cp-array-notation.c (build_array_notation_ref): Added correct
1319 handling of case with incorrect array.
1321 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1324 * error.c (cp_diagnostic_finalizer): Delete.
1325 (init_error): Do not set diagnostic_finalizer here.
1327 2014-08-19 Marek Polacek <polacek@redhat.com>
1330 * call.c (build_new_op_1): Remember the type of arguments for
1331 a comparison. If either operand of a comparison is a boolean
1332 expression, call maybe_warn_bool_compare.
1334 2014-08-19 Jason Merrill <jason@redhat.com>
1336 PR tree-optimization/62091
1337 * decl2.c (decl_needed_p): Return true for virtual functions when
1342 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1345 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1347 * class.c (contains_empty_class_p): Remove.
1349 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1351 * parser.c (cp_parser_expression): Add default arguments.
1352 (cp_parser_primary_expression, cp_parser_postfix_expression,
1353 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1354 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1355 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1356 cp_parser_lambda_body, cp_parser_expression_statement,
1357 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1358 cp_parser_iteration_statement, cp_parser_jump_statement,
1359 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1360 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1361 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1362 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1363 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1364 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1365 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1366 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1367 cp_parser_transaction_expression): Adjust.
1369 2014-08-15 Jason Merrill <jason@redhat.com>
1372 * pt.c (lookup_template_class_1): Revert recent change.
1373 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1376 * pt.c (instantiate_class_template_1): Ignore lambda on
1377 CLASSTYPE_DECL_LIST.
1378 (push_template_decl_real): A lambda is not primary.
1379 (lookup_template_class_1): Don't look for a lambda partial
1381 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1382 currently in a function and the lambda living in a function.
1383 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1385 2014-08-15 Richard Biener <rguenther@suse.de>
1386 Jason Merrill <jason@redhat.com>
1389 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1390 (build_cplus_array_type): ...from here. Only call build_array_type
1393 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1397 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1401 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1402 cv-qualifiers of function types.
1404 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1406 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1408 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1410 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1411 cp_build_array_ref, cp_build_function_call_vec): When a
1412 pedwarn is suppressed under SFINAE, return error_mark_node.
1414 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1415 tf_warning_or_error, where complain is a bool, glitch.
1417 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1420 * decl.c (grokdeclarator): Move the check for friend initializers..
1421 * decl2.c (grokfield) ..here. Postpone early return for friends
1422 until after the initializer check.
1424 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1427 * pt.c (coerce_template_parms): Improve error message vs default
1430 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1432 * parser.c (cp_parser_init_declarator): Remove redundant check of
1433 decl_specifiers->type.
1435 2014-08-13 Jason Merrill <jason@redhat.com>
1437 * call.c (build_x_va_arg): Support passing non-POD through ....
1438 (convert_arg_to_ellipsis): Likewise.
1440 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1442 * pt.c (lookup_template_variable): Make dependent variable templates
1445 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1447 * parser.c (cp_parser_elaborated_type_specifier): Handle
1448 specially cp_parser_template_id returning a BASELINK.
1450 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1452 * parser.c (cp_parser_diagnose_invalid_type_name,
1453 cp_parser_make_typename_type): Remove scope parameter.
1454 (cp_parser_parse_and_diagnose_invalid_type_name,
1455 cp_parser_elaborated_type_specifier): Adjust calls.
1457 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1459 Reject virt-specifiers on friends and member templates
1460 * friend.c (do_friend): Diagnose virt-specifiers.
1461 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1463 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1465 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1466 return type to bool; in C++11 for constants give errors, not pedwarns.
1467 * cp-tree.h (check_narrowing): Adjust declaration.
1468 * call.c (convert_like_real): Update calls.
1469 * semantics.c (finish_compound_literal): Likewise.
1471 2014-08-08 Jason Merrill <jason@redhat.com>
1473 * pt.c (lookup_template_class_1): Copy abi_tag.
1475 2014-08-08 Kai Tietz <ktietz@redhat.com>
1477 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1478 that we operate on a true inline.
1480 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1482 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1483 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1485 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1488 * decl.c (build_enumerator): Handle class types with conversion
1489 operators via perform_implicit_conversion_flags and
1490 build_expr_type_conversion.
1492 * cvt.c (build_expr_type_conversion): Replace pair of errors
1493 with error + inform.
1495 2014-08-07 Jason Merrill <jason@redhat.com>
1498 * parser.c (c_parse_file): Change sorry to fatal_error.
1501 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1503 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1505 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1507 2014-08-06 Jason Merrill <jason@redhat.com>
1509 * init.c (build_vec_init): Fix constant initialization of
1511 (build_value_init_noctor): Call maybe_constant_init.
1512 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1516 * init.c (build_vec_init): Reorganize earlier change a bit.
1519 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1520 if we're just returning an INIT_EXPR.
1522 2014-08-06 Jason Merrill <jason@redhat.com>
1523 Braden Obrzut <admin@maniacsvault.net>
1525 * pt.c (check_explicit_specialization): Don't test
1526 DECL_DECLARED_INLINE_P for a variable template.
1528 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1531 * typeck.c (cp_build_binary_op): Extend to more cases the
1534 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1536 Implement constexpr variable templates
1537 * decl.c (grokvardecl): Handle specializations of variable templates.
1538 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1539 return from grokvardecl.
1540 * decl2.c (check_member_template): Allow declaration of template member
1542 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1544 * pt.c (check_template_variable): Accept variable temploids at
1546 (push_template_decl_real): The current instantiation of a template
1548 (determine_specialization): Accept variable templates.
1549 (check_explicit_specialization): Handle and check for malformed
1550 variable template specializations.
1551 (lookup_template_variable): New.
1552 (tsubst_decl): Handle variable template specializations.
1553 (do_decl_instantiation): Handle template variables.
1554 (instantiate_decl): Handle template variables.
1555 * semantics.c (finish_template_variable): New.
1556 (finish_id_expression): Instantiate variable templates.
1557 * cp-tree.h (variable_template_p): New.
1559 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1562 * decl.c (check_redeclaration_no_default_args): New.
1563 (duplicate_decls): Use it, handle default arguments
1564 in redeclarations of function templates.
1566 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1568 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1570 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1572 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1573 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1574 instead of pointer_set.
1576 2014-08-01 Jason Merrill <jason@redhat.com>
1579 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1580 init-list for trailing elements.
1581 * typeck2.c (process_init_constructor_array): Likewise.
1583 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1586 * decl.c (duplicate_decls): Handle static member functions too.
1588 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1590 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1593 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1596 * parser.c (cp_parser_array_notation): Added check for array_type.
1598 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1601 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1602 DECL_EXPR improved. Changed handling for INIT_EXPR.
1604 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1606 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1608 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1610 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1611 -fsanitize=alignment call ubsan_maybe_instrument_reference
1612 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1613 for calls to member functions.
1615 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1618 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1619 whether it is returning the address of a local variable.
1620 (check_return_expr): Return 0 instead of the address of a local
1623 2014-07-30 Jason Merrill <jason@redhat.com>
1627 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1629 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1632 * pt.c (unify_arity): Add boolean parameter.
1633 (unify_too_few_arguments): Likewise.
1634 (type_unification_real): Diagnose correctly insufficient
1635 arguments in the presence of trailing variadic parameters;
1636 deducing multiple trailing packs as empty is fine.
1638 2014-07-30 Jason Merrill <jason@redhat.com>
1643 * decl2.c (mark_all_virtuals): New variable.
1644 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1645 (cp_write_global_declarations): Set it and give helpful diagnostic
1646 if it introduces errors.
1647 * class.c (finish_struct_1): Check it.
1651 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1652 (check_explicit_specialization): Clear it on specializations.
1653 * decl.c (duplicate_decls, start_decl): Likewise.
1654 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1655 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1656 linkage after setting the appropriate flags.
1657 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1658 * decl2.c (mark_needed): Mark clones.
1659 (import_export_decl): Not here.
1661 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1663 Implement N4051 - Allow typename in a template template parameter
1664 * parser.c (cp_parser_type_parameter_key): New funtion;
1665 (cp_parser_token_is_type_parameter_key): Ditto;
1666 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1667 but pedwarn for less than cxx1z.
1669 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1672 * call.c (standard_conversion): Use resolve_nondeduced_context
1673 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1675 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1678 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1681 2014-07-15 Jason Merrill <jason@redhat.com>
1684 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1688 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1689 * class.c (finish_struct): Reject invalid definition of
1690 std::initializer_list.
1692 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1694 * call.c (convert_like_real): Call print_z_candidate and inform only
1695 if permerror returns true.
1697 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1699 * class.c (build_clone): Do not clear assembler names of
1701 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1702 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1703 as a special case return sizeof (struct tree_decl_non_common)
1705 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1706 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1707 * cp/cp-tree.h (tree_template_decl): New structure.
1708 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1709 (union cp_lang_tree_node): Add template_decl.
1710 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1712 2014-07-14 Jason Merrill <jason@redhat.com>
1716 * pt.c (instantiate_decl): Don't check defer_ok for local class
1719 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1722 * cp-tree.h (LITERAL_ZERO_P): Define.
1723 * parser.c (cp_parser_parenthesized_expression_list): Add
1724 want_literal_zero_p argument, if true, for literal zeros
1725 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1726 (cp_parser_postfix_expression): Adjust
1727 cp_parser_parenthesized_expression_list caller, handle
1728 -Wmemset-transposed-args.
1729 (literal_zeros): New variable.
1731 2014-07-13 Jason Merrill <jason@redhat.com>
1734 * semantics.c (is_instantiation_of_constexpr): Return true for
1735 defaulted functions, too.
1736 (explain_invalid_constexpr_fn): Only use
1737 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1738 * method.c (explain_implicit_non_constexpr): Pass
1739 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1742 * decl.c (check_initializer): Don't finish_compound_literal
1743 on erroneous constexpr init.
1746 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1749 * decl.c (create_array_type_for_decl): Only check for auto once.
1752 * call.c (build_list_conv): Don't try to build a list of references.
1754 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1756 PR C++/60209 - Declaration of user-defined literal operator cause error
1757 * parser.c (cp_parser_operator): Fold treatment of strings
1758 and user-defined string literals. Use the full string parser.
1759 (cp_parser_string_literal): Add flag to not look for literal operator.
1761 2014-07-11 Jason Merrill <jason@redhat.com>
1765 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1767 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1770 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1772 * decl.c (check_initializer): Don't call check_narrowing here,
1773 set LOOKUP_NO_NARROWING.
1774 * typeck2.c (digest_init_r): Likewise.
1776 2014-07-10 Jason Merrill <jason@redhat.com>
1779 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1783 * decl2.c (mark_all_virtuals): New variable.
1784 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1785 (cp_write_global_declarations): Set it and give helpful diagnostic
1786 if it introduces errors.
1787 * class.c (finish_struct_1): Check it.
1788 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1790 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1793 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1794 outside class declaration, in friend declaration, and neither on
1795 constructor nor conversion operator.
1797 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1801 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1802 cv-qualifiers of function types.
1804 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1805 Paolo Carlini <paolo.carlini@oracle.com>
1808 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1811 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1813 * class.c (check_for_override): Wrap the 'final' and 'override'
1814 keywords in %< and %>.
1816 2014-07-06 Marek Polacek <polacek@redhat.com>
1819 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1820 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1821 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1824 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1826 * pt.c (convert_template_argument): Use inform instead of error in
1829 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1834 * parser.c (cp_parser_userdef_string_literal): Take a tree
1836 (cp_parser_string_literal): Don't hack the token stream.
1838 2014-06-30 Jason Merrill <jason@redhat.com>
1842 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1844 * init.c (build_vtbl_address): Don't mark destructor.
1845 * class.c (finish_struct_1): Add all classes to keyed_classes
1849 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1852 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1854 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1855 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1856 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1857 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1858 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1859 * pt.c (unify): Also check whether the argument is a PMF.
1861 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1864 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1865 a '[' can also start a primary-expression.
1866 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1867 when cp_parser_tokens_start_cast_expression returns -1.
1869 2014-06-30 Jason Merrill <jason@redhat.com>
1872 * pt.c (unify_one_argument): Type/expression mismatch just causes
1875 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1878 2014-06-30 Marek Polacek <polacek@redhat.com>
1880 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1881 function has no_sanitize_undefined attribute.
1882 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1883 function has no_sanitize_undefined attribute.
1885 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1888 * cp-array-notation.c (expand_sec_reduce_builtin):
1889 Check that bultin argument is correct.
1890 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1892 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1896 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1897 types aren't the same.
1899 2014-06-27 Jason Merrill <jason@redhat.com>
1902 * error.c (dump_template_bindings): Don't tsubst in a clone.
1904 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1907 * semantics.c (finish_compound_literal): Revert r204228.
1909 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1911 * parser.c (cp_parser_compound_literal_p): New.
1912 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1914 2014-06-26 Jason Merrill <jason@redhat.com>
1916 * parser.c (cp_parser_for_init_statement): Change range-for error
1919 N3994 Ranged-based for-loops: The Next Generation
1920 * parser.c (cp_lexer_nth_token_is): New.
1921 (cp_parser_for_init_statement): Allow "for (id : init)".
1923 2014-06-26 Teresa Johnson <tejohnson@google.com>
1925 * class.c (dump_class_hierarchy): Use saved dump files.
1926 (dump_vtable): Ditto.
1929 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1932 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1933 parameter lists outside of function parameter scope.
1935 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1939 * typeck2.c (process_init_constructor_record): Do not complain about
1940 uninitialized const members, because within aggregate-initialization,
1941 members without explicit initializers are value-initialized.
1943 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1945 * semantics.c (finish_omp_clauses): Make sure
1946 OMP_CLAUSE_LINEAR_STEP has correct type.
1948 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1950 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1951 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1952 FUNCTION_DECL check.
1953 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1954 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1955 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1956 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1958 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1961 * decl.c (grokdeclarator): Do not early check for operator-function-id
1964 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1966 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1969 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1971 * parser.c (cp_parser_omp_for_loop): For
1972 #pragma omp parallel for simd move lastprivate clause from parallel
1973 to for rather than simd.
1975 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1979 * decl.c (grokparms): Accept a single parameter of type 'void'.
1981 2014-06-20 Jason Merrill <jason@redhat.com>
1984 * call.c (add_function_candidate): Avoid special 'this' handling
1985 if we have a ref-qualifier.
1988 * call.c (build_over_call): Call build_this in template path.
1990 2014-06-19 Jason Merrill <jason@redhat.com>
1993 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1995 2014-06-18 Jason Merrill <jason@redhat.com>
1998 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1999 ref-qualifier handling.
2002 * pt.c (resolve_overloaded_unification): Preserve
2003 ARGUMENT_PACK_EXPLICIT_ARGS.
2005 2014-06-18 Jakub Jelinek <jakub@redhat.com>
2007 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
2009 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
2011 2014-06-17 Jason Merrill <jason@redhat.com>
2014 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
2016 2014-06-15 Jason Merrill <jason@redhat.com>
2019 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
2022 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
2024 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2026 * decl.c (grokvardecl): Fix pasto in previous patch.
2028 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2030 * decl.c (duplicate_decls): Use set_decl_tls_model.
2031 (grokdeclarator): Likewise.
2032 * semantics.c (finish_id_expression): Check TLS only for
2034 (finish_omp_threadprivate): Use decl_default_tls_model.
2035 * decl2.c (get_guard): Likewise.
2036 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
2038 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2041 * decl.c (grokparms): Improve error message about void parameters.
2042 * error.c (type_to_string): Fix aka cut off code.
2044 2014-06-12 Jason Merrill <jason@redhat.com>
2046 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
2047 * cvt.c (type_promotes_to): Likewise.
2048 * mangle.c (write_type, write_expression): Likewise.
2049 (write_name, write_template_arg): Likewise.
2050 (mangle_decl): Make alias based on flag_abi_compat_version.
2051 Emit -Wabi warning here.
2052 (finish_mangling_internal): Not here. Drop warn parm.
2053 (finish_mangling_get_identifier, finish_mangling): Adjust.
2054 (mangle_type_string, mangle_special_for_type): Adjust.
2055 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
2056 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
2057 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
2059 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
2060 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
2061 (layout_nonempty_base_or_field, end_of_class): Likewise.
2062 (layout_empty_base, build_base_field, layout_class_type): Likewise.
2063 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
2064 (layout_virtual_bases): Likewise.
2065 * decl.c (compute_array_index_type): Likewise.
2066 * mangle.c (write_mangled_name, write_prefix): Likewise.
2067 (write_template_prefix, write_integer_cst, write_expression): Likewise.
2068 (write_template_arg, write_array_type): Likewise.
2069 * method.c (lazily_declare_fn): Likewise.
2070 * rtti.c (get_pseudo_ti_index): Likewise.
2071 * typeck.c (comp_array_types): Likewise.
2073 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
2075 * vtable-class-hierarchy.c: Update handling for section names
2076 that are no longer trees.
2077 * decl.c (duplicate_decls): Likewise.
2079 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2082 * parser.c (cp_parser_init_declarator): Actually pass friend_p
2083 to cp_parser_declarator.
2085 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2088 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
2089 * name-lookup.c (validate_nonmember_using_decl): Adjust error
2092 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2095 * parser.c (cp_parser_declarator): Add bool parameter.
2096 (cp_parser_direct_declarator): Likewise, use it.
2097 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
2098 (cp_parser_condition, cp_parser_explicit_instantiation,
2099 cp_parser_init_declarator, cp_parser_type_id_1,
2100 cp_parser_parameter_declaration, cp_parser_exception_declaration,
2101 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
2102 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
2104 * decl.c (grokdeclarator): Fix handling of friend declared in
2105 namespace scope (g++.dg/parse/friend10.C).
2107 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
2109 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
2111 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
2112 (maybe_clone_body): Move symbol across comdat groups.
2113 * method.c (use_thunk): Copy implicit section flag.
2115 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2118 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
2120 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2122 * method.c (use_thunk): Use set_decl_section_name.
2123 * optimize.c (maybe_clone_body): Use set_decl_section_name.
2124 * decl.c (duplicate_decls): Likewise.
2125 * vtable-class-hierarchy.c: Likewise.
2127 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
2130 * class.c (check_field_decls): In C++11 mode do not reject
2131 static data members and reference-type members in unions.
2133 2014-06-05 Jason Merrill <jason@redhat.com>
2136 * decl.c (check_initializer): Collapse a TREE_LIST here.
2137 * typeck2.c (store_init_value): Not here.
2139 2014-06-05 Richard Biener <rguenther@suse.de>
2140 Paolo Carlini <paolo.carlini@oracle.com>
2143 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
2144 handling of empty classes.
2146 2014-06-04 Jason Merrill <jason@redhat.com>
2148 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
2149 for noexcept and thread_local, too.
2152 * decl.c (check_initializer): Maybe clear
2153 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2155 2014-06-05 Richard Biener <rguenther@suse.de>
2158 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
2159 warnings for accessing empty classes.
2161 2014-06-05 Marek Polacek <polacek@redhat.com>
2164 * parser.c (cp_parser_binary_expression): Warn when logical not is
2165 used on the left hand side operand of a comparison.
2167 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
2170 * typeck.c (cp_build_modify_expr): Handle array of characters
2171 initialized by a string literal.
2172 * decl.c (check_initializer): Handle parenthesized string literal
2174 * typeck2.c (store_init_value): Remove redundant check.
2176 2014-06-04 Jason Merrill <jason@redhat.com>
2180 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
2181 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
2183 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2186 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
2189 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2193 * call.c (standard_conversion): Convert nullptr to bool only
2194 in case of direct-initialization.
2195 (convert_like_real): Provide informative error message.
2197 2014-06-03 Marek Polacek <polacek@redhat.com>
2200 * semantics.c (finish_switch_cond): Warn if switch condition has
2203 2014-06-03 Jason Merrill <jason@redhat.com>
2206 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
2207 variable to local_specializations.
2210 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
2212 2014-06-02 Jason Merrill <jason@redhat.com>
2215 * decl.c (reshape_init_class): Handle un-folded
2216 constant-expressions.
2219 * pt.c (pack_deducible_p): Handle canonicalization.
2221 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2223 * pt.c (tsubst_function_type): Initialize arg_types.
2225 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
2228 * class.c (handle_using_decl): Pass the correct scope to
2229 cp_emit_debug_info_for_using.
2231 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2235 * search.c (accessible_p): Use current_nonlambda_class_type.
2236 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2238 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2240 * decl.c: Include builtins.h.
2241 * semantics.c: Likewise.
2243 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
2247 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2248 * pt.c (tsubst_function_type): Inject the this parameter; do the
2249 substitutions in the order mandated by the DR.
2250 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2251 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2252 (static_fn_type): Copy it.
2253 * decl2.c (build_memfn_type, change_return_type,
2254 cp_reconstruct_complex_type): Likewise.
2255 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2256 * tree.c (strip_typedefs): Likewise.
2257 * typeck.c (merge_types): Likewise.
2259 2014-05-30 Jason Merrill <jason@redhat.com>
2262 * pt.c (instantiate_decl): Check that defer_ok is not set for
2263 local class members.
2266 * pt.c (tsubst_init): Split out from...
2267 (tsubst_expr) [DECL_EXPR]: Here.
2268 (tsubst_copy) [VAR_DECL]: Use it.
2269 * semantics.c (finish_id_expression): Return the decl for static/const.
2271 2014-05-28 Jason Merrill <jason@redhat.com>
2274 * decl.c (cxx_comdat_group): Return a decl.
2275 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2277 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2281 * call.c (build_aggr_conv): Ignore passed in flags.
2282 (build_array_conv, build_complex_conv): Likewise.
2284 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2286 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2287 (maybe_clone_body): Likewise.
2288 * decl.c (duplicate_decls): Update code duplicating comdat group;
2289 do not copy symtab pointer; before freeing newdecl remove it
2291 * decl2.c (constrain_visibility): Use set_comdat_group.
2293 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2295 * rtti.c: Include tm_p.h
2296 (emit_tinfo_decl): Force RTTI data to be aligned to required
2299 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2301 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2302 ignoring other target adjustments.
2304 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2306 * semantics.c (finish_omp_clauses): Remove duplicated variable
2309 * parser.c (cp_parser_omp_target): Return bool values.
2311 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2314 * lambda.c (add_capture): Enforce that capture by value requires
2316 * typeck2.c (cxx_incomplete_type_inform): Early return if
2317 TYPE_MAIN_DECL is null.
2319 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2322 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2324 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2327 * lambda.c (build_capture_proxy, add_capture): Treat normal
2328 captures and init-captures identically.
2330 2014-05-21 Mark Wielaard <mjw@redhat.com>
2333 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2334 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2336 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2338 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2339 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2340 (expand_array_notation): Handle VOID_CST.
2341 * error.c (dump_expr): Likewise.
2342 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2343 (cxx_pretty_printer::expression): Likewise.
2344 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2345 * decl.c (register_dtor_fn): Likewise.
2346 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2347 (build_delete, push_base_cleanups): Likewise.
2348 * mangle.c (write_expression): Likewise.
2349 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2350 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2351 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2352 * tree.c (cp_tree_equal): Likewise.
2353 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2354 instead of void_zero_node.
2355 * typeck.c (check_return_expr): Likewise.
2356 * typeck2.c (build_functional_cast): Likewise.
2358 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2361 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2363 (cp_parser_statement): ...here. Make sure only semicolon can go after
2366 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2371 * typeck2.c (digest_nsdmi_init): New.
2372 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2373 * init.c (get_nsdmi): Likewise.
2374 * cp-tree.h (digest_nsdmi_init): Declare.
2376 2014-05-20 Jason Merrill <jason@redhat.com>
2378 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2379 up a virtual function in a dummy object.
2381 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2384 * decl.c (duplicate_decls): Replace pair of warning_at with
2385 warning_at + inform.
2386 (maybe_commonize_var): Likewise.
2388 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2391 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2392 (tsubst_copy_and_build): Perform recursive substitutions in a
2393 deterministic order.
2395 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2398 * typeck2.c (cxx_incomplete_type_inform): New.
2399 (cxx_incomplete_type_diagnostic): Use it.
2400 * decl.c (grokdeclarator): Check the element type of an
2401 incomplete array type; call the above.
2402 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2404 2014-05-19 Jason Merrill <jason@redhat.com>
2407 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2408 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2410 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2412 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2413 * parser.c (cp_parser_enum_specifier): Likewise.
2415 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2417 * class.c (sorted_fields_type_new): Adjust.
2418 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2419 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2420 * cp-tree.h: Remove usage of variable_size gty attribute.
2421 * decl.c (make_label_decl): Adjust.
2422 (check_goto): Likewise.
2423 (start_preparsed_function): Likewise.
2424 (save_function_data): Likewise.
2425 * lex.c (init_reswords): Likewise.
2426 (retrofit_lang_decl): Likewise.
2427 (cxx_dup_lang_specific_decl): Likewise.
2428 (copy_lang_type): Likewise.
2429 (cxx_make_type): Likewise.
2430 * name-lookup.c (binding_entry_make): Likewise.
2431 (binding_table_construct): Likewise.
2432 (binding_table_new): Likewise.
2433 (cxx_binding_make): Likewise.
2434 (pushdecl_maybe_friend_1): Likewise.
2435 (begin_scope): Likewise.
2436 (push_to_top_level): Likewise.
2437 * parser.c (cp_lexer_alloc): Likewise.
2438 (cp_lexer_new_from_tokens): Likewise.
2439 (cp_token_cache_new): Likewise.
2440 (cp_parser_context_new): Likewise.
2441 (cp_parser_new): Likewise.
2442 (cp_parser_nested_name_specifier_opt): Likewise.
2443 (cp_parser_template_id): Likewise.
2444 * pt.c (maybe_process_partial_specialization): Likewise.
2445 (register_specialization): Likewise.
2446 (add_pending_template): Likewise.
2447 (lookup_template_class_1): Likewise.
2448 (push_tinst_level): Likewise.
2449 * semantics.c (register_constexpr_fundef): Likewise.
2450 (cxx_eval_call_expression): Likewise.
2451 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2453 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2456 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2457 when cp_parser_lookup_name sets ambiguous_decls.
2459 2014-05-15 Jason Merrill <jason@redhat.com>
2461 * call.c (print_conversion_rejection): Use loc consistently.
2463 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2465 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2466 * call.c (convert_like_real, build_new_method_call_1): Use it.
2467 * decl2.c (grokfield): Likewise.
2468 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2469 build_new_1): Likewise.
2470 * mangle.c (write_expression): Likewise.
2471 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2473 2014-05-14 Jason Merrill <jason@redhat.com>
2477 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2478 dropped cv-quals as a bad conversion.
2479 (convert_like_real) [ck_ref_bind]: Explain them.
2480 (compare_ics): Check badness before stripping reference
2481 bindings. Handle comparing bad reference bindings.
2482 * typeck.c (comp_cv_qualification): Add overload that just takes
2484 * cp-tree.h: Declare it.
2486 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2487 (arg_conversion_rejection, bad_arg_conversion_rejection)
2488 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2489 (add_function_candidate): Pass actual argument, rather than type, to
2490 bad_arg_conversion_rejection.
2491 (print_conversion_rejection): Explain what's wrong with the conversion.
2492 (print_z_candidates): Say "candidate:" before each candidate.
2493 (splice_viable): Be strict if we see a viable or template candidate.
2494 (build_user_type_conversion_1): Pass false to strict parameter.
2495 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2496 (build_new_op_1, build_new_method_call_1): Likewise.
2497 (build_op_call_1): Pass true to strict parameter.
2499 2014-05-13 Jason Merrill <jason@redhat.com>
2501 * call.c (print_error_for_call_failure): Say "no match" rather
2502 than "ambiguous" if there were no strict matches.
2503 (build_new_method_call_1): Likewise.
2506 * semantics.c (is_this_parameter): Allow capture proxies too.
2508 2014-05-12 Jason Merrill <jason@redhat.com>
2510 * call.c (maybe_print_user_conv_context): New.
2511 (convert_like_real): Use it. Print call context for bad
2512 user-defined conversion.
2513 (build_over_call): Print call context for bad 'this' conversion.
2515 * call.c (convert_like_real): Use inform for identifying the
2518 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2520 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2521 complain & tf_error is false.
2523 * decl.c (make_unbound_class_template): Prefer inform for
2524 "declared here"-type message.
2526 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2530 * lambda.c (lambda_expr_this_capture): Add new parameter
2531 add_capture_p controlling whether the functions will try to
2532 capture 'this' via the default capture.
2533 (maybe_resolve_dummy): Likewise.
2534 * cp-tree.h: Adjust prototypes.
2535 * call.c, semantics.c: Change callers of these functions.
2536 * call.c (build_new_method_call_1): Use the actual 'this' that
2537 would be potentially captured for the overload resolution, instead
2538 of the dummy object.
2540 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2542 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2544 (convert_nontype_argument): Adjust calls.
2545 (coerce_template_parameter_pack): Add missing complain & tf_error
2548 2014-05-09 Jason Merrill <jason@redhat.com>
2552 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2553 non-class lvalues and xvalues that differ only in cv-qualifiers.
2557 * call.c (build_user_type_conversion_1): The copy-init temporary
2561 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2564 * call.c (build_conditional_expr_1): If overload resolution finds
2565 no match, just say "different types".
2568 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2571 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2572 if we didn't find a conversion.
2573 Don't accept a bad conversion too early.
2575 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2578 * typeck.c (convert_for_assignment): Provide an inform for pointers
2579 to incomplete class types.
2581 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2584 * pt.c (convert_nontype_argument): Protect all the error calls
2585 with complain & tf_error.
2587 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2590 * pt.c (instantiate_decl): Avoid generating the body of a
2593 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2596 * pt.c (maybe_begin_member_template_processing): Use
2597 uses_template_parms.
2599 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2600 Mike Stump <mikestump@comcast.net>
2601 Richard Sandiford <rdsandiford@googlemail.com>
2603 * call.c: Include wide-int.h.
2604 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2605 (convert_for_arg_passing): Likewise.
2606 * class.c: Include wide-int.h.
2607 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2608 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2609 (include_empty_classes): Likewise
2610 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2611 * cvt.c: Include wide-int.h.
2612 (ignore_overflows): Use wide_int_to_tree.
2613 * decl.c: Include wide-int.h.
2614 (check_array_designated_initializer): Use wide-int interfaces.
2615 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2616 (finish_enum_value_list): Use signop.
2617 (build_enumerator): Use wide-int interfaces.
2618 * init.c: Include wide-int.h.
2619 (build_new_1): Use wide-int interfaces.
2620 * mangle.c: Include wide-int.h.
2621 (write_integer_cst): Use wide-int interfaces.
2622 (write_array_type): Likewise.
2623 * tree.c: Include wide-int.h.
2624 (cp_tree_equal): Use tree_int_cst_equal.
2625 * typeck2.c: Include wide-int.h.
2626 (process_init_constructor_array): Use wide-int interfaces.
2628 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2631 * decl.c (grokfndecl): Check duplicate_decls return value for
2633 * pt.c (instantiate_decl): A deleted function is defined.
2635 2014-05-02 Jason Merrill <jason@redhat.com>
2637 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2640 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2642 (add_capture): Check for VLA before calling it.
2643 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2644 just the current one. Make non-static.
2645 * cp-tree.h: Declare it.
2646 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2647 the operand was static or constant.
2649 2014-05-02 Marek Polacek <polacek@redhat.com>
2651 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2654 2014-05-01 Marek Polacek <polacek@redhat.com>
2657 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2658 between label and variable when warning about returning local address.
2660 2014-04-30 Jason Merrill <jason@redhat.com>
2663 * init.c (build_value_init): Don't try to call an array constructor.
2666 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2668 2014-04-30 Marek Polacek <polacek@redhat.com>
2670 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2671 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2672 for non-integer types.
2674 2014-04-29 Jason Merrill <jason@redhat.com>
2677 Represent the unevaluated exception specification of an implicitly
2678 declared or deleted function with a simple placeholder, not a list
2680 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2681 * except.c (unevaluated_noexcept_spec): New.
2682 * class.c (deduce_noexcept_on_destructor): Use it.
2683 * decl.c (check_redeclaration_exception_specification): Call
2684 maybe_instantiate_noexcept.
2685 (duplicate_decls): Call it before merge_types.
2686 (start_preparsed_function): Call maybe_instantiate_noexcept.
2687 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2688 * init.c (get_nsdmi): Factor out of perform_member_init.
2689 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2690 (walk_field_subobs): Consider NSDMI for EH spec.
2691 (get_defaulted_eh_spec): New.
2692 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2693 (defaulted_late_check): Defer EH checking in non-template classes.
2694 (after_nsdmi_defaulted_late_checks): New.
2695 * parser.c (cp_parser_class_specifier_1): Use it.
2696 (unparsed_classes): New macro.
2697 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2698 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2699 Remove list-of-functions handling.
2700 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2701 handling and FN parameter.
2702 * typeck.c (merge_types): Adjust.
2704 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2707 * parser.c (cp_parser_alias_declaration): Check return value of
2710 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2712 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2713 atomic-clause, allow comma in between atomic-clause and
2716 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2719 * rtti.c (emit_support_tinfos): Do not iterate on
2720 registered_builtin_types (partial revert).
2722 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2725 * semantics.c (apply_deduced_return_type): Complete non-void type
2726 before estimating whether the type is aggregate.
2728 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2731 * rtti.c (emit_support_tinfo_1): New function, extracted from
2732 emit_support_tinfos.
2733 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2735 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2738 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2739 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2741 2014-04-18 Jason Merrill <jason@redhat.com>
2744 * call.c (reference_binding): Recurse on user-defined conversion.
2747 * call.c (standard_conversion): Don't try to apply restrict to void.
2749 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2751 * decl.c (reshape_init_r): Handle a single element of vector type.
2753 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2756 * decl2.c (cplus_decl_attributes): Handle
2757 pointer-to-member-function declarations.
2759 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2762 * call.c (build_user_type_coversion): Use build_dummy_object
2763 to create the placeholder object for a constructor method call.
2764 (build_special_member_call): Likewise.
2765 (build_over_call): Check for the placeholder object with
2767 (build_new_method_call_1): Likewise. Don't attempt to resolve
2768 a dummy object for a constructor method call.
2770 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2773 * friend.c (add_friend, make_friend_class): Move repeated friend
2774 warning under Wredundant_decls.
2776 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2778 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2779 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2780 (do_class_using_decl): Likewise.
2781 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2783 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2786 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2788 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2790 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2792 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2794 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2796 2014-04-11 Jason Merrill <jason@redhat.com>
2798 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2800 (cp_lexer_get_preprocessor_token): Always clear it.
2801 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2805 * decl.c (reshape_init_r): Handle a single element of class type.
2808 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2809 built-in operator new.
2811 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2814 * name-lookup.c (parse_using_directive): Return early if the
2815 attribs argument is error_mark_node; use get_attribute_name.
2817 2014-04-11 Jason Merrill <jason@redhat.com>
2821 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2822 * call.c (struct z_candidate): Add flags field.
2823 (add_candidate): Add flags parm.
2824 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2825 (add_template_candidate_real): Pass it.
2826 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2827 * tree.c (build_aggr_init_expr): Copy it.
2828 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2830 2014-04-10 Richard Biener <rguenther@suse.de>
2831 Jakub Jelinek <jakub@redhat.com>
2834 * error.c (dump_decl) <case FUNCTION_DECL>: If
2835 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2836 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2839 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2841 * pt.c (check_template_variable): Check for the return of pedwarn
2842 before emitting a note.
2843 * parser.c (cp_parser_lambda_introducer): Likewise.
2845 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2848 * pt.c (process_template_parm): For an invalid non-type parameter
2849 only set TREE_TYPE to error_mark_node.
2850 (push_inline_template_parms_recursive, comp_template_parms,
2851 redeclare_class_template, coerce_template_template_parm,
2852 coerce_template_template_parms, unify): Use error_operand_p.
2854 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2856 * class.c (check_bases_and_members): Warn about non-virtual dtors
2857 in public bases only. Check warn_ecpp before complaining about
2858 non-polymorphic bases.
2860 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2862 * decl.c (duplicate_decls): Check for the return of warning_at
2863 before emitting a note.
2864 (warn_misplaced_attr_for_class_type): Likewise.
2865 (check_tag_decl): Likewise.
2867 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2870 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2872 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2875 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2876 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2877 instantiating a variable-sized type.
2880 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2882 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2884 * class.c (find_abi_tags_r): Check for the return of warning
2885 before emitting a note.
2886 (one_inherited_ctor): Likewise.
2888 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2890 * decl.c (duplicate_decls): Check for the return of permerror
2891 before emitting a note.
2893 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2895 * class.c (accessible_nvdtor_p): New.
2896 (check_bases): Don't check base destructor here ...
2897 (check_bases_and_members): ... check them here. Trigger on
2898 Wnon-virtual-dtor flag.
2899 (finish_struct_1): Use accessible_nvdtor_p.
2901 2014-04-01 Jason Merrill <jason@redhat.com>
2903 * pt.c (process_partial_specialization): Say "not deducible"
2904 rather than "not used". Use inform.
2907 * pt.c (coerce_template_parms): Check that the pack expansion
2908 pattern works with the first matching parameter.
2910 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2912 * init.c (perform_member_init): Homogenize uninitialized
2915 2014-04-01 Jason Merrill <jason@redhat.com>
2918 * call.c (build_array_conv): Call complete_type.
2921 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2922 (picflag_from_initializer): Return it.
2923 (process_init_constructor): Handle it.
2926 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2927 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2928 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2929 (most_general_template): Handle more kinds of template.
2930 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2931 instantiations and specializations.
2933 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2936 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2937 COMPONENT_REFs and ARRAY_REFs sooner.
2939 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2942 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2943 usage in non-functions with pushed scope.
2945 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2948 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2949 to indicate whether a scope is in the process of defining a class.
2950 * semantics.c (begin_class_definition): Set defining_class_p.
2951 * name-lookup.c (leave_scope): Reset defining_class_p.
2952 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2953 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2954 unwinding to class-defining scope to handle the erroneous definition of
2955 a generic function of an arbitrarily nested class within an enclosing
2958 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2961 * method.c (walk_field_subobs): Improve the diagnostic
2962 locations for both REFERENCE_TYPEs and non-static const members.
2963 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2964 instead of %qD to be consistent with the c++11 diagnostic.
2966 2014-03-25 Jason Merrill <jason@redhat.com>
2970 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2971 * search.c (get_pure_virtuals): Not here.
2974 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2975 a lambda in unevaluated context.
2978 * decl.c (create_array_type_for_decl): Complain about array of auto.
2980 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2983 * semantics.c (potential_constant_expression_1): Handle
2986 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2989 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2990 introducing an implicit function template parameter within an explicit
2993 2014-03-22 Jason Merrill <jason@redhat.com>
2996 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2999 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
3002 * name-lookup.c (push_class_level_binding_1): Check identifier_p
3003 on the name argument.
3005 2014-03-20 Jakub Jelinek <jakub@redhat.com>
3008 * init.c (build_zero_init_1): Ignore fields with error_mark_node
3011 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
3014 * call.c (build_new_method_call_1): Handle pure virtuals called by
3017 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
3020 * parser.c (cp_parser_member_declaration): Don't allow
3021 finish_fully_implicit_template to consider friend declarations to be
3022 class member templates.
3023 (synthesize_implicit_template_parm): Handling winding back through class
3024 scope to the class being defined in order to inject a template argument
3028 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
3029 function scope as per cp_parser_skip_to_end_of_statement.
3031 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
3034 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
3036 2014-03-14 Jason Merrill <jason@redhat.com>
3040 * search.c (get_pure_virtuals): Handle abstract dtor here.
3041 (dfs_get_pure_virtuals): Not here.
3044 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
3045 abstract class as pure.
3047 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3050 * pt.c (maybe_process_partial_specialization): Check return value
3051 of check_specialization_namespace.
3053 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3056 * semantics.c (finish_static_assert): Call cxx_constant_value only
3057 if require_potential_rvalue_constant_expression returns true.
3059 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
3062 * method.c (get_inherited_ctor): New.
3063 * cp-tree.h (get_inherited_ctor): Declare it.
3064 * semantics.c (is_valid_constexpr_fn): Use it.
3066 2014-03-10 Jason Merrill <jason@redhat.com>
3069 * call.c (convert_default_arg): Remove special handling for
3073 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
3074 when deciding whether to call push_template_decl for a member class.
3075 * pt.c (push_template_decl_real): Return after wrong levels error.
3077 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
3080 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
3081 lambda, remove the lambda's own template argument list prior to fetching
3085 * parser.c (cp_parser_parameter_declaration_clause): Move generic
3086 function template unwinding on error into a more general location, ...
3087 (cp_parser_skip_to_end_of_statement): ... here.
3089 2014-03-07 Jason Merrill <jason@redhat.com>
3091 * Make-lang.in (check_g++_parallelize): Split dg.exp.
3093 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
3094 we're in a trailing return type.
3096 * typeck.c (comp_template_parms_position): 'auto' and
3097 'decltype(auto)' are different from real template parms.
3099 * parser.c (cp_parser_using_declaration): Consume the semicolon
3100 after bare parameter pack error.
3102 * cp-tree.h (REF_PARENTHESIZED_P): New.
3103 * semantics.c (force_paren_expr): Set it.
3104 * pt.c (do_auto_deduction): Check it.
3105 (tsubst) [COMPONENT_REF]: Copy it.
3106 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
3108 * decl.c (create_array_type_for_decl): Only warn about invalid
3109 C++1y VLA if flag_iso or warn_vla>0.
3110 (grokdeclarator): Likewise.
3111 * pt.c (tsubst): Likewise.
3112 * semantics.c (finish_decltype_type): Likewise.
3113 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
3114 (cp_build_addr_expr_1): Likewise.
3115 * init.c (build_new_1): Improve diagnostics.
3117 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3120 * decl.c (check_initializer): Return NULL_TREE after error;
3121 consistently use inform.
3123 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3125 * decl.c (check_initializer): Remove dead code.
3127 2014-03-06 Marek Polacek <polacek@redhat.com>
3130 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
3131 of checking tree code.
3133 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3135 * parser.c (cp_lexer_set_source_position): New.
3136 (cp_parser_mem_initializer): Use it.
3137 (cp_parser_postfix_open_square_expression): Likewise.
3138 (cp_parser_parenthesized_expression_list): Likewise.
3139 (cp_parser_new_initializer): Likewise.
3140 (cp_parser_jump_statement): Likewise.
3141 (cp_parser_initializer): Likewise.
3142 (cp_parser_functional_cast): Likewise.
3144 2014-03-05 Jason Merrill <jason@redhat.com>
3147 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
3148 dependent expression.
3151 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
3152 if re-parsing might succeed.
3153 * semantics.c (finish_id_expression): Use of a parameter outside
3154 the function body is a parse error.
3156 * parser.c (cp_parser_mem_initializer): Set input_location
3157 properly for init-list warning.
3158 (cp_parser_postfix_open_square_expression): Likewise.
3159 (cp_parser_parenthesized_expression_list): Likewise.
3160 (cp_parser_new_initializer): Likewise.
3161 (cp_parser_jump_statement): Likewise.
3162 (cp_parser_initializer): Likewise.
3163 (cp_parser_functional_cast): Likewise.
3165 2014-03-04 Jason Merrill <jason@redhat.com>
3168 * typeck2.c (process_init_constructor_record): Set
3169 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
3173 * parser.c (cp_parser_direct_declarator): Set declarator to
3174 cp_error_declarator on invalid qualified-id.
3176 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
3179 * parser.c (cp_parser_using_declaration): Early return when
3180 cp_parser_nested_name_specifier errors out.
3182 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
3185 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
3186 function scope on parse error in function parameter list.
3188 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3190 * method.c (implicitly_declare_fn): Remove redundant
3191 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
3192 * semantics.c (is_instantiation_of_constexpr): Likewise.
3193 * error.c (dump_function_decl): Likewise.
3195 2014-03-01 Jason Merrill <jason@redhat.com>
3198 * semantics.c (begin_maybe_infinite_loop): Use
3199 fold_non_dependent_expr_sfinae.
3201 2014-02-28 Jason Merrill <jason@redhat.com>
3204 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
3206 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
3209 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
3210 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
3211 * lambda.c (maybe_add_lambda_conv_op): Likewise.
3213 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
3216 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
3219 2014-02-27 Jason Merrill <jason@redhat.com>
3223 * decl2.c (tentative_decl_linkage): Don't mess with functions that
3224 are not yet defined.
3226 2014-02-26 Jason Merrill <jason@redhat.com>
3230 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
3231 * init.c (build_vtbl_address): Do it here.
3237 * pt.c (struct warning_sentinel): New.
3238 (tsubst_copy_and_build): Use it instead of
3239 c_inhibit_evaluation_warnings.
3240 * typeck.c (maybe_warn_about_useless_cast): Remove
3241 c_inhibit_evaluation_warnings check.
3244 * pt.c (get_template_parm_index): New.
3245 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3246 (process_template_parm): Allow bare packs in template template
3247 parm template parms.
3248 (coerce_template_parameter_pack): Handle fixed template template
3249 parm packs and fixed packs not at the end of the parm list.
3250 (coerce_template_parms): Handle template parm packs not at the end
3252 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3255 * pt.c (unify): Ignore alias templates when deducing a template
3261 * call.c (reference_binding): Recurse on user-defined conversion.
3262 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3264 2014-02-25 Jason Merrill <jason@redhat.com>
3267 * call.c (reference_binding): Recurse on user-defined conversion.
3268 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3270 * call.c (print_conversion_rejection): Handle n_arg of -2.
3271 (build_user_type_conversion_1): Pass it.
3274 * decl2.c (no_linkage_error): Handle C++98 semantics.
3275 (reset_type_linkage): Move from decl.c.
3276 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3277 (bt_reset_linkage_2, reset_decl_linkage): New.
3278 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3279 (cp_write_global_declarations): Move condition into no_linkage_error.
3280 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3281 * semantics.c (expand_or_defer_fn_1): Factor out
3282 tentative_decl_linkage.
3283 * cp-tree.h: Adjust.
3285 * decl2.c (finish_static_data_member_decl): Diagnose static data
3286 member in unnamed class.
3287 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3290 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3291 defaulted virtual dtor.
3295 * pt.c (get_underlying_template): Fix equivalence calculation.
3297 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3300 * parser.c (function_being_declared_is_template_p): Return false when
3301 processing a template parameter list.
3302 (cp_parser_parameter_declaration_clause): Don't set
3303 auto_is_implicit_function_template_parm_p when processing a
3304 template parameter list.
3306 * parser.c (synthesize_implicit_template_parm): Inject new template
3307 argument list appropriately when a generic member function
3308 of a class template is declared out-of-line.
3311 * parser.c (cp_parser_direct_declarator): Don't save and
3312 restore num_template_parameter_lists around call to
3313 cp_parser_parameter_declaration_list.
3314 (function_being_declared_is_template_p): New predicate.
3315 (cp_parser_parameter_declaration_list): Use
3316 function_being_declared_is_template_p as predicate for
3317 inspecting current function template parameter list length
3318 rather than num_template_parameter_lists.
3320 2014-02-24 Jason Merrill <jason@redhat.com>
3323 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3324 DECL_EXPR initialize a non-class iterator.
3327 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3329 2014-02-21 Jason Merrill <jason@redhat.com>
3332 * parser.c (cp_parser_type_name): Always check dependency.
3333 (cp_parser_type_specifier_seq): Call
3334 cp_parser_parse_and_diagnose_invalid_type_name.
3337 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3340 * parser.c (cp_parser_default_argument): Clear
3341 current_class_ptr/current_class_ref like tsubst_default_argument.
3344 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3345 than current_binding_level.
3348 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3351 * parser.c (cp_parser_enum_specifier): Call
3352 check_for_bare_parameter_packs.
3355 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3359 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3360 of the partial instantiation, not the most general template.
3361 (maybe_process_partial_specialization): Reassign everything on
3365 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3366 (check_explicit_specialization): Don't clone.
3369 * pt.c (coerce_template_parms): Bail if argument packing fails.
3372 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3373 Don't get confused by a CONSTRUCTOR that already has a type.
3376 * call.c (build_array_conv): Don't crash on VLA.
3379 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3382 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3383 in declaration context.
3387 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3390 * parser.c (cp_parser_direct_declarator): Don't wrap a
3391 type-dependent expression in a NOP_EXPR.
3394 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3399 * parser.c (cp_parser_template_argument): Restore dereference.
3400 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3401 (process_partial_specialization): Handle deref.
3404 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3408 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3409 implicit_template_scope upon leaving an out-of-line generic member
3410 function definition.
3412 2014-02-20 Kai Tietz <ktietz@redhat.com>
3415 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3416 valued type argument as error_mark_node.
3419 * semantics.c (finish_fname): Handle error_mark_node.
3421 2014-02-19 Jason Merrill <jason@redhat.com>
3424 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3425 spec from template context.
3427 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3430 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3431 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3434 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3436 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3439 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3442 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3445 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3446 During error recovery allow_non_constant may be false.
3448 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3451 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3452 scope whenever a template parameter list has been started, independent
3453 of whether the function call operator was well-formed or not.
3456 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3457 scope for generic friend declarations as well as for non-friends.
3459 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3462 * method.c (implicitly_declare_fn): A constructor of a class with
3463 virtual base classes isn't constexpr (7.1.5p4).
3465 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3467 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3469 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3472 * parser.c (cp_parser_omp_declare_reduction): Save and free
3475 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3479 * tree.c (handle_init_priority_attribute): Call default_conversion on
3480 the attribute argument.
3482 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3485 * method.c (synthesized_method_walk): If vbases is non-null but
3486 is_empty is true, likewise don't worry about the virtual bases.
3488 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3491 * typeck2.c (process_init_constructor_record): Just skip unnamed
3494 2014-01-31 Jason Merrill <jason@redhat.com>
3497 * pt.c (mark_decl_instantiated): Call mark_needed.
3500 * decl2.c (handle_tls_init): Handle null init fn.
3503 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3505 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3508 * class.c (build_vfield_ref): Early return error_mark_node if
3509 TYPE_VFIELD (type) is null.
3510 (build_base_path): Check return value of build_vfield_ref.
3512 2014-01-31 Jason Merrill <jason@redhat.com>
3515 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3516 [ck_list]: Check for error_mark_node.
3517 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3520 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3521 during partial ordering.
3523 2014-01-31 Marek Polacek <polacek@redhat.com>
3526 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3528 2014-01-30 Jason Merrill <jason@redhat.com>
3531 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3532 (local_specializations): New macro.
3533 * pt.c (local_specializations): Remove variable.
3535 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3538 * parser.c (make_string_pack): Use double_int::from_buffer.
3540 2014-01-30 Marek Polacek <polacek@redhat.com>
3543 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3545 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3546 with input_location.
3547 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3550 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3553 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3555 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3558 * pt.c (lookup_template_class_1): Check start_enum return value
3559 for error_mark_node.
3561 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3563 * decl.c (duplicate_decls, typename_hash, typename_compare):
3564 Use TYPE_IDENTIFIER.
3565 * error.c (dump_type): Likewise.
3566 * mangle.c (dump_substitution_candidates): Likewise.
3568 2014-01-30 Jason Merrill <jason@redhat.com>
3571 * decl2.c (attributes_naming_typedef_ok): New.
3572 * cp-tree.h: Declare it.
3573 * decl.c (grokdeclarator): Check it.
3574 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3576 2014-01-29 Jason Merrill <jason@redhat.com>
3579 * call.c (add_builtin_candidate): Catch dependent types.
3582 * pt.c (expand_template_argument_pack): Correct
3583 non_default_args_count calculation.
3586 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3589 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3590 have a friend template in a class template.
3591 * pt.c (tsubst_friend_function): Look through it.
3592 (push_template_decl_real): A friend member template is
3595 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3598 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3601 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3604 * pt.c (instantiate_template_1): Check for error_mark_node the second
3607 2014-01-29 Jason Merrill <jason@redhat.com>
3610 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3611 cdtor_returns_this case.
3614 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3616 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3619 * semantics.c (finish_omp_reduction_clause): Check type for
3622 2014-01-28 Jason Merrill <jason@redhat.com>
3625 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3626 (tsubst_copy): Use it if lookup fails.
3629 * pt.c (tsubst_function_type): Make sure we keep the same function
3633 * semantics.c (build_anon_member_initialization): Stop walking
3634 when we run out of COMPONENT_REFs.
3637 * decl.c (lookup_and_check_tag): Ignore template parameters if
3638 scope == ts_current.
3639 * pt.c (check_template_shadow): Don't complain about the injected
3642 * decl.c (duplicate_decls): Tweak.
3645 * mangle.c (write_unqualified_name): Handle operator auto.
3647 2014-01-27 Jason Merrill <jason@redhat.com>
3651 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3652 list-initialization. A conversion to rvalue ref that involves
3653 an lvalue-rvalue conversion is bad.
3654 (convert_like_real): Give helpful error message.
3657 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3660 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3664 * pt.c (template_parm_to_arg): Call convert_from_reference.
3665 (tsubst_template_arg): Don't strip reference refs.
3668 * call.c (build_aggr_conv): Reject value-initialization of reference.
3672 * call.c (convert_like_real): Give helpful error about excess braces
3673 for ck_rvalue of scalar type.
3676 * call.c (reference_binding): Only elide braces if the single
3677 element is reference-related.
3680 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3684 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3688 * decl.c (compute_array_index_type): Don't call
3689 maybe_constant_value for a non-integral expression.
3691 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3693 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3695 * cp-gimplify.c (cp_genericize): Likewise.
3696 * decl.c (grokfndecl): Likewise.
3697 * parser.c (cp_parser_postfix_expression): Likewise.
3698 (cp_parser_postfix_open_square_expression): Likewise.
3699 (cp_parser_direct_declarator): Likewise.
3700 (is_cilkplus_vector_p): Likewise.
3701 (cp_parser_omp_clause_name): Likewise.
3702 (cp_parser_omp_all_clauses): Likewise.
3703 * pt.c (apply_late_template_attributes): Likewise.
3704 * typeck.c (cp_build_array_ref): Likewise.
3705 (cp_build_compound_expr): Likewise.
3706 (check_return_expr): Likewise.
3708 2014-01-24 Jason Merrill <jason@redhat.com>
3711 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3716 * typeck2.c (process_init_constructor_array): Don't create
3719 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3721 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3722 handling for RANGE_ARRAY case.
3724 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3727 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3729 2014-01-23 Marek Polacek <polacek@redhat.com>
3732 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3734 2014-01-23 Marek Polacek <polacek@redhat.com>
3737 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3740 2014-01-23 Jason Merrill <jason@redhat.com>
3743 * cp-tree.h (struct language_function): Add infinite_loop and
3745 (current_function_infinite_loop): New.
3746 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3747 (break_maybe_infinite_loop): New.
3748 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3749 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3750 (begin_range_for_stmt): Use them.
3751 * decl.c (finish_function): Don't warn about missing return
3752 if current_function_infinite_loop.
3753 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3754 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3756 * call.c (build_op_delete_call): Use make_tree_vector and
3757 release_tree_vector.
3759 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3762 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3763 nested_name_specifier.
3765 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3767 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3768 see if there is an attribute after function decl. If so, then
3770 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3771 enabled function late parsing.
3772 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3773 attribute for a SIMD-enabled function.
3774 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3775 the function is used by SIMD-enabled function (indicated by NULL
3776 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3777 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3778 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3779 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3780 vectorlength clause. Added a new bool parameter to differentiate
3782 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3783 (is_cilkplus_vector_p): Likewise.
3784 (cp_parser_late_parsing_elem_fn_info): Likewise.
3785 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3786 and "vectorlength" clauses when Cilk Plus is enabled.
3787 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3788 and emit a sorry message when step size is a parameter.
3789 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3790 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3792 * pt.c (apply_late_template_attributes): Likewise.
3794 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3797 * semantics.c (finish_omp_reduction_clause): Reject
3798 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3800 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3803 * parser.c (cp_parser_class_head): Push the class before parsing
3804 the base-clause, pop after it.
3806 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3808 * decl2.c (cpp_check): Revert prototype change.
3810 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3814 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3817 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3820 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3821 only when errorcount == 0.
3823 2014-01-17 Marek Polacek <polacek@redhat.com>
3826 * cvt.c (ocp_convert): Don't segfault on non-existing
3827 ENUM_UNDERLYING_TYPE.
3829 2014-01-16 Jason Merrill <jason@redhat.com>
3832 * tree.c (bot_manip): Update the location of builtin_LINE and
3835 2014-01-14 Jason Merrill <jason@redhat.com>
3838 * typeck2.c (massage_init_elt): New.
3839 (process_init_constructor_record)
3840 (process_init_constructor_union): Use it.
3841 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3842 (split_nonconstant_init_1): Handle it.
3843 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3845 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3848 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3849 and replaced an existing if-statement with else-if statement.
3850 Changed an existing error message wording to match the one from the C
3853 2014-01-08 Jason Merrill <jason@redhat.com>
3856 * class.c (abi_tag_data): Add tags field.
3857 (check_abi_tags): Initialize it.
3858 (find_abi_tags_r): Support collecting missing tags.
3859 (mark_type_abi_tags): Don't look at template args.
3860 (inherit_targ_abi_tags): New.
3861 (check_bases_and_members): Use it.
3862 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3863 * mangle.c (write_abi_tags): Check it.
3865 2014-01-07 Jason Merrill <jason@redhat.com>
3868 * pt.c (num_innermost_template_parms): New.
3869 (get_underlying_template): Use it.
3872 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3874 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3876 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3877 the letter of 20.11.6 about Base and Derived naming the same
3878 class type modulo cv-qualifiers.
3880 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3883 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3884 function as unimplemented for generic lambdas with varargs.
3887 * parser.c (cp_parser_template_parameter): Early out with
3888 error_mark_node if parameter declaration was not parsed.
3891 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3892 auto_is_implicit_function_template_parm_p around lambda body.
3895 * parser.c (cp_parser_init_declarator): Undo fully implicit
3896 template parameter list when declarator is not a function.
3898 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3901 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3903 2014-01-03 Tobias Burnus <burnus@net-b.de>
3906 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3908 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3912 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3913 as include_std to perform_koenig_lookup.
3914 (cp_parser_postfix_expression): Adjust.
3915 * pt.c (tsubst_copy_and_build): Likewise.
3916 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3917 (omp_reduction_lookup): Adjust.
3918 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3919 (lookup_arg_dependent): Likewise.
3920 (lookup_function_nonclass): Adjust.
3921 * name-lookup.h: Adjust declaration.
3922 * cp-tree.h: Likewise.
3924 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3927 * parser.c (cp_parser_userdef_numeric_literal): Mention
3928 -fext-numeric-literals in the message.
3930 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3933 * call.c (build_conditional_expr_1): Check the return value of
3936 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3938 * call.c (convert_like_real): Check complain.
3940 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3943 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3946 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3948 Update copyright years
3950 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3952 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3953 the standard form for the copyright notice.
3955 Copyright (C) 2014 Free Software Foundation, Inc.
3957 Copying and distribution of this file, with or without modification,
3958 are permitted in any medium without royalty provided the copyright
3959 notice and this notice are preserved.