1 2014-11-10 Andi Kleen <ak@linux.intel.com>
3 * semantics.c (finish_goto_stmt): Call check_no_cilk.
4 (finish_while_stmt_cond): Dito.
5 (finish_do_stmt): Dito.
6 (finish_for_cond): Dito.
7 (finish_switch_cond): Dito.
9 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
11 * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
12 OPT_Wshift_count_overflow in the warnings.
14 2014-11-09 Jason Merrill <jason@redhat.com>
17 * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
18 same scalar type is an rvalue.
21 * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
23 2014-11-07 Jason Merrill <jason@redhat.com>
26 * pt.c (dependent_alias_template_spec_p): New.
27 (dependent_type_p_r): Handle dependent alias template specialization.
28 (template_args_equal): A dependent alias template specializations
29 is not equal to its underlying type as a template argument.
30 * tree.c (strip_typedefs): Don't strip a dependent alias
33 * parser.c (cp_parser_unqualified_id): Handle __func__ here.
34 (cp_parser_primary_expression): Not here.
36 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
39 * decl.c (grokdeclarator): Fix __complex meaning __complex double.
41 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
43 * constexpr.c: Remove redundant enum from machine_mode.
45 2014-10-28 Jason Merrill <jason@redhat.com>
47 * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
49 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
51 * call.c: Adjust include files.
62 * vtable-class-hierarchy.c: Ditto.
64 2014-10-24 Jason Merrill <jason@redhat.com>
66 Implement N3653 (Member initializers and aggregates) and fix
67 references to 'this' in constexpr constructors.
68 * class.c (check_field_decls): In C++14 an NSDMI does not make the
70 * constexpr.c (struct constexpr_ctx): New.
71 (cxx_bind_parameters_in_call): Handle 'this'.
72 (cxx_eval_call_expression): Create new constexpr_ctx.
73 (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
74 (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
75 (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
76 (cxx_eval_vec_init_1): Likewise.
77 (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
78 [TARGET_EXPR]: Build new constexpr_ctx.
79 [PLACEHOLDER_EXPR]: New.
80 (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
82 (is_sub_constant_expr): Build new constexpr_ctx.
83 (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
85 * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
86 * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
87 * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
88 * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
89 * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
90 (build_ctor_subob_ref, replace_placeholders): New.
91 * typeck2.c (store_init_value): Use replace_placeholders.
92 (process_init_constructor_record): Make zero-init before NSDMI
95 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
97 * cp-gimplify.c: Adjust include files.
99 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
102 * cp-objcp-common.c: Do not include new.
103 (cxx_initialize_diagnostics): Move from here to ...
104 * error.c (cxx_initialize_diagnostics): : ... here. Move
105 diagnostics initialization here from init_error.
106 (cxx_pp): Use a real pointer not a macro.
107 (init_error): Just initialize cxx_pp.
108 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
109 not set maximum line length.
111 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
114 * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
116 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
118 * parser.c (cp_parser_unary_expression): Add default arguments.
119 (cp_parser_cast_expression, cp_parser_sizeof_operand,
120 cp_parser_omp_atomic): Adjust.
122 2014-10-20 Jason Merrill <jason@redhat.com>
125 * lambda.c (current_nonlambda_function): New.
126 * semantics.c (finish_this_expr): Use it.
127 * cp-tree.h: Declare it.
129 2014-10-17 Alan Modra <amodra@gmail.com>
132 * decl.c (merge_decls): Don't merge section name, comdat group or
133 tls model to newdecl symtab node, instead merge to olddecl.
134 Override existing olddecl section name. Set tls_model for all
135 thread-local vars, not just OMP thread-private ones. Remove
138 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
140 * cp-tree.h: Adjust include files.
142 2014-10-15 Jason Merrill <jason@redhat.com>
145 * pt.c (lookup_template_variable): Call coerce_template_parms.
147 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
149 * semantics.c (is_instantiation_of_constexpr, literal_type_p,
150 ensure_literal_type_for_constexpr_object,
151 constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
152 retrieve_constexpr_fundef, is_valid_constexpr_fn,
153 build_anon_member_initialization, build_data_member_initialization,
154 check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
155 check_constexpr_ctor_body, sort_constexpr_mem_initializers,
156 build_constexpr_constructor_member_initializers, constexpr_fn_retval,
157 massage_constexpr_body, cx_check_missing_mem_inits,
158 register_constexpr_fundef, explain_invalid_constexpr_fn,
159 constexpr_call_hasher::hash, constexpr_call_hasher::equal,
160 maybe_initialize_constexpr_call_table, get_function_named_in_call,
161 get_nth_callarg, lookup_parameter_binding,
162 cxx_eval_builtin_function_call, adjust_temp_type,
163 cxx_bind_parameters_in_call, push_cx_call_context,
164 pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
165 reduced_constant_expression_p, verify_constant,
166 cxx_eval_unary_expression, cxx_eval_binary_expression,
167 cxx_eval_conditional_expression, cxx_eval_array_reference,
168 cxx_eval_component_reference, cxx_eval_bit_field_ref,
169 cxx_eval_logical_expression, base_field_constructor_elt,
170 cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
171 cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
172 cxx_eval_trinary_expression, var_in_constexpr_fn,
173 cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
174 is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
175 maybe_constant_init, potential_constant_expression_1,
176 potential_constant_expression, potential_rvalue_constant_expression,
177 require_potential_constant_expression,
178 require_potential_rvalue_constant_expression): Moved definitions...
179 * constexpr.c: ... here, new file.
180 * Make-lang.in: Update.
181 * config-lang.in: Likewise.
183 2014-10-14 Jason Merrill <jason@redhat.com>
186 * parser.c (struct saved_token_sentinel): New.
187 (cp_parser_statement): Use it.
188 (cp_parser_start_tentative_firewall): New.
189 (cp_parser_end_tentative_firewall): New.
190 (cp_parser_lambda_expression): Use them.
191 (cp_parser_statement_expr): New.
192 (cp_parser_primary_expression): Use it.
194 2014-10-14 DJ Delorie <dj@redhat.com>
196 * typeck.c (cp_common_type): Check for all __intN types, not just
198 * decl.c (grokdeclarator): Likewise.
199 * rtti.c (emit_support_tinfos): Check for all __intN types, not just
201 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
202 for all __intN types, not just __int128.
203 (cp_parser_simple_type_specifier): Likewise.
204 * mangle.c (integer_type_codes): Remove int128-specific codes.
205 * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
206 __intN was specified.
207 * lex.c (init_reswords): Reserve all __intN keywords.
209 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
211 * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
213 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
215 * mangle.c (mangle_conv_op_name_for_type): Cast elements to
217 (print_template_statistics): Cast size and elements to long.
219 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
221 * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
222 pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
225 2014-10-10 Jason Merrill <jason@redhat.com>
228 * class.c (build_base_path): Preserve rvalueness.
229 * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
230 * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
233 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
235 * method.c (implicitly_declare_fn): Handle deleted lambda default
236 ctor and copy assop here.
237 * class.c (check_bases_and_members): Not here.
238 (add_implicitly_declared_members): And don't set
239 CLASSTYPE_LAZY_MOVE_ASSIGN.
241 * semantics.c (finish_id_expression): Check for error_mark_node.
243 2014-10-09 Jason Merrill <jason@redhat.com>
246 * semantics.c (outer_var_p): Non-static.
247 (process_outer_var_ref): Split out from finish_id_expression.
248 * pt.c (tsubst_copy_and_build): Call them.
249 * cp-tree.h: Declare them.
251 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
253 * semantics.c (check_constexpr_ctor_body_1): New.
254 (check_constexpr_ctor_body): Use it; add bool parameter.
255 (build_data_member_initialization): Handle BIND_EXPR and
256 USING_STMT in the main conditional.
257 (build_constexpr_constructor_member_initializers): Do not
258 handle BIND_EXPR here.
259 (constexpr_fn_retval): Handle BIND_EXPR in the switch.
260 (massage_constexpr_body): Don't do it here.
261 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
262 Adjust check_constexpr_ctor_body call.
263 (cp_parser_compound_statement): Do not pedwarn for compound-statement
264 in constexpr function in C++14 mode.
265 * cp-tree.h (check_constexpr_ctor_body): Update declaration.
267 2014-10-09 Jason Merrill <jason@redhat.com>
270 * parser.c (cp_parser_class_head): push_template_decl for members
274 * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
275 (iterative_hash_template_arg): Likewise.
278 * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
279 * semantics.c (force_paren_expr): And set it.
280 * typeck.c (check_return_expr): And handle it.
282 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
284 * decl.c (grokdeclarator): constexpr only implies const in C++11.
286 2014-10-08 Jason Merrill <jason@redhat.com>
289 * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
292 * tree.c (build_cplus_array_type): Look for a type with no
293 typedef-name or attributes.
295 * call.c (call_copy_ctor): New.
296 (build_over_call): Use it to avoid infinite recursion on invalid code.
298 2014-10-07 Jason Merrill <jason@redhat.com>
300 * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
302 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
304 * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
306 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
309 * semantics.c (check_constexpr_bind_expr_vars): New.
310 (check_constexpr_ctor_body, massage_constexpr_body): Use it.
311 (build_constexpr_constructor_member_initializers): Handle
312 BIND_EXPR in the main conditional.
314 2014-10-02 Mark Wielaard <mjw@redhat.com>
317 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
318 (cp_function_decl_deleted_p): New prototype.
319 * cp-objcp-common.c (cp_function_deleted_p): New function.
321 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
326 * typeck.c (cp_build_binary_op): save_expr after convert to save
327 redundant operations.
328 [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
329 (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
331 2014-10-03 Jason Merrill <jason@redhat.com>
333 * decl.c (start_decl): Complain about static/thread_local vars
334 in constexpr function.
335 (check_for_uninitialized_const_var): Also uninitialized vars.
336 * parser.c (cp_parser_jump_statement): And gotos.
337 (cp_parser_asm_operand_list): And asm.
338 (cp_parser_try_block): And try.
339 * semantics.c (ensure_literal_type_for_constexpr_object): And
342 * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
343 (var_in_constexpr_fn): New.
344 (cxx_eval_constant_expression): Look into DECL_INITIAL.
345 (potential_constant_expression_1): Allow constexpr-local vars.
348 * tree.c (strip_typedefs): Handle TREE_LIST.
350 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
352 * parser.c (cp_parser_assignment_expression,
353 cp_parser_constant_expression): Add default arguments.
354 (cp_parser_primary_expression,
355 cp_parser_postfix_open_square_expression,
356 cp_parser_parenthesized_expression_list,
357 cp_parser_question_colon_clause,
358 cp_parser_expression, cp_parser_constant_expression,
359 cp_parser_label_for_labeled_statement, cp_parser_static_assert,
360 cp_parser_template_argument, cp_parser_enumerator_definition,
361 cp_parser_member_declaration, cp_parser_constant_initializer,
362 cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
363 cp_parser_std_attribute_spec, cp_parser_objc_message_args,
364 cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
365 cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
366 cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
367 cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
368 cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
370 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
373 * cp-tree.h (struct saved_scope): Add noexcept_operand.
374 (cp_noexcept_operand): Define.
375 * call.c (build_over_call): Use it.
376 * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
377 * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
379 2014-10-01 Jason Merrill <jason@redhat.com>
382 * method.c (constructible_expr): Handle value-init of non-class.
383 * parser.c (cp_parser_trait_expr): Allow pack expansion.
384 * pt.c (tsubst_copy_and_build): Handle pack expansion.
387 * class.c (type_has_non_user_provided_default_constructor): Rename
388 from type_has_user_provided_default_constructor, reverse sense.
389 (default_init_uninitialized_part, explain_non_literal_class): Adjust.
390 (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
391 * call.c (build_new_method_call_1): Adjust.
393 * decl.c (grok_special_member_properties): Don't set
394 TYPE_HAS_COMPLEX_DFLT.
395 * init.c (build_value_init_noctor): Don't use
396 type_has_user_provided_default_constructor.
398 2014-09-30 Jason Merrill <jason@redhat.com>
400 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
401 CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
402 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
403 * parser.c (cp_parser_primary_expression): Likewise.
404 (cp_parser_trait_expr): Likewise. Handle variadic trait.
405 * semantics.c (trait_expr_value): Likewise.
406 (finish_trait_expr): Likewise.
407 (check_trait_type): Handle variadic trait. Return bool.
408 * method.c (build_stub_object): Add rvalue reference here.
409 (locate_fn_flags): Not here.
410 (check_nontriv, assignable_expr, constructible_expr): New.
411 (is_trivially_xible): New.
413 * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
414 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
415 * parser.c (cp_parser_primary_expression): Likewise.
416 (cp_parser_trait_expr): Likewise.
417 * semantics.c (trait_expr_value): Likewise.
418 (finish_trait_expr): Likewise.
420 * method.c (build_stub_object): Use CONVERT_EXPR.
421 * tree.c (build_dummy_object): Likewise.
422 (is_dummy_object): Adjust.
424 * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
425 * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
426 * semantics.c (trait_expr_value): Likewise.
427 (finish_trait_expr): Likewise.
428 * parser.c (cp_parser_primary_expression): Likewise.
429 (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
431 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
434 * error.c (print_instantiation_context): Delete.
435 * typeck2.c (build_x_arrow): Record location when pushing
436 template instantiation.
437 * pt.c (push_tinst_level): Make it a wrapper around ...
438 (push_tinst_level_loc): ... this. New function. Make excessive
439 template instantiation depth a fatal error. Record location. Use
441 (instantiate_pending_templates): Make excessive
442 template instantiation depth a fatal error.
443 (problematic_instantiation_changed): Use bool as return type.
444 * cp-tree.h (print_instantiation_context): Delete.
445 (push_tinst_level): Update declaration.
446 (problematic_instantiation_changed): Likewise.
447 (push_tinst_level_loc): New.
449 2014-09-29 Richard Biener <rguenther@suse.de>
451 * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
454 2014-09-26 Jason Merrill <jason@redhat.com>
456 * mangle.c (find_substitution): Use write_abi_tags.
458 2014-09-25 Marek Polacek <polacek@redhat.com>
461 * class.c (warn_hidden): Check for FUNCTION_DECL.
463 2014-09-25 Jakub Jelinek <jakub@redhat.com>
466 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
467 on low_bound and length.
469 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
471 * class.c, decl.c, optimize.c: Rename all instances of
472 DECL_ABSTRACT to DECL_ABSTRACT_P.
474 2014-09-24 Marek Polacek <polacek@redhat.com>
478 * semantics.c (finish_switch_cond): Call unlowered_expr_type.
479 * tree.c (bot_manip): Add default case.
480 * parser.c (cp_parser_primary_expression): Cast the controlling
481 expression of a switch to an int.
482 (cp_parser_unqualified_id): Likewise.
484 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
487 * parser.c (cp_parser_skip_to_closing_square_bracket,
488 cp_parser_array_designator_p): New.
489 (cp_parser_initializer_list): Use the latter.
491 2014-09-22 Jason Merrill <jason@redhat.com>
493 * semantics.c (finish_non_static_data_member): In diagnostic, give
494 error at point of use and note at point of declaration.
499 * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
502 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
505 * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
507 2014-09-22 Jason Merrill <jason@redhat.com>
509 * decl.c (poplevel): Don't warn about unused vars in template scope.
510 * error.c (dump_decl): Handle variable templates.
512 2014-09-20 Jason Merrill <jason@redhat.com>
515 * decl.c (begin_destructor_body): Only clobber the as-base part of
518 2014-09-19 Jason Merrill <jason@redhat.com>
521 * mangle.c (write_expression): Use unresolved-name mangling for
525 * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
526 after pulling out an element from a CONSTRUCTOR.
528 2014-09-18 Jakub Jelinek <jakub@redhat.com>
531 * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
532 on type of type dependent expressions, and don't call it if
533 handle_omp_array_sections has kept TREE_LIST because something
535 * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
536 Use keep_next_level, begin_omp_structured_block and
537 finish_omp_structured_block instead of push_stmt_list and
540 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
543 * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
544 for final class types.
546 2014-09-15 Jason Merrill <jason@redhat.com>
548 * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
549 necessary. Call inherit_targ_abi_tags here.
550 * class.c (check_bases_and_members): Not here.
551 (inherit_targ_abi_tags): Check CLASS_TYPE_P.
552 * cp-tree.h: Declare inherit_targ_abi_tags.
554 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
556 Do not diagnose lambda default arguments in c++14 modes.
557 * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
560 2014-09-15 Jakub Jelinek <jakub@redhat.com>
562 * Make-lang.in (check_g++_parallelize): Change to just an upper bound
565 2014-09-13 Marek Polacek <polacek@redhat.com>
568 * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
569 location of a call expression.
571 2014-09-11 Jason Merrill <jason@redhat.com>
574 * decl.c (start_decl): Handle specialization of member variable
576 * pt.c (check_explicit_specialization): Adjust error.
578 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
581 * typeck2.c (process_init_constructor_record): Do not warn about
582 missing field initializer if EMPTY_CONSTRUCTOR_P (init).
584 2014-09-11 Jason Merrill <jason@redhat.com>
587 * pt.c (tsubst_pack_expansion): Simplify substitution into T....
588 (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
590 2014-09-10 Jason Merrill <jason@redhat.com>
593 * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
594 (duplicate_decls, start_decl): Likewise.
595 * pt.c (check_explicit_specialization): Likewise.
596 (push_template_decl_real): Or static templates.
598 2014-09-08 Jason Merrill <jason@redhat.com>
600 * typeck.c (build_class_member_access_expr): Move
601 -Winvalid-offsetof code...
602 * semantics.c (finish_offsetof): ...here.
603 * parser.c (cp_parser_builtin_offsetof): Remember the location of
605 * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
608 * pt.c (instantiate_decl): Handle recursive instantiation of
611 2014-09-05 Jason Merrill <jason@redhat.com>
614 * semantics.c (potential_constant_expression_1): Handle un-folded
615 pointer to member constants.
617 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
620 * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
621 newdecl, not olddecl.
623 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
626 * class.c (check_field_decls): A class of literal type cannot have
627 volatile non-static data members and base classes.
628 (explain_non_literal_class): Update.
630 2014-09-02 Jakub Jelinek <jakub@redhat.com>
631 Balaji V. Iyer <balaji.v.iyer@intel.com>
632 Igor Zamyatin <igor.zamyatin@intel.com>
634 * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
636 * parser.c (cp_parser_cilk_for): New function.
637 (cp_parser_cilk_grainsize): Likewise.
638 (cp_parser_statement): Added RID_CILK_FOR case.
639 (cp_parser_omp_for_cond): Added CILK_FOR check.
640 (cp_parser_omp_for_loop_init): Change function argument to accept
641 tree_code instead just a bool flag; change the check to use that
642 tree_code; check for initialization declaration in case of Cilk_for.
643 (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
644 changed call to cp_parser_omp_for_loop_init according new arguments'
646 (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
647 * pt.c (tsubst_expr): Added CILK_FOR case.
648 * semantics.c: Include convert.h.
649 (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
650 case; added OMP_CLAUSE__CILK_FOR_COUNT_.
651 (handle_omp_for_class_iterator): New argument lastp and its usage;
653 (finish_omp_for): Changed call to handle_omp_for_class_iterator
654 according new arguments' list; in case of Cilk_for save very first
655 decl and create empty stmt_list block; use block to build correct
658 2014-08-31 Jason Merrill <jason@redhat.com>
661 * optimize.c (cdtor_comdat_group): Just look at the
662 DECL_ASSEMBLER_NAME of the 'tors.
664 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
667 * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
668 result of cxx_eval_constant_expression.
670 2014-08-26 Jason Merrill <jason@redhat.com>
673 * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
674 (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
675 * semantics.c (finish_id_expression): Don't call TLS wrapper in a
678 2014-08-25 Jason Merrill <jason@redhat.com>
680 * pt.c (check_explicit_specialization): Don't complain about
681 non-template variable.
682 (template_for_substitution): Allow variable templates.
683 (check_template_variable): Fix logic for member var template.
684 * decl.c (start_decl): Don't complain about extra template header
687 * decl.c (start_decl): Look through member variable template.
688 * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
689 * decl2.c (grokfield): Set DECL_CONTEXT earlier on
692 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
695 * cp-tree.h (TFF_POINTER): Add.
696 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
698 * error.c (dump_type_suffix): Actually print the const and noreturn
699 attribute when appropriate.
701 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
703 * decl.c (compute_array_index_type, grokdeclarator,
704 undeduced_auto_decl): Change from cxx1y to cxx14.
705 *lambda.c(add_capture()): Change error message from C++1y to C++14.
706 * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
707 cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
708 cp_parser_decltype, cp_parser_conversion_type_id,
709 cp_parser_simple_type_specifier, cp_parser_type_id_1,
710 cp_parser_template_type_arg, cp_parser_std_attribute,
711 cp_parser_template_declaration_after_export): Ditto.
712 * pt.c (tsubst): Ditto.
713 * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
714 * tree.c: Change comment.
715 * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
716 cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
718 2014-08-23 Jason Merrill <jason@redhat.com>
720 Allow non-constexpr variable templates.
721 * decl2.c (note_variable_template_instantiation): New.
722 * cp-tree.h: Declare it.
723 * pt.c (instantiate_decl): Call it.
724 (push_template_decl_real): Allow non-constexpr variable templates.
725 * semantics.c (finish_id_expression): Mark the variable template
726 instantiation as used.
727 * mangle.c (write_mangled_name): Variable template instantiations
729 * parser.c (cp_parser_init_declarator): Complain about
730 non-function implicit templates.
732 2014-08-22 Marek Polacek <polacek@redhat.com>
735 * parser.c (cp_parser_binary_expression): Check each LHS if it's
736 preceded with logical not. Adjust call to
737 warn_logical_not_parentheses.
739 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
742 * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
743 declaration shadows a function declaration, unless the former
744 declares a function, pointer to function or pointer to member
745 function, because this is a common and valid case in real-world
747 * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
750 2014-08-22 Jason Merrill <jason@redhat.com>
753 * class.c (outermost_open_class): Fix logic.
754 * decl.c (complete_vars): Fix logic.
756 2014-08-22 Jason Merrill <jason@redhat.com>
759 * class.c (outermost_open_class): New.
760 * cp-tree.h: Declare it.
761 * decl.c (maybe_register_incomplete_var): Use it.
762 (complete_vars): Handle any constant variable.
763 * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
765 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
768 * cp-array-notation.c (build_array_notation_ref): Added correct
769 handling of case with incorrect array.
771 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
774 * error.c (cp_diagnostic_finalizer): Delete.
775 (init_error): Do not set diagnostic_finalizer here.
777 2014-08-19 Marek Polacek <polacek@redhat.com>
780 * call.c (build_new_op_1): Remember the type of arguments for
781 a comparison. If either operand of a comparison is a boolean
782 expression, call maybe_warn_bool_compare.
784 2014-08-19 Jason Merrill <jason@redhat.com>
786 PR tree-optimization/62091
787 * decl2.c (decl_needed_p): Return true for virtual functions when
792 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
795 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
797 * class.c (contains_empty_class_p): Remove.
799 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
801 * parser.c (cp_parser_expression): Add default arguments.
802 (cp_parser_primary_expression, cp_parser_postfix_expression,
803 cp_parser_array_notation, cp_parser_postfix_open_square_expression,
804 cp_parser_unary_expression, cp_parser_direct_new_declarator,
805 cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
806 cp_parser_lambda_body, cp_parser_expression_statement,
807 cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
808 cp_parser_iteration_statement, cp_parser_jump_statement,
809 cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
810 cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
811 cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
812 cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
813 cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
814 cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
815 cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
816 cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
817 cp_parser_transaction_expression): Adjust.
819 2014-08-15 Jason Merrill <jason@redhat.com>
822 * pt.c (lookup_template_class_1): Revert recent change.
823 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
826 * pt.c (instantiate_class_template_1): Ignore lambda on
828 (push_template_decl_real): A lambda is not primary.
829 (lookup_template_class_1): Don't look for a lambda partial
831 * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
832 currently in a function and the lambda living in a function.
833 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
835 2014-08-15 Richard Biener <rguenther@suse.de>
836 Jason Merrill <jason@redhat.com>
839 * tree.c (build_min_array_type, set_array_type_canon): Split out...
840 (build_cplus_array_type): ...from here. Only call build_array_type
843 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
847 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
851 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
852 cv-qualifiers of function types.
854 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
856 * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
858 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
860 * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
861 cp_build_array_ref, cp_build_function_call_vec): When a
862 pedwarn is suppressed under SFINAE, return error_mark_node.
864 * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
865 tf_warning_or_error, where complain is a bool, glitch.
867 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
870 * decl.c (grokdeclarator): Move the check for friend initializers..
871 * decl2.c (grokfield) ..here. Postpone early return for friends
872 until after the initializer check.
874 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
877 * pt.c (coerce_template_parms): Improve error message vs default
880 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
882 * parser.c (cp_parser_init_declarator): Remove redundant check of
883 decl_specifiers->type.
885 2014-08-13 Jason Merrill <jason@redhat.com>
887 * call.c (build_x_va_arg): Support passing non-POD through ....
888 (convert_arg_to_ellipsis): Likewise.
890 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
892 * pt.c (lookup_template_variable): Make dependent variable templates
895 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
897 * parser.c (cp_parser_elaborated_type_specifier): Handle
898 specially cp_parser_template_id returning a BASELINK.
900 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
902 * parser.c (cp_parser_diagnose_invalid_type_name,
903 cp_parser_make_typename_type): Remove scope parameter.
904 (cp_parser_parse_and_diagnose_invalid_type_name,
905 cp_parser_elaborated_type_specifier): Adjust calls.
907 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
909 Reject virt-specifiers on friends and member templates
910 * friend.c (do_friend): Diagnose virt-specifiers.
911 * pt.c (push_template_decl_real): Diagnose virt-specifiers.
913 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
915 * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
916 return type to bool; in C++11 for constants give errors, not pedwarns.
917 * cp-tree.h (check_narrowing): Adjust declaration.
918 * call.c (convert_like_real): Update calls.
919 * semantics.c (finish_compound_literal): Likewise.
921 2014-08-08 Jason Merrill <jason@redhat.com>
923 * pt.c (lookup_template_class_1): Copy abi_tag.
925 2014-08-08 Kai Tietz <ktietz@redhat.com>
927 * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
928 that we operate on a true inline.
930 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
932 * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
933 optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
935 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
938 * decl.c (build_enumerator): Handle class types with conversion
939 operators via perform_implicit_conversion_flags and
940 build_expr_type_conversion.
942 * cvt.c (build_expr_type_conversion): Replace pair of errors
945 2014-08-07 Jason Merrill <jason@redhat.com>
948 * parser.c (c_parse_file): Change sorry to fatal_error.
951 * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
953 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
955 * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
957 2014-08-06 Jason Merrill <jason@redhat.com>
959 * init.c (build_vec_init): Fix constant initialization of
961 (build_value_init_noctor): Call maybe_constant_init.
962 * semantics.c (maybe_constant_init): See through EXPR_STMT and
966 * init.c (build_vec_init): Reorganize earlier change a bit.
969 * init.c (build_vec_init): Leave atype an ARRAY_TYPE
970 if we're just returning an INIT_EXPR.
972 2014-08-06 Jason Merrill <jason@redhat.com>
973 Braden Obrzut <admin@maniacsvault.net>
975 * pt.c (check_explicit_specialization): Don't test
976 DECL_DECLARED_INLINE_P for a variable template.
978 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
981 * typeck.c (cp_build_binary_op): Extend to more cases the
984 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
986 Implement constexpr variable templates
987 * decl.c (grokvardecl): Handle specializations of variable templates.
988 (grokdeclarator): Handle variable template id expressions and NULL_TREE
989 return from grokvardecl.
990 * decl2.c (check_member_template): Allow declaration of template member
992 * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
994 * pt.c (check_template_variable): Accept variable temploids at
996 (push_template_decl_real): The current instantiation of a template
998 (determine_specialization): Accept variable templates.
999 (check_explicit_specialization): Handle and check for malformed
1000 variable template specializations.
1001 (lookup_template_variable): New.
1002 (tsubst_decl): Handle variable template specializations.
1003 (do_decl_instantiation): Handle template variables.
1004 (instantiate_decl): Handle template variables.
1005 * semantics.c (finish_template_variable): New.
1006 (finish_id_expression): Instantiate variable templates.
1007 * cp-tree.h (variable_template_p): New.
1009 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
1012 * decl.c (check_redeclaration_no_default_args): New.
1013 (duplicate_decls): Use it, handle default arguments
1014 in redeclarations of function templates.
1016 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1018 * optimize.c, semantics.c: Use hash_map instead of pointer_map.
1020 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1022 * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
1023 method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
1024 instead of pointer_set.
1026 2014-08-01 Jason Merrill <jason@redhat.com>
1029 * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
1030 init-list for trailing elements.
1031 * typeck2.c (process_init_constructor_array): Likewise.
1033 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1036 * decl.c (duplicate_decls): Handle static member functions too.
1038 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1040 * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
1043 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1046 * parser.c (cp_parser_array_notation): Added check for array_type.
1048 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1051 * cp-array-notation.c (expand_array_notation_exprs): Handling of
1052 DECL_EXPR improved. Changed handling for INIT_EXPR.
1054 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
1056 * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
1058 2014-08-01 Jakub Jelinek <jakub@redhat.com>
1060 * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
1061 -fsanitize=alignment call ubsan_maybe_instrument_reference
1062 for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
1063 for calls to member functions.
1065 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
1068 * typeck.c (maybe_warn_about_returning_address_of_local): Return
1069 whether it is returning the address of a local variable.
1070 (check_return_expr): Return 0 instead of the address of a local
1073 2014-07-30 Jason Merrill <jason@redhat.com>
1077 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
1079 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
1082 * pt.c (unify_arity): Add boolean parameter.
1083 (unify_too_few_arguments): Likewise.
1084 (type_unification_real): Diagnose correctly insufficient
1085 arguments in the presence of trailing variadic parameters;
1086 deducing multiple trailing packs as empty is fine.
1088 2014-07-30 Jason Merrill <jason@redhat.com>
1093 * decl2.c (mark_all_virtuals): New variable.
1094 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1095 (cp_write_global_declarations): Set it and give helpful diagnostic
1096 if it introduces errors.
1097 * class.c (finish_struct_1): Check it.
1101 * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
1102 (check_explicit_specialization): Clear it on specializations.
1103 * decl.c (duplicate_decls, start_decl): Likewise.
1104 (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
1105 * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
1106 linkage after setting the appropriate flags.
1107 * tree.c (decl_linkage): Don't check DECL_COMDAT.
1108 * decl2.c (mark_needed): Mark clones.
1109 (import_export_decl): Not here.
1111 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
1113 Implement N4051 - Allow typename in a template template parameter
1114 * parser.c (cp_parser_type_parameter_key): New funtion;
1115 (cp_parser_token_is_type_parameter_key): Ditto;
1116 (cp_parser_type_parameter): Look for type-parameter-key for all versions
1117 but pedwarn for less than cxx1z.
1119 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1122 * call.c (standard_conversion): Use resolve_nondeduced_context
1123 for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
1125 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1128 * parser.c (cp_parser_tokens_start_cast_expression): Return -1
1131 2014-07-15 Jason Merrill <jason@redhat.com>
1134 * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
1138 * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
1139 * class.c (finish_struct): Reject invalid definition of
1140 std::initializer_list.
1142 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
1144 * call.c (convert_like_real): Call print_z_candidate and inform only
1145 if permerror returns true.
1147 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1149 * class.c (build_clone): Do not clear assembler names of
1151 * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
1152 * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
1153 as a special case return sizeof (struct tree_decl_non_common)
1155 (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
1156 initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
1157 * cp/cp-tree.h (tree_template_decl): New structure.
1158 (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
1159 (union cp_lang_tree_node): Add template_decl.
1160 (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
1162 2014-07-14 Jason Merrill <jason@redhat.com>
1166 * pt.c (instantiate_decl): Don't check defer_ok for local class
1169 2014-07-14 Jakub Jelinek <jakub@redhat.com>
1172 * cp-tree.h (LITERAL_ZERO_P): Define.
1173 * parser.c (cp_parser_parenthesized_expression_list): Add
1174 want_literal_zero_p argument, if true, for literal zeros
1175 insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
1176 (cp_parser_postfix_expression): Adjust
1177 cp_parser_parenthesized_expression_list caller, handle
1178 -Wmemset-transposed-args.
1179 (literal_zeros): New variable.
1181 2014-07-13 Jason Merrill <jason@redhat.com>
1184 * semantics.c (is_instantiation_of_constexpr): Return true for
1185 defaulted functions, too.
1186 (explain_invalid_constexpr_fn): Only use
1187 explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
1188 * method.c (explain_implicit_non_constexpr): Pass
1189 DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
1192 * decl.c (check_initializer): Don't finish_compound_literal
1193 on erroneous constexpr init.
1196 * tree.c (bot_replace): Only replace a dummy 'this' parm.
1199 * decl.c (create_array_type_for_decl): Only check for auto once.
1202 * call.c (build_list_conv): Don't try to build a list of references.
1204 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
1206 PR C++/60209 - Declaration of user-defined literal operator cause error
1207 * parser.c (cp_parser_operator): Fold treatment of strings
1208 and user-defined string literals. Use the full string parser.
1209 (cp_parser_string_literal): Add flag to not look for literal operator.
1211 2014-07-11 Jason Merrill <jason@redhat.com>
1215 * call.c (build_conditional_expr_1): Avoid reading freed memory.
1217 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
1220 * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
1222 * decl.c (check_initializer): Don't call check_narrowing here,
1223 set LOOKUP_NO_NARROWING.
1224 * typeck2.c (digest_init_r): Likewise.
1226 2014-07-10 Jason Merrill <jason@redhat.com>
1229 * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
1233 * decl2.c (mark_all_virtuals): New variable.
1234 (maybe_emit_vtables): Check it instead of flag_devirtualize.
1235 (cp_write_global_declarations): Set it and give helpful diagnostic
1236 if it introduces errors.
1237 * class.c (finish_struct_1): Check it.
1238 * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
1240 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1243 * decl.c (grokdeclarator): Adjust error messages about 'explicit'
1244 outside class declaration, in friend declaration, and neither on
1245 constructor nor conversion operator.
1247 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1251 * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
1252 cv-qualifiers of function types.
1254 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
1255 Paolo Carlini <paolo.carlini@oracle.com>
1258 * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
1261 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
1263 * class.c (check_for_override): Wrap the 'final' and 'override'
1264 keywords in %< and %>.
1266 2014-07-06 Marek Polacek <polacek@redhat.com>
1269 * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
1270 * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
1271 * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
1274 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1276 * pt.c (convert_template_argument): Use inform instead of error in
1279 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
1284 * parser.c (cp_parser_userdef_string_literal): Take a tree
1286 (cp_parser_string_literal): Don't hack the token stream.
1288 2014-06-30 Jason Merrill <jason@redhat.com>
1292 * decl2.c (maybe_emit_vtables): Mark all vtable entries if
1294 * init.c (build_vtbl_address): Don't mark destructor.
1295 * class.c (finish_struct_1): Add all classes to keyed_classes
1299 * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
1302 * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
1304 * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
1305 TYPE_BINFO or TYPE_LANG_SPECIFIC.
1306 * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
1307 (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
1308 * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
1309 * pt.c (unify): Also check whether the argument is a PMF.
1311 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1314 * parser.c (cp_parser_tokens_start_cast_expression): In C++11
1315 a '[' can also start a primary-expression.
1316 (cp_parser_cast_expression): Parse a cast-expression only tentatively
1317 when cp_parser_tokens_start_cast_expression returns -1.
1319 2014-06-30 Jason Merrill <jason@redhat.com>
1322 * pt.c (unify_one_argument): Type/expression mismatch just causes
1325 * semantics.c (simplify_aggr_init_expr): Remove remnants of
1328 2014-06-30 Marek Polacek <polacek@redhat.com>
1330 * cp-gimplify.c (cp_genericize): Don't instrument returns if the
1331 function has no_sanitize_undefined attribute.
1332 * decl.c (compute_array_index_type): Don't instrument VLAs if the
1333 function has no_sanitize_undefined attribute.
1335 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1338 * cp-array-notation.c (expand_sec_reduce_builtin):
1339 Check that bultin argument is correct.
1340 * call.c (build_cxx_call): Check for 0 arguments in builtin call.
1342 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
1346 * typeck.c (check_return_expr): Lookup as an rvalue even when the
1347 types aren't the same.
1349 2014-06-27 Jason Merrill <jason@redhat.com>
1352 * error.c (dump_template_bindings): Don't tsubst in a clone.
1354 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1357 * semantics.c (finish_compound_literal): Revert r204228.
1359 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1361 * parser.c (cp_parser_compound_literal_p): New.
1362 (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
1364 2014-06-26 Jason Merrill <jason@redhat.com>
1366 * parser.c (cp_parser_for_init_statement): Change range-for error
1369 N3994 Ranged-based for-loops: The Next Generation
1370 * parser.c (cp_lexer_nth_token_is): New.
1371 (cp_parser_for_init_statement): Allow "for (id : init)".
1373 2014-06-26 Teresa Johnson <tejohnson@google.com>
1375 * class.c (dump_class_hierarchy): Use saved dump files.
1376 (dump_vtable): Ditto.
1379 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
1382 * parser.c (cp_parser_elaborated_type_specifier): Only consider template
1383 parameter lists outside of function parameter scope.
1385 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
1389 * typeck2.c (process_init_constructor_record): Do not complain about
1390 uninitialized const members, because within aggregate-initialization,
1391 members without explicit initializers are value-initialized.
1393 2014-06-25 Jakub Jelinek <jakub@redhat.com>
1395 * semantics.c (finish_omp_clauses): Make sure
1396 OMP_CLAUSE_LINEAR_STEP has correct type.
1398 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1400 * class.c (check_methods, create_vtable_ptr, determine_key_method,
1401 add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
1402 FUNCTION_DECL check.
1403 * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
1404 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
1405 (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
1406 (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
1408 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
1411 * decl.c (grokdeclarator): Do not early check for operator-function-id
1414 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1416 * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
1419 2014-06-24 Jakub Jelinek <jakub@redhat.com>
1421 * parser.c (cp_parser_omp_for_loop): For
1422 #pragma omp parallel for simd move lastprivate clause from parallel
1423 to for rather than simd.
1425 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
1429 * decl.c (grokparms): Accept a single parameter of type 'void'.
1431 2014-06-20 Jason Merrill <jason@redhat.com>
1434 * call.c (add_function_candidate): Avoid special 'this' handling
1435 if we have a ref-qualifier.
1438 * call.c (build_over_call): Call build_this in template path.
1440 2014-06-19 Jason Merrill <jason@redhat.com>
1443 * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
1445 2014-06-18 Jason Merrill <jason@redhat.com>
1448 * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
1449 ref-qualifier handling.
1452 * pt.c (resolve_overloaded_unification): Preserve
1453 ARGUMENT_PACK_EXPLICIT_ARGS.
1455 2014-06-18 Jakub Jelinek <jakub@redhat.com>
1457 * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
1459 * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
1461 2014-06-17 Jason Merrill <jason@redhat.com>
1464 * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
1466 2014-06-15 Jason Merrill <jason@redhat.com>
1469 * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
1472 * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
1474 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1476 * decl.c (grokvardecl): Fix pasto in previous patch.
1478 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1480 * decl.c (duplicate_decls): Use set_decl_tls_model.
1481 (grokdeclarator): Likewise.
1482 * semantics.c (finish_id_expression): Check TLS only for
1484 (finish_omp_threadprivate): Use decl_default_tls_model.
1485 * decl2.c (get_guard): Likewise.
1486 * call.c (make_temporary_var_for_ref_to_temp): Likewise.
1488 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
1491 * decl.c (grokparms): Improve error message about void parameters.
1492 * error.c (type_to_string): Fix aka cut off code.
1494 2014-06-12 Jason Merrill <jason@redhat.com>
1496 * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
1497 * cvt.c (type_promotes_to): Likewise.
1498 * mangle.c (write_type, write_expression): Likewise.
1499 (write_name, write_template_arg): Likewise.
1500 (mangle_decl): Make alias based on flag_abi_compat_version.
1501 Emit -Wabi warning here.
1502 (finish_mangling_internal): Not here. Drop warn parm.
1503 (finish_mangling_get_identifier, finish_mangling): Adjust.
1504 (mangle_type_string, mangle_special_for_type): Adjust.
1505 (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
1506 (mangle_guard_variable, mangle_tls_init_fn): Adjust.
1507 (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
1509 * call.c (build_operator_new_call): Remove -fabi-version=1 support.
1510 * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
1511 (layout_nonempty_base_or_field, end_of_class): Likewise.
1512 (layout_empty_base, build_base_field, layout_class_type): Likewise.
1513 (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
1514 (layout_virtual_bases): Likewise.
1515 * decl.c (compute_array_index_type): Likewise.
1516 * mangle.c (write_mangled_name, write_prefix): Likewise.
1517 (write_template_prefix, write_integer_cst, write_expression): Likewise.
1518 (write_template_arg, write_array_type): Likewise.
1519 * method.c (lazily_declare_fn): Likewise.
1520 * rtti.c (get_pseudo_ti_index): Likewise.
1521 * typeck.c (comp_array_types): Likewise.
1523 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
1525 * vtable-class-hierarchy.c: Update handling for section names
1526 that are no longer trees.
1527 * decl.c (duplicate_decls): Likewise.
1529 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1532 * parser.c (cp_parser_init_declarator): Actually pass friend_p
1533 to cp_parser_declarator.
1535 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1538 * parser.c (cp_parser_using_declaration): Handle unscoped enums.
1539 * name-lookup.c (validate_nonmember_using_decl): Adjust error
1542 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
1545 * parser.c (cp_parser_declarator): Add bool parameter.
1546 (cp_parser_direct_declarator): Likewise, use it.
1547 (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
1548 (cp_parser_condition, cp_parser_explicit_instantiation,
1549 cp_parser_init_declarator, cp_parser_type_id_1,
1550 cp_parser_parameter_declaration, cp_parser_exception_declaration,
1551 cp_parser_cache_defarg, cp_parser_objc_class_ivars,
1552 cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
1554 * decl.c (grokdeclarator): Fix handling of friend declared in
1555 namespace scope (g++.dg/parse/friend10.C).
1557 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1559 * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
1561 * optimize.c (cdtor_comdat_group): Fix handling of aliases.
1562 (maybe_clone_body): Move symbol across comdat groups.
1563 * method.c (use_thunk): Copy implicit section flag.
1565 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
1568 * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
1570 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1572 * method.c (use_thunk): Use set_decl_section_name.
1573 * optimize.c (maybe_clone_body): Use set_decl_section_name.
1574 * decl.c (duplicate_decls): Likewise.
1575 * vtable-class-hierarchy.c: Likewise.
1577 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
1580 * class.c (check_field_decls): In C++11 mode do not reject
1581 static data members and reference-type members in unions.
1583 2014-06-05 Jason Merrill <jason@redhat.com>
1586 * decl.c (check_initializer): Collapse a TREE_LIST here.
1587 * typeck2.c (store_init_value): Not here.
1589 2014-06-05 Richard Biener <rguenther@suse.de>
1590 Paolo Carlini <paolo.carlini@oracle.com>
1593 * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
1594 handling of empty classes.
1596 2014-06-04 Jason Merrill <jason@redhat.com>
1598 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
1599 for noexcept and thread_local, too.
1602 * decl.c (check_initializer): Maybe clear
1603 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1605 2014-06-05 Richard Biener <rguenther@suse.de>
1608 * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
1609 warnings for accessing empty classes.
1611 2014-06-05 Marek Polacek <polacek@redhat.com>
1614 * parser.c (cp_parser_binary_expression): Warn when logical not is
1615 used on the left hand side operand of a comparison.
1617 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
1620 * typeck.c (cp_build_modify_expr): Handle array of characters
1621 initialized by a string literal.
1622 * decl.c (check_initializer): Handle parenthesized string literal
1624 * typeck2.c (store_init_value): Remove redundant check.
1626 2014-06-04 Jason Merrill <jason@redhat.com>
1630 * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
1631 * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
1633 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1636 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
1639 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
1643 * call.c (standard_conversion): Convert nullptr to bool only
1644 in case of direct-initialization.
1645 (convert_like_real): Provide informative error message.
1647 2014-06-03 Marek Polacek <polacek@redhat.com>
1650 * semantics.c (finish_switch_cond): Warn if switch condition has
1653 2014-06-03 Jason Merrill <jason@redhat.com>
1656 * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
1657 variable to local_specializations.
1660 * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
1662 2014-06-02 Jason Merrill <jason@redhat.com>
1665 * decl.c (reshape_init_class): Handle un-folded
1666 constant-expressions.
1669 * pt.c (pack_deducible_p): Handle canonicalization.
1671 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1673 * pt.c (tsubst_function_type): Initialize arg_types.
1675 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
1678 * class.c (handle_using_decl): Pass the correct scope to
1679 cp_emit_debug_info_for_using.
1681 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
1685 * search.c (accessible_p): Use current_nonlambda_class_type.
1686 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1688 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1690 * decl.c: Include builtins.h.
1691 * semantics.c: Likewise.
1693 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
1697 * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
1698 * pt.c (tsubst_function_type): Inject the this parameter; do the
1699 substitutions in the order mandated by the DR.
1700 (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
1701 * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
1702 (static_fn_type): Copy it.
1703 * decl2.c (build_memfn_type, change_return_type,
1704 cp_reconstruct_complex_type): Likewise.
1705 * parser.c (cp_parser_lambda_declarator_opt): Likewise.
1706 * tree.c (strip_typedefs): Likewise.
1707 * typeck.c (merge_types): Likewise.
1709 2014-05-30 Jason Merrill <jason@redhat.com>
1712 * pt.c (instantiate_decl): Check that defer_ok is not set for
1713 local class members.
1716 * pt.c (tsubst_init): Split out from...
1717 (tsubst_expr) [DECL_EXPR]: Here.
1718 (tsubst_copy) [VAR_DECL]: Use it.
1719 * semantics.c (finish_id_expression): Return the decl for static/const.
1721 2014-05-28 Jason Merrill <jason@redhat.com>
1724 * decl.c (cxx_comdat_group): Return a decl.
1725 * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
1727 * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
1731 * call.c (build_aggr_conv): Ignore passed in flags.
1732 (build_array_conv, build_complex_conv): Likewise.
1734 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1736 * optimize.c (maybe_thunk_body): Use set_comdat_group.
1737 (maybe_clone_body): Likewise.
1738 * decl.c (duplicate_decls): Update code duplicating comdat group;
1739 do not copy symtab pointer; before freeing newdecl remove it
1741 * decl2.c (constrain_visibility): Use set_comdat_group.
1743 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1745 * rtti.c: Include tm_p.h
1746 (emit_tinfo_decl): Force RTTI data to be aligned to required
1749 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1751 * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
1752 ignoring other target adjustments.
1754 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1756 * semantics.c (finish_omp_clauses): Remove duplicated variable
1759 * parser.c (cp_parser_omp_target): Return bool values.
1761 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
1764 * lambda.c (add_capture): Enforce that capture by value requires
1766 * typeck2.c (cxx_incomplete_type_inform): Early return if
1767 TYPE_MAIN_DECL is null.
1769 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
1772 * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
1774 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
1777 * lambda.c (build_capture_proxy, add_capture): Treat normal
1778 captures and init-captures identically.
1780 2014-05-21 Mark Wielaard <mjw@redhat.com>
1783 * cp-lang.c (cxx_enum_underlying_base_type): New function.
1784 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
1786 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1788 * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
1789 * cp-array-notation.c (replace_invariant_exprs): Likewise.
1790 (expand_array_notation): Handle VOID_CST.
1791 * error.c (dump_expr): Likewise.
1792 * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
1793 (cxx_pretty_printer::expression): Likewise.
1794 (pp_cxx_new_expression): Use void_node instead of void_zero_node.
1795 * decl.c (register_dtor_fn): Likewise.
1796 * init.c (build_raw_new_expr, build_new_1, build_vec_init)
1797 (build_delete, push_base_cleanups): Likewise.
1798 * mangle.c (write_expression): Likewise.
1799 * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
1800 * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
1801 (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
1802 * tree.c (cp_tree_equal): Likewise.
1803 (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
1804 instead of void_zero_node.
1805 * typeck.c (check_return_expr): Likewise.
1806 * typeck2.c (build_functional_cast): Likewise.
1808 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
1811 * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
1813 (cp_parser_statement): ...here. Make sure only semicolon can go after
1816 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1821 * typeck2.c (digest_nsdmi_init): New.
1822 * parser.c (cp_parser_late_parse_one_default_arg): Use it.
1823 * init.c (get_nsdmi): Likewise.
1824 * cp-tree.h (digest_nsdmi_init): Declare.
1826 2014-05-20 Jason Merrill <jason@redhat.com>
1828 * typeck.c (get_member_function_from_ptrfunc): Don't try to look
1829 up a virtual function in a dummy object.
1831 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1834 * decl.c (duplicate_decls): Replace pair of warning_at with
1835 warning_at + inform.
1836 (maybe_commonize_var): Likewise.
1838 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1841 * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
1842 (tsubst_copy_and_build): Perform recursive substitutions in a
1843 deterministic order.
1845 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1848 * typeck2.c (cxx_incomplete_type_inform): New.
1849 (cxx_incomplete_type_diagnostic): Use it.
1850 * decl.c (grokdeclarator): Check the element type of an
1851 incomplete array type; call the above.
1852 * cp-tree.h (cxx_incomplete_type_inform): Declare.
1854 2014-05-19 Jason Merrill <jason@redhat.com>
1857 * pt.c (tsubst_copy): Don't check at_function_scope_p.
1858 (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
1860 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
1862 * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
1863 * parser.c (cp_parser_enum_specifier): Likewise.
1865 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1867 * class.c (sorted_fields_type_new): Adjust.
1868 * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
1869 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1870 * cp-tree.h: Remove usage of variable_size gty attribute.
1871 * decl.c (make_label_decl): Adjust.
1872 (check_goto): Likewise.
1873 (start_preparsed_function): Likewise.
1874 (save_function_data): Likewise.
1875 * lex.c (init_reswords): Likewise.
1876 (retrofit_lang_decl): Likewise.
1877 (cxx_dup_lang_specific_decl): Likewise.
1878 (copy_lang_type): Likewise.
1879 (cxx_make_type): Likewise.
1880 * name-lookup.c (binding_entry_make): Likewise.
1881 (binding_table_construct): Likewise.
1882 (binding_table_new): Likewise.
1883 (cxx_binding_make): Likewise.
1884 (pushdecl_maybe_friend_1): Likewise.
1885 (begin_scope): Likewise.
1886 (push_to_top_level): Likewise.
1887 * parser.c (cp_lexer_alloc): Likewise.
1888 (cp_lexer_new_from_tokens): Likewise.
1889 (cp_token_cache_new): Likewise.
1890 (cp_parser_context_new): Likewise.
1891 (cp_parser_new): Likewise.
1892 (cp_parser_nested_name_specifier_opt): Likewise.
1893 (cp_parser_template_id): Likewise.
1894 * pt.c (maybe_process_partial_specialization): Likewise.
1895 (register_specialization): Likewise.
1896 (add_pending_template): Likewise.
1897 (lookup_template_class_1): Likewise.
1898 (push_tinst_level): Likewise.
1899 * semantics.c (register_constexpr_fundef): Likewise.
1900 (cxx_eval_call_expression): Likewise.
1901 * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
1903 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
1906 * parser.c (cp_parser_diagnose_invalid_type_name): Early return
1907 when cp_parser_lookup_name sets ambiguous_decls.
1909 2014-05-15 Jason Merrill <jason@redhat.com>
1911 * call.c (print_conversion_rejection): Use loc consistently.
1913 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1915 * cp-tree.h (DIRECT_LIST_INIT_P): Add.
1916 * call.c (convert_like_real, build_new_method_call_1): Use it.
1917 * decl2.c (grokfield): Likewise.
1918 * init.c (perform_member_init, build_aggr_init, expand_default_init,
1919 build_new_1): Likewise.
1920 * mangle.c (write_expression): Likewise.
1921 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1923 2014-05-14 Jason Merrill <jason@redhat.com>
1927 * call.c (reference_binding): Treat lvalue/rvalue mismatch and
1928 dropped cv-quals as a bad conversion.
1929 (convert_like_real) [ck_ref_bind]: Explain them.
1930 (compare_ics): Check badness before stripping reference
1931 bindings. Handle comparing bad reference bindings.
1932 * typeck.c (comp_cv_qualification): Add overload that just takes
1934 * cp-tree.h: Declare it.
1936 * call.c (struct conversion_info): Rename 'from_type' to 'from'.
1937 (arg_conversion_rejection, bad_arg_conversion_rejection)
1938 (explicit_conversion_rejection, template_conversion_rejection): Adjust.
1939 (add_function_candidate): Pass actual argument, rather than type, to
1940 bad_arg_conversion_rejection.
1941 (print_conversion_rejection): Explain what's wrong with the conversion.
1942 (print_z_candidates): Say "candidate:" before each candidate.
1943 (splice_viable): Be strict if we see a viable or template candidate.
1944 (build_user_type_conversion_1): Pass false to strict parameter.
1945 (perform_overload_resolution, build_conditional_expr_1): Likewise.
1946 (build_new_op_1, build_new_method_call_1): Likewise.
1947 (build_op_call_1): Pass true to strict parameter.
1949 2014-05-13 Jason Merrill <jason@redhat.com>
1951 * call.c (print_error_for_call_failure): Say "no match" rather
1952 than "ambiguous" if there were no strict matches.
1953 (build_new_method_call_1): Likewise.
1956 * semantics.c (is_this_parameter): Allow capture proxies too.
1958 2014-05-12 Jason Merrill <jason@redhat.com>
1960 * call.c (maybe_print_user_conv_context): New.
1961 (convert_like_real): Use it. Print call context for bad
1962 user-defined conversion.
1963 (build_over_call): Print call context for bad 'this' conversion.
1965 * call.c (convert_like_real): Use inform for identifying the
1968 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1970 * cvt.c (cp_convert_to_pointer): Don't call error_at if
1971 complain & tf_error is false.
1973 * decl.c (make_unbound_class_template): Prefer inform for
1974 "declared here"-type message.
1976 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
1980 * lambda.c (lambda_expr_this_capture): Add new parameter
1981 add_capture_p controlling whether the functions will try to
1982 capture 'this' via the default capture.
1983 (maybe_resolve_dummy): Likewise.
1984 * cp-tree.h: Adjust prototypes.
1985 * call.c, semantics.c: Change callers of these functions.
1986 * call.c (build_new_method_call_1): Use the actual 'this' that
1987 would be potentially captured for the overload resolution, instead
1988 of the dummy object.
1990 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
1992 * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
1994 (convert_nontype_argument): Adjust calls.
1995 (coerce_template_parameter_pack): Add missing complain & tf_error
1998 2014-05-09 Jason Merrill <jason@redhat.com>
2002 * call.c (build_conditional_expr_1, conditional_conversion): Handle
2003 non-class lvalues and xvalues that differ only in cv-qualifiers.
2007 * call.c (build_user_type_conversion_1): The copy-init temporary
2011 * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
2014 * call.c (build_conditional_expr_1): If overload resolution finds
2015 no match, just say "different types".
2018 * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
2021 * call.c (build_conditional_expr_1): Don't try to pool cv-quals
2022 if we didn't find a conversion.
2023 Don't accept a bad conversion too early.
2025 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
2028 * typeck.c (convert_for_assignment): Provide an inform for pointers
2029 to incomplete class types.
2031 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2034 * pt.c (convert_nontype_argument): Protect all the error calls
2035 with complain & tf_error.
2037 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
2040 * pt.c (instantiate_decl): Avoid generating the body of a
2043 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
2046 * pt.c (maybe_begin_member_template_processing): Use
2047 uses_template_parms.
2049 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2050 Mike Stump <mikestump@comcast.net>
2051 Richard Sandiford <rdsandiford@googlemail.com>
2053 * call.c: Include wide-int.h.
2054 (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2055 (convert_for_arg_passing): Likewise.
2056 * class.c: Include wide-int.h.
2057 (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
2058 (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
2059 (include_empty_classes): Likewise
2060 (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
2061 * cvt.c: Include wide-int.h.
2062 (ignore_overflows): Use wide_int_to_tree.
2063 * decl.c: Include wide-int.h.
2064 (check_array_designated_initializer): Use wide-int interfaces.
2065 (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
2066 (finish_enum_value_list): Use signop.
2067 (build_enumerator): Use wide-int interfaces.
2068 * init.c: Include wide-int.h.
2069 (build_new_1): Use wide-int interfaces.
2070 * mangle.c: Include wide-int.h.
2071 (write_integer_cst): Use wide-int interfaces.
2072 (write_array_type): Likewise.
2073 * tree.c: Include wide-int.h.
2074 (cp_tree_equal): Use tree_int_cst_equal.
2075 * typeck2.c: Include wide-int.h.
2076 (process_init_constructor_array): Use wide-int interfaces.
2078 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
2081 * decl.c (grokfndecl): Check duplicate_decls return value for
2083 * pt.c (instantiate_decl): A deleted function is defined.
2085 2014-05-02 Jason Merrill <jason@redhat.com>
2087 * decl2.c (vague_linkage_p): Local statics have vague linkage.
2090 * lambda.c (lambda_capture_field_type): Wrap anything dependent
2092 (add_capture): Check for VLA before calling it.
2093 * semantics.c (is_this_parameter): Accept any 'this' parameter, not
2094 just the current one. Make non-static.
2095 * cp-tree.h: Declare it.
2096 * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
2097 the operand was static or constant.
2099 2014-05-02 Marek Polacek <polacek@redhat.com>
2101 * typeck.c (maybe_warn_about_returning_address_of_local): Separate
2104 2014-05-01 Marek Polacek <polacek@redhat.com>
2107 * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
2108 between label and variable when warning about returning local address.
2110 2014-04-30 Jason Merrill <jason@redhat.com>
2113 * init.c (build_value_init): Don't try to call an array constructor.
2116 * typeck2.c (massage_init_elt): Use maybe_constant_init.
2118 2014-04-30 Marek Polacek <polacek@redhat.com>
2120 * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
2121 even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
2122 for non-integer types.
2124 2014-04-29 Jason Merrill <jason@redhat.com>
2127 Represent the unevaluated exception specification of an implicitly
2128 declared or deleted function with a simple placeholder, not a list
2130 * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
2131 * except.c (unevaluated_noexcept_spec): New.
2132 * class.c (deduce_noexcept_on_destructor): Use it.
2133 * decl.c (check_redeclaration_exception_specification): Call
2134 maybe_instantiate_noexcept.
2135 (duplicate_decls): Call it before merge_types.
2136 (start_preparsed_function): Call maybe_instantiate_noexcept.
2137 * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
2138 * init.c (get_nsdmi): Factor out of perform_member_init.
2139 * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
2140 (walk_field_subobs): Consider NSDMI for EH spec.
2141 (get_defaulted_eh_spec): New.
2142 (implicitly_declare_fn): Use unevaluated_noexcept_spec.
2143 (defaulted_late_check): Defer EH checking in non-template classes.
2144 (after_nsdmi_defaulted_late_checks): New.
2145 * parser.c (cp_parser_class_specifier_1): Use it.
2146 (unparsed_classes): New macro.
2147 * parser.h (cp_unparsed_functions_entry_d): Add classes field.
2148 * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
2149 Remove list-of-functions handling.
2150 * typeck2.c (merge_exception_specifiers): Remove list-of-functions
2151 handling and FN parameter.
2152 * typeck.c (merge_types): Adjust.
2154 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
2157 * parser.c (cp_parser_alias_declaration): Check return value of
2160 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2162 * parser.c (cp_parser_omp_atomic): Allow seq_cst before
2163 atomic-clause, allow comma in between atomic-clause and
2166 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
2169 * rtti.c (emit_support_tinfos): Do not iterate on
2170 registered_builtin_types (partial revert).
2172 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
2175 * semantics.c (apply_deduced_return_type): Complete non-void type
2176 before estimating whether the type is aggregate.
2178 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
2181 * rtti.c (emit_support_tinfo_1): New function, extracted from
2182 emit_support_tinfos.
2183 (emit_support_tinfos): Call it and iterate on registered_builtin_types.
2185 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2188 * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
2189 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2191 2014-04-18 Jason Merrill <jason@redhat.com>
2194 * call.c (reference_binding): Recurse on user-defined conversion.
2197 * call.c (standard_conversion): Don't try to apply restrict to void.
2199 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
2201 * decl.c (reshape_init_r): Handle a single element of vector type.
2203 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2206 * decl2.c (cplus_decl_attributes): Handle
2207 pointer-to-member-function declarations.
2209 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
2212 * call.c (build_user_type_coversion): Use build_dummy_object
2213 to create the placeholder object for a constructor method call.
2214 (build_special_member_call): Likewise.
2215 (build_over_call): Check for the placeholder object with
2217 (build_new_method_call_1): Likewise. Don't attempt to resolve
2218 a dummy object for a constructor method call.
2220 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
2223 * friend.c (add_friend, make_friend_class): Move repeated friend
2224 warning under Wredundant_decls.
2226 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
2228 * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2229 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2230 (do_class_using_decl): Likewise.
2231 * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
2233 2014-04-15 Jakub Jelinek <jakub@redhat.com>
2236 * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
2238 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2240 * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
2242 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
2244 * pt.c (mark_template_parm): Use template_parm_level_and_index.
2246 2014-04-11 Jason Merrill <jason@redhat.com>
2248 * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
2250 (cp_lexer_get_preprocessor_token): Always clear it.
2251 (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
2255 * decl.c (reshape_init_r): Handle a single element of class type.
2258 * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
2259 built-in operator new.
2261 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
2264 * name-lookup.c (parse_using_directive): Return early if the
2265 attribs argument is error_mark_node; use get_attribute_name.
2267 2014-04-11 Jason Merrill <jason@redhat.com>
2271 * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
2272 * call.c (struct z_candidate): Add flags field.
2273 (add_candidate): Add flags parm.
2274 (add_function_candidate, add_conv_candidate, build_builtin_candidate)
2275 (add_template_candidate_real): Pass it.
2276 (build_over_call): Set CALL_EXPR_LIST_INIT_P.
2277 * tree.c (build_aggr_init_expr): Copy it.
2278 * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
2280 2014-04-10 Richard Biener <rguenther@suse.de>
2281 Jakub Jelinek <jakub@redhat.com>
2284 * error.c (dump_decl) <case FUNCTION_DECL>: If
2285 DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
2286 recurse on DECL_ABSTRACT_ORIGIN instead of printing
2289 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
2291 * pt.c (check_template_variable): Check for the return of pedwarn
2292 before emitting a note.
2293 * parser.c (cp_parser_lambda_introducer): Likewise.
2295 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
2298 * pt.c (process_template_parm): For an invalid non-type parameter
2299 only set TREE_TYPE to error_mark_node.
2300 (push_inline_template_parms_recursive, comp_template_parms,
2301 redeclare_class_template, coerce_template_template_parm,
2302 coerce_template_template_parms, unify): Use error_operand_p.
2304 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
2306 * class.c (check_bases_and_members): Warn about non-virtual dtors
2307 in public bases only. Check warn_ecpp before complaining about
2308 non-polymorphic bases.
2310 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2312 * decl.c (duplicate_decls): Check for the return of warning_at
2313 before emitting a note.
2314 (warn_misplaced_attr_for_class_type): Likewise.
2315 (check_tag_decl): Likewise.
2317 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
2320 * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
2322 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
2325 * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
2326 * decl.c (cp_finish_decl): Create a new BIND_EXPR before
2327 instantiating a variable-sized type.
2330 * decl.c (decl_jump_unsafe): Consider variably-modified decls.
2332 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2334 * class.c (find_abi_tags_r): Check for the return of warning
2335 before emitting a note.
2336 (one_inherited_ctor): Likewise.
2338 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
2340 * decl.c (duplicate_decls): Check for the return of permerror
2341 before emitting a note.
2343 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
2345 * class.c (accessible_nvdtor_p): New.
2346 (check_bases): Don't check base destructor here ...
2347 (check_bases_and_members): ... check them here. Trigger on
2348 Wnon-virtual-dtor flag.
2349 (finish_struct_1): Use accessible_nvdtor_p.
2351 2014-04-01 Jason Merrill <jason@redhat.com>
2353 * pt.c (process_partial_specialization): Say "not deducible"
2354 rather than "not used". Use inform.
2357 * pt.c (coerce_template_parms): Check that the pack expansion
2358 pattern works with the first matching parameter.
2360 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
2362 * init.c (perform_member_init): Homogenize uninitialized
2365 2014-04-01 Jason Merrill <jason@redhat.com>
2368 * call.c (build_array_conv): Call complete_type.
2371 * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
2372 (picflag_from_initializer): Return it.
2373 (process_init_constructor): Handle it.
2376 * decl2.c (is_late_template_attribute): Don't defer abi_tag.
2377 * mangle.c (write_unqualified_name): Fix abi_tag on templates.
2378 * pt.c (get_template_info): Handle NAMESPACE_DECL.
2379 (most_general_template): Handle more kinds of template.
2380 * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
2381 instantiations and specializations.
2383 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
2386 * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
2387 COMPONENT_REFs and ARRAY_REFs sooner.
2389 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
2392 * parser.c (cp_parser_init_declarator): Handle erroneous generic type
2393 usage in non-functions with pushed scope.
2395 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
2398 * name-lookup.h (cp_binding_level): New transient field defining_class_p
2399 to indicate whether a scope is in the process of defining a class.
2400 * semantics.c (begin_class_definition): Set defining_class_p.
2401 * name-lookup.c (leave_scope): Reset defining_class_p.
2402 * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
2403 defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
2404 unwinding to class-defining scope to handle the erroneous definition of
2405 a generic function of an arbitrarily nested class within an enclosing
2408 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
2411 * method.c (walk_field_subobs): Improve the diagnostic
2412 locations for both REFERENCE_TYPEs and non-static const members.
2413 * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
2414 instead of %qD to be consistent with the c++11 diagnostic.
2416 2014-03-25 Jason Merrill <jason@redhat.com>
2420 * class.c (build_vtbl_initializer): Handle abstract dtors here.
2421 * search.c (get_pure_virtuals): Not here.
2424 * parser.c (cp_parser_lambda_expression): Don't parse the body of
2425 a lambda in unevaluated context.
2428 * decl.c (create_array_type_for_decl): Complain about array of auto.
2430 2014-03-25 Jakub Jelinek <jakub@redhat.com>
2433 * semantics.c (potential_constant_expression_1): Handle
2436 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
2439 * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
2440 introducing an implicit function template parameter within an explicit
2443 2014-03-22 Jason Merrill <jason@redhat.com>
2446 * decl.c (grokdeclarator): Change permerror about 'virtual auto'
2449 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
2452 * name-lookup.c (push_class_level_binding_1): Check identifier_p
2453 on the name argument.
2455 2014-03-20 Jakub Jelinek <jakub@redhat.com>
2458 * init.c (build_zero_init_1): Ignore fields with error_mark_node
2461 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
2464 * call.c (build_new_method_call_1): Handle pure virtuals called by
2467 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
2470 * parser.c (cp_parser_member_declaration): Don't allow
2471 finish_fully_implicit_template to consider friend declarations to be
2472 class member templates.
2473 (synthesize_implicit_template_parm): Handling winding back through class
2474 scope to the class being defined in order to inject a template argument
2478 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
2479 function scope as per cp_parser_skip_to_end_of_statement.
2481 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
2484 * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
2486 2014-03-14 Jason Merrill <jason@redhat.com>
2490 * search.c (get_pure_virtuals): Handle abstract dtor here.
2491 (dfs_get_pure_virtuals): Not here.
2494 * search.c (dfs_get_pure_virtuals): Treat the destructor of an
2495 abstract class as pure.
2497 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2500 * pt.c (maybe_process_partial_specialization): Check return value
2501 of check_specialization_namespace.
2503 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
2506 * semantics.c (finish_static_assert): Call cxx_constant_value only
2507 if require_potential_rvalue_constant_expression returns true.
2509 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
2512 * method.c (get_inherited_ctor): New.
2513 * cp-tree.h (get_inherited_ctor): Declare it.
2514 * semantics.c (is_valid_constexpr_fn): Use it.
2516 2014-03-10 Jason Merrill <jason@redhat.com>
2519 * call.c (convert_default_arg): Remove special handling for
2523 * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
2524 when deciding whether to call push_template_decl for a member class.
2525 * pt.c (push_template_decl_real): Return after wrong levels error.
2527 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
2530 * pt.c (tsubst_copy): When retrieving a capture pack from a generic
2531 lambda, remove the lambda's own template argument list prior to fetching
2535 * parser.c (cp_parser_parameter_declaration_clause): Move generic
2536 function template unwinding on error into a more general location, ...
2537 (cp_parser_skip_to_end_of_statement): ... here.
2539 2014-03-07 Jason Merrill <jason@redhat.com>
2541 * Make-lang.in (check_g++_parallelize): Split dg.exp.
2543 * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
2544 we're in a trailing return type.
2546 * typeck.c (comp_template_parms_position): 'auto' and
2547 'decltype(auto)' are different from real template parms.
2549 * parser.c (cp_parser_using_declaration): Consume the semicolon
2550 after bare parameter pack error.
2552 * cp-tree.h (REF_PARENTHESIZED_P): New.
2553 * semantics.c (force_paren_expr): Set it.
2554 * pt.c (do_auto_deduction): Check it.
2555 (tsubst) [COMPONENT_REF]: Copy it.
2556 * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
2558 * decl.c (create_array_type_for_decl): Only warn about invalid
2559 C++1y VLA if flag_iso or warn_vla>0.
2560 (grokdeclarator): Likewise.
2561 * pt.c (tsubst): Likewise.
2562 * semantics.c (finish_decltype_type): Likewise.
2563 * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
2564 (cp_build_addr_expr_1): Likewise.
2565 * init.c (build_new_1): Improve diagnostics.
2567 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2570 * decl.c (check_initializer): Return NULL_TREE after error;
2571 consistently use inform.
2573 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
2575 * decl.c (check_initializer): Remove dead code.
2577 2014-03-06 Marek Polacek <polacek@redhat.com>
2580 * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
2581 of checking tree code.
2583 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2585 * parser.c (cp_lexer_set_source_position): New.
2586 (cp_parser_mem_initializer): Use it.
2587 (cp_parser_postfix_open_square_expression): Likewise.
2588 (cp_parser_parenthesized_expression_list): Likewise.
2589 (cp_parser_new_initializer): Likewise.
2590 (cp_parser_jump_statement): Likewise.
2591 (cp_parser_initializer): Likewise.
2592 (cp_parser_functional_cast): Likewise.
2594 2014-03-05 Jason Merrill <jason@redhat.com>
2597 * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
2598 dependent expression.
2601 * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
2602 if re-parsing might succeed.
2603 * semantics.c (finish_id_expression): Use of a parameter outside
2604 the function body is a parse error.
2606 * parser.c (cp_parser_mem_initializer): Set input_location
2607 properly for init-list warning.
2608 (cp_parser_postfix_open_square_expression): Likewise.
2609 (cp_parser_parenthesized_expression_list): Likewise.
2610 (cp_parser_new_initializer): Likewise.
2611 (cp_parser_jump_statement): Likewise.
2612 (cp_parser_initializer): Likewise.
2613 (cp_parser_functional_cast): Likewise.
2615 2014-03-04 Jason Merrill <jason@redhat.com>
2618 * typeck2.c (process_init_constructor_record): Set
2619 CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
2623 * parser.c (cp_parser_direct_declarator): Set declarator to
2624 cp_error_declarator on invalid qualified-id.
2626 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
2629 * parser.c (cp_parser_using_declaration): Early return when
2630 cp_parser_nested_name_specifier errors out.
2632 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
2635 * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
2636 function scope on parse error in function parameter list.
2638 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2640 * method.c (implicitly_declare_fn): Remove redundant
2641 DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
2642 * semantics.c (is_instantiation_of_constexpr): Likewise.
2643 * error.c (dump_function_decl): Likewise.
2645 2014-03-01 Jason Merrill <jason@redhat.com>
2648 * semantics.c (begin_maybe_infinite_loop): Use
2649 fold_non_dependent_expr_sfinae.
2651 2014-02-28 Jason Merrill <jason@redhat.com>
2654 * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
2656 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
2659 * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
2660 * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
2661 * lambda.c (maybe_add_lambda_conv_op): Likewise.
2663 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
2666 * call.c (convert_arg_to_ellipsis): Return error_mark_node after
2669 2014-02-27 Jason Merrill <jason@redhat.com>
2673 * decl2.c (tentative_decl_linkage): Don't mess with functions that
2674 are not yet defined.
2676 2014-02-26 Jason Merrill <jason@redhat.com>
2680 * class.c (clone_function_decl): Don't note_vague_linkage_fn.
2681 * init.c (build_vtbl_address): Do it here.
2687 * pt.c (struct warning_sentinel): New.
2688 (tsubst_copy_and_build): Use it instead of
2689 c_inhibit_evaluation_warnings.
2690 * typeck.c (maybe_warn_about_useless_cast): Remove
2691 c_inhibit_evaluation_warnings check.
2694 * pt.c (get_template_parm_index): New.
2695 (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
2696 (process_template_parm): Allow bare packs in template template
2697 parm template parms.
2698 (coerce_template_parameter_pack): Handle fixed template template
2699 parm packs and fixed packs not at the end of the parm list.
2700 (coerce_template_parms): Handle template parm packs not at the end
2702 (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
2705 * pt.c (unify): Ignore alias templates when deducing a template
2711 * call.c (reference_binding): Recurse on user-defined conversion.
2712 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2714 2014-02-25 Jason Merrill <jason@redhat.com>
2717 * call.c (reference_binding): Recurse on user-defined conversion.
2718 (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
2720 * call.c (print_conversion_rejection): Handle n_arg of -2.
2721 (build_user_type_conversion_1): Pass it.
2724 * decl2.c (no_linkage_error): Handle C++98 semantics.
2725 (reset_type_linkage): Move from decl.c.
2726 (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
2727 (bt_reset_linkage_2, reset_decl_linkage): New.
2728 (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
2729 (cp_write_global_declarations): Move condition into no_linkage_error.
2730 * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
2731 * semantics.c (expand_or_defer_fn_1): Factor out
2732 tentative_decl_linkage.
2733 * cp-tree.h: Adjust.
2735 * decl2.c (finish_static_data_member_decl): Diagnose static data
2736 member in unnamed class.
2737 * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
2740 * class.c (clone_function_decl): Call note_vague_linkage_fn for
2741 defaulted virtual dtor.
2745 * pt.c (get_underlying_template): Fix equivalence calculation.
2747 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
2750 * parser.c (function_being_declared_is_template_p): Return false when
2751 processing a template parameter list.
2752 (cp_parser_parameter_declaration_clause): Don't set
2753 auto_is_implicit_function_template_parm_p when processing a
2754 template parameter list.
2756 * parser.c (synthesize_implicit_template_parm): Inject new template
2757 argument list appropriately when a generic member function
2758 of a class template is declared out-of-line.
2761 * parser.c (cp_parser_direct_declarator): Don't save and
2762 restore num_template_parameter_lists around call to
2763 cp_parser_parameter_declaration_list.
2764 (function_being_declared_is_template_p): New predicate.
2765 (cp_parser_parameter_declaration_list): Use
2766 function_being_declared_is_template_p as predicate for
2767 inspecting current function template parameter list length
2768 rather than num_template_parameter_lists.
2770 2014-02-24 Jason Merrill <jason@redhat.com>
2773 * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
2774 DECL_EXPR initialize a non-class iterator.
2777 * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
2779 2014-02-21 Jason Merrill <jason@redhat.com>
2782 * parser.c (cp_parser_type_name): Always check dependency.
2783 (cp_parser_type_specifier_seq): Call
2784 cp_parser_parse_and_diagnose_invalid_type_name.
2787 * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
2790 * parser.c (cp_parser_default_argument): Clear
2791 current_class_ptr/current_class_ref like tsubst_default_argument.
2794 * lambda.c (maybe_resolve_dummy): Check lambda_function rather
2795 than current_binding_level.
2798 * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
2801 * parser.c (cp_parser_enum_specifier): Call
2802 check_for_bare_parameter_packs.
2805 * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
2809 * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
2810 of the partial instantiation, not the most general template.
2811 (maybe_process_partial_specialization): Reassign everything on
2815 * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
2816 (check_explicit_specialization): Don't clone.
2819 * pt.c (coerce_template_parms): Bail if argument packing fails.
2822 * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
2823 Don't get confused by a CONSTRUCTOR that already has a type.
2826 * call.c (build_array_conv): Don't crash on VLA.
2829 * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
2832 * lambda.c (maybe_resolve_dummy): Don't try to capture this
2833 in declaration context.
2837 * pt.c (unify): Only unify if deducible. Handle 0-length list.
2840 * parser.c (cp_parser_direct_declarator): Don't wrap a
2841 type-dependent expression in a NOP_EXPR.
2844 * lambda.c (is_normal_capture_proxy): Handle VLA capture.
2849 * parser.c (cp_parser_template_argument): Restore dereference.
2850 * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
2851 (process_partial_specialization): Handle deref.
2854 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
2858 * parser.c (cp_parser_parameter_declaration_list): Correctly reset
2859 implicit_template_scope upon leaving an out-of-line generic member
2860 function definition.
2862 2014-02-20 Kai Tietz <ktietz@redhat.com>
2865 * parser.c (cp_parser_functional_cast): Treat NULL_TREE
2866 valued type argument as error_mark_node.
2869 * semantics.c (finish_fname): Handle error_mark_node.
2871 2014-02-19 Jason Merrill <jason@redhat.com>
2874 * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
2875 spec from template context.
2877 2014-02-19 Jakub Jelinek <jakub@redhat.com>
2880 * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
2881 FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
2884 * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
2886 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2889 * semantics.c (ensure_literal_type_for_constexpr_object): Use
2892 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
2895 * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
2896 During error recovery allow_non_constant may be false.
2898 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
2901 * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
2902 scope whenever a template parameter list has been started, independent
2903 of whether the function call operator was well-formed or not.
2906 * parser.c (cp_parser_member_declaration): Pop fully implicit template
2907 scope for generic friend declarations as well as for non-friends.
2909 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
2912 * method.c (implicitly_declare_fn): A constructor of a class with
2913 virtual base classes isn't constexpr (7.1.5p4).
2915 2014-02-05 Jan Hubicka <hubicka@ucw.cz
2917 * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
2919 2014-02-05 Jakub Jelinek <jakub@redhat.com>
2922 * parser.c (cp_parser_omp_declare_reduction): Save and free
2925 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
2929 * tree.c (handle_init_priority_attribute): Call default_conversion on
2930 the attribute argument.
2932 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
2935 * method.c (synthesized_method_walk): If vbases is non-null but
2936 is_empty is true, likewise don't worry about the virtual bases.
2938 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
2941 * typeck2.c (process_init_constructor_record): Just skip unnamed
2944 2014-01-31 Jason Merrill <jason@redhat.com>
2947 * pt.c (mark_decl_instantiated): Call mark_needed.
2950 * decl2.c (handle_tls_init): Handle null init fn.
2953 * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
2955 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
2958 * class.c (build_vfield_ref): Early return error_mark_node if
2959 TYPE_VFIELD (type) is null.
2960 (build_base_path): Check return value of build_vfield_ref.
2962 2014-01-31 Jason Merrill <jason@redhat.com>
2965 * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
2966 [ck_list]: Check for error_mark_node.
2967 (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
2970 * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
2971 during partial ordering.
2973 2014-01-31 Marek Polacek <polacek@redhat.com>
2976 * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
2978 2014-01-30 Jason Merrill <jason@redhat.com>
2981 * cp-tree.h (struct saved_scope): Add x_local_specializations.
2982 (local_specializations): New macro.
2983 * pt.c (local_specializations): Remove variable.
2985 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
2988 * parser.c (make_string_pack): Use double_int::from_buffer.
2990 2014-01-30 Marek Polacek <polacek@redhat.com>
2993 * typeck.c (build_ptrmemfunc1): Call convert_and_check with
2995 * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
2996 with input_location.
2997 * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
3000 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3003 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
3005 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3008 * pt.c (lookup_template_class_1): Check start_enum return value
3009 for error_mark_node.
3011 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
3013 * decl.c (duplicate_decls, typename_hash, typename_compare):
3014 Use TYPE_IDENTIFIER.
3015 * error.c (dump_type): Likewise.
3016 * mangle.c (dump_substitution_candidates): Likewise.
3018 2014-01-30 Jason Merrill <jason@redhat.com>
3021 * decl2.c (attributes_naming_typedef_ok): New.
3022 * cp-tree.h: Declare it.
3023 * decl.c (grokdeclarator): Check it.
3024 * tree.c (no_linkage_check): Handle VECTOR_TYPE.
3026 2014-01-29 Jason Merrill <jason@redhat.com>
3029 * call.c (add_builtin_candidate): Catch dependent types.
3032 * pt.c (expand_template_argument_pack): Correct
3033 non_default_args_count calculation.
3036 * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
3039 * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
3040 have a friend template in a class template.
3041 * pt.c (tsubst_friend_function): Look through it.
3042 (push_template_decl_real): A friend member template is
3045 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3048 * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
3051 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3054 * pt.c (instantiate_template_1): Check for error_mark_node the second
3057 2014-01-29 Jason Merrill <jason@redhat.com>
3060 * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
3061 cdtor_returns_this case.
3064 * decl.c (cxx_maybe_build_cleanup): Call mark_used.
3066 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
3069 * semantics.c (finish_omp_reduction_clause): Check type for
3072 2014-01-28 Jason Merrill <jason@redhat.com>
3075 * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
3076 (tsubst_copy): Use it if lookup fails.
3079 * pt.c (tsubst_function_type): Make sure we keep the same function
3083 * semantics.c (build_anon_member_initialization): Stop walking
3084 when we run out of COMPONENT_REFs.
3087 * decl.c (lookup_and_check_tag): Ignore template parameters if
3088 scope == ts_current.
3089 * pt.c (check_template_shadow): Don't complain about the injected
3092 * decl.c (duplicate_decls): Tweak.
3095 * mangle.c (write_unqualified_name): Handle operator auto.
3097 2014-01-27 Jason Merrill <jason@redhat.com>
3101 * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
3102 list-initialization. A conversion to rvalue ref that involves
3103 an lvalue-rvalue conversion is bad.
3104 (convert_like_real): Give helpful error message.
3107 * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
3110 * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
3114 * pt.c (template_parm_to_arg): Call convert_from_reference.
3115 (tsubst_template_arg): Don't strip reference refs.
3118 * call.c (build_aggr_conv): Reject value-initialization of reference.
3122 * call.c (convert_like_real): Give helpful error about excess braces
3123 for ck_rvalue of scalar type.
3126 * call.c (reference_binding): Only elide braces if the single
3127 element is reference-related.
3130 * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
3134 * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
3138 * decl.c (compute_array_index_type): Don't call
3139 maybe_constant_value for a non-integral expression.
3141 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3143 * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
3145 * cp-gimplify.c (cp_genericize): Likewise.
3146 * decl.c (grokfndecl): Likewise.
3147 * parser.c (cp_parser_postfix_expression): Likewise.
3148 (cp_parser_postfix_open_square_expression): Likewise.
3149 (cp_parser_direct_declarator): Likewise.
3150 (is_cilkplus_vector_p): Likewise.
3151 (cp_parser_omp_clause_name): Likewise.
3152 (cp_parser_omp_all_clauses): Likewise.
3153 * pt.c (apply_late_template_attributes): Likewise.
3154 * typeck.c (cp_build_array_ref): Likewise.
3155 (cp_build_compound_expr): Likewise.
3156 (check_return_expr): Likewise.
3158 2014-01-24 Jason Merrill <jason@redhat.com>
3161 * decl.c (grokdeclarator): Turn pedwarn about auto return type in
3166 * typeck2.c (process_init_constructor_array): Don't create
3169 2014-01-24 Jakub Jelinek <jakub@redhat.com>
3171 * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
3172 handling for RANGE_ARRAY case.
3174 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
3177 * name-lookup.c (push_using_directive): Use timevar_cond_start.
3179 2014-01-23 Marek Polacek <polacek@redhat.com>
3182 * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
3184 2014-01-23 Marek Polacek <polacek@redhat.com>
3187 * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3190 2014-01-23 Jason Merrill <jason@redhat.com>
3193 * cp-tree.h (struct language_function): Add infinite_loop and
3195 (current_function_infinite_loop): New.
3196 * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
3197 (break_maybe_infinite_loop): New.
3198 (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
3199 (finish_do_stmt, finish_for_cond, finish_for_stmt)
3200 (begin_range_for_stmt): Use them.
3201 * decl.c (finish_function): Don't warn about missing return
3202 if current_function_infinite_loop.
3203 * pt.c (instantiate_decl): Copy current_function_infinite_loop.
3204 * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
3206 * call.c (build_op_delete_call): Use make_tree_vector and
3207 release_tree_vector.
3209 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
3212 * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
3213 nested_name_specifier.
3215 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3217 * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
3218 see if there is an attribute after function decl. If so, then
3220 (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
3221 enabled function late parsing.
3222 (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
3223 attribute for a SIMD-enabled function.
3224 (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
3225 the function is used by SIMD-enabled function (indicated by NULL
3226 pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
3227 PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
3228 (cp_parser_cilk_simd_vectorlength): Modified this function to handle
3229 vectorlength clause in SIMD-enabled function and #pragma SIMD's
3230 vectorlength clause. Added a new bool parameter to differentiate
3232 (cp_parser_cilk_simd_fn_vector_attrs): New function.
3233 (is_cilkplus_vector_p): Likewise.
3234 (cp_parser_late_parsing_elem_fn_info): Likewise.
3235 (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
3236 and "vectorlength" clauses when Cilk Plus is enabled.
3237 (cp_parser_omp_clause_linear): Added a new parameter of type bool
3238 and emit a sorry message when step size is a parameter.
3239 * parser.h (cp_parser::cilk_simd_fn_info): New field.
3240 * decl.c (grokfndecl): Added flag_enable_cilkplus along with
3242 * pt.c (apply_late_template_attributes): Likewise.
3244 2014-01-23 Jakub Jelinek <jakub@redhat.com>
3247 * semantics.c (finish_omp_reduction_clause): Reject
3248 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3250 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
3253 * parser.c (cp_parser_class_head): Push the class before parsing
3254 the base-clause, pop after it.
3256 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
3258 * decl2.c (cpp_check): Revert prototype change.
3260 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3264 * init.c (build_value_init_noctor): Don't pass error_mark_node to
3267 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
3270 * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
3271 only when errorcount == 0.
3273 2014-01-17 Marek Polacek <polacek@redhat.com>
3276 * cvt.c (ocp_convert): Don't segfault on non-existing
3277 ENUM_UNDERLYING_TYPE.
3279 2014-01-16 Jason Merrill <jason@redhat.com>
3282 * tree.c (bot_manip): Update the location of builtin_LINE and
3285 2014-01-14 Jason Merrill <jason@redhat.com>
3288 * typeck2.c (massage_init_elt): New.
3289 (process_init_constructor_record)
3290 (process_init_constructor_union): Use it.
3291 (process_init_constructor_array): Use it. Use RANGE_EXPR.
3292 (split_nonconstant_init_1): Handle it.
3293 * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
3295 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3298 * parser.c (cp_parser_postfix_expression): Added a new if-statement
3299 and replaced an existing if-statement with else-if statement.
3300 Changed an existing error message wording to match the one from the C
3303 2014-01-08 Jason Merrill <jason@redhat.com>
3306 * class.c (abi_tag_data): Add tags field.
3307 (check_abi_tags): Initialize it.
3308 (find_abi_tags_r): Support collecting missing tags.
3309 (mark_type_abi_tags): Don't look at template args.
3310 (inherit_targ_abi_tags): New.
3311 (check_bases_and_members): Use it.
3312 * cp-tree.h (ABI_TAG_IMPLICIT): New.
3313 * mangle.c (write_abi_tags): Check it.
3315 2014-01-07 Jason Merrill <jason@redhat.com>
3318 * pt.c (num_innermost_template_parms): New.
3319 (get_underlying_template): Use it.
3322 * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
3324 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
3326 * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
3327 the letter of 20.11.6 about Base and Derived naming the same
3328 class type modulo cv-qualifiers.
3330 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
3333 * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
3334 function as unimplemented for generic lambdas with varargs.
3337 * parser.c (cp_parser_template_parameter): Early out with
3338 error_mark_node if parameter declaration was not parsed.
3341 * parser.c (cp_parser_lambda_expression): Save/reset/restore
3342 auto_is_implicit_function_template_parm_p around lambda body.
3345 * parser.c (cp_parser_init_declarator): Undo fully implicit
3346 template parameter list when declarator is not a function.
3348 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
3351 * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
3353 2014-01-03 Tobias Burnus <burnus@net-b.de>
3356 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
3358 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
3362 * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
3363 as include_std to perform_koenig_lookup.
3364 (cp_parser_postfix_expression): Adjust.
3365 * pt.c (tsubst_copy_and_build): Likewise.
3366 * semantics.c (perform_koenig_lookup): Remove bool parameter.
3367 (omp_reduction_lookup): Adjust.
3368 * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
3369 (lookup_arg_dependent): Likewise.
3370 (lookup_function_nonclass): Adjust.
3371 * name-lookup.h: Adjust declaration.
3372 * cp-tree.h: Likewise.
3374 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3377 * parser.c (cp_parser_userdef_numeric_literal): Mention
3378 -fext-numeric-literals in the message.
3380 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3383 * call.c (build_conditional_expr_1): Check the return value of
3386 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3388 * call.c (convert_like_real): Check complain.
3390 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
3393 * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
3396 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3398 Update copyright years
3400 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3402 * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
3403 the standard form for the copyright notice.
3405 Copyright (C) 2014 Free Software Foundation, Inc.
3407 Copying and distribution of this file, with or without modification,
3408 are permitted in any medium without royalty provided the copyright
3409 notice and this notice are preserved.