1 2009-03-17 Jakub Jelinek <jakub@redhat.com>
4 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
7 2009-03-09 Jakub Jelinek <jakub@redhat.com>
10 * semantics.c (finish_switch_cond): Don't call get_unwidened.
11 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
12 instead of TREE_TYPE (cond).
14 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
17 * parser.c (cp_parser_late_parsing_default_args): Continue
18 the loop when cp_parser_assignment_expression returns
21 2009-03-07 Jason Merrill <jason@redhat.com>
24 * init.c (build_new_1): Don't use a VLA type.
25 (build_vec_init): Handle getting a pointer for BASE.
27 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
30 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
31 when mangling symbols.
33 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
36 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
38 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
40 * decl.c (record_builtin_java_type): Use canonicalized integer
43 2009-03-04 Jason Merrill <jason@redhat.com>
46 * class.c (is_really_empty_class): New fn.
47 * cp-tree.h: Declare it.
48 * cp-objcp-common.c (cp_expr_size): Use it.
51 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
52 * parser.c (cp_parser_postfix_expression): Call it for
54 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
55 (get_first_fn): Likewise.
61 * decl.c (make_typename_type): Do look inside currently open classes.
62 * parser.c (cp_parser_lookup_name): Likewise.
63 (cp_parser_template_name): Likewise.
64 * pt.c (dependent_scope_p): New function.
65 * cp-tree.h: Declare it.
66 * class.c (currently_open_class): Return fast if T isn't a class.
68 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
71 * parser.c (cp_parser_mem_initializer): Return error_mark_node
72 if cp_parser_mem_initializer_id returns error_mark_node.
74 2009-02-24 Richard Guenther <rguenther@suse.de>
77 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
80 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
83 * pt.c (coerce_template_template_parms): Return 0 if parameter
86 2009-02-23 Jason Merrill <jason@redhat.com>
88 * pt.c (unify): Call maybe_adjust_types_for_deduction when
89 deducing from an initializer list.
91 2009-02-20 Jason Merrill <jason@redhat.com>
94 * decl.c (grokdeclarator): Handle ~identifier.
96 2009-02-19 Jakub Jelinek <jakub@redhat.com>
99 * decl2.c (determine_visibility): If visibility changed and
100 DECL_RTL has been already set, call make_decl_rtl to update symbol
103 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
106 * cp-tree.h (maybe_commonize_var): New.
108 * decl.c (maybe_commonize_var): Make it extern.
110 * decl2.c (finish_anon_union): Call maybe_commonize_var.
112 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
115 * parser.c (cp_parser_enum_specifier): Apply all attributes.
117 2009-02-18 Jason Merrill <jason@redhat.com>
119 * cfns.h: Tweak pathname for cfns.gperf.
121 2009-02-13 Jason Merrill <jason@redhat.com>
124 * semantics.c (finish_call_expr): Change koenig_p parm to int.
125 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
126 * cp-tree.h: Adjust prototype.
127 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
129 2009-02-12 Jason Merrill <jason@redhat.com>
132 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
134 2009-02-11 Jason Merrill <jason@redhat.com>
137 * decl2.c (cp_write_global_declarations):
138 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
141 * init.c (build_value_init_noctor): Split out from...
142 (build_value_init): ...here.
143 (expand_aggr_init_1): Handle value-initialization.
144 * cp-tree.h: Add declaration.
145 * class.c (type_has_user_provided_constructor):
146 Handle non-class arguments.
148 2009-02-10 Jason Merrill <jason@redhat.com>
151 * class.c (defaultable_fn_p): Handle ... properly.
154 * tree.c (lvalue_p_1): Condition rvalue ref handling on
155 treat_class_rvalues_as_lvalues, too.
157 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
160 * typeck.c (build_x_array_ref): New.
161 * cp-tree.h: Declare it.
162 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
164 2009-02-09 Jason Merrill <jason@redhat.com>
167 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
168 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
169 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
170 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
171 for build_value_init TARGET_EXPR.
172 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
174 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
178 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
180 2009-02-04 Jakub Jelinek <jakub@redhat.com>
183 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
184 remove ./dt operator.
185 * mangle.c (write_expression): Handle COMPONENT_REF after handling
186 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
187 write_string ("dt") instead of using operators.def.
189 2009-02-03 Jason Merrill <jason@redhat.com>
191 * typeck.c (cp_build_unary_op): Only complain about taking address
194 2009-02-03 Jakub Jelinek <jakub@redhat.com>
197 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
200 * typeck2.c (digest_init_r): Don't call process_init_constructor
203 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
206 * pt.c (convert_nontype_argument_function): Expect expr to be an
210 * typeck.c (merge_types): Call resolve_typename_type if only
211 one type is a typename.
213 2009-02-02 Jason Merrill <jason@redhat.com>
216 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
219 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
222 * parser.c (cp_parser_pure_specifier): If there are no tokens left
223 do not call cp_lexer_consume_token.
225 2009-01-30 Jakub Jelinek <jakub@redhat.com>
228 * parser.c (cp_parser_already_scoped_statement): Handle __label__
231 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
234 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
236 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
239 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
241 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
243 * typeck.c (invalid_nonstatic_memfn_p): Use
244 DECL_NONSTATIC_MEMBER_FUNCTION_P.
246 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
249 * call.c (build_over_call): If convert_for_arg_passing returns
250 error_mark_node unconditionally return it.
252 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
254 * class.c (check_field_decls): Also inherit packed for bitfields
255 regardless of their type.
257 2009-01-22 Dodji Seketeli <dodji@redhat.com>
260 * decl2.c (grokfield): Reverting changes of PR c++/26693
261 (save_template_attributes): Likewise.
262 * decl.c (grokdeclarator): Likewise.
263 * name-lookup.c (pushdecl_maybe_friend): Likewise.
264 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
265 (append_type_to_template_for_access_check): Likewise.
266 * semantics.c (check_accessibility_of_qualified_id): Likewise.
267 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
269 (resolve_type_name_type): Likewise.
270 (append_type_to_template_for_access_check): Likewise.
272 2009-01-21 Dodji Seketeli <dodji@redhat.com>
275 * decl2.c (grokfield): when a typedef appears in a
276 class, create the typedef variant type node for it.
277 (save_template_attributes): Creating typedef variant type node
279 * decl.c (grokdeclarator): If the typedef'ed struct/class was
280 anonymous, set the proper type name to all its type variants.
281 * name-lookup.c (pushdecl_maybe_friend): Reuse the
282 set_underlying_type function to install typedef variant types.
283 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
285 (append_type_to_template_for_access_check): New entry points.
286 * semantics.c (check_accessibility_of_qualified_id):
287 When a typedef that is a member of a class appears in a template,
288 add it to the template. It will be ...
289 * pt.c (instantiate_class_template, instantiate_template ): ... access
290 checked at template instantiation time.
291 (tsubst): Handle the case of being called with NULL args.
292 (resolve_type_name_type): The type name should be the name of the
294 (append_type_to_template_for_access_check): New entry point.
296 2009-01-19 Jason Merrill <jason@redhat.com>
299 * parser.c (cp_parser_unqualified_id): In a template,
301 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
303 2009-01-16 Jason Merrill <jason@redhat.com>
306 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
307 * init.c (build_new): Don't call describable_type unless we
311 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
314 * search.c (protected_accessible_p): N doesn't vary.
316 2009-01-15 Jason Merrill <jason@redhat.com>
319 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
320 accept hidden friends.
322 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
325 * decl.c (grokdeclarator): Check for a non namespace/class context.
327 2009-01-15 Jason Merrill <jason@redhat.com>
331 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
332 a function isn't necessarily an lvalue. Take tree, not const_tree.
333 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
334 * typeck.c (lvalue_or_else): Likewise.
335 * cp-tree.h: Adjust prototypes.
337 2009-01-15 Steve Ellcey <sje@cup.hp.com>
340 * pt.c (tsubst): Check for NULL args.
342 2009-01-15 Dodji Seketeli <dodji@redhat.com>
345 * name-lookup.c (pushtag): Don't create members to types that are not
348 2009-01-14 Nick Clifton <nickc@redhat.com>
351 * parser.c: Pass cp_id_kind computed in
352 cp_parser_postfix_dot_deref_expression to
353 cp_parser_primary_expression.
355 2009-01-13 Jakub Jelinek <jakub@redhat.com>
358 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
359 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
362 2009-01-12 Jason Merrill <jason@redhat.com>
363 Steve Ellcey <sje@cup.hp.com>
366 * name-lookup.c (lookup_name_real): Keep looking past a hidden
369 2009-01-12 Dodji Seketeli <dodji@redhat.com>
372 * pt.c (parameter_of_template_p): New function.
373 * cp-tree.h: Declare it.
374 * name-lookup.c (binding_to_template_parms_of_scope_p): New
376 (outer_binding): Take template parameters in account when looking for
379 2009-01-12 Jason Merrill <jason@redhat.com>
382 * tree.c (pod_type_p): Return 1 for structs created by the back end.
384 2009-01-12 Jakub Jelinek <jakub@redhat.com>
387 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
388 offsetof member-designator, handle it as `[0].'.
391 * decl.c (start_function): If grokdeclarator hasn't returned
392 FUNCTION_DECL nor error_mark_node, issue diagnostics.
394 2009-01-11 Jakub Jelinek <jakub@redhat.com>
397 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
398 (gimplify_if_stmt): ... this.
399 (cp_gimplify_expr): Don't handle IF_STMT here.
400 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
402 2009-01-10 Andrew Pinski <pinskia@gmail.com>
405 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
408 * typeck2.c (build_functional_cast): Check for reference type and NULL
411 2009-01-09 Steve Ellcey <sje@cup.hp.com>
413 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
415 2009-01-09 Jakub Jelinek <jakub@redhat.com>
418 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
420 2009-01-09 John F. Carr <jfc@mit.edu>
423 * parser.c (cp_parser_class_specifier): Clear
424 parser->in_unbraced_linkage_specification_p while parsing class
427 2009-01-07 Jakub Jelinek <jakub@redhat.com>
430 * semantics.c (finish_goto_stmt): Convert destination to
433 2009-01-06 Jason Merrill <jason@redhat.com>
440 * pt.c (check_default_tmpl_args): Don't complain about
441 out-of-order parameter packs in the enclosing class
442 or parameter packs after default args.
443 (coerce_template_parms): If we have more than one
444 parameter pack, don't flatten argument packs.
445 (template_args_equal): Handle argument packs.
446 (comp_template_args): Don't flatten argument packs.
447 (check_instantiated_arg): Split out from...
448 (check_instantiated_args): Here. Handle arg packs.
449 (convert_template_argument): Just check that nontype argument
450 packs have the right type.
452 2009-01-05 Dodji Seketeli <dodji@redhat.com>
455 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
457 2009-01-05 Jason Merrill <jason@redhat.com>
460 * typeck2.c (process_init_constructor_union): Handle union with
463 * mangle.c (write_expression): Remove mangling for zero-operand
467 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
471 * class.c (defaultable_fn_p): Only operator== can be a copy
474 2009-01-02 Jason Merrill <jason@redhat.com>
477 * typeck2.c (process_init_constructor_union): Handle excess
479 (process_init_constructor_record): Likewise.
482 * typeck2.c (digest_init_r): Don't use process_init_constructor
483 for non-aggregate classes.