1 2013-03-29 Jason Merrill <jason@redhat.com>
4 * cp-tree.h (AUTO_IS_DECLTYPE): New.
5 * parser.c (cp_parser_decltype): Handle decltype(auto).
6 (cp_parser_type_id_1): Allow auto without a late-specified
8 (cp_parser_primary_expression): Use the return value of
9 finish_parenthesized_expr.
10 (cp_parser_transaction_expression): Likewise.
11 * semantics.c (force_paren_expr): New.
12 (finish_parenthesized_expr): Use it.
13 * call.c (build_conditional_expr_1): Likewise.
14 * pt.c (do_auto_deduction): Handle decltype(auto).
15 (tsubst_copy): Handle PAREN_EXPR.
16 (tsubst_copy_and_build): Likewise.
17 * error.c (dump_expr): Handle PAREN_EXPR.
18 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
19 * mangle.c (write_expression): Ignore PAREN_EXPR.
21 * parser.c (cp_parser_decltype_expr): Split out...
22 (cp_parser_decltype): ...from here.
26 * pt.c (unify_pack_expansion): Fix indexing.
28 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
30 * call.c (build_java_interface_fn_ref): Likewise.
31 (make_temporary_var_for_ref_to_temp): Likewise.
32 * class.c (check_field_decls): Likewise.
33 (layout_class_type): Likewise.
34 (finish_struct_1): Likewise.
35 (fixed_type_or_null): Likewise.
36 (get_vtbl_decl_for_binfo): Likewise.
37 * cp-gimplify.c (omp_var_to_track): Likewise.
38 (cp_genericize_r): Likewise.
39 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
40 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
41 (DECL_DISCRIMINATOR_P): Likewise.
42 * decl.c (poplevel): Likewise.
43 (decls_match): Likewise.
44 (duplicate_decls): Likewise.
45 (decl_jump_unsafe): Likewise.
46 (start_decl): Likewise.
47 (check_for_uninitialized_const_var): Likewise.
48 (make_rtl_for_nonlocal_decl): Likewise.
49 (cp_finish_decl): Likewise.
50 (expand_static_init): Likewise.
51 (local_variable_p): Likewise.
52 (maybe_register_incomplete_var): Likewise.
53 * decl2.c (grokfield): Likewise.
54 (comdat_linkage): Likewise.
55 (determine_visibility): Likewise.
56 (import_export_decl): Likewise.
57 (prune_vars_needing_no_initialization): Likewise.
58 (decl_maybe_constant_var_p): Likewise.
59 * error.c (dump_simple_decl): Likewise.
60 (dump_template_decl): Likewise.
61 (cp_printer): Likewise.
62 * except.c (build_throw): Likewise.
63 * init.c (build_vtbl_address): Likewise.
64 (member_init_ok_or_else): Likewise.
65 (build_aggr_init): Likewise.
66 (expand_aggr_init_1): Likewise.
67 (build_offset_ref): Likewise.
68 (constant_value_1): Likewise.
69 * mangle.c (write_mangled_name): Likewise.
70 (write_prefix): Likewise.
71 * name-lookup.c (supplement_binding_1): Likewise.
72 (add_decl_to_level): Likewise.
73 (pushdecl_maybe_friend_1): Likewise.
74 (check_for_out_of_scope_variable): Likewise.
75 (validate_nonmember_using_decl): Likewise.
76 (lookup_name_innermost_nonclass_level_1): Likewise.
77 (lookup_arg_dependent_1): Likewise.
78 * parser.c (cp_parser_lambda_introducer): Likewise.
79 (cp_parser_template_argument): Likewise.
80 (cp_parser_single_declaration): Likewise.
81 * pt.c (convert_nontype_argument): Likewise.
82 (instantiate_class_template_1): Likewise.
83 (tsubst_decl): Likewise.
84 (tsubst_expr): Likewise.
85 (do_decl_instantiation): Likewise.
86 (do_type_instantiation): Likewise.
87 (regenerate_decl_from_template): Likewise.
88 (always_instantiate_p): Likewise.
89 (instantiate_decl): Likewise.
90 (type_dependent_expression_p): Likewise.
91 (build_non_dependent_expr): Likewise.
92 * repo.c (repo_emit_p): Likewise.
93 * rtti.c (build_dynamic_cast_1): Likewise.
94 * search.c (shared_member_p): Likewise.
95 * semantics.c (outer_var_p): Likewise.
96 (finish_id_expression): Likewise.
97 (finish_omp_clauses): Likewise.
98 (finish_decltype_type): Likewise.
99 (ensure_literal_type_for_constexpr_object): Likewise.
100 * tree.c (lvalue_kind): Likewise.
101 (bot_replace): Likewise.
102 (cp_tree_equal): Likewise.
103 (handle_init_priority_attribute): Likewise.
104 (decl_storage_duration): Likewise.
105 * typeck.c (cxx_sizeof_expr): Likewise.
106 (cxx_alignof_expr): Likewise.
107 (decay_conversion): Likewise.
108 (build_class_member_access_expr): Likewise.
109 (cp_build_array_ref): Likewise.
110 (cxx_mark_addressable): Likewise.
111 (maybe_warn_about_returning_address_of_local): Likewise.
112 (check_return_expr): Likewise.
113 * typeck2.c (cxx_readonly_error): Likewise.
114 (abstract_virtuals_error_sfinae): Likewise.
115 (cxx_incomplete_type_diagnostic): Likewise.
117 2013-03-28 Lawrence Crowl <crowl@google.com>
120 (CXX_PARSER_H): Add header dependence.
122 (extern debug (cp_binding_level &)): New.
123 (extern debug (cp_binding_level *)): New.
125 (debug (cp_binding_level &)): New.
126 (debug (cp_binding_level *)): New.
128 (debug (cp_parser &)): New.
129 (debug (cp_parser *)): New.
130 (debug (cp_token &)): New.
131 (debug (cp_token *)): New.
132 (debug (vec<cp_token, va_gc> &)): New.
133 (debug (vec<cp_token, va_gc> *)): New.
134 * parser.c: Add header dependence.
135 (extern debug (cp_parser &)): New.
136 (extern debug (cp_parser *)): New.
137 (extern debug (cp_token &)): New.
138 (extern debug (cp_token *)): New.
139 (extern debug (vec<cp_token, va_gc> &)): New.
140 (extern debug (vec<cp_token, va_gc> *)): New.
142 2013-03-28 Jason Merrill <jason@redhat.com>
146 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
147 the type if tf_decltype is set.
148 * pt.c (fn_type_unification): Add decltype_p parm.
149 (get_bindings): Adjust.
151 * class.c (resolve_address_of_overloaded_function): Adjust.
152 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
155 * parser.c (cp_parser_sizeof_pack): Split out from...
156 (cp_parser_sizeof_operand): ...here. Require (id).
159 * semantics.c (finish_this_expr): 'this' is an rvalue.
160 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
163 * semantics.c (finish_member_declaration): Don't push closure
166 * name-lookup.c (pushdecl_maybe_friend_1): Use
167 nonlambda_method_basetype and current_nonlambda_class_type.
170 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
171 conversion from integer to pointer.
172 (cxx_eval_constant_expression): Likewise.
173 (cxx_eval_indirect_ref): Use the folded operand if we still think
174 this might be constant.
176 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
177 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
180 * call.c (convert_like_real): Change series of two permerrors
181 to permerror + inform (and likewise for two errors).
182 (build_new_method_call_1): Likewise.
183 * typeck.c (convert_for_initialization): Change additional
184 warning or error to inform.
186 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
188 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
189 (first_aggr_init_expr): Likewise.
190 (more_aggr_init_expr_args_p): Likewise.
191 (type_of_this_parm): Likewise.
192 (class_of_this_parm): Likewise.
193 * name-lookup.h (get_global_value_if_present): Likewise.
194 (is_typename_at_global_scope): Likewise.
196 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
198 * call.c (joust): Don't call inform for a permerror returning false.
199 * parser.c (cp_parser_check_class_key): Likewise.
200 * pt.c (tsubst_copy_and_build): Likewise.
202 2013-03-27 Jason Merrill <jason@redhat.com>
205 * semantics.c (finish_qualified_id_expr): Return early
208 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
210 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
211 * cvt.c (convert_to_void): Likewise.
212 * error.c (dump_expr): Likewise.
213 * mangle.c (write_expression): Likewise.
214 * parser.c (cp_parser_template_argument): Likewise.
215 * pt.c (convert_nontype_argument): Likewise.
216 (tsubst_copy_and_build): Likewise.
217 * rtti.c (build_typeid): Likewise.
218 * semantics.c (finish_call_expr): Likewise.
219 (finish_decltype_type): Likewise.
220 (build_data_member_initialization): Likewise.
221 * tree.c (is_dummy_object): Likewise.
222 * typeck.c (decay_conversion): Likewise.
223 (build_class_member_access_expr): Likewise.
224 (cp_build_addr_expr_1): Likewise.
225 (unary_complex_lvalue): Likewise.
226 (check_return_expr): Likewise.
227 * typeck2.c (cxx_readonly_error): Likewise.
229 2013-03-26 Jason Merrill <jason@redhat.com>
232 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
233 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
234 * cp-tree.h: Adjust prototype.
237 * typeck2.c (build_m_component_ref): Handle prvalue object.
239 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
241 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
242 * decl.c (duplicate_decls): Likewise.
243 (cp_finish_decl): Likewise.
244 (check_class_member_definition_namespace): Likewise.
245 * decl2.c (grokfield): Likewise.
246 (decl_needed_p): Likewise.
247 (import_export_decl): Likewise.
248 (mark_used): Likewise.
249 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
250 * pt.c (push_access_scope): Likewise.
251 (instantiate_decl): Likewise.
252 * ptree.c (cxx_print_decl): Likewise.
253 * repo.c (repo_emit_p): Likewise.
254 * semantics.c (note_decl_for_pch): Likewise.
255 * tree.c (decl_linkage): Likewise.
257 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
260 * decl.c (check_array_designated_initializer): Handle CONST_DECL
263 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
265 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
268 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
270 2013-03-25 Jason Merrill <jason@redhat.com>
273 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
274 class is derived from the type of the object.
277 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
280 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
283 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
284 DECL_TEMPLATE_INSTANTIATION.
286 2013-03-22 Jason Merrill <jason@redhat.com>
289 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
292 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
294 * cp-tree.h (identifier_p): New.
295 * call.c: Throughout, call identifier_p insstead of direct
296 comparaison of TREE_CODE against IDENTIFIER_NODE.
300 * mangle.c: Likewise.
301 * name-lookup.c: Likewise.
302 * parser.c: Likewise.
304 * search.c: Likewise.
305 * semantics.c: Likewise.
307 * typeck.c: Likewise.
308 * typeck2.c: Likewise.
310 2013-03-21 Jakub Jelinek <jakub@redhat.com>
313 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
314 * call.c (build_temp): Likewise.
315 * method.c (synthesize_method): Likewise.
316 * typeck.c (convert_for_initialization): Likewise.
318 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
320 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
322 2013-03-21 Richard Biener <rguenther@suse.de>
324 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
325 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
327 2013-03-20 Jason Merrill <jason@redhat.com>
330 * parser.c (cp_parser_late_return_type_opt): Save and restore
331 current_class_ptr/ref.
334 * expr.c (cplus_expand_constant): Do nothing if the class is
336 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
337 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
338 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
339 (complete_vars): Likewise.
341 * name-lookup.c (get_anonymous_namespace_name): Never use
342 get_file_function_name.
344 * pt.c (retrieve_specialization): Handle null tmpl argument.
348 * pt.c (tsubst_decl): Check return value of register_specialization.
349 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
352 2013-03-17 Jason Merrill <jason@redhat.com>
356 * parser.c (cp_parser_direct_declarator): Bail if we see a
357 qualified-id not at namespace scope.
361 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
364 2013-03-16 Jason Merrill <jason@redhat.com>
366 * decl.c (grokdeclarator): Assert that we won't see a pointer to
370 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
371 (MAYBE_CLASS_TYPE_P): ...here.
372 * semantics.c (lambda_capture_field_type): Only build a
373 magic decltype for wildcard types.
374 (lambda_proxy_type): Likewise.
375 (finish_non_static_data_member): Get the quals from
379 * parser.c (cp_parser_template_argument): Don't
380 fold_non_dependent_expr.
382 * parser.c (cp_parser_lambda_declarator_opt): Use
383 cp_parser_trailing_type_id.
386 * parser.c (cp_parser_template_id): Don't forget access checks.
389 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
393 * name-lookup.h (tag_scope): Add ts_lambda.
394 * semantics.c (begin_lambda_type): Use it.
395 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
396 * pt.c (check_default_tmpl_args): Ignore lambdas.
397 (push_template_decl_real): Handle lambdas.
398 * tree.c (no_linkage_check): Adjust lambda check.
401 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
404 * parser.c (cp_parser_direct_declarator): Fix late return
405 for out-of-class defn of member function.
408 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
409 parms to avoid duplicate -Wshadow warnings.
411 * search.c (lookup_base): Handle NULL_TREE.
414 * semantics.c (potential_constant_expression_1): Use of 'this' in
415 a non-constexpr function makes the expression not potentially
420 * cp-tree.h (tsubst_flags): Add tf_decltype.
421 * call.c (build_cxx_call): Don't build a temporary if it's set.
422 (build_over_call): Make sure it's only passed to build_cxx_call.
423 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
424 (cp_parser_unary_expression): Likewise.
425 (cp_parser_cast_expression): Likewise.
426 (cp_parser_binary_expression): Likewise.
427 (cp_parser_assignment_expression): Likewise.
428 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
429 (cp_parser_expression): Add decltype_p. Force a
430 temporary for a call on the LHS of a comma.
431 (cp_parser_decltype): Pass true to decltype_p parms.
432 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
433 (tsubst_copy_and_build): Pass tf_decltype down only for
434 CALL_EXPR and the RHS of COMPOUND_EXPR.
435 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
437 * cp-tree.h (abstract_class_use): New enum.
438 * typeck2.c (pending_abstract_type): Add use field.
439 (abstract_virtuals_error_sfinae): Add overloads taking
440 abstract_class_use instead of tree.
441 * typeck.c (build_static_cast_1): Call it.
442 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
443 * pt.c: Adjust calls.
444 * decl.c (cp_finish_decl): Don't handle functions specially.
445 (grokdeclarator): Always check return type.
446 * init.c (build_new_1): Adjust call.
450 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
451 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
454 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
455 (tsubst_arg_types): Likewise.
459 * call.c (convert_like_real): Check for explicit constructors
460 even for value-initialization.
463 * pt.c (convert_nontype_argument): Handle invalid pointer.
465 * parser.c (cp_parser_lambda_expression): Use nreverse.
469 * pt.c (instantiate_class_template_1): Instantiate lambda capture
471 (tsubst_copy_and_build): Not here.
474 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
477 * parser.c (parsing_nsdmi): New.
478 * semantics.c (outer_automatic_var_p): Check it.
479 (finish_id_expression): Likewise.
480 * cp-tree.h: Declare it.
483 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
485 * parser.c (lookup_literal_operator): Correct parm/arg naming
489 * pt.c (fold_non_dependent_expr_sfinae): Check
490 instantiation_dependent_expression_p.
493 * class.c (resolve_address_of_overloaded_function): Accept a
494 reference to function for target_type.
495 (instantiate_type): Likewise.
496 * pt.c (convert_nontype_argument): Pass it to
497 convert_nontype_argument_function.
499 2013-03-16 Jakub Jelinek <jakub@redhat.com>
501 * tree.c (cp_tree_equal): Fix a pasto.
504 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
505 pass op1 through maybe_constant_value first.
507 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
510 * semantics.c (cxx_eval_array_reference): Check for negative index.
512 2013-03-14 Jason Merrill <jason@redhat.com>
515 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
518 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
519 dso_handle parm on targets without __cxa_atexit.
521 2013-03-11 Jason Merrill <jason@redhat.com>
524 * typeck.c (check_return_expr): Disallow returning init list here.
525 * semantics.c (apply_deduced_return_type): Not here.
527 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
530 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
531 * error.c (dump_expr): Likewise.
533 2013-03-08 Jason Merrill <jason@redhat.com>
536 * class.c (modify_all_vtables): Mangle the vtable name before
539 * semantics.c (lambda_expr_this_capture): In unevaluated context,
540 just return the nearest 'this'.
545 * tree.c (maybe_dummy_object): Don't capture 'this'.
546 * semantics.c (maybe_resolve_dummy): New.
547 (finish_non_static_data_member): Use it.
548 (finish_qualified_id_expr): Don't test is_dummy_object.
549 * cp-tree.h: Declare maybe_resolve_dummy.
550 * call.c (build_new_method_call_1): Use it.
553 * semantics.c (apply_deduced_return_type): Don't allow returning
554 std::initializer_list.
556 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
559 * parser.c (cp_parser_elaborated_type_specifier): Don't call
560 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
561 * decl.c (check_elaborated_type_specifier): Tidy.
563 2013-03-06 Jakub Jelinek <jakub@redhat.com>
566 * tree.c (strip_typedefs): Don't copy args if they are NULL.
568 2013-03-05 Jakub Jelinek <jakub@redhat.com>
570 * parser.c (cp_parser_braced_list): For {} initialize
571 *non_constant_p to false.
573 2013-03-04 Jason Merrill <jason@redhat.com>
577 * semantics.c (lambda_expr_this_capture): Handle NSDMI
578 and non-class scopes.
580 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
582 * decl.c (grokdeclarator): Remove dead code.
584 2013-02-28 Jason Merrill <jason@redhat.com>
587 * semantics.c (potential_constant_expression_1): Use
588 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
591 * call.c (build_over_call): Avoid virtual lookup in a template.
593 2013-02-27 Jason Merrill <jason@redhat.com>
597 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
598 of the base name for inheriting ctors.
599 (push_class_level_binding_1): Remove inheriting ctor handling.
600 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
601 * class.c (add_implicitly_declared_members): Adjust.
603 2013-02-26 David Binderman <dcb314@hotmail.com>
606 * decl.c (grokdeclarator): Tidy publicp assignment.
608 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
611 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
612 (build_transaction_expr): Same.
614 2013-02-25 Jason Merrill <jason@redhat.com>
617 * pt.c (fn_type_unification): Wait to call push_tinst_level until
618 we know what args we're looking at.
621 * semantics.c (potential_constant_expression_1): In C++98, a cast
622 to non-integral type can't be a constant expression.
624 2013-02-24 Jakub Jelinek <jakub@redhat.com>
627 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
630 2013-02-22 Jason Merrill <jason@redhat.com>
633 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
634 if we got the wrong number of template parms.
637 * pt.c (fn_type_unification): Use explicit args in template
638 instantiation context.
641 * call.c (can_convert_arg): Discard access checks.
644 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
647 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
650 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
651 * cvt.c (ocp_convert): Use the latter.
652 (cp_convert_to_pointer): Likewise.
653 * decl.c (check_default_argument): Likewise.
654 * typeck.c (cp_build_binary_op): Likewise.
655 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
657 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
658 Paolo Carlini <paolo.carlini@oracle.com>
661 * decl2.c (grokbitfield): Allow scoped enumeration types.
663 2013-02-15 Jason Merrill <jason@redhat.com>
666 * semantics.c (finish_id_expression): Also return the identifier
667 for an outer local static.
670 * class.c (check_bases_and_members): Deduce noexcept after
674 * semantics.c (finish_id_expression): In a template, return
675 the identifier for a constant variable.
677 2013-02-14 Jason Merrill <jason@redhat.com>
680 * semantics.c (build_anon_member_initialization): New.
681 (build_data_member_initialization): Use it.
684 * decl.c (cp_finish_decl): Force instantiation of an
685 auto static data member.
688 * pt.c (unify): A pack expansion that is not the last template
689 argument makes the entire template argument list non-deduced.
692 * name-lookup.c (do_class_using_decl): Handle typedefs with
693 inheriting constructors.
694 (push_class_level_binding_1): Allow inheriting from template
695 template parameter, too.
696 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
699 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
700 default argument scope.
701 * mangle.c (write_name): Likewise.
704 * error.c (find_typenames_r): Don't walk into a pack expansion.
706 2013-02-13 Jason Merrill <jason@redhat.com>
709 * parser.c (cp_parser_member_declaration): Check the declarator
710 form when detecting a function declaration via typedef.
713 * pt.c (maybe_process_partial_specialization): A lambda
714 isn't what's being specialized.
717 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
721 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
724 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
725 non-zero offsets, too.
728 * decl.c (build_enumerator): Always convert the value to a
729 fixed underlying type.
732 * pt.c (tsubst_copy_and_build): Don't forget any new
733 captures that arose from use of dependent names.
735 2013-02-13 Jakub Jelinek <jakub@redhat.com>
738 * semantics.c (finish_asm_stmt): If input constraints allow
739 neither register nor memory, try maybe_constant_value to get
740 a constant if possible.
742 2013-02-12 Jason Merrill <jason@redhat.com>
745 * method.c (add_one_base_init): Handle base constructor
746 taking rvalue reference parm.
749 * semantics.c (sort_constexpr_mem_initializers): Handle
752 2013-02-09 Jason Merrill <jason@redhat.com>
755 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
756 maybe_instantiate_noexcept.
759 * pt.c (eq_specializations): Set comparing_specializations.
760 * tree.c (cp_tree_equal): Check it.
761 * cp-tree.h: Declare it.
763 * decl.c (decls_match): Check versions later.
766 * pt.c (build_non_dependent_expr): Don't try to fold
767 instantiation-dependent expressions.
768 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
769 [BIND_EXPR]: Treat as dependent.
771 2013-02-07 Jakub Jelinek <jakub@redhat.com>
774 * init.c (build_vec_init): Don't append NULL values into new_vec.
775 (build_zero_init_1): Don't push anything into v if recursive call
777 (build_value_init_noctor): Don't push anything into v if
778 build_value_init call returned NULL_TREE.
781 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
782 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
783 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
784 return true only if 2nd token isn't CPP_CLOSE_PAREN.
785 (cp_parser_cast_expression): Adjust caller.
788 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
789 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
790 DECL_LANG_SPECIFIC (t).
792 2013-02-07 Jason Merrill <jason@redhat.com>
795 * method.c (do_build_copy_constructor): Don't bother turning
796 scalars from lvalues to xvalues.
797 (do_build_copy_assign): Likewise.
799 2013-02-06 Jason Merrill <jason@redhat.com>
801 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
803 2013-02-05 Jason Merrill <jason@redhat.com>
806 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
810 * decl.c (start_preparsed_function): Update restype if we change
814 * pt.c (fn_type_unification): Discard any access checks from
815 substituting explicit args.
817 2013-01-31 Jason Merrill <jason@redhat.com>
821 * typeck.c (get_member_function_from_ptrfunc): Fix
822 ptrmemfunc_vbit_in_delta case.
824 2013-01-29 Jason Merrill <jason@redhat.com>
827 * class.c (build_ctor_vtbl_group): Give construction vtables
830 2013-01-25 Jason Merrill <jason@redhat.com>
833 * pt.c (convert_nontype_argument_function): Handle invalid input.
834 (convert_nontype_argument): Likewise.
837 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
838 dynamic type has no virtual functions.
840 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
843 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
844 on TARGET_EXPR nodes.
846 2013-01-22 Jason Merrill <jason@redhat.com>
849 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
851 2013-01-22 Dodji Seketeli <dodji@redhat.com>
854 * pt.c (argument_pack_element_is_expansion_p)
855 (make_argument_pack_select, use_pack_expansion_extra_args_p)
856 (gen_elem_of_pack_expansion_instantiation): New static functions.
857 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
858 look through the possibly resulting pack expansion as well.
859 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
860 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
861 Use gen_elem_of_pack_expansion_instantiation to build the
862 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
863 as gen_elem_of_pack_expansion_instantiation and the change in
864 tsubst above generalize this particular case.
865 (arg_from_parm_pack_p): Remove this for it's not used by
866 tsubst_pack_expansion anymore.
868 2013-01-21 Jason Merrill <jason@redhat.com>
871 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
874 2013-01-18 Jason Merrill <jason@redhat.com>
877 * decl2.c (get_local_tls_init_fn): New.
878 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
879 with aliases for internal variables. Don't use weakrefs if
880 the variable needs destruction.
881 (generate_tls_wrapper): Mark the wrapper as const if no
882 initialization is needed.
883 (handle_tls_init): Don't require aliases.
885 2013-01-15 Dodji Seketeli <dodji@redhat.com>
888 * pt.c (coerce_innermost_template_parms): New static function.
889 (instantiate_alias_template): Use it here.
891 2013-01-09 Jason Merrill <jason@redhat.com>
894 * rtti.c (build_typeid, get_typeid): Add complain parm.
895 (get_tinfo_decl_dynamic): Likewise.
896 * cp-tree.h, parser.c, pt.c: Adjust.
899 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
902 2013-01-09 Jakub Jelinek <jakub@redhat.com>
905 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
906 call maybe_constant_value for the negative or too big shift
909 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
912 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
913 of the argument is true.
915 2013-01-08 Joel Brobecker <brobecker@adacore.com>
917 * parser.c (cp_parser_initializer_list): Move declaration
918 of variable non_const to start of lexical block.
920 2013-01-07 Jason Merrill <jason@redhat.com>
923 * tree.c (build_aggr_init_expr): Do nothing in a template.
924 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
925 a FUNCTION_DECL before tsubsting.
927 2013-01-04 Dodji Seketeli <dodji@redhat.com>
930 * pt.c (check_instantiated_arg): Allow type template arguments.
932 2013-01-04 Jason Merrill <jason@redhat.com>
935 * decl.c (reset_type_linkage, bt_reset_linkage): New.
936 (grokdeclarator): Use reset_type_linkage.
937 * name-lookup.c (binding_table_foreach): Handle null table.
938 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
940 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
943 * parser.c (cp_parser_template_id): Revert core of previous change
944 (keep adjusted inform message).
946 2013-01-03 Jason Merrill <jason@redhat.com>
950 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
954 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
957 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
960 * call.c (type_has_extended_temps): New.
961 * cp-tree.h: Declare it.
962 * decl.c (check_initializer): Use build_aggr_init for arrays
964 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
966 2013-01-02 Jason Merrill <jason@redhat.com>
969 * call.c (build_new_method_call_1): Don't use build_value_init for
970 user-provided default constructors.
972 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
976 * tree.c (build_cplus_array_type): Copy layout information
977 to main variant if necessary.
979 Copyright (C) 2013 Free Software Foundation, Inc.
981 Copying and distribution of this file, with or without modification,
982 are permitted in any medium without royalty provided the copyright
983 notice and this notice are preserved.