OSDN Git Service

* cp-tree.h (UNKNOWN_TYPE): Remove.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2010-05-12  Jason Merrill  <jason@redhat.com>
2
3         * cp-tree.h (UNKNOWN_TYPE): Remove.
4         * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
5         * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
6         * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
7         * class.c (instantiate_type): Check unknown_type_node rather than
8         UNKNOWN_TYPE.
9         * name-lookup.c (maybe_push_decl): Likewise.
10         * rtti.c (get_tinfo_decl_dynamic): Likewise.
11         (get_typeid): Likewise.
12         * semantics.c (finish_offsetof): Likewise.
13
14         PR c++/20669
15         * call.c (add_template_candidate_real): If deduction fails, still
16         add the template as a non-viable candidate.
17         (equal_functions): Handle template candidates.
18         (print_z_candidate): Likewise.
19         (print_z_candidates): Likewise.
20         (build_new_function_call): Likewise.
21
22         * cp-tree.h (LOOKUP_LIST_ONLY): New.
23         * call.c (add_candidates): Enforce it.
24         (build_new_method_call): Try non-list ctor if no viable list ctor.
25         (build_user_type_conversion_1): Likewise.
26
27         * call.c (add_candidates): Distinguish between type(x) and
28         x.operator type().
29         (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
30         (build_new_method_call): Give better error for conversion op.
31
32         * call.c (add_candidates): Add first_arg and return_type parms.
33         Add special constructor/conversion op handling.
34         (convert_class_to_reference): Use it.
35         (build_user_type_conversion_1): Likewise.
36         (build_op_call): Likewise.
37         (build_new_method_call): Likewise.
38         (build_new_op): Adjust.
39         (perform_overload_resolution): Adjust.
40
41 2010-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
42
43         PR c++/34272
44         PR c++/43630
45         PR c++/34491
46         * pt.c (process_partial_specialization): Return error_mark_node
47         in case of unused template parameters in partial specialization.
48
49 2010-05-11  Jakub Jelinek  <jakub@redhat.com>
50
51         PR c++/44062
52         * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
53         * cvt.c (convert_to_void): ... but here.  If expr is a COMPOUND_EXPR,
54         look at its second operand.
55
56 2010-05-10  Jason Merrill  <jason@redhat.com>
57
58         PR c++/44017
59         * semantics.c (baselink_for_fns): Revert earlier change.
60
61         PR c++/44045
62         * typeck.c (cp_build_modify_expr): Complain about assignment to
63         array from init list.
64
65 2010-05-10  Fabien Chêne  <fabien.chene@gmail.com>
66
67         PR c++/43719
68         * decl.c (check_initializer): strip array type before checking for
69         uninitialized const or ref members.
70
71 2010-05-07  Fabien Chêne  <fabien.chene@gmail.com>
72
73         PR c++/43951
74         * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
75         error count. Emit errors only if compain is true.
76         (build_new_1): Do not return error_mark_node if
77         diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
78         errors. Delay the check for user-provided constructor.
79         (perform_member_init): Adjust.
80         * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
81         prototype.
82
83 2010-05-06  Magnus Fromreide  <magfr@lysator.liu.se>
84             Jason Merrill  <jason@redhat.com>
85
86         Add support for C++0x nullptr.
87         * cp-tree.def: Add NULLPTR_TYPE.
88         * cp-tree.h: Add nullptr_node.
89         (cp_tree_index): Add CPTI_NULLPTR.
90         (SCALAR_TYPE_P): Add NULLPTR_TYPE.
91         * call.c (null_ptr_cst_p): Handle nullptr.
92         (standard_conversion): Likewise.
93         (convert_arg_to_ellipsis): Likewise.
94         * mangle.c (write_type): Likewise.
95         * name-lookup.c (arg_assoc_type): Likewise.
96         * parser.c (cp_parser_primary_expression): Likewise.
97         * typeck.c (cp_build_binary_op): Likewise.
98         (build_reinterpret_cast_1): Likewise.
99         * error.c (dump_type): Likewise.
100         (dump_type_prefix, dump_type_suffix): Likewise.
101         * decl.c (cxx_init_decl_processing): Likewise.
102         * cxx-pretty-print.c (pp_cxx_constant): Likewise.
103         * cvt.c (ocp_convert): Likewise.
104         * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
105         nullptr_t tinfo in libsupc++.
106
107 2010-05-06  Jason Merrill  <jason@redhat.com>
108
109         * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
110
111 2010-04-22  Jakub Jelinek <jakub@redhat.com>
112             Dodji Seketeli <dodji@redhat.com>
113
114         PR c/18624
115         * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
116         Declare ...
117         * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
118         * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
119         (decay_conversion, perform_integral_promotions): Call rvalue_use.
120         (cp_build_unary_op): Call lvalue_use.
121         * decl.c (unused_but_set_errorcount): New variable.
122         (poplevel): Issue -Wunused-but-set-variable diagnostics.
123         (duplicate_decls): Merge DECL_READ_P flags.
124         (start_cleanup_fn): Set DECL_READ_P flag.
125         (finish_function): Issue -Wunused-but-set-parameter diagnostics.
126         * tree.c (rvalue): Call rvalue_use.
127         * pt.c (convert_nontype_argument): Likewise.
128         * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
129         finish_decltype_type): Likewise.
130         * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
131         (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
132         or rvalue_use depending on the expr.
133         * init.c (build_new, build_delete): Likewise.
134         * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
135
136 2010-05-05  Jason Merrill  <jason@redhat.com>
137
138         PR c++/43787
139         * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
140         * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
141
142 2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
143
144         PR c++/43028
145         * pt.c (unify): Check each elt for error_mark_node.
146
147 2010-05-04  Jason Merrill  <jason@redhat.com>
148
149         PR c++/38064
150         * typeck.c (cp_build_binary_op): Allow enums for <> as well.
151
152 2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
153
154         PR c++/43705
155         * call.c (build_new_method_call): Return error_mark_node if fns is
156         NULL_TREE.
157
158 2010-05-03  Dodji Seketeli  <dodji@redhat.com>
159
160         PR c++/43953
161         * pt.c (most_specialized_class): Pretend we are processing
162         a template decl during the call to coerce_template_parms.
163
164 2010-05-03  Jason Merrill  <jason@redhat.com>
165
166         PR c++/42810
167         PR c++/43680
168         * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
169         from the selected underlying type unless -fstrict-enums.  Set
170         ENUM_UNDERLYING_TYPE to have the restricted range.
171         * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
172         * class.c (check_bitfield_decl): Likewise.
173
174 2010-05-01  H.J. Lu  <hongjiu.lu@intel.com>
175
176         PR c++/43951
177         * init.c (build_new_1): Revert the accidental checkin in
178         revision 158918.
179
180 2010-04-30  Jason Merrill  <jason@redhat.com>
181
182         PR c++/43868
183         * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
184         (pp_cxx_type_specifier_seq): ...here.
185
186 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
187
188         * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
189         * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
190
191 2010-04-30  Shujing Zhao  <pearly.zhao@oracle.com>
192
193         PR c++/43779
194         * typeck.c (warn_args_num): New function.
195         (convert_arguments): Use warn_args_num to print the diagnostic
196         messages. 
197
198 2010-04-29  Fabien Chêne  <fabien.chene@gmail.com>
199
200         PR c++/43890
201         * init.c (diagnose_uninitialized_cst_or_ref_member): check for
202         user-provided constructor while recursing.
203
204 2010-04-28  Manuel López-Ibáñez  <manu@gcc.gnu.org>
205
206         PR c++/9335
207         * error.c (print_instantiation_partial_context_line): Handle
208         recursive instantiation.
209         (print_instantiation_partial_context): Likewise.
210
211 2010-04-27  Jason Merrill  <jason@redhat.com>
212
213         * init.c (perform_member_init): Check CLASS_TYPE_P.
214
215 2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>
216
217         PR c++/29043
218         * init.c (perform_member_init): check for uninitialized const or
219         reference members, including array types.
220
221 2010-04-24  Jason Merrill  <jason@redhat.com>
222
223         * tree.c (get_fns): Split out from get_first_fn.
224         * cp-tree.h: Declare it.
225         * search.c (shared_member_p): Use it.
226         * semantics.c (finish_qualified_id_expr): Simplify.
227         (finish_id_expression): Simplify.
228
229         * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
230         whenever object is NULL_TREE.  Don't do 'this' capture here.
231         (finish_qualified_id_expr): Pass NULL_TREE.
232         (finish_id_expression): Likewise.
233         (lambda_expr_this_capture): Likewise.
234
235         * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
236         rather than checking current_class_ref directly.
237         (finish_call_expr): Likewise.
238
239         PR c++/43856
240         * name-lookup.c (qualify_lookup): Disqualify lambda op().
241         * class.c (current_nonlambda_class_type): New fn.
242         * semantics.c (nonlambda_method_basetype): New.
243         * cp-tree.h: Declare them.
244         * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
245
246         * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
247
248         PR c++/43875
249         * semantics.c (lambda_return_type): Complain about
250         braced-init-list.
251
252         PR c++/43790
253         * tree.c (cv_unqualified): Handle error_mark_node.
254
255         PR c++/41468
256         * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
257         if we don't want errors.
258
259         PR c++/41468
260         * class.c (convert_to_base): Add complain parameter.  Pass
261         ba_quiet to lookup_base if we don't want errors.
262         (build_vfield_ref): Pass complain to convert_to_base.
263         * call.c (convert_like_real): Likewise.
264         (initialize_reference): Likewise.
265         (perform_direct_initialization_if_possible): Pass complain to
266         convert_like_real.
267         * cp-tree.h: Adjust.
268
269 2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>
270             Jason Merrill  <jason@redhat.com>
271
272         PR c++/42844
273         * decl.c (check_for_uninitialized_const_var): Handle classes that need
274         constructing, too.
275         (check_initializer): Call it for classes that need constructing, too.
276         * class.c (in_class_defaulted_default_constructor): New.
277         * cp-tree.h: Declare it.
278
279 2010-04-20  Jason Merrill  <jason@redhat.com>
280
281         PR c++/9335
282         * init.c (constant_value_1): Treat error_mark_node as a constant
283         if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
284         * cvt.c (ocp_convert): Handle getting error_mark_node from
285         integral_constant_value.
286         * decl.c (compute_array_index_type): Likewise.
287
288 2010-04-20  Dodji Seketeli  <dodji@redhat.com>
289
290         PR c++/43800
291         PR c++/43704
292         * typeck.c (incompatible_dependent_types_p): If one of the
293         compared types if not a typedef then honour their main variant
294         equivalence.
295
296 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
297
298         * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
299
300 2010-04-19  Dodji Seketeli  <dodji@redhat.com>
301
302         PR c++/43704
303         * typeck.c (structural_comptypes): Test dependent typedefs
304         incompatibility before testing for their main variant based
305         equivalence.
306
307 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
308
309         * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
310         ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
311
312 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
313
314         * decl.c (cxx_init_decl_processing): Remove second argument in call to
315         build_common_tree_nodes.
316
317 2010-04-14  Jason Merrill  <jason@redhat.com>
318
319         PR c++/36625
320         * parser.c (cp_parser_parenthesized_expression_list): Change
321         is_attribute_list parm to int to indicate whether or not to
322         handle initial identifier specially.
323         (cp_parser_attribute_list): Use attribute_takes_identifier_p.
324
325 2010-04-13  Jason Merrill  <jason@redhat.com>
326
327         * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
328         CLASS_TYPE_P.
329         * parser.c (cp_parser_lambda_expression): Complain about lambda in
330         unevaluated context.
331         * pt.c (iterative_hash_template_arg): Don't crash on lambda.
332
333 2010-04-12  Jason Merrill  <jason@redhat.com>
334
335         PR c++/43641
336         * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
337         return value directly.
338
339         * call.c (type_decays_to): Call cv_unqualified for non-class type.
340
341 2010-04-12  Fabien Chene  <fabien.chene@gmail.com>
342
343         PR c++/25811
344         * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
345         * init.c (build_new_1): Check for uninitialized const members and
346         uninitialized reference members, when using new without
347         new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
348         (diagnose_uninitialized_cst_or_ref_member): Define, call
349         diagnose_uninitialized_cst_or_ref_member_1.
350         (diagnose_uninitialized_cst_or_ref_member_1): New function.
351
352 2010-04-12  Richard Guenther  <rguenther@suse.de>
353
354         PR c++/43611
355         * semantics.c (expand_or_defer_fn_1): Do not keep extern
356         template inline functions.
357
358 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
359
360         PR c++/28584
361         * typeck.c (cp_build_c_cast): Warn for casting integer to larger
362         pointer type.
363
364 2010-04-07  Jason Merrill  <jason@redhat.com>
365
366         PR c++/43016
367         * decl.c (start_preparsed_function): Do defer nested functions.
368
369         PR c++/11094, DR 408
370         * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
371         * decl2.c (finish_static_data_member_decl): Set it.
372         * decl.c (duplicate_decls): Propagate it.
373         * pt.c (tsubst_decl): Don't substitute the domain of an array
374         VAR_DECL if it's set.
375         (regenerate_decl_from_template): Substitute it here.
376         (type_dependent_expression_p): Return true if it's set.
377         * semantics.c (finish_decltype_type): Instantiate such a variable.
378         * typeck.c (cxx_sizeof_expr): Likewise.
379         (strip_array_domain): New.
380
381         PR c++/43145
382         * name-lookup.c (current_decl_namespace): Non-static.
383         (pop_nested_namespace): Sanity check.
384         * cp-tree.h: Declare current_decl_namespace.
385         * decl.c (grokvardecl): Use it instead of current_namespace.
386         (grokfndecl): Likewise.
387
388         PR c++/38392
389         * pt.c (tsubst_friend_function): Instatiate a friend that has already
390         been used.
391
392         * pt.c (print_template_statistics): New.
393         * cp-tree.h: Declare it.
394         * tree.c (cxx_print_statistics): Call it.
395
396         PR c++/41970
397         * decl.c (grokvardecl): Tweak warning message.
398         (grokfndecl): Likewise.
399
400 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
401
402         PR c++/42697
403         *pt.c (tsubst_decl): Get the arguments of a specialization from
404         the specialization template, not from the most general template.
405
406 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
407
408         PR c++/40239
409         * typeck2.c (process_init_constructor_record):
410         value-initialize members that are are not explicitely
411         initialized.
412
413 2010-04-07  Jie Zhang  <jie@codesourcery.com>
414
415         PR c++/42556
416         * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
417         when all of its elements are non-constant and have been split out.
418
419 2010-04-06  Taras Glek  <taras@mozilla.com>
420             Jason Merrill  <jason@redhat.com>
421
422         * parser.c (cp_parser_class_specifier): Set class location to that
423         of IDENTIFIER_NODE instead of '{' when possible.
424         * semantics.c (begin_class_definition): Do not overide locations
425         with less precise ones.
426
427 2010-04-06  Jason Merrill  <jason@redhat.com>
428
429         PR c++/43648
430         * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
431
432         PR c++/43621
433         * pt.c (maybe_update_decl_type): Check the return value from
434         push_scope.
435
436 2010-04-01  Jason Merrill  <jason@redhat.com>
437
438         * decl.c (next_initializable_field): No longer static.
439         * cp-tree.h: Declare it.
440         * call.c (build_aggr_conv): Fail if there are more initializers
441         than initializable fields.
442
443         * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
444         instead of void_zero_node.
445
446 2010-03-31  Dodji Seketeli  <dodji@redhat.com>
447
448         PR c++/43558
449         * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
450         * pt.c (end_template_parm_list): Store sibling template parms of
451         each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
452         (push_template_decl_real): Don't store the containing template decl
453         into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
454         * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
455         of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
456         Simplify the logic.
457
458 2010-03-30  Jason Merrill  <jason@redhat.com>
459
460         PR c++/43076
461         * pt.c (push_template_decl_real): Deal better with running out of
462         scopes before running out of template parms.
463
464         PR c++/41185
465         PR c++/41786
466         * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
467         function parameter context.  Don't print an error if parsing
468         tentatively.
469
470         PR c++/43559
471         * pt.c (more_specialized_fn): Don't control cv-qualifier check
472         with same_type_p.
473
474 2010-03-26  Jason Merrill  <jason@redhat.com>
475
476         PR c++/43509
477         * parser.c (cp_parser_qualifying_entity): Do accept enum names in
478         c++0x mode, but not other type-names.
479
480 2010-03-26  Dodji Seketeli  <dodji@redhat.com>
481
482         PR c++/43327
483         * pt.c (add_to_template_args): Support NULL ARGS;
484         (most_specialized_class): call coerce_template_parms on
485         template arguments passed to get_class_bindings. Use
486         add_to_template_args.
487         (unify): Handle VAR_DECLs.
488
489 2010-03-26  Dodji Seketeli  <dodji@redhat.com>
490
491         * cp-tree.h (get_template_parms_at_level): Change unsigned parm
492         into int.
493         * pt.c (get_template_parms_at_level): Adjust.
494
495 2010-03-25  Dodji Seketeli  <dodji@redhat.com>
496
497         PR c++/43206
498         * cp-tree.h (get_template_parms_at_level): Declare ...
499         * pt.c (get_template_parms_at_level): ... new function.
500         * typeck.c (get_template_parms_of_dependent_type): If a template
501         type parm's DECL_CONTEXT isn't yet set, get its siblings from
502         current_template_parms. Use get_template_parms_at_level. Remove
503         useless test.
504         (incompatible_dependent_types_p): If we get empty parms from just one
505         of the template type parms we are comparing then the template parms are
506         incompatible.
507
508 2010-03-24  Jason Merrill  <jason@redhat.com>
509
510         PR c++/43502
511         * parser.c (make_declarator): Initialize id_loc.
512         (cp_parser_lambda_declarator_opt): And set it.
513
514 2010-03-23  Jason Merrill  <jason@redhat.com>
515
516         Make lambda conversion op and op() non-static.
517         * semantics.c (maybe_add_lambda_conv_op): Make non-static.
518         Also add the thunk function returned by the conversion op.
519         Mark the conversion deleted if the op() is variadic.
520         * decl2.c (mark_used): Give helpful message about deleted conversion.
521         * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
522         * semantics.c (finish_this_expr): Adjust.
523         * mangle.c (write_closure_type_name): Adjust.
524         * decl.c (grok_op_properties): Don't allow it.
525         * call.c (build_user_type_conversion_1): No static conversion ops.
526         (build_op_call): Or op().
527
528         * decl2.c (change_return_type): Fix 'this' quals.
529
530 2010-03-22  Jason Merrill  <jason@redhat.com>
531
532         PR c++/43333
533         * tree.c (pod_type_p): Use old meaning in C++98 mode.
534
535         PR c++/43281
536         * pt.c (contains_auto_r): New fn.
537         (do_auto_deduction): Use it.
538         (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
539
540 2010-03-20  Simon Martin  <simartin@users.sourceforge.net>
541
542         PR c++/43081:
543         * decl2.c (grokfield): Handle invalid initializers for member
544         functions.
545
546 2010-03-20  Dodji Seketeli  <dodji@redhat.com>
547
548         PR c++/43375
549         * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
550         is NULL.
551         * decl2.c (vague_linkage_p): Likewise.
552
553 2010-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
554
555         PR c++/43418
556         * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
557         false, in the cp_parser_expression_statement call.
558
559 2010-03-05  Jason Merrill  <jason@redhat.com>
560
561         * mangle.c (mangle_decl): Give name collision error even without
562         ASM_OUTPUT_DEF.
563
564 2010-03-04  Marco Poletti  <poletti.marco@gmail.com>
565
566         * pt.c (process_partial_specialization): Use error_n instead of
567         error.
568
569 2010-03-03  Jason Merrill  <jason@redhat.com>
570
571         PR c++/12909
572         * mangle.c (mangle_decl): Handle VAR_DECL, too.
573
574 2010-03-03  Jason Merrill  <jason@redhat.com>
575
576         PR c++/12909
577         * mangle.c: Include cgraph.h.
578         (mangle_decl): If the mangled name will change in a later
579         ABI version, make the later mangled name an alias.
580         * method.c (make_alias_for): Copy DECL_ARGUMENTS.
581         * Make-lang.in (mangle.o): Depend on cgraph.h.
582         * method.c (make_alias_for): Handle VAR_DECL, too.
583         * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
584         * tree.c (no_linkage_check): Adjust.
585         * decl.c (maybe_commonize_var): Adjust.
586         * cp-tree.h: Adjust.
587
588 2010-03-01  Marco Poletti  <poletti.marco@gmail.com>
589
590         * pt.c (redeclare_class_template): Use error_n and inform_n.
591
592 2010-02-27  Mark Mitchell  <mark@codesourcery.com>
593
594         PR c++/42748
595         * cp-tree.h (push_tinst_level): Declare.
596         (pop_tinst_level): Likewise.
597         * pt.c (push_tinst_level): Give it external linkage.
598         (pop_tinst_level): Likewise.
599         * mangle.c (mangle_decl_string): Set the source location to that
600         of the decl while mangling.
601
602 2010-02-27  Simon Martin  <simartin@users.sourceforge.net>
603
604         PR c++/42054
605         * pt.c (redeclare_class_template): Return false if there are erroneous
606         template parameters.
607
608 2010-02-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
609
610         * pt.c (push_tinst_level): Replace -ftemplate-depth- with 
611         -ftemplate-depth=.
612
613 2010-02-24  Jason Merrill  <jason@redhat.com>
614
615         PR c++/12909
616         * mangle.c (write_type): Give -Wabi warning for old vector mangling.
617
618         * class.c (layout_class_type): Don't give -Wabi warning for a bug
619         in a previous ABI version.
620
621 2010-02-23  Jason Merrill  <jason@redhat.com>
622
623         PR c++/43143
624         * typeck2.c (digest_init_r): Accept value init of array.
625
626 2010-02-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
627
628         PR c++/43126
629         * typeck.c (convert_arguments): Update error message.
630
631 2010-02-22  Mike Stump  <mikestump@comcast.net>
632
633         PR c++/43125
634         * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
635
636 2010-02-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
637
638         PR c++/23510
639         * error.c (print_instantiation_partial_context_line): New.
640         (print_instantiation_partial_context): Print at most 12 contexts,
641         skip the rest with a message.
642
643 2010-02-21  Dodji Seketeli  <dodji@redhat.com>
644
645         PR c++/42824
646         * pt.c (lookup_template_class): Better support of specialization
647         of member of class template implicit instantiation.
648
649 2010-02-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
650
651         PR c++/35669
652         * call.c (conversion_null_warnings): Replace -Wconversion with
653         -Wconversion-null.
654         * cvt.c (build_expr_type_conversion): Likewise.
655
656 2010-02-18  Jason Merrill  <jason@redhat.com>
657
658         PR c++/42837
659         * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
660
661         PR c++/43108
662         * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
663         C build_binary_op.
664         * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
665         * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
666
667         PR c++/43070
668         * semantics.c (finish_goto_stmt): Don't call decay_conversion.
669
670         PR c++/26261
671         PR c++/43101
672         * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
673         (maybe_update_decl_type): New fn.
674         * parser.c (cp_parser_init_declarator): Use it.
675
676         PR c++/43109
677         * semantics.c (begin_class_definition): Don't crash on unnamed ns.
678
679 2010-02-17  Jason Merrill  <jason@redhat.com>
680
681         PR c++/43075
682         * call.c (build_over_call): Don't create zero-sized assignments.
683         * cp-gimplify.c (cp_genericize_r): Don't remove them here.
684         * cp-objcp-common.c (cp_expr_size): Remove.
685         * cp-tree.h: Remove prototype.
686
687         PR c++/43069
688         * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
689         decl we looked up doesn't match.
690
691         PR c++/43093
692         * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
693         have an INIT_EXPR anymore.
694
695         PR c++/43079
696         * pt.c (convert_nontype_argument): Change assert to test.
697
698 2010-02-16  Jason Merrill  <jason@redhat.com>
699
700         * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
701
702         PR c++/43031
703         * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
704         VIEW_CONVERT_EXPR for conversions between structural equality types
705         that the back end can't tell are the same.
706
707         PR c++/43036
708         * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
709         cv-quals from element here.
710         (cp_build_qualified_type_real): Not here.  Preserve typedef name.
711
712 2010-02-14  Jason Merrill  <jason@redhat.com>
713
714         PR c++/41997
715         * semantics.c (finish_compound_literal): Use
716         cp_apply_type_quals_to_decl when creating a static variable.
717
718 2010-02-12  Jason Merrill  <jason@redhat.com>
719
720         PR c++/43024
721         * name-lookup.h (current_binding_level): Check for null
722         cp_function_chain.
723
724 2010-02-12  Jason Merrill  <jason@redhat.com>
725
726         PR c++/43054
727         * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
728
729 2010-02-12  Jakub Jelinek  <jakub@redhat.com>
730
731         PR c++/43033
732         * name-lookup.c (pushdecl_maybe_friend): Check default args of t
733         instead of x.
734
735 2010-02-10  Jason Merrill  <jason@redhat.com>
736
737         PR c++/41896
738         * semantics.c (outer_lambda_capture_p): Revert.
739         (add_capture): Only finish_member_declaration if
740         we're in the lambda class.
741         (register_capture_members): New.
742         * cp-tree.h: Declare it.
743         * parser.c (cp_parser_lambda_expression): Call it.
744
745 2010-02-10  Jason Merrill  <jason@redhat.com>
746
747         PR c++/41896
748         * semantics.c (outer_lambda_capture_p): Use current_function_decl
749         instead of current_class_type.
750
751 2010-02-10  Jason Merrill  <jason@redhat.com>
752
753         PR c++/42983, core issue 906
754         * method.c (defaultable_fn_check): Check virtualness.
755
756 2010-02-10  Jason Merrill  <jason@redhat.com>
757
758         PR c++/43016
759         * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
760
761 2010-02-10  Shujing Zhao  <pearly.zhao@oracle.com>
762
763         * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
764         * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
765         translation.
766         * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
767         (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
768         (cp_parser_parameter_declaration)
769         (cp_parser_exception_specification_opt)
770         (cp_parser_exception_declaration): Likewise.
771         * pt.c (check_default_tmpl_args): Likewise.
772         * search.c (lookup_field_r): Likewise.
773
774 2010-02-09  Jason Merrill  <jason@redhat.com>
775
776         PR c++/42399
777         * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
778
779 2010-02-09  Jason Merrill  <jason@redhat.com>
780
781         PR c++/42370
782         * decl2.c (change_return_type): New fn.
783         * semantics.c (apply_lambda_return_type): Use it.
784         * cp-tree.h: Declare it.
785
786 2010-02-05  Richard Guenther  <rguenther@suse.de>
787
788         * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
789         * cp-lang.c: Include gt-cp-cp-lang.h.
790         * config-lang.in (gtfiles): Add cp/cp-lang.c.
791
792 2010-02-05  Dodji Seketeli  <dodji@redhat.com>
793
794         PR c++/42915
795         * typeck.c (get_template_parms_of_dependent_type): Try getting
796         the template parameters fromt the type itself first.
797
798 2010-02-03  Jason Merrill  <jason@redhat.com>
799
800         PR c++/4926
801         PR c++/38600
802         * mangle.c (write_unqualified_id): Split out from write_expression.
803         (write_unqualified_name): Call it.
804         (write_member_name): Likewise.
805         (write_expression): Support TEMPLATE_ID_EXPR.
806         Disambiguate operator names.
807
808         PR c++/12909
809         * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
810         -fabi-version=4.
811
812 2010-02-02  Jason Merrill  <jason@redhat.com>
813
814         PR c++/41090
815         * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
816         * optimize.c (clone_body): Remap their initializers when making base
817         variants.
818         (maybe_clone_body): Complain if multiple clones aren't safe.
819
820 2010-01-29  Dodji Seketeli  <dodji@redhat.com>
821
822         PR c++/42758
823         PR c++/42634
824         PR c++/42336
825         PR c++/42797
826         PR c++/42880
827         * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
828         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
829         GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
830         * pt.c (coerce_template_parms, type_unification_real,
831         expand_template_argument_pack, coerce_template_parameter_pack):
832         Set the non default template args count.
833         (current_template_args): Always set non defaulted
834         template args count when compiled with --enable-checking
835         (tsubst_template_args, type_unification_real): Propagate the non
836         defaulted template args count.
837         * error.c (get_non_default_template_args_count): Renamed
838         count_non_default_template_args into this. Don't calculate the
839         non default template argument count anymore. Use the new
840         accessor macros above to get it.
841         (dump_template_argument_list, dump_type, dump_decl,
842         dump_template_parms): Adjust.
843         * parser.c (cp_parser_template_argument_list): Always set defaulted
844         template args count when compiled with --enable-checking.
845
846 2010-01-29  Shujing Zhao  <pearly.zhao@oracle.com>
847
848         * decl.c (redeclaration_error_message): Wrap the return messages into
849         G_() for easy translation.
850
851 2010-01-28  Jason Merrill  <jason@redhat.com>
852
853         PR c++/42880
854         * semantics.c (begin_class_definition): Don't use type_as_string.
855
856 2010-01-28  Dodji Seketeli  <dodji@redhat.com>
857
858         PR c++/42713
859         PR c++/42820
860         * typeck.c (get_template_parms_of_dependent_type): Factorized
861         this out of incompatible_template_type_parms_p
862         (incompatible_dependent_types_p): Renamed
863         incompatible_template_type_parms_p into this. Make it detect
864         two incompatible dependent typedefs too.
865         (structural_comptypes): Use incompatible_dependent_types_p.
866         * pt.c (get_template_info):
867         Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
868
869 2010-01-20  Janis Johnson  <janis187@us.ibm.com>
870             Jason Merrill  <jason@redhat.com>
871
872         * mangle.c (write_type): Mangle transparent record as member type.
873         * semantics.c (begin_class_definition): Recognize decimal classes
874         and set TYPE_TRANSPARENT_AGGR.
875
876 2010-01-20  Jason Merrill  <jason@redhat.com>
877
878         PR c++/42338
879         * mangle.c (write_expression): Handle tree codes that have extra
880         arguments in the middle-end.
881
882 2010-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
883
884         PR c++/42038
885         * except.c (expand_start_catch_block): Deal correctly with
886         do_begin_catch returning error_mark_node.
887
888 2010-01-20  Jason Merrill  <jason@redhat.com>
889
890         PR c++/41788
891         * class.c (layout_class_type): Set packed_maybe_necessary for packed
892         non-PODs.
893
894         PR c++/41920
895         * semantics.c (build_lambda_object): Call mark_used on captured
896         variables.
897
898         PR c++/40750
899         * decl.c (grokdeclarator): Clear type_quals for a member function
900         declared using a typedef.  Don't complain about adding cv-quals
901         to a function typedef in C++0x mode.
902
903 2010-01-20  Jakub Jelinek  <jakub@redhat.com>
904
905         * decl.c (create_array_type_for_decl): Remove set but not used
906         variable error_msg.  Remove break stmts after return stmts.
907
908 2010-01-19  Dodji Seketeli  <dodji@redhat.com>
909
910         * error.c (dump_template_parms, count_non_default_template_args):
911         Revert fix of PR c++/42634.
912
913 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
914
915         PR c++/42634
916         * error.c (dump_template_parms): Use innermost template
917         arguments before calling count_non_default_template_args.
918         (count_non_default_template_args): We are being called with
919         template innermost arguments now. There is no need to ensure
920         that again.
921
922 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
923
924         PR c++/42766
925         * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
926
927 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
928
929         PR c++/42697
930         *pt.c (tsubst_decl):  Revert commit for PR c++/42697.
931
932 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
933
934         PR c++/42697
935         *pt.c (tsubst_decl): Get the arguments of a specialization from
936         the specialization template, not from the most general template.
937
938 2010-01-16  Jason Merrill  <jason@redhat.com>
939
940         PR c++/42761
941         * semantics.c (finish_decltype_type): Within a template, treat
942         unresolved CALL_EXPR as dependent.
943
944 2010-01-15  Dodji Seketeli  <dodji@redhat.com>
945
946         * error.c (dump_template_parms,count_non_default_template_args):
947         Revert changes of PR c++/42634.
948
949 2010-01-14  Jakub Jelinek  <jakub@redhat.com>
950
951         PR middle-end/42674
952         * decl.c (finish_function): Don't emit -Wreturn-type warnings in
953         functions with noreturn attribute.
954
955 2010-01-14  Jason Merrill  <jason@redhat.com>
956
957         PR c++/42701
958         * call.c (build_new_method_call): Don't free the vec here.
959
960         PR c++/42655
961         * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
962
963 2010-01-13  Dodji Seketeli  <dodji@redhat.com>
964
965         PR c++/42634
966         * error.c (dump_template_parms): Use innermost template
967         arguments before calling count_non_default_template_args.
968         (count_non_default_template_args): We are being called with
969         template innermost arguments now. There is no need to ensure
970         that again.
971
972 2010-01-07  Dodji Seketeli  <dodji@redhat.com>
973
974         c++/40155
975         * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
976         arguments that were previously deduced.
977
978 2010-01-05  Jason Merrill  <jason@redhat.com>
979
980         * pt.c (unify_pack_expansion): Handle deduction from init-list.
981         * call.c (build_over_call): Don't complain about it.
982
983 2010-01-04  Jason Merrill  <jason@redhat.com>
984
985         PR c++/42555
986         * pt.c (tsubst_decl): Don't apply type attributes in place.
987
988         PR c++/42567
989         * semantics.c (describable_type): Remove decltype comment and
990         semantics.
991
992
993 \f
994 Copyright (C) 2010 Free Software Foundation, Inc.
995
996 Copying and distribution of this file, with or without modification,
997 are permitted in any medium without royalty provided the copyright
998 notice and this notice are preserved.