OSDN Git Service

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