1 2014-12-17 Jason Merrill <jason@redhat.com>
3 * constexpr.c: Change "addr" parm names to "lval".
5 * constexpr.c: Tweak comments and formatting.
7 2014-12-16 Paolo Carlini <paolo.carlini@oracle.com>
10 * parser.c (cp_parser_member_declaration): Fix error recovery for
11 initialized non-static data member declared friend.
13 2014-12-15 Jan Hubicka <hubicka@ucw.cz>
15 * decl2.c (decl_needed_p): When not optimizing, do not consider external
18 2014-12-15 Jason Merrill <jason@redhat.com>
21 * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
23 N3778: Sized Deallocation
24 * call.c (non_placement_deallocation_fn_p): A global sized
25 operator delete is not a usual deallocation function until C++14.
26 (build_op_delete_call): Choose the global sized op delete if we
28 * cp-tree.h: Declare non_placement_deallocation_fn_p.
29 (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
30 (global_delete_fndecl): Remove.
31 * decl.c (cxx_init_decl_processing): Also declare sized op deletes.
32 (grok_op_properties): Warn about sized dealloc without the flag.
33 * init.c (build_builtin_delete_call): Remove.
34 (build_vec_delete_1, build_delete): Don't call it.
35 * decl2.c (maybe_warn_sized_delete): New.
36 (cp_write_global_declarations): Call it.
38 2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
41 * decl.c (check_array_designated_initializer): Diagnose gracefully
42 C99 designators which aren't integral constant-expressions; allow
43 constexpr user-defined type conversion operators.
45 2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
48 * semantics.c (finish_omp_reduction_clause): Early return true
49 if DECL_SAVED_TREE (id) is NULL_TREE.
51 2014-12-12 Jason Merrill <jason@redhat.com>
54 * pt.c (do_auto_deduction): In direct-init context, { x } deduces
57 * cp-tree.h (NAMESPACE_ABI_TAG): New.
58 * name-lookup.c (handle_namespace_attrs): Set it.
59 * class.c (check_tag): Split out from find_abi_tags_r.
60 (find_abi_tags_r): Also check namespace tags.
61 (mark_type_abi_tags): Also mark namespace tags.
63 2014-12-12 Kai Tietz <ktietz@redhat.com>
66 * constexpr.c (cxx_eval_loop_expr): Don't loop
67 endless on none-constant expression.
69 2014-12-12 Jason Merrill <jason@redhat.com>
72 * lambda.c (add_capture): Don't pass a dependent type to
73 variably_modified_type_p.
75 2014-12-11 Jason Merrill <jason@redhat.com>
77 Remove N3639 "array of runtime length" from -std=c++14.
78 * decl.c (compute_array_index_type): VLAs are not part of C++14.
79 (create_array_type_for_decl, grokdeclarator): Likewise.
80 * lambda.c (add_capture): Likewise.
81 * pt.c (tsubst): Likewise.
82 * rtti.c (get_tinfo_decl): Likewise.
83 * semantics.c (finish_decltype_type): Likewise.
84 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
85 (cp_build_addr_expr_1): Likewise.
86 * init.c (build_vec_init): Don't throw bad_array_length.
90 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
91 (cp_parser_primary_expression): Not here.
94 * typeck2.c (split_nonconstant_init_1): Handle arrays here.
95 (store_init_value): Not here.
96 (split_nonconstant_init): Look through TARGET_EXPR. No longer static.
97 * cp-tree.h: Declare split_nonconstant_init.
98 * call.c (set_up_extended_ref_temp): Use split_nonconstant_init.
100 2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
102 * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
105 2014-12-10 Kai Tietz <ktietz@redhat.com>
108 * parser.c (cp_parser_diagnose_invalid_type_name): Check id
109 for being an identifier before accessing it.
112 * typeck.c (lookup_destructor): Handle incomplete type.
114 2014-12-09 Jason Merrill <jason@redhat.com>
117 * decl.c (grokdeclarator): Recover from variable template
118 specialization declared as function.
121 * parser.c (cp_parser_unqualified_id): Don't declare fname while
122 parsing function parms.
124 2014-12-03 Jason Merrill <jason@redhat.com>
127 * decl.c (grok_reference_init): Complete array type.
130 * constexpr.c (cxx_eval_store_expression): Handle non-decl store
133 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com>
136 * decl.c (identify_goto): Return a bool if diagnostic is emitted.
137 (check_previous_goto_1): Consistently emit permerror + inform.
138 (check_goto): Likewise.
140 2014-12-03 Richard Biener <rguenther@suse.de>
142 * constexpr.c (cxx_eval_builtin_function_call): Use
143 fold_build_call_array_loc.
145 2014-12-02 Marek Polacek <polacek@redhat.com>
147 * constexpr.c (cxx_eval_check_shift_p): New function.
148 (cxx_eval_binary_expression): Call it. Set NON_CONSTANT_P if it
151 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
154 * decl.c (reshape_init_r): Do not reject value-initialization of
155 scalar array element.
157 2014-12-01 Marek Polacek <polacek@redhat.com>
160 * constexpr.c: Include ubsan.h.
161 (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
162 internal functions and for ubsan builtins.
163 * error.c: Include internal-fn.h.
164 (dump_expr): Add printing of internal functions.
166 2014-12-01 Marek Polacek <polacek@redhat.com>
168 * constexpr.c (literal_type_p): Return true for void type in C++14.
170 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
173 * typeck.c (finish_class_member_access_expr): Use %q#T instead of
174 %qD in error message.
176 2014-11-29 Jakub Jelinek <jakub@redhat.com>
178 * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
179 from create_tmp_var calls.
181 2014-11-28 Marek Polacek <polacek@redhat.com>
184 * typeck.c (cp_build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
185 convert the right operand to integer type.
187 2014-11-27 Kai Tietz <ktietz@redhat.com>
190 * constexpr.c (cxx_eval_vec_init_1): Avoid
193 2014-11-26 Jason Merrill <jason@redhat.com>
195 Allow partial specialization of variable templates.
196 * cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
197 * decl.c (duplicate_decls): Copy it.
198 * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
199 * parser.c (cp_parser_decltype_expr): Do call finish_id_expression
201 * pt.c (register_specialization): Remember variable template insts.
202 (instantiate_template_1): Find the matching partial specialization.
203 (check_explicit_specialization): Allow variable partial specialization.
204 (process_partial_specialization): Likewise.
205 (push_template_decl_real): Likewise.
206 (more_specialized_partial_spec): Rename from more_specialized_class.
207 (most_specialized_partial_spec): Rename from most_specialized_class.
208 (get_partial_spec_bindings): Rename from get_class_bindings.
210 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
213 * call.c (standard_conversion): Do not require expr to be non-null
214 when NULLPTR_TYPE_P (from) is true.
216 2014-11-26 Jason Merrill <jason@redhat.com>
218 * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
221 * constexpr.c (cxx_eval_call_expression): Don't talk about
222 flowing off the end if we're already non-constant.
224 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
226 Diagnose string constant conversion to char* in c++11 and above
227 as forbidden, not deprecated.
228 * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
229 change the diagnostic for the Wwrite-strings case for c++11 and above.
231 2014-11-24 Jason Merrill <jason@redhat.com>
233 * pt.c (lookup_template_variable): Always unknown_type_node.
235 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
238 * parser.c (cp_parser_label_for_labeled_statement): Check the case
239 with check_for_bare_parameter_packs.
241 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
242 Paolo Carlini <paolo.carlini@oracle.com>
245 * decl.c (initialize_local_var): Add -Winit-self warning for
246 references initialized with themselves.
248 2014-11-24 Jason Merrill <jason@redhat.com>
251 * mangle.c (mangle_decl): If we aren't going to create a symbol
252 alias, don't build the alias DECL either.
254 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
257 * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
259 2014-11-21 Jason Merrill <jason@redhat.com>
263 * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
264 if the temporary has a non-trivial destructor.
265 * decl.c (poplevel): Don't look through references.
268 * name-lookup.c (supplement_binding_1): Override a mangling alias.
269 * mangle.c (maybe_remove_implicit_alias): New.
270 (mangle_decl): Always avoid creating conflicting alias.
274 * mangle.c (decl_mangling_context): Use template_type_parameter_p.
277 * pt.c (uses_template_parms): Handle null argument.
279 2014-11-21 Jakub Jelinek <jakub@redhat.com>
282 * typeck.c (cp_build_array_ref): Adjust
283 convert_vector_to_pointer_for_subscript caller. If it returns true,
284 call non_lvalue_loc on the result.
286 2014-11-20 Jason Merrill <jason@redhat.com>
289 * pt.c (convert_nontype_argument): Call convert_from_reference.
290 (check_instantiated_arg): Don't be confused by reference refs.
291 (unify): Look through reference refs on the arg, too.
292 * mangle.c (write_template_arg): Look through reference refs.
294 * error.c (dump_expr): Avoid printing (*&i) for references.
296 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
299 * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
301 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
303 * cp-objcp-common.c: Use hash_table instead of htab.
305 2014-11-19 Jason Merrill <jason@redhat.com>
308 * cp-tree.h (struct processing_template_decl_sentinel): New.
309 * pt.c (instantiate_non_dependent_expr_internal): Split out from...
310 (instantiate_non_dependent_expr_sfinae): Here.
311 (convert_nontype_argument): Use them.
312 * constexpr.c (fold_non_dependent_expr): Use them.
315 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
316 complain yet about a reference.
317 [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
318 [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
319 (cxx_bind_parameters_in_call): In the new scheme addr is always false.
320 * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
323 * init.c (decl_really_constant_value): Rename from
324 integral_constant_value.
325 (scalar_constant_value): Similar but limited to scalar results.
326 (decl_constant_value_safe): Remove.
327 (constant_value_1): Respect return_aggregate_cst_ok_p.
328 * typeck.c (decay_conversion): Use scalar_constant_value.
329 * call.c (convert_like_real): Likewise.
330 * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
331 * typeck.c (decay_conversion): Or ARRAY_TYPE.
332 * constexpr.c (struct constexpr_ctx): Add strict field.
333 (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
334 decl_constant_value and decl_really_constant_value.
335 (cxx_eval_outermost_constant_expr): Add strict parm.
336 (maybe_constant_init): Not strict.
337 (potential_constant_expression_1): Add strict parm.
338 Shorten most internal calls with RECUR macro.
339 * cp-tree.h, pt.c, semantics.c: Adjust.
341 2014-11-19 Jason Merrill <jason@redhat.com>
344 * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
346 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
349 * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
350 and __PRETTY_FUNCTION__.
352 2014-11-18 Jason Merrill <jason@redhat.com>
355 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
356 from a variable of empty class type is constant.
358 * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
359 (potential_constant_expression_1): Handle STMT_EXPR.
361 * constexpr.c (cxx_eval_constant_expression): Give jump_target a
363 (lots): Omit NULL jump_target arguments.
365 * constexpr.c (struct constexpr_ctx): Add quiet field.
366 (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
367 (lots): Replace allow_non_constant parameter with ctx->quiet.
370 * constexpr.c (cxx_eval_binary_expression): Don't assume the
371 expression was already folded.
372 (cxx_eval_unary_expression): Likewise.
374 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
377 * rtti.c (emit_support_tinfos): Handle __float128.
379 2014-11-18 Jason Merrill <jason@redhat.com>
382 * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
385 * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
386 rather than VOID_TYPE_P.
388 * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
391 * typeck2.c (store_init_value): Set it.
392 * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
393 * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
395 2014-11-17 Jason Merrill <jason@redhat.com>
398 * call.c (build_call_a): Don't warn_deprecated_use here.
399 (build_over_call): Or here.
400 * decl2.c (mark_used): Do it here.
401 (is_late_template_attribute): Attribute deprecated is not deferred.
402 (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
403 * parser.c (cp_parser_template_name): Warn about deprecated template.
404 (cp_parser_template_argument): Likewise.
407 * decl.c (cp_finish_decl): Don't try to process a non-dependent
408 constant initializer for a reference.
409 * pt.c (value_dependent_expression_p): A reference is always
411 * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
414 Handle C++14 constexpr flow control.
415 * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
416 (cxx_eval_statement_list): New.
417 (cxx_eval_constant_expression): Handle LABEL_EXPR,
418 CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
419 semantics of RETURN_EXPR.
420 (many functions): Add jump_target parameter.
421 (returns, breaks, continues, switches, label_matches): New.
422 * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
423 * cp-gimplify.c (begin_bc_block): Set them.
425 * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
426 (genericize_for_stmt): Handle null statement-list.
428 * constexpr.c (use_new_call): Always use new call handling.
430 C++14 constexpr support (minus loops and multiple returns)
431 * constexpr.c (use_new_call): New macro.
432 (build_data_member_initialization): Ignore non-mem-inits.
433 (check_constexpr_bind_expr_vars): Remove C++14 checks.
434 (constexpr_fn_retval): Likewise.
435 (check_constexpr_ctor_body): Do nothing in C++14.
436 (massage_constexpr_body): In C++14 only collect mem-inits.
437 (get_function_named_in_call): Handle null CALL_EXPR_FN.
438 (cxx_bind_parameters_in_call): Build bindings in same order as
439 parameters. Don't treat iniviref parms specially in new call mode.
440 (cxx_eval_call_expression): If use_new_call, do constexpr expansion
441 based on DECL_SAVED_TREE rather than the massaged constexpr body.
442 Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
443 (is_sub_constant_expr): Don't mess with ctx.ctor here.
444 (cxx_eval_component_reference): A null element means we're mid-
446 (cxx_eval_store_expression, cxx_eval_increment_expression): New.
447 (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
448 MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
449 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
450 POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
451 constexpr functions. In new-call mode find parms in the values table.
452 (potential_constant_expression_1): Handle null CALL_EXPR_FN.
453 Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
454 PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
455 POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
456 CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
457 EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
458 CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
459 SWITCH_STMT, ASM_EXPR.
460 (cxx_eval_vec_init_1): Call build_aggr_init_expr.
461 (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
462 caller wants an lvalue.
463 (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
464 (maybe_constant_init): Look through INIT_EXPR.
465 (ensure_literal_type_for_constexpr_object): Set
466 cp_function_chain->invalid_constexpr.
467 * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
468 * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
469 (check_for_uninitialized_const_var): Likewise.
470 (maybe_save_function_definition): Check it.
471 * parser.c (cp_parser_jump_statement): Set
472 cp_function_chain->invalid_constexpr.
473 (cp_parser_asm_definition): Likewise.
476 * decl.c (build_ptrmemfunc_type): Don't build a different
477 RECORD_TYPE for a qualified PMF.
478 * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
479 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
480 * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
481 * tree.c (cp_walk_subtrees): Likewise.
482 (cp_build_qualified_type_real): Remove special PMF handling.
484 2014-11-15 Jason Merrill <jason@redhat.com>
486 * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
489 * constexpr.c (cxx_eval_builtin_function_call): Use
490 fold_builtin_call_array.
492 * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
494 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
496 * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
497 * parser.c (cp_parser_omp_clause_collapse): Likewise.
498 (cp_parser_enumerator_definition): Don't call
499 instantiate_non_dependent_expr...
500 * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
501 * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
502 * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
503 the final gcc_assert.
505 * constexpr.c (fold_non_dependent_expr): Add.
506 * cp-tree.h (fold_non_dependent_expr): Declare it.
507 * call.c (null_ptr_cst_p): Use it.
508 * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
509 * semantics.c (begin_maybe_infinite_loop): Likewise.
510 * typeck.c (cp_build_binary_op): Likewise.
511 * typeck2.c (check_narrowing): Likewise.
513 * pt.c (fold_non_dependent_expr): Rename to
514 instantiate_non_dependent_expr.
515 (fold_non_dependent_expr_sfinae): Rename to
516 instantiate_non_dependent_expr_sfinae.
517 (convert_nontype_argument, build_non_dependent_expr): Adjust.
518 * decl.c (compute_array_index_type): Likewise.
519 * parser.c (cp_parser_parenthesized_expression_list,
520 cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
522 * semantics.c (end_maybe_infinite_loop, finish_static_assert):
524 * typeck.c (cxx_alignas_expr): Likewise.
525 * typeck2.c (store_init_value, massage_init_elt): Likewise.
526 * call.c: Adjust comments.
528 * constexpr.c: Likewise.
532 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
534 * mangle.c (find_substitution): Look for abi_tag on class templates.
536 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
537 Thomas Schwinge <thomas@codesourcery.com>
538 Ilya Verbin <ilya.verbin@intel.com>
539 Andrey Turetskiy <andrey.turetskiy@intel.com>
541 * Make-lang.in (c++.install-common): Do not install for the offload
544 2014-11-13 Kai Tietz <ktietz@redhat.com>
546 * cp-tree.h (cp_build_function_call): Remove prototype.
547 (cp_build_addr_expr_strict): Likewise.
548 (build_typed_address): Likewise.
549 * typeck.c (build_typed_address): Removed.
550 (cp_build_addr_expr_strict): Make static.
551 (cp_build_function_call): Likewise.
553 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
557 * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
558 * decl.c (grokdeclarator): Use it.
559 * parser.c (cp_parser_simple_type_specifier): Likewise.
560 * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
562 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
565 * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
566 constant the condition.
568 2014-11-10 Andi Kleen <ak@linux.intel.com>
570 * semantics.c (finish_goto_stmt): Call check_no_cilk.
571 (finish_while_stmt_cond): Dito.
572 (finish_do_stmt): Dito.
573 (finish_for_cond): Dito.
574 (finish_switch_cond): Dito.
576 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
578 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
579 OPT_Wshift_count_overflow in the warnings.
581 2014-11-09 Jason Merrill <jason@redhat.com>
584 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
585 same scalar type is an rvalue.
588 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
590 2014-11-07 Jason Merrill <jason@redhat.com>
593 * pt.c (dependent_alias_template_spec_p): New.
594 (dependent_type_p_r): Handle dependent alias template specialization.
595 (template_args_equal): A dependent alias template specializations
596 is not equal to its underlying type as a template argument.
597 * tree.c (strip_typedefs): Don't strip a dependent alias
600 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
601 (cp_parser_primary_expression): Not here.
603 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
606 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
608 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
610 * constexpr.c: Remove redundant enum from machine_mode.
612 2014-10-28 Jason Merrill <jason@redhat.com>
614 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
616 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
618 * call.c: Adjust include files.
627 * semantics.c: Ditto.
629 * vtable-class-hierarchy.c: Ditto.
631 2014-10-24 Jason Merrill <jason@redhat.com>
633 Implement N3653 (Member initializers and aggregates) and fix
634 references to 'this' in constexpr constructors.
635 * class.c (check_field_decls): In C++14 an NSDMI does not make the
637 * constexpr.c (struct constexpr_ctx): New.
638 (cxx_bind_parameters_in_call): Handle 'this'.
639 (cxx_eval_call_expression): Create new constexpr_ctx.
640 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
641 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
642 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
643 (cxx_eval_vec_init_1): Likewise.
644 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
645 [TARGET_EXPR]: Build new constexpr_ctx.
646 [PLACEHOLDER_EXPR]: New.
647 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
649 (is_sub_constant_expr): Build new constexpr_ctx.
650 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
652 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
653 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
654 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
655 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
656 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
657 (build_ctor_subob_ref, replace_placeholders): New.
658 * typeck2.c (store_init_value): Use replace_placeholders.
659 (process_init_constructor_record): Make zero-init before NSDMI
662 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
664 * cp-gimplify.c: Adjust include files.
666 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
669 * cp-objcp-common.c: Do not include new.
670 (cxx_initialize_diagnostics): Move from here to ...
671 * error.c (cxx_initialize_diagnostics): : ... here. Move
672 diagnostics initialization here from init_error.
673 (cxx_pp): Use a real pointer not a macro.
674 (init_error): Just initialize cxx_pp.
675 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
676 not set maximum line length.
678 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
681 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
683 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
685 * parser.c (cp_parser_unary_expression): Add default arguments.
686 (cp_parser_cast_expression, cp_parser_sizeof_operand,
687 cp_parser_omp_atomic): Adjust.
689 2014-10-20 Jason Merrill <jason@redhat.com>
692 * lambda.c (current_nonlambda_function): New.
693 * semantics.c (finish_this_expr): Use it.
694 * cp-tree.h: Declare it.
696 2014-10-17 Alan Modra <amodra@gmail.com>
699 * decl.c (merge_decls): Don't merge section name, comdat group or
700 tls model to newdecl symtab node, instead merge to olddecl.
701 Override existing olddecl section name. Set tls_model for all
702 thread-local vars, not just OMP thread-private ones. Remove
705 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
707 * cp-tree.h: Adjust include files.
709 2014-10-15 Jason Merrill <jason@redhat.com>
712 * pt.c (lookup_template_variable): Call coerce_template_parms.
714 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
716 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
717 ensure_literal_type_for_constexpr_object,
718 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
719 retrieve_constexpr_fundef, is_valid_constexpr_fn,
720 build_anon_member_initialization, build_data_member_initialization,
721 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
722 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
723 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
724 massage_constexpr_body, cx_check_missing_mem_inits,
725 register_constexpr_fundef, explain_invalid_constexpr_fn,
726 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
727 maybe_initialize_constexpr_call_table, get_function_named_in_call,
728 get_nth_callarg, lookup_parameter_binding,
729 cxx_eval_builtin_function_call, adjust_temp_type,
730 cxx_bind_parameters_in_call, push_cx_call_context,
731 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
732 reduced_constant_expression_p, verify_constant,
733 cxx_eval_unary_expression, cxx_eval_binary_expression,
734 cxx_eval_conditional_expression, cxx_eval_array_reference,
735 cxx_eval_component_reference, cxx_eval_bit_field_ref,
736 cxx_eval_logical_expression, base_field_constructor_elt,
737 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
738 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
739 cxx_eval_trinary_expression, var_in_constexpr_fn,
740 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
741 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
742 maybe_constant_init, potential_constant_expression_1,
743 potential_constant_expression, potential_rvalue_constant_expression,
744 require_potential_constant_expression,
745 require_potential_rvalue_constant_expression): Moved definitions...
746 * constexpr.c: ... here, new file.
747 * Make-lang.in: Update.
748 * config-lang.in: Likewise.
750 2014-10-14 Jason Merrill <jason@redhat.com>
753 * parser.c (struct saved_token_sentinel): New.
754 (cp_parser_statement): Use it.
755 (cp_parser_start_tentative_firewall): New.
756 (cp_parser_end_tentative_firewall): New.
757 (cp_parser_lambda_expression): Use them.
758 (cp_parser_statement_expr): New.
759 (cp_parser_primary_expression): Use it.
761 2014-10-14 DJ Delorie <dj@redhat.com>
763 * typeck.c (cp_common_type): Check for all __intN types, not just
765 * decl.c (grokdeclarator): Likewise.
766 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
768 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
769 for all __intN types, not just __int128.
770 (cp_parser_simple_type_specifier): Likewise.
771 * mangle.c (integer_type_codes): Remove int128-specific codes.
772 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
773 __intN was specified.
774 * lex.c (init_reswords): Reserve all __intN keywords.
776 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
778 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
780 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
782 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
784 (print_template_statistics): Cast size and elements to long.
786 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
788 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
789 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
792 2014-10-10 Jason Merrill <jason@redhat.com>
795 * class.c (build_base_path): Preserve rvalueness.
796 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
797 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
800 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
802 * method.c (implicitly_declare_fn): Handle deleted lambda default
803 ctor and copy assop here.
804 * class.c (check_bases_and_members): Not here.
805 (add_implicitly_declared_members): And don't set
806 CLASSTYPE_LAZY_MOVE_ASSIGN.
808 * semantics.c (finish_id_expression): Check for error_mark_node.
810 2014-10-09 Jason Merrill <jason@redhat.com>
813 * semantics.c (outer_var_p): Non-static.
814 (process_outer_var_ref): Split out from finish_id_expression.
815 * pt.c (tsubst_copy_and_build): Call them.
816 * cp-tree.h: Declare them.
818 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
820 * semantics.c (check_constexpr_ctor_body_1): New.
821 (check_constexpr_ctor_body): Use it; add bool parameter.
822 (build_data_member_initialization): Handle BIND_EXPR and
823 USING_STMT in the main conditional.
824 (build_constexpr_constructor_member_initializers): Do not
825 handle BIND_EXPR here.
826 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
827 (massage_constexpr_body): Don't do it here.
828 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
829 Adjust check_constexpr_ctor_body call.
830 (cp_parser_compound_statement): Do not pedwarn for compound-statement
831 in constexpr function in C++14 mode.
832 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
834 2014-10-09 Jason Merrill <jason@redhat.com>
837 * parser.c (cp_parser_class_head): push_template_decl for members
841 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
842 (iterative_hash_template_arg): Likewise.
845 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
846 * semantics.c (force_paren_expr): And set it.
847 * typeck.c (check_return_expr): And handle it.
849 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
851 * decl.c (grokdeclarator): constexpr only implies const in C++11.
853 2014-10-08 Jason Merrill <jason@redhat.com>
856 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
859 * tree.c (build_cplus_array_type): Look for a type with no
860 typedef-name or attributes.
862 * call.c (call_copy_ctor): New.
863 (build_over_call): Use it to avoid infinite recursion on invalid code.
865 2014-10-07 Jason Merrill <jason@redhat.com>
867 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
869 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
871 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
873 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
876 * semantics.c (check_constexpr_bind_expr_vars): New.
877 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
878 (build_constexpr_constructor_member_initializers): Handle
879 BIND_EXPR in the main conditional.
881 2014-10-02 Mark Wielaard <mjw@redhat.com>
884 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
885 (cp_function_decl_deleted_p): New prototype.
886 * cp-objcp-common.c (cp_function_deleted_p): New function.
888 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
893 * typeck.c (cp_build_binary_op): save_expr after convert to save
894 redundant operations.
895 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
896 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
898 2014-10-03 Jason Merrill <jason@redhat.com>
900 * decl.c (start_decl): Complain about static/thread_local vars
901 in constexpr function.
902 (check_for_uninitialized_const_var): Also uninitialized vars.
903 * parser.c (cp_parser_jump_statement): And gotos.
904 (cp_parser_asm_operand_list): And asm.
905 (cp_parser_try_block): And try.
906 * semantics.c (ensure_literal_type_for_constexpr_object): And
909 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
910 (var_in_constexpr_fn): New.
911 (cxx_eval_constant_expression): Look into DECL_INITIAL.
912 (potential_constant_expression_1): Allow constexpr-local vars.
915 * tree.c (strip_typedefs): Handle TREE_LIST.
917 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
919 * parser.c (cp_parser_assignment_expression,
920 cp_parser_constant_expression): Add default arguments.
921 (cp_parser_primary_expression,
922 cp_parser_postfix_open_square_expression,
923 cp_parser_parenthesized_expression_list,
924 cp_parser_question_colon_clause,
925 cp_parser_expression, cp_parser_constant_expression,
926 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
927 cp_parser_template_argument, cp_parser_enumerator_definition,
928 cp_parser_member_declaration, cp_parser_constant_initializer,
929 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
930 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
931 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
932 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
933 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
934 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
935 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
937 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
940 * cp-tree.h (struct saved_scope): Add noexcept_operand.
941 (cp_noexcept_operand): Define.
942 * call.c (build_over_call): Use it.
943 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
944 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
946 2014-10-01 Jason Merrill <jason@redhat.com>
949 * method.c (constructible_expr): Handle value-init of non-class.
950 * parser.c (cp_parser_trait_expr): Allow pack expansion.
951 * pt.c (tsubst_copy_and_build): Handle pack expansion.
954 * class.c (type_has_non_user_provided_default_constructor): Rename
955 from type_has_user_provided_default_constructor, reverse sense.
956 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
957 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
958 * call.c (build_new_method_call_1): Adjust.
960 * decl.c (grok_special_member_properties): Don't set
961 TYPE_HAS_COMPLEX_DFLT.
962 * init.c (build_value_init_noctor): Don't use
963 type_has_user_provided_default_constructor.
965 2014-09-30 Jason Merrill <jason@redhat.com>
967 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
968 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
969 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
970 * parser.c (cp_parser_primary_expression): Likewise.
971 (cp_parser_trait_expr): Likewise. Handle variadic trait.
972 * semantics.c (trait_expr_value): Likewise.
973 (finish_trait_expr): Likewise.
974 (check_trait_type): Handle variadic trait. Return bool.
975 * method.c (build_stub_object): Add rvalue reference here.
976 (locate_fn_flags): Not here.
977 (check_nontriv, assignable_expr, constructible_expr): New.
978 (is_trivially_xible): New.
980 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
981 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
982 * parser.c (cp_parser_primary_expression): Likewise.
983 (cp_parser_trait_expr): Likewise.
984 * semantics.c (trait_expr_value): Likewise.
985 (finish_trait_expr): Likewise.
987 * method.c (build_stub_object): Use CONVERT_EXPR.
988 * tree.c (build_dummy_object): Likewise.
989 (is_dummy_object): Adjust.
991 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
992 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
993 * semantics.c (trait_expr_value): Likewise.
994 (finish_trait_expr): Likewise.
995 * parser.c (cp_parser_primary_expression): Likewise.
996 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
998 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1001 * error.c (print_instantiation_context): Delete.
1002 * typeck2.c (build_x_arrow): Record location when pushing
1003 template instantiation.
1004 * pt.c (push_tinst_level): Make it a wrapper around ...
1005 (push_tinst_level_loc): ... this. New function. Make excessive
1006 template instantiation depth a fatal error. Record location. Use
1007 bool as return type.
1008 (instantiate_pending_templates): Make excessive
1009 template instantiation depth a fatal error.
1010 (problematic_instantiation_changed): Use bool as return type.
1011 * cp-tree.h (print_instantiation_context): Delete.
1012 (push_tinst_level): Update declaration.
1013 (problematic_instantiation_changed): Likewise.
1014 (push_tinst_level_loc): New.
1016 2014-09-29 Richard Biener <rguenther@suse.de>
1018 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
1021 2014-09-26 Jason Merrill <jason@redhat.com>
1023 * mangle.c (find_substitution): Use write_abi_tags.
1025 2014-09-25 Marek Polacek <polacek@redhat.com>
1028 * class.c (warn_hidden): Check for FUNCTION_DECL.
1030 2014-09-25 Jakub Jelinek <jakub@redhat.com>
1033 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
1034 on low_bound and length.
1036 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1038 * class.c, decl.c, optimize.c: Rename all instances of
1039 DECL_ABSTRACT to DECL_ABSTRACT_P.
1041 2014-09-24 Marek Polacek <polacek@redhat.com>
1045 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
1046 * tree.c (bot_manip): Add default case.
1047 * parser.c (cp_parser_primary_expression): Cast the controlling
1048 expression of a switch to an int.
1049 (cp_parser_unqualified_id): Likewise.
1051 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
1054 * parser.c (cp_parser_skip_to_closing_square_bracket,
1055 cp_parser_array_designator_p): New.
1056 (cp_parser_initializer_list): Use the latter.
1058 2014-09-22 Jason Merrill <jason@redhat.com>
1060 * semantics.c (finish_non_static_data_member): In diagnostic, give
1061 error at point of use and note at point of declaration.
1066 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
1069 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
1072 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
1074 2014-09-22 Jason Merrill <jason@redhat.com>
1076 * decl.c (poplevel): Don't warn about unused vars in template scope.
1077 * error.c (dump_decl): Handle variable templates.
1079 2014-09-20 Jason Merrill <jason@redhat.com>
1082 * decl.c (begin_destructor_body): Only clobber the as-base part of
1085 2014-09-19 Jason Merrill <jason@redhat.com>
1088 * mangle.c (write_expression): Use unresolved-name mangling for
1092 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
1093 after pulling out an element from a CONSTRUCTOR.
1095 2014-09-18 Jakub Jelinek <jakub@redhat.com>
1098 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
1099 on type of type dependent expressions, and don't call it if
1100 handle_omp_array_sections has kept TREE_LIST because something
1102 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
1103 Use keep_next_level, begin_omp_structured_block and
1104 finish_omp_structured_block instead of push_stmt_list and
1107 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
1110 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
1111 for final class types.
1113 2014-09-15 Jason Merrill <jason@redhat.com>
1115 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
1116 necessary. Call inherit_targ_abi_tags here.
1117 * class.c (check_bases_and_members): Not here.
1118 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
1119 * cp-tree.h: Declare inherit_targ_abi_tags.
1121 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1123 Do not diagnose lambda default arguments in c++14 modes.
1124 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
1127 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1129 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
1132 2014-09-13 Marek Polacek <polacek@redhat.com>
1135 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
1136 location of a call expression.
1138 2014-09-11 Jason Merrill <jason@redhat.com>
1141 * decl.c (start_decl): Handle specialization of member variable
1143 * pt.c (check_explicit_specialization): Adjust error.
1145 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
1148 * typeck2.c (process_init_constructor_record): Do not warn about
1149 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
1151 2014-09-11 Jason Merrill <jason@redhat.com>
1154 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
1155 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
1157 2014-09-10 Jason Merrill <jason@redhat.com>
1160 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
1161 (duplicate_decls, start_decl): Likewise.
1162 * pt.c (check_explicit_specialization): Likewise.
1163 (push_template_decl_real): Or static templates.
1165 2014-09-08 Jason Merrill <jason@redhat.com>
1167 * typeck.c (build_class_member_access_expr): Move
1168 -Winvalid-offsetof code...
1169 * semantics.c (finish_offsetof): ...here.
1170 * parser.c (cp_parser_builtin_offsetof): Remember the location of
1172 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
1175 * pt.c (instantiate_decl): Handle recursive instantiation of
1178 2014-09-05 Jason Merrill <jason@redhat.com>
1181 * semantics.c (potential_constant_expression_1): Handle un-folded
1182 pointer to member constants.
1184 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
1187 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
1188 newdecl, not olddecl.
1190 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
1193 * class.c (check_field_decls): A class of literal type cannot have
1194 volatile non-static data members and base classes.
1195 (explain_non_literal_class): Update.
1197 2014-09-02 Jakub Jelinek <jakub@redhat.com>
1198 Balaji V. Iyer <balaji.v.iyer@intel.com>
1199 Igor Zamyatin <igor.zamyatin@intel.com>
1201 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
1203 * parser.c (cp_parser_cilk_for): New function.
1204 (cp_parser_cilk_grainsize): Likewise.
1205 (cp_parser_statement): Added RID_CILK_FOR case.
1206 (cp_parser_omp_for_cond): Added CILK_FOR check.
1207 (cp_parser_omp_for_loop_init): Change function argument to accept
1208 tree_code instead just a bool flag; change the check to use that
1209 tree_code; check for initialization declaration in case of Cilk_for.
1210 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
1211 changed call to cp_parser_omp_for_loop_init according new arguments'
1213 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1214 * pt.c (tsubst_expr): Added CILK_FOR case.
1215 * semantics.c: Include convert.h.
1216 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
1217 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
1218 (handle_omp_for_class_iterator): New argument lastp and its usage;
1220 (finish_omp_for): Changed call to handle_omp_for_class_iterator
1221 according new arguments' list; in case of Cilk_for save very first
1222 decl and create empty stmt_list block; use block to build correct
1225 2014-08-31 Jason Merrill <jason@redhat.com>
1228 * optimize.c (cdtor_comdat_group): Just look at the
1229 DECL_ASSEMBLER_NAME of the 'tors.
1231 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
1234 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
1235 result of cxx_eval_constant_expression.
1237 2014-08-26 Jason Merrill <jason@redhat.com>
1240 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
1241 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
1242 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
1245 2014-08-25 Jason Merrill <jason@redhat.com>
1247 * pt.c (check_explicit_specialization): Don't complain about
1248 non-template variable.
1249 (template_for_substitution): Allow variable templates.
1250 (check_template_variable): Fix logic for member var template.
1251 * decl.c (start_decl): Don't complain about extra template header
1254 * decl.c (start_decl): Look through member variable template.
1255 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
1256 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
1259 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
1262 * cp-tree.h (TFF_POINTER): Add.
1263 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
1265 * error.c (dump_type_suffix): Actually print the const and noreturn
1266 attribute when appropriate.
1268 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
1270 * decl.c (compute_array_index_type, grokdeclarator,
1271 undeduced_auto_decl): Change from cxx1y to cxx14.
1272 *lambda.c(add_capture()): Change error message from C++1y to C++14.
1273 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
1274 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
1275 cp_parser_decltype, cp_parser_conversion_type_id,
1276 cp_parser_simple_type_specifier, cp_parser_type_id_1,
1277 cp_parser_template_type_arg, cp_parser_std_attribute,
1278 cp_parser_template_declaration_after_export): Ditto.
1279 * pt.c (tsubst): Ditto.
1280 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
1281 * tree.c: Change comment.
1282 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
1283 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
1285 2014-08-23 Jason Merrill <jason@redhat.com>
1287 Allow non-constexpr variable templates.
1288 * decl2.c (note_variable_template_instantiation): New.
1289 * cp-tree.h: Declare it.
1290 * pt.c (instantiate_decl): Call it.
1291 (push_template_decl_real): Allow non-constexpr variable templates.
1292 * semantics.c (finish_id_expression): Mark the variable template
1293 instantiation as used.
1294 * mangle.c (write_mangled_name): Variable template instantiations
1296 * parser.c (cp_parser_init_declarator): Complain about
1297 non-function implicit templates.
1299 2014-08-22 Marek Polacek <polacek@redhat.com>
1302 * parser.c (cp_parser_binary_expression): Check each LHS if it's
1303 preceded with logical not. Adjust call to
1304 warn_logical_not_parentheses.
1306 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1309 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
1310 declaration shadows a function declaration, unless the former
1311 declares a function, pointer to function or pointer to member
1312 function, because this is a common and valid case in real-world
1314 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
1315 Improve description.
1317 2014-08-22 Jason Merrill <jason@redhat.com>
1320 * class.c (outermost_open_class): Fix logic.
1321 * decl.c (complete_vars): Fix logic.
1323 2014-08-22 Jason Merrill <jason@redhat.com>
1326 * class.c (outermost_open_class): New.
1327 * cp-tree.h: Declare it.
1328 * decl.c (maybe_register_incomplete_var): Use it.
1329 (complete_vars): Handle any constant variable.
1330 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
1332 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1335 * cp-array-notation.c (build_array_notation_ref): Added correct
1336 handling of case with incorrect array.
1338 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1341 * error.c (cp_diagnostic_finalizer): Delete.
1342 (init_error): Do not set diagnostic_finalizer here.
1344 2014-08-19 Marek Polacek <polacek@redhat.com>
1347 * call.c (build_new_op_1): Remember the type of arguments for
1348 a comparison. If either operand of a comparison is a boolean
1349 expression, call maybe_warn_bool_compare.
1351 2014-08-19 Jason Merrill <jason@redhat.com>
1353 PR tree-optimization/62091
1354 * decl2.c (decl_needed_p): Return true for virtual functions when
1359 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
1362 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
1364 * class.c (contains_empty_class_p): Remove.
1366 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
1368 * parser.c (cp_parser_expression): Add default arguments.
1369 (cp_parser_primary_expression, cp_parser_postfix_expression,
1370 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
1371 cp_parser_unary_expression, cp_parser_direct_new_declarator,
1372 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
1373 cp_parser_lambda_body, cp_parser_expression_statement,
1374 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
1375 cp_parser_iteration_statement, cp_parser_jump_statement,
1376 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
1377 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
1378 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
1379 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
1380 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
1381 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
1382 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
1383 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
1384 cp_parser_transaction_expression): Adjust.
1386 2014-08-15 Jason Merrill <jason@redhat.com>
1389 * pt.c (lookup_template_class_1): Revert recent change.
1390 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
1393 * pt.c (instantiate_class_template_1): Ignore lambda on
1394 CLASSTYPE_DECL_LIST.
1395 (push_template_decl_real): A lambda is not primary.
1396 (lookup_template_class_1): Don't look for a lambda partial
1398 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
1399 currently in a function and the lambda living in a function.
1400 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
1402 2014-08-15 Richard Biener <rguenther@suse.de>
1403 Jason Merrill <jason@redhat.com>
1406 * tree.c (build_min_array_type, set_array_type_canon): Split out...
1407 (build_cplus_array_type): ...from here. Only call build_array_type
1410 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
1414 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1418 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1419 cv-qualifiers of function types.
1421 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1423 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
1425 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1427 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
1428 cp_build_array_ref, cp_build_function_call_vec): When a
1429 pedwarn is suppressed under SFINAE, return error_mark_node.
1431 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
1432 tf_warning_or_error, where complain is a bool, glitch.
1434 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
1437 * decl.c (grokdeclarator): Move the check for friend initializers..
1438 * decl2.c (grokfield) ..here. Postpone early return for friends
1439 until after the initializer check.
1441 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1444 * pt.c (coerce_template_parms): Improve error message vs default
1447 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
1449 * parser.c (cp_parser_init_declarator): Remove redundant check of
1450 decl_specifiers->type.
1452 2014-08-13 Jason Merrill <jason@redhat.com>
1454 * call.c (build_x_va_arg): Support passing non-POD through ....
1455 (convert_arg_to_ellipsis): Likewise.
1457 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
1459 * pt.c (lookup_template_variable): Make dependent variable templates
1462 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1464 * parser.c (cp_parser_elaborated_type_specifier): Handle
1465 specially cp_parser_template_id returning a BASELINK.
1467 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
1469 * parser.c (cp_parser_diagnose_invalid_type_name,
1470 cp_parser_make_typename_type): Remove scope parameter.
1471 (cp_parser_parse_and_diagnose_invalid_type_name,
1472 cp_parser_elaborated_type_specifier): Adjust calls.
1474 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
1476 Reject virt-specifiers on friends and member templates
1477 * friend.c (do_friend): Diagnose virt-specifiers.
1478 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
1480 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
1482 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
1483 return type to bool; in C++11 for constants give errors, not pedwarns.
1484 * cp-tree.h (check_narrowing): Adjust declaration.
1485 * call.c (convert_like_real): Update calls.
1486 * semantics.c (finish_compound_literal): Likewise.
1488 2014-08-08 Jason Merrill <jason@redhat.com>
1490 * pt.c (lookup_template_class_1): Copy abi_tag.
1492 2014-08-08 Kai Tietz <ktietz@redhat.com>
1494 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
1495 that we operate on a true inline.
1497 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1499 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
1500 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
1502 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
1505 * decl.c (build_enumerator): Handle class types with conversion
1506 operators via perform_implicit_conversion_flags and
1507 build_expr_type_conversion.
1509 * cvt.c (build_expr_type_conversion): Replace pair of errors
1510 with error + inform.
1512 2014-08-07 Jason Merrill <jason@redhat.com>
1515 * parser.c (c_parse_file): Change sorry to fatal_error.
1518 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
1520 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1522 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
1524 2014-08-06 Jason Merrill <jason@redhat.com>
1526 * init.c (build_vec_init): Fix constant initialization of
1528 (build_value_init_noctor): Call maybe_constant_init.
1529 * semantics.c (maybe_constant_init): See through EXPR_STMT and
1533 * init.c (build_vec_init): Reorganize earlier change a bit.
1536 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
1537 if we're just returning an INIT_EXPR.
1539 2014-08-06 Jason Merrill <jason@redhat.com>
1540 Braden Obrzut <admin@maniacsvault.net>
1542 * pt.c (check_explicit_specialization): Don't test
1543 DECL_DECLARED_INLINE_P for a variable template.
1545 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
1548 * typeck.c (cp_build_binary_op): Extend to more cases the
1551 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
1553 Implement constexpr variable templates
1554 * decl.c (grokvardecl): Handle specializations of variable templates.
1555 (grokdeclarator): Handle variable template id expressions and NULL_TREE
1556 return from grokvardecl.
1557 * decl2.c (check_member_template): Allow declaration of template member
1559 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
1561 * pt.c (check_template_variable): Accept variable temploids at
1563 (push_template_decl_real): The current instantiation of a template
1565 (determine_specialization): Accept variable templates.
1566 (check_explicit_specialization): Handle and check for malformed
1567 variable template specializations.
1568 (lookup_template_variable): New.
1569 (tsubst_decl): Handle variable template specializations.
1570 (do_decl_instantiation): Handle template variables.
1571 (instantiate_decl): Handle template variables.
1572 * semantics.c (finish_template_variable): New.
1573 (finish_id_expression): Instantiate variable templates.
1574 * cp-tree.h (variable_template_p): New.
1576 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1579 * decl.c (check_redeclaration_no_default_args): New.
1580 (duplicate_decls): Use it, handle default arguments
1581 in redeclarations of function templates.
1583 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1585 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1587 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1589 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1590 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1591 instead of pointer_set.
1593 2014-08-01 Jason Merrill <jason@redhat.com>
1596 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1597 init-list for trailing elements.
1598 * typeck2.c (process_init_constructor_array): Likewise.
1600 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1603 * decl.c (duplicate_decls): Handle static member functions too.
1605 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1607 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1610 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1613 * parser.c (cp_parser_array_notation): Added check for array_type.
1615 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1618 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1619 DECL_EXPR improved. Changed handling for INIT_EXPR.
1621 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1623 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1625 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1627 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1628 -fsanitize=alignment call ubsan_maybe_instrument_reference
1629 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1630 for calls to member functions.
1632 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1635 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1636 whether it is returning the address of a local variable.
1637 (check_return_expr): Return 0 instead of the address of a local
1640 2014-07-30 Jason Merrill <jason@redhat.com>
1644 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1646 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1649 * pt.c (unify_arity): Add boolean parameter.
1650 (unify_too_few_arguments): Likewise.
1651 (type_unification_real): Diagnose correctly insufficient
1652 arguments in the presence of trailing variadic parameters;
1653 deducing multiple trailing packs as empty is fine.
1655 2014-07-30 Jason Merrill <jason@redhat.com>
1660 * decl2.c (mark_all_virtuals): New variable.
1661 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1662 (cp_write_global_declarations): Set it and give helpful diagnostic
1663 if it introduces errors.
1664 * class.c (finish_struct_1): Check it.
1668 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1669 (check_explicit_specialization): Clear it on specializations.
1670 * decl.c (duplicate_decls, start_decl): Likewise.
1671 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1672 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1673 linkage after setting the appropriate flags.
1674 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1675 * decl2.c (mark_needed): Mark clones.
1676 (import_export_decl): Not here.
1678 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1680 Implement N4051 - Allow typename in a template template parameter
1681 * parser.c (cp_parser_type_parameter_key): New funtion;
1682 (cp_parser_token_is_type_parameter_key): Ditto;
1683 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1684 but pedwarn for less than cxx1z.
1686 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1689 * call.c (standard_conversion): Use resolve_nondeduced_context
1690 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1692 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1695 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1698 2014-07-15 Jason Merrill <jason@redhat.com>
1701 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1705 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1706 * class.c (finish_struct): Reject invalid definition of
1707 std::initializer_list.
1709 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1711 * call.c (convert_like_real): Call print_z_candidate and inform only
1712 if permerror returns true.
1714 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1716 * class.c (build_clone): Do not clear assembler names of
1718 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1719 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1720 as a special case return sizeof (struct tree_decl_non_common)
1722 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1723 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1724 * cp/cp-tree.h (tree_template_decl): New structure.
1725 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1726 (union cp_lang_tree_node): Add template_decl.
1727 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1729 2014-07-14 Jason Merrill <jason@redhat.com>
1733 * pt.c (instantiate_decl): Don't check defer_ok for local class
1736 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1739 * cp-tree.h (LITERAL_ZERO_P): Define.
1740 * parser.c (cp_parser_parenthesized_expression_list): Add
1741 want_literal_zero_p argument, if true, for literal zeros
1742 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1743 (cp_parser_postfix_expression): Adjust
1744 cp_parser_parenthesized_expression_list caller, handle
1745 -Wmemset-transposed-args.
1746 (literal_zeros): New variable.
1748 2014-07-13 Jason Merrill <jason@redhat.com>
1751 * semantics.c (is_instantiation_of_constexpr): Return true for
1752 defaulted functions, too.
1753 (explain_invalid_constexpr_fn): Only use
1754 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1755 * method.c (explain_implicit_non_constexpr): Pass
1756 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1759 * decl.c (check_initializer): Don't finish_compound_literal
1760 on erroneous constexpr init.
1763 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1766 * decl.c (create_array_type_for_decl): Only check for auto once.
1769 * call.c (build_list_conv): Don't try to build a list of references.
1771 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1773 PR C++/60209 - Declaration of user-defined literal operator cause error
1774 * parser.c (cp_parser_operator): Fold treatment of strings
1775 and user-defined string literals. Use the full string parser.
1776 (cp_parser_string_literal): Add flag to not look for literal operator.
1778 2014-07-11 Jason Merrill <jason@redhat.com>
1782 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1784 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1787 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1789 * decl.c (check_initializer): Don't call check_narrowing here,
1790 set LOOKUP_NO_NARROWING.
1791 * typeck2.c (digest_init_r): Likewise.
1793 2014-07-10 Jason Merrill <jason@redhat.com>
1796 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1800 * decl2.c (mark_all_virtuals): New variable.
1801 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1802 (cp_write_global_declarations): Set it and give helpful diagnostic
1803 if it introduces errors.
1804 * class.c (finish_struct_1): Check it.
1805 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1807 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1810 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1811 outside class declaration, in friend declaration, and neither on
1812 constructor nor conversion operator.
1814 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1818 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1819 cv-qualifiers of function types.
1821 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1822 Paolo Carlini <paolo.carlini@oracle.com>
1825 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1828 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1830 * class.c (check_for_override): Wrap the 'final' and 'override'
1831 keywords in %< and %>.
1833 2014-07-06 Marek Polacek <polacek@redhat.com>
1836 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1837 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1838 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1841 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1843 * pt.c (convert_template_argument): Use inform instead of error in
1846 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1851 * parser.c (cp_parser_userdef_string_literal): Take a tree
1853 (cp_parser_string_literal): Don't hack the token stream.
1855 2014-06-30 Jason Merrill <jason@redhat.com>
1859 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1861 * init.c (build_vtbl_address): Don't mark destructor.
1862 * class.c (finish_struct_1): Add all classes to keyed_classes
1866 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1869 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1871 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1872 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1873 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1874 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1875 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1876 * pt.c (unify): Also check whether the argument is a PMF.
1878 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1881 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1882 a '[' can also start a primary-expression.
1883 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1884 when cp_parser_tokens_start_cast_expression returns -1.
1886 2014-06-30 Jason Merrill <jason@redhat.com>
1889 * pt.c (unify_one_argument): Type/expression mismatch just causes
1892 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1895 2014-06-30 Marek Polacek <polacek@redhat.com>
1897 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1898 function has no_sanitize_undefined attribute.
1899 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1900 function has no_sanitize_undefined attribute.
1902 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1905 * cp-array-notation.c (expand_sec_reduce_builtin):
1906 Check that bultin argument is correct.
1907 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1909 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1913 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1914 types aren't the same.
1916 2014-06-27 Jason Merrill <jason@redhat.com>
1919 * error.c (dump_template_bindings): Don't tsubst in a clone.
1921 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1924 * semantics.c (finish_compound_literal): Revert r204228.
1926 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1928 * parser.c (cp_parser_compound_literal_p): New.
1929 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1931 2014-06-26 Jason Merrill <jason@redhat.com>
1933 * parser.c (cp_parser_for_init_statement): Change range-for error
1936 N3994 Ranged-based for-loops: The Next Generation
1937 * parser.c (cp_lexer_nth_token_is): New.
1938 (cp_parser_for_init_statement): Allow "for (id : init)".
1940 2014-06-26 Teresa Johnson <tejohnson@google.com>
1942 * class.c (dump_class_hierarchy): Use saved dump files.
1943 (dump_vtable): Ditto.
1946 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1949 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1950 parameter lists outside of function parameter scope.
1952 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1956 * typeck2.c (process_init_constructor_record): Do not complain about
1957 uninitialized const members, because within aggregate-initialization,
1958 members without explicit initializers are value-initialized.
1960 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1962 * semantics.c (finish_omp_clauses): Make sure
1963 OMP_CLAUSE_LINEAR_STEP has correct type.
1965 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1967 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1968 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1969 FUNCTION_DECL check.
1970 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1971 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1972 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1973 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1975 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1978 * decl.c (grokdeclarator): Do not early check for operator-function-id
1981 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1983 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1986 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1988 * parser.c (cp_parser_omp_for_loop): For
1989 #pragma omp parallel for simd move lastprivate clause from parallel
1990 to for rather than simd.
1992 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1996 * decl.c (grokparms): Accept a single parameter of type 'void'.
1998 2014-06-20 Jason Merrill <jason@redhat.com>
2001 * call.c (add_function_candidate): Avoid special 'this' handling
2002 if we have a ref-qualifier.
2005 * call.c (build_over_call): Call build_this in template path.
2007 2014-06-19 Jason Merrill <jason@redhat.com>
2010 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
2012 2014-06-18 Jason Merrill <jason@redhat.com>
2015 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
2016 ref-qualifier handling.
2019 * pt.c (resolve_overloaded_unification): Preserve
2020 ARGUMENT_PACK_EXPLICIT_ARGS.
2022 2014-06-18 Jakub Jelinek <jakub@redhat.com>
2024 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
2026 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
2028 2014-06-17 Jason Merrill <jason@redhat.com>
2031 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
2033 2014-06-15 Jason Merrill <jason@redhat.com>
2036 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
2039 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
2041 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2043 * decl.c (grokvardecl): Fix pasto in previous patch.
2045 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2047 * decl.c (duplicate_decls): Use set_decl_tls_model.
2048 (grokdeclarator): Likewise.
2049 * semantics.c (finish_id_expression): Check TLS only for
2051 (finish_omp_threadprivate): Use decl_default_tls_model.
2052 * decl2.c (get_guard): Likewise.
2053 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
2055 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
2058 * decl.c (grokparms): Improve error message about void parameters.
2059 * error.c (type_to_string): Fix aka cut off code.
2061 2014-06-12 Jason Merrill <jason@redhat.com>
2063 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
2064 * cvt.c (type_promotes_to): Likewise.
2065 * mangle.c (write_type, write_expression): Likewise.
2066 (write_name, write_template_arg): Likewise.
2067 (mangle_decl): Make alias based on flag_abi_compat_version.
2068 Emit -Wabi warning here.
2069 (finish_mangling_internal): Not here. Drop warn parm.
2070 (finish_mangling_get_identifier, finish_mangling): Adjust.
2071 (mangle_type_string, mangle_special_for_type): Adjust.
2072 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
2073 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
2074 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
2076 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
2077 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
2078 (layout_nonempty_base_or_field, end_of_class): Likewise.
2079 (layout_empty_base, build_base_field, layout_class_type): Likewise.
2080 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
2081 (layout_virtual_bases): Likewise.
2082 * decl.c (compute_array_index_type): Likewise.
2083 * mangle.c (write_mangled_name, write_prefix): Likewise.
2084 (write_template_prefix, write_integer_cst, write_expression): Likewise.
2085 (write_template_arg, write_array_type): Likewise.
2086 * method.c (lazily_declare_fn): Likewise.
2087 * rtti.c (get_pseudo_ti_index): Likewise.
2088 * typeck.c (comp_array_types): Likewise.
2090 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
2092 * vtable-class-hierarchy.c: Update handling for section names
2093 that are no longer trees.
2094 * decl.c (duplicate_decls): Likewise.
2096 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2099 * parser.c (cp_parser_init_declarator): Actually pass friend_p
2100 to cp_parser_declarator.
2102 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2105 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
2106 * name-lookup.c (validate_nonmember_using_decl): Adjust error
2109 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
2112 * parser.c (cp_parser_declarator): Add bool parameter.
2113 (cp_parser_direct_declarator): Likewise, use it.
2114 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
2115 (cp_parser_condition, cp_parser_explicit_instantiation,
2116 cp_parser_init_declarator, cp_parser_type_id_1,
2117 cp_parser_parameter_declaration, cp_parser_exception_declaration,
2118 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
2119 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
2121 * decl.c (grokdeclarator): Fix handling of friend declared in
2122 namespace scope (g++.dg/parse/friend10.C).
2124 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
2126 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
2128 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
2129 (maybe_clone_body): Move symbol across comdat groups.
2130 * method.c (use_thunk): Copy implicit section flag.
2132 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
2135 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
2137 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2139 * method.c (use_thunk): Use set_decl_section_name.
2140 * optimize.c (maybe_clone_body): Use set_decl_section_name.
2141 * decl.c (duplicate_decls): Likewise.
2142 * vtable-class-hierarchy.c: Likewise.
2144 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
2147 * class.c (check_field_decls): In C++11 mode do not reject
2148 static data members and reference-type members in unions.
2150 2014-06-05 Jason Merrill <jason@redhat.com>
2153 * decl.c (check_initializer): Collapse a TREE_LIST here.
2154 * typeck2.c (store_init_value): Not here.
2156 2014-06-05 Richard Biener <rguenther@suse.de>
2157 Paolo Carlini <paolo.carlini@oracle.com>
2160 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
2161 handling of empty classes.
2163 2014-06-04 Jason Merrill <jason@redhat.com>
2165 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
2166 for noexcept and thread_local, too.
2169 * decl.c (check_initializer): Maybe clear
2170 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2172 2014-06-05 Richard Biener <rguenther@suse.de>
2175 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
2176 warnings for accessing empty classes.
2178 2014-06-05 Marek Polacek <polacek@redhat.com>
2181 * parser.c (cp_parser_binary_expression): Warn when logical not is
2182 used on the left hand side operand of a comparison.
2184 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
2187 * typeck.c (cp_build_modify_expr): Handle array of characters
2188 initialized by a string literal.
2189 * decl.c (check_initializer): Handle parenthesized string literal
2191 * typeck2.c (store_init_value): Remove redundant check.
2193 2014-06-04 Jason Merrill <jason@redhat.com>
2197 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
2198 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
2200 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2203 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
2206 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
2210 * call.c (standard_conversion): Convert nullptr to bool only
2211 in case of direct-initialization.
2212 (convert_like_real): Provide informative error message.
2214 2014-06-03 Marek Polacek <polacek@redhat.com>
2217 * semantics.c (finish_switch_cond): Warn if switch condition has
2220 2014-06-03 Jason Merrill <jason@redhat.com>
2223 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
2224 variable to local_specializations.
2227 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
2229 2014-06-02 Jason Merrill <jason@redhat.com>
2232 * decl.c (reshape_init_class): Handle un-folded
2233 constant-expressions.
2236 * pt.c (pack_deducible_p): Handle canonicalization.
2238 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
2240 * pt.c (tsubst_function_type): Initialize arg_types.
2242 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
2245 * class.c (handle_using_decl): Pass the correct scope to
2246 cp_emit_debug_info_for_using.
2248 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2252 * search.c (accessible_p): Use current_nonlambda_class_type.
2253 * semantics.c (check_accessibility_of_qualified_id): Likewise.
2255 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2257 * decl.c: Include builtins.h.
2258 * semantics.c: Likewise.
2260 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
2264 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
2265 * pt.c (tsubst_function_type): Inject the this parameter; do the
2266 substitutions in the order mandated by the DR.
2267 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
2268 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
2269 (static_fn_type): Copy it.
2270 * decl2.c (build_memfn_type, change_return_type,
2271 cp_reconstruct_complex_type): Likewise.
2272 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
2273 * tree.c (strip_typedefs): Likewise.
2274 * typeck.c (merge_types): Likewise.
2276 2014-05-30 Jason Merrill <jason@redhat.com>
2279 * pt.c (instantiate_decl): Check that defer_ok is not set for
2280 local class members.
2283 * pt.c (tsubst_init): Split out from...
2284 (tsubst_expr) [DECL_EXPR]: Here.
2285 (tsubst_copy) [VAR_DECL]: Use it.
2286 * semantics.c (finish_id_expression): Return the decl for static/const.
2288 2014-05-28 Jason Merrill <jason@redhat.com>
2291 * decl.c (cxx_comdat_group): Return a decl.
2292 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
2294 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
2298 * call.c (build_aggr_conv): Ignore passed in flags.
2299 (build_array_conv, build_complex_conv): Likewise.
2301 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2303 * optimize.c (maybe_thunk_body): Use set_comdat_group.
2304 (maybe_clone_body): Likewise.
2305 * decl.c (duplicate_decls): Update code duplicating comdat group;
2306 do not copy symtab pointer; before freeing newdecl remove it
2308 * decl2.c (constrain_visibility): Use set_comdat_group.
2310 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2312 * rtti.c: Include tm_p.h
2313 (emit_tinfo_decl): Force RTTI data to be aligned to required
2316 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2318 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
2319 ignoring other target adjustments.
2321 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2323 * semantics.c (finish_omp_clauses): Remove duplicated variable
2326 * parser.c (cp_parser_omp_target): Return bool values.
2328 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
2331 * lambda.c (add_capture): Enforce that capture by value requires
2333 * typeck2.c (cxx_incomplete_type_inform): Early return if
2334 TYPE_MAIN_DECL is null.
2336 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
2339 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2341 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2344 * lambda.c (build_capture_proxy, add_capture): Treat normal
2345 captures and init-captures identically.
2347 2014-05-21 Mark Wielaard <mjw@redhat.com>
2350 * cp-lang.c (cxx_enum_underlying_base_type): New function.
2351 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
2353 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2355 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
2356 * cp-array-notation.c (replace_invariant_exprs): Likewise.
2357 (expand_array_notation): Handle VOID_CST.
2358 * error.c (dump_expr): Likewise.
2359 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
2360 (cxx_pretty_printer::expression): Likewise.
2361 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
2362 * decl.c (register_dtor_fn): Likewise.
2363 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
2364 (build_delete, push_base_cleanups): Likewise.
2365 * mangle.c (write_expression): Likewise.
2366 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
2367 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
2368 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
2369 * tree.c (cp_tree_equal): Likewise.
2370 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
2371 instead of void_zero_node.
2372 * typeck.c (check_return_expr): Likewise.
2373 * typeck2.c (build_functional_cast): Likewise.
2375 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
2378 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
2380 (cp_parser_statement): ...here. Make sure only semicolon can go after
2383 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2388 * typeck2.c (digest_nsdmi_init): New.
2389 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
2390 * init.c (get_nsdmi): Likewise.
2391 * cp-tree.h (digest_nsdmi_init): Declare.
2393 2014-05-20 Jason Merrill <jason@redhat.com>
2395 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
2396 up a virtual function in a dummy object.
2398 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2401 * decl.c (duplicate_decls): Replace pair of warning_at with
2402 warning_at + inform.
2403 (maybe_commonize_var): Likewise.
2405 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2408 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
2409 (tsubst_copy_and_build): Perform recursive substitutions in a
2410 deterministic order.
2412 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2415 * typeck2.c (cxx_incomplete_type_inform): New.
2416 (cxx_incomplete_type_diagnostic): Use it.
2417 * decl.c (grokdeclarator): Check the element type of an
2418 incomplete array type; call the above.
2419 * cp-tree.h (cxx_incomplete_type_inform): Declare.
2421 2014-05-19 Jason Merrill <jason@redhat.com>
2424 * pt.c (tsubst_copy): Don't check at_function_scope_p.
2425 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
2427 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
2429 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
2430 * parser.c (cp_parser_enum_specifier): Likewise.
2432 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2434 * class.c (sorted_fields_type_new): Adjust.
2435 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
2436 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
2437 * cp-tree.h: Remove usage of variable_size gty attribute.
2438 * decl.c (make_label_decl): Adjust.
2439 (check_goto): Likewise.
2440 (start_preparsed_function): Likewise.
2441 (save_function_data): Likewise.
2442 * lex.c (init_reswords): Likewise.
2443 (retrofit_lang_decl): Likewise.
2444 (cxx_dup_lang_specific_decl): Likewise.
2445 (copy_lang_type): Likewise.
2446 (cxx_make_type): Likewise.
2447 * name-lookup.c (binding_entry_make): Likewise.
2448 (binding_table_construct): Likewise.
2449 (binding_table_new): Likewise.
2450 (cxx_binding_make): Likewise.
2451 (pushdecl_maybe_friend_1): Likewise.
2452 (begin_scope): Likewise.
2453 (push_to_top_level): Likewise.
2454 * parser.c (cp_lexer_alloc): Likewise.
2455 (cp_lexer_new_from_tokens): Likewise.
2456 (cp_token_cache_new): Likewise.
2457 (cp_parser_context_new): Likewise.
2458 (cp_parser_new): Likewise.
2459 (cp_parser_nested_name_specifier_opt): Likewise.
2460 (cp_parser_template_id): Likewise.
2461 * pt.c (maybe_process_partial_specialization): Likewise.
2462 (register_specialization): Likewise.
2463 (add_pending_template): Likewise.
2464 (lookup_template_class_1): Likewise.
2465 (push_tinst_level): Likewise.
2466 * semantics.c (register_constexpr_fundef): Likewise.
2467 (cxx_eval_call_expression): Likewise.
2468 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
2470 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
2473 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
2474 when cp_parser_lookup_name sets ambiguous_decls.
2476 2014-05-15 Jason Merrill <jason@redhat.com>
2478 * call.c (print_conversion_rejection): Use loc consistently.
2480 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
2482 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
2483 * call.c (convert_like_real, build_new_method_call_1): Use it.
2484 * decl2.c (grokfield): Likewise.
2485 * init.c (perform_member_init, build_aggr_init, expand_default_init,
2486 build_new_1): Likewise.
2487 * mangle.c (write_expression): Likewise.
2488 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
2490 2014-05-14 Jason Merrill <jason@redhat.com>
2494 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
2495 dropped cv-quals as a bad conversion.
2496 (convert_like_real) [ck_ref_bind]: Explain them.
2497 (compare_ics): Check badness before stripping reference
2498 bindings. Handle comparing bad reference bindings.
2499 * typeck.c (comp_cv_qualification): Add overload that just takes
2501 * cp-tree.h: Declare it.
2503 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
2504 (arg_conversion_rejection, bad_arg_conversion_rejection)
2505 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
2506 (add_function_candidate): Pass actual argument, rather than type, to
2507 bad_arg_conversion_rejection.
2508 (print_conversion_rejection): Explain what's wrong with the conversion.
2509 (print_z_candidates): Say "candidate:" before each candidate.
2510 (splice_viable): Be strict if we see a viable or template candidate.
2511 (build_user_type_conversion_1): Pass false to strict parameter.
2512 (perform_overload_resolution, build_conditional_expr_1): Likewise.
2513 (build_new_op_1, build_new_method_call_1): Likewise.
2514 (build_op_call_1): Pass true to strict parameter.
2516 2014-05-13 Jason Merrill <jason@redhat.com>
2518 * call.c (print_error_for_call_failure): Say "no match" rather
2519 than "ambiguous" if there were no strict matches.
2520 (build_new_method_call_1): Likewise.
2523 * semantics.c (is_this_parameter): Allow capture proxies too.
2525 2014-05-12 Jason Merrill <jason@redhat.com>
2527 * call.c (maybe_print_user_conv_context): New.
2528 (convert_like_real): Use it. Print call context for bad
2529 user-defined conversion.
2530 (build_over_call): Print call context for bad 'this' conversion.
2532 * call.c (convert_like_real): Use inform for identifying the
2535 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
2537 * cvt.c (cp_convert_to_pointer): Don't call error_at if
2538 complain & tf_error is false.
2540 * decl.c (make_unbound_class_template): Prefer inform for
2541 "declared here"-type message.
2543 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
2547 * lambda.c (lambda_expr_this_capture): Add new parameter
2548 add_capture_p controlling whether the functions will try to
2549 capture 'this' via the default capture.
2550 (maybe_resolve_dummy): Likewise.
2551 * cp-tree.h: Adjust prototypes.
2552 * call.c, semantics.c: Change callers of these functions.
2553 * call.c (build_new_method_call_1): Use the actual 'this' that
2554 would be potentially captured for the overload resolution, instead
2555 of the dummy object.
2557 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
2559 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
2561 (convert_nontype_argument): Adjust calls.
2562 (coerce_template_parameter_pack): Add missing complain & tf_error
2565 2014-05-09 Jason Merrill <jason@redhat.com>
2569 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2570 non-class lvalues and xvalues that differ only in cv-qualifiers.
2574 * call.c (build_user_type_conversion_1): The copy-init temporary
2578 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2581 * call.c (build_conditional_expr_1): If overload resolution finds
2582 no match, just say "different types".
2585 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2588 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2589 if we didn't find a conversion.
2590 Don't accept a bad conversion too early.
2592 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2595 * typeck.c (convert_for_assignment): Provide an inform for pointers
2596 to incomplete class types.
2598 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2601 * pt.c (convert_nontype_argument): Protect all the error calls
2602 with complain & tf_error.
2604 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2607 * pt.c (instantiate_decl): Avoid generating the body of a
2610 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2613 * pt.c (maybe_begin_member_template_processing): Use
2614 uses_template_parms.
2616 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2617 Mike Stump <mikestump@comcast.net>
2618 Richard Sandiford <rdsandiford@googlemail.com>
2620 * call.c: Include wide-int.h.
2621 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2622 (convert_for_arg_passing): Likewise.
2623 * class.c: Include wide-int.h.
2624 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2625 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2626 (include_empty_classes): Likewise
2627 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2628 * cvt.c: Include wide-int.h.
2629 (ignore_overflows): Use wide_int_to_tree.
2630 * decl.c: Include wide-int.h.
2631 (check_array_designated_initializer): Use wide-int interfaces.
2632 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2633 (finish_enum_value_list): Use signop.
2634 (build_enumerator): Use wide-int interfaces.
2635 * init.c: Include wide-int.h.
2636 (build_new_1): Use wide-int interfaces.
2637 * mangle.c: Include wide-int.h.
2638 (write_integer_cst): Use wide-int interfaces.
2639 (write_array_type): Likewise.
2640 * tree.c: Include wide-int.h.
2641 (cp_tree_equal): Use tree_int_cst_equal.
2642 * typeck2.c: Include wide-int.h.
2643 (process_init_constructor_array): Use wide-int interfaces.
2645 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2648 * decl.c (grokfndecl): Check duplicate_decls return value for
2650 * pt.c (instantiate_decl): A deleted function is defined.
2652 2014-05-02 Jason Merrill <jason@redhat.com>
2654 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2657 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2659 (add_capture): Check for VLA before calling it.
2660 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2661 just the current one. Make non-static.
2662 * cp-tree.h: Declare it.
2663 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2664 the operand was static or constant.
2666 2014-05-02 Marek Polacek <polacek@redhat.com>
2668 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2671 2014-05-01 Marek Polacek <polacek@redhat.com>
2674 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2675 between label and variable when warning about returning local address.
2677 2014-04-30 Jason Merrill <jason@redhat.com>
2680 * init.c (build_value_init): Don't try to call an array constructor.
2683 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2685 2014-04-30 Marek Polacek <polacek@redhat.com>
2687 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2688 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2689 for non-integer types.
2691 2014-04-29 Jason Merrill <jason@redhat.com>
2694 Represent the unevaluated exception specification of an implicitly
2695 declared or deleted function with a simple placeholder, not a list
2697 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2698 * except.c (unevaluated_noexcept_spec): New.
2699 * class.c (deduce_noexcept_on_destructor): Use it.
2700 * decl.c (check_redeclaration_exception_specification): Call
2701 maybe_instantiate_noexcept.
2702 (duplicate_decls): Call it before merge_types.
2703 (start_preparsed_function): Call maybe_instantiate_noexcept.
2704 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2705 * init.c (get_nsdmi): Factor out of perform_member_init.
2706 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2707 (walk_field_subobs): Consider NSDMI for EH spec.
2708 (get_defaulted_eh_spec): New.
2709 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2710 (defaulted_late_check): Defer EH checking in non-template classes.
2711 (after_nsdmi_defaulted_late_checks): New.
2712 * parser.c (cp_parser_class_specifier_1): Use it.
2713 (unparsed_classes): New macro.
2714 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2715 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2716 Remove list-of-functions handling.
2717 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2718 handling and FN parameter.
2719 * typeck.c (merge_types): Adjust.
2721 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2724 * parser.c (cp_parser_alias_declaration): Check return value of
2727 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2729 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2730 atomic-clause, allow comma in between atomic-clause and
2733 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2736 * rtti.c (emit_support_tinfos): Do not iterate on
2737 registered_builtin_types (partial revert).
2739 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2742 * semantics.c (apply_deduced_return_type): Complete non-void type
2743 before estimating whether the type is aggregate.
2745 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2748 * rtti.c (emit_support_tinfo_1): New function, extracted from
2749 emit_support_tinfos.
2750 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2752 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2755 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2756 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2758 2014-04-18 Jason Merrill <jason@redhat.com>
2761 * call.c (reference_binding): Recurse on user-defined conversion.
2764 * call.c (standard_conversion): Don't try to apply restrict to void.
2766 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2768 * decl.c (reshape_init_r): Handle a single element of vector type.
2770 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2773 * decl2.c (cplus_decl_attributes): Handle
2774 pointer-to-member-function declarations.
2776 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2779 * call.c (build_user_type_coversion): Use build_dummy_object
2780 to create the placeholder object for a constructor method call.
2781 (build_special_member_call): Likewise.
2782 (build_over_call): Check for the placeholder object with
2784 (build_new_method_call_1): Likewise. Don't attempt to resolve
2785 a dummy object for a constructor method call.
2787 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2790 * friend.c (add_friend, make_friend_class): Move repeated friend
2791 warning under Wredundant_decls.
2793 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2795 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2796 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2797 (do_class_using_decl): Likewise.
2798 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2800 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2803 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2805 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2807 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2809 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2811 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2813 2014-04-11 Jason Merrill <jason@redhat.com>
2815 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2817 (cp_lexer_get_preprocessor_token): Always clear it.
2818 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2822 * decl.c (reshape_init_r): Handle a single element of class type.
2825 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2826 built-in operator new.
2828 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2831 * name-lookup.c (parse_using_directive): Return early if the
2832 attribs argument is error_mark_node; use get_attribute_name.
2834 2014-04-11 Jason Merrill <jason@redhat.com>
2838 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2839 * call.c (struct z_candidate): Add flags field.
2840 (add_candidate): Add flags parm.
2841 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2842 (add_template_candidate_real): Pass it.
2843 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2844 * tree.c (build_aggr_init_expr): Copy it.
2845 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2847 2014-04-10 Richard Biener <rguenther@suse.de>
2848 Jakub Jelinek <jakub@redhat.com>
2851 * error.c (dump_decl) <case FUNCTION_DECL>: If
2852 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2853 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2856 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2858 * pt.c (check_template_variable): Check for the return of pedwarn
2859 before emitting a note.
2860 * parser.c (cp_parser_lambda_introducer): Likewise.
2862 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2865 * pt.c (process_template_parm): For an invalid non-type parameter
2866 only set TREE_TYPE to error_mark_node.
2867 (push_inline_template_parms_recursive, comp_template_parms,
2868 redeclare_class_template, coerce_template_template_parm,
2869 coerce_template_template_parms, unify): Use error_operand_p.
2871 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2873 * class.c (check_bases_and_members): Warn about non-virtual dtors
2874 in public bases only. Check warn_ecpp before complaining about
2875 non-polymorphic bases.
2877 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2879 * decl.c (duplicate_decls): Check for the return of warning_at
2880 before emitting a note.
2881 (warn_misplaced_attr_for_class_type): Likewise.
2882 (check_tag_decl): Likewise.
2884 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2887 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2889 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2892 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2893 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2894 instantiating a variable-sized type.
2897 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2899 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2901 * class.c (find_abi_tags_r): Check for the return of warning
2902 before emitting a note.
2903 (one_inherited_ctor): Likewise.
2905 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2907 * decl.c (duplicate_decls): Check for the return of permerror
2908 before emitting a note.
2910 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2912 * class.c (accessible_nvdtor_p): New.
2913 (check_bases): Don't check base destructor here ...
2914 (check_bases_and_members): ... check them here. Trigger on
2915 Wnon-virtual-dtor flag.
2916 (finish_struct_1): Use accessible_nvdtor_p.
2918 2014-04-01 Jason Merrill <jason@redhat.com>
2920 * pt.c (process_partial_specialization): Say "not deducible"
2921 rather than "not used". Use inform.
2924 * pt.c (coerce_template_parms): Check that the pack expansion
2925 pattern works with the first matching parameter.
2927 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2929 * init.c (perform_member_init): Homogenize uninitialized
2932 2014-04-01 Jason Merrill <jason@redhat.com>
2935 * call.c (build_array_conv): Call complete_type.
2938 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2939 (picflag_from_initializer): Return it.
2940 (process_init_constructor): Handle it.
2943 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2944 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2945 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2946 (most_general_template): Handle more kinds of template.
2947 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2948 instantiations and specializations.
2950 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2953 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2954 COMPONENT_REFs and ARRAY_REFs sooner.
2956 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2959 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2960 usage in non-functions with pushed scope.
2962 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2965 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2966 to indicate whether a scope is in the process of defining a class.
2967 * semantics.c (begin_class_definition): Set defining_class_p.
2968 * name-lookup.c (leave_scope): Reset defining_class_p.
2969 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2970 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2971 unwinding to class-defining scope to handle the erroneous definition of
2972 a generic function of an arbitrarily nested class within an enclosing
2975 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2978 * method.c (walk_field_subobs): Improve the diagnostic
2979 locations for both REFERENCE_TYPEs and non-static const members.
2980 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2981 instead of %qD to be consistent with the c++11 diagnostic.
2983 2014-03-25 Jason Merrill <jason@redhat.com>
2987 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2988 * search.c (get_pure_virtuals): Not here.
2991 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2992 a lambda in unevaluated context.
2995 * decl.c (create_array_type_for_decl): Complain about array of auto.
2997 2014-03-25 Jakub Jelinek <jakub@redhat.com>
3000 * semantics.c (potential_constant_expression_1): Handle
3003 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
3006 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
3007 introducing an implicit function template parameter within an explicit
3010 2014-03-22 Jason Merrill <jason@redhat.com>
3013 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
3016 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
3019 * name-lookup.c (push_class_level_binding_1): Check identifier_p
3020 on the name argument.
3022 2014-03-20 Jakub Jelinek <jakub@redhat.com>
3025 * init.c (build_zero_init_1): Ignore fields with error_mark_node
3028 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
3031 * call.c (build_new_method_call_1): Handle pure virtuals called by
3034 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
3037 * parser.c (cp_parser_member_declaration): Don't allow
3038 finish_fully_implicit_template to consider friend declarations to be
3039 class member templates.
3040 (synthesize_implicit_template_parm): Handling winding back through class
3041 scope to the class being defined in order to inject a template argument
3045 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
3046 function scope as per cp_parser_skip_to_end_of_statement.
3048 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
3051 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
3053 2014-03-14 Jason Merrill <jason@redhat.com>
3057 * search.c (get_pure_virtuals): Handle abstract dtor here.
3058 (dfs_get_pure_virtuals): Not here.
3061 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
3062 abstract class as pure.
3064 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3067 * pt.c (maybe_process_partial_specialization): Check return value
3068 of check_specialization_namespace.
3070 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
3073 * semantics.c (finish_static_assert): Call cxx_constant_value only
3074 if require_potential_rvalue_constant_expression returns true.
3076 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
3079 * method.c (get_inherited_ctor): New.
3080 * cp-tree.h (get_inherited_ctor): Declare it.
3081 * semantics.c (is_valid_constexpr_fn): Use it.
3083 2014-03-10 Jason Merrill <jason@redhat.com>
3086 * call.c (convert_default_arg): Remove special handling for
3090 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
3091 when deciding whether to call push_template_decl for a member class.
3092 * pt.c (push_template_decl_real): Return after wrong levels error.
3094 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
3097 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
3098 lambda, remove the lambda's own template argument list prior to fetching
3102 * parser.c (cp_parser_parameter_declaration_clause): Move generic
3103 function template unwinding on error into a more general location, ...
3104 (cp_parser_skip_to_end_of_statement): ... here.
3106 2014-03-07 Jason Merrill <jason@redhat.com>
3108 * Make-lang.in (check_g++_parallelize): Split dg.exp.
3110 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
3111 we're in a trailing return type.
3113 * typeck.c (comp_template_parms_position): 'auto' and
3114 'decltype(auto)' are different from real template parms.
3116 * parser.c (cp_parser_using_declaration): Consume the semicolon
3117 after bare parameter pack error.
3119 * cp-tree.h (REF_PARENTHESIZED_P): New.
3120 * semantics.c (force_paren_expr): Set it.
3121 * pt.c (do_auto_deduction): Check it.
3122 (tsubst) [COMPONENT_REF]: Copy it.
3123 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
3125 * decl.c (create_array_type_for_decl): Only warn about invalid
3126 C++1y VLA if flag_iso or warn_vla>0.
3127 (grokdeclarator): Likewise.
3128 * pt.c (tsubst): Likewise.
3129 * semantics.c (finish_decltype_type): Likewise.
3130 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
3131 (cp_build_addr_expr_1): Likewise.
3132 * init.c (build_new_1): Improve diagnostics.
3134 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3137 * decl.c (check_initializer): Return NULL_TREE after error;
3138 consistently use inform.
3140 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
3142 * decl.c (check_initializer): Remove dead code.
3144 2014-03-06 Marek Polacek <polacek@redhat.com>
3147 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
3148 of checking tree code.
3150 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
3152 * parser.c (cp_lexer_set_source_position): New.
3153 (cp_parser_mem_initializer): Use it.
3154 (cp_parser_postfix_open_square_expression): Likewise.
3155 (cp_parser_parenthesized_expression_list): Likewise.
3156 (cp_parser_new_initializer): Likewise.
3157 (cp_parser_jump_statement): Likewise.
3158 (cp_parser_initializer): Likewise.
3159 (cp_parser_functional_cast): Likewise.
3161 2014-03-05 Jason Merrill <jason@redhat.com>
3164 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
3165 dependent expression.
3168 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
3169 if re-parsing might succeed.
3170 * semantics.c (finish_id_expression): Use of a parameter outside
3171 the function body is a parse error.
3173 * parser.c (cp_parser_mem_initializer): Set input_location
3174 properly for init-list warning.
3175 (cp_parser_postfix_open_square_expression): Likewise.
3176 (cp_parser_parenthesized_expression_list): Likewise.
3177 (cp_parser_new_initializer): Likewise.
3178 (cp_parser_jump_statement): Likewise.
3179 (cp_parser_initializer): Likewise.
3180 (cp_parser_functional_cast): Likewise.
3182 2014-03-04 Jason Merrill <jason@redhat.com>
3185 * typeck2.c (process_init_constructor_record): Set
3186 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
3190 * parser.c (cp_parser_direct_declarator): Set declarator to
3191 cp_error_declarator on invalid qualified-id.
3193 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
3196 * parser.c (cp_parser_using_declaration): Early return when
3197 cp_parser_nested_name_specifier errors out.
3199 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
3202 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
3203 function scope on parse error in function parameter list.
3205 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
3207 * method.c (implicitly_declare_fn): Remove redundant
3208 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
3209 * semantics.c (is_instantiation_of_constexpr): Likewise.
3210 * error.c (dump_function_decl): Likewise.
3212 2014-03-01 Jason Merrill <jason@redhat.com>
3215 * semantics.c (begin_maybe_infinite_loop): Use
3216 fold_non_dependent_expr_sfinae.
3218 2014-02-28 Jason Merrill <jason@redhat.com>
3221 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
3223 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
3226 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
3227 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
3228 * lambda.c (maybe_add_lambda_conv_op): Likewise.
3230 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
3233 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
3236 2014-02-27 Jason Merrill <jason@redhat.com>
3240 * decl2.c (tentative_decl_linkage): Don't mess with functions that
3241 are not yet defined.
3243 2014-02-26 Jason Merrill <jason@redhat.com>
3247 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
3248 * init.c (build_vtbl_address): Do it here.
3254 * pt.c (struct warning_sentinel): New.
3255 (tsubst_copy_and_build): Use it instead of
3256 c_inhibit_evaluation_warnings.
3257 * typeck.c (maybe_warn_about_useless_cast): Remove
3258 c_inhibit_evaluation_warnings check.
3261 * pt.c (get_template_parm_index): New.
3262 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
3263 (process_template_parm): Allow bare packs in template template
3264 parm template parms.
3265 (coerce_template_parameter_pack): Handle fixed template template
3266 parm packs and fixed packs not at the end of the parm list.
3267 (coerce_template_parms): Handle template parm packs not at the end
3269 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
3272 * pt.c (unify): Ignore alias templates when deducing a template
3278 * call.c (reference_binding): Recurse on user-defined conversion.
3279 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3281 2014-02-25 Jason Merrill <jason@redhat.com>
3284 * call.c (reference_binding): Recurse on user-defined conversion.
3285 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
3287 * call.c (print_conversion_rejection): Handle n_arg of -2.
3288 (build_user_type_conversion_1): Pass it.
3291 * decl2.c (no_linkage_error): Handle C++98 semantics.
3292 (reset_type_linkage): Move from decl.c.
3293 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
3294 (bt_reset_linkage_2, reset_decl_linkage): New.
3295 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
3296 (cp_write_global_declarations): Move condition into no_linkage_error.
3297 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
3298 * semantics.c (expand_or_defer_fn_1): Factor out
3299 tentative_decl_linkage.
3300 * cp-tree.h: Adjust.
3302 * decl2.c (finish_static_data_member_decl): Diagnose static data
3303 member in unnamed class.
3304 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
3307 * class.c (clone_function_decl): Call note_vague_linkage_fn for
3308 defaulted virtual dtor.
3312 * pt.c (get_underlying_template): Fix equivalence calculation.
3314 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
3317 * parser.c (function_being_declared_is_template_p): Return false when
3318 processing a template parameter list.
3319 (cp_parser_parameter_declaration_clause): Don't set
3320 auto_is_implicit_function_template_parm_p when processing a
3321 template parameter list.
3323 * parser.c (synthesize_implicit_template_parm): Inject new template
3324 argument list appropriately when a generic member function
3325 of a class template is declared out-of-line.
3328 * parser.c (cp_parser_direct_declarator): Don't save and
3329 restore num_template_parameter_lists around call to
3330 cp_parser_parameter_declaration_list.
3331 (function_being_declared_is_template_p): New predicate.
3332 (cp_parser_parameter_declaration_list): Use
3333 function_being_declared_is_template_p as predicate for
3334 inspecting current function template parameter list length
3335 rather than num_template_parameter_lists.
3337 2014-02-24 Jason Merrill <jason@redhat.com>
3340 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
3341 DECL_EXPR initialize a non-class iterator.
3344 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
3346 2014-02-21 Jason Merrill <jason@redhat.com>
3349 * parser.c (cp_parser_type_name): Always check dependency.
3350 (cp_parser_type_specifier_seq): Call
3351 cp_parser_parse_and_diagnose_invalid_type_name.
3354 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
3357 * parser.c (cp_parser_default_argument): Clear
3358 current_class_ptr/current_class_ref like tsubst_default_argument.
3361 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
3362 than current_binding_level.
3365 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
3368 * parser.c (cp_parser_enum_specifier): Call
3369 check_for_bare_parameter_packs.
3372 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
3376 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
3377 of the partial instantiation, not the most general template.
3378 (maybe_process_partial_specialization): Reassign everything on
3382 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
3383 (check_explicit_specialization): Don't clone.
3386 * pt.c (coerce_template_parms): Bail if argument packing fails.
3389 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
3390 Don't get confused by a CONSTRUCTOR that already has a type.
3393 * call.c (build_array_conv): Don't crash on VLA.
3396 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
3399 * lambda.c (maybe_resolve_dummy): Don't try to capture this
3400 in declaration context.
3404 * pt.c (unify): Only unify if deducible. Handle 0-length list.
3407 * parser.c (cp_parser_direct_declarator): Don't wrap a
3408 type-dependent expression in a NOP_EXPR.
3411 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
3416 * parser.c (cp_parser_template_argument): Restore dereference.
3417 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
3418 (process_partial_specialization): Handle deref.
3421 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
3425 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
3426 implicit_template_scope upon leaving an out-of-line generic member
3427 function definition.
3429 2014-02-20 Kai Tietz <ktietz@redhat.com>
3432 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
3433 valued type argument as error_mark_node.
3436 * semantics.c (finish_fname): Handle error_mark_node.
3438 2014-02-19 Jason Merrill <jason@redhat.com>
3441 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
3442 spec from template context.
3444 2014-02-19 Jakub Jelinek <jakub@redhat.com>
3447 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
3448 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
3451 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
3453 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3456 * semantics.c (ensure_literal_type_for_constexpr_object): Use
3459 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
3462 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
3463 During error recovery allow_non_constant may be false.
3465 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
3468 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
3469 scope whenever a template parameter list has been started, independent
3470 of whether the function call operator was well-formed or not.
3473 * parser.c (cp_parser_member_declaration): Pop fully implicit template
3474 scope for generic friend declarations as well as for non-friends.
3476 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
3479 * method.c (implicitly_declare_fn): A constructor of a class with
3480 virtual base classes isn't constexpr (7.1.5p4).
3482 2014-02-05 Jan Hubicka <hubicka@ucw.cz
3484 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
3486 2014-02-05 Jakub Jelinek <jakub@redhat.com>
3489 * parser.c (cp_parser_omp_declare_reduction): Save and free
3492 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
3496 * tree.c (handle_init_priority_attribute): Call default_conversion on
3497 the attribute argument.
3499 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
3502 * method.c (synthesized_method_walk): If vbases is non-null but
3503 is_empty is true, likewise don't worry about the virtual bases.
3505 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
3508 * typeck2.c (process_init_constructor_record): Just skip unnamed
3511 2014-01-31 Jason Merrill <jason@redhat.com>
3514 * pt.c (mark_decl_instantiated): Call mark_needed.
3517 * decl2.c (handle_tls_init): Handle null init fn.
3520 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
3522 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
3525 * class.c (build_vfield_ref): Early return error_mark_node if
3526 TYPE_VFIELD (type) is null.
3527 (build_base_path): Check return value of build_vfield_ref.
3529 2014-01-31 Jason Merrill <jason@redhat.com>
3532 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
3533 [ck_list]: Check for error_mark_node.
3534 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
3537 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
3538 during partial ordering.
3540 2014-01-31 Marek Polacek <polacek@redhat.com>
3543 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
3545 2014-01-30 Jason Merrill <jason@redhat.com>
3548 * cp-tree.h (struct saved_scope): Add x_local_specializations.
3549 (local_specializations): New macro.
3550 * pt.c (local_specializations): Remove variable.
3552 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
3555 * parser.c (make_string_pack): Use double_int::from_buffer.
3557 2014-01-30 Marek Polacek <polacek@redhat.com>
3560 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
3562 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
3563 with input_location.
3564 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3567 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3570 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3572 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3575 * pt.c (lookup_template_class_1): Check start_enum return value
3576 for error_mark_node.
3578 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3580 * decl.c (duplicate_decls, typename_hash, typename_compare):
3581 Use TYPE_IDENTIFIER.
3582 * error.c (dump_type): Likewise.
3583 * mangle.c (dump_substitution_candidates): Likewise.
3585 2014-01-30 Jason Merrill <jason@redhat.com>
3588 * decl2.c (attributes_naming_typedef_ok): New.
3589 * cp-tree.h: Declare it.
3590 * decl.c (grokdeclarator): Check it.
3591 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3593 2014-01-29 Jason Merrill <jason@redhat.com>
3596 * call.c (add_builtin_candidate): Catch dependent types.
3599 * pt.c (expand_template_argument_pack): Correct
3600 non_default_args_count calculation.
3603 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3606 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3607 have a friend template in a class template.
3608 * pt.c (tsubst_friend_function): Look through it.
3609 (push_template_decl_real): A friend member template is
3612 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3615 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3618 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3621 * pt.c (instantiate_template_1): Check for error_mark_node the second
3624 2014-01-29 Jason Merrill <jason@redhat.com>
3627 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3628 cdtor_returns_this case.
3631 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3633 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3636 * semantics.c (finish_omp_reduction_clause): Check type for
3639 2014-01-28 Jason Merrill <jason@redhat.com>
3642 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3643 (tsubst_copy): Use it if lookup fails.
3646 * pt.c (tsubst_function_type): Make sure we keep the same function
3650 * semantics.c (build_anon_member_initialization): Stop walking
3651 when we run out of COMPONENT_REFs.
3654 * decl.c (lookup_and_check_tag): Ignore template parameters if
3655 scope == ts_current.
3656 * pt.c (check_template_shadow): Don't complain about the injected
3659 * decl.c (duplicate_decls): Tweak.
3662 * mangle.c (write_unqualified_name): Handle operator auto.
3664 2014-01-27 Jason Merrill <jason@redhat.com>
3668 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3669 list-initialization. A conversion to rvalue ref that involves
3670 an lvalue-rvalue conversion is bad.
3671 (convert_like_real): Give helpful error message.
3674 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3677 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3681 * pt.c (template_parm_to_arg): Call convert_from_reference.
3682 (tsubst_template_arg): Don't strip reference refs.
3685 * call.c (build_aggr_conv): Reject value-initialization of reference.
3689 * call.c (convert_like_real): Give helpful error about excess braces
3690 for ck_rvalue of scalar type.
3693 * call.c (reference_binding): Only elide braces if the single
3694 element is reference-related.
3697 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3701 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3705 * decl.c (compute_array_index_type): Don't call
3706 maybe_constant_value for a non-integral expression.
3708 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3710 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3712 * cp-gimplify.c (cp_genericize): Likewise.
3713 * decl.c (grokfndecl): Likewise.
3714 * parser.c (cp_parser_postfix_expression): Likewise.
3715 (cp_parser_postfix_open_square_expression): Likewise.
3716 (cp_parser_direct_declarator): Likewise.
3717 (is_cilkplus_vector_p): Likewise.
3718 (cp_parser_omp_clause_name): Likewise.
3719 (cp_parser_omp_all_clauses): Likewise.
3720 * pt.c (apply_late_template_attributes): Likewise.
3721 * typeck.c (cp_build_array_ref): Likewise.
3722 (cp_build_compound_expr): Likewise.
3723 (check_return_expr): Likewise.
3725 2014-01-24 Jason Merrill <jason@redhat.com>
3728 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3733 * typeck2.c (process_init_constructor_array): Don't create
3736 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3738 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3739 handling for RANGE_ARRAY case.
3741 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3744 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3746 2014-01-23 Marek Polacek <polacek@redhat.com>
3749 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3751 2014-01-23 Marek Polacek <polacek@redhat.com>
3754 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3757 2014-01-23 Jason Merrill <jason@redhat.com>
3760 * cp-tree.h (struct language_function): Add infinite_loop and
3762 (current_function_infinite_loop): New.
3763 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3764 (break_maybe_infinite_loop): New.
3765 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3766 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3767 (begin_range_for_stmt): Use them.
3768 * decl.c (finish_function): Don't warn about missing return
3769 if current_function_infinite_loop.
3770 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3771 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3773 * call.c (build_op_delete_call): Use make_tree_vector and
3774 release_tree_vector.
3776 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3779 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3780 nested_name_specifier.
3782 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3784 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3785 see if there is an attribute after function decl. If so, then
3787 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3788 enabled function late parsing.
3789 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3790 attribute for a SIMD-enabled function.
3791 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3792 the function is used by SIMD-enabled function (indicated by NULL
3793 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3794 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3795 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3796 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3797 vectorlength clause. Added a new bool parameter to differentiate
3799 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3800 (is_cilkplus_vector_p): Likewise.
3801 (cp_parser_late_parsing_elem_fn_info): Likewise.
3802 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3803 and "vectorlength" clauses when Cilk Plus is enabled.
3804 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3805 and emit a sorry message when step size is a parameter.
3806 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3807 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3809 * pt.c (apply_late_template_attributes): Likewise.
3811 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3814 * semantics.c (finish_omp_reduction_clause): Reject
3815 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3817 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3820 * parser.c (cp_parser_class_head): Push the class before parsing
3821 the base-clause, pop after it.
3823 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3825 * decl2.c (cpp_check): Revert prototype change.
3827 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3831 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3834 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3837 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3838 only when errorcount == 0.
3840 2014-01-17 Marek Polacek <polacek@redhat.com>
3843 * cvt.c (ocp_convert): Don't segfault on non-existing
3844 ENUM_UNDERLYING_TYPE.
3846 2014-01-16 Jason Merrill <jason@redhat.com>
3849 * tree.c (bot_manip): Update the location of builtin_LINE and
3852 2014-01-14 Jason Merrill <jason@redhat.com>
3855 * typeck2.c (massage_init_elt): New.
3856 (process_init_constructor_record)
3857 (process_init_constructor_union): Use it.
3858 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3859 (split_nonconstant_init_1): Handle it.
3860 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3862 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3865 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3866 and replaced an existing if-statement with else-if statement.
3867 Changed an existing error message wording to match the one from the C
3870 2014-01-08 Jason Merrill <jason@redhat.com>
3873 * class.c (abi_tag_data): Add tags field.
3874 (check_abi_tags): Initialize it.
3875 (find_abi_tags_r): Support collecting missing tags.
3876 (mark_type_abi_tags): Don't look at template args.
3877 (inherit_targ_abi_tags): New.
3878 (check_bases_and_members): Use it.
3879 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3880 * mangle.c (write_abi_tags): Check it.
3882 2014-01-07 Jason Merrill <jason@redhat.com>
3885 * pt.c (num_innermost_template_parms): New.
3886 (get_underlying_template): Use it.
3889 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3891 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3893 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3894 the letter of 20.11.6 about Base and Derived naming the same
3895 class type modulo cv-qualifiers.
3897 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3900 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3901 function as unimplemented for generic lambdas with varargs.
3904 * parser.c (cp_parser_template_parameter): Early out with
3905 error_mark_node if parameter declaration was not parsed.
3908 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3909 auto_is_implicit_function_template_parm_p around lambda body.
3912 * parser.c (cp_parser_init_declarator): Undo fully implicit
3913 template parameter list when declarator is not a function.
3915 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3918 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3920 2014-01-03 Tobias Burnus <burnus@net-b.de>
3923 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3925 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3929 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3930 as include_std to perform_koenig_lookup.
3931 (cp_parser_postfix_expression): Adjust.
3932 * pt.c (tsubst_copy_and_build): Likewise.
3933 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3934 (omp_reduction_lookup): Adjust.
3935 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3936 (lookup_arg_dependent): Likewise.
3937 (lookup_function_nonclass): Adjust.
3938 * name-lookup.h: Adjust declaration.
3939 * cp-tree.h: Likewise.
3941 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3944 * parser.c (cp_parser_userdef_numeric_literal): Mention
3945 -fext-numeric-literals in the message.
3947 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3950 * call.c (build_conditional_expr_1): Check the return value of
3953 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3955 * call.c (convert_like_real): Check complain.
3957 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3960 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3963 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3965 Update copyright years
3967 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3969 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3970 the standard form for the copyright notice.
3972 Copyright (C) 2014 Free Software Foundation, Inc.
3974 Copying and distribution of this file, with or without modification,
3975 are permitted in any medium without royalty provided the copyright
3976 notice and this notice are preserved.