1 2011-02-23 Jason Merrill <jason@redhat.com>
3 * cp-tree.h (DECL_PARM_LEVEL): New.
4 (struct lang_decl_parm): Add level field.
5 * name-lookup.c (function_parm_depth): New fn.
6 * name-lookup.h: Declare it.
7 * parser.c (cp_parser_parameter_declaration_list): Use it.
8 * mangle.c (struct globals): Add parm_depth field.
9 (write_bare_function_type): Adjust it.
10 (write_expression): Include the level delta in PARM_DECL mangling
13 * semantics.c (finish_decltype_type): Remove shortcut for decltype
15 * mangle.c (write_type) [DECLTYPE_TYPE]: Strip it here for abi < 6.
17 2011-02-23 Nathan Froyd <froydnj@codesourcery.com>
20 * parser.c (cp_parser_class_specifier): Require a closing brace
21 to attempt error recovery.
23 2011-02-23 Jakub Jelinek <jakub@redhat.com>
26 * pt.c (struct pending_template): Add chain_next GTY option.
27 * decl.c (struct named_label_use_entry): Likewise.
29 2011-02-22 Paolo Carlini <paolo.carlini@oracle.com>
32 * semantics.c (build_lambda_object): Bail out if a field is
35 2011-02-22 Dodji Seketeli <dodji@redhat.com>
38 * class.c (dfs_declare_virt_assop_and_dtor)
39 (declare_virt_assop_and_dtor): New static functions.
40 (add_implicitly_declared_members): Use
41 declare_virt_assop_and_dtor.
43 2011-02-21 Jason Merrill <jason@redhat.com>
46 * decl2.c (decl_constant_var_p): A constexpr var needs an
47 initializer to be constant.
48 * semantics.c (cxx_eval_constant_expression): Complain about
49 constexpr var used in its own initializer.
50 * call.c (set_up_extended_ref_temp): Set
51 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P too.
53 2011-02-20 Jason Merrill <jason@redhat.com>
56 * semantics.c (cxx_eval_call_expression): Call
57 cxx_eval_constant_expression in trivial shortcut.
60 * call.c (convert_class_to_reference): Don't try to set up a
61 second conv sequence for non-viable candidates.
64 * error.c (location_of): Handle non-tagged types.
67 * method.c (process_subob_fn): Instantiate constexpr templates.
68 * optimize.c (maybe_clone_body): Propagate DECL_DECLARED_CONSTEXPR_P.
70 2011-02-20 Dodji Seketeli <dodji@redhat.com>
73 * pt.c (tsubst_pack_expansion): do not use
74 cp_tree_equal/same_type_p to detect an expansion of a parameter
77 2011-02-19 Jason Merrill <jason@redhat.com>
80 * semantics.c (cxx_eval_call_expression): Shortcut trivial copy.
82 2011-02-18 Paolo Carlini <paolo.carlini@oracle.com>
85 * semantics.c (finish_non_static_data_member): Early return if
86 object is error_mark_node.
88 2011-02-18 Dodji Seketeli <dodji@redhat.com>
91 * pt.c (do_auto_deduction): Do not mention error_mark_node in
93 * semantics.c (finish_id_expression): Do not pass erroneous decl
94 to decl_constant_var_p.
96 2011-02-17 Jakub Jelinek <jakub@redhat.com>
99 * cvt.c (convert_from_reference): Call mark_exp_read.
101 2011-02-11 Dodji Seketeli <dodji@redhat.com>
104 * pt.c (finish_call_expr): Consider a call expression that has a
105 dependent "this" pointer as being dependent. Add comments.
106 (dependent_type_p, type_dependent_expression_p): Update comments.
108 2011-02-16 Dodji Seketeli <dodji@redhat.com>
111 * pt.c (tsubst_copy)<case SIZEOF_EXPR>: Ensure that even pack
112 expansion arguments are not evaluated.
114 2011-02-16 Jakub Jelinek <jakub@redhat.com>
117 * cp-tree.h (ENUM_FIXED_UNDERLYING_TYPE_P): Use TYPE_LANG_FLAG_5
118 instead of TYPE_LANG_FLAG_3.
119 * pt.c (lookup_template_class): Copy over
120 ENUM_FIXED_UNDERLYING_TYPE_P.
122 2011-02-15 Jason Merrill <jason@redhat.com>
125 * method.c (synthesized_method_walk): Always exit early for
126 trivial fn in C++98 mode.
128 2011-02-14 Jason Merrill <jason@redhat.com>
131 * parser.c (cp_parser_enumerator_definition): Call
132 fold_non_dependent_expr.
134 2011-02-09 Jason Merrill <jason@redhat.com>
136 * decl.c (cp_make_fname_decl): Set DECL_THIS_STATIC at toplevel.
137 * semantics.c (finish_fname): Only return the name if we're in
140 * decl.c (build_enumerator): Don't perform integral promotions on
141 non-integral constants.
143 * cvt.c (convert_to_void): Handle null op1.
145 * class.c (type_has_constexpr_default_constructor): Make sure the
146 caller stripped an enclosing array.
147 * init.c (perform_member_init): Strip arrays before calling it.
150 * semantics.c (potential_constant_expression_1): Handle TEMPLATE_DECL.
152 2011-02-03 Dodji Seketeli <dodji@redhat.com>
155 * tree.c (cp_tree_equal)<TEMPLATE_PARM_INDEX>: Take the number of
156 template parameters in account.
158 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
161 * parser.c (cp_parser_class_specifier): Fix setting of
164 2011-01-31 Jakub Jelinek <jakub@redhat.com>
167 * semantics.c (build_data_member_initialization): Handle
168 STATEMENT_LIST always instead of just for CLEANUP_BODY.
170 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
172 * g++spec.c (lang_specific_driver) [HAVE_LD_STATIC_DYNAMIC] Use
173 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
175 2011-01-29 Dodji Seketeli <dodji@redhat.com>
178 * cp-tree.h (fixup_template_parms): Declare.
179 * pt.c (end_template_parm_list): Do not fixup template parms here.
180 (fixup_template_parms): Remove static. Fix typo in the
181 comments. Remove useless code statement.
182 (fixup_template_parm): For a template template parameter, fixup
183 its attributes before fixing up its type.
185 (cp_parser_template_declaration_after_export): After parsing
186 template parameters fixup their types.
188 2011-01-26 Jakub Jelinek <jakub@redhat.com>
191 * semantics.c (potential_constant_expression_1): Handle
194 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
197 * semantics.c (expand_or_defer_fn_1): Handle it.
198 * decl2.c (decl_needed_p): Likewise.
200 2011-01-21 Jason Merrill <jason@redhat.com>
203 * semantics.c (build_constexpr_constructor_member_initializers):
206 2011-01-21 Jakub Jelinek <jakub@redhat.com>
209 * semantics.c (begin_for_stmt): If -fno-for-scope, don't
210 assume init must be NULL if scope is NULL.
211 (begin_range_for_stmt): Likewise.
213 2011-01-21 Jason Merrill <jason@redhat.com>
216 * semantics.c (cxx_eval_constant_expression): Handle OFFSET_REF.
219 * semantics.c (potential_constant_expression_1): Split out from
220 potential_constant_expression. Add want_rval parm. Handle
221 template expression forms. Don't enforce restriction on address
222 of automatic variable here. Add a couple of diagnostics that
224 (require_potential_constant_expression): New entry point.
225 (build_data_member_initialization, register_constexpr_fundef): Adjust.
226 (maybe_constant_value): Check potential_constant_expression.
227 * pt.c (fold_non_dependent_expr_sfinae): Likewise.
228 * tree.c (build_vec_init_expr): Adjust.
230 2011-01-19 Jakub Jelinek <jakub@redhat.com>
233 * decl2.c (finish_anon_union): Only call mangle_decl if TREE_STATIC
236 2011-01-17 Jason Merrill <jason@redhat.com>
239 * semantics.c (base_field_constructor_elt): New fn.
240 (cxx_eval_bare_aggregate): Use it.
241 (build_data_member_initialization): Leave COMPONENT_REF for
244 2011-01-14 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
246 * parser.c (cp_parser_range_for): Remove the "unused variable" warning
249 2011-01-15 Giovanni Funchal <gafunchal@gmail.com>
250 Jonathan Wakely <jwakely.gcc@gmail.com>
253 * decl.c (grokdeclarator): Reject mutable reference members.
255 2011-01-14 Jason Merrill <jason@redhat.com>
258 * pt.c (coerce_template_parms): Fix error recovery.
261 * typeck2.c (check_narrowing): Only check arithmetic types.
264 * tree.c (build_vec_init_expr): Handle flexible array
267 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
270 * cp-tree.h (CLASSTYPE_VISIBILITY): Use
271 TYPE_MAIN_DECL instead of TYPE_NAME.
272 (CLASSTYPE_VISIBILITY_SPECIFIED): Likewise.
273 * decl2.c (determine_visibility): Add check
274 of CLASS_TYPE_P for underlying_type.
276 2011-01-12 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
278 * cp-tree.h (begin_for_scope): New prototype.
279 (begin_for_stmt): Update prototype.
280 (begin_range_for_stmt): Update prototype.
281 * init.c (build_vec_init): Update call to begin_for_stmt.
282 * parser.c (cp_parser_for): New.
283 (cp_parser_c_for): Add three new parameters.
284 (cp_parser_range_for): Likewise. Most parsing code removed.
285 (cp_parser_iteration_statement): Call cp_parser_for instead of
286 cp_parser_c_for and cp_parser_range_for.
287 (cp_parser_for_init_statement): Add new parameter and return type.
288 (cp_parser_block_declaration): Update call to
289 cp_parser_simple_declaration.
290 (cp_parser_simple_declaration): Add new parameter.
291 Update call to cp_parser_init_declarator.
292 (cp_parser_init_declarator): Add new parameter.
293 * pt.c (tsubst_expr): Update call to begin_for_stmt.
294 * semantics.c (begin_for_scope): New.
295 (begin_for_stmt): Add two new parameters.
296 (begin_range_for_stmt): Likewise.
298 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
300 * parser.c (cp_parser_objc_at_property_declaration): Improved
303 2011-01-11 Dodji Seketeli <dodji@redhat.com>
306 * cp-lang.c (get_template_innermost_arguments_folded)
307 (get_template_argument_pack_elems_folded)
308 (template_arg_needs_folding, fold_cplus_constants): New static
310 (LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS): Set this hook to
311 get_template_innermost_arguments_folded.
312 (LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS): Set this hook to
313 get_template_argument_pack_elems_folded.
315 2011-01-11 Jason Merrill <jason@redhat.com>
318 * init.c (build_new_1): Handle value-init in templates differently.
321 * tree.c (maybe_dummy_object): Check current_class_ref against
322 context, not current_class_type.
324 2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
327 * parser.c (cp_parser_objc_typename): If the type is unknown, for
328 error recovery purposes behave as if it was not specified so that
329 the default type is used.
331 2011-01-07 Jakub Jelinek <jakub@redhat.com>
334 * pt.c (tsubst_copy_and_build): Use tsubst instead of tsubst_copy
335 for the second build_x_va_arg argument.
337 2011-01-05 Tom Tromey <tromey@redhat.com>
339 * typeck.c (cp_build_addr_expr_1): Update call to lvalue_error.
340 (lvalue_or_else): Likewise.
342 2011-01-01 Kai Tietz <kai.tietz@onevision.com>
345 * tree.c (cxx_type_hash_eq):
346 Allow METHOD_TYPE, too.
349 Copyright (C) 2011 Free Software Foundation, Inc.
351 Copying and distribution of this file, with or without modification,
352 are permitted in any medium without royalty provided the copyright
353 notice and this notice are preserved.