OSDN Git Service

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