1 2010-03-31 Dodji Seketeli <dodji@redhat.com>
4 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
5 * pt.c (end_template_parm_list): Store sibling template parms of
6 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
7 (push_template_decl_real): Don't store the containing template decl
8 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
9 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
10 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
13 2010-03-30 Jason Merrill <jason@redhat.com>
16 * pt.c (push_template_decl_real): Deal better with running out of
17 scopes before running out of template parms.
21 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
22 function parameter context. Don't print an error if parsing
26 * pt.c (more_specialized_fn): Don't control cv-qualifier check
29 2010-03-26 Jason Merrill <jason@redhat.com>
32 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
33 c++0x mode, but not other type-names.
35 2010-03-26 Dodji Seketeli <dodji@redhat.com>
38 * pt.c (add_to_template_args): Support NULL ARGS;
39 (most_specialized_class): call coerce_template_parms on
40 template arguments passed to get_class_bindings. Use
42 (unify): Handle VAR_DECLs.
44 2010-03-26 Dodji Seketeli <dodji@redhat.com>
46 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
48 * pt.c (get_template_parms_at_level): Adjust.
50 2010-03-25 Dodji Seketeli <dodji@redhat.com>
53 * cp-tree.h (get_template_parms_at_level): Declare ...
54 * pt.c (get_template_parms_at_level): ... new function.
55 * typeck.c (get_template_parms_of_dependent_type): If a template
56 type parm's DECL_CONTEXT isn't yet set, get its siblings from
57 current_template_parms. Use get_template_parms_at_level. Remove
59 (incompatible_dependent_types_p): If we get empty parms from just one
60 of the template type parms we are comparing then the template parms are
63 2010-03-24 Jason Merrill <jason@redhat.com>
66 * parser.c (make_declarator): Initialize id_loc.
67 (cp_parser_lambda_declarator_opt): And set it.
69 2010-03-23 Jason Merrill <jason@redhat.com>
71 Make lambda conversion op and op() non-static.
72 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
73 Also add the thunk function returned by the conversion op.
74 Mark the conversion deleted if the op() is variadic.
75 * decl2.c (mark_used): Give helpful message about deleted conversion.
76 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
77 * semantics.c (finish_this_expr): Adjust.
78 * mangle.c (write_closure_type_name): Adjust.
79 * decl.c (grok_op_properties): Don't allow it.
80 * call.c (build_user_type_conversion_1): No static conversion ops.
81 (build_op_call): Or op().
83 * decl2.c (change_return_type): Fix 'this' quals.
85 2010-03-22 Jason Merrill <jason@redhat.com>
88 * tree.c (pod_type_p): Use old meaning in C++98 mode.
91 * pt.c (contains_auto_r): New fn.
92 (do_auto_deduction): Use it.
93 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
95 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
98 * decl2.c (grokfield): Handle invalid initializers for member
101 2010-03-20 Dodji Seketeli <dodji@redhat.com>
104 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
106 * decl2.c (vague_linkage_p): Likewise.
108 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
111 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
112 false, in the cp_parser_expression_statement call.
114 2010-03-05 Jason Merrill <jason@redhat.com>
116 * mangle.c (mangle_decl): Give name collision error even without
119 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
121 * pt.c (process_partial_specialization): Use error_n instead of
124 2010-03-03 Jason Merrill <jason@redhat.com>
127 * mangle.c (mangle_decl): Handle VAR_DECL, too.
129 2010-03-03 Jason Merrill <jason@redhat.com>
132 * mangle.c: Include cgraph.h.
133 (mangle_decl): If the mangled name will change in a later
134 ABI version, make the later mangled name an alias.
135 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
136 * Make-lang.in (mangle.o): Depend on cgraph.h.
137 * method.c (make_alias_for): Handle VAR_DECL, too.
138 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
139 * tree.c (no_linkage_check): Adjust.
140 * decl.c (maybe_commonize_var): Adjust.
143 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
145 * pt.c (redeclare_class_template): Use error_n and inform_n.
147 2010-02-27 Mark Mitchell <mark@codesourcery.com>
150 * cp-tree.h (push_tinst_level): Declare.
151 (pop_tinst_level): Likewise.
152 * pt.c (push_tinst_level): Give it external linkage.
153 (pop_tinst_level): Likewise.
154 * mangle.c (mangle_decl_string): Set the source location to that
155 of the decl while mangling.
157 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
160 * pt.c (redeclare_class_template): Return false if there are erroneous
163 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
165 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
168 2010-02-24 Jason Merrill <jason@redhat.com>
171 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
173 * class.c (layout_class_type): Don't give -Wabi warning for a bug
174 in a previous ABI version.
176 2010-02-23 Jason Merrill <jason@redhat.com>
179 * typeck2.c (digest_init_r): Accept value init of array.
181 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
184 * typeck.c (convert_arguments): Update error message.
186 2010-02-22 Mike Stump <mikestump@comcast.net>
189 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
191 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
194 * error.c (print_instantiation_partial_context_line): New.
195 (print_instantiation_partial_context): Print at most 12 contexts,
196 skip the rest with a message.
198 2010-02-21 Dodji Seketeli <dodji@redhat.com>
201 * pt.c (lookup_template_class): Better support of specialization
202 of member of class template implicit instantiation.
204 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
207 * call.c (conversion_null_warnings): Replace -Wconversion with
209 * cvt.c (build_expr_type_conversion): Likewise.
211 2010-02-18 Jason Merrill <jason@redhat.com>
214 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
217 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
219 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
220 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
223 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
227 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
228 (maybe_update_decl_type): New fn.
229 * parser.c (cp_parser_init_declarator): Use it.
232 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
234 2010-02-17 Jason Merrill <jason@redhat.com>
237 * call.c (build_over_call): Don't create zero-sized assignments.
238 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
239 * cp-objcp-common.c (cp_expr_size): Remove.
240 * cp-tree.h: Remove prototype.
243 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
244 decl we looked up doesn't match.
247 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
248 have an INIT_EXPR anymore.
251 * pt.c (convert_nontype_argument): Change assert to test.
253 2010-02-16 Jason Merrill <jason@redhat.com>
255 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
258 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
259 VIEW_CONVERT_EXPR for conversions between structural equality types
260 that the back end can't tell are the same.
263 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
264 cv-quals from element here.
265 (cp_build_qualified_type_real): Not here. Preserve typedef name.
267 2010-02-14 Jason Merrill <jason@redhat.com>
270 * semantics.c (finish_compound_literal): Use
271 cp_apply_type_quals_to_decl when creating a static variable.
273 2010-02-12 Jason Merrill <jason@redhat.com>
276 * name-lookup.h (current_binding_level): Check for null
279 2010-02-12 Jason Merrill <jason@redhat.com>
282 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
284 2010-02-12 Jakub Jelinek <jakub@redhat.com>
287 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
290 2010-02-10 Jason Merrill <jason@redhat.com>
293 * semantics.c (outer_lambda_capture_p): Revert.
294 (add_capture): Only finish_member_declaration if
295 we're in the lambda class.
296 (register_capture_members): New.
297 * cp-tree.h: Declare it.
298 * parser.c (cp_parser_lambda_expression): Call it.
300 2010-02-10 Jason Merrill <jason@redhat.com>
303 * semantics.c (outer_lambda_capture_p): Use current_function_decl
304 instead of current_class_type.
306 2010-02-10 Jason Merrill <jason@redhat.com>
308 PR c++/42983, core issue 906
309 * method.c (defaultable_fn_check): Check virtualness.
311 2010-02-10 Jason Merrill <jason@redhat.com>
314 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
316 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
318 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
319 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
321 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
322 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
323 (cp_parser_parameter_declaration)
324 (cp_parser_exception_specification_opt)
325 (cp_parser_exception_declaration): Likewise.
326 * pt.c (check_default_tmpl_args): Likewise.
327 * search.c (lookup_field_r): Likewise.
329 2010-02-09 Jason Merrill <jason@redhat.com>
332 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
334 2010-02-09 Jason Merrill <jason@redhat.com>
337 * decl2.c (change_return_type): New fn.
338 * semantics.c (apply_lambda_return_type): Use it.
339 * cp-tree.h: Declare it.
341 2010-02-05 Richard Guenther <rguenther@suse.de>
343 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
344 * cp-lang.c: Include gt-cp-cp-lang.h.
345 * config-lang.in (gtfiles): Add cp/cp-lang.c.
347 2010-02-05 Dodji Seketeli <dodji@redhat.com>
350 * typeck.c (get_template_parms_of_dependent_type): Try getting
351 the template parameters fromt the type itself first.
353 2010-02-03 Jason Merrill <jason@redhat.com>
357 * mangle.c (write_unqualified_id): Split out from write_expression.
358 (write_unqualified_name): Call it.
359 (write_member_name): Likewise.
360 (write_expression): Support TEMPLATE_ID_EXPR.
361 Disambiguate operator names.
364 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
367 2010-02-02 Jason Merrill <jason@redhat.com>
370 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
371 * optimize.c (clone_body): Remap their initializers when making base
373 (maybe_clone_body): Complain if multiple clones aren't safe.
375 2010-01-29 Dodji Seketeli <dodji@redhat.com>
382 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
383 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
384 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
385 * pt.c (coerce_template_parms, type_unification_real,
386 expand_template_argument_pack, coerce_template_parameter_pack):
387 Set the non default template args count.
388 (current_template_args): Always set non defaulted
389 template args count when compiled with --enable-checking
390 (tsubst_template_args, type_unification_real): Propagate the non
391 defaulted template args count.
392 * error.c (get_non_default_template_args_count): Renamed
393 count_non_default_template_args into this. Don't calculate the
394 non default template argument count anymore. Use the new
395 accessor macros above to get it.
396 (dump_template_argument_list, dump_type, dump_decl,
397 dump_template_parms): Adjust.
398 * parser.c (cp_parser_template_argument_list): Always set defaulted
399 template args count when compiled with --enable-checking.
401 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
403 * decl.c (redeclaration_error_message): Wrap the return messages into
404 G_() for easy translation.
406 2010-01-28 Jason Merrill <jason@redhat.com>
409 * semantics.c (begin_class_definition): Don't use type_as_string.
411 2010-01-28 Dodji Seketeli <dodji@redhat.com>
415 * typeck.c (get_template_parms_of_dependent_type): Factorized
416 this out of incompatible_template_type_parms_p
417 (incompatible_dependent_types_p): Renamed
418 incompatible_template_type_parms_p into this. Make it detect
419 two incompatible dependent typedefs too.
420 (structural_comptypes): Use incompatible_dependent_types_p.
421 * pt.c (get_template_info):
422 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
424 2010-01-20 Janis Johnson <janis187@us.ibm.com>
425 Jason Merrill <jason@redhat.com>
427 * mangle.c (write_type): Mangle transparent record as member type.
428 * semantics.c (begin_class_definition): Recognize decimal classes
429 and set TYPE_TRANSPARENT_AGGR.
431 2010-01-20 Jason Merrill <jason@redhat.com>
434 * mangle.c (write_expression): Handle tree codes that have extra
435 arguments in the middle-end.
437 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
440 * except.c (expand_start_catch_block): Deal correctly with
441 do_begin_catch returning error_mark_node.
443 2010-01-20 Jason Merrill <jason@redhat.com>
446 * class.c (layout_class_type): Set packed_maybe_necessary for packed
450 * semantics.c (build_lambda_object): Call mark_used on captured
454 * decl.c (grokdeclarator): Clear type_quals for a member function
455 declared using a typedef. Don't complain about adding cv-quals
456 to a function typedef in C++0x mode.
458 2010-01-20 Jakub Jelinek <jakub@redhat.com>
460 * decl.c (create_array_type_for_decl): Remove set but not used
461 variable error_msg. Remove break stmts after return stmts.
463 2010-01-19 Dodji Seketeli <dodji@redhat.com>
465 * error.c (dump_template_parms, count_non_default_template_args):
466 Revert fix of PR c++/42634.
468 2010-01-18 Dodji Seketeli <dodji@redhat.com>
471 * error.c (dump_template_parms): Use innermost template
472 arguments before calling count_non_default_template_args.
473 (count_non_default_template_args): We are being called with
474 template innermost arguments now. There is no need to ensure
477 2010-01-18 Dodji Seketeli <dodji@redhat.com>
480 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
482 2010-01-17 Dodji Seketeli <dodji@redhat.com>
485 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
487 2010-01-17 Dodji Seketeli <dodji@redhat.com>
490 *pt.c (tsubst_decl): Get the arguments of a specialization from
491 the specialization template, not from the most general template.
493 2010-01-16 Jason Merrill <jason@redhat.com>
496 * semantics.c (finish_decltype_type): Within a template, treat
497 unresolved CALL_EXPR as dependent.
499 2010-01-15 Dodji Seketeli <dodji@redhat.com>
501 * error.c (dump_template_parms,count_non_default_template_args):
502 Revert changes of PR c++/42634.
504 2010-01-14 Jakub Jelinek <jakub@redhat.com>
507 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
508 functions with noreturn attribute.
510 2010-01-14 Jason Merrill <jason@redhat.com>
513 * call.c (build_new_method_call): Don't free the vec here.
516 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
518 2010-01-13 Dodji Seketeli <dodji@redhat.com>
521 * error.c (dump_template_parms): Use innermost template
522 arguments before calling count_non_default_template_args.
523 (count_non_default_template_args): We are being called with
524 template innermost arguments now. There is no need to ensure
527 2010-01-07 Dodji Seketeli <dodji@redhat.com>
530 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
531 arguments that were previously deduced.
533 2010-01-05 Jason Merrill <jason@redhat.com>
535 * pt.c (unify_pack_expansion): Handle deduction from init-list.
536 * call.c (build_over_call): Don't complain about it.
538 2010-01-04 Jason Merrill <jason@redhat.com>
541 * pt.c (tsubst_decl): Don't apply type attributes in place.
544 * semantics.c (describable_type): Remove decltype comment and
549 Copyright (C) 2010 Free Software Foundation, Inc.
551 Copying and distribution of this file, with or without modification,
552 are permitted in any medium without royalty provided the copyright
553 notice and this notice are preserved.