OSDN Git Service

2007-10-12 Paolo Carlini <pcarlini@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2007-10-12  Paolo Carlini  <pcarlini@suse.de>
2
3         * pt.c (tsubst): Use template_parm_level_and_index.
4
5 2007-10-12  Jakub Jelinek  <jakub@redhat.com>
6
7         PR c++/32121
8         * parser.c (cp_parser_compound_statement): Handle label-declarations
9         at the beginning of the compound statement.
10         (cp_parser_block_declaration): Issue diagnostics about __label__
11         not at the beginning of a block.
12
13 2007-10-11  Paolo Carlini  <pcarlini@suse.de>
14
15         PR c++/33461
16         * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
17         to convert_template_argument.
18         (coerce_template_parms): Return error_mark_node after fixed-length
19         error.
20         (tsubst_decl): Check for error_mark_node the return value of the
21         first tsubst in 'case VAR_DECL'.
22
23 2007-10-08  Ollie Wild  <aaw@google.com>
24
25         * typeck2.c (digest_init): Call cplus_expand_constant after
26         convert_for_initialization.
27         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
28         * expr.c (cplus_expand_constant): Updated function description.
29
30 2007-10-04  Jason Merrill  <jason@redhat.com>
31
32         PR c++/20416
33         * call.c (initialize_reference): Handle local static reference
34         temps properly.
35
36 2007-10-03  Jason Merrill  <jason@redhat.com>
37
38         PR c++/32470
39         * name-lookup.c (push_namespace_with_attrs): Fold back into...
40         (push_namespace): Here.
41         (handle_namespace_attrs): New fn for the attr code.
42         (leave_scope): Don't pop_visibility.
43         * name-lookup.h (struct cp_binding_level): Remove has_visibility.
44         * parser.c (cp_parser_namespace_definition): Call
45         handle_namespace_attrs and pop_visibility as appropriate. 
46
47         PR c++/11756
48         * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
49
50 2007-10-03  Alexandre Oliva  <aoliva@redhat.com>
51
52         * decl.c (duplicate_decls): Preserve linkage flags for mere
53         redeclarations of gnu_inline definitions.
54
55 2007-10-03  Jason Merrill  <jason@redhat.com>
56
57         PR c++/15764
58         * decl.c (wrap_cleanups_r): New fn.
59         (wrap_temporary_cleanups): New fn.
60         (initialize_local_var): Call it.
61
62 2007-09-29  Jason Merrill  <jason@redhat.com>
63
64         PR c++/33094
65         * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member 
66         constant to not have DECL_EXTERNAL if it's file-local.
67
68 2007-09-28  Ollie Wild  <aaw@google.com>
69
70         Revert
71         2007-09-27  Ollie Wild  <aaw@google.com>
72
73         * typeck2.c (digest_init): Call cplus_expand_constant after
74         convert_for_initialization.
75         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
76         * expr.c (cplus_expand_constant): Updated function description.
77
78 2007-09-28  Jason Merrill  <jason@redhat.com>
79
80         PR c++/10179
81         * class.c (layout_empty_base): Take rli parameter, update
82         rli->record_align if empty base has user-specified alignment.
83         (build_base_field): Pass rli to it.
84
85 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
86
87         PR c++/33213
88         * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
89
90 2007-09-28  Paolo Carlini  <pcarlini@suse.de>
91
92         PR c++/33118
93         * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
94         (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
95         (dump_parameters): Just call dump_type for argument packs too.
96
97 2007-09-28  Jakub Jelinek  <jakub@redhat.com>
98
99         PR c++/31434
100         * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
101         qualification by creating qualified PACK_EXPANSION_PATTERN and
102         then calling make_pack_expansion on it.
103
104 2007-09-27  Ollie Wild  <aaw@google.com>
105
106         * typeck2.c (digest_init): Call cplus_expand_constant after
107         convert_for_initialization.
108         * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
109         * expr.c (cplus_expand_constant): Updated function description.
110
111 2007-09-27  Jason Merrill  <jason@redhat.com>
112
113         PR c++/33571
114         * decl2.c (is_late_template_attribute): Don't crash on unknown
115         attribute.
116
117 2007-09-27  Paolo Carlini  <pcarlini@suse.de>
118
119         PR c++/33493
120         * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
121         * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
122         spaces in the formatting.
123         * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
124
125 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
126
127         * error.c (cxx_print_error_function): Add third argument, pass
128         it over to lhd_print_error_function.
129         (cp_print_error_function): If diagnostic->abstract_origin, print
130         virtual backtrace.
131         * cp-tree.h (struct diagnostic_info): New forward decl.
132         (cxx_print_error_function): Add third argument.
133
134 2007-09-25  Simon Martin  <simartin@users.sourceforge.net>
135
136         PR c++/33207
137         * name-lookup.c (pushtag): Do not create an implicit typedef before
138         the associated type declaration is known to be valid.
139
140 2007-09-25  Jakub Jelinek  <jakub@redhat.com>
141
142         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
143         rather than pointers.
144
145 2007-09-24  Danny Smith  <dannysmith@user.sourceforge.net>
146
147         PR c++/14688
148         * search.c (check_final_overrider): Fail if
149         targetm.comp_type_attributes returns 0.
150
151 2007-09-24  Jason Merrill  <jason@redhat.com>
152
153         PR c++/33239
154         * pt.c (resolve_typename_type): Don't look things up in the original
155         template if it would mean losing template arguments.    
156
157 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
158
159         PR c++/33506
160         * cp-tree.h (cxx_type_hash_eq): New prototype.
161         * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
162         * tree.c (cxx_type_hash_eq): New function.
163
164 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
165
166         PR c++/33185    
167         * tree.c (cp_build_qualified_type_real): Build a canonical
168         ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
169         
170 2007-09-24  Douglas Gregor  <doug.gregor@gmail.com>
171
172         PR c++/33112
173         PR c++/33185    
174         * tree.c (cplus_array_compare): Compare pointers, not types.
175         (build_cplus_array_type_1): Store new array type into the hash
176         table before building the canonical type; build the canonical type
177         correctly.
178         (cp_build_qualified_type_real): Put all of the array types with
179         cv-qualified element types into the C++ array hash table, built as 
180         variants of the unqualified versions.
181         
182 2007-09-23  Jason Merrill  <jason@redhat.com>
183
184         PR c++/16370
185         * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
186         for deprecation warnings.
187
188 2007-09-22  Jason Merrill  <jason@redhat.com>
189
190         PR c++/15269
191         * call.c (build_over_call): Warn about deprecated virtuals.
192
193         PR c++/19407
194         * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
195         (MAYBE_TAGGED_TYPE_P): Remove.
196         * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
197         instead of calling is_late_template_attribute again.
198         (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
199         (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
200         Don't crash on typedefs from non-template classes.
201         * decl2.c (grokfield): Don't sorry about attrs on template parms.
202         (is_late_template_attribute): All attributes applied to template
203         parms or typename types are dependent.  Static.
204         (splice_template_attributes): Pass decl through.
205         (save_template_attributes): Likewise.
206
207 2007-09-20  Jakub Jelinek  <jakub@redhat.com>
208
209         PR c++/33496
210         * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
211         returned from tsubst_pack_expansion.
212         (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
213         (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
214
215 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
216
217         PR c++/33460
218         * semantics.c (finish_id_expression): Use consistently
219         context_for_name_lookup.
220         * decl.c (fixup_anonymous_aggr): Fix error message for
221         anonymous struct (vs union).
222
223 2007-09-19  Jason Merrill  <jason@redhat.com>
224
225         PR c++/7586
226         * pt.c (tsubst): Handle typedefs by looking for the specialization.
227         (retrieve_specialization): Only tagged types use 
228         DECL_TEMPLATE_INSTANTIATIONS.
229         (instantiate_class_template): Push nested classes too.
230         (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
231         tagged types.
232         * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
233         * init.c (is_aggr_type): Remove redundant tests.
234         * class.c (push_nested_class): Use CLASS_TYPE_P.
235
236 2007-09-20  Paolo Carlini  <pcarlini@suse.de>
237
238         PR c++/33459
239         * init.c (build_zero_init): If, recursively, build_zero_init
240         returns a NULL_TREE, do not append it to the VEC of constructors.
241
242 2007-09-18  Jason Merrill  <jason@redhat.com>
243
244         PR c++/17743
245         * pt.c (apply_late_template_attributes): Set processing_template_decl.
246         (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
247         ATTR_FLAG_TYPE_IN_PLACE.
248         (tsubst): Do unqualified lookup to find typedefs from current class.
249         [ARRAY_TYPE]: Propagate alignment info.
250         * decl2.c (is_late_template_attribute): Only defer handling of
251         attribute aligned if the expression is dependent.
252         (save_template_attributes): If we're deferring any attributes,
253         make this a naming typedef.
254
255 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
256
257         PR c++/33462 (again)
258         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
259         va_arg instead of __builtin_va_arg.
260
261 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
262
263         PR c++/33462
264         * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
265         (pp_cxx_primary_expression): Use it.
266         * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
267         * error.c (dump_expr): Use it.
268
269 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
270
271         PR c++/33463
272         * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
273         out case TYPEID_EXPR to...
274         (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
275         and pp_cxx_right_paren.
276         * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
277         * error.c (dump_expr): Use it.
278
279 2007-09-18  Paolo Carlini  <pcarlini@suse.de>
280
281         PR c++/33464
282         * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
283         (pp_cxx_primary_expression): Use it.
284         * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
285         * error.c (dump_expr): Use it.
286
287 2007-09-16  Paolo Carlini  <pcarlini@suse.de>
288
289         PR c++/33124
290         * init.c (build_new): Remove warning for zero-element
291         allocations.
292
293 2007-09-16  Nathan Sidwell  <nathan@codesourcery.com>
294
295         PR c++/32756
296         * call.c (maybe_handle_implicit_object): Set this_p, clear
297         rvaluedness_matches_p.
298         (compare_ics): Do not compare rvaluedness matching when one of the
299         operands is an implicit object.
300
301 2007-09-14  Jason Merrill  <jason@redhat.com>
302
303         PR c++/17743, c++/19163
304         * decl2.c (is_late_template_attribute): New fn.
305         (splice_template_attributes, save_template_attributes): New fns.
306         (cplus_decl_attributes): Call save_template_attributes.
307         * pt.c (apply_late_template_attributes): New fn.
308         (instantiate_class_template, tsubst_decl): Use it.
309         * cp-tree.h: Declare is_late_template_attribute.
310
311 2007-09-13  Tom Tromey  <tromey@redhat.com>
312
313         * parser.c (cp_lexer_new_main): Don't use
314         c_lex_return_raw_strings.
315         (cp_lexer_get_preprocessor_token): Update.  Add special case when
316         lexer is NULL.
317
318 2007-09-11  Jan Hubicka <jh@suse.cz>
319
320         * method.c (use_thunk): Use tree_rest_of_compilation
321         * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
322         (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
323         * cp-tree.h (expand_body): Kill.
324         (emit_associated_thunks): Declare.
325         * semantics.c (emit_associated_thunks): Export.
326         (expand_body): Kill.
327
328 2007-09-09  David Daney  <ddaney@avtrex.com>
329
330         PR c++/33324
331         * init.c (build_new_1):  Use POINTER_PLUS_EXPR instead of MINUS_EXPR
332         to calculate cookie_ptr.
333
334 2007-09-08  Jason Merrill  <jason@redhat.com>
335
336         PR c++/33342
337         * pt.c (most_specialized_class): Set processing_template_decl
338         while tsubsting partial spec args.
339
340 2007-09-06  Jason Merrill  <jason@redhat.com>
341
342         * decl2.c (get_guard): Copy visibility from the guarded variable.
343
344 2007-09-06  Jan Hubicka  <jh@suse.cz>
345
346         * semantics.c (expand_body): Do not mark arguments of clones used.
347
348 2007-09-06  Paolo Carlini  <pcarlini@suse.de>
349
350         PR c++/32674
351         * decl.c (cp_finish_decl): When processing_template_decl,
352         deal correctly with init as TREE_LIST.
353
354 2007-09-06  Tom Tromey  <tromey@redhat.com>
355
356         * decl.c (finish_function): Put return's location on line zero of
357         file.
358
359 2007-09-05  Jason Merrill  <jason@redhat.com>
360
361         PR c++/15745
362         * except.c (prepare_eh_type): Use type_decays_to.
363
364         PR c++/15097
365         * init.c (build_delete): Use build_headof to get the address of the
366         complete object if we aren't using the deleting destructor.
367         * rtti.c (build_headof): No longer static.
368         * cp-tree.h: Declare it.
369
370 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
371
372         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
373         decl if a prototype for XX is provided with throw().
374
375         PR c++/33289
376         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
377         on __*_chk non-__builtin_* decls.
378
379 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
380
381         PR c++/30302
382         * semantics.c (finish_id_expression): Use context_for_name_lookup
383         insted of DECL_CONTEXT, to see through anonymous structs and unions.
384         * class.c (finish_struct_anon): Deal correctly with anonymous
385         structs (vs unions, as GNU extension) in error messages.
386
387 2007-09-05  Jan Hubicka  <jh@suse.cz>
388
389         * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
390         call, DECL_EXTERNAL checks and current_function_decl saving.
391
392 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
393
394         PR c++/29731 (again)
395         * parser.c (cp_parser_primary_expression): Return error_mark_node
396         when a statement-expression is found in a template-argument list.
397
398 2007-09-04  Jason Merrill  <jason@redhat.com>
399
400         * except.c (initialize_handler_parm): Use
401         fold_build_cleanup_point_expr.
402
403         PR c++/31419
404         * call.c (reference_binding): Don't look for user-defined conversions
405         to the same type.
406
407         PR c++/31411
408         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
409         the MUST_NOT_THROW_EXPR.
410
411 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
412
413         * decl.c (cp_finish_decl): Call determine_visibility before
414         make_rtl_for_nonlocal_decl.
415
416 2007-09-04  Jason Merrill  <jason@redhat.com>
417
418         PR c++/14032
419         * pt.c (most_specialized_class): Substitute outer template
420         arguments into the arguments of a member template partial
421         specialization.
422         (strip_innermost_template_args): New fn.
423
424 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
425
426         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
427
428 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
429
430         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
431         * decl.c (cp_make_fname_decl): Likewise,
432         * parser.c (cp_parser_string_literal): Likewise,
433         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
434         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
435         Likewise,
436
437 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
438
439         PR c++/33208
440         * typeck.c (build_unary_op): Fix error message for
441         Boolean expression as operand to operator--.
442
443 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
444
445         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
446         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
447         Likewise.
448
449 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
450
451         PR c++/32597
452         * init.c (build_default_init): Make extern.
453         * cp-tree.h (build_default_init): Declare here.
454         * pt.c (tsubst_expr): When the instantiation of the initializer of
455         a variable results in an empty list, default-initialize the
456         variable.
457         (tsubst_copy_and_build): When the instantiation of the initializer
458         in a new expression results in an empty initializer list,
459         default-initialize it.
460
461 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
462
463         * mangle.c (write_type): Change mangling of rvalue reference from
464         `RR' to `O'. 
465
466 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
467
468         * decl.c (duplicate_decls): Remove duplicated line.
469
470 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
471
472         PR c++/33210
473         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
474         BOUND_TEMPLATE_TEMPLATE_PARM.
475
476 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
477
478         PR c++/32113
479         * search.c (lookup_member): Check the name argument for
480         error_mark_node.
481
482 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
483
484         PR c++/33212
485         * parser.c (cp_parser_trait_expr): Check rerurn value of
486         cp_parser_type_id.
487
488 2007-08-30  Ollie Wild  <aaw@google.com>
489
490         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
491         convert_ptrmem for pointer to member conversions.
492         (convert_to_pointer_force): Update cp_convert_to_pointer call.
493         (ocp_convert): Update cp_convert_to_pointer call.
494         * typeck.c (convert_ptrmem): Add conditional for null pointers to
495         members.
496         (build_static_cast_1): Check can_convert for conversions in either
497         direction.
498         (get_delta_difference_1): New function.
499         (get_delta_difference): Refactor to call get_delta_difference_1.
500
501 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
502
503         * decl.c (start_preparsed_function): Set
504         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
505
506 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
507
508         PR c++/33209
509         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
510         BOUND_TEMPLATE_TEMPLATE_PARM.
511
512 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
513
514         PR c++/32596
515         PR c++/32400
516         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
517         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
518
519 2007-08-27  Jason Merrill  <jason@redhat.com>
520
521         PR c++/29000
522         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
523         Look inside STMT_EXPR.
524         * semantics.c (stmt_expr_value_expr): New fn.
525         * cp-tree.h: Declare it.
526
527         PR c++/28558
528         * decl.c (groktypename): Ignore attributes applied to class type.
529
530 2007-08-28  Richard Guenther  <rguenther@suse.de>
531
532         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
533
534 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
535         
536         * error.c (dump_expr): Handle COMPLEX_CST.
537         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
538         (pp_cxx_expression): Likewise.
539
540 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
541
542         * decl.c (GNU_INLINE_P): New.
543         (duplicate_decls): Handle gnu_inline.  Merge attributes and
544         some flags in overriding definitions.
545         (redeclaration_error_message): Handle gnu_inline.
546         (start_preparsed_function): Likewise.
547
548 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
549
550         * call.c (sufficient_parms_p): Constify.
551         * class.c (same_signature_p): Likewise.
552         * cp-gimplify.c (is_invisiref_parm,
553         cxx_omp_privatize_by_reference): Likewise.
554         * cp-objcp-common.c (has_c_linkage): Likewise.
555         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
556         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
557         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
558         num_artificial_parms_for, comp_template_parms,
559         template_parameter_pack_p, any_dependent_template_arguments_p,
560         any_type_dependent_arguments_p, any_value_dependent_elements_p,
561         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
562         zero_init_p, member_p, cp_lvalue_kind,
563         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
564         varargs_function_p, is_dummy_object, special_function_kind,
565         string_conv_p, type_unknown_p, comp_except_specs, compparms,
566         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
567         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
568         cp_has_mutable_p, at_least_as_qualified_p,
569         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
570         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
571         * except.c (nothrow_libfn_p): Likewise.
572         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
573         Likewise.
574         * pt.c (comp_template_parms, template_parameter_pack_p,
575         any_type_dependent_arguments_p, any_value_dependent_elements_p,
576         any_dependent_template_arguments_p): Likewise.
577         * repo.c (repo_export_class_p): Likewise.
578         * semantics.c (anon_aggr_type_p): Likewise.
579         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
580         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
581         varargs_function_p, member_p, is_dummy_object, pod_type_p,
582         zero_init_p, special_function_p): Likewise.
583         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
584         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
585         compparms, invalid_nonstatic_memfn_p,
586         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
587         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
588         cp_has_mutable_p, lvalue_or_else): Likewise.
589
590 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
591
592         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
593         * cp-objcp-common.c (cp_tree_size): Ditto.
594         * tree.c (cp_walk_subtrees): Ditto
595         * cp-tree.def (TINST_LEVEL): Go away.
596         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
597         move together with other non-tree structs.
598         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
599         (union lang_tree_node): Eliminate tinst_level field.
600         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
601         (current_instantiation, outermost_tinst_level): Return
602         a "struct tinst_level *".
603
604         * error.c (print_instantiation_partial_context): Change second
605         parameter to a "struct tinst_level *".  Replace accessor macros
606         with field access.
607         (print_instantiation_full_context): Likewise.
608         * lex.c (in_main_input_context): Likewise.
609
610         * pt.c (struct pending_templates): New.
611         (pending_templates, last_pending_template): Use it as a type.
612         (current_tinst_level): Change typo to "struct tinst_level *"
613         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
614         (add_pending_template): Construct a "struct pending_template".
615         Replace TINST_LEVEL accessor macros with field access.
616         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
617         (pop_tinst_level): Likewise.
618         (instantiate_pending_templates): Likewise.  Factor common code used
619         when an instantiation has been done.
620         (outermost_tinst_level): Replace tree_last with loop.
621         (current_instantiation): Return a "struct tinst_level *".
622
623 2007-08-24  Ollie Wild  <aaw@google.com>
624
625         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
626         * name-lookup.h (cp_binding_level): Remove vtables member.
627
628 2007-08-24  Richard Guenther  <rguenther@suse.de>
629
630         * tree.c (cp_cannot_inline_tree_fn): Remove.
631         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
632         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
633         Remove define.
634
635 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
636
637         PR c++/32567
638         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
639         error_mark_node right away if build_expr_type_conversion
640         returned it.
641
642         PR c++/32898
643         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
644         is error_mark_node rather than NULL_TREE.
645         * pt.c (check_explicit_specialization): Likewise.
646
647         PR c++/31941
648         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
649         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
650
651 2007-08-22  Jason Merrill  <jason@redhat.com>
652
653         PR c++/29365
654         * pt.c (outermost_tinst_level): New function.
655         * lex.c (in_main_input_context): New function.
656         * cp-tree.h: Declare it.
657         * decl2.c (constrain_class_visibility): Use it to avoid warning
658         about uses of the anonymous namespace in the main input file.
659
660 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
661
662         * init.c (build_new_1): Use get_target_expr instead of save_expr.
663
664 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
665
666         PR c++/7302
667         * class.c (finish_struct_1): Warn when a class has virtual
668         functions and accessible non-virtual destructor.
669
670 2007-08-20  Richard Guenther  <rguenther@suse.de>
671
672         PR c++/22369
673         PR c++/22451
674         * call.c (build_new_method_call): Convert initializer to
675         the basetype.
676         * init.c (build_aggr_init): Do not fiddle with types.
677         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
678         * except.c (build_throw): Do not drop qualifiers for the
679         pointer type.
680         * typeck.c (get_member_function_from_ptrfunc): Do not
681         fiddle with types, instead convert.
682         (build_ptrmemfunc1): Convert to the target type for
683         initialization.
684         (gfc_trans_allocate): Convert result to target type.
685         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
686         pointer-to-member structures shall have alias set zero as well.
687
688 2007-08-20  Richard Guenther  <rguenther@suse.de>
689
690         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
691         Remove.
692         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
693         (nonstatic_local_decl_p): Likewise.
694         * tree.c (cp_auto_var_in_fn_p): Remove.
695         * decl.c (nonstatic_local_decl_p): Remove.
696
697 2007-08-20  Richard Guenther  <rguenther@suse.de>
698
699         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
700         Remove define.
701         * tree.h (cp_walk_tree): New define to walk_tree_1 with
702         cp_walk_subtrees lh parameter.
703         (cp_walk_tree_without_duplicates): New define to
704         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
705         * tree.c (count_trees): Call
706         cp_walk_tree_without_duplicates.
707         (verify_stmt_tree): Call cp_walk_tree.
708         (break_out_target_exprs): Likewise.
709         (WALK_SUBTREE): Likewise.
710         * cp-gimplify.c (cp_genericize): Likewise.
711         * cp-pt.c (find_parameter_packs_r): Likewise.
712         (uses_parameter_packs): Likewise.
713         (make_pack_expansion): Likewise.
714         (check_for_bare_parameter_packs): Likewise.
715         (for_each_template_parm): Likewise.
716         * decl.c (check_default_argument): Call
717         cp_walk_tree_without_duplicates.
718         * except.c (build_throw): Likewise.
719         * decl2.c (type_visibility): Likewise.
720         * semantics.c (expand_or_defer_fn): Likewise.
721         (finalize_nrv): Call cp_walk_tree.
722
723 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
724
725         PR c++/33025
726         * init.c (build_new_1): Rename placement_var variable to placement_expr.
727         Initialize it with save_expr rather than get_temp_regvar.
728
729 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
730
731         PR c++/28989
732         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
733         lvalues.
734
735 2007-08-17  Ollie Wild  <aaw@google.com>
736
737         PR c++/31749
738         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
739         declarations into appropriate slots for comparison.  Fix type
740         comparison.
741
742 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
743
744         PR c++/32112
745         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
746         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
747
748 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
749
750         PR c++/32870
751         * parser.c (cp_parser_class_head): Improve error message.
752
753 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
754
755         * pt.c (instantiate_decl): Set input_location
756         for the function end.
757
758 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
759
760         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
761         Constify.
762         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
763         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
764         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
765         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
766         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
767         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
768         * typeck.c (cp_type_quals): Likewise.
769         * typeck2.c (cxx_incomplete_type_diagnostic,
770         cxx_incomplete_type_error): Likewise.
771
772 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
773
774         PR c++/31132
775         * pt.c (tsubst_friend_function): When check_classfn
776         returns error_mark_node likewise return it.
777
778 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
779
780         PR c++/32992
781         * typeck.c (check_return_expr): Don't NRV optimize vars in
782         anonymous unions.
783         * decl.c (finish_function): Comment fix.
784
785 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
786
787         PR c++/33035
788         * pt.c (push_template_decl_real): Depending on TYPE_P
789         use either TYPE_CONTEXT or DECL_CONTEXT.
790
791 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
792
793         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
794         constructors and destructors return this.
795
796 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
797
798         PR c++/27211
799         * decl2.c (check_classfn): Return error_mark_node in case of error;
800         in that case, do not call add_method.
801         * decl.c (start_decl): Deal with check_classfn returning
802         error_mark_node.
803         (grokfndecl): Likewise.
804         * pt.c (tsubst_friend_function): Likewise.
805
806 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
807
808         PR c++/30428
809         * typeck.c (build_binary_op): Disallow vector float types with
810         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
811
812 2007-08-11  Ian Lance Taylor  <iant@google.com>
813
814         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
815         alias_set_type.
816         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
817
818 2007-08-10  Ollie Wild  <aaw@google.com>
819
820         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
821         type lookups.
822         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
823         function parameter.
824         (unqualified_namespace_lookup): Fix ambiguous_decl call.
825         (lookup_using_namespace): Fix ambiguous_decl call.
826         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
827
828 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
829
830         * call.c (name_as_c_string): Use CONST_CAST.
831         * decl.c (build_decl): Likewise.
832         * parser.c (cp_parser_string_literal): Likewise.
833
834 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
835
836         PR c++/17763
837         * error.c (dump_expr): Consistently use the *_cxx_*
838         variants of the pretty-print functions.
839
840 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
841
842         PR c++/22256
843         * decl.c (check_special_function_return_type): Just error
844         on return type specified for conversion operator.
845
846 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
847
848         * typeck2.c (readonly_error): Handle general expressions.
849         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
850
851 2007-08-06  Dan Hipschman  <dsh@google.com>
852
853         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
854         access function name.
855
856 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
857
858         PR pch/13676
859         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
860         * g++spec.c (lang_specific_driver): Check them.
861
862 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
863
864         PR c++/19532
865         * pt.c (inline_needs_template_parms): Fix comment; change return type
866         to bool.
867
868 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
869
870         Revert:
871         2007-03-26  Dirk Mueller  <dmueller@suse.de>
872
873         * parser.c (cp_parser_member_declaration): Pedwarn
874         about stray semicolons after member declarations.
875
876 2007-08-02  Lee Millward  <lee.millward@gmail.com>
877
878         PR c++/30849
879         PR c++/30850
880         PR c++/30851
881         * parser.c (cp_parser_asm_definition): Detect and discard asm
882         statements with invalid inputs or outputs.
883         (cp_parser_asm_operand_list): Return error mark node if any
884         of the operands are invalid. Adjust documentation.
885         
886 2007-08-02  Nick Clifton  <nickc@redhat.com>
887
888         * typeck.c: Change copyright header to refer to version 3 of the
889         GNU General Public License and to point readers at the COPYING3
890         file and the FSF's license web page.
891         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
892         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
893         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
894         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
895         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
896         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
897         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
898         name-lookup.h, parser.c: Likewise.
899
900 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
901
902         PR middle-end/32668
903         * call.c (magic_varargs_p): Honor the "type generic" attribute.
904
905 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
906
907         PR c++/32108
908         * semantics.c (finish_label_stmt): Reject the __label__
909         extension outside function scopes.
910
911 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
912
913         * parser.c (eof_token): Un-constify.
914         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
915         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
916         casts.
917
918 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
919
920         * pt.c, tree.c, typeck2.c: Fix comment typos.
921
922 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
923             Mark Mitchell  <mark@codesourcery.com>
924
925         PR c++/30917
926         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
927         hidden due to friend declarations in local classes.
928
929 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
930
931         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
932         * cp-tree.def (DECLTYPE_TYPE): New.
933         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
934         (dump_type_prefix): Ditto.
935         (dump_type_suffix): Ditto.
936         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
937         * mangle.c (write_type): Handle DECLTYPE_TYPE.
938         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
939         types.
940         (DECLTYPE_TYPE_EXPR): New.
941         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
942         (finish_declared_type): Declare.
943         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
944         DECLTYPE_TYPE nodes.
945         (pp_cxx_type_id): Ditto.
946         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
947         (tsubst): Substitute into a DECLTYPE_TYPE node.
948         (tsubst_copy): Ditto.
949         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
950         nodes.
951         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
952         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
953         structural equality (because we can't hash the expressions).
954         (finish_declared_type): New.
955         * lex.c (reswords): Add "decltype" keyword.
956         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
957         (cp_parser_postfix_expression): Add member_access_only_p to
958         restrict postfix expression to member access expressions.
959         (cp_parser_unary_expression): Update call to
960         cp_parser_postfix_expression to reflect new parameter.
961         (cp_parser_declared_type): New.
962         (cp_parser_simple_type_specifier): Parse decltype types.
963
964 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
965
966         PR c++/32346
967         * call.c (convert_for_arg_passing): Only widen bitfields to their
968         declared types if necessary.
969
970 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
971
972         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
973         Constify.
974
975 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
976
977         * decl.c (typename_hash, typename_compare): Constify.
978         * mangle.c (hash_type, compare_type): Likewise.
979         * pt.c (eq_local_specializations, hash_local_specialization):
980         Likewise.
981         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
982         list_hash): Likewise.
983         * typeck2.c (pat_compare): Likewise.
984
985 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
986
987         * method.c (implicitly_declare_fn): Increase alignment if member
988         function pointer format requires it.
989
990 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
991
992         PR c++/29001
993         * typeck.c (check_return_expr): Do not pass a null argument
994         to null_ptr_cst_p.
995
996 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
997
998         PR c++/32561
999         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
1000         only on VAR_DECL.
1001
1002 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1003
1004         PR c++/32839
1005         * typeck.c (convert_arguments): Only use default args if we have
1006         a function decl.
1007
1008         PR c++/30818
1009         * typeck.c (structural_comptypes): No need to check
1010         resolve_typename_type return value here.
1011         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
1012         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
1013         original type rather than error_mark_node in case of failure.
1014         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
1015         resolve_typename_type result check.
1016         (cp_parser_direct_declarator, cp_parser_head,
1017         cp_parser_constructor_declarator_p): Likewise.
1018
1019 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
1020
1021         * pt.c (template_parms_variadic_p): Remove.
1022         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
1023
1024 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
1025
1026         PR c++/30854
1027         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
1028         argument to dump_aggr_init_expr_args instead of false.
1029
1030 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
1031
1032         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
1033         canonical types; otherwise, fall back to structural type
1034         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
1035         internal compiler error if the canonical types are wrong.
1036         
1037 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
1038
1039         PR c++/32560
1040         * parser.c (cp_parser_make_indirect_declarator): When the
1041         the code argument is ERROR_MARK return cp_error_declarator.
1042
1043 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
1044
1045         PR 32617
1046         * decl.c (cxx_init_decl_processing): Don't set
1047         force_align_functions_log.
1048         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
1049         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
1050         FUNCTION_DECL, return its alignment.
1051
1052 2007-07-09  Richard Guenther  <rguenther@suse.de>
1053
1054         * decl.c (start_preparsed_function): Do not promote return type.
1055
1056 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
1057
1058         PR c++/30535
1059         * pt.c (unify): Never pass error_mark_node to template_decl_level.
1060
1061 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
1062
1063         PR c++/32232
1064         * pt.c (resolve_overloaded_unification): Robustify.  Return a
1065         bool, not an int.
1066         (type_unification_real): Adjust accordingly.
1067
1068 2007-07-06  Richard Guenther  <rguenther@suse.de>
1069
1070         * init.c (build_new_1): Use the correct pointer type.
1071         * typeck2.c (build_m_component_ref): Likewise.
1072
1073 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
1074
1075         PR c++/32245
1076         * init.c (build_zero_init): Always build an initializer for
1077         non-static storage.
1078         * typeck2.c (build_functional_cast): Use build_zero_init.
1079
1080         PR c++/32251
1081         * init.c (build_new_1): Always pass the allocation function to
1082         build_op_delete_call.
1083         * call.c (build_op_delete_call): Handle operator delete with a
1084         variable-argument list.  Do not issue an error when no matching
1085         deallocation function is available for a new operator.
1086
1087         PR c++/31992
1088         * cp-tree.h (any_value_dependent_elements_p): Declare it.
1089         * decl.c (value_dependent_init_p): New function.
1090         (cp_finish_decl): Use it.
1091         * pt.c (value_dependent_expression_p): Use
1092         any_value_dependent_elements_p.
1093         * parser.c (cp_parser_primary_expression): Add comment about
1094         treating dependent qualified names as integral
1095         constant-expressions.
1096
1097 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
1098
1099         * decl.c (build_ptrmemfunc_type): Always use structural equality
1100         tests when comparing pointer-to-member-function types, because the
1101         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
1102         types.
1103         
1104 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
1105
1106         * init.c (build_new): Tweak comment.
1107
1108 2007-06-29  Dave Brolley  <brolley@redhat.com>
1109
1110         PR c++/31743
1111         * parser.c (cp_parser_new_type_id): Don't reduce a named array
1112         type to its base type and number of elements here.
1113         * init.c (build_new): Call complete_type_or_else to ensure that the
1114         type is complete and to issue a diagnostic if it is not.
1115         (build_new_1): Don't call complete_type_or_else here.
1116
1117 2007-07-03  Richard Guenther  <rguenther@suse.de>
1118
1119         PR c++/32609
1120         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
1121         after recursing.
1122
1123 2007-07-02  Simon Baldwin  <simonb@google.com>
1124
1125         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
1126         for inner-style nested forward declarations that don't declare
1127         anything useful.
1128
1129 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
1130
1131         PR c++/31748
1132         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1133         DECL_P in not a variable and appears more than once error messages.
1134
1135 2007-07-01  Ollie Wild  <aaw@google.com>
1136
1137         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
1138         (select_decl): Remove function.
1139         (unqualified_namespace_lookup): Populate binding by calling
1140         ambiguous_decl.  Remove select_decl call.
1141         (lookup_qualified_name): Remove select_decl call.
1142         * decl.c (lookup_and_check_tag): Check for ambiguous references.
1143         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
1144         generation when name lookup is ambiguous.
1145
1146 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
1147
1148         PR c++/31724
1149         * init.c (build_new_1): Use structural equality on the copy of the
1150         array type.
1151
1152 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
1153
1154         * decl2.c (determine_visibility): Implement
1155         flag_visibility_ms_compat effect on type info.
1156         * decl.c (cxx_init_decl_processing): Implement
1157         global effect of flag_visibility_ms_compat.
1158
1159 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
1160
1161         * decl2.c (start_objects): Mark constructor-running function
1162         as artificial.
1163
1164 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
1165
1166         PR c++/32111
1167         * decl.c (grokdeclarator): Reset friendp for member functions declared
1168         friend of their own class.
1169
1170 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
1171
1172         * decl2.c (determine_visibility): Don't look for dllexport here.
1173         (determine_visibility_from_class): Tidy.
1174
1175 2007-06-18  Simon Baldwin <simonb@google.com>
1176
1177         PR c++/31923
1178         * parser.c (cp_parser_single_declaration): Added check for storage
1179         class other than sc_none in parsed declaration, and a flag to indicate
1180         if the call is part of an explicit template specialization parse.
1181         * (cp_parser_explicit_specialization): Specialization check flag added
1182         to call to cp_parser_single_declaration(), set true.
1183         * (cp_parser_template_declaration_after_export): Specialization check
1184         flag added to call to cp_parser_single_declaration(), set false.
1185         * pt.c (check_explicit_specialization): Added code to copy visiblity
1186         and linkage from the templated function to the explicit specialization.
1187
1188 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1189
1190         * typeck.c (build_binary_op): For templates build the
1191         expression in pieces to avoid the assert in build2_stat.
1192         (get_member_function_from_ptrfunc):
1193         Change over to using POINTER_PLUS_EXPR and convert
1194         the second operand to sizetype.
1195         * typeck2.c (build_m_component_ref):  Likewise.
1196         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
1197         instead of PLUS_EXPR for pointers.
1198         (build_new_1): Likewise.
1199         (build_vec_delete_1): Likewise.
1200         (build_vec_delete): Likewise.
1201         * class.c (build_base_path): Likewise.
1202         (build_base_path): Likewise.
1203         (convert_to_base_statically): Likewise.
1204         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
1205         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
1206         instead of PLUS_EXPR.
1207         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
1208         instead of PLUS_EXPR for pointers.
1209         * call.c (build_special_member_call): Likewise.
1210         * rtti.c (build_headof): Likewise.
1211         Use sizetype instead of ptrdiff_type_node.
1212         (tinfo_base_init): Create a POINTER_PLUS_EXPR
1213         instead of PLUS_EXPR for pointers.
1214         * except.c (expand_start_catch_block):  Do a
1215         NEGATIVE and then a POINTER_PLUS_EXPR instead
1216         of a MINUS_EXPR.
1217         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1218         PLUS_EXPR on pointer types over to use
1219         POINTER_PLUS_EXPR and remove the conversion
1220         to the pointer types.
1221         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1222         adding to a pointer type. Use size_int instead of
1223         ssize_int. Convert the index to sizetype before
1224         adding it to the pointer.
1225
1226 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
1227
1228         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1229         (DECL_ANON_UNION_VAR_P): New macro.
1230         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
1231         than DECL_VAR_MARKED_P, to keep track of which variables we have
1232         seen.
1233         * decl.c (redeclaration_error_message): Complain about redeclaring
1234         anonymous union members at namespace scope.
1235         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1236
1237 2007-06-14  Geoff Keating  <geoffk@apple.com>
1238
1239         * decl2.c (determine_visibility): Ensure that functions with
1240         hidden types as parameters are hidden.
1241
1242         PR 31093
1243         * decl2.c (determine_visibility): Remove duplicate code for
1244         handling type info.
1245
1246 2007-06-12  Ian Lance Taylor  <iant@google.com>
1247
1248         PR libstdc++/29286
1249         * init.c (avoid_placement_new_aliasing): New static function.
1250         (build_new_1): Call it.
1251
1252 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
1253
1254         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1255         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1256
1257 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
1258
1259         PR c++/32177
1260         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1261         on init, the non-decl cond operand and increment value.
1262
1263 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
1264
1265         PR c++/30759
1266         * decl.c (check_initializer): Report an error when a brace enclosed
1267         initializer is used for a non-aggregate type in C++98.
1268         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1269         cxx_dialect.
1270         (grokdeclarator): Likewise.
1271         (move_fn_p): Likewise.
1272         * typeck.c (check_return_expr): Likewise.
1273         * call.c (reference_binding): Likewise.
1274         * error.c (cp_cpp_error): Likewise.
1275         * pt.c (check_default_tmpl_args): Likewise.
1276         (tsubst): Likewise.
1277         * lex.c (init_reswords): Likewise.
1278         * parser.c (p_parser_primary_expression): Likewise.
1279         (TOKEN_PRECEDENCE): Likewise.
1280         (cp_parser_init_declarator): Likewise.
1281         (cp_parser_ptr_operator): Likewise.
1282         (cp_parser_parameter_declaration): Likewise.
1283         (cp_parser_enclosed_template_argument_list): Likewise.
1284         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1285         (cp_parser_next_token_ends_template_argument_p): Likewise.
1286
1287 2007-06-04  Simon Baldwin  <simonb@google.com>
1288
1289         * decl.c (grokdeclarator): Readability change.  Moved case labels
1290         into direct switch statement scope.
1291
1292 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
1293
1294         * call.c (convert_like_real): Remove pointless code.
1295
1296 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
1297
1298         * decl.c (get_atexit_fn_ptr_type): New function.
1299         (get_atexit_node): Use it.
1300         (start_cleanup_fn): Likewise.
1301         (register_dtor_fn): Use the object's destructor, instead of a
1302         separate cleanup function, where possible.
1303         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1304         (atexit_fn_ptr_type_node): New macro.
1305         * decl2.c (build_cleanup): Use build_address.
1306
1307 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
1308
1309         * typeck.c (build_binary_op): Include types in error.
1310
1311 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
1312
1313         PR c++/31806
1314         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1315         needs runtime initialization.
1316
1317 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
1318
1319         PR c++/32158
1320         * semantics.c (finish_trait_expr): Complete the types.
1321
1322 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
1323             Douglas Gregor <doug.gregor@gmail.com>
1324             Pedro Lamarao <pedro.lamarao@mndfck.org>
1325             Howard Hinnant <howard.hinnant@gmail.com>
1326
1327         PR c++/7412
1328         PR c++/29939
1329         * typeck.c (comptypes): Don't consider rvalue and lvalue
1330         reference types to be equivalent.
1331         (check_return_expr): Move from certain lvalues when returning
1332         them.
1333         * decl.c (grokdeclarator): Implement reference collapsing.
1334         (copy_fn_p): Don't consider constructors taking rvalue references
1335         to be copy constructors.
1336         (move_fn_p): New.
1337         * call.c (conversion): New "rvaluedness_matches_p" member.
1338         (convert_class_to_reference): Require reference type as first
1339         parameter instead of base type.
1340         (reference_binding): Add logic to handle rvalue references.
1341         (implicit_conversion): Update inaccurate comment.
1342         (convert_like_real): Disable creation of temporaries that are
1343         impossible to initialize for types with move constructors.
1344         (build_over_call): Elide move constructors when possible.
1345         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1346         (maybe_handle_ref_bind): Return conversion instead of type node.
1347         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1348         determine preferred conversion sequences.
1349         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1350         (LOOKUP_PREFER_RVALUE): New.
1351         (DECL_MOVE_CONSTRUCTOR_P): New.
1352         (struct cp_declarator): Add "reference" member for reference
1353         types, with new "rvalue_ref" flag.
1354         (cp_build_reference_type): Declare.
1355         (move_fn_p): Declare.
1356         * error.c (dump_type_prefix): Format rvalue reference types
1357         correctly in error messages.
1358         * except.c (build_throw): Move from certain lvalues when
1359         throwing.
1360         * mangle.c (write_type): Mangle rvalue references differently
1361         than regular references.
1362         * parser.c (make_reference_declarator): Add boolean parameter for
1363         rvalue references.
1364         (cp_parser_make_indirect_declarator): New.
1365         (cp_parser_new_declarator_opt): Call
1366         cp_parser_make_indirect_declarator. 
1367         (cp_parser_conversion_declarator_opt): Ditto.
1368         (cp_parser_declarator): Ditto.
1369         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1370         declarators.
1371         * pt.c (tsubst): Implement reference collapsing.
1372         (maybe_adjust_types_for_deduction): Implement special template
1373         parameter deduction rule for rvalue references.
1374         (type_unification_real): Update calls to
1375         maybe_adjust_types_for_deduction.
1376         (try_one_overload): Ditto.
1377         (unify_pack_expansion): Ditto.
1378         * tree.c (lvalue_p_1): Handle rvalue reference types.
1379         (cp_build_reference_type): New.
1380
1381 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
1382
1383         PR c++/31809
1384         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1385         variables that need runtime initialization.
1386
1387 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
1388
1389         PR c++/31339
1390         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1391         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1392         case POSTDECREMENT_EXPR>): Return the error_mark_node
1393         if either the real or imaginary parts would an
1394         error_mark_node.
1395         
1396 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
1397             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1398
1399         PR c++/31745
1400         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1401         token is a closing brace, false if there are no tokens left.
1402         (cp_parser_namespace_alias_definition): Only consume the next token if
1403         it is a closing brace.
1404
1405         * parser.c (cp_parser_class_specifier): Likewise.
1406
1407 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
1408
1409         * semantics.c (finish_member_declaration): Fix a typo in the
1410         last checkin.
1411
1412 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
1413
1414         PR c++/31431
1415         PR c++/31432
1416         PR c++/31434
1417         PR c++/31435
1418         PR c++/31437
1419         PR c++/31438
1420         PR c++/31442
1421         PR c++/31443
1422         PR c++/31444
1423         PR c++/31445
1424         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1425         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1426         * pt.c (check_for_bare_parameter_packs): Return bool indicated
1427         whether everything was okay. Fix indentation.
1428         (push_template_decl_real): Check for bare parameter packs in
1429         function parameters; where errors occur, mark the parameter types
1430         with ERROR_MARK_NODEs to avert ICEs.
1431         (coerce_template_parameter_pack): New.
1432         (coerce_template_parms): Moved parameter pack coercion into
1433         coerce_template_parameter_pack, and permit it anywhere in the
1434         template parameter list (not just at the end). Parameter and
1435         argument indices can vary (somewhat) separately now, so add
1436         PARM_IDX and ARG_IDX.
1437         (fn_type_unification): Don't set an argument pack as incomplete if
1438         no argument pack was deduced.
1439         (type_unification_real): If a type parameter is a parameter pack
1440         and has not otherwise been deduced, it will be deduced to an empty
1441         parameter pack.
1442         (more_specialized_fn): Use the actual lengths of the argument
1443         lists when comparing against expansions.
1444         * semantics.c (finish_member_declaration): If a field's type has
1445         bare parameter packs, error and set its type to ERROR_MARK_NODE.
1446
1447 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
1448
1449         PR target/27067
1450         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1451
1452 2007-05-22  Ollie Wild  <aaw@google.com>
1453
1454         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1455         (unqualified_namespace_lookup): Adds check for hidden types.
1456
1457 2007-05-22  Ollie Wild  <aaw@google.com>
1458
1459         * decl.c (duplicate_decls): Verify namespace names are unique.
1460
1461 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
1462
1463         * decl.c (cxx_maybe_build_cleanup): Handle
1464         __attribute__((cleanup)).
1465
1466 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1467
1468         * cvt.c (cp_convert_and_check): Don't check warnings if the
1469         conversion failed.
1470
1471 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1472
1473         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1474
1475 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
1476
1477         PR c++/29928
1478         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1479         type only if is a class type (5.2.8/4).
1480
1481 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
1482
1483         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1484         * decl.c (grokdeclarator): Use unsigned_type_for instead of
1485         c_common_unsigned_type.
1486
1487 2007-05-11  Silvius Rus  <rus@google.com>
1488
1489         * cp/typeck.c (build_indirect_ref): Add call to
1490         strict_aliasing_warning.
1491         (build_reinterpret_cast_1): Condition call to
1492         strict_aliasing_warning. 
1493
1494 2007-05-11  Jan Hubicka  <jh@suse.cz>
1495
1496         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1497         * decl2.c (start_objects): ctors and dtors are no longer public.
1498         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1499         
1500 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1501
1502         * typeck.c (build_unary_op): Remove code that used to
1503         handle non lvalue increments/decrements.
1504
1505 2007-05-07  Mike Stump  <mrs@apple.com>
1506
1507         * parser.c (check_empty_body): Add.
1508         (cp_parser_iteration_statement): Add call to check_empty_body.
1509
1510 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
1511
1512         PR 31775
1513         * mangle.c (write_mangled_name): Mangle static variable names.
1514         (write_unqualified_name): Use local-source-name for
1515         namespace-scope static variables.
1516
1517 2007-05-04  Dirk Mueller  <dmueller@suse.de>
1518
1519         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1520         not in effect.
1521
1522 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
1523
1524         PR c++/31663
1525         * decl2.c (constrain_class_visibility): 
1526         Use strip_pointer_or_array_types instead of strip_array_types.
1527
1528 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1529
1530         PR C++/30221
1531         * decl.c (reshape_init_r): Don't reshape the first element if it
1532         is a pointer to member function.
1533
1534 2007-04-27  Simon Baldwin  <simonb@google.com>
1535
1536         * decl.c (grokparms): Changed message format from %qD to %qE.
1537
1538 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
1539
1540         * error.c (maybe_warn_variadic_templates): Variadic templates are
1541        now in C++0x, so only warn about them in C++98 mode.
1542         
1543 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1544
1545         PR C++/30016
1546         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1547         integeral types from vectors types.
1548
1549 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
1550
1551         PR c++/31598
1552         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1553         for type dependent OMP_CLAUSE_DECLs.
1554
1555 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
1556
1557         PR c++/31338
1558         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1559         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1560         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1561         * init.c (build_zero_init): Adjust, as
1562         COMPLEX_TYPE is now a SCALAR_TYPE.
1563         * typeck2.c (digest_init): Allow brace-enclosed initializers for
1564         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1565
1566 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
1567
1568         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1569         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1570         (trait_expr_value): Adjust.
1571
1572 2007-04-23  Simon Baldwin  <simonb@google.com>
1573
1574         * decl.c (grokparms): Added new error for duplicate function
1575         parameters names in function prototypes, to match gcc behavior.
1576
1577 2007-04-23  Jan Hubicka  <jh@suse.cz>
1578
1579         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1580         bits dirrectly.
1581
1582 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1583
1584         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1585         instead of checking GIMPLE_STMT_P in chain_next.
1586
1587 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
1588
1589         PR c++/31513
1590         * call.c (convert_for_arg_passing): Convert bitfields to their
1591         declared types.
1592
1593 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
1594
1595         PR c++/31517
1596         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1597
1598 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
1599
1600         PR c++/29365
1601         * cp/decl2.c (constrain_class_visibility):
1602         Do not warn about the use of anonymous namespace in the main input file.
1603
1604 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
1605
1606         * cp-tree.h (current_template_parms): Fix typo in comment.
1607
1608 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
1609
1610         * cp-tree.h, error.c: Fix comment typos.
1611
1612 2007-04-13  Jason Merrill  <jason@redhat.com>
1613
1614         PR c++/31074
1615         * call.c (reference_binding): Add c_cast_p parm.  If true,
1616         add quals to TO as needed to make it reference-compatible.
1617
1618 2007-04-11  Jan Hubicka  <jh@suse.cz>
1619
1620         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1621         that we are not processing template_decl.
1622
1623 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
1624
1625         PR c++/31449
1626         * class.c (build_base_path): Ensure that the converted pointer has
1627         the same cv-qualification as the input.
1628
1629 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
1630
1631         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1632
1633 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
1634
1635         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1636         Do not set it.
1637         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1638         * tree.c (cp_add_pending_fn_decls): Remove.
1639         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1640
1641 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
1642
1643         Revert change removing staticp.
1644
1645 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
1646
1647         * cp-objcp-common.c (cxx_staticp): Remove.
1648         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1649         * cp-tree.h (cxx_staticp):      
1650
1651 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
1652
1653         * class.c (check_for_override): Don't remove dllmport attribute
1654         of virtual methods.
1655
1656 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
1657
1658         PR c++/30847
1659         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1660         type issue error and return early.
1661
1662 2007-03-30  Jason Merrill  <jason@redhat.com>
1663
1664         PR c++/31187
1665         * typeck.c (cp_type_readonly): New fn.
1666         * cp-tree.h: Declare it.
1667         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1668         (cp_finish_decl): Not here.
1669
1670 2007-03-31  Richard Guenther  <rguenther@suse.de>
1671
1672         * optimize.c (maybe_clone_body): Replace splay-tree usage by
1673         pointer-map.
1674
1675 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
1676
1677         PR c++/31138
1678         PR c++/31140
1679         PR c++/31141
1680         * parser.c (declarator_can_be_parameter_pack): New.
1681         (cp_parser_template_parameter): Only parse the `...' if the
1682         declarator can be a parameter pack.
1683         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1684         is NULL.
1685         * pt.c (find_parameter_packs_r): Look into the bounds on integer
1686         types (they could be used as array bounds). 
1687         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1688         (tsubst_pack_expansion): Handle failure to expand parameter
1689         packs.
1690         
1691 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
1692
1693         PR c++/26099
1694         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1695         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1696         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1697         (CLASS_TYPE_NON_UNION_P): Add.
1698         (struct lang_type_class): Add has_complex_dflt.
1699         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1700         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1701         * cp-tree.def: Add TRAIT_EXPR.
1702         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1703         * lex.c (struct resword): Add __has_nothrow_assign,
1704         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1705         __has_trivial_constructor, __has_trivial_copy,
1706         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1707         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1708         __is_pod, __is_polymorphic, __is_union.
1709         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1710         (cp_parser_trait_expr): New.
1711         * semantics.c (finish_trait_expr, trait_expr_value
1712         classtype_has_nothrow_copy_or_assign_p): New.
1713         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1714         as static.
1715         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1716         * class.c (check_bases, check_field_decl, check_bases_and_members):
1717         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1718         * pt.c (uses_template_parms, tsubst_copy_and_build,
1719         value_dependent_expression_p, type_dependent_expression_p): Deal with
1720         TRAIT_EXPR.
1721         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1722
1723 2007-03-29  Richard Guenther  <rguenther@suse.de>
1724
1725         * tree.c (cp_walk_subtrees): Do not set input_location.
1726
1727 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
1728
1729         PR c++/29077
1730         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1731         destructor.
1732
1733 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1734
1735         * parser.c (struct cp_parser): Update comment for
1736         greater_than_is_operator_p.
1737         (cp_parser_primary_expression): In C++0x mode, a cast operator can
1738         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1739         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1740         !GREATER_THAN_IS_OPERATOR_P.
1741         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1742         `>>' operators that will become two `>' tokens in C++0x.
1743         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1744         mode, allowing it to terminate default arguments.
1745         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1746         `>>' like two consecutive `>' tokens.
1747         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1748         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1749         ends a template argument.
1750
1751 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
1752
1753         * decl.c (redeclaration_error_message): Complain when redeclaring
1754         a friend function with default template arguments (C++0x mode only).
1755         * cp-tree.h (check_default_tmpl_args): Declare.
1756         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1757         template arguments in function templates. Add support for checking
1758         the default template arguments of friend templates.
1759         (push_template_decl_real): Fix call to check_default_tmpl_args.
1760         (type_unification_real): If a template parameter has not been
1761         deduced but provides a default template argument, substitute into
1762         that default template argument.
1763         * parser.c (cp_parser_init_declarator): When declaring (but not
1764         defining!) a function template in C++0x mode, check for default
1765         template arguments.
1766
1767 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1768
1769         PR c++/29993
1770         * decl.c (grokdeclarator): Deal with cv-qualified function type
1771         typedefs in the same way for member and non-member functions.
1772
1773 2007-03-26  Dirk Mueller  <dmueller@suse.de>
1774
1775         * parser.c (cp_parser_member_declaration): Pedwarn
1776         about stray semicolons after member declarations.
1777
1778 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
1779
1780         PR c++/30500
1781         * pt.c (instantiate_decl): Set in_system_header.
1782
1783 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
1784
1785         * cp-tree.h (current_tempalte_parms): Improve documentation.
1786         * pt.c (current_template_args): Likewise.
1787
1788         PR c++/30863
1789         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1790         not consume tokens when failing.
1791
1792 2007-03-22  Jim Wilson  <wilson@specifix.com>
1793             Mark Mitchell  <mark@codesourcery.com>
1794
1795         PR c++/31273
1796         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
1797         consistent with FROM.
1798
1799 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1800
1801         * error.c (dump_expr): Handle dependent names that designate types.
1802         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1803
1804 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
1805
1806         * cp-tree.def, parser.c, pt.c: Fix comment typos.
1807
1808 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1809
1810         * cvt.c (cp_convert_and_check) : Define.
1811         * cp-tree.h (cp_convert_and_check): Declare.
1812         * call.c (convert_conversion_warnings): Rename to
1813         conversion_null_warnings.  The warning for floating-point to
1814         integer is handled by convert_and_check in convert_like_real.
1815         (convert_like_real): convert_conversion_warnings was renamed as
1816         conversion_null_warnings.
1817         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1818         overflow and changes of value during conversion.
1819
1820 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1821
1822         PR c++/30891
1823         * parser.c (cp_parser_statement): If 'namespace' is found, this
1824         only can be a namespace alias definition, so parse it now.
1825         (cp_parser_namespace_alias_definition): if we find an open brace
1826         instead of '=', then this is actually a misplaced namespace
1827         definition.
1828         
1829 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1830
1831         PR c++/24924
1832         * decl.c (cxx_init_decl_processing): Move command-line options
1833         processing to c-opts.c.
1834         
1835 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
1836
1837         * ptree.c (cxx_print_type): Use formatting markup for integers
1838         when printing template parameter index/level/orig level.
1839         (cxx_print_xnode): Ditto.
1840         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1841         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1842         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1843         HOST_WIDE_INTs.
1844         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1845         rather than a HOST_WIDE_INT.
1846         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1847         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1848         better bit-packing.
1849         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1850         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1851         IN_BASE_INITIALIZER bool bitfields.
1852         (struct cp_declarator): Make KIND a 4-bit field. Make
1853         PARAMETER_PACK_P a bool bitfield just after KIND.
1854         * pt.c (uses_parameter_packs): Destroy the pointer set.
1855         (make_pack_expansion): Ditto.
1856         (check_for_bare_parameter_packs): Ditto.
1857         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1858         
1859 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1860
1861         PR c++/31165
1862         * call.c  (convert_default_arg): Instead of copying the node,
1863         unshare it.
1864
1865 2007-03-15  Dirk Mueller  <dmueller@suse.de>
1866
1867         PR c++/30860
1868         * call.c (convert_conversion_warnings): New..
1869         (convert_like_real): .. factored out from here.
1870         (convert_conversion_warnings): Add warning about
1871         false being converted to NULL in argument passing.
1872
1873 2007-03-14  Dirk Mueller  <dmueller@suse.de>
1874
1875         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1876         (finish_do_body): Warn about empty body in do/while statement.
1877
1878 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1879
1880         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1881         
1882 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1883
1884         PR c/21438
1885         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1886         warning.
1887         
1888 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
1889
1890         * cp/repo.c (init_repo): Initialize random_seed saved options.
1891         (finish_repo): Adjust.
1892
1893 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
1894
1895         PR bootstrap/30899
1896         * Make-lang.in (doc/g++.1): Use $< to specify the location from
1897         which to copy.
1898
1899 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
1900
1901         * decl.c (compute_array_index_type): New warning flag warn_vla.
1902
1903 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
1904
1905         PR c++/30108
1906         * call.c (convert_default_arg): Copy non-constant arguments.
1907
1908 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
1909
1910         PR c++/31038
1911         * parser.c (cp_parser_postfix_expression): Disallow compound
1912         literals in constant expressions.
1913
1914         PR c++/30328
1915         * semantics.c (finish_typeof): Use unlowered_expr_type.
1916         
1917 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
1918
1919         PR c++/30274
1920         * cp-tree.h (unlowered_expr_type): New function.
1921         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1922         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1923         (unlowered_expr_type): New function.
1924         (build_unary_op): Disallow predecrements of bool bitfields.
1925         * call.c (build_conditional_expr): Use unlowered_expr_type.
1926         * pt.c (type_unification_real): Likewise.
1927
1928 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
1929
1930         PR c++/20599
1931         * typeck.c (check_return_expr): Check for bare parameter packs.
1932         (comptypes): Compare template parameter packs and
1933         type pack expansions.
1934         * decl.c (grokdeclarator): Deal with the declaration of function
1935         parameter packs.
1936         (grokparms): Verify that the (optional) function parameter pack is
1937         at the end of the parameter list.
1938         (xref_basetypes): Handle pack expansions in the base class.
1939         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1940         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1941         (NONTYPE_ARGUMENT_PACK): New.
1942         (TYPE_PACK_EXPANSION): New.
1943         (EXPR_PACK_EXPANSION): New.
1944         (ARGUMENT_PACK_SELECT): New.
1945         * cp-objcp-common.c (cp_tree_size): Compute size of
1946         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1947         ARGUMENT_PACK_SELECT.
1948         * error.c (dump_template_argument): Print template argument packs.
1949         (dump_template_argument_list): Ditto.
1950         (dump_template_parameter): Dump `...' for template type parameter
1951         packs.
1952         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1953         (dump_parameters): Print function parameter packs.
1954         (dump_template_parms): Print template argument packs.
1955         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1956         (maybe_warn_variadic_templates): New.
1957         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1958         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1959         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1960         CAST_EXPR. 
1961         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1962         (write_template_arg): Write argument packs as separate arguments.
1963         * cp-tree.h (struct template_parm_index_s): Add flag that
1964         indicates that the template parameter is actually a parameter
1965         pack.
1966         (struct tree_argument_pack_select): New.
1967         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1968         (union lang_tree_node): Add argument_pack_select.
1969         (FUNCTION_PARAMETER_PACK_P): New.
1970         (PACK_EXPANSION_P): New.
1971         (PACK_EXPANSION_PATTERN): New.
1972         (SET_PACK_EXPANSION_PATTERN): New.
1973         (PACK_EXPANSION_PARAMETER_PACKS): New.
1974         (ARGUMENT_PACK_P): New.
1975         (ARGUMENT_PACK_ARGS): New.
1976         (SET_ARGUMENT_PACK_ARGS): New.
1977         (ARGUMENT_PACK_INCOMPLETE_P): New.
1978         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1979         (TEMPLATE_PARM_PARAMETER_PACK): New.
1980         (TEMPLATE_TYPE_PARAMETER_PACK): New.
1981         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1982         (ARGUMENT_PACK_SELECT_INDEX): New.
1983         (ARGUMENT_PACK_SELECT_ARG): New.
1984         (struct cp_declarator): Add parameter_pack_p flag.
1985         (maybe_warn_variadic_templates): Declare.
1986         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1987         indicate a template parameter pack. 
1988         (uses_parameter_packs): Declare.
1989         (template_parameter_pack_p): Declare.
1990         (template_parms_variadic_p): Declare.
1991         (make_pack_expansion): Declare.
1992         (check_for_bare_parameter_packs): Declare.
1993         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1994         sizeof... expressions. 
1995         (pp_cxx_expression): Print pack expansions and non-type argument
1996         packs.
1997         (pp_cxx_exception_specification): Print pack expansions. 
1998         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1999         (pp_cxx_ctor_initializer): Print pack expansions.
2000         (pp_cxx_type_id): Print pack expansions.
2001         (pp_cxx_template_argument_list): Print argument packs.
2002         (pp_cxx_template_parameter): Print ellipsis for template parameter
2003         packs.
2004         * pt.c (comp_template_parms): Compare template parameter packs.
2005         (template_parameter_pack_p): New.
2006         (template_parms_variadic_p): New.
2007         (template_args_variadic_p): New.
2008         (make_ith_pack_parameter_name): New.
2009         (struct find_parameter_pack_data): New.
2010         (find_parameter_packs_r): New.
2011         (uses_parameter_packs): New.
2012         (make_pack_expansion): New.
2013         (check_for_bare_parameter_packs): New.
2014         (expand_template_argument_pack): New.
2015         (reduce_template_parm_level): Propagate parameter pack flag.
2016         (process_template_parm): Add is_parameter_pack parameter to state
2017         when the parameter is actually a parameter pack. Create template
2018         parameter packs when is_parameter_pack is true.
2019         (current_template_args): The argument for a template parameter
2020         pack is an argument pack containing a single pack expansion.
2021         (process_partial_specialization): When checking that non-type
2022         argument expressions do not involve template parameters, loop over
2023         the arguments in argument packs separately.
2024         (push_template_decl_real): Check that the type of the declaration
2025         does not have any bare parameter packs. Check that primary
2026         templates have no more than one parameter pack, and that it comes
2027         at the end of the template parameter list.
2028         (convert_template_argument): Handle coercions for pack expansion
2029         expressions by coercing the pattern then rebuilding the expansion.
2030         (coerce_template_parms): When coercing the arguments for a
2031         variadic template, pack "extra" arguments into an argument pack.
2032         (coerce_template_template_parms): Cannot coerce between parameter
2033         packs and non-pack parameters.
2034         (template_args_equal): Compare PACK_EXPANSION_P expressions.
2035         (comp_template_args): Expand all template arguments packs before
2036         comparing template argument lists.
2037         (mangle_class_name_for_template): Make argument packs as separate
2038         template arguments.
2039         (for_each_template_parm_r): No need to handle BASELINK. 
2040         (instantiate_class_template): Handle pack expansions in the base
2041         class list.
2042         (tsubst_pack_expansion): New.
2043         (tsubst_template_args): Handle substitutions of argument packs and
2044         pack expansion into template argument lists.
2045         (tsubst_decl): Expand function parameter packs into separate
2046         function parameters.
2047         (tsubst_arg_types): Expand a type pack expansion into separate
2048         argument types.
2049         (tsubst_exception_specification): Handle pack expansions in
2050         exception specifiers.
2051         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
2052         replacing a template parameter with its argument. If we encounter
2053         a substitution for an argument pack, just return the parameter
2054         itself. 
2055         (tsubst_copy): sizeof(X...) returns the number of elements in
2056         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
2057         PARM_DECL is a parameter pack.
2058         (tsubst_expr): Expression pack expansions and argument packs
2059         cannot show up here; they will all be handled through function
2060         calls, sizeof, and template argument lists.
2061         (tsubst_copy_and_build): sizeof(X...) returns the number of
2062         elements in parameter pack X.  Handle pack expansions in TREE_LIST
2063         and CONSTRUCTOR nodes.
2064         (fn_type_unification): Handle "incomplete" explicit template
2065         argument lists that specify some of the arguments for a template
2066         parameter pack.
2067         (type_unification_real): Unify arguments against pack expansions.
2068         (template_parm_level_and_index): New, helper function.
2069         (unify_pack_expansion): New.
2070         (unify): Unify argument packs on an argument-by-argument basis,
2071         handling variadic argument packs as well.
2072         (more_specialized_fn): Handle unification of function parameter
2073         packs. All things being equal, prefer non-variadic function
2074         templates to variadic function templates.
2075         (more_specialized_class): Prefer the variadic class template
2076         partial specialization that binds fewer arguments to a parameter
2077         pack.
2078         (regenerate_decl_from_template): Expand function parameter packs
2079         into separate parameters.
2080         (instantiate_decl): Ditto.
2081         (tsubst_initializer_list): Handle pack expansions for base-class
2082         initializers.
2083         (dependent_type_p_r): Determine dependent types in argument packs
2084         and pack expansions.
2085         (value_dependent_expression_p): Determine value-dependence of
2086         non-type argument packs.
2087         (dependent_template_arg_p): Handle argument packs.
2088         * semantics.c (finish_cond): Check for bare parameter packs.
2089         (finish_expr_stmt): Ditto.
2090         (finish_for_expr): Ditto.
2091         (finish_switch_cond): Ditto.
2092         (finish_mem_initializers): Ditto.
2093         * name-lookup.c (arg_assoc_type): Handle pack expansions and
2094         argument packs.
2095         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
2096         * parser.c (make_declarator): Declarator is not an expansion.
2097         (make_pointer_declarator): Transfer parameter pack flag to outer
2098         declarator.
2099         (make_reference_declarator): Ditto.
2100         (make_ptrmem_declarator): Ditto.
2101         (make_call_declarator): Ditto.
2102         (make_array_declarator): Ditto.
2103         (cp_parser_postfix_expression): Allow pack expansion expressions
2104         in the argument list for a call expression.
2105         (cp_parser_parenthesized_expression_list): Add new parameter
2106         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
2107         into separate arguments."
2108         (cp_parser_new_placement): Allow pack expansion expressions.
2109         (cp_parser_new_initializer): Ditto.
2110         (cp_parser_mem_initializer_list): Allow ellipsis to create a
2111         base-class initializer expansion.
2112         (cp_parser_mem_initializer): Ditto.
2113         (cp_parser_template_parameter_list): Keep track of whether the
2114         template parameter is a template parameter pack.
2115         (cp_parser_template_parameter): Parse the ellipsis to indicate a
2116         template parameter pack.
2117         (cp_parser_type_parameter): Ditto.
2118         (cp_parser_template_argument_list): Parse the ellipsis to indicate
2119         a pack expansion.
2120         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
2121         this declarator is a parameter pack.
2122         (cp_parser_parameter_declaration): The ellipsis does not end the
2123         parameter declaration, because it might be a parameter pack. Parse
2124         the ellipsis to indicate a parameter pack.
2125         (cp_parser_initializer): Allow pack expansions.
2126         (cp_parser_initializer_list): Allow ellipsis to create an
2127         initializer expansion.
2128         (cp_parser_base_clause): Allow ellipsis to create a base specifier
2129         expansion.
2130         (cp_parser_type_id_list): Allow ellipsis to create an exception
2131         specifier expansion.
2132         (cp_parser_attribute_list): Don't allow pack expansions.
2133         (cp_parser_functional_cast): Allow pack expansions.
2134         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
2135         compute the length of a parameter pack.
2136         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
2137         end a template argument.
2138         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2139         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2140         CAST_EXPR. 
2141
2142 2007-03-09  Dirk Mueller  <dmueller@suse.de>
2143
2144         * cp/call.c (build_new_op): Call warn_logical_operator.
2145
2146 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
2147
2148         PR c++/30852
2149         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
2150
2151         PR c++/30534
2152         * pt.c (any_template_arguments_need_structural_equality_p):
2153         Robustify.
2154
2155 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
2156
2157         * decl.c (grokdeclarator): Disable warnings for anonymous
2158         bitfields.
2159
2160 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
2161
2162         * typeck2.c (readonly_error): Always emit a hard error.
2163         Remove last argument.
2164         * cp-tree.h (readonly_error): Adjust prototype.
2165         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
2166         * typeck.c (build_unary_op): Likewise.
2167         (build_modify_expr): Likewise.
2168
2169 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
2170
2171         PR c++/30895
2172         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
2173
2174 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2175
2176         PR c++/15787
2177         * parser.c (struct cp_parser): New IN_IF_STMT.
2178         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
2179         returning if parsing the body of an 'if' statement or issuing an
2180         error and continuing.
2181         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
2182         body of 'if'.
2183         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
2184         
2185 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
2186
2187         PR c++/28253
2188         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
2189         for thunks.
2190
2191 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
2192
2193         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
2194         Objective-C++.  Don't exit early if -shared-libgcc needs to be
2195         added.
2196
2197 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2198
2199         * typeck.c (common_base_type): Delete unused function.
2200         
2201 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2202
2203         * Make-lang.in: Add dummy lang.install-pdf target.
2204
2205 2007-03-01  Simon Baldwin <simonb@google.com>
2206
2207         PR c++/23689
2208         * decl.c (check_tag_decl): Added new warning for typedef ignored
2209         when it precedes an otherwise valid non-typedef declaration.
2210
2211 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
2212
2213         * typeck.c (build_function_call): Store converted arguments
2214         in a stack-allocated array instead of building a list.
2215         (convert_arguments): Store arguments in the array passed in as an
2216         argument, and return the actual number of arguments.
2217         * call.c (build_call): Delete, and replace with...
2218         (build_call_n, build_call_a): New.
2219         (build_op_delete_call): Rewrite to avoid constructing argument lists.
2220         (build_over_call): Store converted arguments in a stack-allocated
2221         array instead of building a list.
2222         (build_cxx_call): Pass arguments in an array instead of as a list.
2223         (build_java_interface_fn_ref): Rewrite to avoid constructing
2224         argument lists.
2225         * tree.h: Update declarations to reflect above changes.
2226         * method.c (use_thunk): Use a stack-allocated array to hold
2227         the arguments instead of a list.
2228         * rtti.c (throw_bad_cast): Update call to cxx_call.
2229         (throw_bad_typeid): Likewise.
2230         (build_dynamic_cast_1): Likewise.
2231         * init.c (build_builtin_delete_call): Use build_call_n.
2232         * decl.c (expand_static_init): Likewise.
2233         * except.c (cp_protect_cleanup_actions): Likewise.
2234         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2235         (gimplify_must_not_throw_expr): Likewise.
2236         (cxx_omp_apply_fn): Use build_call_a.
2237
2238 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
2239
2240         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2241         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2242
2243 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
2244
2245         * cp-tree.h (static_ctors): Remove.
2246         * cp-tree.h (static_dtors): Likewise.
2247         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2248         refactoring of tree_map hierarchy.
2249         (decl_shadowed_for_var_insert): Likewise.
2250         * semantics.c (expand_body): Use c_expand_body.
2251         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2252         * decl2.c (static_ctors): Remove.
2253         (static_dtors): Likewise.
2254         (generate_ctor_or_dtor_function): Pass NULL_TREE to
2255         objc_generate_static_init_call.  Do not call static_[cd]tors.
2256         (generate_ctor_and_dtor_functions_for_priority): Do not check for
2257         static_[cd]tors.
2258         (cp_write_global_declarations): Likewise.
2259
2260 2007-02-23  Richard Guenther  <rguenther@suse.de>
2261
2262         * class.c (note_name_declared_in_class): Make declaration
2263         changes meaning a pedwarn.
2264
2265 2007-02-22  Michael Matz  <matz@suse.de>
2266
2267         PR c++/29433
2268         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2269         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2270         dump_function_decl): Guard emitting outer scopes by new flag.
2271         * cp-lang.c (cxx_dwarf_name): New function.
2272         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2273         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2274         Remove functions.
2275         (push_template_decl_real, lookup_template_class): Remove calls
2276         to above functions.
2277
2278 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
2279
2280         * call.c (build_new_method_call): Ensure that explicit calls of
2281         destructors have type "void".
2282
2283 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2284
2285         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2286         and -Walways-true with -Waddress.
2287         * cvt.c (convert_to_void): Replace unconditional warning with
2288         -Waddress.
2289
2290 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2291
2292         * decl.c, tree.c: Fix comment typos.
2293
2294 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2295
2296         PR C++/30158
2297         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
2298         statement expression if we had an error mark node.
2299
2300 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2301             Brooks Moses  <brooks.moses@codesourcery.com>
2302             Lee Millward  <lee.millward@codesourcery.com>
2303
2304         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2305         Change class to tcc_vl_exp.
2306
2307         * call.c (build_call): Use build_call_list instead 
2308         of build3. 
2309         (build_over_call): Likewise.
2310         (build_new_method_call): Use build_min_non_dep_call_list 
2311         instead of build_min_non_dep.
2312
2313         * error.c (dump_call_expr_args): New function.
2314         (dump_aggr_init_expr_args): New function.
2315         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
2316         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2317
2318         * cvt.c (convert_to_void): Use build_call_array instead
2319         of build3; use new AGGR_INIT_EXPR accessor macros.
2320
2321         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2322         instead of TREE_CODE_LENGTH.
2323
2324         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2325         AGGR_INIT_EXPR accessor macros.
2326
2327         * cp-gimplify.c (cp_gimplify_init_expr): Use 
2328         AGGR_INIT_EXPR_SLOT to set the slot operand.
2329
2330         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2331         (AGGR_INIT_EXPR_SLOT): New macro.
2332         (AGGR_INIT_EXPR_ARG): New macro.
2333         (aggr_init_expr_nargs): New macro.
2334         (AGGR_INIT_EXPR_ARGP): New macro.
2335         (aggr_init_expr_arg_iterator): New.
2336         (init_aggr_init_expr_arg_iterator): New.
2337         (next_aggr_init_expr_arg): New.
2338         (first_aggr_init_expr_arg): New.
2339         (more_aggr_init_expr_args_p): New.
2340         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2341         (stabilize_aggr_init): New declaration.
2342         (build_min_non_dep_call_list): Likewise.
2343
2344         * tree.c (process_aggr_init_operands): New function.
2345         (build_aggr_init_array) New function.
2346         (build_cplus_new): Update to use new CALL_EXPR and
2347         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2348         build_aggr_init_array.
2349         (build_min_non_dep_call_list) New function.
2350         (build_min_nt): Assert input code parameter is not a variable
2351         length expression class.
2352         (build_min, build_min_non_dep): Likewise.
2353         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2354         to check for equality instead of recursing. Handle tcc_vl_exp
2355         tree code classes.
2356         (stabilize_call): Update to only handle CALL_EXPRs, not 
2357         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2358         (stabilize_aggr_init): New function.
2359         (stabilize_init): Use it.
2360
2361         * cxx-pretty-print.c (pp_cxx_postfix_expression)
2362         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2363         AGGR_INIT_EXPR accessor macros and argument iterators.
2364         
2365         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2366         build_vl_exp. Iterate through the operands, recursively 
2367         processing each one.
2368         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2369         CALL_EXPR accessor macros.
2370         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2371         tree code classes. Use TREE_OPERAND_LENGTH instead of 
2372         TREE_CODE_LENGTH.
2373
2374         * semantics.c (finish_call_expr): Use build_nt_call_list
2375         instead of build_nt.
2376         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
2377         accessor macros. Use build_call_array to construct the 
2378         CALL_EXPR node instead of build3
2379         
2380         * decl2.c (build_offset_ref_call_from_tree): Use 
2381         build_nt_call_list and build_min_non_dep_call_list instead
2382         of build_min_nt and build_min_non_dep.
2383
2384         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2385         Use build_nt_call_list instead of build_min_nt.
2386
2387 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2388
2389         PR c++/28943
2390         * call.c (build_conditional_expr): Improve error message.
2391         
2392 2007-02-13  Dirk Mueller  <dmueller@suse.de>
2393
2394         * friend.c (do_friend): Annotate warning about friend
2395         declarations in templates with OPT_Wnon_template_friend.
2396         Convert informal message from warning() to inform().
2397
2398 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
2399             Mark Mitchell  <mark@codesourcery.com>
2400
2401         PR c++/14622
2402         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2403         instantiations for variables.
2404
2405 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2406
2407         PR middle-end/7651
2408         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2409         Check warn_unused_value just once.
2410
2411 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
2412
2413         PR c++/26988
2414         * pt.c (determine_specialization): Use skip_artificial_parms_for.
2415         (fn_type_unificiation): Likewise.
2416         (get_bindings): Likewise.
2417
2418 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
2419
2420         PR target/29487
2421         * decl.c (finish_function): Use DECL_REPLACEABLE.
2422         * tree.c (cp_cannot_inline_tree_fn): Likewise.
2423
2424 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2425
2426         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2427
2428 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
2429
2430         * decl.c (grokvardecl): Don't error if !have_tls.
2431         (grokdeclarator): Likewise.
2432         * parser.c (cp_parser_omp_threadprivate): Likewise.
2433
2434 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
2435
2436         PR c++/30703
2437         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2438         parameters and result decls in omp clauses.
2439         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2440         by reference.
2441
2442 2007-02-05  Dirk Mueller  <dmueller@suse.de>
2443
2444         PR bootstrap/30510
2445         * parser.c (cp_parser_class_specifier): Always initialize bases.
2446
2447 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2448
2449         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2450         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2451         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2452         expressions.
2453         * semantics.c (finish_omp_atomic): Store a whole expression node
2454         in operand 1, and integer_zero_node in operand 0, for dependent
2455         OMP_ATOMIC.  Rewrite to make flow easier to understand.
2456
2457 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2458
2459         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2460
2461 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
2462
2463         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2464         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2465
2466 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
2467
2468        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2469        keyword warning to -Wc++0x-compat.
2470         
2471 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2472
2473         * decl.c (grokdeclarator): Update documentation.
2474
2475 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
2476
2477         PR c++/30536
2478         * decl.c (grokdeclarator): If __thread is used together with
2479         a storage class other than extern and static, clear thread_p
2480         after issuing diagnostics and fall through to checking the
2481         storage class.
2482
2483 2007-01-30  Roger Sayle  <roger@eyesopen.com>
2484
2485         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2486         calculating the size of an array (to avoid recursive errors).
2487
2488 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2489
2490         PR c++/24745
2491         * typeck.c (build_binary_op): Fix logic for warning. Move warning
2492         to -Wpointer-arith.
2493         * call.c (convert_like_real): Don't warn when converting to
2494         boolean type.
2495         
2496 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2497
2498         * decl.c (pop_label): Replace warning with call to
2499         warn_for_unused_label.
2500
2501 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
2502
2503         PR C++/28988
2504         * semantics.c (finish_pseudo_destructor_expr): Check the
2505         destrutor name by calling check_dtor_name.
2506
2507 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
2508
2509         * lex.c (D_CPP0X): Rename.
2510         (D_CXX0X): To this.
2511         (reswords): D_CPP0X -> D_CXX0X.
2512         (init_reswords): Ditto.
2513         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2514         of C++0x keywords as identifiers.
2515
2516 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
2517
2518         PR c++/27492
2519         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2520         function decls.
2521
2522 2007-01-23  Ian Lance Taylor  <iant@google.com>
2523
2524         * typeck.c (convert_for_assignment): Only warn about a = b = c
2525         when converting to bool.
2526
2527 2007-01-23  Roger Sayle  <roger@eyesopen.com>
2528
2529         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2530         TREE_OVERFLOW.
2531         * typeck.c (ignore_overflows): Remove the remaining uses of
2532         TREE_CONSTANT_OVERFLOW.
2533
2534 2007-01-20  Jan Hubicka  <jh@suse.cz>
2535
2536         * decl2.c (start_objects, start_static_storage_duration_function):
2537         Do not make the functions uninlinable.
2538
2539 2007-01-17  Ian Lance Taylor  <iant@google.com>
2540
2541         * class.c (add_method): Call VEC_reserve_exact rather than passing
2542         a negative size to VEC_reserve.
2543
2544 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
2545
2546         PR c++/29573
2547         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2548
2549 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
2550
2551         PR c++/28999
2552         * decl.c (make_typename_type): If the qualified name is not a
2553         type, issue an error.
2554         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2555         formatting.
2556
2557 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
2558
2559         * rtti.c: Include target.h.
2560         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2561         don't emit typeinfo for fundamental types as weak.
2562         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2563
2564 2007-01-08  Richard Guenther  <rguenther@suse.de>
2565
2566         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2567
2568 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
2569
2570         * call.c (standard_conversion): Pass flag to
2571         vector_types_convertible_p to disallow emission of note.
2572         * typeck.c (convert_for_assignment): Pass flag to
2573         vector_types_convertible_p to allow emission of note.
2574         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2575         to disallow emission of note.
2576
2577 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2578
2579         PR c++/28986
2580         * typeck.c (build_binary_op): Call overflow_warning if
2581         TREE_OVERFLOW_P is true for the result and not for any of the
2582         operands.
2583         
2584 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
2585
2586        PR c++/19439
2587        * class.c (add_method): Don't wait until template
2588        instantiation time to complain about duplicate methods.
2589         
2590 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2591
2592         PR c/19978
2593         * semantics.c (finish_unary_op_expr): Warn only if result
2594         overflowed and operands did not.
2595
2596 2007-01-05  Ian Lance Taylor  <iant@google.com>
2597
2598         * typeck.c (build_binary_op): Warn about comparing a non-weak
2599         address to NULL.
2600
2601 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
2602
2603         * pt.c (tsubst): Propagate the need for structural equality checks
2604         when reducing the level of template parameters.
2605
2606 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
2607
2608         * pt.c: Fix a comment typo.
2609
2610 2007-01-02  Ian Lance Taylor  <iant@google.com>
2611
2612         * semantics.c (maybe_convert_cond): Optionally warn when using an
2613         assignment as a condition.
2614         * typeck.c (convert_for_assignment): Optionally warn about
2615         assigning the result of an assignment to a bool.
2616
2617 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2618
2619         * pt.c (canonical_template_parms): Correct typo in comment.
2620         
2621 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2622
2623         * typeck.c (structural_comptypes): Renamed from "comptypes".
2624         (comptypes): Use canonical type information to perform fast type
2625         comparison. When VERIFY_CANONICAL_TYPES, verify that the
2626         canonical type comparison returns the same results as we would see
2627         from the current, structural check. Support COMPARE_STRUCTURAL
2628         when we need structural checks.
2629         * decl.c (typename_compare): Fix comment.
2630         (build_typename_type): TYPENAME_TYPE nodes require structural
2631         equality checks, because they resolve different based on the
2632         current class type.
2633         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2634         require structural equality checks (for now).
2635         (build_ptrmemfunc_type): Build the canonical pointer to member
2636         function type.
2637         (compute_array_index_type): Whenever we build a new index type
2638         to represent the size of an array in a template, we need to mark
2639         this index type as requiring structural equality. This goes for
2640         arrays with value-dependent sizes with the current ABI, or all
2641         arrays with ABI-1.
2642         * tree.c (cplus_array_hash): New.
2643         (struct cplus_array_info): New.
2644         (cplus_array_compare): New.
2645         (cplus_array_htab): New.
2646         (build_cplus_array_type_1): Use a hash table to cache the array
2647         types we build. Build the canonical array type for each array
2648         type.
2649         (cp_build_qualified_type_real): When building a cv-qualified array
2650         type, use the hash table of array types and build canonical array
2651         types as necessary.
2652         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2653         use structural equality (for now).
2654         * cp-tree.h (COMPARE_STRUCTURAL): New.
2655         * pt.c (canonical_template_parms): New.
2656         (canonical_type_parameter): New.
2657         (process_template_parm): Find the canonical type parameter.
2658         (lookup_template_class): When we have named the primary template
2659         type, set the canonical type for our template class to the primary
2660         template type. If any of the template arguments need structural
2661         equality checks, the template class needs structural equality
2662         checks.
2663         (tsubst): When reducing the level of a template template
2664         parameter, we require structural equality tests for the resulting
2665         parameter because its template parameters have not had their types
2666         canonicalized. When reducing a template type parameter, find the
2667         canonical reduced type parameter.
2668         (any_template_arguments_need_structural_equality_p): New.
2669