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 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
13 2009-03-09 Jakub Jelinek <jakub@redhat.com>
16 * semantics.c (finish_switch_cond): Don't call get_unwidened.
17 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
18 instead of TREE_TYPE (cond).
20 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
23 * parser.c (cp_parser_late_parsing_default_args): Continue
24 the loop when cp_parser_assignment_expression returns
27 2009-03-07 Jason Merrill <jason@redhat.com>
30 * init.c (build_new_1): Don't use a VLA type.
31 (build_vec_init): Handle getting a pointer for BASE.
33 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
36 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
37 when mangling symbols.
39 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
42 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
44 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
46 * decl.c (record_builtin_java_type): Use canonicalized integer
49 2009-03-04 Jason Merrill <jason@redhat.com>
52 * class.c (is_really_empty_class): New fn.
53 * cp-tree.h: Declare it.
54 * cp-objcp-common.c (cp_expr_size): Use it.
57 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
58 * parser.c (cp_parser_postfix_expression): Call it for
60 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
61 (get_first_fn): Likewise.
67 * decl.c (make_typename_type): Do look inside currently open classes.
68 * parser.c (cp_parser_lookup_name): Likewise.
69 (cp_parser_template_name): Likewise.
70 * pt.c (dependent_scope_p): New function.
71 * cp-tree.h: Declare it.
72 * class.c (currently_open_class): Return fast if T isn't a class.
74 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
77 * parser.c (cp_parser_mem_initializer): Return error_mark_node
78 if cp_parser_mem_initializer_id returns error_mark_node.
80 2009-02-24 Richard Guenther <rguenther@suse.de>
83 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
86 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
89 * pt.c (coerce_template_template_parms): Return 0 if parameter
92 2009-02-23 Jason Merrill <jason@redhat.com>
94 * pt.c (unify): Call maybe_adjust_types_for_deduction when
95 deducing from an initializer list.
97 2009-02-20 Jason Merrill <jason@redhat.com>
100 * decl.c (grokdeclarator): Handle ~identifier.
102 2009-02-19 Jakub Jelinek <jakub@redhat.com>
105 * decl2.c (determine_visibility): If visibility changed and
106 DECL_RTL has been already set, call make_decl_rtl to update symbol
109 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
112 * cp-tree.h (maybe_commonize_var): New.
114 * decl.c (maybe_commonize_var): Make it extern.
116 * decl2.c (finish_anon_union): Call maybe_commonize_var.
118 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
121 * parser.c (cp_parser_enum_specifier): Apply all attributes.
123 2009-02-18 Jason Merrill <jason@redhat.com>
125 * cfns.h: Tweak pathname for cfns.gperf.
127 2009-02-13 Jason Merrill <jason@redhat.com>
130 * semantics.c (finish_call_expr): Change koenig_p parm to int.
131 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
132 * cp-tree.h: Adjust prototype.
133 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
135 2009-02-12 Jason Merrill <jason@redhat.com>
138 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
140 2009-02-11 Jason Merrill <jason@redhat.com>
143 * decl2.c (cp_write_global_declarations):
144 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
147 * init.c (build_value_init_noctor): Split out from...
148 (build_value_init): ...here.
149 (expand_aggr_init_1): Handle value-initialization.
150 * cp-tree.h: Add declaration.
151 * class.c (type_has_user_provided_constructor):
152 Handle non-class arguments.
154 2009-02-10 Jason Merrill <jason@redhat.com>
157 * class.c (defaultable_fn_p): Handle ... properly.
160 * tree.c (lvalue_p_1): Condition rvalue ref handling on
161 treat_class_rvalues_as_lvalues, too.
163 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
166 * typeck.c (build_x_array_ref): New.
167 * cp-tree.h: Declare it.
168 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
170 2009-02-09 Jason Merrill <jason@redhat.com>
173 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
174 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
175 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
176 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
177 for build_value_init TARGET_EXPR.
178 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
180 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
184 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
186 2009-02-04 Jakub Jelinek <jakub@redhat.com>
189 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
190 remove ./dt operator.
191 * mangle.c (write_expression): Handle COMPONENT_REF after handling
192 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
193 write_string ("dt") instead of using operators.def.
195 2009-02-03 Jason Merrill <jason@redhat.com>
197 * typeck.c (cp_build_unary_op): Only complain about taking address
200 2009-02-03 Jakub Jelinek <jakub@redhat.com>
203 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
206 * typeck2.c (digest_init_r): Don't call process_init_constructor
209 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
212 * pt.c (convert_nontype_argument_function): Expect expr to be an
216 * typeck.c (merge_types): Call resolve_typename_type if only
217 one type is a typename.
219 2009-02-02 Jason Merrill <jason@redhat.com>
222 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
225 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
228 * parser.c (cp_parser_pure_specifier): If there are no tokens left
229 do not call cp_lexer_consume_token.
231 2009-01-30 Jakub Jelinek <jakub@redhat.com>
234 * parser.c (cp_parser_already_scoped_statement): Handle __label__
237 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
240 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
242 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
245 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
247 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
249 * typeck.c (invalid_nonstatic_memfn_p): Use
250 DECL_NONSTATIC_MEMBER_FUNCTION_P.
252 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
255 * call.c (build_over_call): If convert_for_arg_passing returns
256 error_mark_node unconditionally return it.
258 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
260 * class.c (check_field_decls): Also inherit packed for bitfields
261 regardless of their type.
263 2009-01-22 Dodji Seketeli <dodji@redhat.com>
266 * decl2.c (grokfield): Reverting changes of PR c++/26693
267 (save_template_attributes): Likewise.
268 * decl.c (grokdeclarator): Likewise.
269 * name-lookup.c (pushdecl_maybe_friend): Likewise.
270 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
271 (append_type_to_template_for_access_check): Likewise.
272 * semantics.c (check_accessibility_of_qualified_id): Likewise.
273 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
275 (resolve_type_name_type): Likewise.
276 (append_type_to_template_for_access_check): Likewise.
278 2009-01-21 Dodji Seketeli <dodji@redhat.com>
281 * decl2.c (grokfield): when a typedef appears in a
282 class, create the typedef variant type node for it.
283 (save_template_attributes): Creating typedef variant type node
285 * decl.c (grokdeclarator): If the typedef'ed struct/class was
286 anonymous, set the proper type name to all its type variants.
287 * name-lookup.c (pushdecl_maybe_friend): Reuse the
288 set_underlying_type function to install typedef variant types.
289 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
291 (append_type_to_template_for_access_check): New entry points.
292 * semantics.c (check_accessibility_of_qualified_id):
293 When a typedef that is a member of a class appears in a template,
294 add it to the template. It will be ...
295 * pt.c (instantiate_class_template, instantiate_template ): ... access
296 checked at template instantiation time.
297 (tsubst): Handle the case of being called with NULL args.
298 (resolve_type_name_type): The type name should be the name of the
300 (append_type_to_template_for_access_check): New entry point.
302 2009-01-19 Jason Merrill <jason@redhat.com>
305 * parser.c (cp_parser_unqualified_id): In a template,
307 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
309 2009-01-16 Jason Merrill <jason@redhat.com>
312 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
313 * init.c (build_new): Don't call describable_type unless we
317 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
320 * search.c (protected_accessible_p): N doesn't vary.
322 2009-01-15 Jason Merrill <jason@redhat.com>
325 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
326 accept hidden friends.
328 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
331 * decl.c (grokdeclarator): Check for a non namespace/class context.
333 2009-01-15 Jason Merrill <jason@redhat.com>
337 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
338 a function isn't necessarily an lvalue. Take tree, not const_tree.
339 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
340 * typeck.c (lvalue_or_else): Likewise.
341 * cp-tree.h: Adjust prototypes.
343 2009-01-15 Steve Ellcey <sje@cup.hp.com>
346 * pt.c (tsubst): Check for NULL args.
348 2009-01-15 Dodji Seketeli <dodji@redhat.com>
351 * name-lookup.c (pushtag): Don't create members to types that are not
354 2009-01-14 Nick Clifton <nickc@redhat.com>
357 * parser.c: Pass cp_id_kind computed in
358 cp_parser_postfix_dot_deref_expression to
359 cp_parser_primary_expression.
361 2009-01-13 Jakub Jelinek <jakub@redhat.com>
364 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
365 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
368 2009-01-12 Jason Merrill <jason@redhat.com>
369 Steve Ellcey <sje@cup.hp.com>
372 * name-lookup.c (lookup_name_real): Keep looking past a hidden
375 2009-01-12 Dodji Seketeli <dodji@redhat.com>
378 * pt.c (parameter_of_template_p): New function.
379 * cp-tree.h: Declare it.
380 * name-lookup.c (binding_to_template_parms_of_scope_p): New
382 (outer_binding): Take template parameters in account when looking for
385 2009-01-12 Jason Merrill <jason@redhat.com>
388 * tree.c (pod_type_p): Return 1 for structs created by the back end.
390 2009-01-12 Jakub Jelinek <jakub@redhat.com>
393 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
394 offsetof member-designator, handle it as `[0].'.
397 * decl.c (start_function): If grokdeclarator hasn't returned
398 FUNCTION_DECL nor error_mark_node, issue diagnostics.
400 2009-01-11 Jakub Jelinek <jakub@redhat.com>
403 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
404 (gimplify_if_stmt): ... this.
405 (cp_gimplify_expr): Don't handle IF_STMT here.
406 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
408 2009-01-10 Andrew Pinski <pinskia@gmail.com>
411 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
414 * typeck2.c (build_functional_cast): Check for reference type and NULL
417 2009-01-09 Steve Ellcey <sje@cup.hp.com>
419 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
421 2009-01-09 Jakub Jelinek <jakub@redhat.com>
424 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
426 2009-01-09 John F. Carr <jfc@mit.edu>
429 * parser.c (cp_parser_class_specifier): Clear
430 parser->in_unbraced_linkage_specification_p while parsing class
433 2009-01-07 Jakub Jelinek <jakub@redhat.com>
436 * semantics.c (finish_goto_stmt): Convert destination to
439 2009-01-06 Jason Merrill <jason@redhat.com>
446 * pt.c (check_default_tmpl_args): Don't complain about
447 out-of-order parameter packs in the enclosing class
448 or parameter packs after default args.
449 (coerce_template_parms): If we have more than one
450 parameter pack, don't flatten argument packs.
451 (template_args_equal): Handle argument packs.
452 (comp_template_args): Don't flatten argument packs.
453 (check_instantiated_arg): Split out from...
454 (check_instantiated_args): Here. Handle arg packs.
455 (convert_template_argument): Just check that nontype argument
456 packs have the right type.
458 2009-01-05 Dodji Seketeli <dodji@redhat.com>
461 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
463 2009-01-05 Jason Merrill <jason@redhat.com>
466 * typeck2.c (process_init_constructor_union): Handle union with
469 * mangle.c (write_expression): Remove mangling for zero-operand
473 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
477 * class.c (defaultable_fn_p): Only operator== can be a copy
480 2009-01-02 Jason Merrill <jason@redhat.com>
483 * typeck2.c (process_init_constructor_union): Handle excess
485 (process_init_constructor_record): Likewise.
488 * typeck2.c (digest_init_r): Don't use process_init_constructor
489 for non-aggregate classes.