1 2009-03-17 Jakub Jelinek <jakub@redhat.com>
3 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
4 instead of calling imported_module_or_decl debug hook if
6 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
10 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
11 hook at function scope.
14 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
17 2009-03-09 Jakub Jelinek <jakub@redhat.com>
20 * semantics.c (finish_switch_cond): Don't call get_unwidened.
21 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
22 instead of TREE_TYPE (cond).
24 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
27 * parser.c (cp_parser_late_parsing_default_args): Continue
28 the loop when cp_parser_assignment_expression returns
31 2009-03-07 Jason Merrill <jason@redhat.com>
34 * init.c (build_new_1): Don't use a VLA type.
35 (build_vec_init): Handle getting a pointer for BASE.
37 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
40 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
41 when mangling symbols.
43 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
46 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
48 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
50 * decl.c (record_builtin_java_type): Use canonicalized integer
53 2009-03-04 Jason Merrill <jason@redhat.com>
56 * class.c (is_really_empty_class): New fn.
57 * cp-tree.h: Declare it.
58 * cp-objcp-common.c (cp_expr_size): Use it.
61 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
62 * parser.c (cp_parser_postfix_expression): Call it for
64 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
65 (get_first_fn): Likewise.
71 * decl.c (make_typename_type): Do look inside currently open classes.
72 * parser.c (cp_parser_lookup_name): Likewise.
73 (cp_parser_template_name): Likewise.
74 * pt.c (dependent_scope_p): New function.
75 * cp-tree.h: Declare it.
76 * class.c (currently_open_class): Return fast if T isn't a class.
78 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
81 * parser.c (cp_parser_mem_initializer): Return error_mark_node
82 if cp_parser_mem_initializer_id returns error_mark_node.
84 2009-02-24 Richard Guenther <rguenther@suse.de>
87 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
90 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
93 * pt.c (coerce_template_template_parms): Return 0 if parameter
96 2009-02-23 Jason Merrill <jason@redhat.com>
98 * pt.c (unify): Call maybe_adjust_types_for_deduction when
99 deducing from an initializer list.
101 2009-02-20 Jason Merrill <jason@redhat.com>
104 * decl.c (grokdeclarator): Handle ~identifier.
106 2009-02-19 Jakub Jelinek <jakub@redhat.com>
109 * decl2.c (determine_visibility): If visibility changed and
110 DECL_RTL has been already set, call make_decl_rtl to update symbol
113 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
116 * cp-tree.h (maybe_commonize_var): New.
118 * decl.c (maybe_commonize_var): Make it extern.
120 * decl2.c (finish_anon_union): Call maybe_commonize_var.
122 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
125 * parser.c (cp_parser_enum_specifier): Apply all attributes.
127 2009-02-18 Jason Merrill <jason@redhat.com>
129 * cfns.h: Tweak pathname for cfns.gperf.
131 2009-02-13 Jason Merrill <jason@redhat.com>
134 * semantics.c (finish_call_expr): Change koenig_p parm to int.
135 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
136 * cp-tree.h: Adjust prototype.
137 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
139 2009-02-12 Jason Merrill <jason@redhat.com>
142 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
144 2009-02-11 Jason Merrill <jason@redhat.com>
147 * decl2.c (cp_write_global_declarations):
148 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
151 * init.c (build_value_init_noctor): Split out from...
152 (build_value_init): ...here.
153 (expand_aggr_init_1): Handle value-initialization.
154 * cp-tree.h: Add declaration.
155 * class.c (type_has_user_provided_constructor):
156 Handle non-class arguments.
158 2009-02-10 Jason Merrill <jason@redhat.com>
161 * class.c (defaultable_fn_p): Handle ... properly.
164 * tree.c (lvalue_p_1): Condition rvalue ref handling on
165 treat_class_rvalues_as_lvalues, too.
167 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
170 * typeck.c (build_x_array_ref): New.
171 * cp-tree.h: Declare it.
172 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
174 2009-02-09 Jason Merrill <jason@redhat.com>
177 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
178 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
179 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
180 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
181 for build_value_init TARGET_EXPR.
182 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
184 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
188 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
190 2009-02-04 Jakub Jelinek <jakub@redhat.com>
193 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
194 remove ./dt operator.
195 * mangle.c (write_expression): Handle COMPONENT_REF after handling
196 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
197 write_string ("dt") instead of using operators.def.
199 2009-02-03 Jason Merrill <jason@redhat.com>
201 * typeck.c (cp_build_unary_op): Only complain about taking address
204 2009-02-03 Jakub Jelinek <jakub@redhat.com>
207 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
210 * typeck2.c (digest_init_r): Don't call process_init_constructor
213 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
216 * pt.c (convert_nontype_argument_function): Expect expr to be an
220 * typeck.c (merge_types): Call resolve_typename_type if only
221 one type is a typename.
223 2009-02-02 Jason Merrill <jason@redhat.com>
226 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
229 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
232 * parser.c (cp_parser_pure_specifier): If there are no tokens left
233 do not call cp_lexer_consume_token.
235 2009-01-30 Jakub Jelinek <jakub@redhat.com>
238 * parser.c (cp_parser_already_scoped_statement): Handle __label__
241 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
244 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
246 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
249 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
251 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
253 * typeck.c (invalid_nonstatic_memfn_p): Use
254 DECL_NONSTATIC_MEMBER_FUNCTION_P.
256 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
259 * call.c (build_over_call): If convert_for_arg_passing returns
260 error_mark_node unconditionally return it.
262 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
264 * class.c (check_field_decls): Also inherit packed for bitfields
265 regardless of their type.
267 2009-01-22 Dodji Seketeli <dodji@redhat.com>
270 * decl2.c (grokfield): Reverting changes of PR c++/26693
271 (save_template_attributes): Likewise.
272 * decl.c (grokdeclarator): Likewise.
273 * name-lookup.c (pushdecl_maybe_friend): Likewise.
274 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
275 (append_type_to_template_for_access_check): Likewise.
276 * semantics.c (check_accessibility_of_qualified_id): Likewise.
277 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
279 (resolve_type_name_type): Likewise.
280 (append_type_to_template_for_access_check): Likewise.
282 2009-01-21 Dodji Seketeli <dodji@redhat.com>
285 * decl2.c (grokfield): when a typedef appears in a
286 class, create the typedef variant type node for it.
287 (save_template_attributes): Creating typedef variant type node
289 * decl.c (grokdeclarator): If the typedef'ed struct/class was
290 anonymous, set the proper type name to all its type variants.
291 * name-lookup.c (pushdecl_maybe_friend): Reuse the
292 set_underlying_type function to install typedef variant types.
293 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
295 (append_type_to_template_for_access_check): New entry points.
296 * semantics.c (check_accessibility_of_qualified_id):
297 When a typedef that is a member of a class appears in a template,
298 add it to the template. It will be ...
299 * pt.c (instantiate_class_template, instantiate_template ): ... access
300 checked at template instantiation time.
301 (tsubst): Handle the case of being called with NULL args.
302 (resolve_type_name_type): The type name should be the name of the
304 (append_type_to_template_for_access_check): New entry point.
306 2009-01-19 Jason Merrill <jason@redhat.com>
309 * parser.c (cp_parser_unqualified_id): In a template,
311 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
313 2009-01-16 Jason Merrill <jason@redhat.com>
316 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
317 * init.c (build_new): Don't call describable_type unless we
321 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
324 * search.c (protected_accessible_p): N doesn't vary.
326 2009-01-15 Jason Merrill <jason@redhat.com>
329 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
330 accept hidden friends.
332 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
335 * decl.c (grokdeclarator): Check for a non namespace/class context.
337 2009-01-15 Jason Merrill <jason@redhat.com>
341 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
342 a function isn't necessarily an lvalue. Take tree, not const_tree.
343 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
344 * typeck.c (lvalue_or_else): Likewise.
345 * cp-tree.h: Adjust prototypes.
347 2009-01-15 Steve Ellcey <sje@cup.hp.com>
350 * pt.c (tsubst): Check for NULL args.
352 2009-01-15 Dodji Seketeli <dodji@redhat.com>
355 * name-lookup.c (pushtag): Don't create members to types that are not
358 2009-01-14 Nick Clifton <nickc@redhat.com>
361 * parser.c: Pass cp_id_kind computed in
362 cp_parser_postfix_dot_deref_expression to
363 cp_parser_primary_expression.
365 2009-01-13 Jakub Jelinek <jakub@redhat.com>
368 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
369 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
372 2009-01-12 Jason Merrill <jason@redhat.com>
373 Steve Ellcey <sje@cup.hp.com>
376 * name-lookup.c (lookup_name_real): Keep looking past a hidden
379 2009-01-12 Dodji Seketeli <dodji@redhat.com>
382 * pt.c (parameter_of_template_p): New function.
383 * cp-tree.h: Declare it.
384 * name-lookup.c (binding_to_template_parms_of_scope_p): New
386 (outer_binding): Take template parameters in account when looking for
389 2009-01-12 Jason Merrill <jason@redhat.com>
392 * tree.c (pod_type_p): Return 1 for structs created by the back end.
394 2009-01-12 Jakub Jelinek <jakub@redhat.com>
397 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
398 offsetof member-designator, handle it as `[0].'.
401 * decl.c (start_function): If grokdeclarator hasn't returned
402 FUNCTION_DECL nor error_mark_node, issue diagnostics.
404 2009-01-11 Jakub Jelinek <jakub@redhat.com>
407 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
408 (gimplify_if_stmt): ... this.
409 (cp_gimplify_expr): Don't handle IF_STMT here.
410 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
412 2009-01-10 Andrew Pinski <pinskia@gmail.com>
415 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
418 * typeck2.c (build_functional_cast): Check for reference type and NULL
421 2009-01-09 Steve Ellcey <sje@cup.hp.com>
423 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
425 2009-01-09 Jakub Jelinek <jakub@redhat.com>
428 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
430 2009-01-09 John F. Carr <jfc@mit.edu>
433 * parser.c (cp_parser_class_specifier): Clear
434 parser->in_unbraced_linkage_specification_p while parsing class
437 2009-01-07 Jakub Jelinek <jakub@redhat.com>
440 * semantics.c (finish_goto_stmt): Convert destination to
443 2009-01-06 Jason Merrill <jason@redhat.com>
450 * pt.c (check_default_tmpl_args): Don't complain about
451 out-of-order parameter packs in the enclosing class
452 or parameter packs after default args.
453 (coerce_template_parms): If we have more than one
454 parameter pack, don't flatten argument packs.
455 (template_args_equal): Handle argument packs.
456 (comp_template_args): Don't flatten argument packs.
457 (check_instantiated_arg): Split out from...
458 (check_instantiated_args): Here. Handle arg packs.
459 (convert_template_argument): Just check that nontype argument
460 packs have the right type.
462 2009-01-05 Dodji Seketeli <dodji@redhat.com>
465 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
467 2009-01-05 Jason Merrill <jason@redhat.com>
470 * typeck2.c (process_init_constructor_union): Handle union with
473 * mangle.c (write_expression): Remove mangling for zero-operand
477 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
481 * class.c (defaultable_fn_p): Only operator== can be a copy
484 2009-01-02 Jason Merrill <jason@redhat.com>
487 * typeck2.c (process_init_constructor_union): Handle excess
489 (process_init_constructor_record): Likewise.
492 * typeck2.c (digest_init_r): Don't use process_init_constructor
493 for non-aggregate classes.