OSDN Git Service

PR c++/38064
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2010-05-04  Jason Merrill  <jason@redhat.com>
2
3         PR c++/38064
4         * typeck.c (cp_build_binary_op): Allow enums for <> as well.
5
6 2010-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
7
8         PR c++/43705
9         * call.c (build_new_method_call): Return error_mark_node if fns is
10         NULL_TREE.
11
12 2010-05-03  Dodji Seketeli  <dodji@redhat.com>
13
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.
17
18 2010-05-03  Jason Merrill  <jason@redhat.com>
19
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.
27
28 2010-05-01  H.J. Lu  <hongjiu.lu@intel.com>
29
30         PR c++/43951
31         * init.c (build_new_1): Revert the accidental checkin in
32         revision 158918.
33
34 2010-04-30  Jason Merrill  <jason@redhat.com>
35
36         PR c++/43868
37         * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
38         (pp_cxx_type_specifier_seq): ...here.
39
40 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
41
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.
44
45 2010-04-30  Shujing Zhao  <pearly.zhao@oracle.com>
46
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. 
51
52 2010-04-29  Fabien Chêne  <fabien.chene@gmail.com>
53
54         PR c++/43890
55         * init.c (diagnose_uninitialized_cst_or_ref_member): check for
56         user-provided constructor while recursing.
57
58 2010-04-28  Manuel López-Ibáñez  <manu@gcc.gnu.org>
59
60         PR c++/9335
61         * error.c (print_instantiation_partial_context_line): Handle
62         recursive instantiation.
63         (print_instantiation_partial_context): Likewise.
64
65 2010-04-27  Jason Merrill  <jason@redhat.com>
66
67         * init.c (perform_member_init): Check CLASS_TYPE_P.
68
69 2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>
70
71         PR c++/29043
72         * init.c (perform_member_init): check for uninitialized const or
73         reference members, including array types.
74
75 2010-04-24  Jason Merrill  <jason@redhat.com>
76
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.
82
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.
88
89         * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
90         rather than checking current_class_ref directly.
91         (finish_call_expr): Likewise.
92
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.
99
100         * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
101
102         PR c++/43875
103         * semantics.c (lambda_return_type): Complain about
104         braced-init-list.
105
106         PR c++/43790
107         * tree.c (cv_unqualified): Handle error_mark_node.
108
109         PR c++/41468
110         * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
111         if we don't want errors.
112
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.
122
123 2010-04-27  Fabien Chêne  <fabien.chene@gmail.com>
124             Jason Merrill  <jason@redhat.com>
125
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.
132
133 2010-04-20  Jason Merrill  <jason@redhat.com>
134
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.
141
142 2010-04-20  Dodji Seketeli  <dodji@redhat.com>
143
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.
149
150 2010-04-20  Jakub Jelinek  <jakub@redhat.com>
151
152         * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
153
154 2010-04-19  Dodji Seketeli  <dodji@redhat.com>
155
156         PR c++/43704
157         * typeck.c (structural_comptypes): Test dependent typedefs
158         incompatibility before testing for their main variant based
159         equivalence.
160
161 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
162
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.
165
166 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
167
168         * decl.c (cxx_init_decl_processing): Remove second argument in call to
169         build_common_tree_nodes.
170
171 2010-04-14  Jason Merrill  <jason@redhat.com>
172
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.
178
179 2010-04-13  Jason Merrill  <jason@redhat.com>
180
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.
186
187 2010-04-12  Jason Merrill  <jason@redhat.com>
188
189         PR c++/43641
190         * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
191         return value directly.
192
193         * call.c (type_decays_to): Call cv_unqualified for non-class type.
194
195 2010-04-12  Fabien Chene  <fabien.chene@gmail.com>
196
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.
205
206 2010-04-12  Richard Guenther  <rguenther@suse.de>
207
208         PR c++/43611
209         * semantics.c (expand_or_defer_fn_1): Do not keep extern
210         template inline functions.
211
212 2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
213
214         PR c++/28584
215         * typeck.c (cp_build_c_cast): Warn for casting integer to larger
216         pointer type.
217
218 2010-04-07  Jason Merrill  <jason@redhat.com>
219
220         PR c++/43016
221         * decl.c (start_preparsed_function): Do defer nested functions.
222
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.
234
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.
241
242         PR c++/38392
243         * pt.c (tsubst_friend_function): Instatiate a friend that has already
244         been used.
245
246         * pt.c (print_template_statistics): New.
247         * cp-tree.h: Declare it.
248         * tree.c (cxx_print_statistics): Call it.
249
250         PR c++/41970
251         * decl.c (grokvardecl): Tweak warning message.
252         (grokfndecl): Likewise.
253
254 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
255
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.
259
260 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
261
262         PR c++/40239
263         * typeck2.c (process_init_constructor_record):
264         value-initialize members that are are not explicitely
265         initialized.
266
267 2010-04-07  Jie Zhang  <jie@codesourcery.com>
268
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.
272
273 2010-04-06  Taras Glek  <taras@mozilla.com>
274             Jason Merrill  <jason@redhat.com>
275
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.
280
281 2010-04-06  Jason Merrill  <jason@redhat.com>
282
283         PR c++/43648
284         * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
285
286         PR c++/43621
287         * pt.c (maybe_update_decl_type): Check the return value from
288         push_scope.
289
290 2010-04-01  Jason Merrill  <jason@redhat.com>
291
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.
296
297         * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
298         instead of void_zero_node.
299
300 2010-03-31  Dodji Seketeli  <dodji@redhat.com>
301
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.
311
312 2010-03-30  Jason Merrill  <jason@redhat.com>
313
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.
317
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.
323
324         PR c++/43559
325         * pt.c (more_specialized_fn): Don't control cv-qualifier check
326         with same_type_p.
327
328 2010-03-26  Jason Merrill  <jason@redhat.com>
329
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.
333
334 2010-03-26  Dodji Seketeli  <dodji@redhat.com>
335
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.
342
343 2010-03-26  Dodji Seketeli  <dodji@redhat.com>
344
345         * cp-tree.h (get_template_parms_at_level): Change unsigned parm
346         into int.
347         * pt.c (get_template_parms_at_level): Adjust.
348
349 2010-03-25  Dodji Seketeli  <dodji@redhat.com>
350
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.
361
362 2010-03-24  Jason Merrill  <jason@redhat.com>
363
364         PR c++/43502
365         * parser.c (make_declarator): Initialize id_loc.
366         (cp_parser_lambda_declarator_opt): And set it.
367
368 2010-03-23  Jason Merrill  <jason@redhat.com>
369
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().
381
382         * decl2.c (change_return_type): Fix 'this' quals.
383
384 2010-03-22  Jason Merrill  <jason@redhat.com>
385
386         PR c++/43333
387         * tree.c (pod_type_p): Use old meaning in C++98 mode.
388
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.
393
394 2010-03-20  Simon Martin  <simartin@users.sourceforge.net>
395
396         PR c++/43081:
397         * decl2.c (grokfield): Handle invalid initializers for member
398         functions.
399
400 2010-03-20  Dodji Seketeli  <dodji@redhat.com>
401
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.
406
407 2010-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
408
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.
412
413 2010-03-05  Jason Merrill  <jason@redhat.com>
414
415         * mangle.c (mangle_decl): Give name collision error even without
416         ASM_OUTPUT_DEF.
417
418 2010-03-04  Marco Poletti  <poletti.marco@gmail.com>
419
420         * pt.c (process_partial_specialization): Use error_n instead of
421         error.
422
423 2010-03-03  Jason Merrill  <jason@redhat.com>
424
425         PR c++/12909
426         * mangle.c (mangle_decl): Handle VAR_DECL, too.
427
428 2010-03-03  Jason Merrill  <jason@redhat.com>
429
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.
441
442 2010-03-01  Marco Poletti  <poletti.marco@gmail.com>
443
444         * pt.c (redeclare_class_template): Use error_n and inform_n.
445
446 2010-02-27  Mark Mitchell  <mark@codesourcery.com>
447
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.
455
456 2010-02-27  Simon Martin  <simartin@users.sourceforge.net>
457
458         PR c++/42054
459         * pt.c (redeclare_class_template): Return false if there are erroneous
460         template parameters.
461
462 2010-02-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
463
464         * pt.c (push_tinst_level): Replace -ftemplate-depth- with 
465         -ftemplate-depth=.
466
467 2010-02-24  Jason Merrill  <jason@redhat.com>
468
469         PR c++/12909
470         * mangle.c (write_type): Give -Wabi warning for old vector mangling.
471
472         * class.c (layout_class_type): Don't give -Wabi warning for a bug
473         in a previous ABI version.
474
475 2010-02-23  Jason Merrill  <jason@redhat.com>
476
477         PR c++/43143
478         * typeck2.c (digest_init_r): Accept value init of array.
479
480 2010-02-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
481
482         PR c++/43126
483         * typeck.c (convert_arguments): Update error message.
484
485 2010-02-22  Mike Stump  <mikestump@comcast.net>
486
487         PR c++/43125
488         * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
489
490 2010-02-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
491
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.
496
497 2010-02-21  Dodji Seketeli  <dodji@redhat.com>
498
499         PR c++/42824
500         * pt.c (lookup_template_class): Better support of specialization
501         of member of class template implicit instantiation.
502
503 2010-02-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
504
505         PR c++/35669
506         * call.c (conversion_null_warnings): Replace -Wconversion with
507         -Wconversion-null.
508         * cvt.c (build_expr_type_conversion): Likewise.
509
510 2010-02-18  Jason Merrill  <jason@redhat.com>
511
512         PR c++/42837
513         * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
514
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.
520
521         PR c++/43070
522         * semantics.c (finish_goto_stmt): Don't call decay_conversion.
523
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.
529
530         PR c++/43109
531         * semantics.c (begin_class_definition): Don't crash on unnamed ns.
532
533 2010-02-17  Jason Merrill  <jason@redhat.com>
534
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.
540
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.
544
545         PR c++/43093
546         * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
547         have an INIT_EXPR anymore.
548
549         PR c++/43079
550         * pt.c (convert_nontype_argument): Change assert to test.
551
552 2010-02-16  Jason Merrill  <jason@redhat.com>
553
554         * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
555
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.
560
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.
565
566 2010-02-14  Jason Merrill  <jason@redhat.com>
567
568         PR c++/41997
569         * semantics.c (finish_compound_literal): Use
570         cp_apply_type_quals_to_decl when creating a static variable.
571
572 2010-02-12  Jason Merrill  <jason@redhat.com>
573
574         PR c++/43024
575         * name-lookup.h (current_binding_level): Check for null
576         cp_function_chain.
577
578 2010-02-12  Jason Merrill  <jason@redhat.com>
579
580         PR c++/43054
581         * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
582
583 2010-02-12  Jakub Jelinek  <jakub@redhat.com>
584
585         PR c++/43033
586         * name-lookup.c (pushdecl_maybe_friend): Check default args of t
587         instead of x.
588
589 2010-02-10  Jason Merrill  <jason@redhat.com>
590
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.
598
599 2010-02-10  Jason Merrill  <jason@redhat.com>
600
601         PR c++/41896
602         * semantics.c (outer_lambda_capture_p): Use current_function_decl
603         instead of current_class_type.
604
605 2010-02-10  Jason Merrill  <jason@redhat.com>
606
607         PR c++/42983, core issue 906
608         * method.c (defaultable_fn_check): Check virtualness.
609
610 2010-02-10  Jason Merrill  <jason@redhat.com>
611
612         PR c++/43016
613         * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
614
615 2010-02-10  Shujing Zhao  <pearly.zhao@oracle.com>
616
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.
627
628 2010-02-09  Jason Merrill  <jason@redhat.com>
629
630         PR c++/42399
631         * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
632
633 2010-02-09  Jason Merrill  <jason@redhat.com>
634
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.
639
640 2010-02-05  Richard Guenther  <rguenther@suse.de>
641
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.
645
646 2010-02-05  Dodji Seketeli  <dodji@redhat.com>
647
648         PR c++/42915
649         * typeck.c (get_template_parms_of_dependent_type): Try getting
650         the template parameters fromt the type itself first.
651
652 2010-02-03  Jason Merrill  <jason@redhat.com>
653
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.
661
662         PR c++/12909
663         * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
664         -fabi-version=4.
665
666 2010-02-02  Jason Merrill  <jason@redhat.com>
667
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.
673
674 2010-01-29  Dodji Seketeli  <dodji@redhat.com>
675
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.
699
700 2010-01-29  Shujing Zhao  <pearly.zhao@oracle.com>
701
702         * decl.c (redeclaration_error_message): Wrap the return messages into
703         G_() for easy translation.
704
705 2010-01-28  Jason Merrill  <jason@redhat.com>
706
707         PR c++/42880
708         * semantics.c (begin_class_definition): Don't use type_as_string.
709
710 2010-01-28  Dodji Seketeli  <dodji@redhat.com>
711
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.
722
723 2010-01-20  Janis Johnson  <janis187@us.ibm.com>
724             Jason Merrill  <jason@redhat.com>
725
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.
729
730 2010-01-20  Jason Merrill  <jason@redhat.com>
731
732         PR c++/42338
733         * mangle.c (write_expression): Handle tree codes that have extra
734         arguments in the middle-end.
735
736 2010-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
737
738         PR c++/42038
739         * except.c (expand_start_catch_block): Deal correctly with
740         do_begin_catch returning error_mark_node.
741
742 2010-01-20  Jason Merrill  <jason@redhat.com>
743
744         PR c++/41788
745         * class.c (layout_class_type): Set packed_maybe_necessary for packed
746         non-PODs.
747
748         PR c++/41920
749         * semantics.c (build_lambda_object): Call mark_used on captured
750         variables.
751
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.
756
757 2010-01-20  Jakub Jelinek  <jakub@redhat.com>
758
759         * decl.c (create_array_type_for_decl): Remove set but not used
760         variable error_msg.  Remove break stmts after return stmts.
761
762 2010-01-19  Dodji Seketeli  <dodji@redhat.com>
763
764         * error.c (dump_template_parms, count_non_default_template_args):
765         Revert fix of PR c++/42634.
766
767 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
768
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.
775
776 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
777
778         PR c++/42766
779         * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
780
781 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
782
783         PR c++/42697
784         *pt.c (tsubst_decl):  Revert commit for PR c++/42697.
785
786 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
787
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.
791
792 2010-01-16  Jason Merrill  <jason@redhat.com>
793
794         PR c++/42761
795         * semantics.c (finish_decltype_type): Within a template, treat
796         unresolved CALL_EXPR as dependent.
797
798 2010-01-15  Dodji Seketeli  <dodji@redhat.com>
799
800         * error.c (dump_template_parms,count_non_default_template_args):
801         Revert changes of PR c++/42634.
802
803 2010-01-14  Jakub Jelinek  <jakub@redhat.com>
804
805         PR middle-end/42674
806         * decl.c (finish_function): Don't emit -Wreturn-type warnings in
807         functions with noreturn attribute.
808
809 2010-01-14  Jason Merrill  <jason@redhat.com>
810
811         PR c++/42701
812         * call.c (build_new_method_call): Don't free the vec here.
813
814         PR c++/42655
815         * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
816
817 2010-01-13  Dodji Seketeli  <dodji@redhat.com>
818
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.
825
826 2010-01-07  Dodji Seketeli  <dodji@redhat.com>
827
828         c++/40155
829         * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
830         arguments that were previously deduced.
831
832 2010-01-05  Jason Merrill  <jason@redhat.com>
833
834         * pt.c (unify_pack_expansion): Handle deduction from init-list.
835         * call.c (build_over_call): Don't complain about it.
836
837 2010-01-04  Jason Merrill  <jason@redhat.com>
838
839         PR c++/42555
840         * pt.c (tsubst_decl): Don't apply type attributes in place.
841
842         PR c++/42567
843         * semantics.c (describable_type): Remove decltype comment and
844         semantics.
845
846
847 \f
848 Copyright (C) 2010 Free Software Foundation, Inc.
849
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.