OSDN Git Service

d846b9e26e3dcb8a072b6d76435d9db842d7cac0
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2012-04-05  Jason Merrill  <jason@redhat.com>
2
3         PR c++/52596
4         * tree.c (lvalue_kind): Treat a deferred access control SCOPE_REF
5         as an lvalue.
6
7 2012-04-03  Jason Merrill  <jason@redhat.com>
8
9         PR c++/52796
10         * pt.c (tsubst_initializer_list): A pack expansion with no elements
11         means value-initialization.
12
13 2012-03-29  Meador Inge  <meadori@codesourcery.com>
14
15         PR c++/52672
16         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
17         stripped child trees that are not pointer types.
18
19 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
20
21         PR c++/52718
22         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
23         warn for a zero as null pointer constant default argument.
24
25 2012-03-29  Jason Merrill  <jason@redhat.com>
26
27         PR c++/52685
28         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
29
30 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
31
32         PR c++/52759
33         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
34         if processing_template_decl.
35
36 2012-03-29  Jason Merrill  <jason@redhat.com>
37
38         PR c++/52743
39         * call.c (compare_ics): Handle ck_aggr like ck_list.
40
41 2012-03-28  Jason Merrill  <jason@redhat.com>
42
43         PR c++/52746
44         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
45         we didn't get an explicit scope.
46         * pt.c (tsubst_baselink): Likewise.
47
48 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
49
50         PR c++/52487
51         * class.c (check_field_decls): Call literal_type_p only
52         on complete types.
53
54 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
55
56         PR c++/52671
57         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
58         on CLASS_TYPE_P types.
59
60 2012-03-22  Jason Merrill  <jason@redhat.com>
61
62         PR c++/52582
63         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
64
65 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
66
67         Backported from mainline
68         2012-03-14  Jakub Jelinek  <jakub@redhat.com>
69
70         PR c++/52521
71         * parser.c (lookup_literal_operator): Return fn only if
72         processed all arguments from args vector and argtypes is
73         void_list_node.
74
75 2012-03-22  Release Manager
76
77         * GCC 4.7.0 released.
78
79 2012-03-20  Jason Merrill  <jason@redhat.com>
80
81         * mangle.c (write_type): Handle 'auto'.
82         * init.c (build_new): Don't do auto deduction where it might
83         affect template mangling.
84
85 2012-03-07  Jason Merrill  <jason@redhat.com>
86
87         PR c++/52521
88         * mangle.c (write_literal_operator_name): The length comes after the
89         operator prefix.
90
91 2012-02-29  Jason Merrill  <jason@redhat.com>
92
93         PR c++/51930
94         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
95         (shadow_tag): From here.
96         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
97
98 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
99
100         PR c++/52312
101         * typeck.c (check_literal_operator_args): Initialize *long_double_p
102         and *long_long_unsigned_p even if processing_template_decl.
103
104 2012-02-16  Jason Merrill  <jason@redhat.com>
105
106         PR c++/52248
107         * decl.c (define_label): Use timevar_cond_start/stop.
108
109 2012-02-16  Fabien ChĂȘne  <fabien@gcc.gnu.org>
110
111         PR c++/52126
112         * decl.c (xref_basetypes): call dependent_scope_p instead of
113         dependent_type_p.
114
115 2012-02-16  Jason Merrill  <jason@redhat.com>
116
117         PR c++/51415
118         * error.c (dump_expr): Handle lambda closures specifically.
119
120 2012-02-14  Jason Merrill  <jason@redhat.com>
121
122         * parser.c (cp_parser_explicit_instantiation): Give a warning
123         for ignored attributes on explicit class instantiation.
124
125 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
126
127         PR c++/52247
128         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
129         lookup_label on label's name and set TREE_USED.
130
131 2012-02-14  Jason Merrill  <jason@redhat.com>
132
133         PR c++/39055
134         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
135
136 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
137
138         PR c/52181
139         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
140         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
141
142 2012-02-07  Jason Merrill  <jason@redhat.com>
143
144         PR c++/51675
145         * semantics.c (cx_check_missing_mem_inits): Handle unions.
146         Fix constexpr default constructor logic.
147
148         PR c++/52035
149         * pt.c (tsubst): Strip uninstantiated typedef.
150
151 2012-02-06  Jason Merrill  <jason@redhat.com>
152
153         PR c++/52088
154         * cvt.c (build_expr_type_conversion): Check for template conversion.
155
156 2012-01-31  Jason Merrill  <jason@redhat.com>
157
158         PR c++/52043
159         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
160         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
161         (tsubst_pack_expansion): Check it.
162
163 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
164
165         PR c++/51327
166         * class.c (explain_non_literal_class): Correctly handle implicitly
167         deleted constructors.
168
169 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
170
171         PR c++/51852
172         * pt.c (tsubst_pack_expansion): Delete and restore
173         local_specialization whenever need_local_specialization, not just
174         when saved_local_specializations is non-NULL.
175
176 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
177
178         PR c++/51370
179         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
180         as TREE_OPERAND (t, 1).
181
182 2012-01-24  Jason Merrill  <jason@redhat.com>
183
184         PR c++/51917
185         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
186
187         PR c++/51973
188         * tree.c (called_fns_equal): Check template args.
189         (cp_tree_equal): Call it.
190
191 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
192             Patrick Marlier  <patrick.marlier@gmail.com>
193
194         PR c++/51928
195         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
196         thunk for set_one_vmethod_tm_attributes.
197
198 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
199
200         PR c++/51223
201         * call.c (build_over_call): Check for error_mark_node as
202         TREE_VALUE when default arguments are processed.
203
204 2012-01-23  Jason Merrill  <jason@redhat.com>
205
206         PR c++/51930
207         * decl2.c (determine_visibility): Check for visibility attribute
208         on template specialization.
209
210 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
211
212         PR c++/51398
213         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
214
215 2012-01-23  Jason Merrill  <jason@redhat.com>
216
217         PR c++/51925
218         * class.c (add_method): Set OVL_USED for using-decls.
219         * tree.c (ovl_scope): New.
220         * cp-tree.h: Declare it.
221         * parser.c (cp_parser_template_name): Use it.
222         * semantics.c (baselink_for_fns): Likewise.
223         * name-lookup.c (set_inherited_value_binding_p): Likewise.
224
225 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
226
227         PR c++/51402
228         * pt.c (lookup_template_class_1): Check context returned by
229         tsubst for error_mark_node.
230
231 2012-01-19  Kai Tietz  <ktietz@redhat.com>
232
233         PR c++/51344
234         * decl2.c (save_template_attributes): Use merge_attributes
235         instead of chaining up via TREE_CHAIN.
236
237 2012-01-19  Jason Merrill  <jason@redhat.com>
238
239         PR c++/51889
240         * class.c (finish_struct): Call add_method here for function usings.
241         * semantics.c (finish_member_declaration): Not here.
242
243 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
244
245         PR c++/51225
246         * typeck2.c (store_init_value): Within a template guard
247         cxx_constant_value with require_potential_constant_expression.
248         * pt.c (convert_nontype_argument): Likewise.
249
250 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
251
252         PR c++/51854
253         * mangle.c (write_template_arg_literal): Handle complex.
254
255 2012-01-16  Jason Merrill  <jason@redhat.com>
256
257         PR c++/51827
258         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
259
260         PR c++/51868
261         * typeck.c (build_static_cast_1): Handle bit-fields properly.
262
263 2012-01-13  Ian Lance Taylor  <iant@google.com>
264
265         PR c++/50012
266         * typeck.c (enum_cast_to_int): New static function.
267         (cp_build_binary_op): When handling warn_sign_compare, don't test
268         for TREE_NO_WARNING.  Do call enum_cast_to_int.
269         * call.c (avoid_sign_compare_warnings): Remove static function.
270         (build_new_op_1): Don't call avoid_sign_compare_warnings.
271
272 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
273
274         * decl2.c: Do not include tree-mudflap.h
275         * semantics.c: Likewise.
276
277 2012-01-13  Jason Merrill  <jason@redhat.com>
278
279         PR c++/20681
280         * semantics.c (finish_break_stmt): Avoid adding an unreachable
281         BREAK_STMT.
282
283         PR c++/51813
284         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
285         when reducing the visibility.
286
287         PR c++/51620
288         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
289
290 2012-01-12  Jason Merrill  <jason@redhat.com>
291
292         PR c++/51714
293         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
294         value-dependent.
295
296 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
297
298         PR c++/51633
299         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
300         Set the pointer to the last block of the constructor to the
301         current statement.
302         (build_constexpr_constructor_member_initializers): Get
303         build_data_member_initialization a chance to deal with more
304         statements before we choke.
305
306 2012-01-12  Jason Merrill  <jason@redhat.com>
307
308         PR c++/48051
309         * mangle.c (write_expression): Mangle BASELINK scope if
310         BASELINK_QUALIFIED_P.
311         * search.c (adjust_result_of_qualified_name_lookup): Set
312         BASELINK_QUALIFIED_P.
313         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
314         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
315         adjust_result_of_qualified_name_lookup for non-qualified names.
316
317         PR c++/51403
318         * pt.c (unify): Handle error_mark_node.
319
320 2012-01-11  Jason Merrill  <jason@redhat.com>
321
322         PR c++/51565
323         * call.c (standard_conversion): For ptrmemfuncs, compare the
324         static_fn_types.
325
326         PR c++/51818
327         * mangle.c (find_substitution): A type is only a substitution
328         match if we're looking for a type.
329         (write_nested_name): Use decl_mangling_context.
330
331         * decl.c (decls_match): Assert that the arguments are decls.
332
333         PR c++/51613
334         * pt.c (resolve_overloaded_unification): Compare types with
335         same_type_p, not decls_match.
336
337 2012-01-10  Jason Merrill  <jason@redhat.com>
338
339         PR c++/51614
340         * class.c (build_base_path): Diagnose ambiguous base.
341
342         PR c++/51433
343         * semantics.c (cxx_eval_call_expression): Always retry previously
344         non-constant expressions.
345
346 2012-01-06  Jason Merrill  <jason@redhat.com>
347
348         DR 686
349         PR c++/47450
350         * parser.c (cp_parser_new_expression): Set
351         type_definition_forbidden_message.
352
353         PR c++/6057
354         PR c++/48051
355         PR c++/50855
356         PR c++/51322
357         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
358         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
359         PREDECREMENT_EXPR.
360         (write_template_arg): Fix mangling of class-scope functions and
361         argument packs.
362         (mangle_decl): Update suggested -fabi-version argument.
363         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
364         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
365         * tree.c (dependent_name): No longer static.
366         * cp-tree.h: Declare it.
367         * pt.c (unify): Defer handling of unconverted functions.
368
369         * mangle.c (mangle_decl): Don't generate mangling aliases
370         for maybe-in-charge [cd]tors.
371
372         * error.c (dump_expr): Print type of CONSTRUCTOR.
373
374 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
375
376         PR c++/51541
377         * parser.c (cp_parser_alias_declaration): Get out early upon
378         errors in the identifier or the attributes.
379
380 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
381
382         PR c++/51064
383         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
384         the tree returned by build_x_binary_op.
385
386 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
387
388         PR c++/51738
389         * parser.c (cp_parser_postfix_open_square_expression): Handle
390         postfix-expression [ braced-init-list ].
391
392 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
393
394         PR c++/29273
395         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
396         call decay_conversion on v.
397
398 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
399
400         PR c++/15867
401         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
402         declaration followed by specialization.
403
404 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
405
406         PR c++/51669
407         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
408         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
409
410 2012-01-02  Jason Merrill  <jason@redhat.com>
411
412         DR 1359
413         PR c++/51675
414         * method.c (walk_field_subobs): Don't check for uninitialized
415         fields in a union.
416         (synthesized_method_walk): Check here.
417
418         DR 325
419         PR c++/51666
420         * parser.c (cp_parser_cache_defarg): Split out...
421         (cp_parser_parameter_declaration): ...from here.
422         (cp_parser_save_nsdmi): Use it.
423         (cp_parser_cache_group): Remove CPP_COMMA support.
424
425 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
426
427         PR c++/51462
428         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
429         of error.
430
431 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
432
433         PR c++/20140
434         * typeck2.c (digest_init_r): Use copy_init when initializing
435         an array of chars.
436
437 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
438
439         PR c++/16603
440         * decl.c (build_enumerator): Don't call perform_integral_promotions
441         on the value.
442
443 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
444
445         PR c++/51379
446         * typeck.c (build_reinterpret_cast_1): Implement resolution of
447         DR 799.
448
449 2012-01-01  Fabien ChĂȘne  <fabien@gcc.gnu.org>
450
451         * parser.c (cp_parser_using_declaration): Add a warning about
452         deprecated access declarations when no errors were encountered
453         while parsing the access declaration. Save the first token in
454         order to emit the warning at the right place.
455 \f
456 Copyright (C) 2012 Free Software Foundation, Inc.
457
458 Copying and distribution of this file, with or without modification,
459 are permitted in any medium without royalty provided the copyright
460 notice and this notice are preserved.