f1cf2ce40c6b6b48b9fbdc759be53aa96e98b702
[gcc.git] / gcc / cp / ChangeLog
1 2013-04-11 Jason Merrill <jason@redhat.com>
2
3 PR c++/23055
4 * pt.c (uses_deducible_template_parms): New.
5 (deducible_array_bound, deducible_expression): New.
6 (deducible_template_args): New.
7 (unify_one_argument): Call uses_deducible_template_parms.
8
9 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
10
11 PR c++/56913
12 * typeck2.c (build_m_component_ref): Protect error calls with
13 (complain & tf_error).
14
15 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
16
17 PR c++/54216
18 * parser.c (cp_parser_enum_specifier): Check for empty
19 anonymous enums and anonymous scoped enums.
20
21 2013-04-10 Jakub Jelinek <jakub@redhat.com>
22
23 PR c++/56895
24 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
25 first before calling maybe_constant_value for warn_for_div_by_zero
26 or invalid shift count warning purposes.
27
28 2013-04-09 Jason Merrill <jason@redhat.com>
29
30 PR c++/25466
31 * rtti.c (build_typeid): Check the address of the argument
32 rather than looking for an INDIRECT_REF.
33
34 2013-04-04 Jason Merrill <jason@redhat.com>
35
36 PR c++/56838
37 PR c++/17232
38 * typeck2.c (abstract_virtuals_error_sfinae): Disable
39 complete_type again.
40
41 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
42
43 PR c++/56871
44 * decl.c (validate_constexpr_redeclaration): Allow an explicit
45 specialization to be different wrt the constexpr specifier.
46
47 2013-04-06 Jason Merrill <jason@redhat.com>
48
49 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
50 noreturn attribute.
51
52 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
53
54 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
55 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
56
57 2013-04-03 Jason Merrill <jason@redhat.com>
58
59 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
60 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
61 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
62
63 * mangle.c (write_type): When writing a function type with
64 function-cv-quals, don't add the unqualified type as a
65 substitution candidate.
66
67 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
68
69 PR c++/56815
70 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
71 pedwarn.
72
73 2013-04-03 Jakub Jelinek <jakub@redhat.com>
74
75 PR debug/56819
76 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
77 from args to new_args.
78 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
79 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
80
81 2013-04-02 Jason Merrill <jason@redhat.com>
82
83 PR c++/56821
84 * mangle.c (write_function_type): Mangle ref-qualifier.
85 (write_nested_name): Likewise.
86 (canonicalize_for_substitution): Preserve ref-qualifier.
87 (write_type): Likewise.
88
89 PR c++/34949
90 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
91
92 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
93
94 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
95 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
96 (for_each_template_parm_r): Use TYPE_TI_ARGS.
97
98 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
99
100 * cp-tree.h (TAGGED_TYPE_P): Remove.
101 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
102 (TYPE_ANONYMOUS_P): Adjust.
103 * call.c (build_new_op_1): Likewise.
104 * class.c (find_abi_tags_r): Likewise.
105 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
106 type_is_deprecated): Likewise.
107 * decl2.c (grokfield, min_vis_r): Likewise.
108 * pt.c (get_template_info): Likewise.
109 * tree.c (handle_abi_tag_attribute): Likewise.
110
111 2013-04-01 Jason Merrill <jason@redhat.com>
112
113 * semantics.c (maybe_constant_value): Check
114 instantiation_dependent_expression_p.
115 * pt.c (build_non_dependent_expr): Don't check it here.
116
117 PR c++/56772
118 * init.c (build_new): Don't try to process an array initializer
119 at template definition time.
120
121 PR c++/56793
122 * typeck.c (finish_class_member_access_expr): Handle enum scope.
123
124 PR c++/56794
125 * parser.c (cp_parser_range_for): Don't try to do auto deduction
126 in a template if the type of the range is incomplete.
127
128 * call.c (add_function_candidate): Take the address of 'this' here.
129 (build_over_call): And here.
130 (build_new_method_call_1, build_op_call_1): Not here.
131 (build_user_type_conversion_1): Or here.
132 (add_candidates): Adjust.
133
134 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
135 * class.c (same_signature_p): Use type_memfn_quals.
136 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
137 FUNCTION_OR_METHOD_TYPE_CHECK.
138 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
139 * pt.c (unify): Use static_fn_type.
140
141 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
142 Jason Merrill <jason@redhat.com>
143
144 Implement N2439 (ref-qualifiers for 'this')
145 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
146 (FUNCTION_RVALUE_QUALIFIED): New.
147 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
148 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
149 (cp_ref_qualifier): New enum.
150 (cp_declarator): Add ref_qualifier.
151 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
152 (cp_parser_direct_declarator): Use it.
153 (make_call_declarator): Adjust.
154 (cp_parser_lambda_declarator_opt): Adjust.
155 * call.c (add_function_candidate): Handle ref-qualifier overload
156 resolution semantics.
157 (standard_conversion): Adjust.
158 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
159 * decl.c (grokdeclarator): Handle ref-qualifiers.
160 (grokfndecl): Check for invalid ref-qualifiers.
161 (static_fn_type, revert_static_member_fn): Adjust.
162 * decl2.c (build_memfn_type): Handle ref-qualifiers.
163 (check_classfn): Check them.
164 (cp_reconstruct_complex_type): Retain them.
165 * error.c (dump_ref_qualifier): New.
166 (dump_type_suffix, dump_function_decl): Use it.
167 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
168 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
169 (unify): Retain them.
170 * tree.c (cp_check_qualified_type): New.
171 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
172 (build_ref_qualified_type): New.
173 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
174 (cp_build_type_attribute_variant): Keep ref-qualifier.
175 * typeck.c (merge_types): Keep ref-qualifier.
176 (structural_comptypes): Compare ref-qualifier.
177 (type_memfn_rqual): New.
178 (apply_memfn_quals): Take ref-qual argument.
179 * typeck2.c (build_m_component_ref): Check ref-qualifier.
180
181 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
182
183 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
184 (DECL_FUNCTION_TEMPLATE_P): Adjust.
185
186 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
187 pp_cxx_qualified_id): Use get_containing_scope.
188 * parser.c (cp_parser_class_head): Likewise.
189 * pt.c (push_template_decl_real): Likewise.
190
191 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
192 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
193
194 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
195
196 * decl2.c (collect_candidates_for_java_method_aliases): Use
197 DECL_CLASS_SCOPE_P.
198 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
199 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
200 * decl.c (duplicate_decls): Likewise.
201 * parser.c (cp_parser_template_declaration_after_export): Likewise,
202 also DECL_DECLARES_TYPE_P.
203 * pt.c (instantiate_class_template_1): Likewise.
204 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
205 (lookup_field_r): Likewise.
206 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
207 (lookup_fnfields_slot_nolazy): Likewise.
208 * semantics.c (finish_member_declaration): Likewise.
209 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
210
211 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
212
213 * pt.c (template_parms_to_args): Fix typo in comment.
214
215 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
216
217 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
218
219 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
220
221 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
222 (build_op_call_1): Likewise.
223 (build_over_call): Likewise.
224 (compare_ics): Likewise.
225 * class.c (build_base_path): Likewise.
226 (resolve_address_of_overloaded_function): Likewise.
227 * cp-tree.h: Likewise.
228 * cvt.c (cp_convert_to_pointer): Likewise.
229 (convert_to_reference): Likewise.
230 (ocp_convert): Likewise.
231 (convert_force): Likewise, tidy.
232 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
233 (pp_cxx_ptr_operator): Likewise.
234 * decl.c (duplicate_decls): Likewise.
235 (start_decl): Likewise.
236 (grok_op_properties): Likewise.
237 (start_preparsed_function): Likewise.
238 (store_parm_decls): Likewise.
239 (finish_function): Likewise.
240 * decl2.c (delete_sanity): Likewise.
241 (acceptable_java_type): Likewise.
242 (grokbitfield): Likewise.
243 (cp_reconstruct_complex_type): Likewise.
244 * error.c (dump_type_prefix): Likewise.
245 (dump_expr): Likewise.
246 * except.c (push_eh_cleanup): Likewise.
247 (complete_ptr_ref_or_void_ptr_p): Likewise.
248 (can_convert_eh): Likewise.
249 * init.c (build_new_1): Likewise.
250 (build_delete): Likewise.
251 (build_vec_delete): Likewise.
252 * mangle.c (write_type): Likewise.
253 * parser.c (lookup_literal_operator): Likewise.
254 * pt.c (convert_nontype_argument_function): Likewise.
255 (convert_nontype_argument): Likewise.
256 (tsubst): Likewise.
257 (unify): Likewise.
258 (dependent_type_p_r): Likewise.
259 * rtti.c (build_headof): Likewise.
260 (build_typeid): Likewise.
261 (build_dynamic_cast_1): Likewise.
262 (target_incomplete_p): Likewise.
263 (typeinfo_in_lib_p): Likewise.
264 * semantics.c (finish_omp_for): Likewise.
265 (cxx_eval_call_expression): Likewise.
266 (maybe_resolve_dummy): Likewise.
267 * tree.c (build_target_expr): Likewise.
268 (cp_build_qualified_type_real): Likewise.
269 * typeck.c (composite_pointer_type_r): Likewise.
270 (composite_pointer_type): Likewise.
271 (comp_except_types): Likewise.
272 (cxx_sizeof_nowarn): Likewise.
273 (string_conv_p): Likewise.
274 (cp_build_array_ref): Likewise.
275 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
276 (pointer_diff): Likewise.
277 (cp_build_addr_expr_1): Likewise.
278 (cp_build_unary_op): Likewise.
279 (build_static_cast_1): Likewise.
280 (cp_build_c_cast): Likewise.
281 (comp_ptr_ttypes_real): Likewise.
282 (ptr_reasonably_similar): Likewise.
283 (comp_ptr_ttypes_const): Likewise.
284 (casts_away_constness): Likewise.
285 (check_literal_operator_args): Likewise.
286 * typeck2.c (build_x_arrow): Likewise.
287 (add_exception_specifier): Likewise.
288
289 2013-03-29 Jason Merrill <jason@redhat.com>
290
291 N3582
292 * cp-tree.h (AUTO_IS_DECLTYPE): New.
293 * parser.c (cp_parser_decltype): Handle decltype(auto).
294 (cp_parser_type_id_1): Allow auto without a late-specified
295 return in C++1y.
296 (cp_parser_primary_expression): Use the return value of
297 finish_parenthesized_expr.
298 (cp_parser_transaction_expression): Likewise.
299 * semantics.c (force_paren_expr): New.
300 (finish_parenthesized_expr): Use it.
301 * call.c (build_conditional_expr_1): Likewise.
302 * pt.c (do_auto_deduction): Handle decltype(auto).
303 (tsubst_copy): Handle PAREN_EXPR.
304 (tsubst_copy_and_build): Likewise.
305 * error.c (dump_expr): Handle PAREN_EXPR.
306 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
307 * mangle.c (write_expression): Ignore PAREN_EXPR.
308
309 * parser.c (cp_parser_decltype_expr): Split out...
310 (cp_parser_decltype): ...from here.
311
312 PR c++/56774
313 PR c++/35722
314 * pt.c (unify_pack_expansion): Fix indexing.
315
316 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
317
318 * call.c (build_java_interface_fn_ref): Likewise.
319 (make_temporary_var_for_ref_to_temp): Likewise.
320 * class.c (check_field_decls): Likewise.
321 (layout_class_type): Likewise.
322 (finish_struct_1): Likewise.
323 (fixed_type_or_null): Likewise.
324 (get_vtbl_decl_for_binfo): Likewise.
325 * cp-gimplify.c (omp_var_to_track): Likewise.
326 (cp_genericize_r): Likewise.
327 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
328 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
329 (DECL_DISCRIMINATOR_P): Likewise.
330 * decl.c (poplevel): Likewise.
331 (decls_match): Likewise.
332 (duplicate_decls): Likewise.
333 (decl_jump_unsafe): Likewise.
334 (start_decl): Likewise.
335 (check_for_uninitialized_const_var): Likewise.
336 (make_rtl_for_nonlocal_decl): Likewise.
337 (cp_finish_decl): Likewise.
338 (expand_static_init): Likewise.
339 (local_variable_p): Likewise.
340 (maybe_register_incomplete_var): Likewise.
341 * decl2.c (grokfield): Likewise.
342 (comdat_linkage): Likewise.
343 (determine_visibility): Likewise.
344 (import_export_decl): Likewise.
345 (prune_vars_needing_no_initialization): Likewise.
346 (decl_maybe_constant_var_p): Likewise.
347 * error.c (dump_simple_decl): Likewise.
348 (dump_template_decl): Likewise.
349 (cp_printer): Likewise.
350 * except.c (build_throw): Likewise.
351 * init.c (build_vtbl_address): Likewise.
352 (member_init_ok_or_else): Likewise.
353 (build_aggr_init): Likewise.
354 (expand_aggr_init_1): Likewise.
355 (build_offset_ref): Likewise.
356 (constant_value_1): Likewise.
357 * mangle.c (write_mangled_name): Likewise.
358 (write_prefix): Likewise.
359 * name-lookup.c (supplement_binding_1): Likewise.
360 (add_decl_to_level): Likewise.
361 (pushdecl_maybe_friend_1): Likewise.
362 (check_for_out_of_scope_variable): Likewise.
363 (validate_nonmember_using_decl): Likewise.
364 (lookup_name_innermost_nonclass_level_1): Likewise.
365 (lookup_arg_dependent_1): Likewise.
366 * parser.c (cp_parser_lambda_introducer): Likewise.
367 (cp_parser_template_argument): Likewise.
368 (cp_parser_single_declaration): Likewise.
369 * pt.c (convert_nontype_argument): Likewise.
370 (instantiate_class_template_1): Likewise.
371 (tsubst_decl): Likewise.
372 (tsubst_expr): Likewise.
373 (do_decl_instantiation): Likewise.
374 (do_type_instantiation): Likewise.
375 (regenerate_decl_from_template): Likewise.
376 (always_instantiate_p): Likewise.
377 (instantiate_decl): Likewise.
378 (type_dependent_expression_p): Likewise.
379 (build_non_dependent_expr): Likewise.
380 * repo.c (repo_emit_p): Likewise.
381 * rtti.c (build_dynamic_cast_1): Likewise.
382 * search.c (shared_member_p): Likewise.
383 * semantics.c (outer_var_p): Likewise.
384 (finish_id_expression): Likewise.
385 (finish_omp_clauses): Likewise.
386 (finish_decltype_type): Likewise.
387 (ensure_literal_type_for_constexpr_object): Likewise.
388 * tree.c (lvalue_kind): Likewise.
389 (bot_replace): Likewise.
390 (cp_tree_equal): Likewise.
391 (handle_init_priority_attribute): Likewise.
392 (decl_storage_duration): Likewise.
393 * typeck.c (cxx_sizeof_expr): Likewise.
394 (cxx_alignof_expr): Likewise.
395 (decay_conversion): Likewise.
396 (build_class_member_access_expr): Likewise.
397 (cp_build_array_ref): Likewise.
398 (cxx_mark_addressable): Likewise.
399 (maybe_warn_about_returning_address_of_local): Likewise.
400 (check_return_expr): Likewise.
401 * typeck2.c (cxx_readonly_error): Likewise.
402 (abstract_virtuals_error_sfinae): Likewise.
403 (cxx_incomplete_type_diagnostic): Likewise.
404
405 2013-03-28 Lawrence Crowl <crowl@google.com>
406
407 * Make-lang.in
408 (CXX_PARSER_H): Add header dependence.
409 * cp-tree.h
410 (extern debug (cp_binding_level &)): New.
411 (extern debug (cp_binding_level *)): New.
412 * name-lookup.h
413 (debug (cp_binding_level &)): New.
414 (debug (cp_binding_level *)): New.
415 * parser.c
416 (debug (cp_parser &)): New.
417 (debug (cp_parser *)): New.
418 (debug (cp_token &)): New.
419 (debug (cp_token *)): New.
420 (debug (vec<cp_token, va_gc> &)): New.
421 (debug (vec<cp_token, va_gc> *)): New.
422 * parser.c: Add header dependence.
423 (extern debug (cp_parser &)): New.
424 (extern debug (cp_parser *)): New.
425 (extern debug (cp_token &)): New.
426 (extern debug (cp_token *)): New.
427 (extern debug (vec<cp_token, va_gc> &)): New.
428 (extern debug (vec<cp_token, va_gc> *)): New.
429
430 2013-03-28 Jason Merrill <jason@redhat.com>
431
432 PR c++/17232
433 PR c++/52748
434 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
435 the type if tf_decltype is set.
436 * pt.c (fn_type_unification): Add decltype_p parm.
437 (get_bindings): Adjust.
438 * cp-tree.h: Adjust.
439 * class.c (resolve_address_of_overloaded_function): Adjust.
440 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
441
442 PR c++/56679
443 * parser.c (cp_parser_sizeof_pack): Split out from...
444 (cp_parser_sizeof_operand): ...here. Require (id).
445
446 PR c++/56701
447 * semantics.c (finish_this_expr): 'this' is an rvalue.
448 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
449
450 PR c++/56710
451 * semantics.c (finish_member_declaration): Don't push closure
452 members.
453
454 * name-lookup.c (pushdecl_maybe_friend_1): Use
455 nonlambda_method_basetype and current_nonlambda_class_type.
456
457 PR c++/56728
458 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
459 conversion from integer to pointer.
460 (cxx_eval_constant_expression): Likewise.
461 (cxx_eval_indirect_ref): Use the folded operand if we still think
462 this might be constant.
463
464 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
465 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
466
467 PR c++/56725
468 * call.c (convert_like_real): Change series of two permerrors
469 to permerror + inform (and likewise for two errors).
470 (build_new_method_call_1): Likewise.
471 * typeck.c (convert_for_initialization): Change additional
472 warning or error to inform.
473
474 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
475
476 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
477 (first_aggr_init_expr): Likewise.
478 (more_aggr_init_expr_args_p): Likewise.
479 (type_of_this_parm): Likewise.
480 (class_of_this_parm): Likewise.
481 * name-lookup.h (get_global_value_if_present): Likewise.
482 (is_typename_at_global_scope): Likewise.
483
484 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
485
486 * call.c (joust): Don't call inform for a permerror returning false.
487 * parser.c (cp_parser_check_class_key): Likewise.
488 * pt.c (tsubst_copy_and_build): Likewise.
489
490 2013-03-27 Jason Merrill <jason@redhat.com>
491
492 PR c++/56749
493 * semantics.c (finish_qualified_id_expr): Return early
494 for enum scope.
495
496 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
497
498 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
499 * cvt.c (convert_to_void): Likewise.
500 * error.c (dump_expr): Likewise.
501 * mangle.c (write_expression): Likewise.
502 * parser.c (cp_parser_template_argument): Likewise.
503 * pt.c (convert_nontype_argument): Likewise.
504 (tsubst_copy_and_build): Likewise.
505 * rtti.c (build_typeid): Likewise.
506 * semantics.c (finish_call_expr): Likewise.
507 (finish_decltype_type): Likewise.
508 (build_data_member_initialization): Likewise.
509 * tree.c (is_dummy_object): Likewise.
510 * typeck.c (decay_conversion): Likewise.
511 (build_class_member_access_expr): Likewise.
512 (cp_build_addr_expr_1): Likewise.
513 (unary_complex_lvalue): Likewise.
514 (check_return_expr): Likewise.
515 * typeck2.c (cxx_readonly_error): Likewise.
516
517 2013-03-26 Jason Merrill <jason@redhat.com>
518
519 PR c++/52597
520 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
521 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
522 * cp-tree.h: Adjust prototype.
523
524 PR c++/45282
525 * typeck2.c (build_m_component_ref): Handle prvalue object.
526
527 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
528
529 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
530 * decl.c (duplicate_decls): Likewise.
531 (cp_finish_decl): Likewise.
532 (check_class_member_definition_namespace): Likewise.
533 * decl2.c (grokfield): Likewise.
534 (decl_needed_p): Likewise.
535 (import_export_decl): Likewise.
536 (mark_used): Likewise.
537 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
538 * pt.c (push_access_scope): Likewise.
539 (instantiate_decl): Likewise.
540 * ptree.c (cxx_print_decl): Likewise.
541 * repo.c (repo_emit_p): Likewise.
542 * semantics.c (note_decl_for_pch): Likewise.
543 * tree.c (decl_linkage): Likewise.
544
545 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
546
547 PR c++/55951
548 * decl.c (check_array_designated_initializer): Handle CONST_DECL
549 as ce->index.
550
551 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
552
553 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
554 error messages.
555
556 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
557
558 2013-03-25 Jason Merrill <jason@redhat.com>
559
560 PR c++/56699
561 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
562 class is derived from the type of the object.
563
564 PR c++/52014
565 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
566 unevaluated context.
567
568 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
569
570 PR c++/56722
571 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
572 DECL_TEMPLATE_INSTANTIATION.
573
574 2013-03-22 Jason Merrill <jason@redhat.com>
575
576 PR c++/56684
577 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
578 and CONST_DECL.
579
580 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
581
582 * cp-tree.h (identifier_p): New.
583 * call.c: Throughout, call identifier_p insstead of direct
584 comparaison of TREE_CODE against IDENTIFIER_NODE.
585 * decl.c: Likewisse.
586 * decl2.c: Likewise.
587 * init.c: Likewise.
588 * mangle.c: Likewise.
589 * name-lookup.c: Likewise.
590 * parser.c: Likewise.
591 * pt.c: Likewise.
592 * search.c: Likewise.
593 * semantics.c: Likewise.
594 * tree.c: Likewise.
595 * typeck.c: Likewise.
596 * typeck2.c: Likewise.
597
598 2013-03-21 Jakub Jelinek <jakub@redhat.com>
599
600 PR middle-end/48087
601 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
602 * call.c (build_temp): Likewise.
603 * method.c (synthesize_method): Likewise.
604 * typeck.c (convert_for_initialization): Likewise.
605
606 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
607
608 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
609
610 2013-03-21 Richard Biener <rguenther@suse.de>
611
612 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
613 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
614
615 2013-03-20 Jason Merrill <jason@redhat.com>
616
617 PR c++/56646
618 * parser.c (cp_parser_late_return_type_opt): Save and restore
619 current_class_ptr/ref.
620
621 PR c++/54532
622 * expr.c (cplus_expand_constant): Do nothing if the class is
623 incomplete.
624 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
625 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
626 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
627 (complete_vars): Likewise.
628
629 * name-lookup.c (get_anonymous_namespace_name): Never use
630 get_file_function_name.
631
632 * pt.c (retrieve_specialization): Handle null tmpl argument.
633
634 PR c++/17232
635 PR c++/56642
636 * pt.c (tsubst_decl): Check return value of register_specialization.
637 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
638 change.
639
640 2013-03-17 Jason Merrill <jason@redhat.com>
641
642 PR c++/54359
643 PR c++/56639
644 * parser.c (cp_parser_direct_declarator): Bail if we see a
645 qualified-id not at namespace scope.
646
647 PR c++/17232
648 PR c++/56642
649 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
650 change for now.
651
652 2013-03-16 Jason Merrill <jason@redhat.com>
653
654 * decl.c (grokdeclarator): Assert that we won't see a pointer to
655 METHOD_TYPE.
656
657 PR c++/54277
658 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
659 (MAYBE_CLASS_TYPE_P): ...here.
660 * semantics.c (lambda_capture_field_type): Only build a
661 magic decltype for wildcard types.
662 (lambda_proxy_type): Likewise.
663 (finish_non_static_data_member): Get the quals from
664 the object.
665
666 PR c++/55931
667 * parser.c (cp_parser_template_argument): Don't
668 fold_non_dependent_expr.
669
670 * parser.c (cp_parser_lambda_declarator_opt): Use
671 cp_parser_trailing_type_id.
672
673 PR c++/45917
674 * parser.c (cp_parser_template_id): Don't forget access checks.
675
676 PR c++/52374
677 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
678
679 PR c++/54764
680 PR c++/55972
681 * name-lookup.h (tag_scope): Add ts_lambda.
682 * semantics.c (begin_lambda_type): Use it.
683 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
684 * pt.c (check_default_tmpl_args): Ignore lambdas.
685 (push_template_decl_real): Handle lambdas.
686 * tree.c (no_linkage_check): Adjust lambda check.
687
688 PR c++/56039
689 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
690
691 PR c++/54359
692 * parser.c (cp_parser_direct_declarator): Fix late return
693 for out-of-class defn of member function.
694
695 PR c++/55357
696 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
697 parms to avoid duplicate -Wshadow warnings.
698
699 * search.c (lookup_base): Handle NULL_TREE.
700
701 PR c++/56481
702 * semantics.c (potential_constant_expression_1): Use of 'this' in
703 a non-constexpr function makes the expression not potentially
704 constant.
705
706 N3276
707 PR c++/52748
708 * cp-tree.h (tsubst_flags): Add tf_decltype.
709 * call.c (build_cxx_call): Don't build a temporary if it's set.
710 (build_over_call): Make sure it's only passed to build_cxx_call.
711 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
712 (cp_parser_unary_expression): Likewise.
713 (cp_parser_cast_expression): Likewise.
714 (cp_parser_binary_expression): Likewise.
715 (cp_parser_assignment_expression): Likewise.
716 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
717 (cp_parser_expression): Add decltype_p. Force a
718 temporary for a call on the LHS of a comma.
719 (cp_parser_decltype): Pass true to decltype_p parms.
720 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
721 (tsubst_copy_and_build): Pass tf_decltype down only for
722 CALL_EXPR and the RHS of COMPOUND_EXPR.
723 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
724
725 * cp-tree.h (abstract_class_use): New enum.
726 * typeck2.c (pending_abstract_type): Add use field.
727 (abstract_virtuals_error_sfinae): Add overloads taking
728 abstract_class_use instead of tree.
729 * typeck.c (build_static_cast_1): Call it.
730 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
731 * pt.c: Adjust calls.
732 * decl.c (cp_finish_decl): Don't handle functions specially.
733 (grokdeclarator): Always check return type.
734 * init.c (build_new_1): Adjust call.
735
736 DR 337
737 PR c++/17232
738 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
739 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
740
741 DR 657
742 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
743 (tsubst_arg_types): Likewise.
744
745 DR 1518
746 PR c++/54835
747 * call.c (convert_like_real): Check for explicit constructors
748 even for value-initialization.
749
750 PR c++/54946
751 * pt.c (convert_nontype_argument): Handle invalid pointer.
752
753 * parser.c (cp_parser_lambda_expression): Use nreverse.
754
755 PR c++/56447
756 PR c++/55532
757 * pt.c (instantiate_class_template_1): Instantiate lambda capture
758 list here.
759 (tsubst_copy_and_build): Not here.
760
761 PR c++/55017
762 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
763
764 PR c++/55240
765 * parser.c (parsing_nsdmi): New.
766 * semantics.c (outer_automatic_var_p): Check it.
767 (finish_id_expression): Likewise.
768 * cp-tree.h: Declare it.
769
770 PR c++/55241
771 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
772
773 * parser.c (lookup_literal_operator): Correct parm/arg naming
774 mixup.
775
776 PR c++/56238
777 * pt.c (fold_non_dependent_expr_sfinae): Check
778 instantiation_dependent_expression_p.
779
780 PR c++/56095
781 * class.c (resolve_address_of_overloaded_function): Accept a
782 reference to function for target_type.
783 (instantiate_type): Likewise.
784 * pt.c (convert_nontype_argument): Pass it to
785 convert_nontype_argument_function.
786
787 2013-03-16 Jakub Jelinek <jakub@redhat.com>
788
789 * tree.c (cp_tree_equal): Fix a pasto.
790
791 PR c++/56607
792 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
793 pass op1 through maybe_constant_value first.
794
795 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
796
797 PR c++/56582
798 * semantics.c (cxx_eval_array_reference): Check for negative index.
799
800 2013-03-14 Jason Merrill <jason@redhat.com>
801
802 PR c++/56614
803 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
804
805 PR c++/56346
806 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
807 dso_handle parm on targets without __cxa_atexit.
808
809 2013-03-11 Jason Merrill <jason@redhat.com>
810
811 PR c++/56567
812 * typeck.c (check_return_expr): Disallow returning init list here.
813 * semantics.c (apply_deduced_return_type): Not here.
814
815 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
816
817 PR c++/51412
818 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
819 * error.c (dump_expr): Likewise.
820
821 2013-03-08 Jason Merrill <jason@redhat.com>
822
823 PR c++/51884
824 * class.c (modify_all_vtables): Mangle the vtable name before
825 entering dfs_walk.
826
827 * semantics.c (lambda_expr_this_capture): In unevaluated context,
828 just return the nearest 'this'.
829
830 PR c++/51494
831 PR c++/52183
832 PR c++/56222
833 * tree.c (maybe_dummy_object): Don't capture 'this'.
834 * semantics.c (maybe_resolve_dummy): New.
835 (finish_non_static_data_member): Use it.
836 (finish_qualified_id_expr): Don't test is_dummy_object.
837 * cp-tree.h: Declare maybe_resolve_dummy.
838 * call.c (build_new_method_call_1): Use it.
839
840 PR c++/56567
841 * semantics.c (apply_deduced_return_type): Don't allow returning
842 std::initializer_list.
843
844 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
845
846 PR c++/56534
847 * parser.c (cp_parser_elaborated_type_specifier): Don't call
848 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
849 * decl.c (check_elaborated_type_specifier): Tidy.
850
851 2013-03-06 Jakub Jelinek <jakub@redhat.com>
852
853 PR c++/56543
854 * tree.c (strip_typedefs): Don't copy args if they are NULL.
855
856 2013-03-05 Jakub Jelinek <jakub@redhat.com>
857
858 * parser.c (cp_parser_braced_list): For {} initialize
859 *non_constant_p to false.
860
861 2013-03-04 Jason Merrill <jason@redhat.com>
862
863 PR c++/56464
864 PR c++/54383
865 * semantics.c (lambda_expr_this_capture): Handle NSDMI
866 and non-class scopes.
867
868 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
869
870 * decl.c (grokdeclarator): Remove dead code.
871
872 2013-02-28 Jason Merrill <jason@redhat.com>
873
874 PR c++/56481
875 * semantics.c (potential_constant_expression_1): Use
876 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
877
878 PR c++/56243
879 * call.c (build_over_call): Avoid virtual lookup in a template.
880
881 2013-02-27 Jason Merrill <jason@redhat.com>
882
883 PR c++/56358
884 PR c++/56323
885 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
886 of the base name for inheriting ctors.
887 (push_class_level_binding_1): Remove inheriting ctor handling.
888 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
889 * class.c (add_implicitly_declared_members): Adjust.
890
891 2013-02-26 David Binderman <dcb314@hotmail.com>
892
893 PR c++/55632
894 * decl.c (grokdeclarator): Tidy publicp assignment.
895
896 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
897
898 PR c++/56419
899 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
900 (build_transaction_expr): Same.
901
902 2013-02-25 Jason Merrill <jason@redhat.com>
903
904 PR c++/56377
905 * pt.c (fn_type_unification): Wait to call push_tinst_level until
906 we know what args we're looking at.
907
908 PR c++/56438
909 * semantics.c (potential_constant_expression_1): In C++98, a cast
910 to non-integral type can't be a constant expression.
911
912 2013-02-24 Jakub Jelinek <jakub@redhat.com>
913
914 PR c++/56403
915 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
916 of CLASS_TYPE_P.
917
918 2013-02-22 Jason Merrill <jason@redhat.com>
919
920 PR c++/40405
921 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
922 if we got the wrong number of template parms.
923
924 PR c++/56377
925 * pt.c (fn_type_unification): Use explicit args in template
926 instantiation context.
927
928 PR c++/56359
929 * call.c (can_convert_arg): Discard access checks.
930
931 PR c++/56395
932 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
933 args.
934
935 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
936
937 PR c++/56373
938 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
939 * cvt.c (ocp_convert): Use the latter.
940 (cp_convert_to_pointer): Likewise.
941 * decl.c (check_default_argument): Likewise.
942 * typeck.c (cp_build_binary_op): Likewise.
943 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
944
945 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
946 Paolo Carlini <paolo.carlini@oracle.com>
947
948 PR c++/51242
949 * decl2.c (grokbitfield): Allow scoped enumeration types.
950
951 2013-02-15 Jason Merrill <jason@redhat.com>
952
953 PR c++/54276
954 * semantics.c (finish_id_expression): Also return the identifier
955 for an outer local static.
956
957 PR c++/56343
958 * class.c (check_bases_and_members): Deduce noexcept after
959 checking bases.
960
961 PR c++/52026
962 * semantics.c (finish_id_expression): In a template, return
963 the identifier for a constant variable.
964
965 2013-02-14 Jason Merrill <jason@redhat.com>
966
967 PR c++/54922
968 * semantics.c (build_anon_member_initialization): New.
969 (build_data_member_initialization): Use it.
970
971 PR c++/55003
972 * decl.c (cp_finish_decl): Force instantiation of an
973 auto static data member.
974
975 PR c++/55220
976 * pt.c (unify): A pack expansion that is not the last template
977 argument makes the entire template argument list non-deduced.
978
979 PR c++/56323
980 * name-lookup.c (do_class_using_decl): Handle typedefs with
981 inheriting constructors.
982 (push_class_level_binding_1): Allow inheriting from template
983 template parameter, too.
984 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
985
986 PR c++/55223
987 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
988 default argument scope.
989 * mangle.c (write_name): Likewise.
990
991 PR c++/55232
992 * error.c (find_typenames_r): Don't walk into a pack expansion.
993
994 2013-02-13 Jason Merrill <jason@redhat.com>
995
996 PR c++/55670
997 * parser.c (cp_parser_member_declaration): Check the declarator
998 form when detecting a function declaration via typedef.
999
1000 PR c++/55680
1001 * pt.c (maybe_process_partial_specialization): A lambda
1002 isn't what's being specialized.
1003
1004 PR c++/55710
1005 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
1006 TREE_USED.
1007
1008 PR c++/55879
1009 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
1010
1011 PR c++/55993
1012 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
1013 non-zero offsets, too.
1014
1015 PR c++/56155
1016 * decl.c (build_enumerator): Always convert the value to a
1017 fixed underlying type.
1018
1019 PR c++/56135
1020 * pt.c (tsubst_copy_and_build): Don't forget any new
1021 captures that arose from use of dependent names.
1022
1023 2013-02-13 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR c++/56302
1026 * semantics.c (finish_asm_stmt): If input constraints allow
1027 neither register nor memory, try maybe_constant_value to get
1028 a constant if possible.
1029
1030 2013-02-12 Jason Merrill <jason@redhat.com>
1031
1032 PR c++/56285
1033 * method.c (add_one_base_init): Handle base constructor
1034 taking rvalue reference parm.
1035
1036 PR c++/56291
1037 * semantics.c (sort_constexpr_mem_initializers): Handle
1038 vptr out of order.
1039
1040 2013-02-09 Jason Merrill <jason@redhat.com>
1041
1042 PR c++/56268
1043 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
1044 maybe_instantiate_noexcept.
1045
1046 PR c++/56247
1047 * pt.c (eq_specializations): Set comparing_specializations.
1048 * tree.c (cp_tree_equal): Check it.
1049 * cp-tree.h: Declare it.
1050
1051 * decl.c (decls_match): Check versions later.
1052
1053 PR c++/56238
1054 * pt.c (build_non_dependent_expr): Don't try to fold
1055 instantiation-dependent expressions.
1056 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
1057 [BIND_EXPR]: Treat as dependent.
1058
1059 2013-02-07 Jakub Jelinek <jakub@redhat.com>
1060
1061 PR c++/56241
1062 * init.c (build_vec_init): Don't append NULL values into new_vec.
1063 (build_zero_init_1): Don't push anything into v if recursive call
1064 returned NULL_TREE.
1065 (build_value_init_noctor): Don't push anything into v if
1066 build_value_init call returned NULL_TREE.
1067
1068 PR c++/56239
1069 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
1070 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
1071 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
1072 return true only if 2nd token isn't CPP_CLOSE_PAREN.
1073 (cp_parser_cast_expression): Adjust caller.
1074
1075 PR c++/56237
1076 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
1077 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
1078 DECL_LANG_SPECIFIC (t).
1079
1080 2013-02-07 Jason Merrill <jason@redhat.com>
1081
1082 PR c++/56235
1083 * method.c (do_build_copy_constructor): Don't bother turning
1084 scalars from lvalues to xvalues.
1085 (do_build_copy_assign): Likewise.
1086
1087 2013-02-06 Jason Merrill <jason@redhat.com>
1088
1089 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
1090
1091 2013-02-05 Jason Merrill <jason@redhat.com>
1092
1093 PR c++/54122
1094 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
1095 METHOD_TYPE.
1096
1097 PR c++/56177
1098 * decl.c (start_preparsed_function): Update restype if we change
1099 decl1.
1100
1101 PR c++/56208
1102 * pt.c (fn_type_unification): Discard any access checks from
1103 substituting explicit args.
1104
1105 2013-01-31 Jason Merrill <jason@redhat.com>
1106
1107 PR c++/56162
1108 PR c++/56104
1109 * typeck.c (get_member_function_from_ptrfunc): Fix
1110 ptrmemfunc_vbit_in_delta case.
1111
1112 2013-01-29 Jason Merrill <jason@redhat.com>
1113
1114 PR libstdc++/54314
1115 * class.c (build_ctor_vtbl_group): Give construction vtables
1116 hidden visibility.
1117
1118 2013-01-25 Jason Merrill <jason@redhat.com>
1119
1120 PR c++/56095
1121 * pt.c (convert_nontype_argument_function): Handle invalid input.
1122 (convert_nontype_argument): Likewise.
1123
1124 PR c++/56104
1125 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
1126 dynamic type has no virtual functions.
1127
1128 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
1129
1130 PR c++/55944
1131 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
1132 on TARGET_EXPR nodes.
1133
1134 2013-01-22 Jason Merrill <jason@redhat.com>
1135
1136 PR c++/56071
1137 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
1138
1139 2013-01-22 Dodji Seketeli <dodji@redhat.com>
1140
1141 PR c++/53609
1142 * pt.c (argument_pack_element_is_expansion_p)
1143 (make_argument_pack_select, use_pack_expansion_extra_args_p)
1144 (gen_elem_of_pack_expansion_instantiation): New static functions.
1145 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
1146 look through the possibly resulting pack expansion as well.
1147 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
1148 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
1149 Use gen_elem_of_pack_expansion_instantiation to build the
1150 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
1151 as gen_elem_of_pack_expansion_instantiation and the change in
1152 tsubst above generalize this particular case.
1153 (arg_from_parm_pack_p): Remove this for it's not used by
1154 tsubst_pack_expansion anymore.
1155
1156 2013-01-21 Jason Merrill <jason@redhat.com>
1157
1158 PR c++/56059
1159 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
1160 template args count.
1161
1162 2013-01-18 Jason Merrill <jason@redhat.com>
1163
1164 PR target/54908
1165 * decl2.c (get_local_tls_init_fn): New.
1166 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
1167 with aliases for internal variables. Don't use weakrefs if
1168 the variable needs destruction.
1169 (generate_tls_wrapper): Mark the wrapper as const if no
1170 initialization is needed.
1171 (handle_tls_init): Don't require aliases.
1172
1173 2013-01-15 Dodji Seketeli <dodji@redhat.com>
1174
1175 PR c++/55663
1176 * pt.c (coerce_innermost_template_parms): New static function.
1177 (instantiate_alias_template): Use it here.
1178
1179 2013-01-09 Jason Merrill <jason@redhat.com>
1180
1181 PR c++/55878
1182 * rtti.c (build_typeid, get_typeid): Add complain parm.
1183 (get_tinfo_decl_dynamic): Likewise.
1184 * cp-tree.h, parser.c, pt.c: Adjust.
1185
1186 PR c++/55893
1187 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
1188 needs destruction.
1189
1190 2013-01-09 Jakub Jelinek <jakub@redhat.com>
1191
1192 PR c/48418
1193 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
1194 call maybe_constant_value for the negative or too big shift
1195 count warnings.
1196
1197 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
1198
1199 PR c++/55801
1200 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
1201 of the argument is true.
1202
1203 2013-01-08 Joel Brobecker <brobecker@adacore.com>
1204
1205 * parser.c (cp_parser_initializer_list): Move declaration
1206 of variable non_const to start of lexical block.
1207
1208 2013-01-07 Jason Merrill <jason@redhat.com>
1209
1210 PR c++/55753
1211 * tree.c (build_aggr_init_expr): Do nothing in a template.
1212 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
1213 a FUNCTION_DECL before tsubsting.
1214
1215 2013-01-04 Dodji Seketeli <dodji@redhat.com>
1216
1217 PR c++/52343
1218 * pt.c (check_instantiated_arg): Allow type template arguments.
1219
1220 2013-01-04 Jason Merrill <jason@redhat.com>
1221
1222 PR c++/55877
1223 * decl.c (reset_type_linkage, bt_reset_linkage): New.
1224 (grokdeclarator): Use reset_type_linkage.
1225 * name-lookup.c (binding_table_foreach): Handle null table.
1226 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
1227
1228 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
1229
1230 PR c++/54526 (again)
1231 * parser.c (cp_parser_template_id): Revert core of previous change
1232 (keep adjusted inform message).
1233
1234 2013-01-03 Jason Merrill <jason@redhat.com>
1235
1236 PR c++/55419
1237 PR c++/55753
1238 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
1239 TREE_CONSTANT.
1240
1241 PR c++/55842
1242 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
1243
1244 PR c++/55856
1245 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
1246
1247 PR c++/53650
1248 * call.c (type_has_extended_temps): New.
1249 * cp-tree.h: Declare it.
1250 * decl.c (check_initializer): Use build_aggr_init for arrays
1251 if it is false.
1252 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
1253
1254 2013-01-02 Jason Merrill <jason@redhat.com>
1255
1256 PR c++/54325
1257 * call.c (build_new_method_call_1): Don't use build_value_init for
1258 user-provided default constructors.
1259
1260 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
1261
1262 PR c++/55032
1263 PR c++/55245
1264 * tree.c (build_cplus_array_type): Copy layout information
1265 to main variant if necessary.
1266 \f
1267 Copyright (C) 2013 Free Software Foundation, Inc.
1268
1269 Copying and distribution of this file, with or without modification,
1270 are permitted in any medium without royalty provided the copyright
1271 notice and this notice are preserved.