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