OSDN Git Service

Fix compilation.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2010-03-26  Dodji Seketeli  <dodji@redhat.com>
2
3         * cp-tree.h (get_template_parms_at_level): Change unsigned parm
4         into int.
5         * pt.c (get_template_parms_at_level): Adjust.
6
7 2010-03-25  Dodji Seketeli  <dodji@redhat.com>
8
9         PR c++/43206
10         * cp-tree.h (get_template_parms_at_level): Declare ...
11         * pt.c (get_template_parms_at_level): ... new function.
12         * typeck.c (get_template_parms_of_dependent_type): If a template
13         type parm's DECL_CONTEXT isn't yet set, get its siblings from
14         current_template_parms. Use get_template_parms_at_level. Remove
15         useless test.
16         (incompatible_dependent_types_p): If we get empty parms from just one
17         of the template type parms we are comparing then the template parms are
18         incompatible.
19
20 2010-03-24  Jason Merrill  <jason@redhat.com>
21
22         PR c++/43502
23         * parser.c (make_declarator): Initialize id_loc.
24         (cp_parser_lambda_declarator_opt): And set it.
25
26 2010-03-23  Jason Merrill  <jason@redhat.com>
27
28         Make lambda conversion op and op() non-static.
29         * semantics.c (maybe_add_lambda_conv_op): Make non-static.
30         Also add the thunk function returned by the conversion op.
31         Mark the conversion deleted if the op() is variadic.
32         * decl2.c (mark_used): Give helpful message about deleted conversion.
33         * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
34         * semantics.c (finish_this_expr): Adjust.
35         * mangle.c (write_closure_type_name): Adjust.
36         * decl.c (grok_op_properties): Don't allow it.
37         * call.c (build_user_type_conversion_1): No static conversion ops.
38         (build_op_call): Or op().
39
40         * decl2.c (change_return_type): Fix 'this' quals.
41
42 2010-03-22  Jason Merrill  <jason@redhat.com>
43
44         PR c++/43333
45         * tree.c (pod_type_p): Use old meaning in C++98 mode.
46
47         PR c++/43281
48         * pt.c (contains_auto_r): New fn.
49         (do_auto_deduction): Use it.
50         (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
51
52 2010-03-20  Simon Martin  <simartin@users.sourceforge.net>
53
54         PR c++/43081:
55         * decl2.c (grokfield): Handle invalid initializers for member
56         functions.
57
58 2010-03-20  Dodji Seketeli  <dodji@redhat.com>
59
60         PR c++/43375
61         * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
62         is NULL.
63         * decl2.c (vague_linkage_p): Likewise.
64
65 2010-03-18  Paolo Carlini  <paolo.carlini@oracle.com>
66
67         PR c++/43418
68         * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
69         false, in the cp_parser_expression_statement call.
70
71 2010-03-05  Jason Merrill  <jason@redhat.com>
72
73         * mangle.c (mangle_decl): Give name collision error even without
74         ASM_OUTPUT_DEF.
75
76 2010-03-04  Marco Poletti  <poletti.marco@gmail.com>
77
78         * pt.c (process_partial_specialization): Use error_n instead of
79         error.
80
81 2010-03-03  Jason Merrill  <jason@redhat.com>
82
83         PR c++/12909
84         * mangle.c (mangle_decl): Handle VAR_DECL, too.
85
86 2010-03-03  Jason Merrill  <jason@redhat.com>
87
88         PR c++/12909
89         * mangle.c: Include cgraph.h.
90         (mangle_decl): If the mangled name will change in a later
91         ABI version, make the later mangled name an alias.
92         * method.c (make_alias_for): Copy DECL_ARGUMENTS.
93         * Make-lang.in (mangle.o): Depend on cgraph.h.
94         * method.c (make_alias_for): Handle VAR_DECL, too.
95         * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
96         * tree.c (no_linkage_check): Adjust.
97         * decl.c (maybe_commonize_var): Adjust.
98         * cp-tree.h: Adjust.
99
100 2010-03-01  Marco Poletti  <poletti.marco@gmail.com>
101
102         * pt.c (redeclare_class_template): Use error_n and inform_n.
103
104 2010-02-27  Mark Mitchell  <mark@codesourcery.com>
105
106         PR c++/42748
107         * cp-tree.h (push_tinst_level): Declare.
108         (pop_tinst_level): Likewise.
109         * pt.c (push_tinst_level): Give it external linkage.
110         (pop_tinst_level): Likewise.
111         * mangle.c (mangle_decl_string): Set the source location to that
112         of the decl while mangling.
113
114 2010-02-27  Simon Martin  <simartin@users.sourceforge.net>
115
116         PR c++/42054
117         * pt.c (redeclare_class_template): Return false if there are erroneous
118         template parameters.
119
120 2010-02-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
121
122         * pt.c (push_tinst_level): Replace -ftemplate-depth- with 
123         -ftemplate-depth=.
124
125 2010-02-24  Jason Merrill  <jason@redhat.com>
126
127         PR c++/12909
128         * mangle.c (write_type): Give -Wabi warning for old vector mangling.
129
130         * class.c (layout_class_type): Don't give -Wabi warning for a bug
131         in a previous ABI version.
132
133 2010-02-23  Jason Merrill  <jason@redhat.com>
134
135         PR c++/43143
136         * typeck2.c (digest_init_r): Accept value init of array.
137
138 2010-02-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
139
140         PR c++/43126
141         * typeck.c (convert_arguments): Update error message.
142
143 2010-02-22  Mike Stump  <mikestump@comcast.net>
144
145         PR c++/43125
146         * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
147
148 2010-02-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
149
150         PR c++/23510
151         * error.c (print_instantiation_partial_context_line): New.
152         (print_instantiation_partial_context): Print at most 12 contexts,
153         skip the rest with a message.
154
155 2010-02-21  Dodji Seketeli  <dodji@redhat.com>
156
157         PR c++/42824
158         * pt.c (lookup_template_class): Better support of specialization
159         of member of class template implicit instantiation.
160
161 2010-02-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
162
163         PR c++/35669
164         * call.c (conversion_null_warnings): Replace -Wconversion with
165         -Wconversion-null.
166         * cvt.c (build_expr_type_conversion): Likewise.
167
168 2010-02-18  Jason Merrill  <jason@redhat.com>
169
170         PR c++/42837
171         * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
172
173         PR c++/43108
174         * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
175         C build_binary_op.
176         * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
177         * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
178
179         PR c++/43070
180         * semantics.c (finish_goto_stmt): Don't call decay_conversion.
181
182         PR c++/26261
183         PR c++/43101
184         * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
185         (maybe_update_decl_type): New fn.
186         * parser.c (cp_parser_init_declarator): Use it.
187
188         PR c++/43109
189         * semantics.c (begin_class_definition): Don't crash on unnamed ns.
190
191 2010-02-17  Jason Merrill  <jason@redhat.com>
192
193         PR c++/43075
194         * call.c (build_over_call): Don't create zero-sized assignments.
195         * cp-gimplify.c (cp_genericize_r): Don't remove them here.
196         * cp-objcp-common.c (cp_expr_size): Remove.
197         * cp-tree.h: Remove prototype.
198
199         PR c++/43069
200         * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
201         decl we looked up doesn't match.
202
203         PR c++/43093
204         * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
205         have an INIT_EXPR anymore.
206
207         PR c++/43079
208         * pt.c (convert_nontype_argument): Change assert to test.
209
210 2010-02-16  Jason Merrill  <jason@redhat.com>
211
212         * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
213
214         PR c++/43031
215         * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
216         VIEW_CONVERT_EXPR for conversions between structural equality types
217         that the back end can't tell are the same.
218
219         PR c++/43036
220         * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
221         cv-quals from element here.
222         (cp_build_qualified_type_real): Not here.  Preserve typedef name.
223
224 2010-02-14  Jason Merrill  <jason@redhat.com>
225
226         PR c++/41997
227         * semantics.c (finish_compound_literal): Use
228         cp_apply_type_quals_to_decl when creating a static variable.
229
230 2010-02-12  Jason Merrill  <jason@redhat.com>
231
232         PR c++/43024
233         * name-lookup.h (current_binding_level): Check for null
234         cp_function_chain.
235
236 2010-02-12  Jason Merrill  <jason@redhat.com>
237
238         PR c++/43054
239         * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
240
241 2010-02-12  Jakub Jelinek  <jakub@redhat.com>
242
243         PR c++/43033
244         * name-lookup.c (pushdecl_maybe_friend): Check default args of t
245         instead of x.
246
247 2010-02-10  Jason Merrill  <jason@redhat.com>
248
249         PR c++/41896
250         * semantics.c (outer_lambda_capture_p): Revert.
251         (add_capture): Only finish_member_declaration if
252         we're in the lambda class.
253         (register_capture_members): New.
254         * cp-tree.h: Declare it.
255         * parser.c (cp_parser_lambda_expression): Call it.
256
257 2010-02-10  Jason Merrill  <jason@redhat.com>
258
259         PR c++/41896
260         * semantics.c (outer_lambda_capture_p): Use current_function_decl
261         instead of current_class_type.
262
263 2010-02-10  Jason Merrill  <jason@redhat.com>
264
265         PR c++/42983, core issue 906
266         * method.c (defaultable_fn_check): Check virtualness.
267
268 2010-02-10  Jason Merrill  <jason@redhat.com>
269
270         PR c++/43016
271         * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
272
273 2010-02-10  Shujing Zhao  <pearly.zhao@oracle.com>
274
275         * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
276         * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
277         translation.
278         * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
279         (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
280         (cp_parser_parameter_declaration)
281         (cp_parser_exception_specification_opt)
282         (cp_parser_exception_declaration): Likewise.
283         * pt.c (check_default_tmpl_args): Likewise.
284         * search.c (lookup_field_r): Likewise.
285
286 2010-02-09  Jason Merrill  <jason@redhat.com>
287
288         PR c++/42399
289         * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
290
291 2010-02-09  Jason Merrill  <jason@redhat.com>
292
293         PR c++/42370
294         * decl2.c (change_return_type): New fn.
295         * semantics.c (apply_lambda_return_type): Use it.
296         * cp-tree.h: Declare it.
297
298 2010-02-05  Richard Guenther  <rguenther@suse.de>
299
300         * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
301         * cp-lang.c: Include gt-cp-cp-lang.h.
302         * config-lang.in (gtfiles): Add cp/cp-lang.c.
303
304 2010-02-05  Dodji Seketeli  <dodji@redhat.com>
305
306         PR c++/42915
307         * typeck.c (get_template_parms_of_dependent_type): Try getting
308         the template parameters fromt the type itself first.
309
310 2010-02-03  Jason Merrill  <jason@redhat.com>
311
312         PR c++/4926
313         PR c++/38600
314         * mangle.c (write_unqualified_id): Split out from write_expression.
315         (write_unqualified_name): Call it.
316         (write_member_name): Likewise.
317         (write_expression): Support TEMPLATE_ID_EXPR.
318         Disambiguate operator names.
319
320         PR c++/12909
321         * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
322         -fabi-version=4.
323
324 2010-02-02  Jason Merrill  <jason@redhat.com>
325
326         PR c++/41090
327         * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
328         * optimize.c (clone_body): Remap their initializers when making base
329         variants.
330         (maybe_clone_body): Complain if multiple clones aren't safe.
331
332 2010-01-29  Dodji Seketeli  <dodji@redhat.com>
333
334         PR c++/42758
335         PR c++/42634
336         PR c++/42336
337         PR c++/42797
338         PR c++/42880
339         * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
340         SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
341         GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
342         * pt.c (coerce_template_parms, type_unification_real,
343         expand_template_argument_pack, coerce_template_parameter_pack):
344         Set the non default template args count.
345         (current_template_args): Always set non defaulted
346         template args count when compiled with --enable-checking
347         (tsubst_template_args, type_unification_real): Propagate the non
348         defaulted template args count.
349         * error.c (get_non_default_template_args_count): Renamed
350         count_non_default_template_args into this. Don't calculate the
351         non default template argument count anymore. Use the new
352         accessor macros above to get it.
353         (dump_template_argument_list, dump_type, dump_decl,
354         dump_template_parms): Adjust.
355         * parser.c (cp_parser_template_argument_list): Always set defaulted
356         template args count when compiled with --enable-checking.
357
358 2010-01-29  Shujing Zhao  <pearly.zhao@oracle.com>
359
360         * decl.c (redeclaration_error_message): Wrap the return messages into
361         G_() for easy translation.
362
363 2010-01-28  Jason Merrill  <jason@redhat.com>
364
365         PR c++/42880
366         * semantics.c (begin_class_definition): Don't use type_as_string.
367
368 2010-01-28  Dodji Seketeli  <dodji@redhat.com>
369
370         PR c++/42713
371         PR c++/42820
372         * typeck.c (get_template_parms_of_dependent_type): Factorized
373         this out of incompatible_template_type_parms_p
374         (incompatible_dependent_types_p): Renamed
375         incompatible_template_type_parms_p into this. Make it detect
376         two incompatible dependent typedefs too.
377         (structural_comptypes): Use incompatible_dependent_types_p.
378         * pt.c (get_template_info):
379         Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
380
381 2010-01-20  Janis Johnson  <janis187@us.ibm.com>
382             Jason Merrill  <jason@redhat.com>
383
384         * mangle.c (write_type): Mangle transparent record as member type.
385         * semantics.c (begin_class_definition): Recognize decimal classes
386         and set TYPE_TRANSPARENT_AGGR.
387
388 2010-01-20  Jason Merrill  <jason@redhat.com>
389
390         PR c++/42338
391         * mangle.c (write_expression): Handle tree codes that have extra
392         arguments in the middle-end.
393
394 2010-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
395
396         PR c++/42038
397         * except.c (expand_start_catch_block): Deal correctly with
398         do_begin_catch returning error_mark_node.
399
400 2010-01-20  Jason Merrill  <jason@redhat.com>
401
402         PR c++/41788
403         * class.c (layout_class_type): Set packed_maybe_necessary for packed
404         non-PODs.
405
406         PR c++/41920
407         * semantics.c (build_lambda_object): Call mark_used on captured
408         variables.
409
410         PR c++/40750
411         * decl.c (grokdeclarator): Clear type_quals for a member function
412         declared using a typedef.  Don't complain about adding cv-quals
413         to a function typedef in C++0x mode.
414
415 2010-01-20  Jakub Jelinek  <jakub@redhat.com>
416
417         * decl.c (create_array_type_for_decl): Remove set but not used
418         variable error_msg.  Remove break stmts after return stmts.
419
420 2010-01-19  Dodji Seketeli  <dodji@redhat.com>
421
422         * error.c (dump_template_parms, count_non_default_template_args):
423         Revert fix of PR c++/42634.
424
425 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
426
427         PR c++/42634
428         * error.c (dump_template_parms): Use innermost template
429         arguments before calling count_non_default_template_args.
430         (count_non_default_template_args): We are being called with
431         template innermost arguments now. There is no need to ensure
432         that again.
433
434 2010-01-18  Dodji Seketeli  <dodji@redhat.com>
435
436         PR c++/42766
437         * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
438
439 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
440
441         PR c++/42697
442         *pt.c (tsubst_decl):  Revert commit for PR c++/42697.
443
444 2010-01-17  Dodji Seketeli  <dodji@redhat.com>
445
446         PR c++/42697
447         *pt.c (tsubst_decl): Get the arguments of a specialization from
448         the specialization template, not from the most general template.
449
450 2010-01-16  Jason Merrill  <jason@redhat.com>
451
452         PR c++/42761
453         * semantics.c (finish_decltype_type): Within a template, treat
454         unresolved CALL_EXPR as dependent.
455
456 2010-01-15  Dodji Seketeli  <dodji@redhat.com>
457
458         * error.c (dump_template_parms,count_non_default_template_args):
459         Revert changes of PR c++/42634.
460
461 2010-01-14  Jakub Jelinek  <jakub@redhat.com>
462
463         PR middle-end/42674
464         * decl.c (finish_function): Don't emit -Wreturn-type warnings in
465         functions with noreturn attribute.
466
467 2010-01-14  Jason Merrill  <jason@redhat.com>
468
469         PR c++/42701
470         * call.c (build_new_method_call): Don't free the vec here.
471
472         PR c++/42655
473         * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
474
475 2010-01-13  Dodji Seketeli  <dodji@redhat.com>
476
477         PR c++/42634
478         * error.c (dump_template_parms): Use innermost template
479         arguments before calling count_non_default_template_args.
480         (count_non_default_template_args): We are being called with
481         template innermost arguments now. There is no need to ensure
482         that again.
483
484 2010-01-07  Dodji Seketeli  <dodji@redhat.com>
485
486         c++/40155
487         * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
488         arguments that were previously deduced.
489
490 2010-01-05  Jason Merrill  <jason@redhat.com>
491
492         * pt.c (unify_pack_expansion): Handle deduction from init-list.
493         * call.c (build_over_call): Don't complain about it.
494
495 2010-01-04  Jason Merrill  <jason@redhat.com>
496
497         PR c++/42555
498         * pt.c (tsubst_decl): Don't apply type attributes in place.
499
500         PR c++/42567
501         * semantics.c (describable_type): Remove decltype comment and
502         semantics.
503
504
505 \f
506 Copyright (C) 2010 Free Software Foundation, Inc.
507
508 Copying and distribution of this file, with or without modification,
509 are permitted in any medium without royalty provided the copyright
510 notice and this notice are preserved.