OSDN Git Service

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