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