1 2009-03-04 Jason Merrill <jason@redhat.com>
6 * decl.c (make_typename_type): Do look inside currently open classes.
7 * parser.c (cp_parser_lookup_name): Likewise.
8 (cp_parser_template_name): Likewise.
9 * pt.c (dependent_scope_p): New function.
10 * cp-tree.h: Declare it.
11 * class.c (currently_open_class): Return fast if T isn't a class.
13 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
16 * parser.c (cp_parser_mem_initializer): Return error_mark_node
17 if cp_parser_mem_initializer_id returns error_mark_node.
19 2009-02-24 Richard Guenther <rguenther@suse.de>
22 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
25 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
28 * pt.c (coerce_template_template_parms): Return 0 if parameter
31 2009-02-23 Jason Merrill <jason@redhat.com>
33 * pt.c (unify): Call maybe_adjust_types_for_deduction when
34 deducing from an initializer list.
36 2009-02-20 Jason Merrill <jason@redhat.com>
39 * decl.c (grokdeclarator): Handle ~identifier.
41 2009-02-19 Jakub Jelinek <jakub@redhat.com>
44 * decl2.c (determine_visibility): If visibility changed and
45 DECL_RTL has been already set, call make_decl_rtl to update symbol
48 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
51 * cp-tree.h (maybe_commonize_var): New.
53 * decl.c (maybe_commonize_var): Make it extern.
55 * decl2.c (finish_anon_union): Call maybe_commonize_var.
57 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
60 * parser.c (cp_parser_enum_specifier): Apply all attributes.
62 2009-02-18 Jason Merrill <jason@redhat.com>
64 * cfns.h: Tweak pathname for cfns.gperf.
66 2009-02-13 Jason Merrill <jason@redhat.com>
69 * semantics.c (finish_call_expr): Change koenig_p parm to int.
70 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
71 * cp-tree.h: Adjust prototype.
72 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
74 2009-02-12 Jason Merrill <jason@redhat.com>
77 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
79 2009-02-11 Jason Merrill <jason@redhat.com>
82 * decl2.c (cp_write_global_declarations):
83 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
86 * init.c (build_value_init_noctor): Split out from...
87 (build_value_init): ...here.
88 (expand_aggr_init_1): Handle value-initialization.
89 * cp-tree.h: Add declaration.
90 * class.c (type_has_user_provided_constructor):
91 Handle non-class arguments.
93 2009-02-10 Jason Merrill <jason@redhat.com>
96 * class.c (defaultable_fn_p): Handle ... properly.
99 * tree.c (lvalue_p_1): Condition rvalue ref handling on
100 treat_class_rvalues_as_lvalues, too.
102 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
105 * typeck.c (build_x_array_ref): New.
106 * cp-tree.h: Declare it.
107 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
109 2009-02-09 Jason Merrill <jason@redhat.com>
112 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
113 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
114 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
115 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
116 for build_value_init TARGET_EXPR.
117 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
119 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
123 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
125 2009-02-04 Jakub Jelinek <jakub@redhat.com>
128 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
129 remove ./dt operator.
130 * mangle.c (write_expression): Handle COMPONENT_REF after handling
131 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
132 write_string ("dt") instead of using operators.def.
134 2009-02-03 Jason Merrill <jason@redhat.com>
136 * typeck.c (cp_build_unary_op): Only complain about taking address
139 2009-02-03 Jakub Jelinek <jakub@redhat.com>
142 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
145 * typeck2.c (digest_init_r): Don't call process_init_constructor
148 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
151 * pt.c (convert_nontype_argument_function): Expect expr to be an
155 * typeck.c (merge_types): Call resolve_typename_type if only
156 one type is a typename.
158 2009-02-02 Jason Merrill <jason@redhat.com>
161 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
164 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
167 * parser.c (cp_parser_pure_specifier): If there are no tokens left
168 do not call cp_lexer_consume_token.
170 2009-01-30 Jakub Jelinek <jakub@redhat.com>
173 * parser.c (cp_parser_already_scoped_statement): Handle __label__
176 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
179 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
181 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
184 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
186 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
188 * typeck.c (invalid_nonstatic_memfn_p): Use
189 DECL_NONSTATIC_MEMBER_FUNCTION_P.
191 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
194 * call.c (build_over_call): If convert_for_arg_passing returns
195 error_mark_node unconditionally return it.
197 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
199 * class.c (check_field_decls): Also inherit packed for bitfields
200 regardless of their type.
202 2009-01-22 Dodji Seketeli <dodji@redhat.com>
205 * decl2.c (grokfield): Reverting changes of PR c++/26693
206 (save_template_attributes): Likewise.
207 * decl.c (grokdeclarator): Likewise.
208 * name-lookup.c (pushdecl_maybe_friend): Likewise.
209 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
210 (append_type_to_template_for_access_check): Likewise.
211 * semantics.c (check_accessibility_of_qualified_id): Likewise.
212 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
214 (resolve_type_name_type): Likewise.
215 (append_type_to_template_for_access_check): Likewise.
217 2009-01-21 Dodji Seketeli <dodji@redhat.com>
220 * decl2.c (grokfield): when a typedef appears in a
221 class, create the typedef variant type node for it.
222 (save_template_attributes): Creating typedef variant type node
224 * decl.c (grokdeclarator): If the typedef'ed struct/class was
225 anonymous, set the proper type name to all its type variants.
226 * name-lookup.c (pushdecl_maybe_friend): Reuse the
227 set_underlying_type function to install typedef variant types.
228 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
230 (append_type_to_template_for_access_check): New entry points.
231 * semantics.c (check_accessibility_of_qualified_id):
232 When a typedef that is a member of a class appears in a template,
233 add it to the template. It will be ...
234 * pt.c (instantiate_class_template, instantiate_template ): ... access
235 checked at template instantiation time.
236 (tsubst): Handle the case of being called with NULL args.
237 (resolve_type_name_type): The type name should be the name of the
239 (append_type_to_template_for_access_check): New entry point.
241 2009-01-19 Jason Merrill <jason@redhat.com>
244 * parser.c (cp_parser_unqualified_id): In a template,
246 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
248 2009-01-16 Jason Merrill <jason@redhat.com>
251 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
252 * init.c (build_new): Don't call describable_type unless we
256 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
259 * search.c (protected_accessible_p): N doesn't vary.
261 2009-01-15 Jason Merrill <jason@redhat.com>
264 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
265 accept hidden friends.
267 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
270 * decl.c (grokdeclarator): Check for a non namespace/class context.
272 2009-01-15 Jason Merrill <jason@redhat.com>
276 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
277 a function isn't necessarily an lvalue. Take tree, not const_tree.
278 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
279 * typeck.c (lvalue_or_else): Likewise.
280 * cp-tree.h: Adjust prototypes.
282 2009-01-15 Steve Ellcey <sje@cup.hp.com>
285 * pt.c (tsubst): Check for NULL args.
287 2009-01-15 Dodji Seketeli <dodji@redhat.com>
290 * name-lookup.c (pushtag): Don't create members to types that are not
293 2009-01-14 Nick Clifton <nickc@redhat.com>
296 * parser.c: Pass cp_id_kind computed in
297 cp_parser_postfix_dot_deref_expression to
298 cp_parser_primary_expression.
300 2009-01-13 Jakub Jelinek <jakub@redhat.com>
303 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
304 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
307 2009-01-12 Jason Merrill <jason@redhat.com>
308 Steve Ellcey <sje@cup.hp.com>
311 * name-lookup.c (lookup_name_real): Keep looking past a hidden
314 2009-01-12 Dodji Seketeli <dodji@redhat.com>
317 * pt.c (parameter_of_template_p): New function.
318 * cp-tree.h: Declare it.
319 * name-lookup.c (binding_to_template_parms_of_scope_p): New
321 (outer_binding): Take template parameters in account when looking for
324 2009-01-12 Jason Merrill <jason@redhat.com>
327 * tree.c (pod_type_p): Return 1 for structs created by the back end.
329 2009-01-12 Jakub Jelinek <jakub@redhat.com>
332 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
333 offsetof member-designator, handle it as `[0].'.
336 * decl.c (start_function): If grokdeclarator hasn't returned
337 FUNCTION_DECL nor error_mark_node, issue diagnostics.
339 2009-01-11 Jakub Jelinek <jakub@redhat.com>
342 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
343 (gimplify_if_stmt): ... this.
344 (cp_gimplify_expr): Don't handle IF_STMT here.
345 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
347 2009-01-10 Andrew Pinski <pinskia@gmail.com>
350 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
353 * typeck2.c (build_functional_cast): Check for reference type and NULL
356 2009-01-09 Steve Ellcey <sje@cup.hp.com>
358 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
360 2009-01-09 Jakub Jelinek <jakub@redhat.com>
363 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
365 2009-01-09 John F. Carr <jfc@mit.edu>
368 * parser.c (cp_parser_class_specifier): Clear
369 parser->in_unbraced_linkage_specification_p while parsing class
372 2009-01-07 Jakub Jelinek <jakub@redhat.com>
375 * semantics.c (finish_goto_stmt): Convert destination to
378 2009-01-06 Jason Merrill <jason@redhat.com>
385 * pt.c (check_default_tmpl_args): Don't complain about
386 out-of-order parameter packs in the enclosing class
387 or parameter packs after default args.
388 (coerce_template_parms): If we have more than one
389 parameter pack, don't flatten argument packs.
390 (template_args_equal): Handle argument packs.
391 (comp_template_args): Don't flatten argument packs.
392 (check_instantiated_arg): Split out from...
393 (check_instantiated_args): Here. Handle arg packs.
394 (convert_template_argument): Just check that nontype argument
395 packs have the right type.
397 2009-01-05 Dodji Seketeli <dodji@redhat.com>
400 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
402 2009-01-05 Jason Merrill <jason@redhat.com>
405 * typeck2.c (process_init_constructor_union): Handle union with
408 * mangle.c (write_expression): Remove mangling for zero-operand
412 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
416 * class.c (defaultable_fn_p): Only operator== can be a copy
419 2009-01-02 Jason Merrill <jason@redhat.com>
422 * typeck2.c (process_init_constructor_union): Handle excess
424 (process_init_constructor_record): Likewise.
427 * typeck2.c (digest_init_r): Don't use process_init_constructor
428 for non-aggregate classes.