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: Include cgraph.h.
90 (mangle_decl): If the mangled name will change in a later
91 ABI version, make the later mangled name an alias.
92 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
93 * Make-lang.in (mangle.o): Depend on cgraph.h.
94 * method.c (make_alias_for): Handle VAR_DECL, too.
95 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
96 * tree.c (no_linkage_check): Adjust.
97 * decl.c (maybe_commonize_var): Adjust.
100 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
102 * pt.c (redeclare_class_template): Use error_n and inform_n.
104 2010-02-27 Mark Mitchell <mark@codesourcery.com>
107 * cp-tree.h (push_tinst_level): Declare.
108 (pop_tinst_level): Likewise.
109 * pt.c (push_tinst_level): Give it external linkage.
110 (pop_tinst_level): Likewise.
111 * mangle.c (mangle_decl_string): Set the source location to that
112 of the decl while mangling.
114 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
117 * pt.c (redeclare_class_template): Return false if there are erroneous
120 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
122 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
125 2010-02-24 Jason Merrill <jason@redhat.com>
128 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
130 * class.c (layout_class_type): Don't give -Wabi warning for a bug
131 in a previous ABI version.
133 2010-02-23 Jason Merrill <jason@redhat.com>
136 * typeck2.c (digest_init_r): Accept value init of array.
138 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
141 * typeck.c (convert_arguments): Update error message.
143 2010-02-22 Mike Stump <mikestump@comcast.net>
146 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
148 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
151 * error.c (print_instantiation_partial_context_line): New.
152 (print_instantiation_partial_context): Print at most 12 contexts,
153 skip the rest with a message.
155 2010-02-21 Dodji Seketeli <dodji@redhat.com>
158 * pt.c (lookup_template_class): Better support of specialization
159 of member of class template implicit instantiation.
161 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
164 * call.c (conversion_null_warnings): Replace -Wconversion with
166 * cvt.c (build_expr_type_conversion): Likewise.
168 2010-02-18 Jason Merrill <jason@redhat.com>
171 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
174 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
176 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
177 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
180 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
184 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
185 (maybe_update_decl_type): New fn.
186 * parser.c (cp_parser_init_declarator): Use it.
189 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
191 2010-02-17 Jason Merrill <jason@redhat.com>
194 * call.c (build_over_call): Don't create zero-sized assignments.
195 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
196 * cp-objcp-common.c (cp_expr_size): Remove.
197 * cp-tree.h: Remove prototype.
200 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
201 decl we looked up doesn't match.
204 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
205 have an INIT_EXPR anymore.
208 * pt.c (convert_nontype_argument): Change assert to test.
210 2010-02-16 Jason Merrill <jason@redhat.com>
212 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
215 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
216 VIEW_CONVERT_EXPR for conversions between structural equality types
217 that the back end can't tell are the same.
220 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
221 cv-quals from element here.
222 (cp_build_qualified_type_real): Not here. Preserve typedef name.
224 2010-02-14 Jason Merrill <jason@redhat.com>
227 * semantics.c (finish_compound_literal): Use
228 cp_apply_type_quals_to_decl when creating a static variable.
230 2010-02-12 Jason Merrill <jason@redhat.com>
233 * name-lookup.h (current_binding_level): Check for null
236 2010-02-12 Jason Merrill <jason@redhat.com>
239 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
241 2010-02-12 Jakub Jelinek <jakub@redhat.com>
244 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
247 2010-02-10 Jason Merrill <jason@redhat.com>
250 * semantics.c (outer_lambda_capture_p): Revert.
251 (add_capture): Only finish_member_declaration if
252 we're in the lambda class.
253 (register_capture_members): New.
254 * cp-tree.h: Declare it.
255 * parser.c (cp_parser_lambda_expression): Call it.
257 2010-02-10 Jason Merrill <jason@redhat.com>
260 * semantics.c (outer_lambda_capture_p): Use current_function_decl
261 instead of current_class_type.
263 2010-02-10 Jason Merrill <jason@redhat.com>
265 PR c++/42983, core issue 906
266 * method.c (defaultable_fn_check): Check virtualness.
268 2010-02-10 Jason Merrill <jason@redhat.com>
271 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
273 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
275 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
276 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
278 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
279 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
280 (cp_parser_parameter_declaration)
281 (cp_parser_exception_specification_opt)
282 (cp_parser_exception_declaration): Likewise.
283 * pt.c (check_default_tmpl_args): Likewise.
284 * search.c (lookup_field_r): Likewise.
286 2010-02-09 Jason Merrill <jason@redhat.com>
289 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
291 2010-02-09 Jason Merrill <jason@redhat.com>
294 * decl2.c (change_return_type): New fn.
295 * semantics.c (apply_lambda_return_type): Use it.
296 * cp-tree.h: Declare it.
298 2010-02-05 Richard Guenther <rguenther@suse.de>
300 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
301 * cp-lang.c: Include gt-cp-cp-lang.h.
302 * config-lang.in (gtfiles): Add cp/cp-lang.c.
304 2010-02-05 Dodji Seketeli <dodji@redhat.com>
307 * typeck.c (get_template_parms_of_dependent_type): Try getting
308 the template parameters fromt the type itself first.
310 2010-02-03 Jason Merrill <jason@redhat.com>
314 * mangle.c (write_unqualified_id): Split out from write_expression.
315 (write_unqualified_name): Call it.
316 (write_member_name): Likewise.
317 (write_expression): Support TEMPLATE_ID_EXPR.
318 Disambiguate operator names.
321 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
324 2010-02-02 Jason Merrill <jason@redhat.com>
327 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
328 * optimize.c (clone_body): Remap their initializers when making base
330 (maybe_clone_body): Complain if multiple clones aren't safe.
332 2010-01-29 Dodji Seketeli <dodji@redhat.com>
339 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
340 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
341 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
342 * pt.c (coerce_template_parms, type_unification_real,
343 expand_template_argument_pack, coerce_template_parameter_pack):
344 Set the non default template args count.
345 (current_template_args): Always set non defaulted
346 template args count when compiled with --enable-checking
347 (tsubst_template_args, type_unification_real): Propagate the non
348 defaulted template args count.
349 * error.c (get_non_default_template_args_count): Renamed
350 count_non_default_template_args into this. Don't calculate the
351 non default template argument count anymore. Use the new
352 accessor macros above to get it.
353 (dump_template_argument_list, dump_type, dump_decl,
354 dump_template_parms): Adjust.
355 * parser.c (cp_parser_template_argument_list): Always set defaulted
356 template args count when compiled with --enable-checking.
358 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
360 * decl.c (redeclaration_error_message): Wrap the return messages into
361 G_() for easy translation.
363 2010-01-28 Jason Merrill <jason@redhat.com>
366 * semantics.c (begin_class_definition): Don't use type_as_string.
368 2010-01-28 Dodji Seketeli <dodji@redhat.com>
372 * typeck.c (get_template_parms_of_dependent_type): Factorized
373 this out of incompatible_template_type_parms_p
374 (incompatible_dependent_types_p): Renamed
375 incompatible_template_type_parms_p into this. Make it detect
376 two incompatible dependent typedefs too.
377 (structural_comptypes): Use incompatible_dependent_types_p.
378 * pt.c (get_template_info):
379 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
381 2010-01-20 Janis Johnson <janis187@us.ibm.com>
382 Jason Merrill <jason@redhat.com>
384 * mangle.c (write_type): Mangle transparent record as member type.
385 * semantics.c (begin_class_definition): Recognize decimal classes
386 and set TYPE_TRANSPARENT_AGGR.
388 2010-01-20 Jason Merrill <jason@redhat.com>
391 * mangle.c (write_expression): Handle tree codes that have extra
392 arguments in the middle-end.
394 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
397 * except.c (expand_start_catch_block): Deal correctly with
398 do_begin_catch returning error_mark_node.
400 2010-01-20 Jason Merrill <jason@redhat.com>
403 * class.c (layout_class_type): Set packed_maybe_necessary for packed
407 * semantics.c (build_lambda_object): Call mark_used on captured
411 * decl.c (grokdeclarator): Clear type_quals for a member function
412 declared using a typedef. Don't complain about adding cv-quals
413 to a function typedef in C++0x mode.
415 2010-01-20 Jakub Jelinek <jakub@redhat.com>
417 * decl.c (create_array_type_for_decl): Remove set but not used
418 variable error_msg. Remove break stmts after return stmts.
420 2010-01-19 Dodji Seketeli <dodji@redhat.com>
422 * error.c (dump_template_parms, count_non_default_template_args):
423 Revert fix of PR c++/42634.
425 2010-01-18 Dodji Seketeli <dodji@redhat.com>
428 * error.c (dump_template_parms): Use innermost template
429 arguments before calling count_non_default_template_args.
430 (count_non_default_template_args): We are being called with
431 template innermost arguments now. There is no need to ensure
434 2010-01-18 Dodji Seketeli <dodji@redhat.com>
437 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
439 2010-01-17 Dodji Seketeli <dodji@redhat.com>
442 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
444 2010-01-17 Dodji Seketeli <dodji@redhat.com>
447 *pt.c (tsubst_decl): Get the arguments of a specialization from
448 the specialization template, not from the most general template.
450 2010-01-16 Jason Merrill <jason@redhat.com>
453 * semantics.c (finish_decltype_type): Within a template, treat
454 unresolved CALL_EXPR as dependent.
456 2010-01-15 Dodji Seketeli <dodji@redhat.com>
458 * error.c (dump_template_parms,count_non_default_template_args):
459 Revert changes of PR c++/42634.
461 2010-01-14 Jakub Jelinek <jakub@redhat.com>
464 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
465 functions with noreturn attribute.
467 2010-01-14 Jason Merrill <jason@redhat.com>
470 * call.c (build_new_method_call): Don't free the vec here.
473 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
475 2010-01-13 Dodji Seketeli <dodji@redhat.com>
478 * error.c (dump_template_parms): Use innermost template
479 arguments before calling count_non_default_template_args.
480 (count_non_default_template_args): We are being called with
481 template innermost arguments now. There is no need to ensure
484 2010-01-07 Dodji Seketeli <dodji@redhat.com>
487 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
488 arguments that were previously deduced.
490 2010-01-05 Jason Merrill <jason@redhat.com>
492 * pt.c (unify_pack_expansion): Handle deduction from init-list.
493 * call.c (build_over_call): Don't complain about it.
495 2010-01-04 Jason Merrill <jason@redhat.com>
498 * pt.c (tsubst_decl): Don't apply type attributes in place.
501 * semantics.c (describable_type): Remove decltype comment and
506 Copyright (C) 2010 Free Software Foundation, Inc.
508 Copying and distribution of this file, with or without modification,
509 are permitted in any medium without royalty provided the copyright
510 notice and this notice are preserved.