1 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
4 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
6 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
8 * decl.c (record_builtin_java_type): Use canonicalized integer
11 2009-03-04 Jason Merrill <jason@redhat.com>
14 * class.c (is_really_empty_class): New fn.
15 * cp-tree.h: Declare it.
16 * cp-objcp-common.c (cp_expr_size): Use it.
19 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
20 * parser.c (cp_parser_postfix_expression): Call it for
22 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
23 (get_first_fn): Likewise.
29 * decl.c (make_typename_type): Do look inside currently open classes.
30 * parser.c (cp_parser_lookup_name): Likewise.
31 (cp_parser_template_name): Likewise.
32 * pt.c (dependent_scope_p): New function.
33 * cp-tree.h: Declare it.
34 * class.c (currently_open_class): Return fast if T isn't a class.
36 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
39 * parser.c (cp_parser_mem_initializer): Return error_mark_node
40 if cp_parser_mem_initializer_id returns error_mark_node.
42 2009-02-24 Richard Guenther <rguenther@suse.de>
45 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
48 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
51 * pt.c (coerce_template_template_parms): Return 0 if parameter
54 2009-02-23 Jason Merrill <jason@redhat.com>
56 * pt.c (unify): Call maybe_adjust_types_for_deduction when
57 deducing from an initializer list.
59 2009-02-20 Jason Merrill <jason@redhat.com>
62 * decl.c (grokdeclarator): Handle ~identifier.
64 2009-02-19 Jakub Jelinek <jakub@redhat.com>
67 * decl2.c (determine_visibility): If visibility changed and
68 DECL_RTL has been already set, call make_decl_rtl to update symbol
71 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
74 * cp-tree.h (maybe_commonize_var): New.
76 * decl.c (maybe_commonize_var): Make it extern.
78 * decl2.c (finish_anon_union): Call maybe_commonize_var.
80 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
83 * parser.c (cp_parser_enum_specifier): Apply all attributes.
85 2009-02-18 Jason Merrill <jason@redhat.com>
87 * cfns.h: Tweak pathname for cfns.gperf.
89 2009-02-13 Jason Merrill <jason@redhat.com>
92 * semantics.c (finish_call_expr): Change koenig_p parm to int.
93 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
94 * cp-tree.h: Adjust prototype.
95 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
97 2009-02-12 Jason Merrill <jason@redhat.com>
100 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
102 2009-02-11 Jason Merrill <jason@redhat.com>
105 * decl2.c (cp_write_global_declarations):
106 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
109 * init.c (build_value_init_noctor): Split out from...
110 (build_value_init): ...here.
111 (expand_aggr_init_1): Handle value-initialization.
112 * cp-tree.h: Add declaration.
113 * class.c (type_has_user_provided_constructor):
114 Handle non-class arguments.
116 2009-02-10 Jason Merrill <jason@redhat.com>
119 * class.c (defaultable_fn_p): Handle ... properly.
122 * tree.c (lvalue_p_1): Condition rvalue ref handling on
123 treat_class_rvalues_as_lvalues, too.
125 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
128 * typeck.c (build_x_array_ref): New.
129 * cp-tree.h: Declare it.
130 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
132 2009-02-09 Jason Merrill <jason@redhat.com>
135 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
136 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
137 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
138 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
139 for build_value_init TARGET_EXPR.
140 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
142 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
146 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
148 2009-02-04 Jakub Jelinek <jakub@redhat.com>
151 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
152 remove ./dt operator.
153 * mangle.c (write_expression): Handle COMPONENT_REF after handling
154 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
155 write_string ("dt") instead of using operators.def.
157 2009-02-03 Jason Merrill <jason@redhat.com>
159 * typeck.c (cp_build_unary_op): Only complain about taking address
162 2009-02-03 Jakub Jelinek <jakub@redhat.com>
165 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
168 * typeck2.c (digest_init_r): Don't call process_init_constructor
171 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
174 * pt.c (convert_nontype_argument_function): Expect expr to be an
178 * typeck.c (merge_types): Call resolve_typename_type if only
179 one type is a typename.
181 2009-02-02 Jason Merrill <jason@redhat.com>
184 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
187 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
190 * parser.c (cp_parser_pure_specifier): If there are no tokens left
191 do not call cp_lexer_consume_token.
193 2009-01-30 Jakub Jelinek <jakub@redhat.com>
196 * parser.c (cp_parser_already_scoped_statement): Handle __label__
199 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
202 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
204 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
207 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
209 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
211 * typeck.c (invalid_nonstatic_memfn_p): Use
212 DECL_NONSTATIC_MEMBER_FUNCTION_P.
214 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
217 * call.c (build_over_call): If convert_for_arg_passing returns
218 error_mark_node unconditionally return it.
220 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
222 * class.c (check_field_decls): Also inherit packed for bitfields
223 regardless of their type.
225 2009-01-22 Dodji Seketeli <dodji@redhat.com>
228 * decl2.c (grokfield): Reverting changes of PR c++/26693
229 (save_template_attributes): Likewise.
230 * decl.c (grokdeclarator): Likewise.
231 * name-lookup.c (pushdecl_maybe_friend): Likewise.
232 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
233 (append_type_to_template_for_access_check): Likewise.
234 * semantics.c (check_accessibility_of_qualified_id): Likewise.
235 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
237 (resolve_type_name_type): Likewise.
238 (append_type_to_template_for_access_check): Likewise.
240 2009-01-21 Dodji Seketeli <dodji@redhat.com>
243 * decl2.c (grokfield): when a typedef appears in a
244 class, create the typedef variant type node for it.
245 (save_template_attributes): Creating typedef variant type node
247 * decl.c (grokdeclarator): If the typedef'ed struct/class was
248 anonymous, set the proper type name to all its type variants.
249 * name-lookup.c (pushdecl_maybe_friend): Reuse the
250 set_underlying_type function to install typedef variant types.
251 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
253 (append_type_to_template_for_access_check): New entry points.
254 * semantics.c (check_accessibility_of_qualified_id):
255 When a typedef that is a member of a class appears in a template,
256 add it to the template. It will be ...
257 * pt.c (instantiate_class_template, instantiate_template ): ... access
258 checked at template instantiation time.
259 (tsubst): Handle the case of being called with NULL args.
260 (resolve_type_name_type): The type name should be the name of the
262 (append_type_to_template_for_access_check): New entry point.
264 2009-01-19 Jason Merrill <jason@redhat.com>
267 * parser.c (cp_parser_unqualified_id): In a template,
269 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
271 2009-01-16 Jason Merrill <jason@redhat.com>
274 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
275 * init.c (build_new): Don't call describable_type unless we
279 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
282 * search.c (protected_accessible_p): N doesn't vary.
284 2009-01-15 Jason Merrill <jason@redhat.com>
287 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
288 accept hidden friends.
290 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
293 * decl.c (grokdeclarator): Check for a non namespace/class context.
295 2009-01-15 Jason Merrill <jason@redhat.com>
299 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
300 a function isn't necessarily an lvalue. Take tree, not const_tree.
301 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
302 * typeck.c (lvalue_or_else): Likewise.
303 * cp-tree.h: Adjust prototypes.
305 2009-01-15 Steve Ellcey <sje@cup.hp.com>
308 * pt.c (tsubst): Check for NULL args.
310 2009-01-15 Dodji Seketeli <dodji@redhat.com>
313 * name-lookup.c (pushtag): Don't create members to types that are not
316 2009-01-14 Nick Clifton <nickc@redhat.com>
319 * parser.c: Pass cp_id_kind computed in
320 cp_parser_postfix_dot_deref_expression to
321 cp_parser_primary_expression.
323 2009-01-13 Jakub Jelinek <jakub@redhat.com>
326 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
327 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
330 2009-01-12 Jason Merrill <jason@redhat.com>
331 Steve Ellcey <sje@cup.hp.com>
334 * name-lookup.c (lookup_name_real): Keep looking past a hidden
337 2009-01-12 Dodji Seketeli <dodji@redhat.com>
340 * pt.c (parameter_of_template_p): New function.
341 * cp-tree.h: Declare it.
342 * name-lookup.c (binding_to_template_parms_of_scope_p): New
344 (outer_binding): Take template parameters in account when looking for
347 2009-01-12 Jason Merrill <jason@redhat.com>
350 * tree.c (pod_type_p): Return 1 for structs created by the back end.
352 2009-01-12 Jakub Jelinek <jakub@redhat.com>
355 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
356 offsetof member-designator, handle it as `[0].'.
359 * decl.c (start_function): If grokdeclarator hasn't returned
360 FUNCTION_DECL nor error_mark_node, issue diagnostics.
362 2009-01-11 Jakub Jelinek <jakub@redhat.com>
365 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
366 (gimplify_if_stmt): ... this.
367 (cp_gimplify_expr): Don't handle IF_STMT here.
368 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
370 2009-01-10 Andrew Pinski <pinskia@gmail.com>
373 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
376 * typeck2.c (build_functional_cast): Check for reference type and NULL
379 2009-01-09 Steve Ellcey <sje@cup.hp.com>
381 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
383 2009-01-09 Jakub Jelinek <jakub@redhat.com>
386 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
388 2009-01-09 John F. Carr <jfc@mit.edu>
391 * parser.c (cp_parser_class_specifier): Clear
392 parser->in_unbraced_linkage_specification_p while parsing class
395 2009-01-07 Jakub Jelinek <jakub@redhat.com>
398 * semantics.c (finish_goto_stmt): Convert destination to
401 2009-01-06 Jason Merrill <jason@redhat.com>
408 * pt.c (check_default_tmpl_args): Don't complain about
409 out-of-order parameter packs in the enclosing class
410 or parameter packs after default args.
411 (coerce_template_parms): If we have more than one
412 parameter pack, don't flatten argument packs.
413 (template_args_equal): Handle argument packs.
414 (comp_template_args): Don't flatten argument packs.
415 (check_instantiated_arg): Split out from...
416 (check_instantiated_args): Here. Handle arg packs.
417 (convert_template_argument): Just check that nontype argument
418 packs have the right type.
420 2009-01-05 Dodji Seketeli <dodji@redhat.com>
423 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
425 2009-01-05 Jason Merrill <jason@redhat.com>
428 * typeck2.c (process_init_constructor_union): Handle union with
431 * mangle.c (write_expression): Remove mangling for zero-operand
435 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
439 * class.c (defaultable_fn_p): Only operator== can be a copy
442 2009-01-02 Jason Merrill <jason@redhat.com>
445 * typeck2.c (process_init_constructor_union): Handle excess
447 (process_init_constructor_record): Likewise.
450 * typeck2.c (digest_init_r): Don't use process_init_constructor
451 for non-aggregate classes.