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