1 2010-03-26 Dodji Seketeli <dodji@redhat.com>
3 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
5 * pt.c (get_template_parms_at_level): Adjust.
7 2010-03-25 Dodji Seketeli <dodji@redhat.com>
10 * cp-tree.h (get_template_parms_at_level): Declare ...
11 * pt.c (get_template_parms_at_level): ... new function.
12 * typeck.c (get_template_parms_of_dependent_type): If a template
13 type parm's DECL_CONTEXT isn't yet set, get its siblings from
14 current_template_parms. Use get_template_parms_at_level. Remove
16 (incompatible_dependent_types_p): If we get empty parms from just one
17 of the template type parms we are comparing then the template parms are
20 2010-03-24 Jason Merrill <jason@redhat.com>
23 * parser.c (make_declarator): Initialize id_loc.
24 (cp_parser_lambda_declarator_opt): And set it.
26 2010-03-23 Jason Merrill <jason@redhat.com>
28 Make lambda conversion op and op() non-static.
29 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
30 Also add the thunk function returned by the conversion op.
31 Mark the conversion deleted if the op() is variadic.
32 * decl2.c (mark_used): Give helpful message about deleted conversion.
33 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
34 * semantics.c (finish_this_expr): Adjust.
35 * mangle.c (write_closure_type_name): Adjust.
36 * decl.c (grok_op_properties): Don't allow it.
37 * call.c (build_user_type_conversion_1): No static conversion ops.
38 (build_op_call): Or op().
40 * decl2.c (change_return_type): Fix 'this' quals.
42 2010-03-22 Jason Merrill <jason@redhat.com>
45 * tree.c (pod_type_p): Use old meaning in C++98 mode.
48 * pt.c (contains_auto_r): New fn.
49 (do_auto_deduction): Use it.
50 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
52 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
55 * decl2.c (grokfield): Handle invalid initializers for member
58 2010-03-20 Dodji Seketeli <dodji@redhat.com>
61 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
63 * decl2.c (vague_linkage_p): Likewise.
65 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
68 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
69 false, in the cp_parser_expression_statement call.
71 2010-03-05 Jason Merrill <jason@redhat.com>
73 * mangle.c (mangle_decl): Give name collision error even without
76 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
78 * pt.c (process_partial_specialization): Use error_n instead of
81 2010-03-03 Jason Merrill <jason@redhat.com>
84 * mangle.c (mangle_decl): Handle VAR_DECL, too.
86 2010-03-03 Jason Merrill <jason@redhat.com>
89 * mangle.c (mangle_decl): Handle VAR_DECL, too.
91 2010-03-03 Jason Merrill <jason@redhat.com>
94 * mangle.c: Include cgraph.h.
95 (mangle_decl): If the mangled name will change in a later
96 ABI version, make the later mangled name an alias.
97 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
98 * Make-lang.in (mangle.o): Depend on cgraph.h.
99 * method.c (make_alias_for): Handle VAR_DECL, too.
100 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
101 * tree.c (no_linkage_check): Adjust.
102 * decl.c (maybe_commonize_var): Adjust.
105 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
107 * pt.c (redeclare_class_template): Use error_n and inform_n.
109 2010-02-27 Mark Mitchell <mark@codesourcery.com>
112 * cp-tree.h (push_tinst_level): Declare.
113 (pop_tinst_level): Likewise.
114 * pt.c (push_tinst_level): Give it external linkage.
115 (pop_tinst_level): Likewise.
116 * mangle.c (mangle_decl_string): Set the source location to that
117 of the decl while mangling.
119 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
122 * pt.c (redeclare_class_template): Return false if there are erroneous
125 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
127 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
130 2010-02-24 Jason Merrill <jason@redhat.com>
133 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
135 * class.c (layout_class_type): Don't give -Wabi warning for a bug
136 in a previous ABI version.
138 2010-02-23 Jason Merrill <jason@redhat.com>
141 * typeck2.c (digest_init_r): Accept value init of array.
143 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
146 * typeck.c (convert_arguments): Update error message.
148 2010-02-22 Mike Stump <mikestump@comcast.net>
151 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
153 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
156 * error.c (print_instantiation_partial_context_line): New.
157 (print_instantiation_partial_context): Print at most 12 contexts,
158 skip the rest with a message.
160 2010-02-21 Dodji Seketeli <dodji@redhat.com>
163 * pt.c (lookup_template_class): Better support of specialization
164 of member of class template implicit instantiation.
166 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
169 * call.c (conversion_null_warnings): Replace -Wconversion with
171 * cvt.c (build_expr_type_conversion): Likewise.
173 2010-02-18 Jason Merrill <jason@redhat.com>
176 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
179 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
181 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
182 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
185 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
189 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
190 (maybe_update_decl_type): New fn.
191 * parser.c (cp_parser_init_declarator): Use it.
194 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
196 2010-02-17 Jason Merrill <jason@redhat.com>
199 * call.c (build_over_call): Don't create zero-sized assignments.
200 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
201 * cp-objcp-common.c (cp_expr_size): Remove.
202 * cp-tree.h: Remove prototype.
205 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
206 decl we looked up doesn't match.
209 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
210 have an INIT_EXPR anymore.
213 * pt.c (convert_nontype_argument): Change assert to test.
215 2010-02-16 Jason Merrill <jason@redhat.com>
217 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
220 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
221 VIEW_CONVERT_EXPR for conversions between structural equality types
222 that the back end can't tell are the same.
225 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
226 cv-quals from element here.
227 (cp_build_qualified_type_real): Not here. Preserve typedef name.
229 2010-02-14 Jason Merrill <jason@redhat.com>
232 * semantics.c (finish_compound_literal): Use
233 cp_apply_type_quals_to_decl when creating a static variable.
235 2010-02-12 Jason Merrill <jason@redhat.com>
238 * name-lookup.h (current_binding_level): Check for null
241 2010-02-12 Jason Merrill <jason@redhat.com>
244 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
246 2010-02-12 Jakub Jelinek <jakub@redhat.com>
249 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
252 2010-02-10 Jason Merrill <jason@redhat.com>
255 * semantics.c (outer_lambda_capture_p): Revert.
256 (add_capture): Only finish_member_declaration if
257 we're in the lambda class.
258 (register_capture_members): New.
259 * cp-tree.h: Declare it.
260 * parser.c (cp_parser_lambda_expression): Call it.
262 2010-02-10 Jason Merrill <jason@redhat.com>
265 * semantics.c (outer_lambda_capture_p): Use current_function_decl
266 instead of current_class_type.
268 2010-02-10 Jason Merrill <jason@redhat.com>
270 PR c++/42983, core issue 906
271 * method.c (defaultable_fn_check): Check virtualness.
273 2010-02-10 Jason Merrill <jason@redhat.com>
276 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
278 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
280 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
281 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
283 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
284 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
285 (cp_parser_parameter_declaration)
286 (cp_parser_exception_specification_opt)
287 (cp_parser_exception_declaration): Likewise.
288 * pt.c (check_default_tmpl_args): Likewise.
289 * search.c (lookup_field_r): Likewise.
291 2010-02-09 Jason Merrill <jason@redhat.com>
294 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
296 2010-02-09 Jason Merrill <jason@redhat.com>
299 * decl2.c (change_return_type): New fn.
300 * semantics.c (apply_lambda_return_type): Use it.
301 * cp-tree.h: Declare it.
303 2010-02-05 Richard Guenther <rguenther@suse.de>
305 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
306 * cp-lang.c: Include gt-cp-cp-lang.h.
307 * config-lang.in (gtfiles): Add cp/cp-lang.c.
309 2010-02-05 Dodji Seketeli <dodji@redhat.com>
312 * typeck.c (get_template_parms_of_dependent_type): Try getting
313 the template parameters fromt the type itself first.
315 2010-02-03 Jason Merrill <jason@redhat.com>
319 * mangle.c (write_unqualified_id): Split out from write_expression.
320 (write_unqualified_name): Call it.
321 (write_member_name): Likewise.
322 (write_expression): Support TEMPLATE_ID_EXPR.
323 Disambiguate operator names.
326 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
329 2010-02-02 Jason Merrill <jason@redhat.com>
332 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
333 * optimize.c (clone_body): Remap their initializers when making base
335 (maybe_clone_body): Complain if multiple clones aren't safe.
337 2010-01-29 Dodji Seketeli <dodji@redhat.com>
344 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
345 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
346 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
347 * pt.c (coerce_template_parms, type_unification_real,
348 expand_template_argument_pack, coerce_template_parameter_pack):
349 Set the non default template args count.
350 (current_template_args): Always set non defaulted
351 template args count when compiled with --enable-checking
352 (tsubst_template_args, type_unification_real): Propagate the non
353 defaulted template args count.
354 * error.c (get_non_default_template_args_count): Renamed
355 count_non_default_template_args into this. Don't calculate the
356 non default template argument count anymore. Use the new
357 accessor macros above to get it.
358 (dump_template_argument_list, dump_type, dump_decl,
359 dump_template_parms): Adjust.
360 * parser.c (cp_parser_template_argument_list): Always set defaulted
361 template args count when compiled with --enable-checking.
363 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
365 * decl.c (redeclaration_error_message): Wrap the return messages into
366 G_() for easy translation.
368 2010-01-28 Jason Merrill <jason@redhat.com>
371 * semantics.c (begin_class_definition): Don't use type_as_string.
373 2010-01-28 Dodji Seketeli <dodji@redhat.com>
377 * typeck.c (get_template_parms_of_dependent_type): Factorized
378 this out of incompatible_template_type_parms_p
379 (incompatible_dependent_types_p): Renamed
380 incompatible_template_type_parms_p into this. Make it detect
381 two incompatible dependent typedefs too.
382 (structural_comptypes): Use incompatible_dependent_types_p.
383 * pt.c (get_template_info):
384 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
386 2010-01-20 Janis Johnson <janis187@us.ibm.com>
387 Jason Merrill <jason@redhat.com>
389 * mangle.c (write_type): Mangle transparent record as member type.
390 * semantics.c (begin_class_definition): Recognize decimal classes
391 and set TYPE_TRANSPARENT_AGGR.
393 2010-01-20 Jason Merrill <jason@redhat.com>
396 * mangle.c (write_expression): Handle tree codes that have extra
397 arguments in the middle-end.
399 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
402 * except.c (expand_start_catch_block): Deal correctly with
403 do_begin_catch returning error_mark_node.
405 2010-01-20 Jason Merrill <jason@redhat.com>
408 * class.c (layout_class_type): Set packed_maybe_necessary for packed
412 * semantics.c (build_lambda_object): Call mark_used on captured
416 * decl.c (grokdeclarator): Clear type_quals for a member function
417 declared using a typedef. Don't complain about adding cv-quals
418 to a function typedef in C++0x mode.
420 2010-01-20 Jakub Jelinek <jakub@redhat.com>
422 * decl.c (create_array_type_for_decl): Remove set but not used
423 variable error_msg. Remove break stmts after return stmts.
425 2010-01-19 Dodji Seketeli <dodji@redhat.com>
427 * error.c (dump_template_parms, count_non_default_template_args):
428 Revert fix of PR c++/42634.
430 2010-01-18 Dodji Seketeli <dodji@redhat.com>
433 * error.c (dump_template_parms): Use innermost template
434 arguments before calling count_non_default_template_args.
435 (count_non_default_template_args): We are being called with
436 template innermost arguments now. There is no need to ensure
439 2010-01-18 Dodji Seketeli <dodji@redhat.com>
442 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
444 2010-01-17 Dodji Seketeli <dodji@redhat.com>
447 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
449 2010-01-17 Dodji Seketeli <dodji@redhat.com>
452 *pt.c (tsubst_decl): Get the arguments of a specialization from
453 the specialization template, not from the most general template.
455 2010-01-16 Jason Merrill <jason@redhat.com>
458 * semantics.c (finish_decltype_type): Within a template, treat
459 unresolved CALL_EXPR as dependent.
461 2010-01-15 Dodji Seketeli <dodji@redhat.com>
463 * error.c (dump_template_parms,count_non_default_template_args):
464 Revert changes of PR c++/42634.
466 2010-01-14 Jakub Jelinek <jakub@redhat.com>
469 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
470 functions with noreturn attribute.
472 2010-01-14 Jason Merrill <jason@redhat.com>
475 * call.c (build_new_method_call): Don't free the vec here.
478 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
480 2010-01-13 Dodji Seketeli <dodji@redhat.com>
483 * error.c (dump_template_parms): Use innermost template
484 arguments before calling count_non_default_template_args.
485 (count_non_default_template_args): We are being called with
486 template innermost arguments now. There is no need to ensure
489 2010-01-07 Dodji Seketeli <dodji@redhat.com>
492 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
493 arguments that were previously deduced.
495 2010-01-05 Jason Merrill <jason@redhat.com>
497 * pt.c (unify_pack_expansion): Handle deduction from init-list.
498 * call.c (build_over_call): Don't complain about it.
500 2010-01-04 Jason Merrill <jason@redhat.com>
503 * pt.c (tsubst_decl): Don't apply type attributes in place.
506 * semantics.c (describable_type): Remove decltype comment and
511 Copyright (C) 2010 Free Software Foundation, Inc.
513 Copying and distribution of this file, with or without modification,
514 are permitted in any medium without royalty provided the copyright
515 notice and this notice are preserved.