OSDN Git Service

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