1 2009-03-18 Jakub Jelinek <jakub@redhat.com>
3 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
6 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
9 * parser.c (cp_parser_explicit_specialization): Don't skip the
10 rest of the specialization when begin_specialization returns
13 2009-03-17 Jason Merrill <jason@redhat.com>
15 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
16 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
17 * pt.c (check_explicit_specialization): Likewise.
18 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
20 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
21 * decl2.c (parm_index): New fn.
22 * semantics.c (finish_decltype_type): Don't use describable_type.
23 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
24 Give a sorry for unsupported codes rather than crash. Mangle
25 conversions with other than 1 operand. New mangling for PARM_DECL.
26 * operators.def (ALIGNOF_EXPR): Mangle as "az".
28 2009-03-17 Jing Yu <jingyu@google.com>
31 * method.c (use_thunk): Change is_thunk from crtl to cfun.
33 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
36 * semantics.c (check_trait_type): New.
37 (finish_trait_expr): Use it.
39 2009-03-17 Jakub Jelinek <jakub@redhat.com>
41 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
42 instead of calling imported_module_or_decl debug hook if
43 building_stmt_tree ().
44 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
48 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
49 hook at function scope.
52 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
55 2009-03-09 Jakub Jelinek <jakub@redhat.com>
58 * semantics.c (finish_switch_cond): Don't call get_unwidened.
59 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
60 instead of TREE_TYPE (cond).
62 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
65 * parser.c (cp_parser_late_parsing_default_args): Continue
66 the loop when cp_parser_assignment_expression returns
69 2009-03-07 Jason Merrill <jason@redhat.com>
72 * init.c (build_new_1): Don't use a VLA type.
73 (build_vec_init): Handle getting a pointer for BASE.
75 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
78 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
79 when mangling symbols.
81 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
84 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
86 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
88 * decl.c (record_builtin_java_type): Use canonicalized integer
91 2009-03-04 Jason Merrill <jason@redhat.com>
94 * class.c (is_really_empty_class): New fn.
95 * cp-tree.h: Declare it.
96 * cp-objcp-common.c (cp_expr_size): Use it.
99 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
100 * parser.c (cp_parser_postfix_expression): Call it for
102 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
103 (get_first_fn): Likewise.
109 * decl.c (make_typename_type): Do look inside currently open classes.
110 * parser.c (cp_parser_lookup_name): Likewise.
111 (cp_parser_template_name): Likewise.
112 * pt.c (dependent_scope_p): New function.
113 * cp-tree.h: Declare it.
114 * class.c (currently_open_class): Return fast if T isn't a class.
116 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
119 * parser.c (cp_parser_mem_initializer): Return error_mark_node
120 if cp_parser_mem_initializer_id returns error_mark_node.
122 2009-02-24 Richard Guenther <rguenther@suse.de>
125 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
128 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
131 * pt.c (coerce_template_template_parms): Return 0 if parameter
134 2009-02-23 Jason Merrill <jason@redhat.com>
136 * pt.c (unify): Call maybe_adjust_types_for_deduction when
137 deducing from an initializer list.
139 2009-02-20 Jason Merrill <jason@redhat.com>
142 * decl.c (grokdeclarator): Handle ~identifier.
144 2009-02-19 Jakub Jelinek <jakub@redhat.com>
147 * decl2.c (determine_visibility): If visibility changed and
148 DECL_RTL has been already set, call make_decl_rtl to update symbol
151 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
154 * cp-tree.h (maybe_commonize_var): New.
156 * decl.c (maybe_commonize_var): Make it extern.
158 * decl2.c (finish_anon_union): Call maybe_commonize_var.
160 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
163 * parser.c (cp_parser_enum_specifier): Apply all attributes.
165 2009-02-18 Jason Merrill <jason@redhat.com>
167 * cfns.h: Tweak pathname for cfns.gperf.
169 2009-02-13 Jason Merrill <jason@redhat.com>
172 * semantics.c (finish_call_expr): Change koenig_p parm to int.
173 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
174 * cp-tree.h: Adjust prototype.
175 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
177 2009-02-12 Jason Merrill <jason@redhat.com>
180 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
182 2009-02-11 Jason Merrill <jason@redhat.com>
185 * decl2.c (cp_write_global_declarations):
186 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
189 * init.c (build_value_init_noctor): Split out from...
190 (build_value_init): ...here.
191 (expand_aggr_init_1): Handle value-initialization.
192 * cp-tree.h: Add declaration.
193 * class.c (type_has_user_provided_constructor):
194 Handle non-class arguments.
196 2009-02-10 Jason Merrill <jason@redhat.com>
199 * class.c (defaultable_fn_p): Handle ... properly.
202 * tree.c (lvalue_p_1): Condition rvalue ref handling on
203 treat_class_rvalues_as_lvalues, too.
205 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
208 * typeck.c (build_x_array_ref): New.
209 * cp-tree.h: Declare it.
210 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
212 2009-02-09 Jason Merrill <jason@redhat.com>
215 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
216 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
217 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
218 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
219 for build_value_init TARGET_EXPR.
220 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
222 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
226 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
228 2009-02-04 Jakub Jelinek <jakub@redhat.com>
231 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
232 remove ./dt operator.
233 * mangle.c (write_expression): Handle COMPONENT_REF after handling
234 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
235 write_string ("dt") instead of using operators.def.
237 2009-02-03 Jason Merrill <jason@redhat.com>
239 * typeck.c (cp_build_unary_op): Only complain about taking address
242 2009-02-03 Jakub Jelinek <jakub@redhat.com>
245 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
248 * typeck2.c (digest_init_r): Don't call process_init_constructor
251 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
254 * pt.c (convert_nontype_argument_function): Expect expr to be an
258 * typeck.c (merge_types): Call resolve_typename_type if only
259 one type is a typename.
261 2009-02-02 Jason Merrill <jason@redhat.com>
264 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
267 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
270 * parser.c (cp_parser_pure_specifier): If there are no tokens left
271 do not call cp_lexer_consume_token.
273 2009-01-30 Jakub Jelinek <jakub@redhat.com>
276 * parser.c (cp_parser_already_scoped_statement): Handle __label__
279 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
282 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
284 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
287 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
289 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
291 * typeck.c (invalid_nonstatic_memfn_p): Use
292 DECL_NONSTATIC_MEMBER_FUNCTION_P.
294 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
297 * call.c (build_over_call): If convert_for_arg_passing returns
298 error_mark_node unconditionally return it.
300 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
302 * class.c (check_field_decls): Also inherit packed for bitfields
303 regardless of their type.
305 2009-01-22 Dodji Seketeli <dodji@redhat.com>
308 * decl2.c (grokfield): Reverting changes of PR c++/26693
309 (save_template_attributes): Likewise.
310 * decl.c (grokdeclarator): Likewise.
311 * name-lookup.c (pushdecl_maybe_friend): Likewise.
312 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
313 (append_type_to_template_for_access_check): Likewise.
314 * semantics.c (check_accessibility_of_qualified_id): Likewise.
315 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
317 (resolve_type_name_type): Likewise.
318 (append_type_to_template_for_access_check): Likewise.
320 2009-01-21 Dodji Seketeli <dodji@redhat.com>
323 * decl2.c (grokfield): when a typedef appears in a
324 class, create the typedef variant type node for it.
325 (save_template_attributes): Creating typedef variant type node
327 * decl.c (grokdeclarator): If the typedef'ed struct/class was
328 anonymous, set the proper type name to all its type variants.
329 * name-lookup.c (pushdecl_maybe_friend): Reuse the
330 set_underlying_type function to install typedef variant types.
331 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
333 (append_type_to_template_for_access_check): New entry points.
334 * semantics.c (check_accessibility_of_qualified_id):
335 When a typedef that is a member of a class appears in a template,
336 add it to the template. It will be ...
337 * pt.c (instantiate_class_template, instantiate_template ): ... access
338 checked at template instantiation time.
339 (tsubst): Handle the case of being called with NULL args.
340 (resolve_type_name_type): The type name should be the name of the
342 (append_type_to_template_for_access_check): New entry point.
344 2009-01-19 Jason Merrill <jason@redhat.com>
347 * parser.c (cp_parser_unqualified_id): In a template,
349 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
351 2009-01-16 Jason Merrill <jason@redhat.com>
354 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
355 * init.c (build_new): Don't call describable_type unless we
359 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
362 * search.c (protected_accessible_p): N doesn't vary.
364 2009-01-15 Jason Merrill <jason@redhat.com>
367 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
368 accept hidden friends.
370 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
373 * decl.c (grokdeclarator): Check for a non namespace/class context.
375 2009-01-15 Jason Merrill <jason@redhat.com>
379 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
380 a function isn't necessarily an lvalue. Take tree, not const_tree.
381 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
382 * typeck.c (lvalue_or_else): Likewise.
383 * cp-tree.h: Adjust prototypes.
385 2009-01-15 Steve Ellcey <sje@cup.hp.com>
388 * pt.c (tsubst): Check for NULL args.
390 2009-01-15 Dodji Seketeli <dodji@redhat.com>
393 * name-lookup.c (pushtag): Don't create members to types that are not
396 2009-01-14 Nick Clifton <nickc@redhat.com>
399 * parser.c: Pass cp_id_kind computed in
400 cp_parser_postfix_dot_deref_expression to
401 cp_parser_primary_expression.
403 2009-01-13 Jakub Jelinek <jakub@redhat.com>
406 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
407 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
410 2009-01-12 Jason Merrill <jason@redhat.com>
411 Steve Ellcey <sje@cup.hp.com>
414 * name-lookup.c (lookup_name_real): Keep looking past a hidden
417 2009-01-12 Dodji Seketeli <dodji@redhat.com>
420 * pt.c (parameter_of_template_p): New function.
421 * cp-tree.h: Declare it.
422 * name-lookup.c (binding_to_template_parms_of_scope_p): New
424 (outer_binding): Take template parameters in account when looking for
427 2009-01-12 Jason Merrill <jason@redhat.com>
430 * tree.c (pod_type_p): Return 1 for structs created by the back end.
432 2009-01-12 Jakub Jelinek <jakub@redhat.com>
435 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
436 offsetof member-designator, handle it as `[0].'.
439 * decl.c (start_function): If grokdeclarator hasn't returned
440 FUNCTION_DECL nor error_mark_node, issue diagnostics.
442 2009-01-11 Jakub Jelinek <jakub@redhat.com>
445 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
446 (gimplify_if_stmt): ... this.
447 (cp_gimplify_expr): Don't handle IF_STMT here.
448 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
450 2009-01-10 Andrew Pinski <pinskia@gmail.com>
453 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
456 * typeck2.c (build_functional_cast): Check for reference type and NULL
459 2009-01-09 Steve Ellcey <sje@cup.hp.com>
461 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
463 2009-01-09 Jakub Jelinek <jakub@redhat.com>
466 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
468 2009-01-09 John F. Carr <jfc@mit.edu>
471 * parser.c (cp_parser_class_specifier): Clear
472 parser->in_unbraced_linkage_specification_p while parsing class
475 2009-01-07 Jakub Jelinek <jakub@redhat.com>
478 * semantics.c (finish_goto_stmt): Convert destination to
481 2009-01-06 Jason Merrill <jason@redhat.com>
488 * pt.c (check_default_tmpl_args): Don't complain about
489 out-of-order parameter packs in the enclosing class
490 or parameter packs after default args.
491 (coerce_template_parms): If we have more than one
492 parameter pack, don't flatten argument packs.
493 (template_args_equal): Handle argument packs.
494 (comp_template_args): Don't flatten argument packs.
495 (check_instantiated_arg): Split out from...
496 (check_instantiated_args): Here. Handle arg packs.
497 (convert_template_argument): Just check that nontype argument
498 packs have the right type.
500 2009-01-05 Dodji Seketeli <dodji@redhat.com>
503 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
505 2009-01-05 Jason Merrill <jason@redhat.com>
508 * typeck2.c (process_init_constructor_union): Handle union with
511 * mangle.c (write_expression): Remove mangling for zero-operand
515 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
519 * class.c (defaultable_fn_p): Only operator== can be a copy
522 2009-01-02 Jason Merrill <jason@redhat.com>
525 * typeck2.c (process_init_constructor_union): Handle excess
527 (process_init_constructor_record): Likewise.
530 * typeck2.c (digest_init_r): Don't use process_init_constructor
531 for non-aggregate classes.