OSDN Git Service

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