OSDN Git Service

PR c++/32232
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/32232
4         * pt.c (resolve_overloaded_unification): Robustify.  Return a
5         bool, not an int.
6         (type_unification_real): Adjust accordingly.
7
8 2007-07-06  Richard Guenther  <rguenther@suse.de>
9
10         * init.c (build_new_1): Use the correct pointer type.
11         * typeck2.c (build_m_component_ref): Likewise.
12
13 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
14
15         PR c++/32245
16         * init.c (build_zero_init): Always build an initializer for
17         non-static storage.
18         * typeck2.c (build_functional_cast): Use build_zero_init.
19
20         PR c++/32251
21         * init.c (build_new_1): Always pass the allocation function to
22         build_op_delete_call.
23         * call.c (build_op_delete_call): Handle operator delete with a
24         variable-argument list.  Do not issue an error when no matching
25         deallocation function is available for a new operator.
26
27         PR c++/31992
28         * cp-tree.h (any_value_dependent_elements_p): Declare it.
29         * decl.c (value_dependent_init_p): New function.
30         (cp_finish_decl): Use it.
31         * pt.c (value_dependent_expression_p): Use
32         any_value_dependent_elements_p.
33         * parser.c (cp_parser_primary_expression): Add comment about
34         treating dependent qualified names as integral
35         constant-expressions.
36
37 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
38
39         * decl.c (build_ptrmemfunc_type): Always use structural equality
40         tests when comparing pointer-to-member-function types, because the
41         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
42         types.
43         
44 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
45
46         * init.c (build_new): Tweak comment.
47
48 2007-06-29  Dave Brolley  <brolley@redhat.com>
49
50         PR c++/31743
51         * parser.c (cp_parser_new_type_id): Don't reduce a named array
52         type to its base type and number of elements here.
53         * init.c (build_new): Call complete_type_or_else to ensure that the
54         type is complete and to issue a diagnostic if it is not.
55         (build_new_1): Don't call complete_type_or_else here.
56
57 2007-07-03  Richard Guenther  <rguenther@suse.de>
58
59         PR c++/32609
60         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
61         after recursing.
62
63 2007-07-02  Simon Baldwin  <simonb@google.com>
64
65         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
66         for inner-style nested forward declarations that don't declare
67         anything useful.
68
69 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
70
71         PR c++/31748
72         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
73         DECL_P in not a variable and appears more than once error messages.
74
75 2007-07-01  Ollie Wild  <aaw@google.com>
76
77         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
78         (select_decl): Remove function.
79         (unqualified_namespace_lookup): Populate binding by calling
80         ambiguous_decl.  Remove select_decl call.
81         (lookup_qualified_name): Remove select_decl call.
82         * decl.c (lookup_and_check_tag): Check for ambiguous references.
83         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
84         generation when name lookup is ambiguous.
85
86 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
87
88         PR c++/31724
89         * init.c (build_new_1): Use structural equality on the copy of the
90         array type.
91
92 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
93
94         * decl2.c (determine_visibility): Implement
95         flag_visibility_ms_compat effect on type info.
96         * decl.c (cxx_init_decl_processing): Implement
97         global effect of flag_visibility_ms_compat.
98
99 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
100
101         * decl2.c (start_objects): Mark constructor-running function
102         as artificial.
103
104 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
105
106         PR c++/32111
107         * decl.c (grokdeclarator): Reset friendp for member functions declared
108         friend of their own class.
109
110 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
111
112         * decl2.c (determine_visibility): Don't look for dllexport here.
113         (determine_visibility_from_class): Tidy.
114
115 2007-06-18  Simon Baldwin <simonb@google.com>
116
117         PR c++/31923
118         * parser.c (cp_parser_single_declaration): Added check for storage
119         class other than sc_none in parsed declaration, and a flag to indicate
120         if the call is part of an explicit template specialization parse.
121         * (cp_parser_explicit_specialization): Specialization check flag added
122         to call to cp_parser_single_declaration(), set true.
123         * (cp_parser_template_declaration_after_export): Specialization check
124         flag added to call to cp_parser_single_declaration(), set false.
125         * pt.c (check_explicit_specialization): Added code to copy visiblity
126         and linkage from the templated function to the explicit specialization.
127
128 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
129
130         * typeck.c (build_binary_op): For templates build the
131         expression in pieces to avoid the assert in build2_stat.
132         (get_member_function_from_ptrfunc):
133         Change over to using POINTER_PLUS_EXPR and convert
134         the second operand to sizetype.
135         * typeck2.c (build_m_component_ref):  Likewise.
136         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
137         instead of PLUS_EXPR for pointers.
138         (build_new_1): Likewise.
139         (build_vec_delete_1): Likewise.
140         (build_vec_delete): Likewise.
141         * class.c (build_base_path): Likewise.
142         (build_base_path): Likewise.
143         (convert_to_base_statically): Likewise.
144         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
145         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
146         instead of PLUS_EXPR.
147         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
148         instead of PLUS_EXPR for pointers.
149         * call.c (build_special_member_call): Likewise.
150         * rtti.c (build_headof): Likewise.
151         Use sizetype instead of ptrdiff_type_node.
152         (tinfo_base_init): Create a POINTER_PLUS_EXPR
153         instead of PLUS_EXPR for pointers.
154         * except.c (expand_start_catch_block):  Do a
155         NEGATIVE and then a POINTER_PLUS_EXPR instead
156         of a MINUS_EXPR.
157         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
158         PLUS_EXPR on pointer types over to use
159         POINTER_PLUS_EXPR and remove the conversion
160         to the pointer types.
161         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
162         adding to a pointer type. Use size_int instead of
163         ssize_int. Convert the index to sizetype before
164         adding it to the pointer.
165
166 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
167
168         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
169         (DECL_ANON_UNION_VAR_P): New macro.
170         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
171         than DECL_VAR_MARKED_P, to keep track of which variables we have
172         seen.
173         * decl.c (redeclaration_error_message): Complain about redeclaring
174         anonymous union members at namespace scope.
175         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
176
177 2007-06-14  Geoff Keating  <geoffk@apple.com>
178
179         * decl2.c (determine_visibility): Ensure that functions with
180         hidden types as parameters are hidden.
181
182         PR 31093
183         * decl2.c (determine_visibility): Remove duplicate code for
184         handling type info.
185
186 2007-06-12  Ian Lance Taylor  <iant@google.com>
187
188         PR libstdc++/29286
189         * init.c (avoid_placement_new_aliasing): New static function.
190         (build_new_1): Call it.
191
192 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
193
194         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
195         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
196
197 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
198
199         PR c++/32177
200         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
201         on init, the non-decl cond operand and increment value.
202
203 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
204
205         PR c++/30759
206         * decl.c (check_initializer): Report an error when a brace enclosed
207         initializer is used for a non-aggregate type in C++98.
208         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
209         cxx_dialect.
210         (grokdeclarator): Likewise.
211         (move_fn_p): Likewise.
212         * typeck.c (check_return_expr): Likewise.
213         * call.c (reference_binding): Likewise.
214         * error.c (cp_cpp_error): Likewise.
215         * pt.c (check_default_tmpl_args): Likewise.
216         (tsubst): Likewise.
217         * lex.c (init_reswords): Likewise.
218         * parser.c (p_parser_primary_expression): Likewise.
219         (TOKEN_PRECEDENCE): Likewise.
220         (cp_parser_init_declarator): Likewise.
221         (cp_parser_ptr_operator): Likewise.
222         (cp_parser_parameter_declaration): Likewise.
223         (cp_parser_enclosed_template_argument_list): Likewise.
224         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
225         (cp_parser_next_token_ends_template_argument_p): Likewise.
226
227 2007-06-04  Simon Baldwin  <simonb@google.com>
228
229         * decl.c (grokdeclarator): Readability change.  Moved case labels
230         into direct switch statement scope.
231
232 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
233
234         * call.c (convert_like_real): Remove pointless code.
235
236 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
237
238         * decl.c (get_atexit_fn_ptr_type): New function.
239         (get_atexit_node): Use it.
240         (start_cleanup_fn): Likewise.
241         (register_dtor_fn): Use the object's destructor, instead of a
242         separate cleanup function, where possible.
243         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
244         (atexit_fn_ptr_type_node): New macro.
245         * decl2.c (build_cleanup): Use build_address.
246
247 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
248
249         * typeck.c (build_binary_op): Include types in error.
250
251 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
252
253         PR c++/31806
254         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
255         needs runtime initialization.
256
257 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
258
259         PR c++/32158
260         * semantics.c (finish_trait_expr): Complete the types.
261
262 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
263             Douglas Gregor <doug.gregor@gmail.com>
264             Pedro Lamarao <pedro.lamarao@mndfck.org>
265             Howard Hinnant <howard.hinnant@gmail.com>
266
267         PR c++/7412
268         PR c++/29939
269         * typeck.c (comptypes): Don't consider rvalue and lvalue
270         reference types to be equivalent.
271         (check_return_expr): Move from certain lvalues when returning
272         them.
273         * decl.c (grokdeclarator): Implement reference collapsing.
274         (copy_fn_p): Don't consider constructors taking rvalue references
275         to be copy constructors.
276         (move_fn_p): New.
277         * call.c (conversion): New "rvaluedness_matches_p" member.
278         (convert_class_to_reference): Require reference type as first
279         parameter instead of base type.
280         (reference_binding): Add logic to handle rvalue references.
281         (implicit_conversion): Update inaccurate comment.
282         (convert_like_real): Disable creation of temporaries that are
283         impossible to initialize for types with move constructors.
284         (build_over_call): Elide move constructors when possible.
285         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
286         (maybe_handle_ref_bind): Return conversion instead of type node.
287         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
288         determine preferred conversion sequences.
289         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
290         (LOOKUP_PREFER_RVALUE): New.
291         (DECL_MOVE_CONSTRUCTOR_P): New.
292         (struct cp_declarator): Add "reference" member for reference
293         types, with new "rvalue_ref" flag.
294         (cp_build_reference_type): Declare.
295         (move_fn_p): Declare.
296         * error.c (dump_type_prefix): Format rvalue reference types
297         correctly in error messages.
298         * except.c (build_throw): Move from certain lvalues when
299         throwing.
300         * mangle.c (write_type): Mangle rvalue references differently
301         than regular references.
302         * parser.c (make_reference_declarator): Add boolean parameter for
303         rvalue references.
304         (cp_parser_make_indirect_declarator): New.
305         (cp_parser_new_declarator_opt): Call
306         cp_parser_make_indirect_declarator. 
307         (cp_parser_conversion_declarator_opt): Ditto.
308         (cp_parser_declarator): Ditto.
309         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
310         declarators.
311         * pt.c (tsubst): Implement reference collapsing.
312         (maybe_adjust_types_for_deduction): Implement special template
313         parameter deduction rule for rvalue references.
314         (type_unification_real): Update calls to
315         maybe_adjust_types_for_deduction.
316         (try_one_overload): Ditto.
317         (unify_pack_expansion): Ditto.
318         * tree.c (lvalue_p_1): Handle rvalue reference types.
319         (cp_build_reference_type): New.
320
321 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
322
323         PR c++/31809
324         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
325         variables that need runtime initialization.
326
327 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
328
329         PR c++/31339
330         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
331         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
332         case POSTDECREMENT_EXPR>): Return the error_mark_node
333         if either the real or imaginary parts would an
334         error_mark_node.
335         
336 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
337             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
338
339         PR c++/31745
340         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
341         token is a closing brace, false if there are no tokens left.
342         (cp_parser_namespace_alias_definition): Only consume the next token if
343         it is a closing brace.
344
345         * parser.c (cp_parser_class_specifier): Likewise.
346
347 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
348
349         * semantics.c (finish_member_declaration): Fix a typo in the
350         last checkin.
351
352 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
353
354         PR c++/31431
355         PR c++/31432
356         PR c++/31434
357         PR c++/31435
358         PR c++/31437
359         PR c++/31438
360         PR c++/31442
361         PR c++/31443
362         PR c++/31444
363         PR c++/31445
364         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
365         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
366         * pt.c (check_for_bare_parameter_packs): Return bool indicated
367         whether everything was okay. Fix indentation.
368         (push_template_decl_real): Check for bare parameter packs in
369         function parameters; where errors occur, mark the parameter types
370         with ERROR_MARK_NODEs to avert ICEs.
371         (coerce_template_parameter_pack): New.
372         (coerce_template_parms): Moved parameter pack coercion into
373         coerce_template_parameter_pack, and permit it anywhere in the
374         template parameter list (not just at the end). Parameter and
375         argument indices can vary (somewhat) separately now, so add
376         PARM_IDX and ARG_IDX.
377         (fn_type_unification): Don't set an argument pack as incomplete if
378         no argument pack was deduced.
379         (type_unification_real): If a type parameter is a parameter pack
380         and has not otherwise been deduced, it will be deduced to an empty
381         parameter pack.
382         (more_specialized_fn): Use the actual lengths of the argument
383         lists when comparing against expansions.
384         * semantics.c (finish_member_declaration): If a field's type has
385         bare parameter packs, error and set its type to ERROR_MARK_NODE.
386
387 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
388
389         PR target/27067
390         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
391
392 2007-05-22  Ollie Wild  <aaw@google.com>
393
394         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
395         (unqualified_namespace_lookup): Adds check for hidden types.
396
397 2007-05-22  Ollie Wild  <aaw@google.com>
398
399         * decl.c (duplicate_decls): Verify namespace names are unique.
400
401 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
402
403         * decl.c (cxx_maybe_build_cleanup): Handle
404         __attribute__((cleanup)).
405
406 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
407
408         * cvt.c (cp_convert_and_check): Don't check warnings if the
409         conversion failed.
410
411 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
412
413         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
414
415 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
416
417         PR c++/29928
418         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
419         type only if is a class type (5.2.8/4).
420
421 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
422
423         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
424         * decl.c (grokdeclarator): Use unsigned_type_for instead of
425         c_common_unsigned_type.
426
427 2007-05-11  Silvius Rus  <rus@google.com>
428
429         * cp/typeck.c (build_indirect_ref): Add call to
430         strict_aliasing_warning.
431         (build_reinterpret_cast_1): Condition call to
432         strict_aliasing_warning. 
433
434 2007-05-11  Jan Hubicka  <jh@suse.cz>
435
436         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
437         * decl2.c (start_objects): ctors and dtors are no longer public.
438         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
439         
440 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
441
442         * typeck.c (build_unary_op): Remove code that used to
443         handle non lvalue increments/decrements.
444
445 2007-05-07  Mike Stump  <mrs@apple.com>
446
447         * parser.c (check_empty_body): Add.
448         (cp_parser_iteration_statement): Add call to check_empty_body.
449
450 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
451
452         PR 31775
453         * mangle.c (write_mangled_name): Mangle static variable names.
454         (write_unqualified_name): Use local-source-name for
455         namespace-scope static variables.
456
457 2007-05-04  Dirk Mueller  <dmueller@suse.de>
458
459         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
460         not in effect.
461
462 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
463
464         PR c++/31663
465         * decl2.c (constrain_class_visibility): 
466         Use strip_pointer_or_array_types instead of strip_array_types.
467
468 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
469
470         PR C++/30221
471         * decl.c (reshape_init_r): Don't reshape the first element if it
472         is a pointer to member function.
473
474 2007-04-27  Simon Baldwin  <simonb@google.com>
475
476         * decl.c (grokparms): Changed message format from %qD to %qE.
477
478 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
479
480         * error.c (maybe_warn_variadic_templates): Variadic templates are
481        now in C++0x, so only warn about them in C++98 mode.
482         
483 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
484
485         PR C++/30016
486         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
487         integeral types from vectors types.
488
489 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
490
491         PR c++/31598
492         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
493         for type dependent OMP_CLAUSE_DECLs.
494
495 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
496
497         PR c++/31338
498         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
499         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
500         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
501         * init.c (build_zero_init): Adjust, as
502         COMPLEX_TYPE is now a SCALAR_TYPE.
503         * typeck2.c (digest_init): Allow brace-enclosed initializers for
504         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
505
506 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
507
508         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
509         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
510         (trait_expr_value): Adjust.
511
512 2007-04-23  Simon Baldwin  <simonb@google.com>
513
514         * decl.c (grokparms): Added new error for duplicate function
515         parameters names in function prototypes, to match gcc behavior.
516
517 2007-04-23  Jan Hubicka  <jh@suse.cz>
518
519         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
520         bits dirrectly.
521
522 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
523
524         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
525         instead of checking GIMPLE_STMT_P in chain_next.
526
527 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
528
529         PR c++/31513
530         * call.c (convert_for_arg_passing): Convert bitfields to their
531         declared types.
532
533 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
534
535         PR c++/31517
536         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
537
538 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
539
540         PR c++/29365
541
542         * cp/decl2.c (constrain_class_visibility):
543         Do not warn about the use of anonymous namespace in the main input file.
544
545 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
546
547         * cp-tree.h (current_template_parms): Fix typo in comment.
548
549 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
550
551         * cp-tree.h, error.c: Fix comment typos.
552
553 2007-04-13  Jason Merrill  <jason@redhat.com>
554
555         PR c++/31074
556         * call.c (reference_binding): Add c_cast_p parm.  If true,
557         add quals to TO as needed to make it reference-compatible.
558
559 2007-04-11  Jan Hubicka  <jh@suse.cz>
560
561         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
562         that we are not processing template_decl.
563
564 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
565
566         PR c++/31449
567         * class.c (build_base_path): Ensure that the converted pointer has
568         the same cv-qualification as the input.
569
570 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
571
572         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
573
574 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
575
576         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
577         Do not set it.
578         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
579         * tree.c (cp_add_pending_fn_decls): Remove.
580         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
581
582 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
583
584         Revert change removing staticp.
585
586 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
587
588         * cp-objcp-common.c (cxx_staticp): Remove.
589         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
590         * cp-tree.h (cxx_staticp):      
591
592 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
593
594         * class.c (check_for_override): Don't remove dllmport attribute
595         of virtual methods.
596
597 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
598
599         PR c++/30847
600         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
601         type issue error and return early.
602
603 2007-03-30  Jason Merrill  <jason@redhat.com>
604
605         PR c++/31187
606         * typeck.c (cp_type_readonly): New fn.
607         * cp-tree.h: Declare it.
608         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
609         (cp_finish_decl): Not here.
610
611 2007-03-31  Richard Guenther  <rguenther@suse.de>
612
613         * optimize.c (maybe_clone_body): Replace splay-tree usage by
614         pointer-map.
615
616 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
617
618         PR c++/31138
619         PR c++/31140
620         PR c++/31141
621         * parser.c (declarator_can_be_parameter_pack): New.
622         (cp_parser_template_parameter): Only parse the `...' if the
623         declarator can be a parameter pack.
624         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
625         is NULL.
626         * pt.c (find_parameter_packs_r): Look into the bounds on integer
627         types (they could be used as array bounds). 
628         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
629         (tsubst_pack_expansion): Handle failure to expand parameter
630         packs.
631         
632 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
633
634         PR c++/26099
635         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
636         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
637         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
638         (CLASS_TYPE_NON_UNION_P): Add.
639         (struct lang_type_class): Add has_complex_dflt.
640         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
641         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
642         * cp-tree.def: Add TRAIT_EXPR.
643         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
644         * lex.c (struct resword): Add __has_nothrow_assign,
645         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
646         __has_trivial_constructor, __has_trivial_copy,
647         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
648         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
649         __is_pod, __is_polymorphic, __is_union.
650         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
651         (cp_parser_trait_expr): New.
652         * semantics.c (finish_trait_expr, trait_expr_value
653         classtype_has_nothrow_copy_or_assign_p): New.
654         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
655         as static.
656         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
657         * class.c (check_bases, check_field_decl, check_bases_and_members):
658         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
659         * pt.c (uses_template_parms, tsubst_copy_and_build,
660         value_dependent_expression_p, type_dependent_expression_p): Deal with
661         TRAIT_EXPR.
662         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
663
664 2007-03-29  Richard Guenther  <rguenther@suse.de>
665
666         * tree.c (cp_walk_subtrees): Do not set input_location.
667
668 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
669
670         PR c++/29077
671         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
672         destructor.
673
674 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
675
676         * parser.c (struct cp_parser): Update comment for
677         greater_than_is_operator_p.
678         (cp_parser_primary_expression): In C++0x mode, a cast operator can
679         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
680         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
681         !GREATER_THAN_IS_OPERATOR_P.
682         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
683         `>>' operators that will become two `>' tokens in C++0x.
684         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
685         mode, allowing it to terminate default arguments.
686         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
687         `>>' like two consecutive `>' tokens.
688         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
689         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
690         ends a template argument.
691
692 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
693
694         * decl.c (redeclaration_error_message): Complain when redeclaring
695         a friend function with default template arguments (C++0x mode only).
696         * cp-tree.h (check_default_tmpl_args): Declare.
697         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
698         template arguments in function templates. Add support for checking
699         the default template arguments of friend templates.
700         (push_template_decl_real): Fix call to check_default_tmpl_args.
701         (type_unification_real): If a template parameter has not been
702         deduced but provides a default template argument, substitute into
703         that default template argument.
704         * parser.c (cp_parser_init_declarator): When declaring (but not
705         defining!) a function template in C++0x mode, check for default
706         template arguments.
707
708 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
709
710         PR c++/29993
711         * decl.c (grokdeclarator): Deal with cv-qualified function type
712         typedefs in the same way for member and non-member functions.
713
714 2007-03-26  Dirk Mueller  <dmueller@suse.de>
715
716         * parser.c (cp_parser_member_declaration): Pedwarn
717         about stray semicolons after member declarations.
718
719 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
720
721         PR c++/30500
722         * pt.c (instantiate_decl): Set in_system_header.
723
724 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
725
726         * cp-tree.h (current_tempalte_parms): Improve documentation.
727         * pt.c (current_template_args): Likewise.
728
729         PR c++/30863
730         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
731         not consume tokens when failing.
732
733 2007-03-22  Jim Wilson  <wilson@specifix.com>
734             Mark Mitchell  <mark@codesourcery.com>
735
736         PR c++/31273
737         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
738         consistent with FROM.
739
740 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
741
742         * error.c (dump_expr): Handle dependent names that designate types.
743         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
744
745 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
746
747         * cp-tree.def, parser.c, pt.c: Fix comment typos.
748
749 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
750
751         * cvt.c (cp_convert_and_check) : Define.
752         * cp-tree.h (cp_convert_and_check): Declare.
753         * call.c (convert_conversion_warnings): Rename to
754         conversion_null_warnings.  The warning for floating-point to
755         integer is handled by convert_and_check in convert_like_real.
756         (convert_like_real): convert_conversion_warnings was renamed as
757         conversion_null_warnings.
758         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
759         overflow and changes of value during conversion.
760
761 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
762
763         PR c++/30891
764         * parser.c (cp_parser_statement): If 'namespace' is found, this
765         only can be a namespace alias definition, so parse it now.
766         (cp_parser_namespace_alias_definition): if we find an open brace
767         instead of '=', then this is actually a misplaced namespace
768         definition.
769         
770 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
771
772         PR c++/24924
773         * decl.c (cxx_init_decl_processing): Move command-line options
774         processing to c-opts.c.
775         
776 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
777
778         * ptree.c (cxx_print_type): Use formatting markup for integers
779         when printing template parameter index/level/orig level.
780         (cxx_print_xnode): Ditto.
781         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
782         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
783         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
784         HOST_WIDE_INTs.
785         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
786         rather than a HOST_WIDE_INT.
787         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
788         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
789         better bit-packing.
790         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
791         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
792         IN_BASE_INITIALIZER bool bitfields.
793         (struct cp_declarator): Make KIND a 4-bit field. Make
794         PARAMETER_PACK_P a bool bitfield just after KIND.
795         * pt.c (uses_parameter_packs): Destroy the pointer set.
796         (make_pack_expansion): Ditto.
797         (check_for_bare_parameter_packs): Ditto.
798         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
799         
800 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
801
802         PR c++/31165
803         * call.c  (convert_default_arg): Instead of copying the node,
804         unshare it.
805
806 2007-03-15  Dirk Mueller  <dmueller@suse.de>
807
808         PR c++/30860
809         * call.c (convert_conversion_warnings): New..
810         (convert_like_real): .. factored out from here.
811         (convert_conversion_warnings): Add warning about
812         false being converted to NULL in argument passing.
813
814 2007-03-14  Dirk Mueller  <dmueller@suse.de>
815
816         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
817         (finish_do_body): Warn about empty body in do/while statement.
818
819 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
820
821         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
822         
823 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
824
825         PR c/21438
826         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
827         warning.
828         
829 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
830
831         * cp/repo.c (init_repo): Initialize random_seed saved options.
832         (finish_repo): Adjust.
833
834 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
835
836         PR bootstrap/30899
837         * Make-lang.in (doc/g++.1): Use $< to specify the location from
838         which to copy.
839
840 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
841
842         * decl.c (compute_array_index_type): New warning flag warn_vla.
843
844 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
845
846         PR c++/30108
847         * call.c (convert_default_arg): Copy non-constant arguments.
848
849 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
850
851         PR c++/31038
852         * parser.c (cp_parser_postfix_expression): Disallow compound
853         literals in constant expressions.
854
855         PR c++/30328
856         * semantics.c (finish_typeof): Use unlowered_expr_type.
857         
858 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
859
860         PR c++/30274
861         * cp-tree.h (unlowered_expr_type): New function.
862         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
863         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
864         (unlowered_expr_type): New function.
865         (build_unary_op): Disallow predecrements of bool bitfields.
866         * call.c (build_conditional_expr): Use unlowered_expr_type.
867         * pt.c (type_unification_real): Likewise.
868
869 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
870
871         PR c++/20599
872         * typeck.c (check_return_expr): Check for bare parameter packs.
873         (comptypes): Compare template parameter packs and
874         type pack expansions.
875         * decl.c (grokdeclarator): Deal with the declaration of function
876         parameter packs.
877         (grokparms): Verify that the (optional) function parameter pack is
878         at the end of the parameter list.
879         (xref_basetypes): Handle pack expansions in the base class.
880         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
881         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
882         (NONTYPE_ARGUMENT_PACK): New.
883         (TYPE_PACK_EXPANSION): New.
884         (EXPR_PACK_EXPANSION): New.
885         (ARGUMENT_PACK_SELECT): New.
886         * cp-objcp-common.c (cp_tree_size): Compute size of
887         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
888         ARGUMENT_PACK_SELECT.
889         * error.c (dump_template_argument): Print template argument packs.
890         (dump_template_argument_list): Ditto.
891         (dump_template_parameter): Dump `...' for template type parameter
892         packs.
893         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
894         (dump_parameters): Print function parameter packs.
895         (dump_template_parms): Print template argument packs.
896         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
897         (maybe_warn_variadic_templates): New.
898         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
899         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
900         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
901         CAST_EXPR. 
902         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
903         (write_template_arg): Write argument packs as separate arguments.
904         * cp-tree.h (struct template_parm_index_s): Add flag that
905         indicates that the template parameter is actually a parameter
906         pack.
907         (struct tree_argument_pack_select): New.
908         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
909         (union lang_tree_node): Add argument_pack_select.
910         (FUNCTION_PARAMETER_PACK_P): New.
911         (PACK_EXPANSION_P): New.
912         (PACK_EXPANSION_PATTERN): New.
913         (SET_PACK_EXPANSION_PATTERN): New.
914         (PACK_EXPANSION_PARAMETER_PACKS): New.
915         (ARGUMENT_PACK_P): New.
916         (ARGUMENT_PACK_ARGS): New.
917         (SET_ARGUMENT_PACK_ARGS): New.
918         (ARGUMENT_PACK_INCOMPLETE_P): New.
919         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
920         (TEMPLATE_PARM_PARAMETER_PACK): New.
921         (TEMPLATE_TYPE_PARAMETER_PACK): New.
922         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
923         (ARGUMENT_PACK_SELECT_INDEX): New.
924         (ARGUMENT_PACK_SELECT_ARG): New.
925         (struct cp_declarator): Add parameter_pack_p flag.
926         (maybe_warn_variadic_templates): Declare.
927         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
928         indicate a template parameter pack. 
929         (uses_parameter_packs): Declare.
930         (template_parameter_pack_p): Declare.
931         (template_parms_variadic_p): Declare.
932         (make_pack_expansion): Declare.
933         (check_for_bare_parameter_packs): Declare.
934         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
935         sizeof... expressions. 
936         (pp_cxx_expression): Print pack expansions and non-type argument
937         packs.
938         (pp_cxx_exception_specification): Print pack expansions. 
939         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
940         (pp_cxx_ctor_initializer): Print pack expansions.
941         (pp_cxx_type_id): Print pack expansions.
942         (pp_cxx_template_argument_list): Print argument packs.
943         (pp_cxx_template_parameter): Print ellipsis for template parameter
944         packs.
945         * pt.c (comp_template_parms): Compare template parameter packs.
946         (template_parameter_pack_p): New.
947         (template_parms_variadic_p): New.
948         (template_args_variadic_p): New.
949         (make_ith_pack_parameter_name): New.
950         (struct find_parameter_pack_data): New.
951         (find_parameter_packs_r): New.
952         (uses_parameter_packs): New.
953         (make_pack_expansion): New.
954         (check_for_bare_parameter_packs): New.
955         (expand_template_argument_pack): New.
956         (reduce_template_parm_level): Propagate parameter pack flag.
957         (process_template_parm): Add is_parameter_pack parameter to state
958         when the parameter is actually a parameter pack. Create template
959         parameter packs when is_parameter_pack is true.
960         (current_template_args): The argument for a template parameter
961         pack is an argument pack containing a single pack expansion.
962         (process_partial_specialization): When checking that non-type
963         argument expressions do not involve template parameters, loop over
964         the arguments in argument packs separately.
965         (push_template_decl_real): Check that the type of the declaration
966         does not have any bare parameter packs. Check that primary
967         templates have no more than one parameter pack, and that it comes
968         at the end of the template parameter list.
969         (convert_template_argument): Handle coercions for pack expansion
970         expressions by coercing the pattern then rebuilding the expansion.
971         (coerce_template_parms): When coercing the arguments for a
972         variadic template, pack "extra" arguments into an argument pack.
973         (coerce_template_template_parms): Cannot coerce between parameter
974         packs and non-pack parameters.
975         (template_args_equal): Compare PACK_EXPANSION_P expressions.
976         (comp_template_args): Expand all template arguments packs before
977         comparing template argument lists.
978         (mangle_class_name_for_template): Make argument packs as separate
979         template arguments.
980         (for_each_template_parm_r): No need to handle BASELINK. 
981         (instantiate_class_template): Handle pack expansions in the base
982         class list.
983         (tsubst_pack_expansion): New.
984         (tsubst_template_args): Handle substitutions of argument packs and
985         pack expansion into template argument lists.
986         (tsubst_decl): Expand function parameter packs into separate
987         function parameters.
988         (tsubst_arg_types): Expand a type pack expansion into separate
989         argument types.
990         (tsubst_exception_specification): Handle pack expansions in
991         exception specifiers.
992         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
993         replacing a template parameter with its argument. If we encounter
994         a substitution for an argument pack, just return the parameter
995         itself. 
996         (tsubst_copy): sizeof(X...) returns the number of elements in
997         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
998         PARM_DECL is a parameter pack.
999         (tsubst_expr): Expression pack expansions and argument packs
1000         cannot show up here; they will all be handled through function
1001         calls, sizeof, and template argument lists.
1002         (tsubst_copy_and_build): sizeof(X...) returns the number of
1003         elements in parameter pack X.  Handle pack expansions in TREE_LIST
1004         and CONSTRUCTOR nodes.
1005         (fn_type_unification): Handle "incomplete" explicit template
1006         argument lists that specify some of the arguments for a template
1007         parameter pack.
1008         (type_unification_real): Unify arguments against pack expansions.
1009         (template_parm_level_and_index): New, helper function.
1010         (unify_pack_expansion): New.
1011         (unify): Unify argument packs on an argument-by-argument basis,
1012         handling variadic argument packs as well.
1013         (more_specialized_fn): Handle unification of function parameter
1014         packs. All things being equal, prefer non-variadic function
1015         templates to variadic function templates.
1016         (more_specialized_class): Prefer the variadic class template
1017         partial specialization that binds fewer arguments to a parameter
1018         pack.
1019         (regenerate_decl_from_template): Expand function parameter packs
1020         into separate parameters.
1021         (instantiate_decl): Ditto.
1022         (tsubst_initializer_list): Handle pack expansions for base-class
1023         initializers.
1024         (dependent_type_p_r): Determine dependent types in argument packs
1025         and pack expansions.
1026         (value_dependent_expression_p): Determine value-dependence of
1027         non-type argument packs.
1028         (dependent_template_arg_p): Handle argument packs.
1029         * semantics.c (finish_cond): Check for bare parameter packs.
1030         (finish_expr_stmt): Ditto.
1031         (finish_for_expr): Ditto.
1032         (finish_switch_cond): Ditto.
1033         (finish_mem_initializers): Ditto.
1034         * name-lookup.c (arg_assoc_type): Handle pack expansions and
1035         argument packs.
1036         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1037         * parser.c (make_declarator): Declarator is not an expansion.
1038         (make_pointer_declarator): Transfer parameter pack flag to outer
1039         declarator.
1040         (make_reference_declarator): Ditto.
1041         (make_ptrmem_declarator): Ditto.
1042         (make_call_declarator): Ditto.
1043         (make_array_declarator): Ditto.
1044         (cp_parser_postfix_expression): Allow pack expansion expressions
1045         in the argument list for a call expression.
1046         (cp_parser_parenthesized_expression_list): Add new parameter
1047         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1048         into separate arguments."
1049         (cp_parser_new_placement): Allow pack expansion expressions.
1050         (cp_parser_new_initializer): Ditto.
1051         (cp_parser_mem_initializer_list): Allow ellipsis to create a
1052         base-class initializer expansion.
1053         (cp_parser_mem_initializer): Ditto.
1054         (cp_parser_template_parameter_list): Keep track of whether the
1055         template parameter is a template parameter pack.
1056         (cp_parser_template_parameter): Parse the ellipsis to indicate a
1057         template parameter pack.
1058         (cp_parser_type_parameter): Ditto.
1059         (cp_parser_template_argument_list): Parse the ellipsis to indicate
1060         a pack expansion.
1061         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1062         this declarator is a parameter pack.
1063         (cp_parser_parameter_declaration): The ellipsis does not end the
1064         parameter declaration, because it might be a parameter pack. Parse
1065         the ellipsis to indicate a parameter pack.
1066         (cp_parser_initializer): Allow pack expansions.
1067         (cp_parser_initializer_list): Allow ellipsis to create an
1068         initializer expansion.
1069         (cp_parser_base_clause): Allow ellipsis to create a base specifier
1070         expansion.
1071         (cp_parser_type_id_list): Allow ellipsis to create an exception
1072         specifier expansion.
1073         (cp_parser_attribute_list): Don't allow pack expansions.
1074         (cp_parser_functional_cast): Allow pack expansions.
1075         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1076         compute the length of a parameter pack.
1077         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1078         end a template argument.
1079         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1080         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1081         CAST_EXPR. 
1082
1083 2007-03-09  Dirk Mueller  <dmueller@suse.de>
1084
1085         * cp/call.c (build_new_op): Call warn_logical_operator.
1086
1087 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
1088
1089         PR c++/30852
1090         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1091
1092         PR c++/30534
1093         * pt.c (any_template_arguments_need_structural_equality_p):
1094         Robustify.
1095
1096 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
1097
1098         * decl.c (grokdeclarator): Disable warnings for anonymous
1099         bitfields.
1100
1101 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
1102
1103         * typeck2.c (readonly_error): Always emit a hard error.
1104         Remove last argument.
1105         * cp-tree.h (readonly_error): Adjust prototype.
1106         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1107         * typeck.c (build_unary_op): Likewise.
1108         (build_modify_expr): Likewise.
1109
1110 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
1111
1112         PR c++/30895
1113         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1114
1115 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1116
1117         PR c++/15787
1118         * parser.c (struct cp_parser): New IN_IF_STMT.
1119         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1120         returning if parsing the body of an 'if' statement or issuing an
1121         error and continuing.
1122         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1123         body of 'if'.
1124         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1125         
1126 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
1127
1128         PR c++/28253
1129         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1130         for thunks.
1131
1132 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
1133
1134         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1135         Objective-C++.  Don't exit early if -shared-libgcc needs to be
1136         added.
1137
1138 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1139
1140         * typeck.c (common_base_type): Delete unused function.
1141         
1142 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1143
1144         * Make-lang.in: Add dummy lang.install-pdf target.
1145
1146 2007-03-01  Simon Baldwin <simonb@google.com>
1147
1148         PR c++/23689
1149         * decl.c (check_tag_decl): Added new warning for typedef ignored
1150         when it precedes an otherwise valid non-typedef declaration.
1151
1152 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
1153
1154         * typeck.c (build_function_call): Store converted arguments
1155         in a stack-allocated array instead of building a list.
1156         (convert_arguments): Store arguments in the array passed in as an
1157         argument, and return the actual number of arguments.
1158         * call.c (build_call): Delete, and replace with...
1159         (build_call_n, build_call_a): New.
1160         (build_op_delete_call): Rewrite to avoid constructing argument lists.
1161         (build_over_call): Store converted arguments in a stack-allocated
1162         array instead of building a list.
1163         (build_cxx_call): Pass arguments in an array instead of as a list.
1164         (build_java_interface_fn_ref): Rewrite to avoid constructing
1165         argument lists.
1166         * tree.h: Update declarations to reflect above changes.
1167         * method.c (use_thunk): Use a stack-allocated array to hold
1168         the arguments instead of a list.
1169         * rtti.c (throw_bad_cast): Update call to cxx_call.
1170         (throw_bad_typeid): Likewise.
1171         (build_dynamic_cast_1): Likewise.
1172         * init.c (build_builtin_delete_call): Use build_call_n.
1173         * decl.c (expand_static_init): Likewise.
1174         * except.c (cp_protect_cleanup_actions): Likewise.
1175         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1176         (gimplify_must_not_throw_expr): Likewise.
1177         (cxx_omp_apply_fn): Use build_call_a.
1178
1179 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
1180
1181         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1182         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1183
1184 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
1185
1186         * cp-tree.h (static_ctors): Remove.
1187         * cp-tree.h (static_dtors): Likewise.
1188         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1189         refactoring of tree_map hierarchy.
1190         (decl_shadowed_for_var_insert): Likewise.
1191         * semantics.c (expand_body): Use c_expand_body.
1192         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1193         * decl2.c (static_ctors): Remove.
1194         (static_dtors): Likewise.
1195         (generate_ctor_or_dtor_function): Pass NULL_TREE to
1196         objc_generate_static_init_call.  Do not call static_[cd]tors.
1197         (generate_ctor_and_dtor_functions_for_priority): Do not check for
1198         static_[cd]tors.
1199         (cp_write_global_declarations): Likewise.
1200
1201 2007-02-23  Richard Guenther  <rguenther@suse.de>
1202
1203         * class.c (note_name_declared_in_class): Make declaration
1204         changes meaning a pedwarn.
1205
1206 2007-02-22  Michael Matz  <matz@suse.de>
1207
1208         PR c++/29433
1209         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1210         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1211         dump_function_decl): Guard emitting outer scopes by new flag.
1212         * cp-lang.c (cxx_dwarf_name): New function.
1213         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1214         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1215         Remove functions.
1216         (push_template_decl_real, lookup_template_class): Remove calls
1217         to above functions.
1218
1219 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
1220
1221         * call.c (build_new_method_call): Ensure that explicit calls of
1222         destructors have type "void".
1223
1224 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1225
1226         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1227         and -Walways-true with -Waddress.
1228         * cvt.c (convert_to_void): Replace unconditional warning with
1229         -Waddress.
1230
1231 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1232
1233         * decl.c, tree.c: Fix comment typos.
1234
1235 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1236
1237         PR C++/30158
1238         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
1239         statement expression if we had an error mark node.
1240
1241 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1242             Brooks Moses  <brooks.moses@codesourcery.com>
1243             Lee Millward  <lee.millward@codesourcery.com>
1244
1245         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1246         Change class to tcc_vl_exp.
1247
1248         * call.c (build_call): Use build_call_list instead 
1249         of build3. 
1250         (build_over_call): Likewise.
1251         (build_new_method_call): Use build_min_non_dep_call_list 
1252         instead of build_min_non_dep.
1253
1254         * error.c (dump_call_expr_args): New function.
1255         (dump_aggr_init_expr_args): New function.
1256         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
1257         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1258
1259         * cvt.c (convert_to_void): Use build_call_array instead
1260         of build3; use new AGGR_INIT_EXPR accessor macros.
1261
1262         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1263         instead of TREE_CODE_LENGTH.
1264
1265         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1266         AGGR_INIT_EXPR accessor macros.
1267
1268         * cp-gimplify.c (cp_gimplify_init_expr): Use 
1269         AGGR_INIT_EXPR_SLOT to set the slot operand.
1270
1271         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1272         (AGGR_INIT_EXPR_SLOT): New macro.
1273         (AGGR_INIT_EXPR_ARG): New macro.
1274         (aggr_init_expr_nargs): New macro.
1275         (AGGR_INIT_EXPR_ARGP): New macro.
1276         (aggr_init_expr_arg_iterator): New.
1277         (init_aggr_init_expr_arg_iterator): New.
1278         (next_aggr_init_expr_arg): New.
1279         (first_aggr_init_expr_arg): New.
1280         (more_aggr_init_expr_args_p): New.
1281         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1282         (stabilize_aggr_init): New declaration.
1283         (build_min_non_dep_call_list): Likewise.
1284
1285         * tree.c (process_aggr_init_operands): New function.
1286         (build_aggr_init_array) New function.
1287         (build_cplus_new): Update to use new CALL_EXPR and
1288         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1289         build_aggr_init_array.
1290         (build_min_non_dep_call_list) New function.
1291         (build_min_nt): Assert input code parameter is not a variable
1292         length expression class.
1293         (build_min, build_min_non_dep): Likewise.
1294         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1295         to check for equality instead of recursing. Handle tcc_vl_exp
1296         tree code classes.
1297         (stabilize_call): Update to only handle CALL_EXPRs, not 
1298         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
1299         (stabilize_aggr_init): New function.
1300         (stabilize_init): Use it.
1301
1302         * cxx-pretty-print.c (pp_cxx_postfix_expression)
1303         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
1304         AGGR_INIT_EXPR accessor macros and argument iterators.
1305         
1306         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
1307         build_vl_exp. Iterate through the operands, recursively 
1308         processing each one.
1309         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
1310         CALL_EXPR accessor macros.
1311         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
1312         tree code classes. Use TREE_OPERAND_LENGTH instead of 
1313         TREE_CODE_LENGTH.
1314
1315         * semantics.c (finish_call_expr): Use build_nt_call_list
1316         instead of build_nt.
1317         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
1318         accessor macros. Use build_call_array to construct the 
1319         CALL_EXPR node instead of build3
1320         
1321         * decl2.c (build_offset_ref_call_from_tree): Use 
1322         build_nt_call_list and build_min_non_dep_call_list instead
1323         of build_min_nt and build_min_non_dep.
1324
1325         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
1326         Use build_nt_call_list instead of build_min_nt.
1327
1328 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1329
1330         PR c++/28943
1331         * call.c (build_conditional_expr): Improve error message.
1332         
1333 2007-02-13  Dirk Mueller  <dmueller@suse.de>
1334
1335         * friend.c (do_friend): Annotate warning about friend
1336         declarations in templates with OPT_Wnon_template_friend.
1337         Convert informal message from warning() to inform().
1338
1339 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
1340             Mark Mitchell  <mark@codesourcery.com>
1341
1342         PR c++/14622
1343         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
1344         instantiations for variables.
1345
1346 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1347
1348         PR middle-end/7651
1349         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
1350         Check warn_unused_value just once.
1351
1352 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
1353
1354         PR c++/26988
1355         * pt.c (determine_specialization): Use skip_artificial_parms_for.
1356         (fn_type_unificiation): Likewise.
1357         (get_bindings): Likewise.
1358
1359 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
1360
1361         PR target/29487
1362         * decl.c (finish_function): Use DECL_REPLACEABLE.
1363         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1364
1365 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1366
1367         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
1368
1369 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
1370
1371         * decl.c (grokvardecl): Don't error if !have_tls.
1372         (grokdeclarator): Likewise.
1373         * parser.c (cp_parser_omp_threadprivate): Likewise.
1374
1375 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
1376
1377         PR c++/30703
1378         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
1379         parameters and result decls in omp clauses.
1380         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
1381         by reference.
1382
1383 2007-02-05  Dirk Mueller  <dmueller@suse.de>
1384
1385         PR bootstrap/30510
1386         * parser.c (cp_parser_class_specifier): Always initialize bases.
1387
1388 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1389
1390         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
1391         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
1392         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
1393         expressions.
1394         * semantics.c (finish_omp_atomic): Store a whole expression node
1395         in operand 1, and integer_zero_node in operand 0, for dependent
1396         OMP_ATOMIC.  Rewrite to make flow easier to understand.
1397
1398 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1399
1400         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
1401
1402 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
1403
1404         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
1405         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
1406
1407 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
1408
1409        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
1410        keyword warning to -Wc++0x-compat.
1411         
1412 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1413
1414         * decl.c (grokdeclarator): Update documentation.
1415
1416 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
1417
1418         PR c++/30536
1419         * decl.c (grokdeclarator): If __thread is used together with
1420         a storage class other than extern and static, clear thread_p
1421         after issuing diagnostics and fall through to checking the
1422         storage class.
1423
1424 2007-01-30  Roger Sayle  <roger@eyesopen.com>
1425
1426         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
1427         calculating the size of an array (to avoid recursive errors).
1428
1429 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1430
1431         PR c++/24745
1432         * typeck.c (build_binary_op): Fix logic for warning. Move warning
1433         to -Wpointer-arith.
1434         * call.c (convert_like_real): Don't warn when converting to
1435         boolean type.
1436         
1437 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1438
1439         * decl.c (pop_label): Replace warning with call to
1440         warn_for_unused_label.
1441
1442 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
1443
1444         PR C++/28988
1445         * semantics.c (finish_pseudo_destructor_expr): Check the
1446         destrutor name by calling check_dtor_name.
1447
1448 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
1449
1450         * lex.c (D_CPP0X): Rename.
1451         (D_CXX0X): To this.
1452         (reswords): D_CPP0X -> D_CXX0X.
1453         (init_reswords): Ditto.
1454         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
1455         of C++0x keywords as identifiers.
1456
1457 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
1458
1459         PR c++/27492
1460         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
1461         function decls.
1462
1463 2007-01-23  Ian Lance Taylor  <iant@google.com>
1464
1465         * typeck.c (convert_for_assignment): Only warn about a = b = c
1466         when converting to bool.
1467
1468 2007-01-23  Roger Sayle  <roger@eyesopen.com>
1469
1470         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
1471         TREE_OVERFLOW.
1472         * typeck.c (ignore_overflows): Remove the remaining uses of
1473         TREE_CONSTANT_OVERFLOW.
1474
1475 2007-01-20  Jan Hubicka  <jh@suse.cz>
1476
1477         * decl2.c (start_objects, start_static_storage_duration_function):
1478         Do not make the functions uninlinable.
1479
1480 2007-01-17  Ian Lance Taylor  <iant@google.com>
1481
1482         * class.c (add_method): Call VEC_reserve_exact rather than passing
1483         a negative size to VEC_reserve.
1484
1485 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
1486
1487         PR c++/29573
1488         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
1489
1490 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
1491
1492         PR c++/28999
1493         * decl.c (make_typename_type): If the qualified name is not a
1494         type, issue an error.
1495         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
1496         formatting.
1497
1498 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
1499
1500         * rtti.c: Include target.h.
1501         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
1502         don't emit typeinfo for fundamental types as weak.
1503         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
1504
1505 2007-01-08  Richard Guenther  <rguenther@suse.de>
1506
1507         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
1508
1509 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
1510
1511         * call.c (standard_conversion): Pass flag to
1512         vector_types_convertible_p to disallow emission of note.
1513         * typeck.c (convert_for_assignment): Pass flag to
1514         vector_types_convertible_p to allow emission of note.
1515         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
1516         to disallow emission of note.
1517
1518 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1519
1520         PR c++/28986
1521         * typeck.c (build_binary_op): Call overflow_warning if
1522         TREE_OVERFLOW_P is true for the result and not for any of the
1523         operands.
1524         
1525 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
1526
1527        PR c++/19439
1528        * class.c (add_method): Don't wait until template
1529        instantiation time to complain about duplicate methods.
1530         
1531 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1532
1533         PR c/19978
1534         * semantics.c (finish_unary_op_expr): Warn only if result
1535         overflowed and operands did not.
1536
1537 2007-01-05  Ian Lance Taylor  <iant@google.com>
1538
1539         * typeck.c (build_binary_op): Warn about comparing a non-weak
1540         address to NULL.
1541
1542 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
1543
1544         * pt.c (tsubst): Propagate the need for structural equality checks
1545         when reducing the level of template parameters.
1546
1547 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
1548
1549         * pt.c: Fix a comment typo.
1550
1551 2007-01-02  Ian Lance Taylor  <iant@google.com>
1552
1553         * semantics.c (maybe_convert_cond): Optionally warn when using an
1554         assignment as a condition.
1555         * typeck.c (convert_for_assignment): Optionally warn about
1556         assigning the result of an assignment to a bool.
1557
1558 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
1559
1560         * pt.c (canonical_template_parms): Correct typo in comment.
1561         
1562 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
1563
1564         * typeck.c (structural_comptypes): Renamed from "comptypes".
1565         (comptypes): Use canonical type information to perform fast type
1566         comparison. When VERIFY_CANONICAL_TYPES, verify that the
1567         canonical type comparison returns the same results as we would see
1568         from the current, structural check. Support COMPARE_STRUCTURAL
1569         when we need structural checks.
1570         * decl.c (typename_compare): Fix comment.
1571         (build_typename_type): TYPENAME_TYPE nodes require structural
1572         equality checks, because they resolve different based on the
1573         current class type.
1574         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
1575         require structural equality checks (for now).
1576         (build_ptrmemfunc_type): Build the canonical pointer to member
1577         function type.
1578         (compute_array_index_type): Whenever we build a new index type
1579         to represent the size of an array in a template, we need to mark
1580         this index type as requiring structural equality. This goes for
1581         arrays with value-dependent sizes with the current ABI, or all
1582         arrays with ABI-1.
1583         * tree.c (cplus_array_hash): New.
1584         (struct cplus_array_info): New.
1585         (cplus_array_compare): New.
1586         (cplus_array_htab): New.
1587         (build_cplus_array_type_1): Use a hash table to cache the array
1588         types we build. Build the canonical array type for each array
1589         type.
1590         (cp_build_qualified_type_real): When building a cv-qualified array
1591         type, use the hash table of array types and build canonical array
1592         types as necessary.
1593         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
1594         use structural equality (for now).
1595         * cp-tree.h (COMPARE_STRUCTURAL): New.
1596         * pt.c (canonical_template_parms): New.
1597         (canonical_type_parameter): New.
1598         (process_template_parm): Find the canonical type parameter.
1599         (lookup_template_class): When we have named the primary template
1600         type, set the canonical type for our template class to the primary
1601         template type. If any of the template arguments need structural
1602         equality checks, the template class needs structural equality
1603         checks.
1604         (tsubst): When reducing the level of a template template
1605         parameter, we require structural equality tests for the resulting
1606         parameter because its template parameters have not had their types
1607         canonicalized. When reducing a template type parameter, find the
1608         canonical reduced type parameter.
1609         (any_template_arguments_need_structural_equality_p): New.
1610