1 2014-12-15 Jan Hubicka <hubicka@ucw.cz>
3 * decl2.c (decl_needed_p): When not optimizing, do not consider external
6 2014-12-15 Jason Merrill <jason@redhat.com>
9 * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
11 N3778: Sized Deallocation
12 * call.c (non_placement_deallocation_fn_p): A global sized
13 operator delete is not a usual deallocation function until C++14.
14 (build_op_delete_call): Choose the global sized op delete if we
16 * cp-tree.h: Declare non_placement_deallocation_fn_p.
17 (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
18 (global_delete_fndecl): Remove.
19 * decl.c (cxx_init_decl_processing): Also declare sized op deletes.
20 (grok_op_properties): Warn about sized dealloc without the flag.
21 * init.c (build_builtin_delete_call): Remove.
22 (build_vec_delete_1, build_delete): Don't call it.
23 * decl2.c (maybe_warn_sized_delete): New.
24 (cp_write_global_declarations): Call it.
26 2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
29 * decl.c (check_array_designated_initializer): Diagnose gracefully
30 C99 designators which aren't integral constant-expressions; allow
31 constexpr user-defined type conversion operators.
33 2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
36 * semantics.c (finish_omp_reduction_clause): Early return true
37 if DECL_SAVED_TREE (id) is NULL_TREE.
39 2014-12-12 Jason Merrill <jason@redhat.com>
42 * pt.c (do_auto_deduction): In direct-init context, { x } deduces
45 * cp-tree.h (NAMESPACE_ABI_TAG): New.
46 * name-lookup.c (handle_namespace_attrs): Set it.
47 * class.c (check_tag): Split out from find_abi_tags_r.
48 (find_abi_tags_r): Also check namespace tags.
49 (mark_type_abi_tags): Also mark namespace tags.
51 2014-12-12 Kai Tietz <ktietz@redhat.com>
54 * constexpr.c (cxx_eval_loop_expr): Don't loop
55 endless on none-constant expression.
57 2014-12-12 Jason Merrill <jason@redhat.com>
60 * lambda.c (add_capture): Don't pass a dependent type to
61 variably_modified_type_p.
63 2014-12-11 Jason Merrill <jason@redhat.com>
65 Remove N3639 "array of runtime length" from -std=c++14.
66 * decl.c (compute_array_index_type): VLAs are not part of C++14.
67 (create_array_type_for_decl, grokdeclarator): Likewise.
68 * lambda.c (add_capture): Likewise.
69 * pt.c (tsubst): Likewise.
70 * rtti.c (get_tinfo_decl): Likewise.
71 * semantics.c (finish_decltype_type): Likewise.
72 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
73 (cp_build_addr_expr_1): Likewise.
74 * init.c (build_vec_init): Don't throw bad_array_length.
78 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
79 (cp_parser_primary_expression): Not here.
82 * typeck2.c (split_nonconstant_init_1): Handle arrays here.
83 (store_init_value): Not here.
84 (split_nonconstant_init): Look through TARGET_EXPR. No longer static.
85 * cp-tree.h: Declare split_nonconstant_init.
86 * call.c (set_up_extended_ref_temp): Use split_nonconstant_init.
88 2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
90 * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
93 2014-12-10 Kai Tietz <ktietz@redhat.com>
96 * parser.c (cp_parser_diagnose_invalid_type_name): Check id
97 for being an identifier before accessing it.
100 * typeck.c (lookup_destructor): Handle incomplete type.
102 2014-12-09 Jason Merrill <jason@redhat.com>
105 * decl.c (grokdeclarator): Recover from variable template
106 specialization declared as function.
109 * parser.c (cp_parser_unqualified_id): Don't declare fname while
110 parsing function parms.
112 2014-12-03 Jason Merrill <jason@redhat.com>
115 * decl.c (grok_reference_init): Complete array type.
118 * constexpr.c (cxx_eval_store_expression): Handle non-decl store
121 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com>
124 * decl.c (identify_goto): Return a bool if diagnostic is emitted.
125 (check_previous_goto_1): Consistently emit permerror + inform.
126 (check_goto): Likewise.
128 2014-12-03 Richard Biener <rguenther@suse.de>
130 * constexpr.c (cxx_eval_builtin_function_call): Use
131 fold_build_call_array_loc.
133 2014-12-02 Marek Polacek <polacek@redhat.com>
135 * constexpr.c (cxx_eval_check_shift_p): New function.
136 (cxx_eval_binary_expression): Call it. Set NON_CONSTANT_P if it
139 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
142 * decl.c (reshape_init_r): Do not reject value-initialization of
143 scalar array element.
145 2014-12-01 Marek Polacek <polacek@redhat.com>
148 * constexpr.c: Include ubsan.h.
149 (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
150 internal functions and for ubsan builtins.
151 * error.c: Include internal-fn.h.
152 (dump_expr): Add printing of internal functions.
154 2014-12-01 Marek Polacek <polacek@redhat.com>
156 * constexpr.c (literal_type_p): Return true for void type in C++14.
158 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
161 * typeck.c (finish_class_member_access_expr): Use %q#T instead of
162 %qD in error message.
164 2014-11-29 Jakub Jelinek <jakub@redhat.com>
166 * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
167 from create_tmp_var calls.
169 2014-11-28 Marek Polacek <polacek@redhat.com>
172 * typeck.c (cp_build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
173 convert the right operand to integer type.
175 2014-11-27 Kai Tietz <ktietz@redhat.com>
178 * constexpr.c (cxx_eval_vec_init_1): Avoid
181 2014-11-26 Jason Merrill <jason@redhat.com>
183 Allow partial specialization of variable templates.
184 * cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
185 * decl.c (duplicate_decls): Copy it.
186 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
187 * parser.c (cp_parser_decltype_expr): Do call finish_id_expression
189 * pt.c (register_specialization): Remember variable template insts.
190 (instantiate_template_1): Find the matching partial specialization.
191 (check_explicit_specialization): Allow variable partial specialization.
192 (process_partial_specialization): Likewise.
193 (push_template_decl_real): Likewise.
194 (more_specialized_partial_spec): Rename from more_specialized_class.
195 (most_specialized_partial_spec): Rename from most_specialized_class.
196 (get_partial_spec_bindings): Rename from get_class_bindings.
198 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
201 * call.c (standard_conversion): Do not require expr to be non-null
202 when NULLPTR_TYPE_P (from) is true.
204 2014-11-26 Jason Merrill <jason@redhat.com>
206 * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
209 * constexpr.c (cxx_eval_call_expression): Don't talk about
210 flowing off the end if we're already non-constant.
212 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
214 Diagnose string constant conversion to char* in c++11 and above
215 as forbidden, not deprecated.
216 * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
217 change the diagnostic for the Wwrite-strings case for c++11 and above.
219 2014-11-24 Jason Merrill <jason@redhat.com>
221 * pt.c (lookup_template_variable): Always unknown_type_node.
223 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
226 * parser.c (cp_parser_label_for_labeled_statement): Check the case
227 with check_for_bare_parameter_packs.
229 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
230 Paolo Carlini <paolo.carlini@oracle.com>
233 * decl.c (initialize_local_var): Add -Winit-self warning for
234 references initialized with themselves.
236 2014-11-24 Jason Merrill <jason@redhat.com>
239 * mangle.c (mangle_decl): If we aren't going to create a symbol
240 alias, don't build the alias DECL either.
242 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
245 * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
247 2014-11-21 Jason Merrill <jason@redhat.com>
251 * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
252 if the temporary has a non-trivial destructor.
253 * decl.c (poplevel): Don't look through references.
256 * name-lookup.c (supplement_binding_1): Override a mangling alias.
257 * mangle.c (maybe_remove_implicit_alias): New.
258 (mangle_decl): Always avoid creating conflicting alias.
262 * mangle.c (decl_mangling_context): Use template_type_parameter_p.
265 * pt.c (uses_template_parms): Handle null argument.
267 2014-11-21 Jakub Jelinek <jakub@redhat.com>
270 * typeck.c (cp_build_array_ref): Adjust
271 convert_vector_to_pointer_for_subscript caller. If it returns true,
272 call non_lvalue_loc on the result.
274 2014-11-20 Jason Merrill <jason@redhat.com>
277 * pt.c (convert_nontype_argument): Call convert_from_reference.
278 (check_instantiated_arg): Don't be confused by reference refs.
279 (unify): Look through reference refs on the arg, too.
280 * mangle.c (write_template_arg): Look through reference refs.
282 * error.c (dump_expr): Avoid printing (*&i) for references.
284 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
287 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
289 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
291 * cp-objcp-common.c: Use hash_table instead of htab.
293 2014-11-19 Jason Merrill <jason@redhat.com>
296 * cp-tree.h (struct processing_template_decl_sentinel): New.
297 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
298 (instantiate_non_dependent_expr_sfinae): Here.
299 (convert_nontype_argument): Use them.
300 * constexpr.c (fold_non_dependent_expr): Use them.
303 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
304 complain yet about a reference.
305 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
306 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
307 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
308 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
311 * init.c (decl_really_constant_value): Rename from
312 integral_constant_value.
313 (scalar_constant_value): Similar but limited to scalar results.
314 (decl_constant_value_safe): Remove.
315 (constant_value_1): Respect return_aggregate_cst_ok_p.
316 * typeck.c (decay_conversion): Use scalar_constant_value.
317 * call.c (convert_like_real): Likewise.
318 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
319 * typeck.c (decay_conversion): Or ARRAY_TYPE.
320 * constexpr.c (struct constexpr_ctx): Add strict field.
321 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
322 decl_constant_value and decl_really_constant_value.
323 (cxx_eval_outermost_constant_expr): Add strict parm.
324 (maybe_constant_init): Not strict.
325 (potential_constant_expression_1): Add strict parm.
326 Shorten most internal calls with RECUR macro.
327 * cp-tree.h, pt.c, semantics.c: Adjust.
329 2014-11-19 Jason Merrill <jason@redhat.com>
332 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
334 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
337 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
338 and __PRETTY_FUNCTION__.
340 2014-11-18 Jason Merrill <jason@redhat.com>
343 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
344 from a variable of empty class type is constant.
346 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
347 (potential_constant_expression_1): Handle STMT_EXPR.
349 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
351 (lots): Omit NULL jump_target arguments.
353 * constexpr.c (struct constexpr_ctx): Add quiet field.
354 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
355 (lots): Replace allow_non_constant parameter with ctx->quiet.
358 * constexpr.c (cxx_eval_binary_expression): Don't assume the
359 expression was already folded.
360 (cxx_eval_unary_expression): Likewise.
362 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
365 * rtti.c (emit_support_tinfos): Handle __float128.
367 2014-11-18 Jason Merrill <jason@redhat.com>
370 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
373 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
374 rather than VOID_TYPE_P.
376 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
379 * typeck2.c (store_init_value): Set it.
380 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
381 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
383 2014-11-17 Jason Merrill <jason@redhat.com>
386 * call.c (build_call_a): Don't warn_deprecated_use here.
387 (build_over_call): Or here.
388 * decl2.c (mark_used): Do it here.
389 (is_late_template_attribute): Attribute deprecated is not deferred.
390 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
391 * parser.c (cp_parser_template_name): Warn about deprecated template.
392 (cp_parser_template_argument): Likewise.
395 * decl.c (cp_finish_decl): Don't try to process a non-dependent
396 constant initializer for a reference.
397 * pt.c (value_dependent_expression_p): A reference is always
399 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
402 Handle C++14 constexpr flow control.
403 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
404 (cxx_eval_statement_list): New.
405 (cxx_eval_constant_expression): Handle LABEL_EXPR,
406 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
407 semantics of RETURN_EXPR.
408 (many functions): Add jump_target parameter.
409 (returns, breaks, continues, switches, label_matches): New.
410 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
411 * cp-gimplify.c (begin_bc_block): Set them.
413 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
414 (genericize_for_stmt): Handle null statement-list.
416 * constexpr.c (use_new_call): Always use new call handling.
418 C++14 constexpr support (minus loops and multiple returns)
419 * constexpr.c (use_new_call): New macro.
420 (build_data_member_initialization): Ignore non-mem-inits.
421 (check_constexpr_bind_expr_vars): Remove C++14 checks.
422 (constexpr_fn_retval): Likewise.
423 (check_constexpr_ctor_body): Do nothing in C++14.
424 (massage_constexpr_body): In C++14 only collect mem-inits.
425 (get_function_named_in_call): Handle null CALL_EXPR_FN.
426 (cxx_bind_parameters_in_call): Build bindings in same order as
427 parameters. Don't treat iniviref parms specially in new call mode.
428 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
429 based on DECL_SAVED_TREE rather than the massaged constexpr body.
430 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
431 (is_sub_constant_expr): Don't mess with ctx.ctor here.
432 (cxx_eval_component_reference): A null element means we're mid-
434 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
435 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
436 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
437 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
438 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
439 constexpr functions. In new-call mode find parms in the values table.
440 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
441 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
442 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
443 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
444 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
445 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
446 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
447 SWITCH_STMT, ASM_EXPR.
448 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
449 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
450 caller wants an lvalue.
451 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
452 (maybe_constant_init): Look through INIT_EXPR.
453 (ensure_literal_type_for_constexpr_object): Set
454 cp_function_chain->invalid_constexpr.
455 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
456 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
457 (check_for_uninitialized_const_var): Likewise.
458 (maybe_save_function_definition): Check it.
459 * parser.c (cp_parser_jump_statement): Set
460 cp_function_chain->invalid_constexpr.
461 (cp_parser_asm_definition): Likewise.
464 * decl.c (build_ptrmemfunc_type): Don't build a different
465 RECORD_TYPE for a qualified PMF.
466 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
467 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
468 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
469 * tree.c (cp_walk_subtrees): Likewise.
470 (cp_build_qualified_type_real): Remove special PMF handling.
472 2014-11-15 Jason Merrill <jason@redhat.com>
474 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
477 * constexpr.c (cxx_eval_builtin_function_call): Use
478 fold_builtin_call_array.
480 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
482 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
484 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
485 * parser.c (cp_parser_omp_clause_collapse): Likewise.
486 (cp_parser_enumerator_definition): Don't call
487 instantiate_non_dependent_expr...
488 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
489 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
490 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
491 the final gcc_assert.
493 * constexpr.c (fold_non_dependent_expr): Add.
494 * cp-tree.h (fold_non_dependent_expr): Declare it.
495 * call.c (null_ptr_cst_p): Use it.
496 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
497 * semantics.c (begin_maybe_infinite_loop): Likewise.
498 * typeck.c (cp_build_binary_op): Likewise.
499 * typeck2.c (check_narrowing): Likewise.
501 * pt.c (fold_non_dependent_expr): Rename to
502 instantiate_non_dependent_expr.
503 (fold_non_dependent_expr_sfinae): Rename to
504 instantiate_non_dependent_expr_sfinae.
505 (convert_nontype_argument, build_non_dependent_expr): Adjust.
506 * decl.c (compute_array_index_type): Likewise.
507 * parser.c (cp_parser_parenthesized_expression_list,
508 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
510 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
512 * typeck.c (cxx_alignas_expr): Likewise.
513 * typeck2.c (store_init_value, massage_init_elt): Likewise.
514 * call.c: Adjust comments.
516 * constexpr.c: Likewise.
520 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
522 * mangle.c (find_substitution): Look for abi_tag on class templates.
524 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
525 Thomas Schwinge <thomas@codesourcery.com>
526 Ilya Verbin <ilya.verbin@intel.com>
527 Andrey Turetskiy <andrey.turetskiy@intel.com>
529 * Make-lang.in (c++.install-common): Do not install for the offload
532 2014-11-13 Kai Tietz <ktietz@redhat.com>
534 * cp-tree.h (cp_build_function_call): Remove prototype.
535 (cp_build_addr_expr_strict): Likewise.
536 (build_typed_address): Likewise.
537 * typeck.c (build_typed_address): Removed.
538 (cp_build_addr_expr_strict): Make static.
539 (cp_build_function_call): Likewise.
541 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
545 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
546 * decl.c (grokdeclarator): Use it.
547 * parser.c (cp_parser_simple_type_specifier): Likewise.
548 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
550 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
553 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
554 constant the condition.
556 2014-11-10 Andi Kleen <ak@linux.intel.com>
558 * semantics.c (finish_goto_stmt): Call check_no_cilk.
559 (finish_while_stmt_cond): Dito.
560 (finish_do_stmt): Dito.
561 (finish_for_cond): Dito.
562 (finish_switch_cond): Dito.
564 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
566 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
567 OPT_Wshift_count_overflow in the warnings.
569 2014-11-09 Jason Merrill <jason@redhat.com>
572 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
573 same scalar type is an rvalue.
576 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
578 2014-11-07 Jason Merrill <jason@redhat.com>
581 * pt.c (dependent_alias_template_spec_p): New.
582 (dependent_type_p_r): Handle dependent alias template specialization.
583 (template_args_equal): A dependent alias template specializations
584 is not equal to its underlying type as a template argument.
585 * tree.c (strip_typedefs): Don't strip a dependent alias
588 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
589 (cp_parser_primary_expression): Not here.
591 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
594 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
596 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
598 * constexpr.c: Remove redundant enum from machine_mode.
600 2014-10-28 Jason Merrill <jason@redhat.com>
602 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
604 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
606 * call.c: Adjust include files.
615 * semantics.c: Ditto.
617 * vtable-class-hierarchy.c: Ditto.
619 2014-10-24 Jason Merrill <jason@redhat.com>
621 Implement N3653 (Member initializers and aggregates) and fix
622 references to 'this' in constexpr constructors.
623 * class.c (check_field_decls): In C++14 an NSDMI does not make the
625 * constexpr.c (struct constexpr_ctx): New.
626 (cxx_bind_parameters_in_call): Handle 'this'.
627 (cxx_eval_call_expression): Create new constexpr_ctx.
628 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
629 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
630 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
631 (cxx_eval_vec_init_1): Likewise.
632 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
633 [TARGET_EXPR]: Build new constexpr_ctx.
634 [PLACEHOLDER_EXPR]: New.
635 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
637 (is_sub_constant_expr): Build new constexpr_ctx.
638 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
640 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
641 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
642 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
643 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
644 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
645 (build_ctor_subob_ref, replace_placeholders): New.
646 * typeck2.c (store_init_value): Use replace_placeholders.
647 (process_init_constructor_record): Make zero-init before NSDMI
650 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
652 * cp-gimplify.c: Adjust include files.
654 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
657 * cp-objcp-common.c: Do not include new.
658 (cxx_initialize_diagnostics): Move from here to ...
659 * error.c (cxx_initialize_diagnostics): : ... here. Move
660 diagnostics initialization here from init_error.
661 (cxx_pp): Use a real pointer not a macro.
662 (init_error): Just initialize cxx_pp.
663 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
664 not set maximum line length.
666 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
669 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
671 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
673 * parser.c (cp_parser_unary_expression): Add default arguments.
674 (cp_parser_cast_expression, cp_parser_sizeof_operand,
675 cp_parser_omp_atomic): Adjust.
677 2014-10-20 Jason Merrill <jason@redhat.com>
680 * lambda.c (current_nonlambda_function): New.
681 * semantics.c (finish_this_expr): Use it.
682 * cp-tree.h: Declare it.
684 2014-10-17 Alan Modra <amodra@gmail.com>
687 * decl.c (merge_decls): Don't merge section name, comdat group or
688 tls model to newdecl symtab node, instead merge to olddecl.
689 Override existing olddecl section name. Set tls_model for all
690 thread-local vars, not just OMP thread-private ones. Remove
693 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
695 * cp-tree.h: Adjust include files.
697 2014-10-15 Jason Merrill <jason@redhat.com>
700 * pt.c (lookup_template_variable): Call coerce_template_parms.
702 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
704 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
705 ensure_literal_type_for_constexpr_object,
706 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
707 retrieve_constexpr_fundef, is_valid_constexpr_fn,
708 build_anon_member_initialization, build_data_member_initialization,
709 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
710 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
711 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
712 massage_constexpr_body, cx_check_missing_mem_inits,
713 register_constexpr_fundef, explain_invalid_constexpr_fn,
714 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
715 maybe_initialize_constexpr_call_table, get_function_named_in_call,
716 get_nth_callarg, lookup_parameter_binding,
717 cxx_eval_builtin_function_call, adjust_temp_type,
718 cxx_bind_parameters_in_call, push_cx_call_context,
719 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
720 reduced_constant_expression_p, verify_constant,
721 cxx_eval_unary_expression, cxx_eval_binary_expression,
722 cxx_eval_conditional_expression, cxx_eval_array_reference,
723 cxx_eval_component_reference, cxx_eval_bit_field_ref,
724 cxx_eval_logical_expression, base_field_constructor_elt,
725 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
726 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
727 cxx_eval_trinary_expression, var_in_constexpr_fn,
728 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
729 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
730 maybe_constant_init, potential_constant_expression_1,
731 potential_constant_expression, potential_rvalue_constant_expression,
732 require_potential_constant_expression,
733 require_potential_rvalue_constant_expression): Moved definitions...
734 * constexpr.c: ... here, new file.
735 * Make-lang.in: Update.
736 * config-lang.in: Likewise.
738 2014-10-14 Jason Merrill <jason@redhat.com>
741 * parser.c (struct saved_token_sentinel): New.
742 (cp_parser_statement): Use it.
743 (cp_parser_start_tentative_firewall): New.
744 (cp_parser_end_tentative_firewall): New.
745 (cp_parser_lambda_expression): Use them.
746 (cp_parser_statement_expr): New.
747 (cp_parser_primary_expression): Use it.
749 2014-10-14 DJ Delorie <dj@redhat.com>
751 * typeck.c (cp_common_type): Check for all __intN types, not just
753 * decl.c (grokdeclarator): Likewise.
754 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
756 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
757 for all __intN types, not just __int128.
758 (cp_parser_simple_type_specifier): Likewise.
759 * mangle.c (integer_type_codes): Remove int128-specific codes.
760 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
761 __intN was specified.
762 * lex.c (init_reswords): Reserve all __intN keywords.
764 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
766 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
768 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
770 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
772 (print_template_statistics): Cast size and elements to long.
774 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
776 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
777 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
780 2014-10-10 Jason Merrill <jason@redhat.com>
783 * class.c (build_base_path): Preserve rvalueness.
784 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
785 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
788 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
790 * method.c (implicitly_declare_fn): Handle deleted lambda default
791 ctor and copy assop here.
792 * class.c (check_bases_and_members): Not here.
793 (add_implicitly_declared_members): And don't set
794 CLASSTYPE_LAZY_MOVE_ASSIGN.
796 * semantics.c (finish_id_expression): Check for error_mark_node.
798 2014-10-09 Jason Merrill <jason@redhat.com>
801 * semantics.c (outer_var_p): Non-static.
802 (process_outer_var_ref): Split out from finish_id_expression.
803 * pt.c (tsubst_copy_and_build): Call them.
804 * cp-tree.h: Declare them.
806 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
808 * semantics.c (check_constexpr_ctor_body_1): New.
809 (check_constexpr_ctor_body): Use it; add bool parameter.
810 (build_data_member_initialization): Handle BIND_EXPR and
811 USING_STMT in the main conditional.
812 (build_constexpr_constructor_member_initializers): Do not
813 handle BIND_EXPR here.
814 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
815 (massage_constexpr_body): Don't do it here.
816 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
817 Adjust check_constexpr_ctor_body call.
818 (cp_parser_compound_statement): Do not pedwarn for compound-statement
819 in constexpr function in C++14 mode.
820 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
822 2014-10-09 Jason Merrill <jason@redhat.com>
825 * parser.c (cp_parser_class_head): push_template_decl for members
829 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
830 (iterative_hash_template_arg): Likewise.
833 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
834 * semantics.c (force_paren_expr): And set it.
835 * typeck.c (check_return_expr): And handle it.
837 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
839 * decl.c (grokdeclarator): constexpr only implies const in C++11.
841 2014-10-08 Jason Merrill <jason@redhat.com>
844 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
847 * tree.c (build_cplus_array_type): Look for a type with no
848 typedef-name or attributes.
850 * call.c (call_copy_ctor): New.
851 (build_over_call): Use it to avoid infinite recursion on invalid code.
853 2014-10-07 Jason Merrill <jason@redhat.com>
855 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
857 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
859 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
861 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
864 * semantics.c (check_constexpr_bind_expr_vars): New.
865 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
866 (build_constexpr_constructor_member_initializers): Handle
867 BIND_EXPR in the main conditional.
869 2014-10-02 Mark Wielaard <mjw@redhat.com>
872 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
873 (cp_function_decl_deleted_p): New prototype.
874 * cp-objcp-common.c (cp_function_deleted_p): New function.
876 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
881 * typeck.c (cp_build_binary_op): save_expr after convert to save
882 redundant operations.
883 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
884 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
886 2014-10-03 Jason Merrill <jason@redhat.com>
888 * decl.c (start_decl): Complain about static/thread_local vars
889 in constexpr function.
890 (check_for_uninitialized_const_var): Also uninitialized vars.
891 * parser.c (cp_parser_jump_statement): And gotos.
892 (cp_parser_asm_operand_list): And asm.
893 (cp_parser_try_block): And try.
894 * semantics.c (ensure_literal_type_for_constexpr_object): And
897 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
898 (var_in_constexpr_fn): New.
899 (cxx_eval_constant_expression): Look into DECL_INITIAL.
900 (potential_constant_expression_1): Allow constexpr-local vars.
903 * tree.c (strip_typedefs): Handle TREE_LIST.
905 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
907 * parser.c (cp_parser_assignment_expression,
908 cp_parser_constant_expression): Add default arguments.
909 (cp_parser_primary_expression,
910 cp_parser_postfix_open_square_expression,
911 cp_parser_parenthesized_expression_list,
912 cp_parser_question_colon_clause,
913 cp_parser_expression, cp_parser_constant_expression,
914 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
915 cp_parser_template_argument, cp_parser_enumerator_definition,
916 cp_parser_member_declaration, cp_parser_constant_initializer,
917 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
918 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
919 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
920 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
921 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
922 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
923 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
925 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
928 * cp-tree.h (struct saved_scope): Add noexcept_operand.
929 (cp_noexcept_operand): Define.
930 * call.c (build_over_call): Use it.
931 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
932 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
934 2014-10-01 Jason Merrill <jason@redhat.com>
937 * method.c (constructible_expr): Handle value-init of non-class.
938 * parser.c (cp_parser_trait_expr): Allow pack expansion.
939 * pt.c (tsubst_copy_and_build): Handle pack expansion.
942 * class.c (type_has_non_user_provided_default_constructor): Rename
943 from type_has_user_provided_default_constructor, reverse sense.
944 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
945 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
946 * call.c (build_new_method_call_1): Adjust.
948 * decl.c (grok_special_member_properties): Don't set
949 TYPE_HAS_COMPLEX_DFLT.
950 * init.c (build_value_init_noctor): Don't use
951 type_has_user_provided_default_constructor.
953 2014-09-30 Jason Merrill <jason@redhat.com>
955 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
956 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
957 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
958 * parser.c (cp_parser_primary_expression): Likewise.
959 (cp_parser_trait_expr): Likewise. Handle variadic trait.
960 * semantics.c (trait_expr_value): Likewise.
961 (finish_trait_expr): Likewise.
962 (check_trait_type): Handle variadic trait. Return bool.
963 * method.c (build_stub_object): Add rvalue reference here.
964 (locate_fn_flags): Not here.
965 (check_nontriv, assignable_expr, constructible_expr): New.
966 (is_trivially_xible): New.
968 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
969 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
970 * parser.c (cp_parser_primary_expression): Likewise.
971 (cp_parser_trait_expr): Likewise.
972 * semantics.c (trait_expr_value): Likewise.
973 (finish_trait_expr): Likewise.
975 * method.c (build_stub_object): Use CONVERT_EXPR.
976 * tree.c (build_dummy_object): Likewise.
977 (is_dummy_object): Adjust.
979 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
980 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
981 * semantics.c (trait_expr_value): Likewise.
982 (finish_trait_expr): Likewise.
983 * parser.c (cp_parser_primary_expression): Likewise.
984 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
986 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
989 * error.c (print_instantiation_context): Delete.
990 * typeck2.c (build_x_arrow): Record location when pushing
991 template instantiation.
992 * pt.c (push_tinst_level): Make it a wrapper around ...
993 (push_tinst_level_loc): ... this. New function. Make excessive
994 template instantiation depth a fatal error. Record location. Use
996 (instantiate_pending_templates): Make excessive
997 template instantiation depth a fatal error.
998 (problematic_instantiation_changed): Use bool as return type.
999 * cp-tree.h (print_instantiation_context): Delete.
1000 (push_tinst_level): Update declaration.
1001 (problematic_instantiation_changed): Likewise.
1002 (push_tinst_level_loc): New.
1004 2014-09-29 Richard Biener <rguenther@suse.de>
1006 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
1009 2014-09-26 Jason Merrill <jason@redhat.com>
1011 * mangle.c (find_substitution): Use write_abi_tags.
1013 2014-09-25 Marek Polacek <polacek@redhat.com>
1016 * class.c (warn_hidden): Check for FUNCTION_DECL.
1018 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1021 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
1022 on low_bound and length.
1024 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1026 * class.c, decl.c, optimize.c: Rename all instances of
1027 DECL_ABSTRACT to DECL_ABSTRACT_P.
1029 2014-09-24 Marek Polacek <polacek@redhat.com>
1033 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
1034 * tree.c (bot_manip): Add default case.
1035 * parser.c (cp_parser_primary_expression): Cast the controlling
1036 expression of a switch to an int.
1037 (cp_parser_unqualified_id): Likewise.
1039 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
1042 * parser.c (cp_parser_skip_to_closing_square_bracket,
1043 cp_parser_array_designator_p): New.
1044 (cp_parser_initializer_list): Use the latter.
1046 2014-09-22 Jason Merrill <jason@redhat.com>
1048 * semantics.c (finish_non_static_data_member): In diagnostic, give
1049 error at point of use and note at point of declaration.
1054 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
1057 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
1060 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
1062 2014-09-22 Jason Merrill <jason@redhat.com>
1064 * decl.c (poplevel): Don't warn about unused vars in template scope.
1065 * error.c (dump_decl): Handle variable templates.
1067 2014-09-20 Jason Merrill <jason@redhat.com>
1070 * decl.c (begin_destructor_body): Only clobber the as-base part of
1073 2014-09-19 Jason Merrill <jason@redhat.com>
1076 * mangle.c (write_expression): Use unresolved-name mangling for
1080 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
1081 after pulling out an element from a CONSTRUCTOR.
1083 2014-09-18 Jakub Jelinek <jakub@redhat.com>
1086 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
1087 on type of type dependent expressions, and don't call it if
1088 handle_omp_array_sections has kept TREE_LIST because something
1090 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
1091 Use keep_next_level, begin_omp_structured_block and
1092 finish_omp_structured_block instead of push_stmt_list and
1095 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1098 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
1099 for final class types.
1101 2014-09-15 Jason Merrill <jason@redhat.com>
1103 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
1104 necessary. Call inherit_targ_abi_tags here.
1105 * class.c (check_bases_and_members): Not here.
1106 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
1107 * cp-tree.h: Declare inherit_targ_abi_tags.
1109 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1111 Do not diagnose lambda default arguments in c++14 modes.
1112 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
1115 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1117 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
1120 2014-09-13 Marek Polacek <polacek@redhat.com>
1123 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
1124 location of a call expression.
1126 2014-09-11 Jason Merrill <jason@redhat.com>
1129 * decl.c (start_decl): Handle specialization of member variable
1131 * pt.c (check_explicit_specialization): Adjust error.
1133 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
1136 * typeck2.c (process_init_constructor_record): Do not warn about
1137 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
1139 2014-09-11 Jason Merrill <jason@redhat.com>
1142 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
1143 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
1145 2014-09-10 Jason Merrill <jason@redhat.com>
1148 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
1149 (duplicate_decls, start_decl): Likewise.
1150 * pt.c (check_explicit_specialization): Likewise.
1151 (push_template_decl_real): Or static templates.
1153 2014-09-08 Jason Merrill <jason@redhat.com>
1155 * typeck.c (build_class_member_access_expr): Move
1156 -Winvalid-offsetof code...
1157 * semantics.c (finish_offsetof): ...here.
1158 * parser.c (cp_parser_builtin_offsetof): Remember the location of
1160 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
1163 * pt.c (instantiate_decl): Handle recursive instantiation of
1166 2014-09-05 Jason Merrill <jason@redhat.com>
1169 * semantics.c (potential_constant_expression_1): Handle un-folded
1170 pointer to member constants.
1172 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
1175 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
1176 newdecl, not olddecl.
1178 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1181 * class.c (check_field_decls): A class of literal type cannot have
1182 volatile non-static data members and base classes.
1183 (explain_non_literal_class): Update.
1185 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1186 Balaji V. Iyer <balaji.v.iyer@intel.com>
1187 Igor Zamyatin <igor.zamyatin@intel.com>
1189 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
1191 * parser.c (cp_parser_cilk_for): New function.
1192 (cp_parser_cilk_grainsize): Likewise.
1193 (cp_parser_statement): Added RID_CILK_FOR case.
1194 (cp_parser_omp_for_cond): Added CILK_FOR check.
1195 (cp_parser_omp_for_loop_init): Change function argument to accept
1196 tree_code instead just a bool flag; change the check to use that
1197 tree_code; check for initialization declaration in case of Cilk_for.
1198 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
1199 changed call to cp_parser_omp_for_loop_init according new arguments'
1201 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1202 * pt.c (tsubst_expr): Added CILK_FOR case.
1203 * semantics.c: Include convert.h.
1204 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
1205 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
1206 (handle_omp_for_class_iterator): New argument lastp and its usage;
1208 (finish_omp_for): Changed call to handle_omp_for_class_iterator
1209 according new arguments' list; in case of Cilk_for save very first
1210 decl and create empty stmt_list block; use block to build correct
1213 2014-08-31 Jason Merrill <jason@redhat.com>
1216 * optimize.c (cdtor_comdat_group): Just look at the
1217 DECL_ASSEMBLER_NAME of the 'tors.
1219 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1222 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
1223 result of cxx_eval_constant_expression.
1225 2014-08-26 Jason Merrill <jason@redhat.com>
1228 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
1229 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
1230 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
1233 2014-08-25 Jason Merrill <jason@redhat.com>
1235 * pt.c (check_explicit_specialization): Don't complain about
1236 non-template variable.
1237 (template_for_substitution): Allow variable templates.
1238 (check_template_variable): Fix logic for member var template.
1239 * decl.c (start_decl): Don't complain about extra template header
1242 * decl.c (start_decl): Look through member variable template.
1243 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
1244 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
1247 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
1250 * cp-tree.h (TFF_POINTER): Add.
1251 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1253 * error.c (dump_type_suffix): Actually print the const and noreturn
1254 attribute when appropriate.
1256 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1258 * decl.c (compute_array_index_type, grokdeclarator,
1259 undeduced_auto_decl): Change from cxx1y to cxx14.
1260 *lambda.c(add_capture()): Change error message from C++1y to C++14.
1261 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1262 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1263 cp_parser_decltype, cp_parser_conversion_type_id,
1264 cp_parser_simple_type_specifier, cp_parser_type_id_1,
1265 cp_parser_template_type_arg, cp_parser_std_attribute,
1266 cp_parser_template_declaration_after_export): Ditto.
1267 * pt.c (tsubst): Ditto.
1268 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1269 * tree.c: Change comment.
1270 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1271 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1273 2014-08-23 Jason Merrill <jason@redhat.com>
1275 Allow non-constexpr variable templates.
1276 * decl2.c (note_variable_template_instantiation): New.
1277 * cp-tree.h: Declare it.
1278 * pt.c (instantiate_decl): Call it.
1279 (push_template_decl_real): Allow non-constexpr variable templates.
1280 * semantics.c (finish_id_expression): Mark the variable template
1281 instantiation as used.
1282 * mangle.c (write_mangled_name): Variable template instantiations
1284 * parser.c (cp_parser_init_declarator): Complain about
1285 non-function implicit templates.
1287 2014-08-22 Marek Polacek <polacek@redhat.com>
1290 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1291 preceded with logical not. Adjust call to
1292 warn_logical_not_parentheses.
1294 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1297 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1298 declaration shadows a function declaration, unless the former
1299 declares a function, pointer to function or pointer to member
1300 function, because this is a common and valid case in real-world
1302 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1303 Improve description.
1305 2014-08-22 Jason Merrill <jason@redhat.com>
1308 * class.c (outermost_open_class): Fix logic.
1309 * decl.c (complete_vars): Fix logic.
1311 2014-08-22 Jason Merrill <jason@redhat.com>
1314 * class.c (outermost_open_class): New.
1315 * cp-tree.h: Declare it.
1316 * decl.c (maybe_register_incomplete_var): Use it.
1317 (complete_vars): Handle any constant variable.
1318 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1320 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1323 * cp-array-notation.c (build_array_notation_ref): Added correct
1324 handling of case with incorrect array.
1326 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1329 * error.c (cp_diagnostic_finalizer): Delete.
1330 (init_error): Do not set diagnostic_finalizer here.
1332 2014-08-19 Marek Polacek <polacek@redhat.com>
1335 * call.c (build_new_op_1): Remember the type of arguments for
1336 a comparison. If either operand of a comparison is a boolean
1337 expression, call maybe_warn_bool_compare.
1339 2014-08-19 Jason Merrill <jason@redhat.com>
1341 PR tree-optimization/62091
1342 * decl2.c (decl_needed_p): Return true for virtual functions when
1347 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1350 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1352 * class.c (contains_empty_class_p): Remove.
1354 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1356 * parser.c (cp_parser_expression): Add default arguments.
1357 (cp_parser_primary_expression, cp_parser_postfix_expression,
1358 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1359 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1360 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1361 cp_parser_lambda_body, cp_parser_expression_statement,
1362 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1363 cp_parser_iteration_statement, cp_parser_jump_statement,
1364 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1365 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1366 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1367 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1368 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1369 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1370 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1371 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1372 cp_parser_transaction_expression): Adjust.
1374 2014-08-15 Jason Merrill <jason@redhat.com>
1377 * pt.c (lookup_template_class_1): Revert recent change.
1378 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1381 * pt.c (instantiate_class_template_1): Ignore lambda on
1382 CLASSTYPE_DECL_LIST.
1383 (push_template_decl_real): A lambda is not primary.
1384 (lookup_template_class_1): Don't look for a lambda partial
1386 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1387 currently in a function and the lambda living in a function.
1388 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1390 2014-08-15 Richard Biener <rguenther@suse.de>
1391 Jason Merrill <jason@redhat.com>
1394 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1395 (build_cplus_array_type): ...from here. Only call build_array_type
1398 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1402 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1406 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1407 cv-qualifiers of function types.
1409 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1411 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1413 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1415 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1416 cp_build_array_ref, cp_build_function_call_vec): When a
1417 pedwarn is suppressed under SFINAE, return error_mark_node.
1419 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1420 tf_warning_or_error, where complain is a bool, glitch.
1422 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1425 * decl.c (grokdeclarator): Move the check for friend initializers..
1426 * decl2.c (grokfield) ..here. Postpone early return for friends
1427 until after the initializer check.
1429 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1432 * pt.c (coerce_template_parms): Improve error message vs default
1435 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1437 * parser.c (cp_parser_init_declarator): Remove redundant check of
1438 decl_specifiers->type.
1440 2014-08-13 Jason Merrill <jason@redhat.com>
1442 * call.c (build_x_va_arg): Support passing non-POD through ....
1443 (convert_arg_to_ellipsis): Likewise.
1445 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1447 * pt.c (lookup_template_variable): Make dependent variable templates
1450 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1452 * parser.c (cp_parser_elaborated_type_specifier): Handle
1453 specially cp_parser_template_id returning a BASELINK.
1455 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1457 * parser.c (cp_parser_diagnose_invalid_type_name,
1458 cp_parser_make_typename_type): Remove scope parameter.
1459 (cp_parser_parse_and_diagnose_invalid_type_name,
1460 cp_parser_elaborated_type_specifier): Adjust calls.
1462 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1464 Reject virt-specifiers on friends and member templates
1465 * friend.c (do_friend): Diagnose virt-specifiers.
1466 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1468 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1470 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1471 return type to bool; in C++11 for constants give errors, not pedwarns.
1472 * cp-tree.h (check_narrowing): Adjust declaration.
1473 * call.c (convert_like_real): Update calls.
1474 * semantics.c (finish_compound_literal): Likewise.
1476 2014-08-08 Jason Merrill <jason@redhat.com>
1478 * pt.c (lookup_template_class_1): Copy abi_tag.
1480 2014-08-08 Kai Tietz <ktietz@redhat.com>
1482 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1483 that we operate on a true inline.
1485 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1487 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1488 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1490 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1493 * decl.c (build_enumerator): Handle class types with conversion
1494 operators via perform_implicit_conversion_flags and
1495 build_expr_type_conversion.
1497 * cvt.c (build_expr_type_conversion): Replace pair of errors
1498 with error + inform.
1500 2014-08-07 Jason Merrill <jason@redhat.com>
1503 * parser.c (c_parse_file): Change sorry to fatal_error.
1506 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1508 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1510 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1512 2014-08-06 Jason Merrill <jason@redhat.com>
1514 * init.c (build_vec_init): Fix constant initialization of
1516 (build_value_init_noctor): Call maybe_constant_init.
1517 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1521 * init.c (build_vec_init): Reorganize earlier change a bit.
1524 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1525 if we're just returning an INIT_EXPR.
1527 2014-08-06 Jason Merrill <jason@redhat.com>
1528 Braden Obrzut <admin@maniacsvault.net>
1530 * pt.c (check_explicit_specialization): Don't test
1531 DECL_DECLARED_INLINE_P for a variable template.
1533 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1536 * typeck.c (cp_build_binary_op): Extend to more cases the
1539 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1541 Implement constexpr variable templates
1542 * decl.c (grokvardecl): Handle specializations of variable templates.
1543 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1544 return from grokvardecl.
1545 * decl2.c (check_member_template): Allow declaration of template member
1547 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1549 * pt.c (check_template_variable): Accept variable temploids at
1551 (push_template_decl_real): The current instantiation of a template
1553 (determine_specialization): Accept variable templates.
1554 (check_explicit_specialization): Handle and check for malformed
1555 variable template specializations.
1556 (lookup_template_variable): New.
1557 (tsubst_decl): Handle variable template specializations.
1558 (do_decl_instantiation): Handle template variables.
1559 (instantiate_decl): Handle template variables.
1560 * semantics.c (finish_template_variable): New.
1561 (finish_id_expression): Instantiate variable templates.
1562 * cp-tree.h (variable_template_p): New.
1564 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1567 * decl.c (check_redeclaration_no_default_args): New.
1568 (duplicate_decls): Use it, handle default arguments
1569 in redeclarations of function templates.
1571 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1573 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1575 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1577 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1578 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1579 instead of pointer_set.
1581 2014-08-01 Jason Merrill <jason@redhat.com>
1584 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1585 init-list for trailing elements.
1586 * typeck2.c (process_init_constructor_array): Likewise.
1588 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1591 * decl.c (duplicate_decls): Handle static member functions too.
1593 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1595 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1598 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1601 * parser.c (cp_parser_array_notation): Added check for array_type.
1603 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1606 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1607 DECL_EXPR improved. Changed handling for INIT_EXPR.
1609 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1611 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1613 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1615 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1616 -fsanitize=alignment call ubsan_maybe_instrument_reference
1617 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1618 for calls to member functions.
1620 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1623 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1624 whether it is returning the address of a local variable.
1625 (check_return_expr): Return 0 instead of the address of a local
1628 2014-07-30 Jason Merrill <jason@redhat.com>
1632 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1634 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1637 * pt.c (unify_arity): Add boolean parameter.
1638 (unify_too_few_arguments): Likewise.
1639 (type_unification_real): Diagnose correctly insufficient
1640 arguments in the presence of trailing variadic parameters;
1641 deducing multiple trailing packs as empty is fine.
1643 2014-07-30 Jason Merrill <jason@redhat.com>
1648 * decl2.c (mark_all_virtuals): New variable.
1649 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1650 (cp_write_global_declarations): Set it and give helpful diagnostic
1651 if it introduces errors.
1652 * class.c (finish_struct_1): Check it.
1656 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1657 (check_explicit_specialization): Clear it on specializations.
1658 * decl.c (duplicate_decls, start_decl): Likewise.
1659 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1660 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1661 linkage after setting the appropriate flags.
1662 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1663 * decl2.c (mark_needed): Mark clones.
1664 (import_export_decl): Not here.
1666 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1668 Implement N4051 - Allow typename in a template template parameter
1669 * parser.c (cp_parser_type_parameter_key): New funtion;
1670 (cp_parser_token_is_type_parameter_key): Ditto;
1671 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1672 but pedwarn for less than cxx1z.
1674 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1677 * call.c (standard_conversion): Use resolve_nondeduced_context
1678 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1680 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1683 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1686 2014-07-15 Jason Merrill <jason@redhat.com>
1689 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1693 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1694 * class.c (finish_struct): Reject invalid definition of
1695 std::initializer_list.
1697 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1699 * call.c (convert_like_real): Call print_z_candidate and inform only
1700 if permerror returns true.
1702 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1704 * class.c (build_clone): Do not clear assembler names of
1706 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1707 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1708 as a special case return sizeof (struct tree_decl_non_common)
1710 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1711 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1712 * cp/cp-tree.h (tree_template_decl): New structure.
1713 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1714 (union cp_lang_tree_node): Add template_decl.
1715 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1717 2014-07-14 Jason Merrill <jason@redhat.com>
1721 * pt.c (instantiate_decl): Don't check defer_ok for local class
1724 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1727 * cp-tree.h (LITERAL_ZERO_P): Define.
1728 * parser.c (cp_parser_parenthesized_expression_list): Add
1729 want_literal_zero_p argument, if true, for literal zeros
1730 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1731 (cp_parser_postfix_expression): Adjust
1732 cp_parser_parenthesized_expression_list caller, handle
1733 -Wmemset-transposed-args.
1734 (literal_zeros): New variable.
1736 2014-07-13 Jason Merrill <jason@redhat.com>
1739 * semantics.c (is_instantiation_of_constexpr): Return true for
1740 defaulted functions, too.
1741 (explain_invalid_constexpr_fn): Only use
1742 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1743 * method.c (explain_implicit_non_constexpr): Pass
1744 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1747 * decl.c (check_initializer): Don't finish_compound_literal
1748 on erroneous constexpr init.
1751 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1754 * decl.c (create_array_type_for_decl): Only check for auto once.
1757 * call.c (build_list_conv): Don't try to build a list of references.
1759 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1761 PR C++/60209 - Declaration of user-defined literal operator cause error
1762 * parser.c (cp_parser_operator): Fold treatment of strings
1763 and user-defined string literals. Use the full string parser.
1764 (cp_parser_string_literal): Add flag to not look for literal operator.
1766 2014-07-11 Jason Merrill <jason@redhat.com>
1770 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1772 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1775 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1777 * decl.c (check_initializer): Don't call check_narrowing here,
1778 set LOOKUP_NO_NARROWING.
1779 * typeck2.c (digest_init_r): Likewise.
1781 2014-07-10 Jason Merrill <jason@redhat.com>
1784 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1788 * decl2.c (mark_all_virtuals): New variable.
1789 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1790 (cp_write_global_declarations): Set it and give helpful diagnostic
1791 if it introduces errors.
1792 * class.c (finish_struct_1): Check it.
1793 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1795 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1798 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1799 outside class declaration, in friend declaration, and neither on
1800 constructor nor conversion operator.
1802 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1806 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1807 cv-qualifiers of function types.
1809 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1810 Paolo Carlini <paolo.carlini@oracle.com>
1813 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1816 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1818 * class.c (check_for_override): Wrap the 'final' and 'override'
1819 keywords in %< and %>.
1821 2014-07-06 Marek Polacek <polacek@redhat.com>
1824 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1825 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1826 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1829 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1831 * pt.c (convert_template_argument): Use inform instead of error in
1834 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1839 * parser.c (cp_parser_userdef_string_literal): Take a tree
1841 (cp_parser_string_literal): Don't hack the token stream.
1843 2014-06-30 Jason Merrill <jason@redhat.com>
1847 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1849 * init.c (build_vtbl_address): Don't mark destructor.
1850 * class.c (finish_struct_1): Add all classes to keyed_classes
1854 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1857 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1859 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1860 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1861 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1862 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1863 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1864 * pt.c (unify): Also check whether the argument is a PMF.
1866 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1869 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1870 a '[' can also start a primary-expression.
1871 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1872 when cp_parser_tokens_start_cast_expression returns -1.
1874 2014-06-30 Jason Merrill <jason@redhat.com>
1877 * pt.c (unify_one_argument): Type/expression mismatch just causes
1880 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1883 2014-06-30 Marek Polacek <polacek@redhat.com>
1885 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1886 function has no_sanitize_undefined attribute.
1887 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1888 function has no_sanitize_undefined attribute.
1890 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1893 * cp-array-notation.c (expand_sec_reduce_builtin):
1894 Check that bultin argument is correct.
1895 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1897 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1901 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1902 types aren't the same.
1904 2014-06-27 Jason Merrill <jason@redhat.com>
1907 * error.c (dump_template_bindings): Don't tsubst in a clone.
1909 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1912 * semantics.c (finish_compound_literal): Revert r204228.
1914 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1916 * parser.c (cp_parser_compound_literal_p): New.
1917 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1919 2014-06-26 Jason Merrill <jason@redhat.com>
1921 * parser.c (cp_parser_for_init_statement): Change range-for error
1924 N3994 Ranged-based for-loops: The Next Generation
1925 * parser.c (cp_lexer_nth_token_is): New.
1926 (cp_parser_for_init_statement): Allow "for (id : init)".
1928 2014-06-26 Teresa Johnson <tejohnson@google.com>
1930 * class.c (dump_class_hierarchy): Use saved dump files.
1931 (dump_vtable): Ditto.
1934 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1937 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1938 parameter lists outside of function parameter scope.
1940 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1944 * typeck2.c (process_init_constructor_record): Do not complain about
1945 uninitialized const members, because within aggregate-initialization,
1946 members without explicit initializers are value-initialized.
1948 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1950 * semantics.c (finish_omp_clauses): Make sure
1951 OMP_CLAUSE_LINEAR_STEP has correct type.
1953 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1955 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1956 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1957 FUNCTION_DECL check.
1958 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1959 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1960 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1961 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1963 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1966 * decl.c (grokdeclarator): Do not early check for operator-function-id
1969 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1971 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1974 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1976 * parser.c (cp_parser_omp_for_loop): For
1977 #pragma omp parallel for simd move lastprivate clause from parallel
1978 to for rather than simd.
1980 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1984 * decl.c (grokparms): Accept a single parameter of type 'void'.
1986 2014-06-20 Jason Merrill <jason@redhat.com>
1989 * call.c (add_function_candidate): Avoid special 'this' handling
1990 if we have a ref-qualifier.
1993 * call.c (build_over_call): Call build_this in template path.
1995 2014-06-19 Jason Merrill <jason@redhat.com>
1998 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
2000 2014-06-18 Jason Merrill <jason@redhat.com>
2003 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
2004 ref-qualifier handling.
2007 * pt.c (resolve_overloaded_unification): Preserve
2008 ARGUMENT_PACK_EXPLICIT_ARGS.
2010 2014-06-18 Jakub Jelinek <jakub@redhat.com>
2012 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
2014 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
2016 2014-06-17 Jason Merrill <jason@redhat.com>
2019 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
2021 2014-06-15 Jason Merrill <jason@redhat.com>
2024 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
2027 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
2029 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2031 * decl.c (grokvardecl): Fix pasto in previous patch.
2033 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2035 * decl.c (duplicate_decls): Use set_decl_tls_model.
2036 (grokdeclarator): Likewise.
2037 * semantics.c (finish_id_expression): Check TLS only for
2039 (finish_omp_threadprivate): Use decl_default_tls_model.
2040 * decl2.c (get_guard): Likewise.
2041 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
2043 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2046 * decl.c (grokparms): Improve error message about void parameters.
2047 * error.c (type_to_string): Fix aka cut off code.
2049 2014-06-12 Jason Merrill <jason@redhat.com>
2051 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
2052 * cvt.c (type_promotes_to): Likewise.
2053 * mangle.c (write_type, write_expression): Likewise.
2054 (write_name, write_template_arg): Likewise.
2055 (mangle_decl): Make alias based on flag_abi_compat_version.
2056 Emit -Wabi warning here.
2057 (finish_mangling_internal): Not here. Drop warn parm.
2058 (finish_mangling_get_identifier, finish_mangling): Adjust.
2059 (mangle_type_string, mangle_special_for_type): Adjust.
2060 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
2061 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
2062 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
2064 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
2065 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
2066 (layout_nonempty_base_or_field, end_of_class): Likewise.
2067 (layout_empty_base, build_base_field, layout_class_type): Likewise.
2068 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
2069 (layout_virtual_bases): Likewise.
2070 * decl.c (compute_array_index_type): Likewise.
2071 * mangle.c (write_mangled_name, write_prefix): Likewise.
2072 (write_template_prefix, write_integer_cst, write_expression): Likewise.
2073 (write_template_arg, write_array_type): Likewise.
2074 * method.c (lazily_declare_fn): Likewise.
2075 * rtti.c (get_pseudo_ti_index): Likewise.
2076 * typeck.c (comp_array_types): Likewise.
2078 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
2080 * vtable-class-hierarchy.c: Update handling for section names
2081 that are no longer trees.
2082 * decl.c (duplicate_decls): Likewise.
2084 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2087 * parser.c (cp_parser_init_declarator): Actually pass friend_p
2088 to cp_parser_declarator.
2090 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2093 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
2094 * name-lookup.c (validate_nonmember_using_decl): Adjust error
2097 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2100 * parser.c (cp_parser_declarator): Add bool parameter.
2101 (cp_parser_direct_declarator): Likewise, use it.
2102 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
2103 (cp_parser_condition, cp_parser_explicit_instantiation,
2104 cp_parser_init_declarator, cp_parser_type_id_1,
2105 cp_parser_parameter_declaration, cp_parser_exception_declaration,
2106 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
2107 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
2109 * decl.c (grokdeclarator): Fix handling of friend declared in
2110 namespace scope (g++.dg/parse/friend10.C).
2112 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
2114 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
2116 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
2117 (maybe_clone_body): Move symbol across comdat groups.
2118 * method.c (use_thunk): Copy implicit section flag.
2120 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2123 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
2125 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2127 * method.c (use_thunk): Use set_decl_section_name.
2128 * optimize.c (maybe_clone_body): Use set_decl_section_name.
2129 * decl.c (duplicate_decls): Likewise.
2130 * vtable-class-hierarchy.c: Likewise.
2132 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
2135 * class.c (check_field_decls): In C++11 mode do not reject
2136 static data members and reference-type members in unions.
2138 2014-06-05 Jason Merrill <jason@redhat.com>
2141 * decl.c (check_initializer): Collapse a TREE_LIST here.
2142 * typeck2.c (store_init_value): Not here.
2144 2014-06-05 Richard Biener <rguenther@suse.de>
2145 Paolo Carlini <paolo.carlini@oracle.com>
2148 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
2149 handling of empty classes.
2151 2014-06-04 Jason Merrill <jason@redhat.com>
2153 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
2154 for noexcept and thread_local, too.
2157 * decl.c (check_initializer): Maybe clear
2158 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2160 2014-06-05 Richard Biener <rguenther@suse.de>
2163 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
2164 warnings for accessing empty classes.
2166 2014-06-05 Marek Polacek <polacek@redhat.com>
2169 * parser.c (cp_parser_binary_expression): Warn when logical not is
2170 used on the left hand side operand of a comparison.
2172 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
2175 * typeck.c (cp_build_modify_expr): Handle array of characters
2176 initialized by a string literal.
2177 * decl.c (check_initializer): Handle parenthesized string literal
2179 * typeck2.c (store_init_value): Remove redundant check.
2181 2014-06-04 Jason Merrill <jason@redhat.com>
2185 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
2186 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
2188 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2191 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
2194 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2198 * call.c (standard_conversion): Convert nullptr to bool only
2199 in case of direct-initialization.
2200 (convert_like_real): Provide informative error message.
2202 2014-06-03 Marek Polacek <polacek@redhat.com>
2205 * semantics.c (finish_switch_cond): Warn if switch condition has
2208 2014-06-03 Jason Merrill <jason@redhat.com>
2211 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
2212 variable to local_specializations.
2215 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
2217 2014-06-02 Jason Merrill <jason@redhat.com>
2220 * decl.c (reshape_init_class): Handle un-folded
2221 constant-expressions.
2224 * pt.c (pack_deducible_p): Handle canonicalization.
2226 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2228 * pt.c (tsubst_function_type): Initialize arg_types.
2230 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
2233 * class.c (handle_using_decl): Pass the correct scope to
2234 cp_emit_debug_info_for_using.
2236 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2240 * search.c (accessible_p): Use current_nonlambda_class_type.
2241 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2243 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2245 * decl.c: Include builtins.h.
2246 * semantics.c: Likewise.
2248 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
2252 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2253 * pt.c (tsubst_function_type): Inject the this parameter; do the
2254 substitutions in the order mandated by the DR.
2255 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2256 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2257 (static_fn_type): Copy it.
2258 * decl2.c (build_memfn_type, change_return_type,
2259 cp_reconstruct_complex_type): Likewise.
2260 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2261 * tree.c (strip_typedefs): Likewise.
2262 * typeck.c (merge_types): Likewise.
2264 2014-05-30 Jason Merrill <jason@redhat.com>
2267 * pt.c (instantiate_decl): Check that defer_ok is not set for
2268 local class members.
2271 * pt.c (tsubst_init): Split out from...
2272 (tsubst_expr) [DECL_EXPR]: Here.
2273 (tsubst_copy) [VAR_DECL]: Use it.
2274 * semantics.c (finish_id_expression): Return the decl for static/const.
2276 2014-05-28 Jason Merrill <jason@redhat.com>
2279 * decl.c (cxx_comdat_group): Return a decl.
2280 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2282 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2286 * call.c (build_aggr_conv): Ignore passed in flags.
2287 (build_array_conv, build_complex_conv): Likewise.
2289 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2291 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2292 (maybe_clone_body): Likewise.
2293 * decl.c (duplicate_decls): Update code duplicating comdat group;
2294 do not copy symtab pointer; before freeing newdecl remove it
2296 * decl2.c (constrain_visibility): Use set_comdat_group.
2298 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2300 * rtti.c: Include tm_p.h
2301 (emit_tinfo_decl): Force RTTI data to be aligned to required
2304 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2306 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2307 ignoring other target adjustments.
2309 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2311 * semantics.c (finish_omp_clauses): Remove duplicated variable
2314 * parser.c (cp_parser_omp_target): Return bool values.
2316 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2319 * lambda.c (add_capture): Enforce that capture by value requires
2321 * typeck2.c (cxx_incomplete_type_inform): Early return if
2322 TYPE_MAIN_DECL is null.
2324 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2327 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2329 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2332 * lambda.c (build_capture_proxy, add_capture): Treat normal
2333 captures and init-captures identically.
2335 2014-05-21 Mark Wielaard <mjw@redhat.com>
2338 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2339 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2341 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2343 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2344 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2345 (expand_array_notation): Handle VOID_CST.
2346 * error.c (dump_expr): Likewise.
2347 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2348 (cxx_pretty_printer::expression): Likewise.
2349 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2350 * decl.c (register_dtor_fn): Likewise.
2351 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2352 (build_delete, push_base_cleanups): Likewise.
2353 * mangle.c (write_expression): Likewise.
2354 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2355 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2356 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2357 * tree.c (cp_tree_equal): Likewise.
2358 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2359 instead of void_zero_node.
2360 * typeck.c (check_return_expr): Likewise.
2361 * typeck2.c (build_functional_cast): Likewise.
2363 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2366 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2368 (cp_parser_statement): ...here. Make sure only semicolon can go after
2371 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2376 * typeck2.c (digest_nsdmi_init): New.
2377 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2378 * init.c (get_nsdmi): Likewise.
2379 * cp-tree.h (digest_nsdmi_init): Declare.
2381 2014-05-20 Jason Merrill <jason@redhat.com>
2383 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2384 up a virtual function in a dummy object.
2386 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2389 * decl.c (duplicate_decls): Replace pair of warning_at with
2390 warning_at + inform.
2391 (maybe_commonize_var): Likewise.
2393 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2396 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2397 (tsubst_copy_and_build): Perform recursive substitutions in a
2398 deterministic order.
2400 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2403 * typeck2.c (cxx_incomplete_type_inform): New.
2404 (cxx_incomplete_type_diagnostic): Use it.
2405 * decl.c (grokdeclarator): Check the element type of an
2406 incomplete array type; call the above.
2407 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2409 2014-05-19 Jason Merrill <jason@redhat.com>
2412 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2413 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2415 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2417 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2418 * parser.c (cp_parser_enum_specifier): Likewise.
2420 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2422 * class.c (sorted_fields_type_new): Adjust.
2423 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2424 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2425 * cp-tree.h: Remove usage of variable_size gty attribute.
2426 * decl.c (make_label_decl): Adjust.
2427 (check_goto): Likewise.
2428 (start_preparsed_function): Likewise.
2429 (save_function_data): Likewise.
2430 * lex.c (init_reswords): Likewise.
2431 (retrofit_lang_decl): Likewise.
2432 (cxx_dup_lang_specific_decl): Likewise.
2433 (copy_lang_type): Likewise.
2434 (cxx_make_type): Likewise.
2435 * name-lookup.c (binding_entry_make): Likewise.
2436 (binding_table_construct): Likewise.
2437 (binding_table_new): Likewise.
2438 (cxx_binding_make): Likewise.
2439 (pushdecl_maybe_friend_1): Likewise.
2440 (begin_scope): Likewise.
2441 (push_to_top_level): Likewise.
2442 * parser.c (cp_lexer_alloc): Likewise.
2443 (cp_lexer_new_from_tokens): Likewise.
2444 (cp_token_cache_new): Likewise.
2445 (cp_parser_context_new): Likewise.
2446 (cp_parser_new): Likewise.
2447 (cp_parser_nested_name_specifier_opt): Likewise.
2448 (cp_parser_template_id): Likewise.
2449 * pt.c (maybe_process_partial_specialization): Likewise.
2450 (register_specialization): Likewise.
2451 (add_pending_template): Likewise.
2452 (lookup_template_class_1): Likewise.
2453 (push_tinst_level): Likewise.
2454 * semantics.c (register_constexpr_fundef): Likewise.
2455 (cxx_eval_call_expression): Likewise.
2456 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2458 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2461 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2462 when cp_parser_lookup_name sets ambiguous_decls.
2464 2014-05-15 Jason Merrill <jason@redhat.com>
2466 * call.c (print_conversion_rejection): Use loc consistently.
2468 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2470 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2471 * call.c (convert_like_real, build_new_method_call_1): Use it.
2472 * decl2.c (grokfield): Likewise.
2473 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2474 build_new_1): Likewise.
2475 * mangle.c (write_expression): Likewise.
2476 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2478 2014-05-14 Jason Merrill <jason@redhat.com>
2482 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2483 dropped cv-quals as a bad conversion.
2484 (convert_like_real) [ck_ref_bind]: Explain them.
2485 (compare_ics): Check badness before stripping reference
2486 bindings. Handle comparing bad reference bindings.
2487 * typeck.c (comp_cv_qualification): Add overload that just takes
2489 * cp-tree.h: Declare it.
2491 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2492 (arg_conversion_rejection, bad_arg_conversion_rejection)
2493 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2494 (add_function_candidate): Pass actual argument, rather than type, to
2495 bad_arg_conversion_rejection.
2496 (print_conversion_rejection): Explain what's wrong with the conversion.
2497 (print_z_candidates): Say "candidate:" before each candidate.
2498 (splice_viable): Be strict if we see a viable or template candidate.
2499 (build_user_type_conversion_1): Pass false to strict parameter.
2500 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2501 (build_new_op_1, build_new_method_call_1): Likewise.
2502 (build_op_call_1): Pass true to strict parameter.
2504 2014-05-13 Jason Merrill <jason@redhat.com>
2506 * call.c (print_error_for_call_failure): Say "no match" rather
2507 than "ambiguous" if there were no strict matches.
2508 (build_new_method_call_1): Likewise.
2511 * semantics.c (is_this_parameter): Allow capture proxies too.
2513 2014-05-12 Jason Merrill <jason@redhat.com>
2515 * call.c (maybe_print_user_conv_context): New.
2516 (convert_like_real): Use it. Print call context for bad
2517 user-defined conversion.
2518 (build_over_call): Print call context for bad 'this' conversion.
2520 * call.c (convert_like_real): Use inform for identifying the
2523 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2525 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2526 complain & tf_error is false.
2528 * decl.c (make_unbound_class_template): Prefer inform for
2529 "declared here"-type message.
2531 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2535 * lambda.c (lambda_expr_this_capture): Add new parameter
2536 add_capture_p controlling whether the functions will try to
2537 capture 'this' via the default capture.
2538 (maybe_resolve_dummy): Likewise.
2539 * cp-tree.h: Adjust prototypes.
2540 * call.c, semantics.c: Change callers of these functions.
2541 * call.c (build_new_method_call_1): Use the actual 'this' that
2542 would be potentially captured for the overload resolution, instead
2543 of the dummy object.
2545 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2547 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2549 (convert_nontype_argument): Adjust calls.
2550 (coerce_template_parameter_pack): Add missing complain & tf_error
2553 2014-05-09 Jason Merrill <jason@redhat.com>
2557 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2558 non-class lvalues and xvalues that differ only in cv-qualifiers.
2562 * call.c (build_user_type_conversion_1): The copy-init temporary
2566 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2569 * call.c (build_conditional_expr_1): If overload resolution finds
2570 no match, just say "different types".
2573 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2576 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2577 if we didn't find a conversion.
2578 Don't accept a bad conversion too early.
2580 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2583 * typeck.c (convert_for_assignment): Provide an inform for pointers
2584 to incomplete class types.
2586 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2589 * pt.c (convert_nontype_argument): Protect all the error calls
2590 with complain & tf_error.
2592 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2595 * pt.c (instantiate_decl): Avoid generating the body of a
2598 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2601 * pt.c (maybe_begin_member_template_processing): Use
2602 uses_template_parms.
2604 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2605 Mike Stump <mikestump@comcast.net>
2606 Richard Sandiford <rdsandiford@googlemail.com>
2608 * call.c: Include wide-int.h.
2609 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2610 (convert_for_arg_passing): Likewise.
2611 * class.c: Include wide-int.h.
2612 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2613 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2614 (include_empty_classes): Likewise
2615 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2616 * cvt.c: Include wide-int.h.
2617 (ignore_overflows): Use wide_int_to_tree.
2618 * decl.c: Include wide-int.h.
2619 (check_array_designated_initializer): Use wide-int interfaces.
2620 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2621 (finish_enum_value_list): Use signop.
2622 (build_enumerator): Use wide-int interfaces.
2623 * init.c: Include wide-int.h.
2624 (build_new_1): Use wide-int interfaces.
2625 * mangle.c: Include wide-int.h.
2626 (write_integer_cst): Use wide-int interfaces.
2627 (write_array_type): Likewise.
2628 * tree.c: Include wide-int.h.
2629 (cp_tree_equal): Use tree_int_cst_equal.
2630 * typeck2.c: Include wide-int.h.
2631 (process_init_constructor_array): Use wide-int interfaces.
2633 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2636 * decl.c (grokfndecl): Check duplicate_decls return value for
2638 * pt.c (instantiate_decl): A deleted function is defined.
2640 2014-05-02 Jason Merrill <jason@redhat.com>
2642 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2645 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2647 (add_capture): Check for VLA before calling it.
2648 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2649 just the current one. Make non-static.
2650 * cp-tree.h: Declare it.
2651 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2652 the operand was static or constant.
2654 2014-05-02 Marek Polacek <polacek@redhat.com>
2656 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2659 2014-05-01 Marek Polacek <polacek@redhat.com>
2662 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2663 between label and variable when warning about returning local address.
2665 2014-04-30 Jason Merrill <jason@redhat.com>
2668 * init.c (build_value_init): Don't try to call an array constructor.
2671 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2673 2014-04-30 Marek Polacek <polacek@redhat.com>
2675 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2676 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2677 for non-integer types.
2679 2014-04-29 Jason Merrill <jason@redhat.com>
2682 Represent the unevaluated exception specification of an implicitly
2683 declared or deleted function with a simple placeholder, not a list
2685 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2686 * except.c (unevaluated_noexcept_spec): New.
2687 * class.c (deduce_noexcept_on_destructor): Use it.
2688 * decl.c (check_redeclaration_exception_specification): Call
2689 maybe_instantiate_noexcept.
2690 (duplicate_decls): Call it before merge_types.
2691 (start_preparsed_function): Call maybe_instantiate_noexcept.
2692 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2693 * init.c (get_nsdmi): Factor out of perform_member_init.
2694 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2695 (walk_field_subobs): Consider NSDMI for EH spec.
2696 (get_defaulted_eh_spec): New.
2697 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2698 (defaulted_late_check): Defer EH checking in non-template classes.
2699 (after_nsdmi_defaulted_late_checks): New.
2700 * parser.c (cp_parser_class_specifier_1): Use it.
2701 (unparsed_classes): New macro.
2702 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2703 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2704 Remove list-of-functions handling.
2705 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2706 handling and FN parameter.
2707 * typeck.c (merge_types): Adjust.
2709 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2712 * parser.c (cp_parser_alias_declaration): Check return value of
2715 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2717 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2718 atomic-clause, allow comma in between atomic-clause and
2721 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2724 * rtti.c (emit_support_tinfos): Do not iterate on
2725 registered_builtin_types (partial revert).
2727 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2730 * semantics.c (apply_deduced_return_type): Complete non-void type
2731 before estimating whether the type is aggregate.
2733 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2736 * rtti.c (emit_support_tinfo_1): New function, extracted from
2737 emit_support_tinfos.
2738 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2740 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2743 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2744 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2746 2014-04-18 Jason Merrill <jason@redhat.com>
2749 * call.c (reference_binding): Recurse on user-defined conversion.
2752 * call.c (standard_conversion): Don't try to apply restrict to void.
2754 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2756 * decl.c (reshape_init_r): Handle a single element of vector type.
2758 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2761 * decl2.c (cplus_decl_attributes): Handle
2762 pointer-to-member-function declarations.
2764 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2767 * call.c (build_user_type_coversion): Use build_dummy_object
2768 to create the placeholder object for a constructor method call.
2769 (build_special_member_call): Likewise.
2770 (build_over_call): Check for the placeholder object with
2772 (build_new_method_call_1): Likewise. Don't attempt to resolve
2773 a dummy object for a constructor method call.
2775 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2778 * friend.c (add_friend, make_friend_class): Move repeated friend
2779 warning under Wredundant_decls.
2781 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2783 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2784 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2785 (do_class_using_decl): Likewise.
2786 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2788 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2791 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2793 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2795 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2797 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2799 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2801 2014-04-11 Jason Merrill <jason@redhat.com>
2803 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2805 (cp_lexer_get_preprocessor_token): Always clear it.
2806 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2810 * decl.c (reshape_init_r): Handle a single element of class type.
2813 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2814 built-in operator new.
2816 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2819 * name-lookup.c (parse_using_directive): Return early if the
2820 attribs argument is error_mark_node; use get_attribute_name.
2822 2014-04-11 Jason Merrill <jason@redhat.com>
2826 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2827 * call.c (struct z_candidate): Add flags field.
2828 (add_candidate): Add flags parm.
2829 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2830 (add_template_candidate_real): Pass it.
2831 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2832 * tree.c (build_aggr_init_expr): Copy it.
2833 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2835 2014-04-10 Richard Biener <rguenther@suse.de>
2836 Jakub Jelinek <jakub@redhat.com>
2839 * error.c (dump_decl) <case FUNCTION_DECL>: If
2840 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2841 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2844 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2846 * pt.c (check_template_variable): Check for the return of pedwarn
2847 before emitting a note.
2848 * parser.c (cp_parser_lambda_introducer): Likewise.
2850 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2853 * pt.c (process_template_parm): For an invalid non-type parameter
2854 only set TREE_TYPE to error_mark_node.
2855 (push_inline_template_parms_recursive, comp_template_parms,
2856 redeclare_class_template, coerce_template_template_parm,
2857 coerce_template_template_parms, unify): Use error_operand_p.
2859 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2861 * class.c (check_bases_and_members): Warn about non-virtual dtors
2862 in public bases only. Check warn_ecpp before complaining about
2863 non-polymorphic bases.
2865 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2867 * decl.c (duplicate_decls): Check for the return of warning_at
2868 before emitting a note.
2869 (warn_misplaced_attr_for_class_type): Likewise.
2870 (check_tag_decl): Likewise.
2872 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2875 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2877 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2880 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2881 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2882 instantiating a variable-sized type.
2885 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2887 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2889 * class.c (find_abi_tags_r): Check for the return of warning
2890 before emitting a note.
2891 (one_inherited_ctor): Likewise.
2893 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2895 * decl.c (duplicate_decls): Check for the return of permerror
2896 before emitting a note.
2898 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2900 * class.c (accessible_nvdtor_p): New.
2901 (check_bases): Don't check base destructor here ...
2902 (check_bases_and_members): ... check them here. Trigger on
2903 Wnon-virtual-dtor flag.
2904 (finish_struct_1): Use accessible_nvdtor_p.
2906 2014-04-01 Jason Merrill <jason@redhat.com>
2908 * pt.c (process_partial_specialization): Say "not deducible"
2909 rather than "not used". Use inform.
2912 * pt.c (coerce_template_parms): Check that the pack expansion
2913 pattern works with the first matching parameter.
2915 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2917 * init.c (perform_member_init): Homogenize uninitialized
2920 2014-04-01 Jason Merrill <jason@redhat.com>
2923 * call.c (build_array_conv): Call complete_type.
2926 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2927 (picflag_from_initializer): Return it.
2928 (process_init_constructor): Handle it.
2931 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2932 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2933 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2934 (most_general_template): Handle more kinds of template.
2935 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2936 instantiations and specializations.
2938 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2941 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2942 COMPONENT_REFs and ARRAY_REFs sooner.
2944 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2947 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2948 usage in non-functions with pushed scope.
2950 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2953 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2954 to indicate whether a scope is in the process of defining a class.
2955 * semantics.c (begin_class_definition): Set defining_class_p.
2956 * name-lookup.c (leave_scope): Reset defining_class_p.
2957 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2958 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2959 unwinding to class-defining scope to handle the erroneous definition of
2960 a generic function of an arbitrarily nested class within an enclosing
2963 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2966 * method.c (walk_field_subobs): Improve the diagnostic
2967 locations for both REFERENCE_TYPEs and non-static const members.
2968 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2969 instead of %qD to be consistent with the c++11 diagnostic.
2971 2014-03-25 Jason Merrill <jason@redhat.com>
2975 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2976 * search.c (get_pure_virtuals): Not here.
2979 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2980 a lambda in unevaluated context.
2983 * decl.c (create_array_type_for_decl): Complain about array of auto.
2985 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2988 * semantics.c (potential_constant_expression_1): Handle
2991 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2994 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2995 introducing an implicit function template parameter within an explicit
2998 2014-03-22 Jason Merrill <jason@redhat.com>
3001 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
3004 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
3007 * name-lookup.c (push_class_level_binding_1): Check identifier_p
3008 on the name argument.
3010 2014-03-20 Jakub Jelinek <jakub@redhat.com>
3013 * init.c (build_zero_init_1): Ignore fields with error_mark_node
3016 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
3019 * call.c (build_new_method_call_1): Handle pure virtuals called by
3022 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
3025 * parser.c (cp_parser_member_declaration): Don't allow
3026 finish_fully_implicit_template to consider friend declarations to be
3027 class member templates.
3028 (synthesize_implicit_template_parm): Handling winding back through class
3029 scope to the class being defined in order to inject a template argument
3033 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
3034 function scope as per cp_parser_skip_to_end_of_statement.
3036 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
3039 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
3041 2014-03-14 Jason Merrill <jason@redhat.com>
3045 * search.c (get_pure_virtuals): Handle abstract dtor here.
3046 (dfs_get_pure_virtuals): Not here.
3049 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
3050 abstract class as pure.
3052 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3055 * pt.c (maybe_process_partial_specialization): Check return value
3056 of check_specialization_namespace.
3058 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3061 * semantics.c (finish_static_assert): Call cxx_constant_value only
3062 if require_potential_rvalue_constant_expression returns true.
3064 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
3067 * method.c (get_inherited_ctor): New.
3068 * cp-tree.h (get_inherited_ctor): Declare it.
3069 * semantics.c (is_valid_constexpr_fn): Use it.
3071 2014-03-10 Jason Merrill <jason@redhat.com>
3074 * call.c (convert_default_arg): Remove special handling for
3078 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
3079 when deciding whether to call push_template_decl for a member class.
3080 * pt.c (push_template_decl_real): Return after wrong levels error.
3082 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
3085 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
3086 lambda, remove the lambda's own template argument list prior to fetching
3090 * parser.c (cp_parser_parameter_declaration_clause): Move generic
3091 function template unwinding on error into a more general location, ...
3092 (cp_parser_skip_to_end_of_statement): ... here.
3094 2014-03-07 Jason Merrill <jason@redhat.com>
3096 * Make-lang.in (check_g++_parallelize): Split dg.exp.
3098 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
3099 we're in a trailing return type.
3101 * typeck.c (comp_template_parms_position): 'auto' and
3102 'decltype(auto)' are different from real template parms.
3104 * parser.c (cp_parser_using_declaration): Consume the semicolon
3105 after bare parameter pack error.
3107 * cp-tree.h (REF_PARENTHESIZED_P): New.
3108 * semantics.c (force_paren_expr): Set it.
3109 * pt.c (do_auto_deduction): Check it.
3110 (tsubst) [COMPONENT_REF]: Copy it.
3111 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
3113 * decl.c (create_array_type_for_decl): Only warn about invalid
3114 C++1y VLA if flag_iso or warn_vla>0.
3115 (grokdeclarator): Likewise.
3116 * pt.c (tsubst): Likewise.
3117 * semantics.c (finish_decltype_type): Likewise.
3118 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
3119 (cp_build_addr_expr_1): Likewise.
3120 * init.c (build_new_1): Improve diagnostics.
3122 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3125 * decl.c (check_initializer): Return NULL_TREE after error;
3126 consistently use inform.
3128 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3130 * decl.c (check_initializer): Remove dead code.
3132 2014-03-06 Marek Polacek <polacek@redhat.com>
3135 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
3136 of checking tree code.
3138 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3140 * parser.c (cp_lexer_set_source_position): New.
3141 (cp_parser_mem_initializer): Use it.
3142 (cp_parser_postfix_open_square_expression): Likewise.
3143 (cp_parser_parenthesized_expression_list): Likewise.
3144 (cp_parser_new_initializer): Likewise.
3145 (cp_parser_jump_statement): Likewise.
3146 (cp_parser_initializer): Likewise.
3147 (cp_parser_functional_cast): Likewise.
3149 2014-03-05 Jason Merrill <jason@redhat.com>
3152 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
3153 dependent expression.
3156 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
3157 if re-parsing might succeed.
3158 * semantics.c (finish_id_expression): Use of a parameter outside
3159 the function body is a parse error.
3161 * parser.c (cp_parser_mem_initializer): Set input_location
3162 properly for init-list warning.
3163 (cp_parser_postfix_open_square_expression): Likewise.
3164 (cp_parser_parenthesized_expression_list): Likewise.
3165 (cp_parser_new_initializer): Likewise.
3166 (cp_parser_jump_statement): Likewise.
3167 (cp_parser_initializer): Likewise.
3168 (cp_parser_functional_cast): Likewise.
3170 2014-03-04 Jason Merrill <jason@redhat.com>
3173 * typeck2.c (process_init_constructor_record): Set
3174 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
3178 * parser.c (cp_parser_direct_declarator): Set declarator to
3179 cp_error_declarator on invalid qualified-id.
3181 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
3184 * parser.c (cp_parser_using_declaration): Early return when
3185 cp_parser_nested_name_specifier errors out.
3187 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
3190 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
3191 function scope on parse error in function parameter list.
3193 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3195 * method.c (implicitly_declare_fn): Remove redundant
3196 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
3197 * semantics.c (is_instantiation_of_constexpr): Likewise.
3198 * error.c (dump_function_decl): Likewise.
3200 2014-03-01 Jason Merrill <jason@redhat.com>
3203 * semantics.c (begin_maybe_infinite_loop): Use
3204 fold_non_dependent_expr_sfinae.
3206 2014-02-28 Jason Merrill <jason@redhat.com>
3209 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
3211 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
3214 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
3215 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
3216 * lambda.c (maybe_add_lambda_conv_op): Likewise.
3218 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
3221 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
3224 2014-02-27 Jason Merrill <jason@redhat.com>
3228 * decl2.c (tentative_decl_linkage): Don't mess with functions that
3229 are not yet defined.
3231 2014-02-26 Jason Merrill <jason@redhat.com>
3235 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
3236 * init.c (build_vtbl_address): Do it here.
3242 * pt.c (struct warning_sentinel): New.
3243 (tsubst_copy_and_build): Use it instead of
3244 c_inhibit_evaluation_warnings.
3245 * typeck.c (maybe_warn_about_useless_cast): Remove
3246 c_inhibit_evaluation_warnings check.
3249 * pt.c (get_template_parm_index): New.
3250 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3251 (process_template_parm): Allow bare packs in template template
3252 parm template parms.
3253 (coerce_template_parameter_pack): Handle fixed template template
3254 parm packs and fixed packs not at the end of the parm list.
3255 (coerce_template_parms): Handle template parm packs not at the end
3257 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3260 * pt.c (unify): Ignore alias templates when deducing a template
3266 * call.c (reference_binding): Recurse on user-defined conversion.
3267 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3269 2014-02-25 Jason Merrill <jason@redhat.com>
3272 * call.c (reference_binding): Recurse on user-defined conversion.
3273 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3275 * call.c (print_conversion_rejection): Handle n_arg of -2.
3276 (build_user_type_conversion_1): Pass it.
3279 * decl2.c (no_linkage_error): Handle C++98 semantics.
3280 (reset_type_linkage): Move from decl.c.
3281 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3282 (bt_reset_linkage_2, reset_decl_linkage): New.
3283 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3284 (cp_write_global_declarations): Move condition into no_linkage_error.
3285 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3286 * semantics.c (expand_or_defer_fn_1): Factor out
3287 tentative_decl_linkage.
3288 * cp-tree.h: Adjust.
3290 * decl2.c (finish_static_data_member_decl): Diagnose static data
3291 member in unnamed class.
3292 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3295 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3296 defaulted virtual dtor.
3300 * pt.c (get_underlying_template): Fix equivalence calculation.
3302 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3305 * parser.c (function_being_declared_is_template_p): Return false when
3306 processing a template parameter list.
3307 (cp_parser_parameter_declaration_clause): Don't set
3308 auto_is_implicit_function_template_parm_p when processing a
3309 template parameter list.
3311 * parser.c (synthesize_implicit_template_parm): Inject new template
3312 argument list appropriately when a generic member function
3313 of a class template is declared out-of-line.
3316 * parser.c (cp_parser_direct_declarator): Don't save and
3317 restore num_template_parameter_lists around call to
3318 cp_parser_parameter_declaration_list.
3319 (function_being_declared_is_template_p): New predicate.
3320 (cp_parser_parameter_declaration_list): Use
3321 function_being_declared_is_template_p as predicate for
3322 inspecting current function template parameter list length
3323 rather than num_template_parameter_lists.
3325 2014-02-24 Jason Merrill <jason@redhat.com>
3328 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3329 DECL_EXPR initialize a non-class iterator.
3332 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3334 2014-02-21 Jason Merrill <jason@redhat.com>
3337 * parser.c (cp_parser_type_name): Always check dependency.
3338 (cp_parser_type_specifier_seq): Call
3339 cp_parser_parse_and_diagnose_invalid_type_name.
3342 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3345 * parser.c (cp_parser_default_argument): Clear
3346 current_class_ptr/current_class_ref like tsubst_default_argument.
3349 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3350 than current_binding_level.
3353 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3356 * parser.c (cp_parser_enum_specifier): Call
3357 check_for_bare_parameter_packs.
3360 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3364 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3365 of the partial instantiation, not the most general template.
3366 (maybe_process_partial_specialization): Reassign everything on
3370 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3371 (check_explicit_specialization): Don't clone.
3374 * pt.c (coerce_template_parms): Bail if argument packing fails.
3377 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3378 Don't get confused by a CONSTRUCTOR that already has a type.
3381 * call.c (build_array_conv): Don't crash on VLA.
3384 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3387 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3388 in declaration context.
3392 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3395 * parser.c (cp_parser_direct_declarator): Don't wrap a
3396 type-dependent expression in a NOP_EXPR.
3399 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3404 * parser.c (cp_parser_template_argument): Restore dereference.
3405 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3406 (process_partial_specialization): Handle deref.
3409 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3413 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3414 implicit_template_scope upon leaving an out-of-line generic member
3415 function definition.
3417 2014-02-20 Kai Tietz <ktietz@redhat.com>
3420 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3421 valued type argument as error_mark_node.
3424 * semantics.c (finish_fname): Handle error_mark_node.
3426 2014-02-19 Jason Merrill <jason@redhat.com>
3429 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3430 spec from template context.
3432 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3435 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3436 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3439 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3441 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3444 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3447 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3450 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3451 During error recovery allow_non_constant may be false.
3453 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3456 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3457 scope whenever a template parameter list has been started, independent
3458 of whether the function call operator was well-formed or not.
3461 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3462 scope for generic friend declarations as well as for non-friends.
3464 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3467 * method.c (implicitly_declare_fn): A constructor of a class with
3468 virtual base classes isn't constexpr (7.1.5p4).
3470 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3472 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3474 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3477 * parser.c (cp_parser_omp_declare_reduction): Save and free
3480 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3484 * tree.c (handle_init_priority_attribute): Call default_conversion on
3485 the attribute argument.
3487 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3490 * method.c (synthesized_method_walk): If vbases is non-null but
3491 is_empty is true, likewise don't worry about the virtual bases.
3493 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3496 * typeck2.c (process_init_constructor_record): Just skip unnamed
3499 2014-01-31 Jason Merrill <jason@redhat.com>
3502 * pt.c (mark_decl_instantiated): Call mark_needed.
3505 * decl2.c (handle_tls_init): Handle null init fn.
3508 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3510 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3513 * class.c (build_vfield_ref): Early return error_mark_node if
3514 TYPE_VFIELD (type) is null.
3515 (build_base_path): Check return value of build_vfield_ref.
3517 2014-01-31 Jason Merrill <jason@redhat.com>
3520 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3521 [ck_list]: Check for error_mark_node.
3522 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3525 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3526 during partial ordering.
3528 2014-01-31 Marek Polacek <polacek@redhat.com>
3531 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3533 2014-01-30 Jason Merrill <jason@redhat.com>
3536 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3537 (local_specializations): New macro.
3538 * pt.c (local_specializations): Remove variable.
3540 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3543 * parser.c (make_string_pack): Use double_int::from_buffer.
3545 2014-01-30 Marek Polacek <polacek@redhat.com>
3548 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3550 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3551 with input_location.
3552 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3555 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3558 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3560 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3563 * pt.c (lookup_template_class_1): Check start_enum return value
3564 for error_mark_node.
3566 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3568 * decl.c (duplicate_decls, typename_hash, typename_compare):
3569 Use TYPE_IDENTIFIER.
3570 * error.c (dump_type): Likewise.
3571 * mangle.c (dump_substitution_candidates): Likewise.
3573 2014-01-30 Jason Merrill <jason@redhat.com>
3576 * decl2.c (attributes_naming_typedef_ok): New.
3577 * cp-tree.h: Declare it.
3578 * decl.c (grokdeclarator): Check it.
3579 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3581 2014-01-29 Jason Merrill <jason@redhat.com>
3584 * call.c (add_builtin_candidate): Catch dependent types.
3587 * pt.c (expand_template_argument_pack): Correct
3588 non_default_args_count calculation.
3591 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3594 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3595 have a friend template in a class template.
3596 * pt.c (tsubst_friend_function): Look through it.
3597 (push_template_decl_real): A friend member template is
3600 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3603 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3606 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3609 * pt.c (instantiate_template_1): Check for error_mark_node the second
3612 2014-01-29 Jason Merrill <jason@redhat.com>
3615 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3616 cdtor_returns_this case.
3619 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3621 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3624 * semantics.c (finish_omp_reduction_clause): Check type for
3627 2014-01-28 Jason Merrill <jason@redhat.com>
3630 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3631 (tsubst_copy): Use it if lookup fails.
3634 * pt.c (tsubst_function_type): Make sure we keep the same function
3638 * semantics.c (build_anon_member_initialization): Stop walking
3639 when we run out of COMPONENT_REFs.
3642 * decl.c (lookup_and_check_tag): Ignore template parameters if
3643 scope == ts_current.
3644 * pt.c (check_template_shadow): Don't complain about the injected
3647 * decl.c (duplicate_decls): Tweak.
3650 * mangle.c (write_unqualified_name): Handle operator auto.
3652 2014-01-27 Jason Merrill <jason@redhat.com>
3656 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3657 list-initialization. A conversion to rvalue ref that involves
3658 an lvalue-rvalue conversion is bad.
3659 (convert_like_real): Give helpful error message.
3662 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3665 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3669 * pt.c (template_parm_to_arg): Call convert_from_reference.
3670 (tsubst_template_arg): Don't strip reference refs.
3673 * call.c (build_aggr_conv): Reject value-initialization of reference.
3677 * call.c (convert_like_real): Give helpful error about excess braces
3678 for ck_rvalue of scalar type.
3681 * call.c (reference_binding): Only elide braces if the single
3682 element is reference-related.
3685 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3689 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3693 * decl.c (compute_array_index_type): Don't call
3694 maybe_constant_value for a non-integral expression.
3696 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3698 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3700 * cp-gimplify.c (cp_genericize): Likewise.
3701 * decl.c (grokfndecl): Likewise.
3702 * parser.c (cp_parser_postfix_expression): Likewise.
3703 (cp_parser_postfix_open_square_expression): Likewise.
3704 (cp_parser_direct_declarator): Likewise.
3705 (is_cilkplus_vector_p): Likewise.
3706 (cp_parser_omp_clause_name): Likewise.
3707 (cp_parser_omp_all_clauses): Likewise.
3708 * pt.c (apply_late_template_attributes): Likewise.
3709 * typeck.c (cp_build_array_ref): Likewise.
3710 (cp_build_compound_expr): Likewise.
3711 (check_return_expr): Likewise.
3713 2014-01-24 Jason Merrill <jason@redhat.com>
3716 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3721 * typeck2.c (process_init_constructor_array): Don't create
3724 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3726 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3727 handling for RANGE_ARRAY case.
3729 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3732 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3734 2014-01-23 Marek Polacek <polacek@redhat.com>
3737 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3739 2014-01-23 Marek Polacek <polacek@redhat.com>
3742 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3745 2014-01-23 Jason Merrill <jason@redhat.com>
3748 * cp-tree.h (struct language_function): Add infinite_loop and
3750 (current_function_infinite_loop): New.
3751 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3752 (break_maybe_infinite_loop): New.
3753 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3754 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3755 (begin_range_for_stmt): Use them.
3756 * decl.c (finish_function): Don't warn about missing return
3757 if current_function_infinite_loop.
3758 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3759 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3761 * call.c (build_op_delete_call): Use make_tree_vector and
3762 release_tree_vector.
3764 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3767 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3768 nested_name_specifier.
3770 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3772 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3773 see if there is an attribute after function decl. If so, then
3775 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3776 enabled function late parsing.
3777 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3778 attribute for a SIMD-enabled function.
3779 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3780 the function is used by SIMD-enabled function (indicated by NULL
3781 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3782 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3783 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3784 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3785 vectorlength clause. Added a new bool parameter to differentiate
3787 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3788 (is_cilkplus_vector_p): Likewise.
3789 (cp_parser_late_parsing_elem_fn_info): Likewise.
3790 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3791 and "vectorlength" clauses when Cilk Plus is enabled.
3792 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3793 and emit a sorry message when step size is a parameter.
3794 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3795 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3797 * pt.c (apply_late_template_attributes): Likewise.
3799 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3802 * semantics.c (finish_omp_reduction_clause): Reject
3803 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3805 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3808 * parser.c (cp_parser_class_head): Push the class before parsing
3809 the base-clause, pop after it.
3811 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3813 * decl2.c (cpp_check): Revert prototype change.
3815 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3819 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3822 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3825 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3826 only when errorcount == 0.
3828 2014-01-17 Marek Polacek <polacek@redhat.com>
3831 * cvt.c (ocp_convert): Don't segfault on non-existing
3832 ENUM_UNDERLYING_TYPE.
3834 2014-01-16 Jason Merrill <jason@redhat.com>
3837 * tree.c (bot_manip): Update the location of builtin_LINE and
3840 2014-01-14 Jason Merrill <jason@redhat.com>
3843 * typeck2.c (massage_init_elt): New.
3844 (process_init_constructor_record)
3845 (process_init_constructor_union): Use it.
3846 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3847 (split_nonconstant_init_1): Handle it.
3848 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3850 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3853 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3854 and replaced an existing if-statement with else-if statement.
3855 Changed an existing error message wording to match the one from the C
3858 2014-01-08 Jason Merrill <jason@redhat.com>
3861 * class.c (abi_tag_data): Add tags field.
3862 (check_abi_tags): Initialize it.
3863 (find_abi_tags_r): Support collecting missing tags.
3864 (mark_type_abi_tags): Don't look at template args.
3865 (inherit_targ_abi_tags): New.
3866 (check_bases_and_members): Use it.
3867 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3868 * mangle.c (write_abi_tags): Check it.
3870 2014-01-07 Jason Merrill <jason@redhat.com>
3873 * pt.c (num_innermost_template_parms): New.
3874 (get_underlying_template): Use it.
3877 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3879 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3881 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3882 the letter of 20.11.6 about Base and Derived naming the same
3883 class type modulo cv-qualifiers.
3885 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3888 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3889 function as unimplemented for generic lambdas with varargs.
3892 * parser.c (cp_parser_template_parameter): Early out with
3893 error_mark_node if parameter declaration was not parsed.
3896 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3897 auto_is_implicit_function_template_parm_p around lambda body.
3900 * parser.c (cp_parser_init_declarator): Undo fully implicit
3901 template parameter list when declarator is not a function.
3903 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3906 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3908 2014-01-03 Tobias Burnus <burnus@net-b.de>
3911 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3913 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3917 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3918 as include_std to perform_koenig_lookup.
3919 (cp_parser_postfix_expression): Adjust.
3920 * pt.c (tsubst_copy_and_build): Likewise.
3921 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3922 (omp_reduction_lookup): Adjust.
3923 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3924 (lookup_arg_dependent): Likewise.
3925 (lookup_function_nonclass): Adjust.
3926 * name-lookup.h: Adjust declaration.
3927 * cp-tree.h: Likewise.
3929 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3932 * parser.c (cp_parser_userdef_numeric_literal): Mention
3933 -fext-numeric-literals in the message.
3935 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3938 * call.c (build_conditional_expr_1): Check the return value of
3941 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3943 * call.c (convert_like_real): Check complain.
3945 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3948 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3951 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3953 Update copyright years
3955 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3957 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3958 the standard form for the copyright notice.
3960 Copyright (C) 2014 Free Software Foundation, Inc.
3962 Copying and distribution of this file, with or without modification,
3963 are permitted in any medium without royalty provided the copyright
3964 notice and this notice are preserved.