OSDN Git Service

a40fd02141bc7f1d52f191e0b2047682dd97a532
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2011-02-20  Dodji Seketeli  <dodji@redhat.com>
2
3         PR c++/46394
4         * pt.c (tsubst_pack_expansion): do not use
5         cp_tree_equal/same_type_p to detect an expansion of a parameter
6         pack.
7
8 2011-02-19  Jason Merrill  <jason@redhat.com>
9
10         PR c++/47503
11         * semantics.c (cxx_eval_call_expression): Shortcut trivial copy.
12
13 2011-02-18  Paolo Carlini  <paolo.carlini@oracle.com>
14
15         PR c++/47795
16         * semantics.c (finish_non_static_data_member): Early return if
17         object is error_mark_node.
18
19 2011-02-18  Dodji Seketeli  <dodji@redhat.com>
20
21         PR c++/47208
22         * pt.c (do_auto_deduction): Do not mention error_mark_node in
23         diagnostics.
24         * semantics.c (finish_id_expression): Do not pass erroneous decl
25         to decl_constant_var_p.
26
27 2011-02-17  Jakub Jelinek  <jakub@redhat.com>
28
29         PR c++/47783
30         * cvt.c (convert_from_reference): Call mark_exp_read.
31
32 2011-02-11  Dodji Seketeli  <dodji@redhat.com>
33
34         PR c++/47172
35         * pt.c (finish_call_expr): Consider a call expression that has a
36         dependent "this" pointer as being dependent.  Add comments.
37         (dependent_type_p, type_dependent_expression_p): Update comments.
38
39 2011-02-16  Dodji Seketeli  <dodji@redhat.com>
40
41         PR c++/47326
42         * pt.c (tsubst_copy)<case SIZEOF_EXPR>: Ensure that even pack
43         expansion arguments are not evaluated.
44
45 2011-02-16  Jakub Jelinek  <jakub@redhat.com>
46
47         PR c++/47704
48         * cp-tree.h (ENUM_FIXED_UNDERLYING_TYPE_P): Use TYPE_LANG_FLAG_5
49         instead of TYPE_LANG_FLAG_3.
50         * pt.c (lookup_template_class): Copy over
51         ENUM_FIXED_UNDERLYING_TYPE_P.
52
53 2011-02-15  Jason Merrill  <jason@redhat.com>
54
55         PR c++/46807
56         * method.c (synthesized_method_walk): Always exit early for
57         trivial fn in C++98 mode.
58
59 2011-02-14  Jason Merrill  <jason@redhat.com>
60
61         PR c++/47482
62         * parser.c (cp_parser_enumerator_definition): Call
63         fold_non_dependent_expr.
64
65 2011-02-09  Jason Merrill  <jason@redhat.com>
66
67         * decl.c (cp_make_fname_decl): Set DECL_THIS_STATIC at toplevel.
68         * semantics.c (finish_fname): Only return the name if we're in
69         a function.
70
71         * decl.c (build_enumerator): Don't perform integral promotions on
72         non-integral constants.
73
74         * cvt.c (convert_to_void): Handle null op1.
75
76         * class.c (type_has_constexpr_default_constructor): Make sure the
77         caller stripped an enclosing array.
78         * init.c (perform_member_init): Strip arrays before calling it.
79
80         PR c++/47511
81         * semantics.c (potential_constant_expression_1): Handle TEMPLATE_DECL.
82
83 2011-02-03  Dodji Seketeli  <dodji@redhat.com>
84
85         PR c++/47398
86         * tree.c (cp_tree_equal)<TEMPLATE_PARM_INDEX>: Take the number of
87         template parameters in account.
88
89 2011-02-03  Nathan Froyd  <froydnj@codesourcery.com>
90
91         PR c++/46890
92         * parser.c (cp_parser_class_specifier): Fix setting of
93         want_semicolon.
94
95 2011-01-31  Jakub Jelinek  <jakub@redhat.com>
96
97         PR c++/47416
98         * semantics.c (build_data_member_initialization): Handle
99         STATEMENT_LIST always instead of just for CLEANUP_BODY.
100
101 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
102
103         * g++spec.c (lang_specific_driver) [HAVE_LD_STATIC_DYNAMIC] Use
104         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
105
106 2011-01-29  Dodji Seketeli  <dodji@redhat.com>
107
108         PR c++/47311
109         * cp-tree.h (fixup_template_parms): Declare.
110         * pt.c (end_template_parm_list): Do not fixup template parms here.
111         (fixup_template_parms): Remove static. Fix typo in the
112         comments. Remove useless code statement.
113         (fixup_template_parm): For a template template parameter, fixup
114         its attributes before fixing up its type.
115         * parser.c
116         (cp_parser_template_declaration_after_export): After parsing
117         template parameters fixup their types.
118
119 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
120
121         PR c++/47476
122         * semantics.c (potential_constant_expression_1): Handle
123         TRUTH_XOR_EXPR.
124
125 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
126
127         PR c++/43601
128         * semantics.c (expand_or_defer_fn_1): Handle it.
129         * decl2.c (decl_needed_p): Likewise.
130
131 2011-01-21  Jason Merrill  <jason@redhat.com>
132
133         PR c++/47041
134         * semantics.c (build_constexpr_constructor_member_initializers):
135         Handle trivial copy.
136
137 2011-01-21  Jakub Jelinek  <jakub@redhat.com>
138
139         PR c++/47388
140         * semantics.c (begin_for_stmt): If -fno-for-scope, don't
141         assume init must be NULL if scope is NULL.
142         (begin_range_for_stmt): Likewise.
143
144 2011-01-21  Jason Merrill  <jason@redhat.com>
145
146         PR c++/46552
147         * semantics.c (cxx_eval_constant_expression): Handle OFFSET_REF.
148
149         PR c++/46977
150         * semantics.c (potential_constant_expression_1): Split out from
151         potential_constant_expression.  Add want_rval parm.  Handle
152         template expression forms.  Don't enforce restriction on address
153         of automatic variable here.  Add a couple of diagnostics that
154         had been missing.
155         (require_potential_constant_expression): New entry point.
156         (build_data_member_initialization, register_constexpr_fundef): Adjust.
157         (maybe_constant_value): Check potential_constant_expression.
158         * pt.c (fold_non_dependent_expr_sfinae): Likewise.
159         * tree.c (build_vec_init_expr): Adjust.
160
161 2011-01-19  Jakub Jelinek  <jakub@redhat.com>
162
163         PR c++/47303
164         * decl2.c (finish_anon_union): Only call mangle_decl if TREE_STATIC
165         or DECL_EXTERNAL.
166
167 2011-01-17  Jason Merrill  <jason@redhat.com>
168
169         PR c++/47067
170         * semantics.c (base_field_constructor_elt): New fn.
171         (cxx_eval_bare_aggregate): Use it.
172         (build_data_member_initialization): Leave COMPONENT_REF for
173         vfield inits.
174
175 2011-01-14  Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
176
177         * parser.c (cp_parser_range_for): Remove the "unused variable" warning
178         workaround.
179
180 2011-01-15  Giovanni Funchal  <gafunchal@gmail.com>
181             Jonathan Wakely  <jwakely.gcc@gmail.com>
182
183         PR c++/33558
184         * decl.c (grokdeclarator): Reject mutable reference members.
185
186 2011-01-14  Jason Merrill  <jason@redhat.com>
187
188         PR c++/47289
189         * pt.c (coerce_template_parms): Fix error recovery.
190
191         PR c++/46903
192         * typeck2.c (check_narrowing): Only check arithmetic types.
193
194         PR c++/46688
195         * tree.c (build_vec_init_expr): Handle flexible array
196         properly.
197
198 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
199
200         PR c++/47213
201         * cp-tree.h (CLASSTYPE_VISIBILITY): Use
202         TYPE_MAIN_DECL instead of TYPE_NAME.
203         (CLASSTYPE_VISIBILITY_SPECIFIED): Likewise.
204         * decl2.c (determine_visibility): Add check
205         of CLASS_TYPE_P for underlying_type.
206
207 2011-01-12  Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
208
209         * cp-tree.h (begin_for_scope): New prototype.
210         (begin_for_stmt): Update prototype.
211         (begin_range_for_stmt): Update prototype.
212         * init.c (build_vec_init): Update call to begin_for_stmt.
213         * parser.c (cp_parser_for): New.
214         (cp_parser_c_for): Add three new parameters.
215         (cp_parser_range_for): Likewise. Most parsing code removed.
216         (cp_parser_iteration_statement): Call cp_parser_for instead of
217         cp_parser_c_for and cp_parser_range_for.
218         (cp_parser_for_init_statement): Add new parameter and return type.
219         (cp_parser_block_declaration): Update call to
220         cp_parser_simple_declaration.
221         (cp_parser_simple_declaration): Add new parameter.
222         Update call to cp_parser_init_declarator.
223         (cp_parser_init_declarator): Add new parameter.
224         * pt.c (tsubst_expr): Update call to begin_for_stmt.
225         * semantics.c (begin_for_scope): New.
226         (begin_for_stmt): Add two new parameters.
227         (begin_range_for_stmt): Likewise.
228
229 2011-01-12  Nicola Pero  <nicola.pero@meta-innovation.com>
230
231         * parser.c (cp_parser_objc_at_property_declaration): Improved
232         error message.
233
234 2011-01-11  Dodji Seketeli  <dodji@redhat.com>
235
236         PR debug/46955
237         * cp-lang.c (get_template_innermost_arguments_folded)
238         (get_template_argument_pack_elems_folded)
239         (template_arg_needs_folding, fold_cplus_constants): New static
240         functions.
241         (LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS): Set this hook to
242         get_template_innermost_arguments_folded.
243         (LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS): Set this hook to
244         get_template_argument_pack_elems_folded.
245
246 2011-01-11  Jason Merrill  <jason@redhat.com>
247
248         PR c++/46658
249         * init.c (build_new_1): Handle value-init in templates differently.
250
251         PR c++/45520
252         * tree.c (maybe_dummy_object): Check current_class_ref against
253         context, not current_class_type.
254
255 2011-01-08  Nicola Pero  <nicola.pero@meta-innovation.com>
256
257         PR objc/47078
258         * parser.c (cp_parser_objc_typename): If the type is unknown, for
259         error recovery purposes behave as if it was not specified so that
260         the default type is used.
261
262 2011-01-07  Jakub Jelinek  <jakub@redhat.com>
263
264         PR c++/47022
265         * pt.c (tsubst_copy_and_build): Use tsubst instead of tsubst_copy
266         for the second build_x_va_arg argument.
267
268 2011-01-05  Tom Tromey  <tromey@redhat.com>
269
270         * typeck.c (cp_build_addr_expr_1): Update call to lvalue_error.
271         (lvalue_or_else): Likewise.
272
273 2011-01-01  Kai Tietz  <kai.tietz@onevision.com>
274
275         PR target/38662
276         * tree.c (cxx_type_hash_eq):
277         Allow METHOD_TYPE, too.
278
279 \f
280 Copyright (C) 2011 Free Software Foundation, Inc.
281
282 Copying and distribution of this file, with or without modification,
283 are permitted in any medium without royalty provided the copyright
284 notice and this notice are preserved.