OSDN Git Service

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