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