OSDN Git Service

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