1 2007-09-11 Jan Hubicka <jh@suse.cz>
3 * method.c (use_thunk): Use tree_rest_of_compilation
4 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
5 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
6 * cp-tree.h (expand_body): Kill.
7 (emit_associated_thunks): Declare.
8 * semantics.c (emit_associated_thunks): Export.
11 2007-09-09 David Daney <ddaney@avtrex.com>
14 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
15 to calculate cookie_ptr.
17 2007-09-08 Jason Merrill <jason@redhat.com>
20 * pt.c (most_specialized_class): Set processing_template_decl
21 while tsubsting partial spec args.
23 2007-09-06 Jason Merrill <jason@redhat.com>
25 * decl2.c (get_guard): Copy visibility from the guarded variable.
27 2007-09-06 Jan Hubicka <jh@suse.cz>
29 * semantics.c (expand_body): Do not mark arguments of clones used.
31 2007-09-06 Paolo Carlini <pcarlini@suse.de>
34 * decl.c (cp_finish_decl): When processing_template_decl,
35 deal correctly with init as TREE_LIST.
37 2007-09-06 Tom Tromey <tromey@redhat.com>
39 * decl.c (finish_function): Put return's location on line zero of
42 2007-09-05 Jason Merrill <jason@redhat.com>
45 * except.c (prepare_eh_type): Use type_decays_to.
48 * init.c (build_delete): Use build_headof to get the address of the
49 complete object if we aren't using the deleting destructor.
50 * rtti.c (build_headof): No longer static.
51 * cp-tree.h: Declare it.
53 2007-09-06 Jakub Jelinek <jakub@redhat.com>
55 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
56 decl if a prototype for XX is provided with throw().
59 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
60 on __*_chk non-__builtin_* decls.
62 2007-09-05 Paolo Carlini <pcarlini@suse.de>
65 * semantics.c (finish_id_expression): Use context_for_name_lookup
66 insted of DECL_CONTEXT, to see through anonymous structs and unions.
67 * class.c (finish_struct_anon): Deal correctly with anonymous
68 structs (vs unions, as GNU extension) in error messages.
70 2007-09-05 Jan Hubicka <jh@suse.cz>
72 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
73 call, DECL_EXTERNAL checks and current_function_decl saving.
75 2007-09-05 Paolo Carlini <pcarlini@suse.de>
78 * parser.c (cp_parser_primary_expression): Return error_mark_node
79 when a statement-expression is found in a template-argument list.
81 2007-09-04 Jason Merrill <jason@redhat.com>
83 * except.c (initialize_handler_parm): Use
84 fold_build_cleanup_point_expr.
87 * call.c (reference_binding): Don't look for user-defined conversions
91 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
92 the MUST_NOT_THROW_EXPR.
94 2007-09-04 Richard Sandiford <richard@codesourcery.com>
96 * decl.c (cp_finish_decl): Call determine_visibility before
97 make_rtl_for_nonlocal_decl.
99 2007-09-04 Jason Merrill <jason@redhat.com>
102 * pt.c (most_specialized_class): Substitute outer template
103 arguments into the arguments of a member template partial
105 (strip_innermost_template_args): New fn.
107 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
109 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
111 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
113 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
114 * decl.c (cp_make_fname_decl): Likewise,
115 * parser.c (cp_parser_string_literal): Likewise,
116 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
117 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
120 2007-09-02 Paolo Carlini <pcarlini@suse.de>
123 * typeck.c (build_unary_op): Fix error message for
124 Boolean expression as operand to operator--.
126 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
128 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
129 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
132 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
135 * init.c (build_default_init): Make extern.
136 * cp-tree.h (build_default_init): Declare here.
137 * pt.c (tsubst_expr): When the instantiation of the initializer of
138 a variable results in an empty list, default-initialize the
140 (tsubst_copy_and_build): When the instantiation of the initializer
141 in a new expression results in an empty initializer list,
142 default-initialize it.
144 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
146 * mangle.c (write_type): Change mangling of rvalue reference from
149 2007-08-31 Jakub Jelinek <jakub@redhat.com>
151 * decl.c (duplicate_decls): Remove duplicated line.
153 2007-08-31 Paolo Carlini <pcarlini@suse.de>
156 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
157 BOUND_TEMPLATE_TEMPLATE_PARM.
159 2007-08-31 Paolo Carlini <pcarlini@suse.de>
162 * search.c (lookup_member): Check the name argument for
165 2007-08-31 Paolo Carlini <pcarlini@suse.de>
168 * parser.c (cp_parser_trait_expr): Check rerurn value of
171 2007-08-30 Ollie Wild <aaw@google.com>
173 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
174 convert_ptrmem for pointer to member conversions.
175 (convert_to_pointer_force): Update cp_convert_to_pointer call.
176 (ocp_convert): Update cp_convert_to_pointer call.
177 * typeck.c (convert_ptrmem): Add conditional for null pointers to
179 (build_static_cast_1): Check can_convert for conversions in either
181 (get_delta_difference_1): New function.
182 (get_delta_difference): Refactor to call get_delta_difference_1.
184 2007-08-30 Jakub Jelinek <jakub@redhat.com>
186 * decl.c (start_preparsed_function): Set
187 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
189 2007-08-28 Paolo Carlini <pcarlini@suse.de>
192 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
193 BOUND_TEMPLATE_TEMPLATE_PARM.
195 2007-08-28 Jakub Jelinek <jakub@redhat.com>
199 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
200 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
202 2007-08-27 Jason Merrill <jason@redhat.com>
205 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
206 Look inside STMT_EXPR.
207 * semantics.c (stmt_expr_value_expr): New fn.
208 * cp-tree.h: Declare it.
211 * decl.c (groktypename): Ignore attributes applied to class type.
213 2007-08-28 Richard Guenther <rguenther@suse.de>
215 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
217 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
219 * error.c (dump_expr): Handle COMPLEX_CST.
220 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
221 (pp_cxx_expression): Likewise.
223 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
225 * decl.c (GNU_INLINE_P): New.
226 (duplicate_decls): Handle gnu_inline. Merge attributes and
227 some flags in overriding definitions.
228 (redeclaration_error_message): Handle gnu_inline.
229 (start_preparsed_function): Likewise.
231 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
233 * call.c (sufficient_parms_p): Constify.
234 * class.c (same_signature_p): Likewise.
235 * cp-gimplify.c (is_invisiref_parm,
236 cxx_omp_privatize_by_reference): Likewise.
237 * cp-objcp-common.c (has_c_linkage): Likewise.
238 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
239 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
240 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
241 num_artificial_parms_for, comp_template_parms,
242 template_parameter_pack_p, any_dependent_template_arguments_p,
243 any_type_dependent_arguments_p, any_value_dependent_elements_p,
244 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
245 zero_init_p, member_p, cp_lvalue_kind,
246 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
247 varargs_function_p, is_dummy_object, special_function_kind,
248 string_conv_p, type_unknown_p, comp_except_specs, compparms,
249 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
250 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
251 cp_has_mutable_p, at_least_as_qualified_p,
252 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
253 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
254 * except.c (nothrow_libfn_p): Likewise.
255 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
257 * pt.c (comp_template_parms, template_parameter_pack_p,
258 any_type_dependent_arguments_p, any_value_dependent_elements_p,
259 any_dependent_template_arguments_p): Likewise.
260 * repo.c (repo_export_class_p): Likewise.
261 * semantics.c (anon_aggr_type_p): Likewise.
262 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
263 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
264 varargs_function_p, member_p, is_dummy_object, pod_type_p,
265 zero_init_p, special_function_p): Likewise.
266 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
267 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
268 compparms, invalid_nonstatic_memfn_p,
269 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
270 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
271 cp_has_mutable_p, lvalue_or_else): Likewise.
273 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
275 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
276 * cp-objcp-common.c (cp_tree_size): Ditto.
277 * tree.c (cp_walk_subtrees): Ditto
278 * cp-tree.def (TINST_LEVEL): Go away.
279 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
280 move together with other non-tree structs.
281 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
282 (union lang_tree_node): Eliminate tinst_level field.
283 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
284 (current_instantiation, outermost_tinst_level): Return
285 a "struct tinst_level *".
287 * error.c (print_instantiation_partial_context): Change second
288 parameter to a "struct tinst_level *". Replace accessor macros
290 (print_instantiation_full_context): Likewise.
291 * lex.c (in_main_input_context): Likewise.
293 * pt.c (struct pending_templates): New.
294 (pending_templates, last_pending_template): Use it as a type.
295 (current_tinst_level): Change typo to "struct tinst_level *"
296 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
297 (add_pending_template): Construct a "struct pending_template".
298 Replace TINST_LEVEL accessor macros with field access.
299 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
300 (pop_tinst_level): Likewise.
301 (instantiate_pending_templates): Likewise. Factor common code used
302 when an instantiation has been done.
303 (outermost_tinst_level): Replace tree_last with loop.
304 (current_instantiation): Return a "struct tinst_level *".
306 2007-08-24 Ollie Wild <aaw@google.com>
308 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
309 * name-lookup.h (cp_binding_level): Remove vtables member.
311 2007-08-24 Richard Guenther <rguenther@suse.de>
313 * tree.c (cp_cannot_inline_tree_fn): Remove.
314 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
315 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
318 2007-08-24 Jakub Jelinek <jakub@redhat.com>
321 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
322 error_mark_node right away if build_expr_type_conversion
326 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
327 is error_mark_node rather than NULL_TREE.
328 * pt.c (check_explicit_specialization): Likewise.
331 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
332 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
334 2007-08-22 Jason Merrill <jason@redhat.com>
337 * pt.c (outermost_tinst_level): New function.
338 * lex.c (in_main_input_context): New function.
339 * cp-tree.h: Declare it.
340 * decl2.c (constrain_class_visibility): Use it to avoid warning
341 about uses of the anonymous namespace in the main input file.
343 2007-08-21 Jakub Jelinek <jakub@redhat.com>
345 * init.c (build_new_1): Use get_target_expr instead of save_expr.
347 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
350 * class.c (finish_struct_1): Warn when a class has virtual
351 functions and accessible non-virtual destructor.
353 2007-08-20 Richard Guenther <rguenther@suse.de>
357 * call.c (build_new_method_call): Convert initializer to
359 * init.c (build_aggr_init): Do not fiddle with types.
360 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
361 * except.c (build_throw): Do not drop qualifiers for the
363 * typeck.c (get_member_function_from_ptrfunc): Do not
364 fiddle with types, instead convert.
365 (build_ptrmemfunc1): Convert to the target type for
367 (gfc_trans_allocate): Convert result to target type.
368 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
369 pointer-to-member structures shall have alias set zero as well.
371 2007-08-20 Richard Guenther <rguenther@suse.de>
373 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
375 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
376 (nonstatic_local_decl_p): Likewise.
377 * tree.c (cp_auto_var_in_fn_p): Remove.
378 * decl.c (nonstatic_local_decl_p): Remove.
380 2007-08-20 Richard Guenther <rguenther@suse.de>
382 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
384 * tree.h (cp_walk_tree): New define to walk_tree_1 with
385 cp_walk_subtrees lh parameter.
386 (cp_walk_tree_without_duplicates): New define to
387 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
388 * tree.c (count_trees): Call
389 cp_walk_tree_without_duplicates.
390 (verify_stmt_tree): Call cp_walk_tree.
391 (break_out_target_exprs): Likewise.
392 (WALK_SUBTREE): Likewise.
393 * cp-gimplify.c (cp_genericize): Likewise.
394 * cp-pt.c (find_parameter_packs_r): Likewise.
395 (uses_parameter_packs): Likewise.
396 (make_pack_expansion): Likewise.
397 (check_for_bare_parameter_packs): Likewise.
398 (for_each_template_parm): Likewise.
399 * decl.c (check_default_argument): Call
400 cp_walk_tree_without_duplicates.
401 * except.c (build_throw): Likewise.
402 * decl2.c (type_visibility): Likewise.
403 * semantics.c (expand_or_defer_fn): Likewise.
404 (finalize_nrv): Call cp_walk_tree.
406 2007-08-20 Jakub Jelinek <jakub@redhat.com>
409 * init.c (build_new_1): Rename placement_var variable to placement_expr.
410 Initialize it with save_expr rather than get_temp_regvar.
412 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
415 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
418 2007-08-17 Ollie Wild <aaw@google.com>
421 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
422 declarations into appropriate slots for comparison. Fix type
425 2007-08-17 Paolo Carlini <pcarlini@suse.de>
428 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
429 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
431 2007-08-17 Paolo Carlini <pcarlini@suse.de>
434 * parser.c (cp_parser_class_head): Improve error message.
436 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
438 * pt.c (instantiate_decl): Set input_location
439 for the function end.
441 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
443 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
445 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
446 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
447 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
448 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
449 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
450 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
451 * typeck.c (cp_type_quals): Likewise.
452 * typeck2.c (cxx_incomplete_type_diagnostic,
453 cxx_incomplete_type_error): Likewise.
455 2007-08-16 Paolo Carlini <pcarlini@suse.de>
458 * pt.c (tsubst_friend_function): When check_classfn
459 returns error_mark_node likewise return it.
461 2007-08-15 Jakub Jelinek <jakub@redhat.com>
464 * typeck.c (check_return_expr): Don't NRV optimize vars in
466 * decl.c (finish_function): Comment fix.
468 2007-08-15 Paolo Carlini <pcarlini@suse.de>
471 * pt.c (push_template_decl_real): Depending on TYPE_P
472 use either TYPE_CONTEXT or DECL_CONTEXT.
474 2007-08-14 Mark Mitchell <mark@codesourcery.com>
476 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
477 constructors and destructors return this.
479 2007-08-14 Paolo Carlini <pcarlini@suse.de>
482 * decl2.c (check_classfn): Return error_mark_node in case of error;
483 in that case, do not call add_method.
484 * decl.c (start_decl): Deal with check_classfn returning
486 (grokfndecl): Likewise.
487 * pt.c (tsubst_friend_function): Likewise.
489 2007-08-14 Andrew Pinski <pinskia@gmail.com>
492 * typeck.c (build_binary_op): Disallow vector float types with
493 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
495 2007-08-11 Ian Lance Taylor <iant@google.com>
497 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
499 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
501 2007-08-10 Ollie Wild <aaw@google.com>
503 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
505 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
507 (unqualified_namespace_lookup): Fix ambiguous_decl call.
508 (lookup_using_namespace): Fix ambiguous_decl call.
509 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
511 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
513 * call.c (name_as_c_string): Use CONST_CAST.
514 * decl.c (build_decl): Likewise.
515 * parser.c (cp_parser_string_literal): Likewise.
517 2007-08-10 Paolo Carlini <pcarlini@suse.de>
520 * error.c (dump_expr): Consistently use the *_cxx_*
521 variants of the pretty-print functions.
523 2007-08-10 Paolo Carlini <pcarlini@suse.de>
526 * decl.c (check_special_function_return_type): Just error
527 on return type specified for conversion operator.
529 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
531 * typeck2.c (readonly_error): Handle general expressions.
532 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
534 2007-08-06 Dan Hipschman <dsh@google.com>
536 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
537 access function name.
539 2007-08-04 Alfred Minarik <a.minarik@aon.at>
542 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
543 * g++spec.c (lang_specific_driver): Check them.
545 2007-08-06 Paolo Carlini <pcarlini@suse.de>
548 * pt.c (inline_needs_template_parms): Fix comment; change return type
551 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
554 2007-03-26 Dirk Mueller <dmueller@suse.de>
556 * parser.c (cp_parser_member_declaration): Pedwarn
557 about stray semicolons after member declarations.
559 2007-08-02 Lee Millward <lee.millward@gmail.com>
564 * parser.c (cp_parser_asm_definition): Detect and discard asm
565 statements with invalid inputs or outputs.
566 (cp_parser_asm_operand_list): Return error mark node if any
567 of the operands are invalid. Adjust documentation.
569 2007-08-02 Nick Clifton <nickc@redhat.com>
571 * typeck.c: Change copyright header to refer to version 3 of the
572 GNU General Public License and to point readers at the COPYING3
573 file and the FSF's license web page.
574 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
575 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
576 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
577 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
578 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
579 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
580 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
581 name-lookup.h, parser.c: Likewise.
583 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
586 * call.c (magic_varargs_p): Honor the "type generic" attribute.
588 2007-07-30 Paolo Carlini <pcarlini@suse.de>
591 * semantics.c (finish_label_stmt): Reject the __label__
592 extension outside function scopes.
594 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
596 * parser.c (eof_token): Un-constify.
597 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
598 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
601 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
603 * pt.c, tree.c, typeck2.c: Fix comment typos.
605 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
606 Mark Mitchell <mark@codesourcery.com>
609 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
610 hidden due to friend declarations in local classes.
612 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
614 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
615 * cp-tree.def (DECLTYPE_TYPE): New.
616 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
617 (dump_type_prefix): Ditto.
618 (dump_type_suffix): Ditto.
619 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
620 * mangle.c (write_type): Handle DECLTYPE_TYPE.
621 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
623 (DECLTYPE_TYPE_EXPR): New.
624 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
625 (finish_declared_type): Declare.
626 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
628 (pp_cxx_type_id): Ditto.
629 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
630 (tsubst): Substitute into a DECLTYPE_TYPE node.
631 (tsubst_copy): Ditto.
632 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
634 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
635 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
636 structural equality (because we can't hash the expressions).
637 (finish_declared_type): New.
638 * lex.c (reswords): Add "decltype" keyword.
639 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
640 (cp_parser_postfix_expression): Add member_access_only_p to
641 restrict postfix expression to member access expressions.
642 (cp_parser_unary_expression): Update call to
643 cp_parser_postfix_expression to reflect new parameter.
644 (cp_parser_declared_type): New.
645 (cp_parser_simple_type_specifier): Parse decltype types.
647 2007-07-27 Mark Mitchell <mark@codesourcery.com>
650 * call.c (convert_for_arg_passing): Only widen bitfields to their
651 declared types if necessary.
653 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
655 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
658 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
660 * decl.c (typename_hash, typename_compare): Constify.
661 * mangle.c (hash_type, compare_type): Likewise.
662 * pt.c (eq_local_specializations, hash_local_specialization):
664 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
665 list_hash): Likewise.
666 * typeck2.c (pat_compare): Likewise.
668 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
670 * method.c (implicitly_declare_fn): Increase alignment if member
671 function pointer format requires it.
673 2007-07-24 Paolo Carlini <pcarlini@suse.de>
676 * typeck.c (check_return_expr): Do not pass a null argument
679 2007-07-24 Paolo Carlini <pcarlini@suse.de>
682 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
685 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
688 * typeck.c (convert_arguments): Only use default args if we have
692 * typeck.c (structural_comptypes): No need to check
693 resolve_typename_type return value here.
694 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
695 * pt.c (resolve_typename_type): Follow typename typedefs. Return
696 original type rather than error_mark_node in case of failure.
697 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
698 resolve_typename_type result check.
699 (cp_parser_direct_declarator, cp_parser_head,
700 cp_parser_constructor_declarator_p): Likewise.
702 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
704 * pt.c (template_parms_variadic_p): Remove.
705 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
707 2007-07-12 Jakub Jelinek <jakub@redhat.com>
710 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
711 argument to dump_aggr_init_expr_args instead of false.
713 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
715 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
716 canonical types; otherwise, fall back to structural type
717 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
718 internal compiler error if the canonical types are wrong.
720 2007-07-11 Paolo Carlini <pcarlini@suse.de>
723 * parser.c (cp_parser_make_indirect_declarator): When the
724 the code argument is ERROR_MARK return cp_error_declarator.
726 2007-07-09 Geoffrey Keating <geoffk@apple.com>
729 * decl.c (cxx_init_decl_processing): Don't set
730 force_align_functions_log.
731 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
732 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
733 FUNCTION_DECL, return its alignment.
735 2007-07-09 Richard Guenther <rguenther@suse.de>
737 * decl.c (start_preparsed_function): Do not promote return type.
739 2007-07-08 Paolo Carlini <pcarlini@suse.de>
742 * pt.c (unify): Never pass error_mark_node to template_decl_level.
744 2007-07-07 Mark Mitchell <mark@codesourcery.com>
747 * pt.c (resolve_overloaded_unification): Robustify. Return a
749 (type_unification_real): Adjust accordingly.
751 2007-07-06 Richard Guenther <rguenther@suse.de>
753 * init.c (build_new_1): Use the correct pointer type.
754 * typeck2.c (build_m_component_ref): Likewise.
756 2007-07-05 Mark Mitchell <mark@codesourcery.com>
759 * init.c (build_zero_init): Always build an initializer for
761 * typeck2.c (build_functional_cast): Use build_zero_init.
764 * init.c (build_new_1): Always pass the allocation function to
765 build_op_delete_call.
766 * call.c (build_op_delete_call): Handle operator delete with a
767 variable-argument list. Do not issue an error when no matching
768 deallocation function is available for a new operator.
771 * cp-tree.h (any_value_dependent_elements_p): Declare it.
772 * decl.c (value_dependent_init_p): New function.
773 (cp_finish_decl): Use it.
774 * pt.c (value_dependent_expression_p): Use
775 any_value_dependent_elements_p.
776 * parser.c (cp_parser_primary_expression): Add comment about
777 treating dependent qualified names as integral
778 constant-expressions.
780 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
782 * decl.c (build_ptrmemfunc_type): Always use structural equality
783 tests when comparing pointer-to-member-function types, because the
784 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
787 2007-07-03 Mark Mitchell <mark@codesourcery.com>
789 * init.c (build_new): Tweak comment.
791 2007-06-29 Dave Brolley <brolley@redhat.com>
794 * parser.c (cp_parser_new_type_id): Don't reduce a named array
795 type to its base type and number of elements here.
796 * init.c (build_new): Call complete_type_or_else to ensure that the
797 type is complete and to issue a diagnostic if it is not.
798 (build_new_1): Don't call complete_type_or_else here.
800 2007-07-03 Richard Guenther <rguenther@suse.de>
803 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
806 2007-07-02 Simon Baldwin <simonb@google.com>
808 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
809 for inner-style nested forward declarations that don't declare
812 2007-07-02 Jakub Jelinek <jakub@redhat.com>
815 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
816 DECL_P in not a variable and appears more than once error messages.
818 2007-07-01 Ollie Wild <aaw@google.com>
820 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
821 (select_decl): Remove function.
822 (unqualified_namespace_lookup): Populate binding by calling
823 ambiguous_decl. Remove select_decl call.
824 (lookup_qualified_name): Remove select_decl call.
825 * decl.c (lookup_and_check_tag): Check for ambiguous references.
826 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
827 generation when name lookup is ambiguous.
829 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
832 * init.c (build_new_1): Use structural equality on the copy of the
835 2007-06-28 Geoffrey Keating <geoffk@apple.com>
837 * decl2.c (determine_visibility): Implement
838 flag_visibility_ms_compat effect on type info.
839 * decl.c (cxx_init_decl_processing): Implement
840 global effect of flag_visibility_ms_compat.
842 2007-06-28 Geoffrey Keating <geoffk@apple.com>
844 * decl2.c (start_objects): Mark constructor-running function
847 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
850 * decl.c (grokdeclarator): Reset friendp for member functions declared
851 friend of their own class.
853 2007-06-23 Mark Mitchell <mark@codesourcery.com>
855 * decl2.c (determine_visibility): Don't look for dllexport here.
856 (determine_visibility_from_class): Tidy.
858 2007-06-18 Simon Baldwin <simonb@google.com>
861 * parser.c (cp_parser_single_declaration): Added check for storage
862 class other than sc_none in parsed declaration, and a flag to indicate
863 if the call is part of an explicit template specialization parse.
864 * (cp_parser_explicit_specialization): Specialization check flag added
865 to call to cp_parser_single_declaration(), set true.
866 * (cp_parser_template_declaration_after_export): Specialization check
867 flag added to call to cp_parser_single_declaration(), set false.
868 * pt.c (check_explicit_specialization): Added code to copy visiblity
869 and linkage from the templated function to the explicit specialization.
871 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
873 * typeck.c (build_binary_op): For templates build the
874 expression in pieces to avoid the assert in build2_stat.
875 (get_member_function_from_ptrfunc):
876 Change over to using POINTER_PLUS_EXPR and convert
877 the second operand to sizetype.
878 * typeck2.c (build_m_component_ref): Likewise.
879 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
880 instead of PLUS_EXPR for pointers.
881 (build_new_1): Likewise.
882 (build_vec_delete_1): Likewise.
883 (build_vec_delete): Likewise.
884 * class.c (build_base_path): Likewise.
885 (build_base_path): Likewise.
886 (convert_to_base_statically): Likewise.
887 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
888 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
889 instead of PLUS_EXPR.
890 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
891 instead of PLUS_EXPR for pointers.
892 * call.c (build_special_member_call): Likewise.
893 * rtti.c (build_headof): Likewise.
894 Use sizetype instead of ptrdiff_type_node.
895 (tinfo_base_init): Create a POINTER_PLUS_EXPR
896 instead of PLUS_EXPR for pointers.
897 * except.c (expand_start_catch_block): Do a
898 NEGATIVE and then a POINTER_PLUS_EXPR instead
900 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
901 PLUS_EXPR on pointer types over to use
902 POINTER_PLUS_EXPR and remove the conversion
903 to the pointer types.
904 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
905 adding to a pointer type. Use size_int instead of
906 ssize_int. Convert the index to sizetype before
907 adding it to the pointer.
909 2007-06-15 Mark Mitchell <mark@codesourcery.com>
911 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
912 (DECL_ANON_UNION_VAR_P): New macro.
913 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
914 than DECL_VAR_MARKED_P, to keep track of which variables we have
916 * decl.c (redeclaration_error_message): Complain about redeclaring
917 anonymous union members at namespace scope.
918 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
920 2007-06-14 Geoff Keating <geoffk@apple.com>
922 * decl2.c (determine_visibility): Ensure that functions with
923 hidden types as parameters are hidden.
926 * decl2.c (determine_visibility): Remove duplicate code for
929 2007-06-12 Ian Lance Taylor <iant@google.com>
932 * init.c (avoid_placement_new_aliasing): New static function.
933 (build_new_1): Call it.
935 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
937 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
938 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
940 2007-06-08 Jakub Jelinek <jakub@redhat.com>
943 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
944 on init, the non-decl cond operand and increment value.
946 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
949 * decl.c (check_initializer): Report an error when a brace enclosed
950 initializer is used for a non-aggregate type in C++98.
951 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
953 (grokdeclarator): Likewise.
954 (move_fn_p): Likewise.
955 * typeck.c (check_return_expr): Likewise.
956 * call.c (reference_binding): Likewise.
957 * error.c (cp_cpp_error): Likewise.
958 * pt.c (check_default_tmpl_args): Likewise.
960 * lex.c (init_reswords): Likewise.
961 * parser.c (p_parser_primary_expression): Likewise.
962 (TOKEN_PRECEDENCE): Likewise.
963 (cp_parser_init_declarator): Likewise.
964 (cp_parser_ptr_operator): Likewise.
965 (cp_parser_parameter_declaration): Likewise.
966 (cp_parser_enclosed_template_argument_list): Likewise.
967 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
968 (cp_parser_next_token_ends_template_argument_p): Likewise.
970 2007-06-04 Simon Baldwin <simonb@google.com>
972 * decl.c (grokdeclarator): Readability change. Moved case labels
973 into direct switch statement scope.
975 2007-06-04 Paolo Carlini <pcarlini@suse.de>
977 * call.c (convert_like_real): Remove pointless code.
979 2007-05-31 Mark Mitchell <mark@codesourcery.com>
981 * decl.c (get_atexit_fn_ptr_type): New function.
982 (get_atexit_node): Use it.
983 (start_cleanup_fn): Likewise.
984 (register_dtor_fn): Use the object's destructor, instead of a
985 separate cleanup function, where possible.
986 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
987 (atexit_fn_ptr_type_node): New macro.
988 * decl2.c (build_cleanup): Use build_address.
990 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
992 * typeck.c (build_binary_op): Include types in error.
994 2007-05-31 Jakub Jelinek <jakub@redhat.com>
997 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
998 needs runtime initialization.
1000 2007-05-31 Paolo Carlini <pcarlini@suse.de>
1003 * semantics.c (finish_trait_expr): Complete the types.
1005 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
1006 Douglas Gregor <doug.gregor@gmail.com>
1007 Pedro Lamarao <pedro.lamarao@mndfck.org>
1008 Howard Hinnant <howard.hinnant@gmail.com>
1012 * typeck.c (comptypes): Don't consider rvalue and lvalue
1013 reference types to be equivalent.
1014 (check_return_expr): Move from certain lvalues when returning
1016 * decl.c (grokdeclarator): Implement reference collapsing.
1017 (copy_fn_p): Don't consider constructors taking rvalue references
1018 to be copy constructors.
1020 * call.c (conversion): New "rvaluedness_matches_p" member.
1021 (convert_class_to_reference): Require reference type as first
1022 parameter instead of base type.
1023 (reference_binding): Add logic to handle rvalue references.
1024 (implicit_conversion): Update inaccurate comment.
1025 (convert_like_real): Disable creation of temporaries that are
1026 impossible to initialize for types with move constructors.
1027 (build_over_call): Elide move constructors when possible.
1028 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1029 (maybe_handle_ref_bind): Return conversion instead of type node.
1030 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1031 determine preferred conversion sequences.
1032 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1033 (LOOKUP_PREFER_RVALUE): New.
1034 (DECL_MOVE_CONSTRUCTOR_P): New.
1035 (struct cp_declarator): Add "reference" member for reference
1036 types, with new "rvalue_ref" flag.
1037 (cp_build_reference_type): Declare.
1038 (move_fn_p): Declare.
1039 * error.c (dump_type_prefix): Format rvalue reference types
1040 correctly in error messages.
1041 * except.c (build_throw): Move from certain lvalues when
1043 * mangle.c (write_type): Mangle rvalue references differently
1044 than regular references.
1045 * parser.c (make_reference_declarator): Add boolean parameter for
1047 (cp_parser_make_indirect_declarator): New.
1048 (cp_parser_new_declarator_opt): Call
1049 cp_parser_make_indirect_declarator.
1050 (cp_parser_conversion_declarator_opt): Ditto.
1051 (cp_parser_declarator): Ditto.
1052 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1054 * pt.c (tsubst): Implement reference collapsing.
1055 (maybe_adjust_types_for_deduction): Implement special template
1056 parameter deduction rule for rvalue references.
1057 (type_unification_real): Update calls to
1058 maybe_adjust_types_for_deduction.
1059 (try_one_overload): Ditto.
1060 (unify_pack_expansion): Ditto.
1061 * tree.c (lvalue_p_1): Handle rvalue reference types.
1062 (cp_build_reference_type): New.
1064 2007-05-30 Jakub Jelinek <jakub@redhat.com>
1067 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1068 variables that need runtime initialization.
1070 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
1073 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1074 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1075 case POSTDECREMENT_EXPR>): Return the error_mark_node
1076 if either the real or imaginary parts would an
1079 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
1080 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1083 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1084 token is a closing brace, false if there are no tokens left.
1085 (cp_parser_namespace_alias_definition): Only consume the next token if
1086 it is a closing brace.
1088 * parser.c (cp_parser_class_specifier): Likewise.
1090 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
1092 * semantics.c (finish_member_declaration): Fix a typo in the
1095 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
1107 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1108 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1109 * pt.c (check_for_bare_parameter_packs): Return bool indicated
1110 whether everything was okay. Fix indentation.
1111 (push_template_decl_real): Check for bare parameter packs in
1112 function parameters; where errors occur, mark the parameter types
1113 with ERROR_MARK_NODEs to avert ICEs.
1114 (coerce_template_parameter_pack): New.
1115 (coerce_template_parms): Moved parameter pack coercion into
1116 coerce_template_parameter_pack, and permit it anywhere in the
1117 template parameter list (not just at the end). Parameter and
1118 argument indices can vary (somewhat) separately now, so add
1119 PARM_IDX and ARG_IDX.
1120 (fn_type_unification): Don't set an argument pack as incomplete if
1121 no argument pack was deduced.
1122 (type_unification_real): If a type parameter is a parameter pack
1123 and has not otherwise been deduced, it will be deduced to an empty
1125 (more_specialized_fn): Use the actual lengths of the argument
1126 lists when comparing against expansions.
1127 * semantics.c (finish_member_declaration): If a field's type has
1128 bare parameter packs, error and set its type to ERROR_MARK_NODE.
1130 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
1133 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1135 2007-05-22 Ollie Wild <aaw@google.com>
1137 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1138 (unqualified_namespace_lookup): Adds check for hidden types.
1140 2007-05-22 Ollie Wild <aaw@google.com>
1142 * decl.c (duplicate_decls): Verify namespace names are unique.
1144 2007-05-21 Mark Mitchell <mark@codesourcery.com>
1146 * decl.c (cxx_maybe_build_cleanup): Handle
1147 __attribute__((cleanup)).
1149 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1151 * cvt.c (cp_convert_and_check): Don't check warnings if the
1154 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1156 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1158 2007-05-14 Paolo Carlini <pcarlini@suse.de>
1161 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1162 type only if is a class type (5.2.8/4).
1164 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1166 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1167 * decl.c (grokdeclarator): Use unsigned_type_for instead of
1168 c_common_unsigned_type.
1170 2007-05-11 Silvius Rus <rus@google.com>
1172 * cp/typeck.c (build_indirect_ref): Add call to
1173 strict_aliasing_warning.
1174 (build_reinterpret_cast_1): Condition call to
1175 strict_aliasing_warning.
1177 2007-05-11 Jan Hubicka <jh@suse.cz>
1179 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1180 * decl2.c (start_objects): ctors and dtors are no longer public.
1181 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1183 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
1185 * typeck.c (build_unary_op): Remove code that used to
1186 handle non lvalue increments/decrements.
1188 2007-05-07 Mike Stump <mrs@apple.com>
1190 * parser.c (check_empty_body): Add.
1191 (cp_parser_iteration_statement): Add call to check_empty_body.
1193 2007-05-05 Geoffrey Keating <geoffk@apple.com>
1196 * mangle.c (write_mangled_name): Mangle static variable names.
1197 (write_unqualified_name): Use local-source-name for
1198 namespace-scope static variables.
1200 2007-05-04 Dirk Mueller <dmueller@suse.de>
1202 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1205 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
1208 * decl2.c (constrain_class_visibility):
1209 Use strip_pointer_or_array_types instead of strip_array_types.
1211 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1214 * decl.c (reshape_init_r): Don't reshape the first element if it
1215 is a pointer to member function.
1217 2007-04-27 Simon Baldwin <simonb@google.com>
1219 * decl.c (grokparms): Changed message format from %qD to %qE.
1221 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
1223 * error.c (maybe_warn_variadic_templates): Variadic templates are
1224 now in C++0x, so only warn about them in C++98 mode.
1226 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
1229 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1230 integeral types from vectors types.
1232 2007-04-26 Jakub Jelinek <jakub@redhat.com>
1235 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1236 for type dependent OMP_CLAUSE_DECLs.
1238 2007-04-24 Mark Mitchell <mark@codesourcery.com>
1241 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1242 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1243 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1244 * init.c (build_zero_init): Adjust, as
1245 COMPLEX_TYPE is now a SCALAR_TYPE.
1246 * typeck2.c (digest_init): Allow brace-enclosed initializers for
1247 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1249 2007-04-25 Paolo Carlini <pcarlini@suse.de>
1251 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1252 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1253 (trait_expr_value): Adjust.
1255 2007-04-23 Simon Baldwin <simonb@google.com>
1257 * decl.c (grokparms): Added new error for duplicate function
1258 parameters names in function prototypes, to match gcc behavior.
1260 2007-04-23 Jan Hubicka <jh@suse.cz>
1262 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1265 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1267 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1268 instead of checking GIMPLE_STMT_P in chain_next.
1270 2007-04-17 Mark Mitchell <mark@codesourcery.com>
1273 * call.c (convert_for_arg_passing): Convert bitfields to their
1276 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
1279 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1281 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
1284 * cp/decl2.c (constrain_class_visibility):
1285 Do not warn about the use of anonymous namespace in the main input file.
1287 2007-04-15 Mark Mitchell <mark@codesourcery.com>
1289 * cp-tree.h (current_template_parms): Fix typo in comment.
1291 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1293 * cp-tree.h, error.c: Fix comment typos.
1295 2007-04-13 Jason Merrill <jason@redhat.com>
1298 * call.c (reference_binding): Add c_cast_p parm. If true,
1299 add quals to TO as needed to make it reference-compatible.
1301 2007-04-11 Jan Hubicka <jh@suse.cz>
1303 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1304 that we are not processing template_decl.
1306 2007-04-09 Mark Mitchell <mark@codesourcery.com>
1309 * class.c (build_base_path): Ensure that the converted pointer has
1310 the same cv-qualification as the input.
1312 2007-04-09 Paolo Carlini <pcarlini@suse.de>
1314 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1316 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
1318 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1320 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1321 * tree.c (cp_add_pending_fn_decls): Remove.
1322 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1324 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
1326 Revert change removing staticp.
1328 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
1330 * cp-objcp-common.c (cxx_staticp): Remove.
1331 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1332 * cp-tree.h (cxx_staticp):
1334 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1336 * class.c (check_for_override): Don't remove dllmport attribute
1339 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1342 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1343 type issue error and return early.
1345 2007-03-30 Jason Merrill <jason@redhat.com>
1348 * typeck.c (cp_type_readonly): New fn.
1349 * cp-tree.h: Declare it.
1350 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1351 (cp_finish_decl): Not here.
1353 2007-03-31 Richard Guenther <rguenther@suse.de>
1355 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1358 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1363 * parser.c (declarator_can_be_parameter_pack): New.
1364 (cp_parser_template_parameter): Only parse the `...' if the
1365 declarator can be a parameter pack.
1366 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1368 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1369 types (they could be used as array bounds).
1370 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1371 (tsubst_pack_expansion): Handle failure to expand parameter
1374 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1377 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1378 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1379 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1380 (CLASS_TYPE_NON_UNION_P): Add.
1381 (struct lang_type_class): Add has_complex_dflt.
1382 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1383 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1384 * cp-tree.def: Add TRAIT_EXPR.
1385 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1386 * lex.c (struct resword): Add __has_nothrow_assign,
1387 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1388 __has_trivial_constructor, __has_trivial_copy,
1389 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1390 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1391 __is_pod, __is_polymorphic, __is_union.
1392 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1393 (cp_parser_trait_expr): New.
1394 * semantics.c (finish_trait_expr, trait_expr_value
1395 classtype_has_nothrow_copy_or_assign_p): New.
1396 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1398 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1399 * class.c (check_bases, check_field_decl, check_bases_and_members):
1400 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1401 * pt.c (uses_template_parms, tsubst_copy_and_build,
1402 value_dependent_expression_p, type_dependent_expression_p): Deal with
1404 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1406 2007-03-29 Richard Guenther <rguenther@suse.de>
1408 * tree.c (cp_walk_subtrees): Do not set input_location.
1410 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1413 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1416 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1418 * parser.c (struct cp_parser): Update comment for
1419 greater_than_is_operator_p.
1420 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1421 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1422 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1423 !GREATER_THAN_IS_OPERATOR_P.
1424 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1425 `>>' operators that will become two `>' tokens in C++0x.
1426 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1427 mode, allowing it to terminate default arguments.
1428 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1429 `>>' like two consecutive `>' tokens.
1430 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1431 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1432 ends a template argument.
1434 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1436 * decl.c (redeclaration_error_message): Complain when redeclaring
1437 a friend function with default template arguments (C++0x mode only).
1438 * cp-tree.h (check_default_tmpl_args): Declare.
1439 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1440 template arguments in function templates. Add support for checking
1441 the default template arguments of friend templates.
1442 (push_template_decl_real): Fix call to check_default_tmpl_args.
1443 (type_unification_real): If a template parameter has not been
1444 deduced but provides a default template argument, substitute into
1445 that default template argument.
1446 * parser.c (cp_parser_init_declarator): When declaring (but not
1447 defining!) a function template in C++0x mode, check for default
1450 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1453 * decl.c (grokdeclarator): Deal with cv-qualified function type
1454 typedefs in the same way for member and non-member functions.
1456 2007-03-26 Dirk Mueller <dmueller@suse.de>
1458 * parser.c (cp_parser_member_declaration): Pedwarn
1459 about stray semicolons after member declarations.
1461 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1464 * pt.c (instantiate_decl): Set in_system_header.
1466 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1468 * cp-tree.h (current_tempalte_parms): Improve documentation.
1469 * pt.c (current_template_args): Likewise.
1472 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1473 not consume tokens when failing.
1475 2007-03-22 Jim Wilson <wilson@specifix.com>
1476 Mark Mitchell <mark@codesourcery.com>
1479 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1480 consistent with FROM.
1482 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1484 * error.c (dump_expr): Handle dependent names that designate types.
1485 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1487 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1489 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1491 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1493 * cvt.c (cp_convert_and_check) : Define.
1494 * cp-tree.h (cp_convert_and_check): Declare.
1495 * call.c (convert_conversion_warnings): Rename to
1496 conversion_null_warnings. The warning for floating-point to
1497 integer is handled by convert_and_check in convert_like_real.
1498 (convert_like_real): convert_conversion_warnings was renamed as
1499 conversion_null_warnings.
1500 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1501 overflow and changes of value during conversion.
1503 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1506 * parser.c (cp_parser_statement): If 'namespace' is found, this
1507 only can be a namespace alias definition, so parse it now.
1508 (cp_parser_namespace_alias_definition): if we find an open brace
1509 instead of '=', then this is actually a misplaced namespace
1512 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1515 * decl.c (cxx_init_decl_processing): Move command-line options
1516 processing to c-opts.c.
1518 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1520 * ptree.c (cxx_print_type): Use formatting markup for integers
1521 when printing template parameter index/level/orig level.
1522 (cxx_print_xnode): Ditto.
1523 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1524 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1525 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1527 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1528 rather than a HOST_WIDE_INT.
1529 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1530 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1532 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1533 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1534 IN_BASE_INITIALIZER bool bitfields.
1535 (struct cp_declarator): Make KIND a 4-bit field. Make
1536 PARAMETER_PACK_P a bool bitfield just after KIND.
1537 * pt.c (uses_parameter_packs): Destroy the pointer set.
1538 (make_pack_expansion): Ditto.
1539 (check_for_bare_parameter_packs): Ditto.
1540 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1542 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1545 * call.c (convert_default_arg): Instead of copying the node,
1548 2007-03-15 Dirk Mueller <dmueller@suse.de>
1551 * call.c (convert_conversion_warnings): New..
1552 (convert_like_real): .. factored out from here.
1553 (convert_conversion_warnings): Add warning about
1554 false being converted to NULL in argument passing.
1556 2007-03-14 Dirk Mueller <dmueller@suse.de>
1558 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1559 (finish_do_body): Warn about empty body in do/while statement.
1561 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1563 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1565 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1568 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1571 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1573 * cp/repo.c (init_repo): Initialize random_seed saved options.
1574 (finish_repo): Adjust.
1576 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1579 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1582 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1584 * decl.c (compute_array_index_type): New warning flag warn_vla.
1586 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1589 * call.c (convert_default_arg): Copy non-constant arguments.
1591 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1594 * parser.c (cp_parser_postfix_expression): Disallow compound
1595 literals in constant expressions.
1598 * semantics.c (finish_typeof): Use unlowered_expr_type.
1600 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1603 * cp-tree.h (unlowered_expr_type): New function.
1604 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1605 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1606 (unlowered_expr_type): New function.
1607 (build_unary_op): Disallow predecrements of bool bitfields.
1608 * call.c (build_conditional_expr): Use unlowered_expr_type.
1609 * pt.c (type_unification_real): Likewise.
1611 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1614 * typeck.c (check_return_expr): Check for bare parameter packs.
1615 (comptypes): Compare template parameter packs and
1616 type pack expansions.
1617 * decl.c (grokdeclarator): Deal with the declaration of function
1619 (grokparms): Verify that the (optional) function parameter pack is
1620 at the end of the parameter list.
1621 (xref_basetypes): Handle pack expansions in the base class.
1622 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1623 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1624 (NONTYPE_ARGUMENT_PACK): New.
1625 (TYPE_PACK_EXPANSION): New.
1626 (EXPR_PACK_EXPANSION): New.
1627 (ARGUMENT_PACK_SELECT): New.
1628 * cp-objcp-common.c (cp_tree_size): Compute size of
1629 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1630 ARGUMENT_PACK_SELECT.
1631 * error.c (dump_template_argument): Print template argument packs.
1632 (dump_template_argument_list): Ditto.
1633 (dump_template_parameter): Dump `...' for template type parameter
1635 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1636 (dump_parameters): Print function parameter packs.
1637 (dump_template_parms): Print template argument packs.
1638 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1639 (maybe_warn_variadic_templates): New.
1640 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1641 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1642 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1644 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1645 (write_template_arg): Write argument packs as separate arguments.
1646 * cp-tree.h (struct template_parm_index_s): Add flag that
1647 indicates that the template parameter is actually a parameter
1649 (struct tree_argument_pack_select): New.
1650 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1651 (union lang_tree_node): Add argument_pack_select.
1652 (FUNCTION_PARAMETER_PACK_P): New.
1653 (PACK_EXPANSION_P): New.
1654 (PACK_EXPANSION_PATTERN): New.
1655 (SET_PACK_EXPANSION_PATTERN): New.
1656 (PACK_EXPANSION_PARAMETER_PACKS): New.
1657 (ARGUMENT_PACK_P): New.
1658 (ARGUMENT_PACK_ARGS): New.
1659 (SET_ARGUMENT_PACK_ARGS): New.
1660 (ARGUMENT_PACK_INCOMPLETE_P): New.
1661 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1662 (TEMPLATE_PARM_PARAMETER_PACK): New.
1663 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1664 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1665 (ARGUMENT_PACK_SELECT_INDEX): New.
1666 (ARGUMENT_PACK_SELECT_ARG): New.
1667 (struct cp_declarator): Add parameter_pack_p flag.
1668 (maybe_warn_variadic_templates): Declare.
1669 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1670 indicate a template parameter pack.
1671 (uses_parameter_packs): Declare.
1672 (template_parameter_pack_p): Declare.
1673 (template_parms_variadic_p): Declare.
1674 (make_pack_expansion): Declare.
1675 (check_for_bare_parameter_packs): Declare.
1676 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1677 sizeof... expressions.
1678 (pp_cxx_expression): Print pack expansions and non-type argument
1680 (pp_cxx_exception_specification): Print pack expansions.
1681 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1682 (pp_cxx_ctor_initializer): Print pack expansions.
1683 (pp_cxx_type_id): Print pack expansions.
1684 (pp_cxx_template_argument_list): Print argument packs.
1685 (pp_cxx_template_parameter): Print ellipsis for template parameter
1687 * pt.c (comp_template_parms): Compare template parameter packs.
1688 (template_parameter_pack_p): New.
1689 (template_parms_variadic_p): New.
1690 (template_args_variadic_p): New.
1691 (make_ith_pack_parameter_name): New.
1692 (struct find_parameter_pack_data): New.
1693 (find_parameter_packs_r): New.
1694 (uses_parameter_packs): New.
1695 (make_pack_expansion): New.
1696 (check_for_bare_parameter_packs): New.
1697 (expand_template_argument_pack): New.
1698 (reduce_template_parm_level): Propagate parameter pack flag.
1699 (process_template_parm): Add is_parameter_pack parameter to state
1700 when the parameter is actually a parameter pack. Create template
1701 parameter packs when is_parameter_pack is true.
1702 (current_template_args): The argument for a template parameter
1703 pack is an argument pack containing a single pack expansion.
1704 (process_partial_specialization): When checking that non-type
1705 argument expressions do not involve template parameters, loop over
1706 the arguments in argument packs separately.
1707 (push_template_decl_real): Check that the type of the declaration
1708 does not have any bare parameter packs. Check that primary
1709 templates have no more than one parameter pack, and that it comes
1710 at the end of the template parameter list.
1711 (convert_template_argument): Handle coercions for pack expansion
1712 expressions by coercing the pattern then rebuilding the expansion.
1713 (coerce_template_parms): When coercing the arguments for a
1714 variadic template, pack "extra" arguments into an argument pack.
1715 (coerce_template_template_parms): Cannot coerce between parameter
1716 packs and non-pack parameters.
1717 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1718 (comp_template_args): Expand all template arguments packs before
1719 comparing template argument lists.
1720 (mangle_class_name_for_template): Make argument packs as separate
1722 (for_each_template_parm_r): No need to handle BASELINK.
1723 (instantiate_class_template): Handle pack expansions in the base
1725 (tsubst_pack_expansion): New.
1726 (tsubst_template_args): Handle substitutions of argument packs and
1727 pack expansion into template argument lists.
1728 (tsubst_decl): Expand function parameter packs into separate
1729 function parameters.
1730 (tsubst_arg_types): Expand a type pack expansion into separate
1732 (tsubst_exception_specification): Handle pack expansions in
1733 exception specifiers.
1734 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1735 replacing a template parameter with its argument. If we encounter
1736 a substitution for an argument pack, just return the parameter
1738 (tsubst_copy): sizeof(X...) returns the number of elements in
1739 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1740 PARM_DECL is a parameter pack.
1741 (tsubst_expr): Expression pack expansions and argument packs
1742 cannot show up here; they will all be handled through function
1743 calls, sizeof, and template argument lists.
1744 (tsubst_copy_and_build): sizeof(X...) returns the number of
1745 elements in parameter pack X. Handle pack expansions in TREE_LIST
1746 and CONSTRUCTOR nodes.
1747 (fn_type_unification): Handle "incomplete" explicit template
1748 argument lists that specify some of the arguments for a template
1750 (type_unification_real): Unify arguments against pack expansions.
1751 (template_parm_level_and_index): New, helper function.
1752 (unify_pack_expansion): New.
1753 (unify): Unify argument packs on an argument-by-argument basis,
1754 handling variadic argument packs as well.
1755 (more_specialized_fn): Handle unification of function parameter
1756 packs. All things being equal, prefer non-variadic function
1757 templates to variadic function templates.
1758 (more_specialized_class): Prefer the variadic class template
1759 partial specialization that binds fewer arguments to a parameter
1761 (regenerate_decl_from_template): Expand function parameter packs
1762 into separate parameters.
1763 (instantiate_decl): Ditto.
1764 (tsubst_initializer_list): Handle pack expansions for base-class
1766 (dependent_type_p_r): Determine dependent types in argument packs
1767 and pack expansions.
1768 (value_dependent_expression_p): Determine value-dependence of
1769 non-type argument packs.
1770 (dependent_template_arg_p): Handle argument packs.
1771 * semantics.c (finish_cond): Check for bare parameter packs.
1772 (finish_expr_stmt): Ditto.
1773 (finish_for_expr): Ditto.
1774 (finish_switch_cond): Ditto.
1775 (finish_mem_initializers): Ditto.
1776 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1778 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1779 * parser.c (make_declarator): Declarator is not an expansion.
1780 (make_pointer_declarator): Transfer parameter pack flag to outer
1782 (make_reference_declarator): Ditto.
1783 (make_ptrmem_declarator): Ditto.
1784 (make_call_declarator): Ditto.
1785 (make_array_declarator): Ditto.
1786 (cp_parser_postfix_expression): Allow pack expansion expressions
1787 in the argument list for a call expression.
1788 (cp_parser_parenthesized_expression_list): Add new parameter
1789 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1790 into separate arguments."
1791 (cp_parser_new_placement): Allow pack expansion expressions.
1792 (cp_parser_new_initializer): Ditto.
1793 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1794 base-class initializer expansion.
1795 (cp_parser_mem_initializer): Ditto.
1796 (cp_parser_template_parameter_list): Keep track of whether the
1797 template parameter is a template parameter pack.
1798 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1799 template parameter pack.
1800 (cp_parser_type_parameter): Ditto.
1801 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1803 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1804 this declarator is a parameter pack.
1805 (cp_parser_parameter_declaration): The ellipsis does not end the
1806 parameter declaration, because it might be a parameter pack. Parse
1807 the ellipsis to indicate a parameter pack.
1808 (cp_parser_initializer): Allow pack expansions.
1809 (cp_parser_initializer_list): Allow ellipsis to create an
1810 initializer expansion.
1811 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1813 (cp_parser_type_id_list): Allow ellipsis to create an exception
1814 specifier expansion.
1815 (cp_parser_attribute_list): Don't allow pack expansions.
1816 (cp_parser_functional_cast): Allow pack expansions.
1817 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1818 compute the length of a parameter pack.
1819 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1820 end a template argument.
1821 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1822 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1825 2007-03-09 Dirk Mueller <dmueller@suse.de>
1827 * cp/call.c (build_new_op): Call warn_logical_operator.
1829 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1832 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1835 * pt.c (any_template_arguments_need_structural_equality_p):
1838 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1840 * decl.c (grokdeclarator): Disable warnings for anonymous
1843 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1845 * typeck2.c (readonly_error): Always emit a hard error.
1846 Remove last argument.
1847 * cp-tree.h (readonly_error): Adjust prototype.
1848 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1849 * typeck.c (build_unary_op): Likewise.
1850 (build_modify_expr): Likewise.
1852 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1855 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1857 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1860 * parser.c (struct cp_parser): New IN_IF_STMT.
1861 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1862 returning if parsing the body of an 'if' statement or issuing an
1863 error and continuing.
1864 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1866 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1868 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1871 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1874 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1876 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1877 Objective-C++. Don't exit early if -shared-libgcc needs to be
1880 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1882 * typeck.c (common_base_type): Delete unused function.
1884 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1886 * Make-lang.in: Add dummy lang.install-pdf target.
1888 2007-03-01 Simon Baldwin <simonb@google.com>
1891 * decl.c (check_tag_decl): Added new warning for typedef ignored
1892 when it precedes an otherwise valid non-typedef declaration.
1894 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1896 * typeck.c (build_function_call): Store converted arguments
1897 in a stack-allocated array instead of building a list.
1898 (convert_arguments): Store arguments in the array passed in as an
1899 argument, and return the actual number of arguments.
1900 * call.c (build_call): Delete, and replace with...
1901 (build_call_n, build_call_a): New.
1902 (build_op_delete_call): Rewrite to avoid constructing argument lists.
1903 (build_over_call): Store converted arguments in a stack-allocated
1904 array instead of building a list.
1905 (build_cxx_call): Pass arguments in an array instead of as a list.
1906 (build_java_interface_fn_ref): Rewrite to avoid constructing
1908 * tree.h: Update declarations to reflect above changes.
1909 * method.c (use_thunk): Use a stack-allocated array to hold
1910 the arguments instead of a list.
1911 * rtti.c (throw_bad_cast): Update call to cxx_call.
1912 (throw_bad_typeid): Likewise.
1913 (build_dynamic_cast_1): Likewise.
1914 * init.c (build_builtin_delete_call): Use build_call_n.
1915 * decl.c (expand_static_init): Likewise.
1916 * except.c (cp_protect_cleanup_actions): Likewise.
1917 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1918 (gimplify_must_not_throw_expr): Likewise.
1919 (cxx_omp_apply_fn): Use build_call_a.
1921 2007-02-26 Mark Mitchell <mark@codesourcery.com>
1923 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1924 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1926 2007-02-25 Mark Mitchell <mark@codesourcery.com>
1928 * cp-tree.h (static_ctors): Remove.
1929 * cp-tree.h (static_dtors): Likewise.
1930 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1931 refactoring of tree_map hierarchy.
1932 (decl_shadowed_for_var_insert): Likewise.
1933 * semantics.c (expand_body): Use c_expand_body.
1934 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1935 * decl2.c (static_ctors): Remove.
1936 (static_dtors): Likewise.
1937 (generate_ctor_or_dtor_function): Pass NULL_TREE to
1938 objc_generate_static_init_call. Do not call static_[cd]tors.
1939 (generate_ctor_and_dtor_functions_for_priority): Do not check for
1941 (cp_write_global_declarations): Likewise.
1943 2007-02-23 Richard Guenther <rguenther@suse.de>
1945 * class.c (note_name_declared_in_class): Make declaration
1946 changes meaning a pedwarn.
1948 2007-02-22 Michael Matz <matz@suse.de>
1951 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1952 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1953 dump_function_decl): Guard emitting outer scopes by new flag.
1954 * cp-lang.c (cxx_dwarf_name): New function.
1955 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1956 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1958 (push_template_decl_real, lookup_template_class): Remove calls
1961 2007-02-19 Mark Mitchell <mark@codesourcery.com>
1963 * call.c (build_new_method_call): Ensure that explicit calls of
1964 destructors have type "void".
1966 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1968 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1969 and -Walways-true with -Waddress.
1970 * cvt.c (convert_to_void): Replace unconditional warning with
1973 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1975 * decl.c, tree.c: Fix comment typos.
1977 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1980 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
1981 statement expression if we had an error mark node.
1983 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1984 Brooks Moses <brooks.moses@codesourcery.com>
1985 Lee Millward <lee.millward@codesourcery.com>
1987 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1988 Change class to tcc_vl_exp.
1990 * call.c (build_call): Use build_call_list instead
1992 (build_over_call): Likewise.
1993 (build_new_method_call): Use build_min_non_dep_call_list
1994 instead of build_min_non_dep.
1996 * error.c (dump_call_expr_args): New function.
1997 (dump_aggr_init_expr_args): New function.
1998 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
1999 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2001 * cvt.c (convert_to_void): Use build_call_array instead
2002 of build3; use new AGGR_INIT_EXPR accessor macros.
2004 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2005 instead of TREE_CODE_LENGTH.
2007 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2008 AGGR_INIT_EXPR accessor macros.
2010 * cp-gimplify.c (cp_gimplify_init_expr): Use
2011 AGGR_INIT_EXPR_SLOT to set the slot operand.
2013 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2014 (AGGR_INIT_EXPR_SLOT): New macro.
2015 (AGGR_INIT_EXPR_ARG): New macro.
2016 (aggr_init_expr_nargs): New macro.
2017 (AGGR_INIT_EXPR_ARGP): New macro.
2018 (aggr_init_expr_arg_iterator): New.
2019 (init_aggr_init_expr_arg_iterator): New.
2020 (next_aggr_init_expr_arg): New.
2021 (first_aggr_init_expr_arg): New.
2022 (more_aggr_init_expr_args_p): New.
2023 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2024 (stabilize_aggr_init): New declaration.
2025 (build_min_non_dep_call_list): Likewise.
2027 * tree.c (process_aggr_init_operands): New function.
2028 (build_aggr_init_array) New function.
2029 (build_cplus_new): Update to use new CALL_EXPR and
2030 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2031 build_aggr_init_array.
2032 (build_min_non_dep_call_list) New function.
2033 (build_min_nt): Assert input code parameter is not a variable
2034 length expression class.
2035 (build_min, build_min_non_dep): Likewise.
2036 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2037 to check for equality instead of recursing. Handle tcc_vl_exp
2039 (stabilize_call): Update to only handle CALL_EXPRs, not
2040 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2041 (stabilize_aggr_init): New function.
2042 (stabilize_init): Use it.
2044 * cxx-pretty-print.c (pp_cxx_postfix_expression)
2045 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2046 AGGR_INIT_EXPR accessor macros and argument iterators.
2048 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2049 build_vl_exp. Iterate through the operands, recursively
2050 processing each one.
2051 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2052 CALL_EXPR accessor macros.
2053 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2054 tree code classes. Use TREE_OPERAND_LENGTH instead of
2057 * semantics.c (finish_call_expr): Use build_nt_call_list
2058 instead of build_nt.
2059 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
2060 accessor macros. Use build_call_array to construct the
2061 CALL_EXPR node instead of build3
2063 * decl2.c (build_offset_ref_call_from_tree): Use
2064 build_nt_call_list and build_min_non_dep_call_list instead
2065 of build_min_nt and build_min_non_dep.
2067 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2068 Use build_nt_call_list instead of build_min_nt.
2070 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2073 * call.c (build_conditional_expr): Improve error message.
2075 2007-02-13 Dirk Mueller <dmueller@suse.de>
2077 * friend.c (do_friend): Annotate warning about friend
2078 declarations in templates with OPT_Wnon_template_friend.
2079 Convert informal message from warning() to inform().
2081 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
2082 Mark Mitchell <mark@codesourcery.com>
2085 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2086 instantiations for variables.
2088 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2091 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2092 Check warn_unused_value just once.
2094 2007-02-11 Mark Mitchell <mark@codesourcery.com>
2097 * pt.c (determine_specialization): Use skip_artificial_parms_for.
2098 (fn_type_unificiation): Likewise.
2099 (get_bindings): Likewise.
2101 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
2104 * decl.c (finish_function): Use DECL_REPLACEABLE.
2105 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2107 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2109 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2111 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2113 * decl.c (grokvardecl): Don't error if !have_tls.
2114 (grokdeclarator): Likewise.
2115 * parser.c (cp_parser_omp_threadprivate): Likewise.
2117 2007-02-07 Jakub Jelinek <jakub@redhat.com>
2120 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2121 parameters and result decls in omp clauses.
2122 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2125 2007-02-05 Dirk Mueller <dmueller@suse.de>
2128 * parser.c (cp_parser_class_specifier): Always initialize bases.
2130 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2132 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2133 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2134 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2136 * semantics.c (finish_omp_atomic): Store a whole expression node
2137 in operand 1, and integer_zero_node in operand 0, for dependent
2138 OMP_ATOMIC. Rewrite to make flow easier to understand.
2140 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2142 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2144 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
2146 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2147 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2149 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
2151 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2152 keyword warning to -Wc++0x-compat.
2154 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2156 * decl.c (grokdeclarator): Update documentation.
2158 2007-02-02 Jakub Jelinek <jakub@redhat.com>
2161 * decl.c (grokdeclarator): If __thread is used together with
2162 a storage class other than extern and static, clear thread_p
2163 after issuing diagnostics and fall through to checking the
2166 2007-01-30 Roger Sayle <roger@eyesopen.com>
2168 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2169 calculating the size of an array (to avoid recursive errors).
2171 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2174 * typeck.c (build_binary_op): Fix logic for warning. Move warning
2176 * call.c (convert_like_real): Don't warn when converting to
2179 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2181 * decl.c (pop_label): Replace warning with call to
2182 warn_for_unused_label.
2184 2007-01-28 Andrew Pinski <pinskia@gmail.com>
2187 * semantics.c (finish_pseudo_destructor_expr): Check the
2188 destrutor name by calling check_dtor_name.
2190 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
2192 * lex.c (D_CPP0X): Rename.
2194 (reswords): D_CPP0X -> D_CXX0X.
2195 (init_reswords): Ditto.
2196 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2197 of C++0x keywords as identifiers.
2199 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
2202 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2205 2007-01-23 Ian Lance Taylor <iant@google.com>
2207 * typeck.c (convert_for_assignment): Only warn about a = b = c
2208 when converting to bool.
2210 2007-01-23 Roger Sayle <roger@eyesopen.com>
2212 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2214 * typeck.c (ignore_overflows): Remove the remaining uses of
2215 TREE_CONSTANT_OVERFLOW.
2217 2007-01-20 Jan Hubicka <jh@suse.cz>
2219 * decl2.c (start_objects, start_static_storage_duration_function):
2220 Do not make the functions uninlinable.
2222 2007-01-17 Ian Lance Taylor <iant@google.com>
2224 * class.c (add_method): Call VEC_reserve_exact rather than passing
2225 a negative size to VEC_reserve.
2227 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
2230 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2232 2007-01-10 Mark Mitchell <mark@codesourcery.com>
2235 * decl.c (make_typename_type): If the qualified name is not a
2236 type, issue an error.
2237 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2240 2007-01-08 Geoffrey Keating <geoffk@apple.com>
2242 * rtti.c: Include target.h.
2243 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2244 don't emit typeinfo for fundamental types as weak.
2245 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2247 2007-01-08 Richard Guenther <rguenther@suse.de>
2249 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2251 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
2253 * call.c (standard_conversion): Pass flag to
2254 vector_types_convertible_p to disallow emission of note.
2255 * typeck.c (convert_for_assignment): Pass flag to
2256 vector_types_convertible_p to allow emission of note.
2257 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2258 to disallow emission of note.
2260 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2263 * typeck.c (build_binary_op): Call overflow_warning if
2264 TREE_OVERFLOW_P is true for the result and not for any of the
2267 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
2270 * class.c (add_method): Don't wait until template
2271 instantiation time to complain about duplicate methods.
2273 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2276 * semantics.c (finish_unary_op_expr): Warn only if result
2277 overflowed and operands did not.
2279 2007-01-05 Ian Lance Taylor <iant@google.com>
2281 * typeck.c (build_binary_op): Warn about comparing a non-weak
2284 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
2286 * pt.c (tsubst): Propagate the need for structural equality checks
2287 when reducing the level of template parameters.
2289 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
2291 * pt.c: Fix a comment typo.
2293 2007-01-02 Ian Lance Taylor <iant@google.com>
2295 * semantics.c (maybe_convert_cond): Optionally warn when using an
2296 assignment as a condition.
2297 * typeck.c (convert_for_assignment): Optionally warn about
2298 assigning the result of an assignment to a bool.
2300 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2302 * pt.c (canonical_template_parms): Correct typo in comment.
2304 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2306 * typeck.c (structural_comptypes): Renamed from "comptypes".
2307 (comptypes): Use canonical type information to perform fast type
2308 comparison. When VERIFY_CANONICAL_TYPES, verify that the
2309 canonical type comparison returns the same results as we would see
2310 from the current, structural check. Support COMPARE_STRUCTURAL
2311 when we need structural checks.
2312 * decl.c (typename_compare): Fix comment.
2313 (build_typename_type): TYPENAME_TYPE nodes require structural
2314 equality checks, because they resolve different based on the
2316 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2317 require structural equality checks (for now).
2318 (build_ptrmemfunc_type): Build the canonical pointer to member
2320 (compute_array_index_type): Whenever we build a new index type
2321 to represent the size of an array in a template, we need to mark
2322 this index type as requiring structural equality. This goes for
2323 arrays with value-dependent sizes with the current ABI, or all
2325 * tree.c (cplus_array_hash): New.
2326 (struct cplus_array_info): New.
2327 (cplus_array_compare): New.
2328 (cplus_array_htab): New.
2329 (build_cplus_array_type_1): Use a hash table to cache the array
2330 types we build. Build the canonical array type for each array
2332 (cp_build_qualified_type_real): When building a cv-qualified array
2333 type, use the hash table of array types and build canonical array
2335 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2336 use structural equality (for now).
2337 * cp-tree.h (COMPARE_STRUCTURAL): New.
2338 * pt.c (canonical_template_parms): New.
2339 (canonical_type_parameter): New.
2340 (process_template_parm): Find the canonical type parameter.
2341 (lookup_template_class): When we have named the primary template
2342 type, set the canonical type for our template class to the primary
2343 template type. If any of the template arguments need structural
2344 equality checks, the template class needs structural equality
2346 (tsubst): When reducing the level of a template template
2347 parameter, we require structural equality tests for the resulting
2348 parameter because its template parameters have not had their types
2349 canonicalized. When reducing a template type parameter, find the
2350 canonical reduced type parameter.
2351 (any_template_arguments_need_structural_equality_p): New.