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