Split ChangeLog to ChangeLog-2007 and ChangeLog-2008.
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2009-02-24  Richard Guenther  <rguenther@suse.de>
2
3         PR c++/39242
4         * pt.c (instantiate_decl): Do not instantiate extern, non-inline
5         declared functions.
6
7 2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>
8
9         PR c++/36411
10         * pt.c (coerce_template_template_parms): Return 0 if parameter
11         is error_mark_node.
12
13 2009-02-23  Jason Merrill  <jason@redhat.com>
14
15         * pt.c (unify): Call maybe_adjust_types_for_deduction when
16         deducing from an initializer list.
17
18 2009-02-20  Jason Merrill  <jason@redhat.com>
19
20         PR c++/39225
21         * decl.c (grokdeclarator): Handle ~identifier.
22
23 2009-02-19  Jakub Jelinek  <jakub@redhat.com>
24
25         PR target/39175
26         * decl2.c (determine_visibility): If visibility changed and
27         DECL_RTL has been already set, call make_decl_rtl to update symbol
28         flags.
29
30 2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>
31
32         PR c++/39188
33         * cp-tree.h (maybe_commonize_var): New.
34
35         * decl.c (maybe_commonize_var): Make it extern.
36
37         * decl2.c (finish_anon_union): Call maybe_commonize_var.
38
39 2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>
40
41         PR c++/39219
42         * parser.c (cp_parser_enum_specifier): Apply all attributes.
43
44 2009-02-18  Jason Merrill  <jason@redhat.com>
45
46         * cfns.h: Tweak pathname for cfns.gperf.
47
48 2009-02-13  Jason Merrill  <jason@redhat.com>
49
50         PR c++/39070
51         * semantics.c (finish_call_expr): Change koenig_p parm to int.
52         If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
53         * cp-tree.h: Adjust prototype.
54         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
55
56 2009-02-12  Jason Merrill  <jason@redhat.com>
57
58         PR c++/38950
59         * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
60
61 2009-02-11  Jason Merrill  <jason@redhat.com>
62
63         PR c++/39153
64         * decl2.c (cp_write_global_declarations): 
65         Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
66
67         PR c++/30111
68         * init.c (build_value_init_noctor): Split out from...
69         (build_value_init): ...here.
70         (expand_aggr_init_1): Handle value-initialization.
71         * cp-tree.h: Add declaration.
72         * class.c (type_has_user_provided_constructor): 
73         Handle non-class arguments.
74
75 2009-02-10  Jason Merrill  <jason@redhat.com>
76
77         PR c++/38649
78         * class.c (defaultable_fn_p): Handle ... properly.
79
80         PR c++/36744
81         * tree.c (lvalue_p_1): Condition rvalue ref handling on
82         treat_class_rvalues_as_lvalues, too.
83
84 2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>
85
86         PR c++/34397
87         * typeck.c (build_x_array_ref): New.
88         * cp-tree.h: Declare it.
89         * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
90
91 2009-02-09  Jason Merrill  <jason@redhat.com>
92
93         PR c++/39109
94         * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
95         * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
96         * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
97         * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
98         for build_value_init TARGET_EXPR.
99         * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
100
101 2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
102
103         PR c++/35147
104         PR c++/37737
105         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
106
107 2009-02-04  Jakub Jelinek  <jakub@redhat.com>
108
109         PR c++/39095
110         * operators.def: Use COMPONENT_REF code for ->/pt operator again,
111         remove ./dt operator.
112         * mangle.c (write_expression): Handle COMPONENT_REF after handling
113         ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
114         write_string ("dt") instead of using operators.def.
115
116 2009-02-03  Jason Merrill  <jason@redhat.com>
117
118         * typeck.c (cp_build_unary_op): Only complain about taking address
119         of main if pedantic.
120
121 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
122
123         PR inline-asm/39059
124         * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
125
126         PR c++/39056
127         * typeck2.c (digest_init_r): Don't call process_init_constructor
128         for COMPLEX_TYPE.
129
130 2009-02-03  Paolo Bonzini  <bonzini@gnu.org>
131
132         PR c++/36897
133         * pt.c (convert_nontype_argument_function): Expect expr to be an
134         ADDR_EXPR.
135
136         PR c++/37314
137         * typeck.c (merge_types): Call resolve_typename_type if only
138         one type is a typename.
139
140 2009-02-02  Jason Merrill  <jason@redhat.com>
141
142         PR c++/39054
143         * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
144         in BIT_NOT_EXPR.
145
146 2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>
147
148         PR c++/39053
149         * parser.c (cp_parser_pure_specifier): If there are no tokens left
150         do not call cp_lexer_consume_token.
151
152 2009-01-30  Jakub Jelinek  <jakub@redhat.com>
153
154         PR c++/39028
155         * parser.c (cp_parser_already_scoped_statement): Handle __label__
156         declarations.
157
158 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
159
160         PR c++/33465
161         * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
162
163 2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
164
165         PR c++/38655
166         * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
167
168 2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
169
170         * typeck.c (invalid_nonstatic_memfn_p): Use
171         DECL_NONSTATIC_MEMBER_FUNCTION_P.
172
173 2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>
174
175         PR c++/37554
176         * call.c (build_over_call): If convert_for_arg_passing returns
177         error_mark_node unconditionally return it.
178
179 2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>
180
181         * class.c (check_field_decls): Also inherit packed for bitfields
182         regardless of their type.
183
184 2009-01-22  Dodji Seketeli  <dodji@redhat.com>
185
186         PR c++/38930
187         * decl2.c (grokfield): Reverting changes of PR c++/26693
188         (save_template_attributes): Likewise.
189         * decl.c (grokdeclarator): Likewise.
190         * name-lookup.c (pushdecl_maybe_friend): Likewise.
191         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
192         (append_type_to_template_for_access_check): Likewise.
193         * semantics.c (check_accessibility_of_qualified_id): Likewise.
194         * pt.c (instantiate_class_template, instantiate_template ): Likewise.
195         (tsubst): Likewise.
196         (resolve_type_name_type): Likewise.
197         (append_type_to_template_for_access_check): Likewise.
198
199 2009-01-21  Dodji Seketeli  <dodji@redhat.com>
200
201         PR c++/26693
202         * decl2.c (grokfield): when a typedef appears in a
203         class, create the typedef variant type node for it.
204         (save_template_attributes): Creating typedef variant type node
205          here is now useless.
206         * decl.c (grokdeclarator): If the typedef'ed struct/class was
207         anonymous, set the proper type name to all its type variants.
208         * name-lookup.c (pushdecl_maybe_friend): Reuse the
209         set_underlying_type function to install typedef variant types.
210         * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
211         macro.
212         (append_type_to_template_for_access_check): New entry points.
213         * semantics.c (check_accessibility_of_qualified_id):
214         When a typedef that is a member of a class appears in a template,
215         add it to the template. It will be ...
216         * pt.c (instantiate_class_template, instantiate_template ): ... access
217         checked at template instantiation time.
218         (tsubst): Handle the case of being called with NULL args.
219         (resolve_type_name_type): The type name should be the name of the
220         main type variant.
221         (append_type_to_template_for_access_check): New entry point.
222
223 2009-01-19  Jason Merrill  <jason@redhat.com>
224
225         PR c++/23287
226         * parser.c (cp_parser_unqualified_id): In a template,
227         accept ~identifier.
228         * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
229
230 2009-01-16  Jason Merrill  <jason@redhat.com>
231
232         PR c++/38877
233         * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
234         * init.c (build_new): Don't call describable_type unless we
235         have an auto.
236
237         PR c++/29470
238         * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
239
240         PR c++/38579
241         * search.c (protected_accessible_p): N doesn't vary.
242
243 2009-01-15  Jason Merrill  <jason@redhat.com>
244
245         PR c++/38850
246         * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
247         accept hidden friends.
248
249 2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
250
251         PR C++/29388
252         * decl.c (grokdeclarator): Check for a non namespace/class context.
253
254 2009-01-15  Jason Merrill  <jason@redhat.com>
255
256         PR c++/36334
257         PR c++/37646
258         * tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
259         a function isn't necessarily an lvalue. Take tree, not const_tree.
260         (lvalue_p, real_lvalue_p): Take tree, not const_tree.
261         * typeck.c (lvalue_or_else): Likewise.
262         * cp-tree.h: Adjust prototypes.
263
264 2009-01-15  Steve Ellcey  <sje@cup.hp.com>
265
266         PR c++/38357
267         * pt.c (tsubst): Check for NULL args.
268
269 2009-01-15  Dodji Seketeli  <dodji@redhat.com>
270
271         PR c++/38636
272         * name-lookup.c (pushtag): Don't create members to types that are not
273         being created.
274
275 2009-01-14  Nick Clifton  <nickc@redhat.com>
276
277         PR c++/37862
278         * parser.c: Pass cp_id_kind computed in
279         cp_parser_postfix_dot_deref_expression to
280         cp_parser_primary_expression.
281
282 2009-01-13  Jakub Jelinek  <jakub@redhat.com>
283
284         PR c++/38795
285         * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
286         STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
287         as CAST_EXPR.
288
289 2009-01-12  Jason Merrill  <jason@redhat.com>
290             Steve Ellcey  <sje@cup.hp.com>
291
292         PR c++/35109
293         * name-lookup.c (lookup_name_real): Keep looking past a hidden 
294         binding.
295
296 2009-01-12  Dodji Seketeli  <dodji@redhat.com>
297
298         PR c++/36019
299         * pt.c (parameter_of_template_p): New function.
300         * cp-tree.h: Declare it.
301         * name-lookup.c (binding_to_template_parms_of_scope_p): New
302         function.
303         (outer_binding): Take template parameters in account when looking for
304         a name binding.
305
306 2009-01-12  Jason Merrill  <jason@redhat.com>
307
308         PR c++/31488
309         * tree.c (pod_type_p): Return 1 for structs created by the back end.
310
311 2009-01-12  Jakub Jelinek  <jakub@redhat.com>
312
313         PR c/32041
314         * parser.c (cp_parser_builtin_offsetof): Allow `->' in
315         offsetof member-designator, handle it as `[0].'.
316
317         PR c++/38794
318         * decl.c (start_function): If grokdeclarator hasn't returned
319         FUNCTION_DECL nor error_mark_node, issue diagnostics.
320
321 2009-01-11  Jakub Jelinek  <jakub@redhat.com>
322
323         PR c++/36254
324         * cp-gimplify.c (genericize_if_stmt): Renamed from ...
325         (gimplify_if_stmt): ... this.
326         (cp_gimplify_expr): Don't handle IF_STMT here.
327         (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
328
329 2009-01-10  Andrew Pinski  <pinskia@gmail.com>
330
331         PR c++/38648
332         * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
333
334         PR c++/36695
335         * typeck2.c (build_functional_cast): Check for reference type and NULL
336         PARMS.
337
338 2009-01-09  Steve Ellcey  <sje@cup.hp.com>
339
340         * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
341
342 2009-01-09  Jakub Jelinek  <jakub@redhat.com>
343
344         PR c++/35335
345         * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
346
347 2009-01-09  John F. Carr  <jfc@mit.edu>
348
349         PR c++/37877
350         * parser.c (cp_parser_class_specifier): Clear
351         parser->in_unbraced_linkage_specification_p while parsing class
352         specifiers.
353
354 2009-01-07  Jakub Jelinek  <jakub@redhat.com>
355
356         PR c++/38725
357         * semantics.c (finish_goto_stmt): Convert destination to
358         void *.
359
360 2009-01-06  Jason Merrill  <jason@redhat.com>
361
362         PR c++/35297
363         PR c++/35477
364         PR c++/35784
365         PR c++/36846
366         PR c++/38276
367         * pt.c (check_default_tmpl_args): Don't complain about
368         out-of-order parameter packs in the enclosing class
369         or parameter packs after default args.
370         (coerce_template_parms): If we have more than one
371         parameter pack, don't flatten argument packs.
372         (template_args_equal): Handle argument packs.
373         (comp_template_args): Don't flatten argument packs.
374         (check_instantiated_arg): Split out from...
375         (check_instantiated_args): Here.  Handle arg packs.
376         (convert_template_argument): Just check that nontype argument
377         packs have the right type.
378
379 2009-01-05  Dodji Seketeli  <dodji@redhat.com>
380
381         PR c++/38472
382         * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
383
384 2009-01-05  Jason Merrill  <jason@redhat.com>
385
386         PR c++/38698
387         * typeck2.c (process_init_constructor_union): Handle union with
388         no fields.
389
390         * mangle.c (write_expression): Remove mangling for zero-operand
391         casts.
392
393         PR c++/38701
394         * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
395         defaulting.
396
397         PR c++/38702
398         * class.c (defaultable_fn_p): Only operator== can be a copy
399         assignment operator.
400
401 2009-01-02  Jason Merrill  <jason@redhat.com>
402
403         PR c++/38698
404         * typeck2.c (process_init_constructor_union): Handle excess
405         initializers.
406         (process_init_constructor_record): Likewise.
407
408         PR c++/38684
409         * typeck2.c (digest_init_r): Don't use process_init_constructor
410         for non-aggregate classes.