1 2014-12-17 Jason Merrill <jason@redhat.com>
3 * constexpr.c: Tweak comments and formatting.
5 2014-12-16 Paolo Carlini <paolo.carlini@oracle.com>
8 * parser.c (cp_parser_member_declaration): Fix error recovery for
9 initialized non-static data member declared friend.
11 2014-12-15 Jan Hubicka <hubicka@ucw.cz>
13 * decl2.c (decl_needed_p): When not optimizing, do not consider external
16 2014-12-15 Jason Merrill <jason@redhat.com>
19 * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
21 N3778: Sized Deallocation
22 * call.c (non_placement_deallocation_fn_p): A global sized
23 operator delete is not a usual deallocation function until C++14.
24 (build_op_delete_call): Choose the global sized op delete if we
26 * cp-tree.h: Declare non_placement_deallocation_fn_p.
27 (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
28 (global_delete_fndecl): Remove.
29 * decl.c (cxx_init_decl_processing): Also declare sized op deletes.
30 (grok_op_properties): Warn about sized dealloc without the flag.
31 * init.c (build_builtin_delete_call): Remove.
32 (build_vec_delete_1, build_delete): Don't call it.
33 * decl2.c (maybe_warn_sized_delete): New.
34 (cp_write_global_declarations): Call it.
36 2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
39 * decl.c (check_array_designated_initializer): Diagnose gracefully
40 C99 designators which aren't integral constant-expressions; allow
41 constexpr user-defined type conversion operators.
43 2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
46 * semantics.c (finish_omp_reduction_clause): Early return true
47 if DECL_SAVED_TREE (id) is NULL_TREE.
49 2014-12-12 Jason Merrill <jason@redhat.com>
52 * pt.c (do_auto_deduction): In direct-init context, { x } deduces
55 * cp-tree.h (NAMESPACE_ABI_TAG): New.
56 * name-lookup.c (handle_namespace_attrs): Set it.
57 * class.c (check_tag): Split out from find_abi_tags_r.
58 (find_abi_tags_r): Also check namespace tags.
59 (mark_type_abi_tags): Also mark namespace tags.
61 2014-12-12 Kai Tietz <ktietz@redhat.com>
64 * constexpr.c (cxx_eval_loop_expr): Don't loop
65 endless on none-constant expression.
67 2014-12-12 Jason Merrill <jason@redhat.com>
70 * lambda.c (add_capture): Don't pass a dependent type to
71 variably_modified_type_p.
73 2014-12-11 Jason Merrill <jason@redhat.com>
75 Remove N3639 "array of runtime length" from -std=c++14.
76 * decl.c (compute_array_index_type): VLAs are not part of C++14.
77 (create_array_type_for_decl, grokdeclarator): Likewise.
78 * lambda.c (add_capture): Likewise.
79 * pt.c (tsubst): Likewise.
80 * rtti.c (get_tinfo_decl): Likewise.
81 * semantics.c (finish_decltype_type): Likewise.
82 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
83 (cp_build_addr_expr_1): Likewise.
84 * init.c (build_vec_init): Don't throw bad_array_length.
88 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
89 (cp_parser_primary_expression): Not here.
92 * typeck2.c (split_nonconstant_init_1): Handle arrays here.
93 (store_init_value): Not here.
94 (split_nonconstant_init): Look through TARGET_EXPR. No longer static.
95 * cp-tree.h: Declare split_nonconstant_init.
96 * call.c (set_up_extended_ref_temp): Use split_nonconstant_init.
98 2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
100 * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
103 2014-12-10 Kai Tietz <ktietz@redhat.com>
106 * parser.c (cp_parser_diagnose_invalid_type_name): Check id
107 for being an identifier before accessing it.
110 * typeck.c (lookup_destructor): Handle incomplete type.
112 2014-12-09 Jason Merrill <jason@redhat.com>
115 * decl.c (grokdeclarator): Recover from variable template
116 specialization declared as function.
119 * parser.c (cp_parser_unqualified_id): Don't declare fname while
120 parsing function parms.
122 2014-12-03 Jason Merrill <jason@redhat.com>
125 * decl.c (grok_reference_init): Complete array type.
128 * constexpr.c (cxx_eval_store_expression): Handle non-decl store
131 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com>
134 * decl.c (identify_goto): Return a bool if diagnostic is emitted.
135 (check_previous_goto_1): Consistently emit permerror + inform.
136 (check_goto): Likewise.
138 2014-12-03 Richard Biener <rguenther@suse.de>
140 * constexpr.c (cxx_eval_builtin_function_call): Use
141 fold_build_call_array_loc.
143 2014-12-02 Marek Polacek <polacek@redhat.com>
145 * constexpr.c (cxx_eval_check_shift_p): New function.
146 (cxx_eval_binary_expression): Call it. Set NON_CONSTANT_P if it
149 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
152 * decl.c (reshape_init_r): Do not reject value-initialization of
153 scalar array element.
155 2014-12-01 Marek Polacek <polacek@redhat.com>
158 * constexpr.c: Include ubsan.h.
159 (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
160 internal functions and for ubsan builtins.
161 * error.c: Include internal-fn.h.
162 (dump_expr): Add printing of internal functions.
164 2014-12-01 Marek Polacek <polacek@redhat.com>
166 * constexpr.c (literal_type_p): Return true for void type in C++14.
168 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
171 * typeck.c (finish_class_member_access_expr): Use %q#T instead of
172 %qD in error message.
174 2014-11-29 Jakub Jelinek <jakub@redhat.com>
176 * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
177 from create_tmp_var calls.
179 2014-11-28 Marek Polacek <polacek@redhat.com>
182 * typeck.c (cp_build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
183 convert the right operand to integer type.
185 2014-11-27 Kai Tietz <ktietz@redhat.com>
188 * constexpr.c (cxx_eval_vec_init_1): Avoid
191 2014-11-26 Jason Merrill <jason@redhat.com>
193 Allow partial specialization of variable templates.
194 * cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
195 * decl.c (duplicate_decls): Copy it.
196 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
197 * parser.c (cp_parser_decltype_expr): Do call finish_id_expression
199 * pt.c (register_specialization): Remember variable template insts.
200 (instantiate_template_1): Find the matching partial specialization.
201 (check_explicit_specialization): Allow variable partial specialization.
202 (process_partial_specialization): Likewise.
203 (push_template_decl_real): Likewise.
204 (more_specialized_partial_spec): Rename from more_specialized_class.
205 (most_specialized_partial_spec): Rename from most_specialized_class.
206 (get_partial_spec_bindings): Rename from get_class_bindings.
208 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
211 * call.c (standard_conversion): Do not require expr to be non-null
212 when NULLPTR_TYPE_P (from) is true.
214 2014-11-26 Jason Merrill <jason@redhat.com>
216 * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
219 * constexpr.c (cxx_eval_call_expression): Don't talk about
220 flowing off the end if we're already non-constant.
222 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
224 Diagnose string constant conversion to char* in c++11 and above
225 as forbidden, not deprecated.
226 * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
227 change the diagnostic for the Wwrite-strings case for c++11 and above.
229 2014-11-24 Jason Merrill <jason@redhat.com>
231 * pt.c (lookup_template_variable): Always unknown_type_node.
233 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
236 * parser.c (cp_parser_label_for_labeled_statement): Check the case
237 with check_for_bare_parameter_packs.
239 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
240 Paolo Carlini <paolo.carlini@oracle.com>
243 * decl.c (initialize_local_var): Add -Winit-self warning for
244 references initialized with themselves.
246 2014-11-24 Jason Merrill <jason@redhat.com>
249 * mangle.c (mangle_decl): If we aren't going to create a symbol
250 alias, don't build the alias DECL either.
252 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
255 * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
257 2014-11-21 Jason Merrill <jason@redhat.com>
261 * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
262 if the temporary has a non-trivial destructor.
263 * decl.c (poplevel): Don't look through references.
266 * name-lookup.c (supplement_binding_1): Override a mangling alias.
267 * mangle.c (maybe_remove_implicit_alias): New.
268 (mangle_decl): Always avoid creating conflicting alias.
272 * mangle.c (decl_mangling_context): Use template_type_parameter_p.
275 * pt.c (uses_template_parms): Handle null argument.
277 2014-11-21 Jakub Jelinek <jakub@redhat.com>
280 * typeck.c (cp_build_array_ref): Adjust
281 convert_vector_to_pointer_for_subscript caller. If it returns true,
282 call non_lvalue_loc on the result.
284 2014-11-20 Jason Merrill <jason@redhat.com>
287 * pt.c (convert_nontype_argument): Call convert_from_reference.
288 (check_instantiated_arg): Don't be confused by reference refs.
289 (unify): Look through reference refs on the arg, too.
290 * mangle.c (write_template_arg): Look through reference refs.
292 * error.c (dump_expr): Avoid printing (*&i) for references.
294 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
297 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
299 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
301 * cp-objcp-common.c: Use hash_table instead of htab.
303 2014-11-19 Jason Merrill <jason@redhat.com>
306 * cp-tree.h (struct processing_template_decl_sentinel): New.
307 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
308 (instantiate_non_dependent_expr_sfinae): Here.
309 (convert_nontype_argument): Use them.
310 * constexpr.c (fold_non_dependent_expr): Use them.
313 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
314 complain yet about a reference.
315 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
316 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
317 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
318 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
321 * init.c (decl_really_constant_value): Rename from
322 integral_constant_value.
323 (scalar_constant_value): Similar but limited to scalar results.
324 (decl_constant_value_safe): Remove.
325 (constant_value_1): Respect return_aggregate_cst_ok_p.
326 * typeck.c (decay_conversion): Use scalar_constant_value.
327 * call.c (convert_like_real): Likewise.
328 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
329 * typeck.c (decay_conversion): Or ARRAY_TYPE.
330 * constexpr.c (struct constexpr_ctx): Add strict field.
331 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
332 decl_constant_value and decl_really_constant_value.
333 (cxx_eval_outermost_constant_expr): Add strict parm.
334 (maybe_constant_init): Not strict.
335 (potential_constant_expression_1): Add strict parm.
336 Shorten most internal calls with RECUR macro.
337 * cp-tree.h, pt.c, semantics.c: Adjust.
339 2014-11-19 Jason Merrill <jason@redhat.com>
342 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
344 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
347 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
348 and __PRETTY_FUNCTION__.
350 2014-11-18 Jason Merrill <jason@redhat.com>
353 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
354 from a variable of empty class type is constant.
356 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
357 (potential_constant_expression_1): Handle STMT_EXPR.
359 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
361 (lots): Omit NULL jump_target arguments.
363 * constexpr.c (struct constexpr_ctx): Add quiet field.
364 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
365 (lots): Replace allow_non_constant parameter with ctx->quiet.
368 * constexpr.c (cxx_eval_binary_expression): Don't assume the
369 expression was already folded.
370 (cxx_eval_unary_expression): Likewise.
372 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
375 * rtti.c (emit_support_tinfos): Handle __float128.
377 2014-11-18 Jason Merrill <jason@redhat.com>
380 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
383 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
384 rather than VOID_TYPE_P.
386 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
389 * typeck2.c (store_init_value): Set it.
390 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
391 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
393 2014-11-17 Jason Merrill <jason@redhat.com>
396 * call.c (build_call_a): Don't warn_deprecated_use here.
397 (build_over_call): Or here.
398 * decl2.c (mark_used): Do it here.
399 (is_late_template_attribute): Attribute deprecated is not deferred.
400 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
401 * parser.c (cp_parser_template_name): Warn about deprecated template.
402 (cp_parser_template_argument): Likewise.
405 * decl.c (cp_finish_decl): Don't try to process a non-dependent
406 constant initializer for a reference.
407 * pt.c (value_dependent_expression_p): A reference is always
409 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
412 Handle C++14 constexpr flow control.
413 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
414 (cxx_eval_statement_list): New.
415 (cxx_eval_constant_expression): Handle LABEL_EXPR,
416 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
417 semantics of RETURN_EXPR.
418 (many functions): Add jump_target parameter.
419 (returns, breaks, continues, switches, label_matches): New.
420 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
421 * cp-gimplify.c (begin_bc_block): Set them.
423 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
424 (genericize_for_stmt): Handle null statement-list.
426 * constexpr.c (use_new_call): Always use new call handling.
428 C++14 constexpr support (minus loops and multiple returns)
429 * constexpr.c (use_new_call): New macro.
430 (build_data_member_initialization): Ignore non-mem-inits.
431 (check_constexpr_bind_expr_vars): Remove C++14 checks.
432 (constexpr_fn_retval): Likewise.
433 (check_constexpr_ctor_body): Do nothing in C++14.
434 (massage_constexpr_body): In C++14 only collect mem-inits.
435 (get_function_named_in_call): Handle null CALL_EXPR_FN.
436 (cxx_bind_parameters_in_call): Build bindings in same order as
437 parameters. Don't treat iniviref parms specially in new call mode.
438 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
439 based on DECL_SAVED_TREE rather than the massaged constexpr body.
440 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
441 (is_sub_constant_expr): Don't mess with ctx.ctor here.
442 (cxx_eval_component_reference): A null element means we're mid-
444 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
445 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
446 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
447 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
448 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
449 constexpr functions. In new-call mode find parms in the values table.
450 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
451 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
452 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
453 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
454 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
455 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
456 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
457 SWITCH_STMT, ASM_EXPR.
458 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
459 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
460 caller wants an lvalue.
461 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
462 (maybe_constant_init): Look through INIT_EXPR.
463 (ensure_literal_type_for_constexpr_object): Set
464 cp_function_chain->invalid_constexpr.
465 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
466 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
467 (check_for_uninitialized_const_var): Likewise.
468 (maybe_save_function_definition): Check it.
469 * parser.c (cp_parser_jump_statement): Set
470 cp_function_chain->invalid_constexpr.
471 (cp_parser_asm_definition): Likewise.
474 * decl.c (build_ptrmemfunc_type): Don't build a different
475 RECORD_TYPE for a qualified PMF.
476 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
477 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
478 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
479 * tree.c (cp_walk_subtrees): Likewise.
480 (cp_build_qualified_type_real): Remove special PMF handling.
482 2014-11-15 Jason Merrill <jason@redhat.com>
484 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
487 * constexpr.c (cxx_eval_builtin_function_call): Use
488 fold_builtin_call_array.
490 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
492 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
494 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
495 * parser.c (cp_parser_omp_clause_collapse): Likewise.
496 (cp_parser_enumerator_definition): Don't call
497 instantiate_non_dependent_expr...
498 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
499 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
500 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
501 the final gcc_assert.
503 * constexpr.c (fold_non_dependent_expr): Add.
504 * cp-tree.h (fold_non_dependent_expr): Declare it.
505 * call.c (null_ptr_cst_p): Use it.
506 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
507 * semantics.c (begin_maybe_infinite_loop): Likewise.
508 * typeck.c (cp_build_binary_op): Likewise.
509 * typeck2.c (check_narrowing): Likewise.
511 * pt.c (fold_non_dependent_expr): Rename to
512 instantiate_non_dependent_expr.
513 (fold_non_dependent_expr_sfinae): Rename to
514 instantiate_non_dependent_expr_sfinae.
515 (convert_nontype_argument, build_non_dependent_expr): Adjust.
516 * decl.c (compute_array_index_type): Likewise.
517 * parser.c (cp_parser_parenthesized_expression_list,
518 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
520 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
522 * typeck.c (cxx_alignas_expr): Likewise.
523 * typeck2.c (store_init_value, massage_init_elt): Likewise.
524 * call.c: Adjust comments.
526 * constexpr.c: Likewise.
530 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
532 * mangle.c (find_substitution): Look for abi_tag on class templates.
534 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
535 Thomas Schwinge <thomas@codesourcery.com>
536 Ilya Verbin <ilya.verbin@intel.com>
537 Andrey Turetskiy <andrey.turetskiy@intel.com>
539 * Make-lang.in (c++.install-common): Do not install for the offload
542 2014-11-13 Kai Tietz <ktietz@redhat.com>
544 * cp-tree.h (cp_build_function_call): Remove prototype.
545 (cp_build_addr_expr_strict): Likewise.
546 (build_typed_address): Likewise.
547 * typeck.c (build_typed_address): Removed.
548 (cp_build_addr_expr_strict): Make static.
549 (cp_build_function_call): Likewise.
551 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
555 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
556 * decl.c (grokdeclarator): Use it.
557 * parser.c (cp_parser_simple_type_specifier): Likewise.
558 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
560 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
563 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
564 constant the condition.
566 2014-11-10 Andi Kleen <ak@linux.intel.com>
568 * semantics.c (finish_goto_stmt): Call check_no_cilk.
569 (finish_while_stmt_cond): Dito.
570 (finish_do_stmt): Dito.
571 (finish_for_cond): Dito.
572 (finish_switch_cond): Dito.
574 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
576 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
577 OPT_Wshift_count_overflow in the warnings.
579 2014-11-09 Jason Merrill <jason@redhat.com>
582 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
583 same scalar type is an rvalue.
586 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
588 2014-11-07 Jason Merrill <jason@redhat.com>
591 * pt.c (dependent_alias_template_spec_p): New.
592 (dependent_type_p_r): Handle dependent alias template specialization.
593 (template_args_equal): A dependent alias template specializations
594 is not equal to its underlying type as a template argument.
595 * tree.c (strip_typedefs): Don't strip a dependent alias
598 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
599 (cp_parser_primary_expression): Not here.
601 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
604 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
606 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
608 * constexpr.c: Remove redundant enum from machine_mode.
610 2014-10-28 Jason Merrill <jason@redhat.com>
612 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
614 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
616 * call.c: Adjust include files.
625 * semantics.c: Ditto.
627 * vtable-class-hierarchy.c: Ditto.
629 2014-10-24 Jason Merrill <jason@redhat.com>
631 Implement N3653 (Member initializers and aggregates) and fix
632 references to 'this' in constexpr constructors.
633 * class.c (check_field_decls): In C++14 an NSDMI does not make the
635 * constexpr.c (struct constexpr_ctx): New.
636 (cxx_bind_parameters_in_call): Handle 'this'.
637 (cxx_eval_call_expression): Create new constexpr_ctx.
638 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
639 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
640 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
641 (cxx_eval_vec_init_1): Likewise.
642 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
643 [TARGET_EXPR]: Build new constexpr_ctx.
644 [PLACEHOLDER_EXPR]: New.
645 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
647 (is_sub_constant_expr): Build new constexpr_ctx.
648 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
650 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
651 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
652 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
653 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
654 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
655 (build_ctor_subob_ref, replace_placeholders): New.
656 * typeck2.c (store_init_value): Use replace_placeholders.
657 (process_init_constructor_record): Make zero-init before NSDMI
660 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
662 * cp-gimplify.c: Adjust include files.
664 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
667 * cp-objcp-common.c: Do not include new.
668 (cxx_initialize_diagnostics): Move from here to ...
669 * error.c (cxx_initialize_diagnostics): : ... here. Move
670 diagnostics initialization here from init_error.
671 (cxx_pp): Use a real pointer not a macro.
672 (init_error): Just initialize cxx_pp.
673 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
674 not set maximum line length.
676 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
679 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
681 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
683 * parser.c (cp_parser_unary_expression): Add default arguments.
684 (cp_parser_cast_expression, cp_parser_sizeof_operand,
685 cp_parser_omp_atomic): Adjust.
687 2014-10-20 Jason Merrill <jason@redhat.com>
690 * lambda.c (current_nonlambda_function): New.
691 * semantics.c (finish_this_expr): Use it.
692 * cp-tree.h: Declare it.
694 2014-10-17 Alan Modra <amodra@gmail.com>
697 * decl.c (merge_decls): Don't merge section name, comdat group or
698 tls model to newdecl symtab node, instead merge to olddecl.
699 Override existing olddecl section name. Set tls_model for all
700 thread-local vars, not just OMP thread-private ones. Remove
703 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
705 * cp-tree.h: Adjust include files.
707 2014-10-15 Jason Merrill <jason@redhat.com>
710 * pt.c (lookup_template_variable): Call coerce_template_parms.
712 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
714 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
715 ensure_literal_type_for_constexpr_object,
716 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
717 retrieve_constexpr_fundef, is_valid_constexpr_fn,
718 build_anon_member_initialization, build_data_member_initialization,
719 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
720 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
721 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
722 massage_constexpr_body, cx_check_missing_mem_inits,
723 register_constexpr_fundef, explain_invalid_constexpr_fn,
724 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
725 maybe_initialize_constexpr_call_table, get_function_named_in_call,
726 get_nth_callarg, lookup_parameter_binding,
727 cxx_eval_builtin_function_call, adjust_temp_type,
728 cxx_bind_parameters_in_call, push_cx_call_context,
729 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
730 reduced_constant_expression_p, verify_constant,
731 cxx_eval_unary_expression, cxx_eval_binary_expression,
732 cxx_eval_conditional_expression, cxx_eval_array_reference,
733 cxx_eval_component_reference, cxx_eval_bit_field_ref,
734 cxx_eval_logical_expression, base_field_constructor_elt,
735 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
736 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
737 cxx_eval_trinary_expression, var_in_constexpr_fn,
738 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
739 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
740 maybe_constant_init, potential_constant_expression_1,
741 potential_constant_expression, potential_rvalue_constant_expression,
742 require_potential_constant_expression,
743 require_potential_rvalue_constant_expression): Moved definitions...
744 * constexpr.c: ... here, new file.
745 * Make-lang.in: Update.
746 * config-lang.in: Likewise.
748 2014-10-14 Jason Merrill <jason@redhat.com>
751 * parser.c (struct saved_token_sentinel): New.
752 (cp_parser_statement): Use it.
753 (cp_parser_start_tentative_firewall): New.
754 (cp_parser_end_tentative_firewall): New.
755 (cp_parser_lambda_expression): Use them.
756 (cp_parser_statement_expr): New.
757 (cp_parser_primary_expression): Use it.
759 2014-10-14 DJ Delorie <dj@redhat.com>
761 * typeck.c (cp_common_type): Check for all __intN types, not just
763 * decl.c (grokdeclarator): Likewise.
764 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
766 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
767 for all __intN types, not just __int128.
768 (cp_parser_simple_type_specifier): Likewise.
769 * mangle.c (integer_type_codes): Remove int128-specific codes.
770 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
771 __intN was specified.
772 * lex.c (init_reswords): Reserve all __intN keywords.
774 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
776 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
778 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
780 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
782 (print_template_statistics): Cast size and elements to long.
784 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
786 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
787 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
790 2014-10-10 Jason Merrill <jason@redhat.com>
793 * class.c (build_base_path): Preserve rvalueness.
794 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
795 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
798 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
800 * method.c (implicitly_declare_fn): Handle deleted lambda default
801 ctor and copy assop here.
802 * class.c (check_bases_and_members): Not here.
803 (add_implicitly_declared_members): And don't set
804 CLASSTYPE_LAZY_MOVE_ASSIGN.
806 * semantics.c (finish_id_expression): Check for error_mark_node.
808 2014-10-09 Jason Merrill <jason@redhat.com>
811 * semantics.c (outer_var_p): Non-static.
812 (process_outer_var_ref): Split out from finish_id_expression.
813 * pt.c (tsubst_copy_and_build): Call them.
814 * cp-tree.h: Declare them.
816 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
818 * semantics.c (check_constexpr_ctor_body_1): New.
819 (check_constexpr_ctor_body): Use it; add bool parameter.
820 (build_data_member_initialization): Handle BIND_EXPR and
821 USING_STMT in the main conditional.
822 (build_constexpr_constructor_member_initializers): Do not
823 handle BIND_EXPR here.
824 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
825 (massage_constexpr_body): Don't do it here.
826 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
827 Adjust check_constexpr_ctor_body call.
828 (cp_parser_compound_statement): Do not pedwarn for compound-statement
829 in constexpr function in C++14 mode.
830 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
832 2014-10-09 Jason Merrill <jason@redhat.com>
835 * parser.c (cp_parser_class_head): push_template_decl for members
839 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
840 (iterative_hash_template_arg): Likewise.
843 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
844 * semantics.c (force_paren_expr): And set it.
845 * typeck.c (check_return_expr): And handle it.
847 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
849 * decl.c (grokdeclarator): constexpr only implies const in C++11.
851 2014-10-08 Jason Merrill <jason@redhat.com>
854 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
857 * tree.c (build_cplus_array_type): Look for a type with no
858 typedef-name or attributes.
860 * call.c (call_copy_ctor): New.
861 (build_over_call): Use it to avoid infinite recursion on invalid code.
863 2014-10-07 Jason Merrill <jason@redhat.com>
865 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
867 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
869 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
871 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
874 * semantics.c (check_constexpr_bind_expr_vars): New.
875 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
876 (build_constexpr_constructor_member_initializers): Handle
877 BIND_EXPR in the main conditional.
879 2014-10-02 Mark Wielaard <mjw@redhat.com>
882 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
883 (cp_function_decl_deleted_p): New prototype.
884 * cp-objcp-common.c (cp_function_deleted_p): New function.
886 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
891 * typeck.c (cp_build_binary_op): save_expr after convert to save
892 redundant operations.
893 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
894 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
896 2014-10-03 Jason Merrill <jason@redhat.com>
898 * decl.c (start_decl): Complain about static/thread_local vars
899 in constexpr function.
900 (check_for_uninitialized_const_var): Also uninitialized vars.
901 * parser.c (cp_parser_jump_statement): And gotos.
902 (cp_parser_asm_operand_list): And asm.
903 (cp_parser_try_block): And try.
904 * semantics.c (ensure_literal_type_for_constexpr_object): And
907 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
908 (var_in_constexpr_fn): New.
909 (cxx_eval_constant_expression): Look into DECL_INITIAL.
910 (potential_constant_expression_1): Allow constexpr-local vars.
913 * tree.c (strip_typedefs): Handle TREE_LIST.
915 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
917 * parser.c (cp_parser_assignment_expression,
918 cp_parser_constant_expression): Add default arguments.
919 (cp_parser_primary_expression,
920 cp_parser_postfix_open_square_expression,
921 cp_parser_parenthesized_expression_list,
922 cp_parser_question_colon_clause,
923 cp_parser_expression, cp_parser_constant_expression,
924 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
925 cp_parser_template_argument, cp_parser_enumerator_definition,
926 cp_parser_member_declaration, cp_parser_constant_initializer,
927 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
928 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
929 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
930 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
931 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
932 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
933 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
935 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
938 * cp-tree.h (struct saved_scope): Add noexcept_operand.
939 (cp_noexcept_operand): Define.
940 * call.c (build_over_call): Use it.
941 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
942 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
944 2014-10-01 Jason Merrill <jason@redhat.com>
947 * method.c (constructible_expr): Handle value-init of non-class.
948 * parser.c (cp_parser_trait_expr): Allow pack expansion.
949 * pt.c (tsubst_copy_and_build): Handle pack expansion.
952 * class.c (type_has_non_user_provided_default_constructor): Rename
953 from type_has_user_provided_default_constructor, reverse sense.
954 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
955 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
956 * call.c (build_new_method_call_1): Adjust.
958 * decl.c (grok_special_member_properties): Don't set
959 TYPE_HAS_COMPLEX_DFLT.
960 * init.c (build_value_init_noctor): Don't use
961 type_has_user_provided_default_constructor.
963 2014-09-30 Jason Merrill <jason@redhat.com>
965 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
966 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
967 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
968 * parser.c (cp_parser_primary_expression): Likewise.
969 (cp_parser_trait_expr): Likewise. Handle variadic trait.
970 * semantics.c (trait_expr_value): Likewise.
971 (finish_trait_expr): Likewise.
972 (check_trait_type): Handle variadic trait. Return bool.
973 * method.c (build_stub_object): Add rvalue reference here.
974 (locate_fn_flags): Not here.
975 (check_nontriv, assignable_expr, constructible_expr): New.
976 (is_trivially_xible): New.
978 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
979 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
980 * parser.c (cp_parser_primary_expression): Likewise.
981 (cp_parser_trait_expr): Likewise.
982 * semantics.c (trait_expr_value): Likewise.
983 (finish_trait_expr): Likewise.
985 * method.c (build_stub_object): Use CONVERT_EXPR.
986 * tree.c (build_dummy_object): Likewise.
987 (is_dummy_object): Adjust.
989 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
990 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
991 * semantics.c (trait_expr_value): Likewise.
992 (finish_trait_expr): Likewise.
993 * parser.c (cp_parser_primary_expression): Likewise.
994 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
996 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
999 * error.c (print_instantiation_context): Delete.
1000 * typeck2.c (build_x_arrow): Record location when pushing
1001 template instantiation.
1002 * pt.c (push_tinst_level): Make it a wrapper around ...
1003 (push_tinst_level_loc): ... this. New function. Make excessive
1004 template instantiation depth a fatal error. Record location. Use
1005 bool as return type.
1006 (instantiate_pending_templates): Make excessive
1007 template instantiation depth a fatal error.
1008 (problematic_instantiation_changed): Use bool as return type.
1009 * cp-tree.h (print_instantiation_context): Delete.
1010 (push_tinst_level): Update declaration.
1011 (problematic_instantiation_changed): Likewise.
1012 (push_tinst_level_loc): New.
1014 2014-09-29 Richard Biener <rguenther@suse.de>
1016 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
1019 2014-09-26 Jason Merrill <jason@redhat.com>
1021 * mangle.c (find_substitution): Use write_abi_tags.
1023 2014-09-25 Marek Polacek <polacek@redhat.com>
1026 * class.c (warn_hidden): Check for FUNCTION_DECL.
1028 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1031 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
1032 on low_bound and length.
1034 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1036 * class.c, decl.c, optimize.c: Rename all instances of
1037 DECL_ABSTRACT to DECL_ABSTRACT_P.
1039 2014-09-24 Marek Polacek <polacek@redhat.com>
1043 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
1044 * tree.c (bot_manip): Add default case.
1045 * parser.c (cp_parser_primary_expression): Cast the controlling
1046 expression of a switch to an int.
1047 (cp_parser_unqualified_id): Likewise.
1049 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
1052 * parser.c (cp_parser_skip_to_closing_square_bracket,
1053 cp_parser_array_designator_p): New.
1054 (cp_parser_initializer_list): Use the latter.
1056 2014-09-22 Jason Merrill <jason@redhat.com>
1058 * semantics.c (finish_non_static_data_member): In diagnostic, give
1059 error at point of use and note at point of declaration.
1064 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
1067 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
1070 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
1072 2014-09-22 Jason Merrill <jason@redhat.com>
1074 * decl.c (poplevel): Don't warn about unused vars in template scope.
1075 * error.c (dump_decl): Handle variable templates.
1077 2014-09-20 Jason Merrill <jason@redhat.com>
1080 * decl.c (begin_destructor_body): Only clobber the as-base part of
1083 2014-09-19 Jason Merrill <jason@redhat.com>
1086 * mangle.c (write_expression): Use unresolved-name mangling for
1090 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
1091 after pulling out an element from a CONSTRUCTOR.
1093 2014-09-18 Jakub Jelinek <jakub@redhat.com>
1096 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
1097 on type of type dependent expressions, and don't call it if
1098 handle_omp_array_sections has kept TREE_LIST because something
1100 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
1101 Use keep_next_level, begin_omp_structured_block and
1102 finish_omp_structured_block instead of push_stmt_list and
1105 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1108 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
1109 for final class types.
1111 2014-09-15 Jason Merrill <jason@redhat.com>
1113 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
1114 necessary. Call inherit_targ_abi_tags here.
1115 * class.c (check_bases_and_members): Not here.
1116 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
1117 * cp-tree.h: Declare inherit_targ_abi_tags.
1119 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1121 Do not diagnose lambda default arguments in c++14 modes.
1122 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
1125 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1127 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
1130 2014-09-13 Marek Polacek <polacek@redhat.com>
1133 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
1134 location of a call expression.
1136 2014-09-11 Jason Merrill <jason@redhat.com>
1139 * decl.c (start_decl): Handle specialization of member variable
1141 * pt.c (check_explicit_specialization): Adjust error.
1143 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
1146 * typeck2.c (process_init_constructor_record): Do not warn about
1147 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
1149 2014-09-11 Jason Merrill <jason@redhat.com>
1152 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
1153 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
1155 2014-09-10 Jason Merrill <jason@redhat.com>
1158 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
1159 (duplicate_decls, start_decl): Likewise.
1160 * pt.c (check_explicit_specialization): Likewise.
1161 (push_template_decl_real): Or static templates.
1163 2014-09-08 Jason Merrill <jason@redhat.com>
1165 * typeck.c (build_class_member_access_expr): Move
1166 -Winvalid-offsetof code...
1167 * semantics.c (finish_offsetof): ...here.
1168 * parser.c (cp_parser_builtin_offsetof): Remember the location of
1170 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
1173 * pt.c (instantiate_decl): Handle recursive instantiation of
1176 2014-09-05 Jason Merrill <jason@redhat.com>
1179 * semantics.c (potential_constant_expression_1): Handle un-folded
1180 pointer to member constants.
1182 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
1185 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
1186 newdecl, not olddecl.
1188 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1191 * class.c (check_field_decls): A class of literal type cannot have
1192 volatile non-static data members and base classes.
1193 (explain_non_literal_class): Update.
1195 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1196 Balaji V. Iyer <balaji.v.iyer@intel.com>
1197 Igor Zamyatin <igor.zamyatin@intel.com>
1199 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
1201 * parser.c (cp_parser_cilk_for): New function.
1202 (cp_parser_cilk_grainsize): Likewise.
1203 (cp_parser_statement): Added RID_CILK_FOR case.
1204 (cp_parser_omp_for_cond): Added CILK_FOR check.
1205 (cp_parser_omp_for_loop_init): Change function argument to accept
1206 tree_code instead just a bool flag; change the check to use that
1207 tree_code; check for initialization declaration in case of Cilk_for.
1208 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
1209 changed call to cp_parser_omp_for_loop_init according new arguments'
1211 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1212 * pt.c (tsubst_expr): Added CILK_FOR case.
1213 * semantics.c: Include convert.h.
1214 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
1215 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
1216 (handle_omp_for_class_iterator): New argument lastp and its usage;
1218 (finish_omp_for): Changed call to handle_omp_for_class_iterator
1219 according new arguments' list; in case of Cilk_for save very first
1220 decl and create empty stmt_list block; use block to build correct
1223 2014-08-31 Jason Merrill <jason@redhat.com>
1226 * optimize.c (cdtor_comdat_group): Just look at the
1227 DECL_ASSEMBLER_NAME of the 'tors.
1229 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1232 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
1233 result of cxx_eval_constant_expression.
1235 2014-08-26 Jason Merrill <jason@redhat.com>
1238 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
1239 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
1240 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
1243 2014-08-25 Jason Merrill <jason@redhat.com>
1245 * pt.c (check_explicit_specialization): Don't complain about
1246 non-template variable.
1247 (template_for_substitution): Allow variable templates.
1248 (check_template_variable): Fix logic for member var template.
1249 * decl.c (start_decl): Don't complain about extra template header
1252 * decl.c (start_decl): Look through member variable template.
1253 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
1254 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
1257 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
1260 * cp-tree.h (TFF_POINTER): Add.
1261 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1263 * error.c (dump_type_suffix): Actually print the const and noreturn
1264 attribute when appropriate.
1266 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1268 * decl.c (compute_array_index_type, grokdeclarator,
1269 undeduced_auto_decl): Change from cxx1y to cxx14.
1270 *lambda.c(add_capture()): Change error message from C++1y to C++14.
1271 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1272 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1273 cp_parser_decltype, cp_parser_conversion_type_id,
1274 cp_parser_simple_type_specifier, cp_parser_type_id_1,
1275 cp_parser_template_type_arg, cp_parser_std_attribute,
1276 cp_parser_template_declaration_after_export): Ditto.
1277 * pt.c (tsubst): Ditto.
1278 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1279 * tree.c: Change comment.
1280 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1281 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1283 2014-08-23 Jason Merrill <jason@redhat.com>
1285 Allow non-constexpr variable templates.
1286 * decl2.c (note_variable_template_instantiation): New.
1287 * cp-tree.h: Declare it.
1288 * pt.c (instantiate_decl): Call it.
1289 (push_template_decl_real): Allow non-constexpr variable templates.
1290 * semantics.c (finish_id_expression): Mark the variable template
1291 instantiation as used.
1292 * mangle.c (write_mangled_name): Variable template instantiations
1294 * parser.c (cp_parser_init_declarator): Complain about
1295 non-function implicit templates.
1297 2014-08-22 Marek Polacek <polacek@redhat.com>
1300 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1301 preceded with logical not. Adjust call to
1302 warn_logical_not_parentheses.
1304 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1307 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1308 declaration shadows a function declaration, unless the former
1309 declares a function, pointer to function or pointer to member
1310 function, because this is a common and valid case in real-world
1312 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1313 Improve description.
1315 2014-08-22 Jason Merrill <jason@redhat.com>
1318 * class.c (outermost_open_class): Fix logic.
1319 * decl.c (complete_vars): Fix logic.
1321 2014-08-22 Jason Merrill <jason@redhat.com>
1324 * class.c (outermost_open_class): New.
1325 * cp-tree.h: Declare it.
1326 * decl.c (maybe_register_incomplete_var): Use it.
1327 (complete_vars): Handle any constant variable.
1328 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1330 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1333 * cp-array-notation.c (build_array_notation_ref): Added correct
1334 handling of case with incorrect array.
1336 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1339 * error.c (cp_diagnostic_finalizer): Delete.
1340 (init_error): Do not set diagnostic_finalizer here.
1342 2014-08-19 Marek Polacek <polacek@redhat.com>
1345 * call.c (build_new_op_1): Remember the type of arguments for
1346 a comparison. If either operand of a comparison is a boolean
1347 expression, call maybe_warn_bool_compare.
1349 2014-08-19 Jason Merrill <jason@redhat.com>
1351 PR tree-optimization/62091
1352 * decl2.c (decl_needed_p): Return true for virtual functions when
1357 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1360 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1362 * class.c (contains_empty_class_p): Remove.
1364 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1366 * parser.c (cp_parser_expression): Add default arguments.
1367 (cp_parser_primary_expression, cp_parser_postfix_expression,
1368 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1369 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1370 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1371 cp_parser_lambda_body, cp_parser_expression_statement,
1372 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1373 cp_parser_iteration_statement, cp_parser_jump_statement,
1374 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1375 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1376 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1377 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1378 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1379 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1380 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1381 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1382 cp_parser_transaction_expression): Adjust.
1384 2014-08-15 Jason Merrill <jason@redhat.com>
1387 * pt.c (lookup_template_class_1): Revert recent change.
1388 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1391 * pt.c (instantiate_class_template_1): Ignore lambda on
1392 CLASSTYPE_DECL_LIST.
1393 (push_template_decl_real): A lambda is not primary.
1394 (lookup_template_class_1): Don't look for a lambda partial
1396 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1397 currently in a function and the lambda living in a function.
1398 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1400 2014-08-15 Richard Biener <rguenther@suse.de>
1401 Jason Merrill <jason@redhat.com>
1404 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1405 (build_cplus_array_type): ...from here. Only call build_array_type
1408 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1412 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1416 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1417 cv-qualifiers of function types.
1419 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1421 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1423 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1425 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1426 cp_build_array_ref, cp_build_function_call_vec): When a
1427 pedwarn is suppressed under SFINAE, return error_mark_node.
1429 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1430 tf_warning_or_error, where complain is a bool, glitch.
1432 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1435 * decl.c (grokdeclarator): Move the check for friend initializers..
1436 * decl2.c (grokfield) ..here. Postpone early return for friends
1437 until after the initializer check.
1439 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1442 * pt.c (coerce_template_parms): Improve error message vs default
1445 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1447 * parser.c (cp_parser_init_declarator): Remove redundant check of
1448 decl_specifiers->type.
1450 2014-08-13 Jason Merrill <jason@redhat.com>
1452 * call.c (build_x_va_arg): Support passing non-POD through ....
1453 (convert_arg_to_ellipsis): Likewise.
1455 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1457 * pt.c (lookup_template_variable): Make dependent variable templates
1460 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1462 * parser.c (cp_parser_elaborated_type_specifier): Handle
1463 specially cp_parser_template_id returning a BASELINK.
1465 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1467 * parser.c (cp_parser_diagnose_invalid_type_name,
1468 cp_parser_make_typename_type): Remove scope parameter.
1469 (cp_parser_parse_and_diagnose_invalid_type_name,
1470 cp_parser_elaborated_type_specifier): Adjust calls.
1472 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1474 Reject virt-specifiers on friends and member templates
1475 * friend.c (do_friend): Diagnose virt-specifiers.
1476 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1478 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1480 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1481 return type to bool; in C++11 for constants give errors, not pedwarns.
1482 * cp-tree.h (check_narrowing): Adjust declaration.
1483 * call.c (convert_like_real): Update calls.
1484 * semantics.c (finish_compound_literal): Likewise.
1486 2014-08-08 Jason Merrill <jason@redhat.com>
1488 * pt.c (lookup_template_class_1): Copy abi_tag.
1490 2014-08-08 Kai Tietz <ktietz@redhat.com>
1492 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1493 that we operate on a true inline.
1495 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1497 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1498 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1500 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1503 * decl.c (build_enumerator): Handle class types with conversion
1504 operators via perform_implicit_conversion_flags and
1505 build_expr_type_conversion.
1507 * cvt.c (build_expr_type_conversion): Replace pair of errors
1508 with error + inform.
1510 2014-08-07 Jason Merrill <jason@redhat.com>
1513 * parser.c (c_parse_file): Change sorry to fatal_error.
1516 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1518 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1520 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1522 2014-08-06 Jason Merrill <jason@redhat.com>
1524 * init.c (build_vec_init): Fix constant initialization of
1526 (build_value_init_noctor): Call maybe_constant_init.
1527 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1531 * init.c (build_vec_init): Reorganize earlier change a bit.
1534 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1535 if we're just returning an INIT_EXPR.
1537 2014-08-06 Jason Merrill <jason@redhat.com>
1538 Braden Obrzut <admin@maniacsvault.net>
1540 * pt.c (check_explicit_specialization): Don't test
1541 DECL_DECLARED_INLINE_P for a variable template.
1543 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1546 * typeck.c (cp_build_binary_op): Extend to more cases the
1549 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1551 Implement constexpr variable templates
1552 * decl.c (grokvardecl): Handle specializations of variable templates.
1553 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1554 return from grokvardecl.
1555 * decl2.c (check_member_template): Allow declaration of template member
1557 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1559 * pt.c (check_template_variable): Accept variable temploids at
1561 (push_template_decl_real): The current instantiation of a template
1563 (determine_specialization): Accept variable templates.
1564 (check_explicit_specialization): Handle and check for malformed
1565 variable template specializations.
1566 (lookup_template_variable): New.
1567 (tsubst_decl): Handle variable template specializations.
1568 (do_decl_instantiation): Handle template variables.
1569 (instantiate_decl): Handle template variables.
1570 * semantics.c (finish_template_variable): New.
1571 (finish_id_expression): Instantiate variable templates.
1572 * cp-tree.h (variable_template_p): New.
1574 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1577 * decl.c (check_redeclaration_no_default_args): New.
1578 (duplicate_decls): Use it, handle default arguments
1579 in redeclarations of function templates.
1581 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1583 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1585 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1587 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1588 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1589 instead of pointer_set.
1591 2014-08-01 Jason Merrill <jason@redhat.com>
1594 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1595 init-list for trailing elements.
1596 * typeck2.c (process_init_constructor_array): Likewise.
1598 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1601 * decl.c (duplicate_decls): Handle static member functions too.
1603 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1605 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1608 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1611 * parser.c (cp_parser_array_notation): Added check for array_type.
1613 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1616 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1617 DECL_EXPR improved. Changed handling for INIT_EXPR.
1619 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1621 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1623 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1625 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1626 -fsanitize=alignment call ubsan_maybe_instrument_reference
1627 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1628 for calls to member functions.
1630 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1633 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1634 whether it is returning the address of a local variable.
1635 (check_return_expr): Return 0 instead of the address of a local
1638 2014-07-30 Jason Merrill <jason@redhat.com>
1642 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1644 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1647 * pt.c (unify_arity): Add boolean parameter.
1648 (unify_too_few_arguments): Likewise.
1649 (type_unification_real): Diagnose correctly insufficient
1650 arguments in the presence of trailing variadic parameters;
1651 deducing multiple trailing packs as empty is fine.
1653 2014-07-30 Jason Merrill <jason@redhat.com>
1658 * decl2.c (mark_all_virtuals): New variable.
1659 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1660 (cp_write_global_declarations): Set it and give helpful diagnostic
1661 if it introduces errors.
1662 * class.c (finish_struct_1): Check it.
1666 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1667 (check_explicit_specialization): Clear it on specializations.
1668 * decl.c (duplicate_decls, start_decl): Likewise.
1669 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1670 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1671 linkage after setting the appropriate flags.
1672 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1673 * decl2.c (mark_needed): Mark clones.
1674 (import_export_decl): Not here.
1676 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1678 Implement N4051 - Allow typename in a template template parameter
1679 * parser.c (cp_parser_type_parameter_key): New funtion;
1680 (cp_parser_token_is_type_parameter_key): Ditto;
1681 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1682 but pedwarn for less than cxx1z.
1684 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1687 * call.c (standard_conversion): Use resolve_nondeduced_context
1688 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1690 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1693 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1696 2014-07-15 Jason Merrill <jason@redhat.com>
1699 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1703 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1704 * class.c (finish_struct): Reject invalid definition of
1705 std::initializer_list.
1707 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1709 * call.c (convert_like_real): Call print_z_candidate and inform only
1710 if permerror returns true.
1712 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1714 * class.c (build_clone): Do not clear assembler names of
1716 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1717 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1718 as a special case return sizeof (struct tree_decl_non_common)
1720 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1721 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1722 * cp/cp-tree.h (tree_template_decl): New structure.
1723 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1724 (union cp_lang_tree_node): Add template_decl.
1725 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1727 2014-07-14 Jason Merrill <jason@redhat.com>
1731 * pt.c (instantiate_decl): Don't check defer_ok for local class
1734 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1737 * cp-tree.h (LITERAL_ZERO_P): Define.
1738 * parser.c (cp_parser_parenthesized_expression_list): Add
1739 want_literal_zero_p argument, if true, for literal zeros
1740 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1741 (cp_parser_postfix_expression): Adjust
1742 cp_parser_parenthesized_expression_list caller, handle
1743 -Wmemset-transposed-args.
1744 (literal_zeros): New variable.
1746 2014-07-13 Jason Merrill <jason@redhat.com>
1749 * semantics.c (is_instantiation_of_constexpr): Return true for
1750 defaulted functions, too.
1751 (explain_invalid_constexpr_fn): Only use
1752 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1753 * method.c (explain_implicit_non_constexpr): Pass
1754 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1757 * decl.c (check_initializer): Don't finish_compound_literal
1758 on erroneous constexpr init.
1761 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1764 * decl.c (create_array_type_for_decl): Only check for auto once.
1767 * call.c (build_list_conv): Don't try to build a list of references.
1769 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1771 PR C++/60209 - Declaration of user-defined literal operator cause error
1772 * parser.c (cp_parser_operator): Fold treatment of strings
1773 and user-defined string literals. Use the full string parser.
1774 (cp_parser_string_literal): Add flag to not look for literal operator.
1776 2014-07-11 Jason Merrill <jason@redhat.com>
1780 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1782 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1785 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1787 * decl.c (check_initializer): Don't call check_narrowing here,
1788 set LOOKUP_NO_NARROWING.
1789 * typeck2.c (digest_init_r): Likewise.
1791 2014-07-10 Jason Merrill <jason@redhat.com>
1794 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1798 * decl2.c (mark_all_virtuals): New variable.
1799 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1800 (cp_write_global_declarations): Set it and give helpful diagnostic
1801 if it introduces errors.
1802 * class.c (finish_struct_1): Check it.
1803 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1805 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1808 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1809 outside class declaration, in friend declaration, and neither on
1810 constructor nor conversion operator.
1812 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1816 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1817 cv-qualifiers of function types.
1819 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1820 Paolo Carlini <paolo.carlini@oracle.com>
1823 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1826 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1828 * class.c (check_for_override): Wrap the 'final' and 'override'
1829 keywords in %< and %>.
1831 2014-07-06 Marek Polacek <polacek@redhat.com>
1834 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1835 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1836 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1839 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1841 * pt.c (convert_template_argument): Use inform instead of error in
1844 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1849 * parser.c (cp_parser_userdef_string_literal): Take a tree
1851 (cp_parser_string_literal): Don't hack the token stream.
1853 2014-06-30 Jason Merrill <jason@redhat.com>
1857 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1859 * init.c (build_vtbl_address): Don't mark destructor.
1860 * class.c (finish_struct_1): Add all classes to keyed_classes
1864 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1867 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1869 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1870 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1871 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1872 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1873 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1874 * pt.c (unify): Also check whether the argument is a PMF.
1876 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1879 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1880 a '[' can also start a primary-expression.
1881 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1882 when cp_parser_tokens_start_cast_expression returns -1.
1884 2014-06-30 Jason Merrill <jason@redhat.com>
1887 * pt.c (unify_one_argument): Type/expression mismatch just causes
1890 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1893 2014-06-30 Marek Polacek <polacek@redhat.com>
1895 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1896 function has no_sanitize_undefined attribute.
1897 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1898 function has no_sanitize_undefined attribute.
1900 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1903 * cp-array-notation.c (expand_sec_reduce_builtin):
1904 Check that bultin argument is correct.
1905 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1907 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1911 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1912 types aren't the same.
1914 2014-06-27 Jason Merrill <jason@redhat.com>
1917 * error.c (dump_template_bindings): Don't tsubst in a clone.
1919 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1922 * semantics.c (finish_compound_literal): Revert r204228.
1924 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1926 * parser.c (cp_parser_compound_literal_p): New.
1927 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1929 2014-06-26 Jason Merrill <jason@redhat.com>
1931 * parser.c (cp_parser_for_init_statement): Change range-for error
1934 N3994 Ranged-based for-loops: The Next Generation
1935 * parser.c (cp_lexer_nth_token_is): New.
1936 (cp_parser_for_init_statement): Allow "for (id : init)".
1938 2014-06-26 Teresa Johnson <tejohnson@google.com>
1940 * class.c (dump_class_hierarchy): Use saved dump files.
1941 (dump_vtable): Ditto.
1944 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1947 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1948 parameter lists outside of function parameter scope.
1950 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1954 * typeck2.c (process_init_constructor_record): Do not complain about
1955 uninitialized const members, because within aggregate-initialization,
1956 members without explicit initializers are value-initialized.
1958 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1960 * semantics.c (finish_omp_clauses): Make sure
1961 OMP_CLAUSE_LINEAR_STEP has correct type.
1963 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1965 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1966 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1967 FUNCTION_DECL check.
1968 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1969 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1970 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1971 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1973 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1976 * decl.c (grokdeclarator): Do not early check for operator-function-id
1979 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1981 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1984 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1986 * parser.c (cp_parser_omp_for_loop): For
1987 #pragma omp parallel for simd move lastprivate clause from parallel
1988 to for rather than simd.
1990 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1994 * decl.c (grokparms): Accept a single parameter of type 'void'.
1996 2014-06-20 Jason Merrill <jason@redhat.com>
1999 * call.c (add_function_candidate): Avoid special 'this' handling
2000 if we have a ref-qualifier.
2003 * call.c (build_over_call): Call build_this in template path.
2005 2014-06-19 Jason Merrill <jason@redhat.com>
2008 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
2010 2014-06-18 Jason Merrill <jason@redhat.com>
2013 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
2014 ref-qualifier handling.
2017 * pt.c (resolve_overloaded_unification): Preserve
2018 ARGUMENT_PACK_EXPLICIT_ARGS.
2020 2014-06-18 Jakub Jelinek <jakub@redhat.com>
2022 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
2024 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
2026 2014-06-17 Jason Merrill <jason@redhat.com>
2029 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
2031 2014-06-15 Jason Merrill <jason@redhat.com>
2034 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
2037 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
2039 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2041 * decl.c (grokvardecl): Fix pasto in previous patch.
2043 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2045 * decl.c (duplicate_decls): Use set_decl_tls_model.
2046 (grokdeclarator): Likewise.
2047 * semantics.c (finish_id_expression): Check TLS only for
2049 (finish_omp_threadprivate): Use decl_default_tls_model.
2050 * decl2.c (get_guard): Likewise.
2051 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
2053 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2056 * decl.c (grokparms): Improve error message about void parameters.
2057 * error.c (type_to_string): Fix aka cut off code.
2059 2014-06-12 Jason Merrill <jason@redhat.com>
2061 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
2062 * cvt.c (type_promotes_to): Likewise.
2063 * mangle.c (write_type, write_expression): Likewise.
2064 (write_name, write_template_arg): Likewise.
2065 (mangle_decl): Make alias based on flag_abi_compat_version.
2066 Emit -Wabi warning here.
2067 (finish_mangling_internal): Not here. Drop warn parm.
2068 (finish_mangling_get_identifier, finish_mangling): Adjust.
2069 (mangle_type_string, mangle_special_for_type): Adjust.
2070 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
2071 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
2072 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
2074 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
2075 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
2076 (layout_nonempty_base_or_field, end_of_class): Likewise.
2077 (layout_empty_base, build_base_field, layout_class_type): Likewise.
2078 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
2079 (layout_virtual_bases): Likewise.
2080 * decl.c (compute_array_index_type): Likewise.
2081 * mangle.c (write_mangled_name, write_prefix): Likewise.
2082 (write_template_prefix, write_integer_cst, write_expression): Likewise.
2083 (write_template_arg, write_array_type): Likewise.
2084 * method.c (lazily_declare_fn): Likewise.
2085 * rtti.c (get_pseudo_ti_index): Likewise.
2086 * typeck.c (comp_array_types): Likewise.
2088 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
2090 * vtable-class-hierarchy.c: Update handling for section names
2091 that are no longer trees.
2092 * decl.c (duplicate_decls): Likewise.
2094 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2097 * parser.c (cp_parser_init_declarator): Actually pass friend_p
2098 to cp_parser_declarator.
2100 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2103 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
2104 * name-lookup.c (validate_nonmember_using_decl): Adjust error
2107 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2110 * parser.c (cp_parser_declarator): Add bool parameter.
2111 (cp_parser_direct_declarator): Likewise, use it.
2112 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
2113 (cp_parser_condition, cp_parser_explicit_instantiation,
2114 cp_parser_init_declarator, cp_parser_type_id_1,
2115 cp_parser_parameter_declaration, cp_parser_exception_declaration,
2116 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
2117 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
2119 * decl.c (grokdeclarator): Fix handling of friend declared in
2120 namespace scope (g++.dg/parse/friend10.C).
2122 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
2124 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
2126 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
2127 (maybe_clone_body): Move symbol across comdat groups.
2128 * method.c (use_thunk): Copy implicit section flag.
2130 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2133 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
2135 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2137 * method.c (use_thunk): Use set_decl_section_name.
2138 * optimize.c (maybe_clone_body): Use set_decl_section_name.
2139 * decl.c (duplicate_decls): Likewise.
2140 * vtable-class-hierarchy.c: Likewise.
2142 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
2145 * class.c (check_field_decls): In C++11 mode do not reject
2146 static data members and reference-type members in unions.
2148 2014-06-05 Jason Merrill <jason@redhat.com>
2151 * decl.c (check_initializer): Collapse a TREE_LIST here.
2152 * typeck2.c (store_init_value): Not here.
2154 2014-06-05 Richard Biener <rguenther@suse.de>
2155 Paolo Carlini <paolo.carlini@oracle.com>
2158 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
2159 handling of empty classes.
2161 2014-06-04 Jason Merrill <jason@redhat.com>
2163 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
2164 for noexcept and thread_local, too.
2167 * decl.c (check_initializer): Maybe clear
2168 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2170 2014-06-05 Richard Biener <rguenther@suse.de>
2173 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
2174 warnings for accessing empty classes.
2176 2014-06-05 Marek Polacek <polacek@redhat.com>
2179 * parser.c (cp_parser_binary_expression): Warn when logical not is
2180 used on the left hand side operand of a comparison.
2182 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
2185 * typeck.c (cp_build_modify_expr): Handle array of characters
2186 initialized by a string literal.
2187 * decl.c (check_initializer): Handle parenthesized string literal
2189 * typeck2.c (store_init_value): Remove redundant check.
2191 2014-06-04 Jason Merrill <jason@redhat.com>
2195 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
2196 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
2198 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2201 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
2204 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2208 * call.c (standard_conversion): Convert nullptr to bool only
2209 in case of direct-initialization.
2210 (convert_like_real): Provide informative error message.
2212 2014-06-03 Marek Polacek <polacek@redhat.com>
2215 * semantics.c (finish_switch_cond): Warn if switch condition has
2218 2014-06-03 Jason Merrill <jason@redhat.com>
2221 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
2222 variable to local_specializations.
2225 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
2227 2014-06-02 Jason Merrill <jason@redhat.com>
2230 * decl.c (reshape_init_class): Handle un-folded
2231 constant-expressions.
2234 * pt.c (pack_deducible_p): Handle canonicalization.
2236 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2238 * pt.c (tsubst_function_type): Initialize arg_types.
2240 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
2243 * class.c (handle_using_decl): Pass the correct scope to
2244 cp_emit_debug_info_for_using.
2246 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2250 * search.c (accessible_p): Use current_nonlambda_class_type.
2251 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2253 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2255 * decl.c: Include builtins.h.
2256 * semantics.c: Likewise.
2258 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
2262 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2263 * pt.c (tsubst_function_type): Inject the this parameter; do the
2264 substitutions in the order mandated by the DR.
2265 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2266 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2267 (static_fn_type): Copy it.
2268 * decl2.c (build_memfn_type, change_return_type,
2269 cp_reconstruct_complex_type): Likewise.
2270 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2271 * tree.c (strip_typedefs): Likewise.
2272 * typeck.c (merge_types): Likewise.
2274 2014-05-30 Jason Merrill <jason@redhat.com>
2277 * pt.c (instantiate_decl): Check that defer_ok is not set for
2278 local class members.
2281 * pt.c (tsubst_init): Split out from...
2282 (tsubst_expr) [DECL_EXPR]: Here.
2283 (tsubst_copy) [VAR_DECL]: Use it.
2284 * semantics.c (finish_id_expression): Return the decl for static/const.
2286 2014-05-28 Jason Merrill <jason@redhat.com>
2289 * decl.c (cxx_comdat_group): Return a decl.
2290 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2292 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2296 * call.c (build_aggr_conv): Ignore passed in flags.
2297 (build_array_conv, build_complex_conv): Likewise.
2299 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2301 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2302 (maybe_clone_body): Likewise.
2303 * decl.c (duplicate_decls): Update code duplicating comdat group;
2304 do not copy symtab pointer; before freeing newdecl remove it
2306 * decl2.c (constrain_visibility): Use set_comdat_group.
2308 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2310 * rtti.c: Include tm_p.h
2311 (emit_tinfo_decl): Force RTTI data to be aligned to required
2314 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2316 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2317 ignoring other target adjustments.
2319 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2321 * semantics.c (finish_omp_clauses): Remove duplicated variable
2324 * parser.c (cp_parser_omp_target): Return bool values.
2326 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2329 * lambda.c (add_capture): Enforce that capture by value requires
2331 * typeck2.c (cxx_incomplete_type_inform): Early return if
2332 TYPE_MAIN_DECL is null.
2334 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2337 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2339 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2342 * lambda.c (build_capture_proxy, add_capture): Treat normal
2343 captures and init-captures identically.
2345 2014-05-21 Mark Wielaard <mjw@redhat.com>
2348 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2349 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2351 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2353 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2354 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2355 (expand_array_notation): Handle VOID_CST.
2356 * error.c (dump_expr): Likewise.
2357 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2358 (cxx_pretty_printer::expression): Likewise.
2359 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2360 * decl.c (register_dtor_fn): Likewise.
2361 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2362 (build_delete, push_base_cleanups): Likewise.
2363 * mangle.c (write_expression): Likewise.
2364 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2365 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2366 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2367 * tree.c (cp_tree_equal): Likewise.
2368 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2369 instead of void_zero_node.
2370 * typeck.c (check_return_expr): Likewise.
2371 * typeck2.c (build_functional_cast): Likewise.
2373 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2376 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2378 (cp_parser_statement): ...here. Make sure only semicolon can go after
2381 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2386 * typeck2.c (digest_nsdmi_init): New.
2387 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2388 * init.c (get_nsdmi): Likewise.
2389 * cp-tree.h (digest_nsdmi_init): Declare.
2391 2014-05-20 Jason Merrill <jason@redhat.com>
2393 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2394 up a virtual function in a dummy object.
2396 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2399 * decl.c (duplicate_decls): Replace pair of warning_at with
2400 warning_at + inform.
2401 (maybe_commonize_var): Likewise.
2403 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2406 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2407 (tsubst_copy_and_build): Perform recursive substitutions in a
2408 deterministic order.
2410 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2413 * typeck2.c (cxx_incomplete_type_inform): New.
2414 (cxx_incomplete_type_diagnostic): Use it.
2415 * decl.c (grokdeclarator): Check the element type of an
2416 incomplete array type; call the above.
2417 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2419 2014-05-19 Jason Merrill <jason@redhat.com>
2422 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2423 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2425 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2427 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2428 * parser.c (cp_parser_enum_specifier): Likewise.
2430 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2432 * class.c (sorted_fields_type_new): Adjust.
2433 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2434 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2435 * cp-tree.h: Remove usage of variable_size gty attribute.
2436 * decl.c (make_label_decl): Adjust.
2437 (check_goto): Likewise.
2438 (start_preparsed_function): Likewise.
2439 (save_function_data): Likewise.
2440 * lex.c (init_reswords): Likewise.
2441 (retrofit_lang_decl): Likewise.
2442 (cxx_dup_lang_specific_decl): Likewise.
2443 (copy_lang_type): Likewise.
2444 (cxx_make_type): Likewise.
2445 * name-lookup.c (binding_entry_make): Likewise.
2446 (binding_table_construct): Likewise.
2447 (binding_table_new): Likewise.
2448 (cxx_binding_make): Likewise.
2449 (pushdecl_maybe_friend_1): Likewise.
2450 (begin_scope): Likewise.
2451 (push_to_top_level): Likewise.
2452 * parser.c (cp_lexer_alloc): Likewise.
2453 (cp_lexer_new_from_tokens): Likewise.
2454 (cp_token_cache_new): Likewise.
2455 (cp_parser_context_new): Likewise.
2456 (cp_parser_new): Likewise.
2457 (cp_parser_nested_name_specifier_opt): Likewise.
2458 (cp_parser_template_id): Likewise.
2459 * pt.c (maybe_process_partial_specialization): Likewise.
2460 (register_specialization): Likewise.
2461 (add_pending_template): Likewise.
2462 (lookup_template_class_1): Likewise.
2463 (push_tinst_level): Likewise.
2464 * semantics.c (register_constexpr_fundef): Likewise.
2465 (cxx_eval_call_expression): Likewise.
2466 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2468 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2471 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2472 when cp_parser_lookup_name sets ambiguous_decls.
2474 2014-05-15 Jason Merrill <jason@redhat.com>
2476 * call.c (print_conversion_rejection): Use loc consistently.
2478 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2480 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2481 * call.c (convert_like_real, build_new_method_call_1): Use it.
2482 * decl2.c (grokfield): Likewise.
2483 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2484 build_new_1): Likewise.
2485 * mangle.c (write_expression): Likewise.
2486 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2488 2014-05-14 Jason Merrill <jason@redhat.com>
2492 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2493 dropped cv-quals as a bad conversion.
2494 (convert_like_real) [ck_ref_bind]: Explain them.
2495 (compare_ics): Check badness before stripping reference
2496 bindings. Handle comparing bad reference bindings.
2497 * typeck.c (comp_cv_qualification): Add overload that just takes
2499 * cp-tree.h: Declare it.
2501 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2502 (arg_conversion_rejection, bad_arg_conversion_rejection)
2503 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2504 (add_function_candidate): Pass actual argument, rather than type, to
2505 bad_arg_conversion_rejection.
2506 (print_conversion_rejection): Explain what's wrong with the conversion.
2507 (print_z_candidates): Say "candidate:" before each candidate.
2508 (splice_viable): Be strict if we see a viable or template candidate.
2509 (build_user_type_conversion_1): Pass false to strict parameter.
2510 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2511 (build_new_op_1, build_new_method_call_1): Likewise.
2512 (build_op_call_1): Pass true to strict parameter.
2514 2014-05-13 Jason Merrill <jason@redhat.com>
2516 * call.c (print_error_for_call_failure): Say "no match" rather
2517 than "ambiguous" if there were no strict matches.
2518 (build_new_method_call_1): Likewise.
2521 * semantics.c (is_this_parameter): Allow capture proxies too.
2523 2014-05-12 Jason Merrill <jason@redhat.com>
2525 * call.c (maybe_print_user_conv_context): New.
2526 (convert_like_real): Use it. Print call context for bad
2527 user-defined conversion.
2528 (build_over_call): Print call context for bad 'this' conversion.
2530 * call.c (convert_like_real): Use inform for identifying the
2533 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2535 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2536 complain & tf_error is false.
2538 * decl.c (make_unbound_class_template): Prefer inform for
2539 "declared here"-type message.
2541 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2545 * lambda.c (lambda_expr_this_capture): Add new parameter
2546 add_capture_p controlling whether the functions will try to
2547 capture 'this' via the default capture.
2548 (maybe_resolve_dummy): Likewise.
2549 * cp-tree.h: Adjust prototypes.
2550 * call.c, semantics.c: Change callers of these functions.
2551 * call.c (build_new_method_call_1): Use the actual 'this' that
2552 would be potentially captured for the overload resolution, instead
2553 of the dummy object.
2555 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2557 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2559 (convert_nontype_argument): Adjust calls.
2560 (coerce_template_parameter_pack): Add missing complain & tf_error
2563 2014-05-09 Jason Merrill <jason@redhat.com>
2567 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2568 non-class lvalues and xvalues that differ only in cv-qualifiers.
2572 * call.c (build_user_type_conversion_1): The copy-init temporary
2576 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2579 * call.c (build_conditional_expr_1): If overload resolution finds
2580 no match, just say "different types".
2583 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2586 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2587 if we didn't find a conversion.
2588 Don't accept a bad conversion too early.
2590 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2593 * typeck.c (convert_for_assignment): Provide an inform for pointers
2594 to incomplete class types.
2596 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2599 * pt.c (convert_nontype_argument): Protect all the error calls
2600 with complain & tf_error.
2602 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2605 * pt.c (instantiate_decl): Avoid generating the body of a
2608 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2611 * pt.c (maybe_begin_member_template_processing): Use
2612 uses_template_parms.
2614 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2615 Mike Stump <mikestump@comcast.net>
2616 Richard Sandiford <rdsandiford@googlemail.com>
2618 * call.c: Include wide-int.h.
2619 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2620 (convert_for_arg_passing): Likewise.
2621 * class.c: Include wide-int.h.
2622 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2623 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2624 (include_empty_classes): Likewise
2625 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2626 * cvt.c: Include wide-int.h.
2627 (ignore_overflows): Use wide_int_to_tree.
2628 * decl.c: Include wide-int.h.
2629 (check_array_designated_initializer): Use wide-int interfaces.
2630 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2631 (finish_enum_value_list): Use signop.
2632 (build_enumerator): Use wide-int interfaces.
2633 * init.c: Include wide-int.h.
2634 (build_new_1): Use wide-int interfaces.
2635 * mangle.c: Include wide-int.h.
2636 (write_integer_cst): Use wide-int interfaces.
2637 (write_array_type): Likewise.
2638 * tree.c: Include wide-int.h.
2639 (cp_tree_equal): Use tree_int_cst_equal.
2640 * typeck2.c: Include wide-int.h.
2641 (process_init_constructor_array): Use wide-int interfaces.
2643 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2646 * decl.c (grokfndecl): Check duplicate_decls return value for
2648 * pt.c (instantiate_decl): A deleted function is defined.
2650 2014-05-02 Jason Merrill <jason@redhat.com>
2652 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2655 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2657 (add_capture): Check for VLA before calling it.
2658 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2659 just the current one. Make non-static.
2660 * cp-tree.h: Declare it.
2661 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2662 the operand was static or constant.
2664 2014-05-02 Marek Polacek <polacek@redhat.com>
2666 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2669 2014-05-01 Marek Polacek <polacek@redhat.com>
2672 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2673 between label and variable when warning about returning local address.
2675 2014-04-30 Jason Merrill <jason@redhat.com>
2678 * init.c (build_value_init): Don't try to call an array constructor.
2681 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2683 2014-04-30 Marek Polacek <polacek@redhat.com>
2685 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2686 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2687 for non-integer types.
2689 2014-04-29 Jason Merrill <jason@redhat.com>
2692 Represent the unevaluated exception specification of an implicitly
2693 declared or deleted function with a simple placeholder, not a list
2695 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2696 * except.c (unevaluated_noexcept_spec): New.
2697 * class.c (deduce_noexcept_on_destructor): Use it.
2698 * decl.c (check_redeclaration_exception_specification): Call
2699 maybe_instantiate_noexcept.
2700 (duplicate_decls): Call it before merge_types.
2701 (start_preparsed_function): Call maybe_instantiate_noexcept.
2702 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2703 * init.c (get_nsdmi): Factor out of perform_member_init.
2704 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2705 (walk_field_subobs): Consider NSDMI for EH spec.
2706 (get_defaulted_eh_spec): New.
2707 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2708 (defaulted_late_check): Defer EH checking in non-template classes.
2709 (after_nsdmi_defaulted_late_checks): New.
2710 * parser.c (cp_parser_class_specifier_1): Use it.
2711 (unparsed_classes): New macro.
2712 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2713 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2714 Remove list-of-functions handling.
2715 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2716 handling and FN parameter.
2717 * typeck.c (merge_types): Adjust.
2719 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2722 * parser.c (cp_parser_alias_declaration): Check return value of
2725 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2727 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2728 atomic-clause, allow comma in between atomic-clause and
2731 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2734 * rtti.c (emit_support_tinfos): Do not iterate on
2735 registered_builtin_types (partial revert).
2737 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2740 * semantics.c (apply_deduced_return_type): Complete non-void type
2741 before estimating whether the type is aggregate.
2743 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2746 * rtti.c (emit_support_tinfo_1): New function, extracted from
2747 emit_support_tinfos.
2748 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2750 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2753 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2754 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2756 2014-04-18 Jason Merrill <jason@redhat.com>
2759 * call.c (reference_binding): Recurse on user-defined conversion.
2762 * call.c (standard_conversion): Don't try to apply restrict to void.
2764 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2766 * decl.c (reshape_init_r): Handle a single element of vector type.
2768 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2771 * decl2.c (cplus_decl_attributes): Handle
2772 pointer-to-member-function declarations.
2774 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2777 * call.c (build_user_type_coversion): Use build_dummy_object
2778 to create the placeholder object for a constructor method call.
2779 (build_special_member_call): Likewise.
2780 (build_over_call): Check for the placeholder object with
2782 (build_new_method_call_1): Likewise. Don't attempt to resolve
2783 a dummy object for a constructor method call.
2785 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2788 * friend.c (add_friend, make_friend_class): Move repeated friend
2789 warning under Wredundant_decls.
2791 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2793 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2794 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2795 (do_class_using_decl): Likewise.
2796 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2798 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2801 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2803 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2805 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2807 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2809 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2811 2014-04-11 Jason Merrill <jason@redhat.com>
2813 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2815 (cp_lexer_get_preprocessor_token): Always clear it.
2816 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2820 * decl.c (reshape_init_r): Handle a single element of class type.
2823 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2824 built-in operator new.
2826 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2829 * name-lookup.c (parse_using_directive): Return early if the
2830 attribs argument is error_mark_node; use get_attribute_name.
2832 2014-04-11 Jason Merrill <jason@redhat.com>
2836 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2837 * call.c (struct z_candidate): Add flags field.
2838 (add_candidate): Add flags parm.
2839 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2840 (add_template_candidate_real): Pass it.
2841 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2842 * tree.c (build_aggr_init_expr): Copy it.
2843 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2845 2014-04-10 Richard Biener <rguenther@suse.de>
2846 Jakub Jelinek <jakub@redhat.com>
2849 * error.c (dump_decl) <case FUNCTION_DECL>: If
2850 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2851 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2854 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2856 * pt.c (check_template_variable): Check for the return of pedwarn
2857 before emitting a note.
2858 * parser.c (cp_parser_lambda_introducer): Likewise.
2860 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2863 * pt.c (process_template_parm): For an invalid non-type parameter
2864 only set TREE_TYPE to error_mark_node.
2865 (push_inline_template_parms_recursive, comp_template_parms,
2866 redeclare_class_template, coerce_template_template_parm,
2867 coerce_template_template_parms, unify): Use error_operand_p.
2869 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2871 * class.c (check_bases_and_members): Warn about non-virtual dtors
2872 in public bases only. Check warn_ecpp before complaining about
2873 non-polymorphic bases.
2875 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2877 * decl.c (duplicate_decls): Check for the return of warning_at
2878 before emitting a note.
2879 (warn_misplaced_attr_for_class_type): Likewise.
2880 (check_tag_decl): Likewise.
2882 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2885 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2887 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2890 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2891 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2892 instantiating a variable-sized type.
2895 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2897 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2899 * class.c (find_abi_tags_r): Check for the return of warning
2900 before emitting a note.
2901 (one_inherited_ctor): Likewise.
2903 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2905 * decl.c (duplicate_decls): Check for the return of permerror
2906 before emitting a note.
2908 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2910 * class.c (accessible_nvdtor_p): New.
2911 (check_bases): Don't check base destructor here ...
2912 (check_bases_and_members): ... check them here. Trigger on
2913 Wnon-virtual-dtor flag.
2914 (finish_struct_1): Use accessible_nvdtor_p.
2916 2014-04-01 Jason Merrill <jason@redhat.com>
2918 * pt.c (process_partial_specialization): Say "not deducible"
2919 rather than "not used". Use inform.
2922 * pt.c (coerce_template_parms): Check that the pack expansion
2923 pattern works with the first matching parameter.
2925 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2927 * init.c (perform_member_init): Homogenize uninitialized
2930 2014-04-01 Jason Merrill <jason@redhat.com>
2933 * call.c (build_array_conv): Call complete_type.
2936 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2937 (picflag_from_initializer): Return it.
2938 (process_init_constructor): Handle it.
2941 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2942 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2943 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2944 (most_general_template): Handle more kinds of template.
2945 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2946 instantiations and specializations.
2948 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2951 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2952 COMPONENT_REFs and ARRAY_REFs sooner.
2954 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2957 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2958 usage in non-functions with pushed scope.
2960 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2963 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2964 to indicate whether a scope is in the process of defining a class.
2965 * semantics.c (begin_class_definition): Set defining_class_p.
2966 * name-lookup.c (leave_scope): Reset defining_class_p.
2967 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2968 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2969 unwinding to class-defining scope to handle the erroneous definition of
2970 a generic function of an arbitrarily nested class within an enclosing
2973 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2976 * method.c (walk_field_subobs): Improve the diagnostic
2977 locations for both REFERENCE_TYPEs and non-static const members.
2978 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2979 instead of %qD to be consistent with the c++11 diagnostic.
2981 2014-03-25 Jason Merrill <jason@redhat.com>
2985 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2986 * search.c (get_pure_virtuals): Not here.
2989 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2990 a lambda in unevaluated context.
2993 * decl.c (create_array_type_for_decl): Complain about array of auto.
2995 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2998 * semantics.c (potential_constant_expression_1): Handle
3001 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
3004 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
3005 introducing an implicit function template parameter within an explicit
3008 2014-03-22 Jason Merrill <jason@redhat.com>
3011 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
3014 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
3017 * name-lookup.c (push_class_level_binding_1): Check identifier_p
3018 on the name argument.
3020 2014-03-20 Jakub Jelinek <jakub@redhat.com>
3023 * init.c (build_zero_init_1): Ignore fields with error_mark_node
3026 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
3029 * call.c (build_new_method_call_1): Handle pure virtuals called by
3032 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
3035 * parser.c (cp_parser_member_declaration): Don't allow
3036 finish_fully_implicit_template to consider friend declarations to be
3037 class member templates.
3038 (synthesize_implicit_template_parm): Handling winding back through class
3039 scope to the class being defined in order to inject a template argument
3043 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
3044 function scope as per cp_parser_skip_to_end_of_statement.
3046 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
3049 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
3051 2014-03-14 Jason Merrill <jason@redhat.com>
3055 * search.c (get_pure_virtuals): Handle abstract dtor here.
3056 (dfs_get_pure_virtuals): Not here.
3059 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
3060 abstract class as pure.
3062 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3065 * pt.c (maybe_process_partial_specialization): Check return value
3066 of check_specialization_namespace.
3068 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3071 * semantics.c (finish_static_assert): Call cxx_constant_value only
3072 if require_potential_rvalue_constant_expression returns true.
3074 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
3077 * method.c (get_inherited_ctor): New.
3078 * cp-tree.h (get_inherited_ctor): Declare it.
3079 * semantics.c (is_valid_constexpr_fn): Use it.
3081 2014-03-10 Jason Merrill <jason@redhat.com>
3084 * call.c (convert_default_arg): Remove special handling for
3088 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
3089 when deciding whether to call push_template_decl for a member class.
3090 * pt.c (push_template_decl_real): Return after wrong levels error.
3092 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
3095 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
3096 lambda, remove the lambda's own template argument list prior to fetching
3100 * parser.c (cp_parser_parameter_declaration_clause): Move generic
3101 function template unwinding on error into a more general location, ...
3102 (cp_parser_skip_to_end_of_statement): ... here.
3104 2014-03-07 Jason Merrill <jason@redhat.com>
3106 * Make-lang.in (check_g++_parallelize): Split dg.exp.
3108 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
3109 we're in a trailing return type.
3111 * typeck.c (comp_template_parms_position): 'auto' and
3112 'decltype(auto)' are different from real template parms.
3114 * parser.c (cp_parser_using_declaration): Consume the semicolon
3115 after bare parameter pack error.
3117 * cp-tree.h (REF_PARENTHESIZED_P): New.
3118 * semantics.c (force_paren_expr): Set it.
3119 * pt.c (do_auto_deduction): Check it.
3120 (tsubst) [COMPONENT_REF]: Copy it.
3121 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
3123 * decl.c (create_array_type_for_decl): Only warn about invalid
3124 C++1y VLA if flag_iso or warn_vla>0.
3125 (grokdeclarator): Likewise.
3126 * pt.c (tsubst): Likewise.
3127 * semantics.c (finish_decltype_type): Likewise.
3128 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
3129 (cp_build_addr_expr_1): Likewise.
3130 * init.c (build_new_1): Improve diagnostics.
3132 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3135 * decl.c (check_initializer): Return NULL_TREE after error;
3136 consistently use inform.
3138 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3140 * decl.c (check_initializer): Remove dead code.
3142 2014-03-06 Marek Polacek <polacek@redhat.com>
3145 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
3146 of checking tree code.
3148 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3150 * parser.c (cp_lexer_set_source_position): New.
3151 (cp_parser_mem_initializer): Use it.
3152 (cp_parser_postfix_open_square_expression): Likewise.
3153 (cp_parser_parenthesized_expression_list): Likewise.
3154 (cp_parser_new_initializer): Likewise.
3155 (cp_parser_jump_statement): Likewise.
3156 (cp_parser_initializer): Likewise.
3157 (cp_parser_functional_cast): Likewise.
3159 2014-03-05 Jason Merrill <jason@redhat.com>
3162 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
3163 dependent expression.
3166 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
3167 if re-parsing might succeed.
3168 * semantics.c (finish_id_expression): Use of a parameter outside
3169 the function body is a parse error.
3171 * parser.c (cp_parser_mem_initializer): Set input_location
3172 properly for init-list warning.
3173 (cp_parser_postfix_open_square_expression): Likewise.
3174 (cp_parser_parenthesized_expression_list): Likewise.
3175 (cp_parser_new_initializer): Likewise.
3176 (cp_parser_jump_statement): Likewise.
3177 (cp_parser_initializer): Likewise.
3178 (cp_parser_functional_cast): Likewise.
3180 2014-03-04 Jason Merrill <jason@redhat.com>
3183 * typeck2.c (process_init_constructor_record): Set
3184 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
3188 * parser.c (cp_parser_direct_declarator): Set declarator to
3189 cp_error_declarator on invalid qualified-id.
3191 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
3194 * parser.c (cp_parser_using_declaration): Early return when
3195 cp_parser_nested_name_specifier errors out.
3197 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
3200 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
3201 function scope on parse error in function parameter list.
3203 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3205 * method.c (implicitly_declare_fn): Remove redundant
3206 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
3207 * semantics.c (is_instantiation_of_constexpr): Likewise.
3208 * error.c (dump_function_decl): Likewise.
3210 2014-03-01 Jason Merrill <jason@redhat.com>
3213 * semantics.c (begin_maybe_infinite_loop): Use
3214 fold_non_dependent_expr_sfinae.
3216 2014-02-28 Jason Merrill <jason@redhat.com>
3219 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
3221 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
3224 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
3225 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
3226 * lambda.c (maybe_add_lambda_conv_op): Likewise.
3228 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
3231 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
3234 2014-02-27 Jason Merrill <jason@redhat.com>
3238 * decl2.c (tentative_decl_linkage): Don't mess with functions that
3239 are not yet defined.
3241 2014-02-26 Jason Merrill <jason@redhat.com>
3245 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
3246 * init.c (build_vtbl_address): Do it here.
3252 * pt.c (struct warning_sentinel): New.
3253 (tsubst_copy_and_build): Use it instead of
3254 c_inhibit_evaluation_warnings.
3255 * typeck.c (maybe_warn_about_useless_cast): Remove
3256 c_inhibit_evaluation_warnings check.
3259 * pt.c (get_template_parm_index): New.
3260 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3261 (process_template_parm): Allow bare packs in template template
3262 parm template parms.
3263 (coerce_template_parameter_pack): Handle fixed template template
3264 parm packs and fixed packs not at the end of the parm list.
3265 (coerce_template_parms): Handle template parm packs not at the end
3267 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3270 * pt.c (unify): Ignore alias templates when deducing a template
3276 * call.c (reference_binding): Recurse on user-defined conversion.
3277 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3279 2014-02-25 Jason Merrill <jason@redhat.com>
3282 * call.c (reference_binding): Recurse on user-defined conversion.
3283 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3285 * call.c (print_conversion_rejection): Handle n_arg of -2.
3286 (build_user_type_conversion_1): Pass it.
3289 * decl2.c (no_linkage_error): Handle C++98 semantics.
3290 (reset_type_linkage): Move from decl.c.
3291 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3292 (bt_reset_linkage_2, reset_decl_linkage): New.
3293 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3294 (cp_write_global_declarations): Move condition into no_linkage_error.
3295 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3296 * semantics.c (expand_or_defer_fn_1): Factor out
3297 tentative_decl_linkage.
3298 * cp-tree.h: Adjust.
3300 * decl2.c (finish_static_data_member_decl): Diagnose static data
3301 member in unnamed class.
3302 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3305 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3306 defaulted virtual dtor.
3310 * pt.c (get_underlying_template): Fix equivalence calculation.
3312 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3315 * parser.c (function_being_declared_is_template_p): Return false when
3316 processing a template parameter list.
3317 (cp_parser_parameter_declaration_clause): Don't set
3318 auto_is_implicit_function_template_parm_p when processing a
3319 template parameter list.
3321 * parser.c (synthesize_implicit_template_parm): Inject new template
3322 argument list appropriately when a generic member function
3323 of a class template is declared out-of-line.
3326 * parser.c (cp_parser_direct_declarator): Don't save and
3327 restore num_template_parameter_lists around call to
3328 cp_parser_parameter_declaration_list.
3329 (function_being_declared_is_template_p): New predicate.
3330 (cp_parser_parameter_declaration_list): Use
3331 function_being_declared_is_template_p as predicate for
3332 inspecting current function template parameter list length
3333 rather than num_template_parameter_lists.
3335 2014-02-24 Jason Merrill <jason@redhat.com>
3338 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3339 DECL_EXPR initialize a non-class iterator.
3342 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3344 2014-02-21 Jason Merrill <jason@redhat.com>
3347 * parser.c (cp_parser_type_name): Always check dependency.
3348 (cp_parser_type_specifier_seq): Call
3349 cp_parser_parse_and_diagnose_invalid_type_name.
3352 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3355 * parser.c (cp_parser_default_argument): Clear
3356 current_class_ptr/current_class_ref like tsubst_default_argument.
3359 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3360 than current_binding_level.
3363 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3366 * parser.c (cp_parser_enum_specifier): Call
3367 check_for_bare_parameter_packs.
3370 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3374 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3375 of the partial instantiation, not the most general template.
3376 (maybe_process_partial_specialization): Reassign everything on
3380 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3381 (check_explicit_specialization): Don't clone.
3384 * pt.c (coerce_template_parms): Bail if argument packing fails.
3387 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3388 Don't get confused by a CONSTRUCTOR that already has a type.
3391 * call.c (build_array_conv): Don't crash on VLA.
3394 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3397 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3398 in declaration context.
3402 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3405 * parser.c (cp_parser_direct_declarator): Don't wrap a
3406 type-dependent expression in a NOP_EXPR.
3409 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3414 * parser.c (cp_parser_template_argument): Restore dereference.
3415 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3416 (process_partial_specialization): Handle deref.
3419 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3423 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3424 implicit_template_scope upon leaving an out-of-line generic member
3425 function definition.
3427 2014-02-20 Kai Tietz <ktietz@redhat.com>
3430 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3431 valued type argument as error_mark_node.
3434 * semantics.c (finish_fname): Handle error_mark_node.
3436 2014-02-19 Jason Merrill <jason@redhat.com>
3439 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3440 spec from template context.
3442 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3445 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3446 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3449 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3451 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3454 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3457 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3460 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3461 During error recovery allow_non_constant may be false.
3463 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3466 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3467 scope whenever a template parameter list has been started, independent
3468 of whether the function call operator was well-formed or not.
3471 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3472 scope for generic friend declarations as well as for non-friends.
3474 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3477 * method.c (implicitly_declare_fn): A constructor of a class with
3478 virtual base classes isn't constexpr (7.1.5p4).
3480 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3482 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3484 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3487 * parser.c (cp_parser_omp_declare_reduction): Save and free
3490 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3494 * tree.c (handle_init_priority_attribute): Call default_conversion on
3495 the attribute argument.
3497 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3500 * method.c (synthesized_method_walk): If vbases is non-null but
3501 is_empty is true, likewise don't worry about the virtual bases.
3503 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3506 * typeck2.c (process_init_constructor_record): Just skip unnamed
3509 2014-01-31 Jason Merrill <jason@redhat.com>
3512 * pt.c (mark_decl_instantiated): Call mark_needed.
3515 * decl2.c (handle_tls_init): Handle null init fn.
3518 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3520 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3523 * class.c (build_vfield_ref): Early return error_mark_node if
3524 TYPE_VFIELD (type) is null.
3525 (build_base_path): Check return value of build_vfield_ref.
3527 2014-01-31 Jason Merrill <jason@redhat.com>
3530 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3531 [ck_list]: Check for error_mark_node.
3532 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3535 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3536 during partial ordering.
3538 2014-01-31 Marek Polacek <polacek@redhat.com>
3541 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3543 2014-01-30 Jason Merrill <jason@redhat.com>
3546 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3547 (local_specializations): New macro.
3548 * pt.c (local_specializations): Remove variable.
3550 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3553 * parser.c (make_string_pack): Use double_int::from_buffer.
3555 2014-01-30 Marek Polacek <polacek@redhat.com>
3558 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3560 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3561 with input_location.
3562 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3565 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3568 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3570 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3573 * pt.c (lookup_template_class_1): Check start_enum return value
3574 for error_mark_node.
3576 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3578 * decl.c (duplicate_decls, typename_hash, typename_compare):
3579 Use TYPE_IDENTIFIER.
3580 * error.c (dump_type): Likewise.
3581 * mangle.c (dump_substitution_candidates): Likewise.
3583 2014-01-30 Jason Merrill <jason@redhat.com>
3586 * decl2.c (attributes_naming_typedef_ok): New.
3587 * cp-tree.h: Declare it.
3588 * decl.c (grokdeclarator): Check it.
3589 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3591 2014-01-29 Jason Merrill <jason@redhat.com>
3594 * call.c (add_builtin_candidate): Catch dependent types.
3597 * pt.c (expand_template_argument_pack): Correct
3598 non_default_args_count calculation.
3601 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3604 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3605 have a friend template in a class template.
3606 * pt.c (tsubst_friend_function): Look through it.
3607 (push_template_decl_real): A friend member template is
3610 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3613 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3616 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3619 * pt.c (instantiate_template_1): Check for error_mark_node the second
3622 2014-01-29 Jason Merrill <jason@redhat.com>
3625 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3626 cdtor_returns_this case.
3629 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3631 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3634 * semantics.c (finish_omp_reduction_clause): Check type for
3637 2014-01-28 Jason Merrill <jason@redhat.com>
3640 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3641 (tsubst_copy): Use it if lookup fails.
3644 * pt.c (tsubst_function_type): Make sure we keep the same function
3648 * semantics.c (build_anon_member_initialization): Stop walking
3649 when we run out of COMPONENT_REFs.
3652 * decl.c (lookup_and_check_tag): Ignore template parameters if
3653 scope == ts_current.
3654 * pt.c (check_template_shadow): Don't complain about the injected
3657 * decl.c (duplicate_decls): Tweak.
3660 * mangle.c (write_unqualified_name): Handle operator auto.
3662 2014-01-27 Jason Merrill <jason@redhat.com>
3666 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3667 list-initialization. A conversion to rvalue ref that involves
3668 an lvalue-rvalue conversion is bad.
3669 (convert_like_real): Give helpful error message.
3672 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3675 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3679 * pt.c (template_parm_to_arg): Call convert_from_reference.
3680 (tsubst_template_arg): Don't strip reference refs.
3683 * call.c (build_aggr_conv): Reject value-initialization of reference.
3687 * call.c (convert_like_real): Give helpful error about excess braces
3688 for ck_rvalue of scalar type.
3691 * call.c (reference_binding): Only elide braces if the single
3692 element is reference-related.
3695 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3699 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3703 * decl.c (compute_array_index_type): Don't call
3704 maybe_constant_value for a non-integral expression.
3706 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3708 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3710 * cp-gimplify.c (cp_genericize): Likewise.
3711 * decl.c (grokfndecl): Likewise.
3712 * parser.c (cp_parser_postfix_expression): Likewise.
3713 (cp_parser_postfix_open_square_expression): Likewise.
3714 (cp_parser_direct_declarator): Likewise.
3715 (is_cilkplus_vector_p): Likewise.
3716 (cp_parser_omp_clause_name): Likewise.
3717 (cp_parser_omp_all_clauses): Likewise.
3718 * pt.c (apply_late_template_attributes): Likewise.
3719 * typeck.c (cp_build_array_ref): Likewise.
3720 (cp_build_compound_expr): Likewise.
3721 (check_return_expr): Likewise.
3723 2014-01-24 Jason Merrill <jason@redhat.com>
3726 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3731 * typeck2.c (process_init_constructor_array): Don't create
3734 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3736 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3737 handling for RANGE_ARRAY case.
3739 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3742 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3744 2014-01-23 Marek Polacek <polacek@redhat.com>
3747 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3749 2014-01-23 Marek Polacek <polacek@redhat.com>
3752 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3755 2014-01-23 Jason Merrill <jason@redhat.com>
3758 * cp-tree.h (struct language_function): Add infinite_loop and
3760 (current_function_infinite_loop): New.
3761 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3762 (break_maybe_infinite_loop): New.
3763 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3764 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3765 (begin_range_for_stmt): Use them.
3766 * decl.c (finish_function): Don't warn about missing return
3767 if current_function_infinite_loop.
3768 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3769 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3771 * call.c (build_op_delete_call): Use make_tree_vector and
3772 release_tree_vector.
3774 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3777 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3778 nested_name_specifier.
3780 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3782 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3783 see if there is an attribute after function decl. If so, then
3785 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3786 enabled function late parsing.
3787 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3788 attribute for a SIMD-enabled function.
3789 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3790 the function is used by SIMD-enabled function (indicated by NULL
3791 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3792 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3793 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3794 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3795 vectorlength clause. Added a new bool parameter to differentiate
3797 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3798 (is_cilkplus_vector_p): Likewise.
3799 (cp_parser_late_parsing_elem_fn_info): Likewise.
3800 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3801 and "vectorlength" clauses when Cilk Plus is enabled.
3802 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3803 and emit a sorry message when step size is a parameter.
3804 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3805 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3807 * pt.c (apply_late_template_attributes): Likewise.
3809 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3812 * semantics.c (finish_omp_reduction_clause): Reject
3813 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3815 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3818 * parser.c (cp_parser_class_head): Push the class before parsing
3819 the base-clause, pop after it.
3821 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3823 * decl2.c (cpp_check): Revert prototype change.
3825 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3829 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3832 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3835 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3836 only when errorcount == 0.
3838 2014-01-17 Marek Polacek <polacek@redhat.com>
3841 * cvt.c (ocp_convert): Don't segfault on non-existing
3842 ENUM_UNDERLYING_TYPE.
3844 2014-01-16 Jason Merrill <jason@redhat.com>
3847 * tree.c (bot_manip): Update the location of builtin_LINE and
3850 2014-01-14 Jason Merrill <jason@redhat.com>
3853 * typeck2.c (massage_init_elt): New.
3854 (process_init_constructor_record)
3855 (process_init_constructor_union): Use it.
3856 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3857 (split_nonconstant_init_1): Handle it.
3858 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3860 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3863 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3864 and replaced an existing if-statement with else-if statement.
3865 Changed an existing error message wording to match the one from the C
3868 2014-01-08 Jason Merrill <jason@redhat.com>
3871 * class.c (abi_tag_data): Add tags field.
3872 (check_abi_tags): Initialize it.
3873 (find_abi_tags_r): Support collecting missing tags.
3874 (mark_type_abi_tags): Don't look at template args.
3875 (inherit_targ_abi_tags): New.
3876 (check_bases_and_members): Use it.
3877 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3878 * mangle.c (write_abi_tags): Check it.
3880 2014-01-07 Jason Merrill <jason@redhat.com>
3883 * pt.c (num_innermost_template_parms): New.
3884 (get_underlying_template): Use it.
3887 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3889 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3891 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3892 the letter of 20.11.6 about Base and Derived naming the same
3893 class type modulo cv-qualifiers.
3895 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3898 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3899 function as unimplemented for generic lambdas with varargs.
3902 * parser.c (cp_parser_template_parameter): Early out with
3903 error_mark_node if parameter declaration was not parsed.
3906 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3907 auto_is_implicit_function_template_parm_p around lambda body.
3910 * parser.c (cp_parser_init_declarator): Undo fully implicit
3911 template parameter list when declarator is not a function.
3913 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3916 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3918 2014-01-03 Tobias Burnus <burnus@net-b.de>
3921 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3923 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3927 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3928 as include_std to perform_koenig_lookup.
3929 (cp_parser_postfix_expression): Adjust.
3930 * pt.c (tsubst_copy_and_build): Likewise.
3931 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3932 (omp_reduction_lookup): Adjust.
3933 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3934 (lookup_arg_dependent): Likewise.
3935 (lookup_function_nonclass): Adjust.
3936 * name-lookup.h: Adjust declaration.
3937 * cp-tree.h: Likewise.
3939 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3942 * parser.c (cp_parser_userdef_numeric_literal): Mention
3943 -fext-numeric-literals in the message.
3945 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3948 * call.c (build_conditional_expr_1): Check the return value of
3951 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3953 * call.c (convert_like_real): Check complain.
3955 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3958 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3961 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3963 Update copyright years
3965 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3967 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3968 the standard form for the copyright notice.
3970 Copyright (C) 2014 Free Software Foundation, Inc.
3972 Copying and distribution of this file, with or without modification,
3973 are permitted in any medium without royalty provided the copyright
3974 notice and this notice are preserved.