OSDN Git Service

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