1 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
3 * decl.c (record_builtin_java_type): Use canonicalized integer
6 2009-03-04 Jason Merrill <jason@redhat.com>
9 * class.c (is_really_empty_class): New fn.
10 * cp-tree.h: Declare it.
11 * cp-objcp-common.c (cp_expr_size): Use it.
14 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
15 * parser.c (cp_parser_postfix_expression): Call it for
17 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
18 (get_first_fn): Likewise.
24 * decl.c (make_typename_type): Do look inside currently open classes.
25 * parser.c (cp_parser_lookup_name): Likewise.
26 (cp_parser_template_name): Likewise.
27 * pt.c (dependent_scope_p): New function.
28 * cp-tree.h: Declare it.
29 * class.c (currently_open_class): Return fast if T isn't a class.
31 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
34 * parser.c (cp_parser_mem_initializer): Return error_mark_node
35 if cp_parser_mem_initializer_id returns error_mark_node.
37 2009-02-24 Richard Guenther <rguenther@suse.de>
40 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
43 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
46 * pt.c (coerce_template_template_parms): Return 0 if parameter
49 2009-02-23 Jason Merrill <jason@redhat.com>
51 * pt.c (unify): Call maybe_adjust_types_for_deduction when
52 deducing from an initializer list.
54 2009-02-20 Jason Merrill <jason@redhat.com>
57 * decl.c (grokdeclarator): Handle ~identifier.
59 2009-02-19 Jakub Jelinek <jakub@redhat.com>
62 * decl2.c (determine_visibility): If visibility changed and
63 DECL_RTL has been already set, call make_decl_rtl to update symbol
66 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
69 * cp-tree.h (maybe_commonize_var): New.
71 * decl.c (maybe_commonize_var): Make it extern.
73 * decl2.c (finish_anon_union): Call maybe_commonize_var.
75 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
78 * parser.c (cp_parser_enum_specifier): Apply all attributes.
80 2009-02-18 Jason Merrill <jason@redhat.com>
82 * cfns.h: Tweak pathname for cfns.gperf.
84 2009-02-13 Jason Merrill <jason@redhat.com>
87 * semantics.c (finish_call_expr): Change koenig_p parm to int.
88 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
89 * cp-tree.h: Adjust prototype.
90 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
92 2009-02-12 Jason Merrill <jason@redhat.com>
95 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
97 2009-02-11 Jason Merrill <jason@redhat.com>
100 * decl2.c (cp_write_global_declarations):
101 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
104 * init.c (build_value_init_noctor): Split out from...
105 (build_value_init): ...here.
106 (expand_aggr_init_1): Handle value-initialization.
107 * cp-tree.h: Add declaration.
108 * class.c (type_has_user_provided_constructor):
109 Handle non-class arguments.
111 2009-02-10 Jason Merrill <jason@redhat.com>
114 * class.c (defaultable_fn_p): Handle ... properly.
117 * tree.c (lvalue_p_1): Condition rvalue ref handling on
118 treat_class_rvalues_as_lvalues, too.
120 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
123 * typeck.c (build_x_array_ref): New.
124 * cp-tree.h: Declare it.
125 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
127 2009-02-09 Jason Merrill <jason@redhat.com>
130 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
131 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
132 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
133 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
134 for build_value_init TARGET_EXPR.
135 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
137 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
141 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
143 2009-02-04 Jakub Jelinek <jakub@redhat.com>
146 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
147 remove ./dt operator.
148 * mangle.c (write_expression): Handle COMPONENT_REF after handling
149 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
150 write_string ("dt") instead of using operators.def.
152 2009-02-03 Jason Merrill <jason@redhat.com>
154 * typeck.c (cp_build_unary_op): Only complain about taking address
157 2009-02-03 Jakub Jelinek <jakub@redhat.com>
160 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
163 * typeck2.c (digest_init_r): Don't call process_init_constructor
166 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
169 * pt.c (convert_nontype_argument_function): Expect expr to be an
173 * typeck.c (merge_types): Call resolve_typename_type if only
174 one type is a typename.
176 2009-02-02 Jason Merrill <jason@redhat.com>
179 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
182 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
185 * parser.c (cp_parser_pure_specifier): If there are no tokens left
186 do not call cp_lexer_consume_token.
188 2009-01-30 Jakub Jelinek <jakub@redhat.com>
191 * parser.c (cp_parser_already_scoped_statement): Handle __label__
194 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
197 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
199 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
202 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
204 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
206 * typeck.c (invalid_nonstatic_memfn_p): Use
207 DECL_NONSTATIC_MEMBER_FUNCTION_P.
209 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
212 * call.c (build_over_call): If convert_for_arg_passing returns
213 error_mark_node unconditionally return it.
215 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
217 * class.c (check_field_decls): Also inherit packed for bitfields
218 regardless of their type.
220 2009-01-22 Dodji Seketeli <dodji@redhat.com>
223 * decl2.c (grokfield): Reverting changes of PR c++/26693
224 (save_template_attributes): Likewise.
225 * decl.c (grokdeclarator): Likewise.
226 * name-lookup.c (pushdecl_maybe_friend): Likewise.
227 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
228 (append_type_to_template_for_access_check): Likewise.
229 * semantics.c (check_accessibility_of_qualified_id): Likewise.
230 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
232 (resolve_type_name_type): Likewise.
233 (append_type_to_template_for_access_check): Likewise.
235 2009-01-21 Dodji Seketeli <dodji@redhat.com>
238 * decl2.c (grokfield): when a typedef appears in a
239 class, create the typedef variant type node for it.
240 (save_template_attributes): Creating typedef variant type node
242 * decl.c (grokdeclarator): If the typedef'ed struct/class was
243 anonymous, set the proper type name to all its type variants.
244 * name-lookup.c (pushdecl_maybe_friend): Reuse the
245 set_underlying_type function to install typedef variant types.
246 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
248 (append_type_to_template_for_access_check): New entry points.
249 * semantics.c (check_accessibility_of_qualified_id):
250 When a typedef that is a member of a class appears in a template,
251 add it to the template. It will be ...
252 * pt.c (instantiate_class_template, instantiate_template ): ... access
253 checked at template instantiation time.
254 (tsubst): Handle the case of being called with NULL args.
255 (resolve_type_name_type): The type name should be the name of the
257 (append_type_to_template_for_access_check): New entry point.
259 2009-01-19 Jason Merrill <jason@redhat.com>
262 * parser.c (cp_parser_unqualified_id): In a template,
264 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
266 2009-01-16 Jason Merrill <jason@redhat.com>
269 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
270 * init.c (build_new): Don't call describable_type unless we
274 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
277 * search.c (protected_accessible_p): N doesn't vary.
279 2009-01-15 Jason Merrill <jason@redhat.com>
282 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
283 accept hidden friends.
285 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
288 * decl.c (grokdeclarator): Check for a non namespace/class context.
290 2009-01-15 Jason Merrill <jason@redhat.com>
294 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
295 a function isn't necessarily an lvalue. Take tree, not const_tree.
296 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
297 * typeck.c (lvalue_or_else): Likewise.
298 * cp-tree.h: Adjust prototypes.
300 2009-01-15 Steve Ellcey <sje@cup.hp.com>
303 * pt.c (tsubst): Check for NULL args.
305 2009-01-15 Dodji Seketeli <dodji@redhat.com>
308 * name-lookup.c (pushtag): Don't create members to types that are not
311 2009-01-14 Nick Clifton <nickc@redhat.com>
314 * parser.c: Pass cp_id_kind computed in
315 cp_parser_postfix_dot_deref_expression to
316 cp_parser_primary_expression.
318 2009-01-13 Jakub Jelinek <jakub@redhat.com>
321 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
322 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
325 2009-01-12 Jason Merrill <jason@redhat.com>
326 Steve Ellcey <sje@cup.hp.com>
329 * name-lookup.c (lookup_name_real): Keep looking past a hidden
332 2009-01-12 Dodji Seketeli <dodji@redhat.com>
335 * pt.c (parameter_of_template_p): New function.
336 * cp-tree.h: Declare it.
337 * name-lookup.c (binding_to_template_parms_of_scope_p): New
339 (outer_binding): Take template parameters in account when looking for
342 2009-01-12 Jason Merrill <jason@redhat.com>
345 * tree.c (pod_type_p): Return 1 for structs created by the back end.
347 2009-01-12 Jakub Jelinek <jakub@redhat.com>
350 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
351 offsetof member-designator, handle it as `[0].'.
354 * decl.c (start_function): If grokdeclarator hasn't returned
355 FUNCTION_DECL nor error_mark_node, issue diagnostics.
357 2009-01-11 Jakub Jelinek <jakub@redhat.com>
360 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
361 (gimplify_if_stmt): ... this.
362 (cp_gimplify_expr): Don't handle IF_STMT here.
363 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
365 2009-01-10 Andrew Pinski <pinskia@gmail.com>
368 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
371 * typeck2.c (build_functional_cast): Check for reference type and NULL
374 2009-01-09 Steve Ellcey <sje@cup.hp.com>
376 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
378 2009-01-09 Jakub Jelinek <jakub@redhat.com>
381 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
383 2009-01-09 John F. Carr <jfc@mit.edu>
386 * parser.c (cp_parser_class_specifier): Clear
387 parser->in_unbraced_linkage_specification_p while parsing class
390 2009-01-07 Jakub Jelinek <jakub@redhat.com>
393 * semantics.c (finish_goto_stmt): Convert destination to
396 2009-01-06 Jason Merrill <jason@redhat.com>
403 * pt.c (check_default_tmpl_args): Don't complain about
404 out-of-order parameter packs in the enclosing class
405 or parameter packs after default args.
406 (coerce_template_parms): If we have more than one
407 parameter pack, don't flatten argument packs.
408 (template_args_equal): Handle argument packs.
409 (comp_template_args): Don't flatten argument packs.
410 (check_instantiated_arg): Split out from...
411 (check_instantiated_args): Here. Handle arg packs.
412 (convert_template_argument): Just check that nontype argument
413 packs have the right type.
415 2009-01-05 Dodji Seketeli <dodji@redhat.com>
418 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
420 2009-01-05 Jason Merrill <jason@redhat.com>
423 * typeck2.c (process_init_constructor_union): Handle union with
426 * mangle.c (write_expression): Remove mangling for zero-operand
430 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
434 * class.c (defaultable_fn_p): Only operator== can be a copy
437 2009-01-02 Jason Merrill <jason@redhat.com>
440 * typeck2.c (process_init_constructor_union): Handle excess
442 (process_init_constructor_record): Likewise.
445 * typeck2.c (digest_init_r): Don't use process_init_constructor
446 for non-aggregate classes.