1 2009-03-19 Jakub Jelinek <jakub@redhat.com>
4 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
5 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
7 2009-03-18 Jakub Jelinek <jakub@redhat.com>
9 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
12 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
15 * parser.c (cp_parser_explicit_specialization): Don't skip the
16 rest of the specialization when begin_specialization returns
19 2009-03-17 Jason Merrill <jason@redhat.com>
21 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
22 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
23 * pt.c (check_explicit_specialization): Likewise.
24 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
26 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
27 * decl2.c (parm_index): New fn.
28 * semantics.c (finish_decltype_type): Don't use describable_type.
29 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
30 Give a sorry for unsupported codes rather than crash. Mangle
31 conversions with other than 1 operand. New mangling for PARM_DECL.
32 * operators.def (ALIGNOF_EXPR): Mangle as "az".
34 2009-03-17 Jing Yu <jingyu@google.com>
37 * method.c (use_thunk): Change is_thunk from crtl to cfun.
39 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
42 * semantics.c (check_trait_type): New.
43 (finish_trait_expr): Use it.
45 2009-03-17 Jakub Jelinek <jakub@redhat.com>
47 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
48 instead of calling imported_module_or_decl debug hook if
49 building_stmt_tree ().
50 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
54 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
55 hook at function scope.
58 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
61 2009-03-09 Jakub Jelinek <jakub@redhat.com>
64 * semantics.c (finish_switch_cond): Don't call get_unwidened.
65 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
66 instead of TREE_TYPE (cond).
68 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
71 * parser.c (cp_parser_late_parsing_default_args): Continue
72 the loop when cp_parser_assignment_expression returns
75 2009-03-07 Jason Merrill <jason@redhat.com>
78 * init.c (build_new_1): Don't use a VLA type.
79 (build_vec_init): Handle getting a pointer for BASE.
81 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
84 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
85 when mangling symbols.
87 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
90 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
92 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
94 * decl.c (record_builtin_java_type): Use canonicalized integer
97 2009-03-04 Jason Merrill <jason@redhat.com>
100 * class.c (is_really_empty_class): New fn.
101 * cp-tree.h: Declare it.
102 * cp-objcp-common.c (cp_expr_size): Use it.
105 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
106 * parser.c (cp_parser_postfix_expression): Call it for
108 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
109 (get_first_fn): Likewise.
115 * decl.c (make_typename_type): Do look inside currently open classes.
116 * parser.c (cp_parser_lookup_name): Likewise.
117 (cp_parser_template_name): Likewise.
118 * pt.c (dependent_scope_p): New function.
119 * cp-tree.h: Declare it.
120 * class.c (currently_open_class): Return fast if T isn't a class.
122 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
125 * parser.c (cp_parser_mem_initializer): Return error_mark_node
126 if cp_parser_mem_initializer_id returns error_mark_node.
128 2009-02-24 Richard Guenther <rguenther@suse.de>
131 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
134 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
137 * pt.c (coerce_template_template_parms): Return 0 if parameter
140 2009-02-23 Jason Merrill <jason@redhat.com>
142 * pt.c (unify): Call maybe_adjust_types_for_deduction when
143 deducing from an initializer list.
145 2009-02-20 Jason Merrill <jason@redhat.com>
148 * decl.c (grokdeclarator): Handle ~identifier.
150 2009-02-19 Jakub Jelinek <jakub@redhat.com>
153 * decl2.c (determine_visibility): If visibility changed and
154 DECL_RTL has been already set, call make_decl_rtl to update symbol
157 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
160 * cp-tree.h (maybe_commonize_var): New.
162 * decl.c (maybe_commonize_var): Make it extern.
164 * decl2.c (finish_anon_union): Call maybe_commonize_var.
166 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
169 * parser.c (cp_parser_enum_specifier): Apply all attributes.
171 2009-02-18 Jason Merrill <jason@redhat.com>
173 * cfns.h: Tweak pathname for cfns.gperf.
175 2009-02-13 Jason Merrill <jason@redhat.com>
178 * semantics.c (finish_call_expr): Change koenig_p parm to int.
179 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
180 * cp-tree.h: Adjust prototype.
181 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
183 2009-02-12 Jason Merrill <jason@redhat.com>
186 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
188 2009-02-11 Jason Merrill <jason@redhat.com>
191 * decl2.c (cp_write_global_declarations):
192 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
195 * init.c (build_value_init_noctor): Split out from...
196 (build_value_init): ...here.
197 (expand_aggr_init_1): Handle value-initialization.
198 * cp-tree.h: Add declaration.
199 * class.c (type_has_user_provided_constructor):
200 Handle non-class arguments.
202 2009-02-10 Jason Merrill <jason@redhat.com>
205 * class.c (defaultable_fn_p): Handle ... properly.
208 * tree.c (lvalue_p_1): Condition rvalue ref handling on
209 treat_class_rvalues_as_lvalues, too.
211 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
214 * typeck.c (build_x_array_ref): New.
215 * cp-tree.h: Declare it.
216 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
218 2009-02-09 Jason Merrill <jason@redhat.com>
221 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
222 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
223 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
224 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
225 for build_value_init TARGET_EXPR.
226 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
228 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
232 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
234 2009-02-04 Jakub Jelinek <jakub@redhat.com>
237 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
238 remove ./dt operator.
239 * mangle.c (write_expression): Handle COMPONENT_REF after handling
240 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
241 write_string ("dt") instead of using operators.def.
243 2009-02-03 Jason Merrill <jason@redhat.com>
245 * typeck.c (cp_build_unary_op): Only complain about taking address
248 2009-02-03 Jakub Jelinek <jakub@redhat.com>
251 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
254 * typeck2.c (digest_init_r): Don't call process_init_constructor
257 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
260 * pt.c (convert_nontype_argument_function): Expect expr to be an
264 * typeck.c (merge_types): Call resolve_typename_type if only
265 one type is a typename.
267 2009-02-02 Jason Merrill <jason@redhat.com>
270 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
273 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
276 * parser.c (cp_parser_pure_specifier): If there are no tokens left
277 do not call cp_lexer_consume_token.
279 2009-01-30 Jakub Jelinek <jakub@redhat.com>
282 * parser.c (cp_parser_already_scoped_statement): Handle __label__
285 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
288 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
290 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
293 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
295 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
297 * typeck.c (invalid_nonstatic_memfn_p): Use
298 DECL_NONSTATIC_MEMBER_FUNCTION_P.
300 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
303 * call.c (build_over_call): If convert_for_arg_passing returns
304 error_mark_node unconditionally return it.
306 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
308 * class.c (check_field_decls): Also inherit packed for bitfields
309 regardless of their type.
311 2009-01-22 Dodji Seketeli <dodji@redhat.com>
314 * decl2.c (grokfield): Reverting changes of PR c++/26693
315 (save_template_attributes): Likewise.
316 * decl.c (grokdeclarator): Likewise.
317 * name-lookup.c (pushdecl_maybe_friend): Likewise.
318 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
319 (append_type_to_template_for_access_check): Likewise.
320 * semantics.c (check_accessibility_of_qualified_id): Likewise.
321 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
323 (resolve_type_name_type): Likewise.
324 (append_type_to_template_for_access_check): Likewise.
326 2009-01-21 Dodji Seketeli <dodji@redhat.com>
329 * decl2.c (grokfield): when a typedef appears in a
330 class, create the typedef variant type node for it.
331 (save_template_attributes): Creating typedef variant type node
333 * decl.c (grokdeclarator): If the typedef'ed struct/class was
334 anonymous, set the proper type name to all its type variants.
335 * name-lookup.c (pushdecl_maybe_friend): Reuse the
336 set_underlying_type function to install typedef variant types.
337 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
339 (append_type_to_template_for_access_check): New entry points.
340 * semantics.c (check_accessibility_of_qualified_id):
341 When a typedef that is a member of a class appears in a template,
342 add it to the template. It will be ...
343 * pt.c (instantiate_class_template, instantiate_template ): ... access
344 checked at template instantiation time.
345 (tsubst): Handle the case of being called with NULL args.
346 (resolve_type_name_type): The type name should be the name of the
348 (append_type_to_template_for_access_check): New entry point.
350 2009-01-19 Jason Merrill <jason@redhat.com>
353 * parser.c (cp_parser_unqualified_id): In a template,
355 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
357 2009-01-16 Jason Merrill <jason@redhat.com>
360 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
361 * init.c (build_new): Don't call describable_type unless we
365 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
368 * search.c (protected_accessible_p): N doesn't vary.
370 2009-01-15 Jason Merrill <jason@redhat.com>
373 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
374 accept hidden friends.
376 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
379 * decl.c (grokdeclarator): Check for a non namespace/class context.
381 2009-01-15 Jason Merrill <jason@redhat.com>
385 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
386 a function isn't necessarily an lvalue. Take tree, not const_tree.
387 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
388 * typeck.c (lvalue_or_else): Likewise.
389 * cp-tree.h: Adjust prototypes.
391 2009-01-15 Steve Ellcey <sje@cup.hp.com>
394 * pt.c (tsubst): Check for NULL args.
396 2009-01-15 Dodji Seketeli <dodji@redhat.com>
399 * name-lookup.c (pushtag): Don't create members to types that are not
402 2009-01-14 Nick Clifton <nickc@redhat.com>
405 * parser.c: Pass cp_id_kind computed in
406 cp_parser_postfix_dot_deref_expression to
407 cp_parser_primary_expression.
409 2009-01-13 Jakub Jelinek <jakub@redhat.com>
412 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
413 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
416 2009-01-12 Jason Merrill <jason@redhat.com>
417 Steve Ellcey <sje@cup.hp.com>
420 * name-lookup.c (lookup_name_real): Keep looking past a hidden
423 2009-01-12 Dodji Seketeli <dodji@redhat.com>
426 * pt.c (parameter_of_template_p): New function.
427 * cp-tree.h: Declare it.
428 * name-lookup.c (binding_to_template_parms_of_scope_p): New
430 (outer_binding): Take template parameters in account when looking for
433 2009-01-12 Jason Merrill <jason@redhat.com>
436 * tree.c (pod_type_p): Return 1 for structs created by the back end.
438 2009-01-12 Jakub Jelinek <jakub@redhat.com>
441 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
442 offsetof member-designator, handle it as `[0].'.
445 * decl.c (start_function): If grokdeclarator hasn't returned
446 FUNCTION_DECL nor error_mark_node, issue diagnostics.
448 2009-01-11 Jakub Jelinek <jakub@redhat.com>
451 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
452 (gimplify_if_stmt): ... this.
453 (cp_gimplify_expr): Don't handle IF_STMT here.
454 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
456 2009-01-10 Andrew Pinski <pinskia@gmail.com>
459 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
462 * typeck2.c (build_functional_cast): Check for reference type and NULL
465 2009-01-09 Steve Ellcey <sje@cup.hp.com>
467 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
469 2009-01-09 Jakub Jelinek <jakub@redhat.com>
472 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
474 2009-01-09 John F. Carr <jfc@mit.edu>
477 * parser.c (cp_parser_class_specifier): Clear
478 parser->in_unbraced_linkage_specification_p while parsing class
481 2009-01-07 Jakub Jelinek <jakub@redhat.com>
484 * semantics.c (finish_goto_stmt): Convert destination to
487 2009-01-06 Jason Merrill <jason@redhat.com>
494 * pt.c (check_default_tmpl_args): Don't complain about
495 out-of-order parameter packs in the enclosing class
496 or parameter packs after default args.
497 (coerce_template_parms): If we have more than one
498 parameter pack, don't flatten argument packs.
499 (template_args_equal): Handle argument packs.
500 (comp_template_args): Don't flatten argument packs.
501 (check_instantiated_arg): Split out from...
502 (check_instantiated_args): Here. Handle arg packs.
503 (convert_template_argument): Just check that nontype argument
504 packs have the right type.
506 2009-01-05 Dodji Seketeli <dodji@redhat.com>
509 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
511 2009-01-05 Jason Merrill <jason@redhat.com>
514 * typeck2.c (process_init_constructor_union): Handle union with
517 * mangle.c (write_expression): Remove mangling for zero-operand
521 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
525 * class.c (defaultable_fn_p): Only operator== can be a copy
528 2009-01-02 Jason Merrill <jason@redhat.com>
531 * typeck2.c (process_init_constructor_union): Handle excess
533 (process_init_constructor_record): Likewise.
536 * typeck2.c (digest_init_r): Don't use process_init_constructor
537 for non-aggregate classes.