1 2009-03-17 Jing Yu <jingyu@google.com>
4 * method.c (use_thunk): Change is_thunk from crtl to cfun.
6 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
9 * semantics.c (check_trait_type): New.
10 (finish_trait_expr): Use it.
12 2009-03-17 Jakub Jelinek <jakub@redhat.com>
14 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
15 instead of calling imported_module_or_decl debug hook if
16 building_stmt_tree ().
17 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
21 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
22 hook at function scope.
25 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
28 2009-03-09 Jakub Jelinek <jakub@redhat.com>
31 * semantics.c (finish_switch_cond): Don't call get_unwidened.
32 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
33 instead of TREE_TYPE (cond).
35 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
38 * parser.c (cp_parser_late_parsing_default_args): Continue
39 the loop when cp_parser_assignment_expression returns
42 2009-03-07 Jason Merrill <jason@redhat.com>
45 * init.c (build_new_1): Don't use a VLA type.
46 (build_vec_init): Handle getting a pointer for BASE.
48 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
51 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
52 when mangling symbols.
54 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
57 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
59 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
61 * decl.c (record_builtin_java_type): Use canonicalized integer
64 2009-03-04 Jason Merrill <jason@redhat.com>
67 * class.c (is_really_empty_class): New fn.
68 * cp-tree.h: Declare it.
69 * cp-objcp-common.c (cp_expr_size): Use it.
72 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
73 * parser.c (cp_parser_postfix_expression): Call it for
75 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
76 (get_first_fn): Likewise.
82 * decl.c (make_typename_type): Do look inside currently open classes.
83 * parser.c (cp_parser_lookup_name): Likewise.
84 (cp_parser_template_name): Likewise.
85 * pt.c (dependent_scope_p): New function.
86 * cp-tree.h: Declare it.
87 * class.c (currently_open_class): Return fast if T isn't a class.
89 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
92 * parser.c (cp_parser_mem_initializer): Return error_mark_node
93 if cp_parser_mem_initializer_id returns error_mark_node.
95 2009-02-24 Richard Guenther <rguenther@suse.de>
98 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
101 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
104 * pt.c (coerce_template_template_parms): Return 0 if parameter
107 2009-02-23 Jason Merrill <jason@redhat.com>
109 * pt.c (unify): Call maybe_adjust_types_for_deduction when
110 deducing from an initializer list.
112 2009-02-20 Jason Merrill <jason@redhat.com>
115 * decl.c (grokdeclarator): Handle ~identifier.
117 2009-02-19 Jakub Jelinek <jakub@redhat.com>
120 * decl2.c (determine_visibility): If visibility changed and
121 DECL_RTL has been already set, call make_decl_rtl to update symbol
124 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
127 * cp-tree.h (maybe_commonize_var): New.
129 * decl.c (maybe_commonize_var): Make it extern.
131 * decl2.c (finish_anon_union): Call maybe_commonize_var.
133 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
136 * parser.c (cp_parser_enum_specifier): Apply all attributes.
138 2009-02-18 Jason Merrill <jason@redhat.com>
140 * cfns.h: Tweak pathname for cfns.gperf.
142 2009-02-13 Jason Merrill <jason@redhat.com>
145 * semantics.c (finish_call_expr): Change koenig_p parm to int.
146 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
147 * cp-tree.h: Adjust prototype.
148 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
150 2009-02-12 Jason Merrill <jason@redhat.com>
153 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
155 2009-02-11 Jason Merrill <jason@redhat.com>
158 * decl2.c (cp_write_global_declarations):
159 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
162 * init.c (build_value_init_noctor): Split out from...
163 (build_value_init): ...here.
164 (expand_aggr_init_1): Handle value-initialization.
165 * cp-tree.h: Add declaration.
166 * class.c (type_has_user_provided_constructor):
167 Handle non-class arguments.
169 2009-02-10 Jason Merrill <jason@redhat.com>
172 * class.c (defaultable_fn_p): Handle ... properly.
175 * tree.c (lvalue_p_1): Condition rvalue ref handling on
176 treat_class_rvalues_as_lvalues, too.
178 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
181 * typeck.c (build_x_array_ref): New.
182 * cp-tree.h: Declare it.
183 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
185 2009-02-09 Jason Merrill <jason@redhat.com>
188 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
189 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
190 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
191 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
192 for build_value_init TARGET_EXPR.
193 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
195 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
199 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
201 2009-02-04 Jakub Jelinek <jakub@redhat.com>
204 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
205 remove ./dt operator.
206 * mangle.c (write_expression): Handle COMPONENT_REF after handling
207 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
208 write_string ("dt") instead of using operators.def.
210 2009-02-03 Jason Merrill <jason@redhat.com>
212 * typeck.c (cp_build_unary_op): Only complain about taking address
215 2009-02-03 Jakub Jelinek <jakub@redhat.com>
218 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
221 * typeck2.c (digest_init_r): Don't call process_init_constructor
224 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
227 * pt.c (convert_nontype_argument_function): Expect expr to be an
231 * typeck.c (merge_types): Call resolve_typename_type if only
232 one type is a typename.
234 2009-02-02 Jason Merrill <jason@redhat.com>
237 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
240 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
243 * parser.c (cp_parser_pure_specifier): If there are no tokens left
244 do not call cp_lexer_consume_token.
246 2009-01-30 Jakub Jelinek <jakub@redhat.com>
249 * parser.c (cp_parser_already_scoped_statement): Handle __label__
252 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
255 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
257 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
260 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
262 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
264 * typeck.c (invalid_nonstatic_memfn_p): Use
265 DECL_NONSTATIC_MEMBER_FUNCTION_P.
267 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
270 * call.c (build_over_call): If convert_for_arg_passing returns
271 error_mark_node unconditionally return it.
273 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
275 * class.c (check_field_decls): Also inherit packed for bitfields
276 regardless of their type.
278 2009-01-22 Dodji Seketeli <dodji@redhat.com>
281 * decl2.c (grokfield): Reverting changes of PR c++/26693
282 (save_template_attributes): Likewise.
283 * decl.c (grokdeclarator): Likewise.
284 * name-lookup.c (pushdecl_maybe_friend): Likewise.
285 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
286 (append_type_to_template_for_access_check): Likewise.
287 * semantics.c (check_accessibility_of_qualified_id): Likewise.
288 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
290 (resolve_type_name_type): Likewise.
291 (append_type_to_template_for_access_check): Likewise.
293 2009-01-21 Dodji Seketeli <dodji@redhat.com>
296 * decl2.c (grokfield): when a typedef appears in a
297 class, create the typedef variant type node for it.
298 (save_template_attributes): Creating typedef variant type node
300 * decl.c (grokdeclarator): If the typedef'ed struct/class was
301 anonymous, set the proper type name to all its type variants.
302 * name-lookup.c (pushdecl_maybe_friend): Reuse the
303 set_underlying_type function to install typedef variant types.
304 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
306 (append_type_to_template_for_access_check): New entry points.
307 * semantics.c (check_accessibility_of_qualified_id):
308 When a typedef that is a member of a class appears in a template,
309 add it to the template. It will be ...
310 * pt.c (instantiate_class_template, instantiate_template ): ... access
311 checked at template instantiation time.
312 (tsubst): Handle the case of being called with NULL args.
313 (resolve_type_name_type): The type name should be the name of the
315 (append_type_to_template_for_access_check): New entry point.
317 2009-01-19 Jason Merrill <jason@redhat.com>
320 * parser.c (cp_parser_unqualified_id): In a template,
322 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
324 2009-01-16 Jason Merrill <jason@redhat.com>
327 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
328 * init.c (build_new): Don't call describable_type unless we
332 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
335 * search.c (protected_accessible_p): N doesn't vary.
337 2009-01-15 Jason Merrill <jason@redhat.com>
340 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
341 accept hidden friends.
343 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
346 * decl.c (grokdeclarator): Check for a non namespace/class context.
348 2009-01-15 Jason Merrill <jason@redhat.com>
352 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
353 a function isn't necessarily an lvalue. Take tree, not const_tree.
354 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
355 * typeck.c (lvalue_or_else): Likewise.
356 * cp-tree.h: Adjust prototypes.
358 2009-01-15 Steve Ellcey <sje@cup.hp.com>
361 * pt.c (tsubst): Check for NULL args.
363 2009-01-15 Dodji Seketeli <dodji@redhat.com>
366 * name-lookup.c (pushtag): Don't create members to types that are not
369 2009-01-14 Nick Clifton <nickc@redhat.com>
372 * parser.c: Pass cp_id_kind computed in
373 cp_parser_postfix_dot_deref_expression to
374 cp_parser_primary_expression.
376 2009-01-13 Jakub Jelinek <jakub@redhat.com>
379 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
380 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
383 2009-01-12 Jason Merrill <jason@redhat.com>
384 Steve Ellcey <sje@cup.hp.com>
387 * name-lookup.c (lookup_name_real): Keep looking past a hidden
390 2009-01-12 Dodji Seketeli <dodji@redhat.com>
393 * pt.c (parameter_of_template_p): New function.
394 * cp-tree.h: Declare it.
395 * name-lookup.c (binding_to_template_parms_of_scope_p): New
397 (outer_binding): Take template parameters in account when looking for
400 2009-01-12 Jason Merrill <jason@redhat.com>
403 * tree.c (pod_type_p): Return 1 for structs created by the back end.
405 2009-01-12 Jakub Jelinek <jakub@redhat.com>
408 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
409 offsetof member-designator, handle it as `[0].'.
412 * decl.c (start_function): If grokdeclarator hasn't returned
413 FUNCTION_DECL nor error_mark_node, issue diagnostics.
415 2009-01-11 Jakub Jelinek <jakub@redhat.com>
418 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
419 (gimplify_if_stmt): ... this.
420 (cp_gimplify_expr): Don't handle IF_STMT here.
421 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
423 2009-01-10 Andrew Pinski <pinskia@gmail.com>
426 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
429 * typeck2.c (build_functional_cast): Check for reference type and NULL
432 2009-01-09 Steve Ellcey <sje@cup.hp.com>
434 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
436 2009-01-09 Jakub Jelinek <jakub@redhat.com>
439 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
441 2009-01-09 John F. Carr <jfc@mit.edu>
444 * parser.c (cp_parser_class_specifier): Clear
445 parser->in_unbraced_linkage_specification_p while parsing class
448 2009-01-07 Jakub Jelinek <jakub@redhat.com>
451 * semantics.c (finish_goto_stmt): Convert destination to
454 2009-01-06 Jason Merrill <jason@redhat.com>
461 * pt.c (check_default_tmpl_args): Don't complain about
462 out-of-order parameter packs in the enclosing class
463 or parameter packs after default args.
464 (coerce_template_parms): If we have more than one
465 parameter pack, don't flatten argument packs.
466 (template_args_equal): Handle argument packs.
467 (comp_template_args): Don't flatten argument packs.
468 (check_instantiated_arg): Split out from...
469 (check_instantiated_args): Here. Handle arg packs.
470 (convert_template_argument): Just check that nontype argument
471 packs have the right type.
473 2009-01-05 Dodji Seketeli <dodji@redhat.com>
476 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
478 2009-01-05 Jason Merrill <jason@redhat.com>
481 * typeck2.c (process_init_constructor_union): Handle union with
484 * mangle.c (write_expression): Remove mangling for zero-operand
488 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
492 * class.c (defaultable_fn_p): Only operator== can be a copy
495 2009-01-02 Jason Merrill <jason@redhat.com>
498 * typeck2.c (process_init_constructor_union): Handle excess
500 (process_init_constructor_record): Likewise.
503 * typeck2.c (digest_init_r): Don't use process_init_constructor
504 for non-aggregate classes.