1 2010-05-12 Jason Merrill <jason@redhat.com>
3 * cp-tree.h (UNKNOWN_TYPE): Remove.
4 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
5 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
6 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
7 * class.c (instantiate_type): Check unknown_type_node rather than
9 * name-lookup.c (maybe_push_decl): Likewise.
10 * rtti.c (get_tinfo_decl_dynamic): Likewise.
11 (get_typeid): Likewise.
12 * semantics.c (finish_offsetof): Likewise.
15 * call.c (add_template_candidate_real): If deduction fails, still
16 add the template as a non-viable candidate.
17 (equal_functions): Handle template candidates.
18 (print_z_candidate): Likewise.
19 (print_z_candidates): Likewise.
20 (build_new_function_call): Likewise.
22 * cp-tree.h (LOOKUP_LIST_ONLY): New.
23 * call.c (add_candidates): Enforce it.
24 (build_new_method_call): Try non-list ctor if no viable list ctor.
25 (build_user_type_conversion_1): Likewise.
27 * call.c (add_candidates): Distinguish between type(x) and
29 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
30 (build_new_method_call): Give better error for conversion op.
32 * call.c (add_candidates): Add first_arg and return_type parms.
33 Add special constructor/conversion op handling.
34 (convert_class_to_reference): Use it.
35 (build_user_type_conversion_1): Likewise.
36 (build_op_call): Likewise.
37 (build_new_method_call): Likewise.
38 (build_new_op): Adjust.
39 (perform_overload_resolution): Adjust.
41 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
46 * pt.c (process_partial_specialization): Return error_mark_node
47 in case of unused template parameters in partial specialization.
49 2010-05-11 Jakub Jelinek <jakub@redhat.com>
52 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
53 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
54 look at its second operand.
56 2010-05-10 Jason Merrill <jason@redhat.com>
59 * semantics.c (baselink_for_fns): Revert earlier change.
62 * typeck.c (cp_build_modify_expr): Complain about assignment to
65 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
68 * decl.c (check_initializer): strip array type before checking for
69 uninitialized const or ref members.
71 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
74 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
75 error count. Emit errors only if compain is true.
76 (build_new_1): Do not return error_mark_node if
77 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
78 errors. Delay the check for user-provided constructor.
79 (perform_member_init): Adjust.
80 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
83 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
84 Jason Merrill <jason@redhat.com>
86 Add support for C++0x nullptr.
87 * cp-tree.def: Add NULLPTR_TYPE.
88 * cp-tree.h: Add nullptr_node.
89 (cp_tree_index): Add CPTI_NULLPTR.
90 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
91 * call.c (null_ptr_cst_p): Handle nullptr.
92 (standard_conversion): Likewise.
93 (convert_arg_to_ellipsis): Likewise.
94 * mangle.c (write_type): Likewise.
95 * name-lookup.c (arg_assoc_type): Likewise.
96 * parser.c (cp_parser_primary_expression): Likewise.
97 * typeck.c (cp_build_binary_op): Likewise.
98 (build_reinterpret_cast_1): Likewise.
99 * error.c (dump_type): Likewise.
100 (dump_type_prefix, dump_type_suffix): Likewise.
101 * decl.c (cxx_init_decl_processing): Likewise.
102 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
103 * cvt.c (ocp_convert): Likewise.
104 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
105 nullptr_t tinfo in libsupc++.
107 2010-05-06 Jason Merrill <jason@redhat.com>
109 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
111 2010-04-22 Jakub Jelinek <jakub@redhat.com>
112 Dodji Seketeli <dodji@redhat.com>
115 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
117 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
118 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
119 (decay_conversion, perform_integral_promotions): Call rvalue_use.
120 (cp_build_unary_op): Call lvalue_use.
121 * decl.c (unused_but_set_errorcount): New variable.
122 (poplevel): Issue -Wunused-but-set-variable diagnostics.
123 (duplicate_decls): Merge DECL_READ_P flags.
124 (start_cleanup_fn): Set DECL_READ_P flag.
125 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
126 * tree.c (rvalue): Call rvalue_use.
127 * pt.c (convert_nontype_argument): Likewise.
128 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
129 finish_decltype_type): Likewise.
130 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
131 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
132 or rvalue_use depending on the expr.
133 * init.c (build_new, build_delete): Likewise.
134 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
136 2010-05-05 Jason Merrill <jason@redhat.com>
139 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
140 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
142 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
145 * pt.c (unify): Check each elt for error_mark_node.
147 2010-05-04 Jason Merrill <jason@redhat.com>
150 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
152 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
155 * call.c (build_new_method_call): Return error_mark_node if fns is
158 2010-05-03 Dodji Seketeli <dodji@redhat.com>
161 * pt.c (most_specialized_class): Pretend we are processing
162 a template decl during the call to coerce_template_parms.
164 2010-05-03 Jason Merrill <jason@redhat.com>
168 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
169 from the selected underlying type unless -fstrict-enums. Set
170 ENUM_UNDERLYING_TYPE to have the restricted range.
171 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
172 * class.c (check_bitfield_decl): Likewise.
174 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
177 * init.c (build_new_1): Revert the accidental checkin in
180 2010-04-30 Jason Merrill <jason@redhat.com>
183 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
184 (pp_cxx_type_specifier_seq): ...here.
186 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
188 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
189 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
191 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
194 * typeck.c (warn_args_num): New function.
195 (convert_arguments): Use warn_args_num to print the diagnostic
198 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
201 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
202 user-provided constructor while recursing.
204 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
207 * error.c (print_instantiation_partial_context_line): Handle
208 recursive instantiation.
209 (print_instantiation_partial_context): Likewise.
211 2010-04-27 Jason Merrill <jason@redhat.com>
213 * init.c (perform_member_init): Check CLASS_TYPE_P.
215 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
218 * init.c (perform_member_init): check for uninitialized const or
219 reference members, including array types.
221 2010-04-24 Jason Merrill <jason@redhat.com>
223 * tree.c (get_fns): Split out from get_first_fn.
224 * cp-tree.h: Declare it.
225 * search.c (shared_member_p): Use it.
226 * semantics.c (finish_qualified_id_expr): Simplify.
227 (finish_id_expression): Simplify.
229 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
230 whenever object is NULL_TREE. Don't do 'this' capture here.
231 (finish_qualified_id_expr): Pass NULL_TREE.
232 (finish_id_expression): Likewise.
233 (lambda_expr_this_capture): Likewise.
235 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
236 rather than checking current_class_ref directly.
237 (finish_call_expr): Likewise.
240 * name-lookup.c (qualify_lookup): Disqualify lambda op().
241 * class.c (current_nonlambda_class_type): New fn.
242 * semantics.c (nonlambda_method_basetype): New.
243 * cp-tree.h: Declare them.
244 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
246 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
249 * semantics.c (lambda_return_type): Complain about
253 * tree.c (cv_unqualified): Handle error_mark_node.
256 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
257 if we don't want errors.
260 * class.c (convert_to_base): Add complain parameter. Pass
261 ba_quiet to lookup_base if we don't want errors.
262 (build_vfield_ref): Pass complain to convert_to_base.
263 * call.c (convert_like_real): Likewise.
264 (initialize_reference): Likewise.
265 (perform_direct_initialization_if_possible): Pass complain to
269 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
270 Jason Merrill <jason@redhat.com>
273 * decl.c (check_for_uninitialized_const_var): Handle classes that need
275 (check_initializer): Call it for classes that need constructing, too.
276 * class.c (in_class_defaulted_default_constructor): New.
277 * cp-tree.h: Declare it.
279 2010-04-20 Jason Merrill <jason@redhat.com>
282 * init.c (constant_value_1): Treat error_mark_node as a constant
283 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
284 * cvt.c (ocp_convert): Handle getting error_mark_node from
285 integral_constant_value.
286 * decl.c (compute_array_index_type): Likewise.
288 2010-04-20 Dodji Seketeli <dodji@redhat.com>
292 * typeck.c (incompatible_dependent_types_p): If one of the
293 compared types if not a typedef then honour their main variant
296 2010-04-20 Jakub Jelinek <jakub@redhat.com>
298 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
300 2010-04-19 Dodji Seketeli <dodji@redhat.com>
303 * typeck.c (structural_comptypes): Test dependent typedefs
304 incompatibility before testing for their main variant based
307 2010-04-19 Jakub Jelinek <jakub@redhat.com>
309 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
310 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
312 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
314 * decl.c (cxx_init_decl_processing): Remove second argument in call to
315 build_common_tree_nodes.
317 2010-04-14 Jason Merrill <jason@redhat.com>
320 * parser.c (cp_parser_parenthesized_expression_list): Change
321 is_attribute_list parm to int to indicate whether or not to
322 handle initial identifier specially.
323 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
325 2010-04-13 Jason Merrill <jason@redhat.com>
327 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
329 * parser.c (cp_parser_lambda_expression): Complain about lambda in
331 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
333 2010-04-12 Jason Merrill <jason@redhat.com>
336 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
337 return value directly.
339 * call.c (type_decays_to): Call cv_unqualified for non-class type.
341 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
344 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
345 * init.c (build_new_1): Check for uninitialized const members and
346 uninitialized reference members, when using new without
347 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
348 (diagnose_uninitialized_cst_or_ref_member): Define, call
349 diagnose_uninitialized_cst_or_ref_member_1.
350 (diagnose_uninitialized_cst_or_ref_member_1): New function.
352 2010-04-12 Richard Guenther <rguenther@suse.de>
355 * semantics.c (expand_or_defer_fn_1): Do not keep extern
356 template inline functions.
358 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
361 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
364 2010-04-07 Jason Merrill <jason@redhat.com>
367 * decl.c (start_preparsed_function): Do defer nested functions.
370 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
371 * decl2.c (finish_static_data_member_decl): Set it.
372 * decl.c (duplicate_decls): Propagate it.
373 * pt.c (tsubst_decl): Don't substitute the domain of an array
374 VAR_DECL if it's set.
375 (regenerate_decl_from_template): Substitute it here.
376 (type_dependent_expression_p): Return true if it's set.
377 * semantics.c (finish_decltype_type): Instantiate such a variable.
378 * typeck.c (cxx_sizeof_expr): Likewise.
379 (strip_array_domain): New.
382 * name-lookup.c (current_decl_namespace): Non-static.
383 (pop_nested_namespace): Sanity check.
384 * cp-tree.h: Declare current_decl_namespace.
385 * decl.c (grokvardecl): Use it instead of current_namespace.
386 (grokfndecl): Likewise.
389 * pt.c (tsubst_friend_function): Instatiate a friend that has already
392 * pt.c (print_template_statistics): New.
393 * cp-tree.h: Declare it.
394 * tree.c (cxx_print_statistics): Call it.
397 * decl.c (grokvardecl): Tweak warning message.
398 (grokfndecl): Likewise.
400 2010-04-07 Dodji Seketeli <dodji@redhat.com>
403 *pt.c (tsubst_decl): Get the arguments of a specialization from
404 the specialization template, not from the most general template.
406 2010-04-07 Dodji Seketeli <dodji@redhat.com>
409 * typeck2.c (process_init_constructor_record):
410 value-initialize members that are are not explicitely
413 2010-04-07 Jie Zhang <jie@codesourcery.com>
416 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
417 when all of its elements are non-constant and have been split out.
419 2010-04-06 Taras Glek <taras@mozilla.com>
420 Jason Merrill <jason@redhat.com>
422 * parser.c (cp_parser_class_specifier): Set class location to that
423 of IDENTIFIER_NODE instead of '{' when possible.
424 * semantics.c (begin_class_definition): Do not overide locations
425 with less precise ones.
427 2010-04-06 Jason Merrill <jason@redhat.com>
430 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
433 * pt.c (maybe_update_decl_type): Check the return value from
436 2010-04-01 Jason Merrill <jason@redhat.com>
438 * decl.c (next_initializable_field): No longer static.
439 * cp-tree.h: Declare it.
440 * call.c (build_aggr_conv): Fail if there are more initializers
441 than initializable fields.
443 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
444 instead of void_zero_node.
446 2010-03-31 Dodji Seketeli <dodji@redhat.com>
449 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
450 * pt.c (end_template_parm_list): Store sibling template parms of
451 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
452 (push_template_decl_real): Don't store the containing template decl
453 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
454 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
455 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
458 2010-03-30 Jason Merrill <jason@redhat.com>
461 * pt.c (push_template_decl_real): Deal better with running out of
462 scopes before running out of template parms.
466 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
467 function parameter context. Don't print an error if parsing
471 * pt.c (more_specialized_fn): Don't control cv-qualifier check
474 2010-03-26 Jason Merrill <jason@redhat.com>
477 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
478 c++0x mode, but not other type-names.
480 2010-03-26 Dodji Seketeli <dodji@redhat.com>
483 * pt.c (add_to_template_args): Support NULL ARGS;
484 (most_specialized_class): call coerce_template_parms on
485 template arguments passed to get_class_bindings. Use
486 add_to_template_args.
487 (unify): Handle VAR_DECLs.
489 2010-03-26 Dodji Seketeli <dodji@redhat.com>
491 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
493 * pt.c (get_template_parms_at_level): Adjust.
495 2010-03-25 Dodji Seketeli <dodji@redhat.com>
498 * cp-tree.h (get_template_parms_at_level): Declare ...
499 * pt.c (get_template_parms_at_level): ... new function.
500 * typeck.c (get_template_parms_of_dependent_type): If a template
501 type parm's DECL_CONTEXT isn't yet set, get its siblings from
502 current_template_parms. Use get_template_parms_at_level. Remove
504 (incompatible_dependent_types_p): If we get empty parms from just one
505 of the template type parms we are comparing then the template parms are
508 2010-03-24 Jason Merrill <jason@redhat.com>
511 * parser.c (make_declarator): Initialize id_loc.
512 (cp_parser_lambda_declarator_opt): And set it.
514 2010-03-23 Jason Merrill <jason@redhat.com>
516 Make lambda conversion op and op() non-static.
517 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
518 Also add the thunk function returned by the conversion op.
519 Mark the conversion deleted if the op() is variadic.
520 * decl2.c (mark_used): Give helpful message about deleted conversion.
521 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
522 * semantics.c (finish_this_expr): Adjust.
523 * mangle.c (write_closure_type_name): Adjust.
524 * decl.c (grok_op_properties): Don't allow it.
525 * call.c (build_user_type_conversion_1): No static conversion ops.
526 (build_op_call): Or op().
528 * decl2.c (change_return_type): Fix 'this' quals.
530 2010-03-22 Jason Merrill <jason@redhat.com>
533 * tree.c (pod_type_p): Use old meaning in C++98 mode.
536 * pt.c (contains_auto_r): New fn.
537 (do_auto_deduction): Use it.
538 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
540 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
543 * decl2.c (grokfield): Handle invalid initializers for member
546 2010-03-20 Dodji Seketeli <dodji@redhat.com>
549 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
551 * decl2.c (vague_linkage_p): Likewise.
553 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
556 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
557 false, in the cp_parser_expression_statement call.
559 2010-03-05 Jason Merrill <jason@redhat.com>
561 * mangle.c (mangle_decl): Give name collision error even without
564 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
566 * pt.c (process_partial_specialization): Use error_n instead of
569 2010-03-03 Jason Merrill <jason@redhat.com>
572 * mangle.c (mangle_decl): Handle VAR_DECL, too.
574 2010-03-03 Jason Merrill <jason@redhat.com>
577 * mangle.c: Include cgraph.h.
578 (mangle_decl): If the mangled name will change in a later
579 ABI version, make the later mangled name an alias.
580 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
581 * Make-lang.in (mangle.o): Depend on cgraph.h.
582 * method.c (make_alias_for): Handle VAR_DECL, too.
583 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
584 * tree.c (no_linkage_check): Adjust.
585 * decl.c (maybe_commonize_var): Adjust.
588 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
590 * pt.c (redeclare_class_template): Use error_n and inform_n.
592 2010-02-27 Mark Mitchell <mark@codesourcery.com>
595 * cp-tree.h (push_tinst_level): Declare.
596 (pop_tinst_level): Likewise.
597 * pt.c (push_tinst_level): Give it external linkage.
598 (pop_tinst_level): Likewise.
599 * mangle.c (mangle_decl_string): Set the source location to that
600 of the decl while mangling.
602 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
605 * pt.c (redeclare_class_template): Return false if there are erroneous
608 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
610 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
613 2010-02-24 Jason Merrill <jason@redhat.com>
616 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
618 * class.c (layout_class_type): Don't give -Wabi warning for a bug
619 in a previous ABI version.
621 2010-02-23 Jason Merrill <jason@redhat.com>
624 * typeck2.c (digest_init_r): Accept value init of array.
626 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
629 * typeck.c (convert_arguments): Update error message.
631 2010-02-22 Mike Stump <mikestump@comcast.net>
634 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
636 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
639 * error.c (print_instantiation_partial_context_line): New.
640 (print_instantiation_partial_context): Print at most 12 contexts,
641 skip the rest with a message.
643 2010-02-21 Dodji Seketeli <dodji@redhat.com>
646 * pt.c (lookup_template_class): Better support of specialization
647 of member of class template implicit instantiation.
649 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
652 * call.c (conversion_null_warnings): Replace -Wconversion with
654 * cvt.c (build_expr_type_conversion): Likewise.
656 2010-02-18 Jason Merrill <jason@redhat.com>
659 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
662 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
664 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
665 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
668 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
672 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
673 (maybe_update_decl_type): New fn.
674 * parser.c (cp_parser_init_declarator): Use it.
677 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
679 2010-02-17 Jason Merrill <jason@redhat.com>
682 * call.c (build_over_call): Don't create zero-sized assignments.
683 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
684 * cp-objcp-common.c (cp_expr_size): Remove.
685 * cp-tree.h: Remove prototype.
688 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
689 decl we looked up doesn't match.
692 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
693 have an INIT_EXPR anymore.
696 * pt.c (convert_nontype_argument): Change assert to test.
698 2010-02-16 Jason Merrill <jason@redhat.com>
700 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
703 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
704 VIEW_CONVERT_EXPR for conversions between structural equality types
705 that the back end can't tell are the same.
708 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
709 cv-quals from element here.
710 (cp_build_qualified_type_real): Not here. Preserve typedef name.
712 2010-02-14 Jason Merrill <jason@redhat.com>
715 * semantics.c (finish_compound_literal): Use
716 cp_apply_type_quals_to_decl when creating a static variable.
718 2010-02-12 Jason Merrill <jason@redhat.com>
721 * name-lookup.h (current_binding_level): Check for null
724 2010-02-12 Jason Merrill <jason@redhat.com>
727 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
729 2010-02-12 Jakub Jelinek <jakub@redhat.com>
732 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
735 2010-02-10 Jason Merrill <jason@redhat.com>
738 * semantics.c (outer_lambda_capture_p): Revert.
739 (add_capture): Only finish_member_declaration if
740 we're in the lambda class.
741 (register_capture_members): New.
742 * cp-tree.h: Declare it.
743 * parser.c (cp_parser_lambda_expression): Call it.
745 2010-02-10 Jason Merrill <jason@redhat.com>
748 * semantics.c (outer_lambda_capture_p): Use current_function_decl
749 instead of current_class_type.
751 2010-02-10 Jason Merrill <jason@redhat.com>
753 PR c++/42983, core issue 906
754 * method.c (defaultable_fn_check): Check virtualness.
756 2010-02-10 Jason Merrill <jason@redhat.com>
759 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
761 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
763 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
764 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
766 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
767 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
768 (cp_parser_parameter_declaration)
769 (cp_parser_exception_specification_opt)
770 (cp_parser_exception_declaration): Likewise.
771 * pt.c (check_default_tmpl_args): Likewise.
772 * search.c (lookup_field_r): Likewise.
774 2010-02-09 Jason Merrill <jason@redhat.com>
777 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
779 2010-02-09 Jason Merrill <jason@redhat.com>
782 * decl2.c (change_return_type): New fn.
783 * semantics.c (apply_lambda_return_type): Use it.
784 * cp-tree.h: Declare it.
786 2010-02-05 Richard Guenther <rguenther@suse.de>
788 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
789 * cp-lang.c: Include gt-cp-cp-lang.h.
790 * config-lang.in (gtfiles): Add cp/cp-lang.c.
792 2010-02-05 Dodji Seketeli <dodji@redhat.com>
795 * typeck.c (get_template_parms_of_dependent_type): Try getting
796 the template parameters fromt the type itself first.
798 2010-02-03 Jason Merrill <jason@redhat.com>
802 * mangle.c (write_unqualified_id): Split out from write_expression.
803 (write_unqualified_name): Call it.
804 (write_member_name): Likewise.
805 (write_expression): Support TEMPLATE_ID_EXPR.
806 Disambiguate operator names.
809 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
812 2010-02-02 Jason Merrill <jason@redhat.com>
815 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
816 * optimize.c (clone_body): Remap their initializers when making base
818 (maybe_clone_body): Complain if multiple clones aren't safe.
820 2010-01-29 Dodji Seketeli <dodji@redhat.com>
827 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
828 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
829 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
830 * pt.c (coerce_template_parms, type_unification_real,
831 expand_template_argument_pack, coerce_template_parameter_pack):
832 Set the non default template args count.
833 (current_template_args): Always set non defaulted
834 template args count when compiled with --enable-checking
835 (tsubst_template_args, type_unification_real): Propagate the non
836 defaulted template args count.
837 * error.c (get_non_default_template_args_count): Renamed
838 count_non_default_template_args into this. Don't calculate the
839 non default template argument count anymore. Use the new
840 accessor macros above to get it.
841 (dump_template_argument_list, dump_type, dump_decl,
842 dump_template_parms): Adjust.
843 * parser.c (cp_parser_template_argument_list): Always set defaulted
844 template args count when compiled with --enable-checking.
846 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
848 * decl.c (redeclaration_error_message): Wrap the return messages into
849 G_() for easy translation.
851 2010-01-28 Jason Merrill <jason@redhat.com>
854 * semantics.c (begin_class_definition): Don't use type_as_string.
856 2010-01-28 Dodji Seketeli <dodji@redhat.com>
860 * typeck.c (get_template_parms_of_dependent_type): Factorized
861 this out of incompatible_template_type_parms_p
862 (incompatible_dependent_types_p): Renamed
863 incompatible_template_type_parms_p into this. Make it detect
864 two incompatible dependent typedefs too.
865 (structural_comptypes): Use incompatible_dependent_types_p.
866 * pt.c (get_template_info):
867 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
869 2010-01-20 Janis Johnson <janis187@us.ibm.com>
870 Jason Merrill <jason@redhat.com>
872 * mangle.c (write_type): Mangle transparent record as member type.
873 * semantics.c (begin_class_definition): Recognize decimal classes
874 and set TYPE_TRANSPARENT_AGGR.
876 2010-01-20 Jason Merrill <jason@redhat.com>
879 * mangle.c (write_expression): Handle tree codes that have extra
880 arguments in the middle-end.
882 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
885 * except.c (expand_start_catch_block): Deal correctly with
886 do_begin_catch returning error_mark_node.
888 2010-01-20 Jason Merrill <jason@redhat.com>
891 * class.c (layout_class_type): Set packed_maybe_necessary for packed
895 * semantics.c (build_lambda_object): Call mark_used on captured
899 * decl.c (grokdeclarator): Clear type_quals for a member function
900 declared using a typedef. Don't complain about adding cv-quals
901 to a function typedef in C++0x mode.
903 2010-01-20 Jakub Jelinek <jakub@redhat.com>
905 * decl.c (create_array_type_for_decl): Remove set but not used
906 variable error_msg. Remove break stmts after return stmts.
908 2010-01-19 Dodji Seketeli <dodji@redhat.com>
910 * error.c (dump_template_parms, count_non_default_template_args):
911 Revert fix of PR c++/42634.
913 2010-01-18 Dodji Seketeli <dodji@redhat.com>
916 * error.c (dump_template_parms): Use innermost template
917 arguments before calling count_non_default_template_args.
918 (count_non_default_template_args): We are being called with
919 template innermost arguments now. There is no need to ensure
922 2010-01-18 Dodji Seketeli <dodji@redhat.com>
925 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
927 2010-01-17 Dodji Seketeli <dodji@redhat.com>
930 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
932 2010-01-17 Dodji Seketeli <dodji@redhat.com>
935 *pt.c (tsubst_decl): Get the arguments of a specialization from
936 the specialization template, not from the most general template.
938 2010-01-16 Jason Merrill <jason@redhat.com>
941 * semantics.c (finish_decltype_type): Within a template, treat
942 unresolved CALL_EXPR as dependent.
944 2010-01-15 Dodji Seketeli <dodji@redhat.com>
946 * error.c (dump_template_parms,count_non_default_template_args):
947 Revert changes of PR c++/42634.
949 2010-01-14 Jakub Jelinek <jakub@redhat.com>
952 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
953 functions with noreturn attribute.
955 2010-01-14 Jason Merrill <jason@redhat.com>
958 * call.c (build_new_method_call): Don't free the vec here.
961 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
963 2010-01-13 Dodji Seketeli <dodji@redhat.com>
966 * error.c (dump_template_parms): Use innermost template
967 arguments before calling count_non_default_template_args.
968 (count_non_default_template_args): We are being called with
969 template innermost arguments now. There is no need to ensure
972 2010-01-07 Dodji Seketeli <dodji@redhat.com>
975 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
976 arguments that were previously deduced.
978 2010-01-05 Jason Merrill <jason@redhat.com>
980 * pt.c (unify_pack_expansion): Handle deduction from init-list.
981 * call.c (build_over_call): Don't complain about it.
983 2010-01-04 Jason Merrill <jason@redhat.com>
986 * pt.c (tsubst_decl): Don't apply type attributes in place.
989 * semantics.c (describable_type): Remove decltype comment and
994 Copyright (C) 2010 Free Software Foundation, Inc.
996 Copying and distribution of this file, with or without modification,
997 are permitted in any medium without royalty provided the copyright
998 notice and this notice are preserved.