PR c++/15745
[official-gcc.git] / gcc / cp / ChangeLog
blob6bcc3ef3cfedc79929c8f91c307902b315efe3d1
1 2007-09-05  Jason Merrill  <jason@redhat.com>
3         PR c++/15745
4         * except.c (prepare_eh_type): Use type_decays_to.
6         PR c++/15097
7         * init.c (build_delete): Use build_headof to get the address of the
8         complete object if we aren't using the deleting destructor.
9         * rtti.c (build_headof): No longer static.
10         * cp-tree.h: Declare it.
12 2007-09-06  Jakub Jelinek  <jakub@redhat.com>
14         * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
15         decl if a prototype for XX is provided with throw().
17         PR c++/33289
18         * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
19         on __*_chk non-__builtin_* decls.
21 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
23         PR c++/30302
24         * semantics.c (finish_id_expression): Use context_for_name_lookup
25         insted of DECL_CONTEXT, to see through anonymous structs and unions.
26         * class.c (finish_struct_anon): Deal correctly with anonymous
27         structs (vs unions, as GNU extension) in error messages.
29 2007-09-05  Jan Hubicka  <jh@suse.cz>
31         * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
32         call, DECL_EXTERNAL checks and current_function_decl saving.
34 2007-09-05  Paolo Carlini  <pcarlini@suse.de>
36         PR c++/29731 (again)
37         * parser.c (cp_parser_primary_expression): Return error_mark_node
38         when a statement-expression is found in a template-argument list.
40 2007-09-04  Jason Merrill  <jason@redhat.com>
42         * except.c (initialize_handler_parm): Use
43         fold_build_cleanup_point_expr.
45         PR c++/31419
46         * call.c (reference_binding): Don't look for user-defined conversions
47         to the same type.
49         PR c++/31411
50         * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
51         the MUST_NOT_THROW_EXPR.
53 2007-09-04  Richard Sandiford  <richard@codesourcery.com>
55         * decl.c (cp_finish_decl): Call determine_visibility before
56         make_rtl_for_nonlocal_decl.
58 2007-09-04  Jason Merrill  <jason@redhat.com>
60         PR c++/14032
61         * pt.c (most_specialized_class): Substitute outer template
62         arguments into the arguments of a member template partial
63         specialization.
64         (strip_innermost_template_args): New fn.
66 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
68         * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
70 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
72         * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
73         * decl.c (cp_make_fname_decl): Likewise,
74         * parser.c (cp_parser_string_literal): Likewise,
75         * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
76         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
77         Likewise,
79 2007-09-02  Paolo Carlini  <pcarlini@suse.de>
81         PR c++/33208
82         * typeck.c (build_unary_op): Fix error message for
83         Boolean expression as operand to operator--.
85 2007-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
87         * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
88         * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
89         Likewise.
91 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
93         PR c++/32597
94         * init.c (build_default_init): Make extern.
95         * cp-tree.h (build_default_init): Declare here.
96         * pt.c (tsubst_expr): When the instantiation of the initializer of
97         a variable results in an empty list, default-initialize the
98         variable.
99         (tsubst_copy_and_build): When the instantiation of the initializer
100         in a new expression results in an empty initializer list,
101         default-initialize it.
103 2007-08-31  Douglas Gregor  <doug.gregor@gmail.com>
105         * mangle.c (write_type): Change mangling of rvalue reference from
106         `RR' to `O'. 
108 2007-08-31  Jakub Jelinek  <jakub@redhat.com>
110         * decl.c (duplicate_decls): Remove duplicated line.
112 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
114         PR c++/33210
115         * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
116         BOUND_TEMPLATE_TEMPLATE_PARM.
118 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
120         PR c++/32113
121         * search.c (lookup_member): Check the name argument for
122         error_mark_node.
124 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
126         PR c++/33212
127         * parser.c (cp_parser_trait_expr): Check rerurn value of
128         cp_parser_type_id.
130 2007-08-30  Ollie Wild  <aaw@google.com>
132         * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
133         convert_ptrmem for pointer to member conversions.
134         (convert_to_pointer_force): Update cp_convert_to_pointer call.
135         (ocp_convert): Update cp_convert_to_pointer call.
136         * typeck.c (convert_ptrmem): Add conditional for null pointers to
137         members.
138         (build_static_cast_1): Check can_convert for conversions in either
139         direction.
140         (get_delta_difference_1): New function.
141         (get_delta_difference): Refactor to call get_delta_difference_1.
143 2007-08-30  Jakub Jelinek  <jakub@redhat.com>
145         * decl.c (start_preparsed_function): Set
146         DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
148 2007-08-28  Paolo Carlini  <pcarlini@suse.de>
150         PR c++/33209
151         * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
152         BOUND_TEMPLATE_TEMPLATE_PARM.
154 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
156         PR c++/32596
157         PR c++/32400
158         * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
159         and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
161 2007-08-27  Jason Merrill  <jason@redhat.com>
163         PR c++/29000
164         * pt.c (build_non_dependent_expr, type_dependent_expression_p): 
165         Look inside STMT_EXPR.
166         * semantics.c (stmt_expr_value_expr): New fn.
167         * cp-tree.h: Declare it.
169         PR c++/28558
170         * decl.c (groktypename): Ignore attributes applied to class type.
172 2007-08-28  Richard Guenther  <rguenther@suse.de>
174         * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
176 2007-08-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
177         
178         * error.c (dump_expr): Handle COMPLEX_CST.
179         * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
180         (pp_cxx_expression): Likewise.
182 2007-08-27  Alexandre Oliva  <aoliva@redhat.com>
184         * decl.c (GNU_INLINE_P): New.
185         (duplicate_decls): Handle gnu_inline.  Merge attributes and
186         some flags in overriding definitions.
187         (redeclaration_error_message): Handle gnu_inline.
188         (start_preparsed_function): Likewise.
190 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
192         * call.c (sufficient_parms_p): Constify.
193         * class.c (same_signature_p): Likewise.
194         * cp-gimplify.c (is_invisiref_parm,
195         cxx_omp_privatize_by_reference): Likewise.
196         * cp-objcp-common.c (has_c_linkage): Likewise.
197         * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
198         sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
199         grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
200         num_artificial_parms_for, comp_template_parms,
201         template_parameter_pack_p, any_dependent_template_arguments_p,
202         any_type_dependent_arguments_p, any_value_dependent_elements_p,
203         repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
204         zero_init_p, member_p, cp_lvalue_kind,
205         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
206         varargs_function_p, is_dummy_object, special_function_kind,
207         string_conv_p, type_unknown_p, comp_except_specs, compparms,
208         comp_cv_qualification, is_bitfield_expr_with_lowered_type,
209         unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
210         cp_has_mutable_p, at_least_as_qualified_p,
211         invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
212         * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
213         * except.c (nothrow_libfn_p): Likewise.
214         * method.c (skip_artificial_parms_for, num_artificial_parms_for):
215         Likewise.
216         * pt.c (comp_template_parms, template_parameter_pack_p,
217         any_type_dependent_arguments_p, any_value_dependent_elements_p,
218         any_dependent_template_arguments_p): Likewise.
219         * repo.c (repo_export_class_p): Likewise.
220         * semantics.c (anon_aggr_type_p): Likewise.
221         * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
222         builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
223         varargs_function_p, member_p, is_dummy_object, pod_type_p,
224         zero_init_p, special_function_p): Likewise.
225         * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
226         comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
227         compparms, invalid_nonstatic_memfn_p,
228         is_bitfield_expr_with_lowered_type, unlowered_expr_type,
229         string_conv_p, ptr_reasonably_similar, cp_type_readonly,
230         cp_has_mutable_p, lvalue_or_else): Likewise.
232 2007-08-25  Paolo Bonzini  <bonzini@gnu.org>
234         * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
235         * cp-objcp-common.c (cp_tree_size): Ditto.
236         * tree.c (cp_walk_subtrees): Ditto
237         * cp-tree.def (TINST_LEVEL): Go away.
238         * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
239         move together with other non-tree structs.
240         (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
241         (union lang_tree_node): Eliminate tinst_level field.
242         (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
243         (current_instantiation, outermost_tinst_level): Return
244         a "struct tinst_level *".
246         * error.c (print_instantiation_partial_context): Change second
247         parameter to a "struct tinst_level *".  Replace accessor macros
248         with field access.
249         (print_instantiation_full_context): Likewise.
250         * lex.c (in_main_input_context): Likewise.
252         * pt.c (struct pending_templates): New.
253         (pending_templates, last_pending_template): Use it as a type.
254         (current_tinst_level): Change typo to "struct tinst_level *"
255         (reopen_tinst_level): Accept "struct tinst_level *", return decl.
256         (add_pending_template): Construct a "struct pending_template".
257         Replace TINST_LEVEL accessor macros with field access.
258         (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
259         (pop_tinst_level): Likewise.
260         (instantiate_pending_templates): Likewise.  Factor common code used
261         when an instantiation has been done.
262         (outermost_tinst_level): Replace tree_last with loop.
263         (current_instantiation): Return a "struct tinst_level *".
265 2007-08-24  Ollie Wild  <aaw@google.com>
267         * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
268         * name-lookup.h (cp_binding_level): Remove vtables member.
270 2007-08-24  Richard Guenther  <rguenther@suse.de>
272         * tree.c (cp_cannot_inline_tree_fn): Remove.
273         * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
274         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
275         Remove define.
277 2007-08-24  Jakub Jelinek  <jakub@redhat.com>
279         PR c++/32567
280         * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
281         error_mark_node right away if build_expr_type_conversion
282         returned it.
284         PR c++/32898
285         * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
286         is error_mark_node rather than NULL_TREE.
287         * pt.c (check_explicit_specialization): Likewise.
289         PR c++/31941
290         * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
291         TARGET_VTABLE_USES_DESCRIPTORS targets properly.
293 2007-08-22  Jason Merrill  <jason@redhat.com>
295         PR c++/29365
296         * pt.c (outermost_tinst_level): New function.
297         * lex.c (in_main_input_context): New function.
298         * cp-tree.h: Declare it.
299         * decl2.c (constrain_class_visibility): Use it to avoid warning
300         about uses of the anonymous namespace in the main input file.
302 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
304         * init.c (build_new_1): Use get_target_expr instead of save_expr.
306 2007-08-20  Pawel Sikora  <pluto@pld-linux.org>
308         PR c++/7302
309         * class.c (finish_struct_1): Warn when a class has virtual
310         functions and accessible non-virtual destructor.
312 2007-08-20  Richard Guenther  <rguenther@suse.de>
314         PR c++/22369
315         PR c++/22451
316         * call.c (build_new_method_call): Convert initializer to
317         the basetype.
318         * init.c (build_aggr_init): Do not fiddle with types.
319         (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
320         * except.c (build_throw): Do not drop qualifiers for the
321         pointer type.
322         * typeck.c (get_member_function_from_ptrfunc): Do not
323         fiddle with types, instead convert.
324         (build_ptrmemfunc1): Convert to the target type for
325         initialization.
326         (gfc_trans_allocate): Convert result to target type.
327         * cp-objcp-common.c (cxx_get_alias_set): Pointers to
328         pointer-to-member structures shall have alias set zero as well.
330 2007-08-20  Richard Guenther  <rguenther@suse.de>
332         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
333         Remove.
334         * cp-tree.h (cp_auto_var_in_fn_p): Remove.
335         (nonstatic_local_decl_p): Likewise.
336         * tree.c (cp_auto_var_in_fn_p): Remove.
337         * decl.c (nonstatic_local_decl_p): Remove.
339 2007-08-20  Richard Guenther  <rguenther@suse.de>
341         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
342         Remove define.
343         * tree.h (cp_walk_tree): New define to walk_tree_1 with
344         cp_walk_subtrees lh parameter.
345         (cp_walk_tree_without_duplicates): New define to
346         walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
347         * tree.c (count_trees): Call
348         cp_walk_tree_without_duplicates.
349         (verify_stmt_tree): Call cp_walk_tree.
350         (break_out_target_exprs): Likewise.
351         (WALK_SUBTREE): Likewise.
352         * cp-gimplify.c (cp_genericize): Likewise.
353         * cp-pt.c (find_parameter_packs_r): Likewise.
354         (uses_parameter_packs): Likewise.
355         (make_pack_expansion): Likewise.
356         (check_for_bare_parameter_packs): Likewise.
357         (for_each_template_parm): Likewise.
358         * decl.c (check_default_argument): Call
359         cp_walk_tree_without_duplicates.
360         * except.c (build_throw): Likewise.
361         * decl2.c (type_visibility): Likewise.
362         * semantics.c (expand_or_defer_fn): Likewise.
363         (finalize_nrv): Call cp_walk_tree.
365 2007-08-20  Jakub Jelinek  <jakub@redhat.com>
367         PR c++/33025
368         * init.c (build_new_1): Rename placement_var variable to placement_expr.
369         Initialize it with save_expr rather than get_temp_regvar.
371 2007-08-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
373         PR c++/28989
374         * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
375         lvalues.
377 2007-08-17  Ollie Wild  <aaw@google.com>
379         PR c++/31749
380         * name-lookup.c (do_nonmember_using_decl): Shift implicit type
381         declarations into appropriate slots for comparison.  Fix type
382         comparison.
384 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
386         PR c++/32112
387         * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
388         * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
390 2007-08-17  Paolo Carlini  <pcarlini@suse.de>
392         PR c++/32870
393         * parser.c (cp_parser_class_head): Improve error message.
395 2007-08-16  Seongbae Park  <seongbae.park@gmail.com>
397         * pt.c (instantiate_decl): Set input_location
398         for the function end.
400 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
402         * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
403         Constify.
404         * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
405         class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
406         cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
407         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
408         * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
409         * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
410         * typeck.c (cp_type_quals): Likewise.
411         * typeck2.c (cxx_incomplete_type_diagnostic,
412         cxx_incomplete_type_error): Likewise.
414 2007-08-16  Paolo Carlini  <pcarlini@suse.de>
416         PR c++/31132
417         * pt.c (tsubst_friend_function): When check_classfn
418         returns error_mark_node likewise return it.
420 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
422         PR c++/32992
423         * typeck.c (check_return_expr): Don't NRV optimize vars in
424         anonymous unions.
425         * decl.c (finish_function): Comment fix.
427 2007-08-15  Paolo Carlini  <pcarlini@suse.de>
429         PR c++/33035
430         * pt.c (push_template_decl_real): Depending on TYPE_P
431         use either TYPE_CONTEXT or DECL_CONTEXT.
433 2007-08-14  Mark Mitchell  <mark@codesourcery.com>
435         * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
436         constructors and destructors return this.
438 2007-08-14  Paolo Carlini  <pcarlini@suse.de>
440         PR c++/27211
441         * decl2.c (check_classfn): Return error_mark_node in case of error;
442         in that case, do not call add_method.
443         * decl.c (start_decl): Deal with check_classfn returning
444         error_mark_node.
445         (grokfndecl): Likewise.
446         * pt.c (tsubst_friend_function): Likewise.
448 2007-08-14  Andrew Pinski  <pinskia@gmail.com>
450         PR c++/30428
451         * typeck.c (build_binary_op): Disallow vector float types with
452         BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
454 2007-08-11  Ian Lance Taylor  <iant@google.com>
456         * cp-objcp-common.c (cxx_get_alias_set): Change return type to
457         alias_set_type.
458         * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
460 2007-08-10  Ollie Wild  <aaw@google.com>
462         * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
463         type lookups.
464         (ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
465         function parameter.
466         (unqualified_namespace_lookup): Fix ambiguous_decl call.
467         (lookup_using_namespace): Fix ambiguous_decl call.
468         (qualified_lookup_using_namespace): Fix ambiguous_decl call.
470 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
472         * call.c (name_as_c_string): Use CONST_CAST.
473         * decl.c (build_decl): Likewise.
474         * parser.c (cp_parser_string_literal): Likewise.
476 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
478         PR c++/17763
479         * error.c (dump_expr): Consistently use the *_cxx_*
480         variants of the pretty-print functions.
482 2007-08-10  Paolo Carlini  <pcarlini@suse.de>
484         PR c++/22256
485         * decl.c (check_special_function_return_type): Just error
486         on return type specified for conversion operator.
488 2007-08-09  Daniel Berlin  <dberlin@dberlin.org>
490         * typeck2.c (readonly_error): Handle general expressions.
491         * error.c (dump_expr): Handle POINTER_PLUS_EXPR
493 2007-08-06  Dan Hipschman  <dsh@google.com>
495         * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
496         access function name.
498 2007-08-04  Alfred Minarik  <a.minarik@aon.at>
500         PR pch/13676
501         * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
502         * g++spec.c (lang_specific_driver): Check them.
504 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
506         PR c++/19532
507         * pt.c (inline_needs_template_parms): Fix comment; change return type
508         to bool.
510 2007-08-05  Volker Reichelt  <v.reichelt@netcologne.de>
512         Revert:
513         2007-03-26  Dirk Mueller  <dmueller@suse.de>
515         * parser.c (cp_parser_member_declaration): Pedwarn
516         about stray semicolons after member declarations.
518 2007-08-02  Lee Millward  <lee.millward@gmail.com>
520         PR c++/30849
521         PR c++/30850
522         PR c++/30851
523         * parser.c (cp_parser_asm_definition): Detect and discard asm
524         statements with invalid inputs or outputs.
525         (cp_parser_asm_operand_list): Return error mark node if any
526         of the operands are invalid. Adjust documentation.
527         
528 2007-08-02  Nick Clifton  <nickc@redhat.com>
530         * typeck.c: Change copyright header to refer to version 3 of the
531         GNU General Public License and to point readers at the COPYING3
532         file and the FSF's license web page.
533         * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
534         config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
535         Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
536         cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
537         tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
538         cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
539         cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
540         name-lookup.h, parser.c: Likewise.
542 2007-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
544         PR middle-end/32668
545         * call.c (magic_varargs_p): Honor the "type generic" attribute.
547 2007-07-30  Paolo Carlini  <pcarlini@suse.de>
549         PR c++/32108
550         * semantics.c (finish_label_stmt): Reject the __label__
551         extension outside function scopes.
553 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
555         * parser.c (eof_token): Un-constify.
556         (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
557         cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
558         casts.
560 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
562         * pt.c, tree.c, typeck2.c: Fix comment typos.
564 2007-07-28  Simon Martin  <simartin@users.sourceforge.net>
565             Mark Mitchell  <mark@codesourcery.com>
567         PR c++/30917
568         * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
569         hidden due to friend declarations in local classes.
571 2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>
573         * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
574         * cp-tree.def (DECLTYPE_TYPE): New.
575         * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
576         (dump_type_prefix): Ditto.
577         (dump_type_suffix): Ditto.
578         * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
579         * mangle.c (write_type): Handle DECLTYPE_TYPE.
580         * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
581         types.
582         (DECLTYPE_TYPE_EXPR): New.
583         (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
584         (finish_declared_type): Declare.
585         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
586         DECLTYPE_TYPE nodes.
587         (pp_cxx_type_id): Ditto.
588         * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
589         (tsubst): Substitute into a DECLTYPE_TYPE node.
590         (tsubst_copy): Ditto.
591         (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
592         nodes.
593         (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
594         * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
595         structural equality (because we can't hash the expressions).
596         (finish_declared_type): New.
597         * lex.c (reswords): Add "decltype" keyword.
598         * parser.c cp_lexer_next_token_is_decl_specifier_keyword
599         (cp_parser_postfix_expression): Add member_access_only_p to
600         restrict postfix expression to member access expressions.
601         (cp_parser_unary_expression): Update call to
602         cp_parser_postfix_expression to reflect new parameter.
603         (cp_parser_declared_type): New.
604         (cp_parser_simple_type_specifier): Parse decltype types.
606 2007-07-27  Mark Mitchell  <mark@codesourcery.com>
608         PR c++/32346
609         * call.c (convert_for_arg_passing): Only widen bitfields to their
610         declared types if necessary.
612 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
614         * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
615         Constify.
617 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
619         * decl.c (typename_hash, typename_compare): Constify.
620         * mangle.c (hash_type, compare_type): Likewise.
621         * pt.c (eq_local_specializations, hash_local_specialization):
622         Likewise.
623         * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
624         list_hash): Likewise.
625         * typeck2.c (pat_compare): Likewise.
627 2007-07-24  Nathan Sidwell  <nathan@codesourcery.com>
629         * method.c (implicitly_declare_fn): Increase alignment if member
630         function pointer format requires it.
632 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
634         PR c++/29001
635         * typeck.c (check_return_expr): Do not pass a null argument
636         to null_ptr_cst_p.
638 2007-07-24  Paolo Carlini  <pcarlini@suse.de>
640         PR c++/32561
641         * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
642         only on VAR_DECL.
644 2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>
646         PR c++/32839
647         * typeck.c (convert_arguments): Only use default args if we have
648         a function decl.
650         PR c++/30818
651         * typeck.c (structural_comptypes): No need to check
652         resolve_typename_type return value here.
653         * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
654         * pt.c (resolve_typename_type): Follow typename typedefs.  Return
655         original type rather than error_mark_node in case of failure.
656         * parser.c (cp_parser_nested_name_specifier_opt): Adjust
657         resolve_typename_type result check.
658         (cp_parser_direct_declarator, cp_parser_head,
659         cp_parser_constructor_declarator_p): Likewise.
661 2007-07-12  Kazu Hirata  <kazu@codesourcery.com>
663         * pt.c (template_parms_variadic_p): Remove.
664         * cp-tree.h: Remove the prototype for template_parms_variadic_p.
666 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
668         PR c++/30854
669         * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
670         argument to dump_aggr_init_expr_args instead of false.
672 2007-07-11  Douglas Gregor  <doug.gregor@gmail.com>
674         * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
675         canonical types; otherwise, fall back to structural type
676         comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
677         internal compiler error if the canonical types are wrong.
678         
679 2007-07-11  Paolo Carlini  <pcarlini@suse.de>
681         PR c++/32560
682         * parser.c (cp_parser_make_indirect_declarator): When the
683         the code argument is ERROR_MARK return cp_error_declarator.
685 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
687         PR 32617
688         * decl.c (cxx_init_decl_processing): Don't set
689         force_align_functions_log.
690         (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
691         * typeck.c (cxx_alignof_expr): When alignof is used on a plain
692         FUNCTION_DECL, return its alignment.
694 2007-07-09  Richard Guenther  <rguenther@suse.de>
696         * decl.c (start_preparsed_function): Do not promote return type.
698 2007-07-08  Paolo Carlini  <pcarlini@suse.de>
700         PR c++/30535
701         * pt.c (unify): Never pass error_mark_node to template_decl_level.
703 2007-07-07  Mark Mitchell  <mark@codesourcery.com>
705         PR c++/32232
706         * pt.c (resolve_overloaded_unification): Robustify.  Return a
707         bool, not an int.
708         (type_unification_real): Adjust accordingly.
710 2007-07-06  Richard Guenther  <rguenther@suse.de>
712         * init.c (build_new_1): Use the correct pointer type.
713         * typeck2.c (build_m_component_ref): Likewise.
715 2007-07-05  Mark Mitchell  <mark@codesourcery.com>
717         PR c++/32245
718         * init.c (build_zero_init): Always build an initializer for
719         non-static storage.
720         * typeck2.c (build_functional_cast): Use build_zero_init.
722         PR c++/32251
723         * init.c (build_new_1): Always pass the allocation function to
724         build_op_delete_call.
725         * call.c (build_op_delete_call): Handle operator delete with a
726         variable-argument list.  Do not issue an error when no matching
727         deallocation function is available for a new operator.
729         PR c++/31992
730         * cp-tree.h (any_value_dependent_elements_p): Declare it.
731         * decl.c (value_dependent_init_p): New function.
732         (cp_finish_decl): Use it.
733         * pt.c (value_dependent_expression_p): Use
734         any_value_dependent_elements_p.
735         * parser.c (cp_parser_primary_expression): Add comment about
736         treating dependent qualified names as integral
737         constant-expressions.
739 2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>
741         * decl.c (build_ptrmemfunc_type): Always use structural equality
742         tests when comparing pointer-to-member-function types, because the
743         handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
744         types.
745         
746 2007-07-03  Mark Mitchell  <mark@codesourcery.com>
748         * init.c (build_new): Tweak comment.
750 2007-06-29  Dave Brolley  <brolley@redhat.com>
752         PR c++/31743
753         * parser.c (cp_parser_new_type_id): Don't reduce a named array
754         type to its base type and number of elements here.
755         * init.c (build_new): Call complete_type_or_else to ensure that the
756         type is complete and to issue a diagnostic if it is not.
757         (build_new_1): Don't call complete_type_or_else here.
759 2007-07-03  Richard Guenther  <rguenther@suse.de>
761         PR c++/32609
762         * class.c (fixed_type_or_null): Re-lookup the hashtable slot
763         after recursing.
765 2007-07-02  Simon Baldwin  <simonb@google.com>
767         * parser.c (cp_parser_elaborated_type_specifier): Added a warning
768         for inner-style nested forward declarations that don't declare
769         anything useful.
771 2007-07-02  Jakub Jelinek  <jakub@redhat.com>
773         PR c++/31748
774         * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
775         DECL_P in not a variable and appears more than once error messages.
777 2007-07-01  Ollie Wild  <aaw@google.com>
779         * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
780         (select_decl): Remove function.
781         (unqualified_namespace_lookup): Populate binding by calling
782         ambiguous_decl.  Remove select_decl call.
783         (lookup_qualified_name): Remove select_decl call.
784         * decl.c (lookup_and_check_tag): Check for ambiguous references.
785         * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
786         generation when name lookup is ambiguous.
788 2007-06-29  Douglas Gregor  <doug.gregor@gmail.com>
790         PR c++/31724
791         * init.c (build_new_1): Use structural equality on the copy of the
792         array type.
794 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
796         * decl2.c (determine_visibility): Implement
797         flag_visibility_ms_compat effect on type info.
798         * decl.c (cxx_init_decl_processing): Implement
799         global effect of flag_visibility_ms_compat.
801 2007-06-28  Geoffrey Keating  <geoffk@apple.com>
803         * decl2.c (start_objects): Mark constructor-running function
804         as artificial.
806 2007-06-26  Simon Martin  <simartin@users.sourceforge.net>
808         PR c++/32111
809         * decl.c (grokdeclarator): Reset friendp for member functions declared
810         friend of their own class.
812 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
814         * decl2.c (determine_visibility): Don't look for dllexport here.
815         (determine_visibility_from_class): Tidy.
817 2007-06-18  Simon Baldwin <simonb@google.com>
819         PR c++/31923
820         * parser.c (cp_parser_single_declaration): Added check for storage
821         class other than sc_none in parsed declaration, and a flag to indicate
822         if the call is part of an explicit template specialization parse.
823         * (cp_parser_explicit_specialization): Specialization check flag added
824         to call to cp_parser_single_declaration(), set true.
825         * (cp_parser_template_declaration_after_export): Specialization check
826         flag added to call to cp_parser_single_declaration(), set false.
827         * pt.c (check_explicit_specialization): Added code to copy visiblity
828         and linkage from the templated function to the explicit specialization.
830 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
832         * typeck.c (build_binary_op): For templates build the
833         expression in pieces to avoid the assert in build2_stat.
834         (get_member_function_from_ptrfunc):
835         Change over to using POINTER_PLUS_EXPR and convert
836         the second operand to sizetype.
837         * typeck2.c (build_m_component_ref):  Likewise.
838         * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
839         instead of PLUS_EXPR for pointers.
840         (build_new_1): Likewise.
841         (build_vec_delete_1): Likewise.
842         (build_vec_delete): Likewise.
843         * class.c (build_base_path): Likewise.
844         (build_base_path): Likewise.
845         (convert_to_base_statically): Likewise.
846         (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
847         (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
848         instead of PLUS_EXPR.
849         (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
850         instead of PLUS_EXPR for pointers.
851         * call.c (build_special_member_call): Likewise.
852         * rtti.c (build_headof): Likewise.
853         Use sizetype instead of ptrdiff_type_node.
854         (tinfo_base_init): Create a POINTER_PLUS_EXPR
855         instead of PLUS_EXPR for pointers.
856         * except.c (expand_start_catch_block):  Do a
857         NEGATIVE and then a POINTER_PLUS_EXPR instead
858         of a MINUS_EXPR.
859         * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
860         PLUS_EXPR on pointer types over to use
861         POINTER_PLUS_EXPR and remove the conversion
862         to the pointer types.
863         * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
864         adding to a pointer type. Use size_int instead of
865         ssize_int. Convert the index to sizetype before
866         adding it to the pointer.
868 2007-06-15  Mark Mitchell  <mark@codesourcery.com>
870         * cp-tree.h (DECL_VAR_MARKED_P): Remove.
871         (DECL_ANON_UNION_VAR_P): New macro.
872         * class.c (fixed_type_or_null): Tidy.  Use a hash table, rather
873         than DECL_VAR_MARKED_P, to keep track of which variables we have
874         seen.
875         * decl.c (redeclaration_error_message): Complain about redeclaring
876         anonymous union members at namespace scope.
877         * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
879 2007-06-14  Geoff Keating  <geoffk@apple.com>
881         * decl2.c (determine_visibility): Ensure that functions with
882         hidden types as parameters are hidden.
884         PR 31093
885         * decl2.c (determine_visibility): Remove duplicate code for
886         handling type info.
888 2007-06-12  Ian Lance Taylor  <iant@google.com>
890         PR libstdc++/29286
891         * init.c (avoid_placement_new_aliasing): New static function.
892         (build_new_1): Call it.
894 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
896         * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
897         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
899 2007-06-08  Jakub Jelinek  <jakub@redhat.com>
901         PR c++/32177
902         * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
903         on init, the non-decl cond operand and increment value.
905 2007-06-07  Simon Martin  <simartin@users.sourceforge.net>
907         PR c++/30759
908         * decl.c (check_initializer): Report an error when a brace enclosed
909         initializer is used for a non-aggregate type in C++98.
910         (redeclaration_error_message): Rewrote flag_cpp0x in terms of
911         cxx_dialect.
912         (grokdeclarator): Likewise.
913         (move_fn_p): Likewise.
914         * typeck.c (check_return_expr): Likewise.
915         * call.c (reference_binding): Likewise.
916         * error.c (cp_cpp_error): Likewise.
917         * pt.c (check_default_tmpl_args): Likewise.
918         (tsubst): Likewise.
919         * lex.c (init_reswords): Likewise.
920         * parser.c (p_parser_primary_expression): Likewise.
921         (TOKEN_PRECEDENCE): Likewise.
922         (cp_parser_init_declarator): Likewise.
923         (cp_parser_ptr_operator): Likewise.
924         (cp_parser_parameter_declaration): Likewise.
925         (cp_parser_enclosed_template_argument_list): Likewise.
926         (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
927         (cp_parser_next_token_ends_template_argument_p): Likewise.
929 2007-06-04  Simon Baldwin  <simonb@google.com>
931         * decl.c (grokdeclarator): Readability change.  Moved case labels
932         into direct switch statement scope.
934 2007-06-04  Paolo Carlini  <pcarlini@suse.de>
936         * call.c (convert_like_real): Remove pointless code.
938 2007-05-31  Mark Mitchell  <mark@codesourcery.com>
940         * decl.c (get_atexit_fn_ptr_type): New function.
941         (get_atexit_node): Use it.
942         (start_cleanup_fn): Likewise.
943         (register_dtor_fn): Use the object's destructor, instead of a
944         separate cleanup function, where possible.
945         * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
946         (atexit_fn_ptr_type_node): New macro.
947         * decl2.c (build_cleanup): Use build_address.
949 2007-05-31  Daniel Berlin  <dberlin@dberlin.org>
951         * typeck.c (build_binary_op): Include types in error.
953 2007-05-31  Jakub Jelinek  <jakub@redhat.com>
955         PR c++/31806
956         * decl.c (cp_finish_decl): Also clear was_readonly if a static var
957         needs runtime initialization.
959 2007-05-31  Paolo Carlini  <pcarlini@suse.de>
961         PR c++/32158
962         * semantics.c (finish_trait_expr): Complete the types.
964 2007-05-30  Russell Yanofsky <russ@yanofsky.org>
965             Douglas Gregor <doug.gregor@gmail.com>
966             Pedro Lamarao <pedro.lamarao@mndfck.org>
967             Howard Hinnant <howard.hinnant@gmail.com>
969         PR c++/7412
970         PR c++/29939
971         * typeck.c (comptypes): Don't consider rvalue and lvalue
972         reference types to be equivalent.
973         (check_return_expr): Move from certain lvalues when returning
974         them.
975         * decl.c (grokdeclarator): Implement reference collapsing.
976         (copy_fn_p): Don't consider constructors taking rvalue references
977         to be copy constructors.
978         (move_fn_p): New.
979         * call.c (conversion): New "rvaluedness_matches_p" member.
980         (convert_class_to_reference): Require reference type as first
981         parameter instead of base type.
982         (reference_binding): Add logic to handle rvalue references.
983         (implicit_conversion): Update inaccurate comment.
984         (convert_like_real): Disable creation of temporaries that are
985         impossible to initialize for types with move constructors.
986         (build_over_call): Elide move constructors when possible.
987         (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
988         (maybe_handle_ref_bind): Return conversion instead of type node.
989         (compare_ics): Add logic to use "rvaluedness_matches_p" values to
990         determine preferred conversion sequences.
991         * cp-tree.h (TYPE_REF_IS_RVALUE): New.
992         (LOOKUP_PREFER_RVALUE): New.
993         (DECL_MOVE_CONSTRUCTOR_P): New.
994         (struct cp_declarator): Add "reference" member for reference
995         types, with new "rvalue_ref" flag.
996         (cp_build_reference_type): Declare.
997         (move_fn_p): Declare.
998         * error.c (dump_type_prefix): Format rvalue reference types
999         correctly in error messages.
1000         * except.c (build_throw): Move from certain lvalues when
1001         throwing.
1002         * mangle.c (write_type): Mangle rvalue references differently
1003         than regular references.
1004         * parser.c (make_reference_declarator): Add boolean parameter for
1005         rvalue references.
1006         (cp_parser_make_indirect_declarator): New.
1007         (cp_parser_new_declarator_opt): Call
1008         cp_parser_make_indirect_declarator. 
1009         (cp_parser_conversion_declarator_opt): Ditto.
1010         (cp_parser_declarator): Ditto.
1011         (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1012         declarators.
1013         * pt.c (tsubst): Implement reference collapsing.
1014         (maybe_adjust_types_for_deduction): Implement special template
1015         parameter deduction rule for rvalue references.
1016         (type_unification_real): Update calls to
1017         maybe_adjust_types_for_deduction.
1018         (try_one_overload): Ditto.
1019         (unify_pack_expansion): Ditto.
1020         * tree.c (lvalue_p_1): Handle rvalue reference types.
1021         (cp_build_reference_type): New.
1023 2007-05-30  Jakub Jelinek  <jakub@redhat.com>
1025         PR c++/31809
1026         * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1027         variables that need runtime initialization.
1029 2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>
1031         PR c++/31339
1032         * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1033         case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1034         case POSTDECREMENT_EXPR>): Return the error_mark_node
1035         if either the real or imaginary parts would an
1036         error_mark_node.
1037         
1038 2007-05-25  Simon Martin  <simartin@users.sourceforge.net>
1039             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1041         PR c++/31745
1042         * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1043         token is a closing brace, false if there are no tokens left.
1044         (cp_parser_namespace_alias_definition): Only consume the next token if
1045         it is a closing brace.
1047         * parser.c (cp_parser_class_specifier): Likewise.
1049 2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>
1051         * semantics.c (finish_member_declaration): Fix a typo in the
1052         last checkin.
1054 2007-05-25  Douglas Gregor <doug.gregor@gmail.com>
1056         PR c++/31431
1057         PR c++/31432
1058         PR c++/31434
1059         PR c++/31435
1060         PR c++/31437
1061         PR c++/31438
1062         PR c++/31442
1063         PR c++/31443
1064         PR c++/31444
1065         PR c++/31445
1066         * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1067         * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1068         * pt.c (check_for_bare_parameter_packs): Return bool indicated
1069         whether everything was okay. Fix indentation.
1070         (push_template_decl_real): Check for bare parameter packs in
1071         function parameters; where errors occur, mark the parameter types
1072         with ERROR_MARK_NODEs to avert ICEs.
1073         (coerce_template_parameter_pack): New.
1074         (coerce_template_parms): Moved parameter pack coercion into
1075         coerce_template_parameter_pack, and permit it anywhere in the
1076         template parameter list (not just at the end). Parameter and
1077         argument indices can vary (somewhat) separately now, so add
1078         PARM_IDX and ARG_IDX.
1079         (fn_type_unification): Don't set an argument pack as incomplete if
1080         no argument pack was deduced.
1081         (type_unification_real): If a type parameter is a parameter pack
1082         and has not otherwise been deduced, it will be deduced to an empty
1083         parameter pack.
1084         (more_specialized_fn): Use the actual lengths of the argument
1085         lists when comparing against expansions.
1086         * semantics.c (finish_member_declaration): If a field's type has
1087         bare parameter packs, error and set its type to ERROR_MARK_NODE.
1089 2007-05-24  Danny Smith  <dannysmith@users.sourceforge.net>
1091         PR target/27067
1092         * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1094 2007-05-22  Ollie Wild  <aaw@google.com>
1096         * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1097         (unqualified_namespace_lookup): Adds check for hidden types.
1099 2007-05-22  Ollie Wild  <aaw@google.com>
1101         * decl.c (duplicate_decls): Verify namespace names are unique.
1103 2007-05-21  Mark Mitchell  <mark@codesourcery.com>
1105         * decl.c (cxx_maybe_build_cleanup): Handle
1106         __attribute__((cleanup)).
1108 2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1110         * cvt.c (cp_convert_and_check): Don't check warnings if the
1111         conversion failed.
1113 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1115         * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1117 2007-05-14  Paolo Carlini  <pcarlini@suse.de>
1119         PR c++/29928
1120         * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1121         type only if is a class type (5.2.8/4).
1123 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
1125         * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1126         * decl.c (grokdeclarator): Use unsigned_type_for instead of
1127         c_common_unsigned_type.
1129 2007-05-11  Silvius Rus  <rus@google.com>
1131         * cp/typeck.c (build_indirect_ref): Add call to
1132         strict_aliasing_warning.
1133         (build_reinterpret_cast_1): Condition call to
1134         strict_aliasing_warning. 
1136 2007-05-11  Jan Hubicka  <jh@suse.cz>
1138         * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1139         * decl2.c (start_objects): ctors and dtors are no longer public.
1140         (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1141         
1142 2007-05-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1144         * typeck.c (build_unary_op): Remove code that used to
1145         handle non lvalue increments/decrements.
1147 2007-05-07  Mike Stump  <mrs@apple.com>
1149         * parser.c (check_empty_body): Add.
1150         (cp_parser_iteration_statement): Add call to check_empty_body.
1152 2007-05-05  Geoffrey Keating  <geoffk@apple.com>
1154         PR 31775
1155         * mangle.c (write_mangled_name): Mangle static variable names.
1156         (write_unqualified_name): Use local-source-name for
1157         namespace-scope static variables.
1159 2007-05-04  Dirk Mueller  <dmueller@suse.de>
1161         * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1162         not in effect.
1164 2007-05-02  Seongbae Park  <seongbae.park@gmail.com>
1166         PR c++/31663
1167         * decl2.c (constrain_class_visibility): 
1168         Use strip_pointer_or_array_types instead of strip_array_types.
1170 2007-04-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1172         PR C++/30221
1173         * decl.c (reshape_init_r): Don't reshape the first element if it
1174         is a pointer to member function.
1176 2007-04-27  Simon Baldwin  <simonb@google.com>
1178         * decl.c (grokparms): Changed message format from %qD to %qE.
1180 2007-04-27  Douglas Gregor  <doug.gregor@gmail.com>
1182         * error.c (maybe_warn_variadic_templates): Variadic templates are
1183        now in C++0x, so only warn about them in C++98 mode.
1184         
1185 2007-04-26  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1187         PR C++/30016
1188         * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1189         integeral types from vectors types.
1191 2007-04-26  Jakub Jelinek  <jakub@redhat.com>
1193         PR c++/31598
1194         * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1195         for type dependent OMP_CLAUSE_DECLs.
1197 2007-04-24  Mark Mitchell  <mark@codesourcery.com>
1199         PR c++/31338
1200         * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1201         * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1202         COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1203         * init.c (build_zero_init): Adjust, as
1204         COMPLEX_TYPE is now a SCALAR_TYPE.
1205         * typeck2.c (digest_init): Allow brace-enclosed initializers for
1206         COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1208 2007-04-25  Paolo Carlini  <pcarlini@suse.de>
1210         * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1211         per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1212         (trait_expr_value): Adjust.
1214 2007-04-23  Simon Baldwin  <simonb@google.com>
1216         * decl.c (grokparms): Added new error for duplicate function
1217         parameters names in function prototypes, to match gcc behavior.
1219 2007-04-23  Jan Hubicka  <jh@suse.cz>
1221         * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1222         bits dirrectly.
1224 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1226         * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1227         instead of checking GIMPLE_STMT_P in chain_next.
1229 2007-04-17  Mark Mitchell  <mark@codesourcery.com>
1231         PR c++/31513
1232         * call.c (convert_for_arg_passing): Convert bitfields to their
1233         declared types.
1235 2007-04-17  Simon Martin  <simartin@users.sourceforge.net>
1237         PR c++/31517
1238         * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1240 2007-04-16  Seongbae Park <seongbae.park@gmail.com>
1242         PR c++/29365
1243         * cp/decl2.c (constrain_class_visibility):
1244         Do not warn about the use of anonymous namespace in the main input file.
1246 2007-04-15  Mark Mitchell  <mark@codesourcery.com>
1248         * cp-tree.h (current_template_parms): Fix typo in comment.
1250 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
1252         * cp-tree.h, error.c: Fix comment typos.
1254 2007-04-13  Jason Merrill  <jason@redhat.com>
1256         PR c++/31074
1257         * call.c (reference_binding): Add c_cast_p parm.  If true,
1258         add quals to TO as needed to make it reference-compatible.
1260 2007-04-11  Jan Hubicka  <jh@suse.cz>
1262         * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1263         that we are not processing template_decl.
1265 2007-04-09  Mark Mitchell  <mark@codesourcery.com>
1267         PR c++/31449
1268         * class.c (build_base_path): Ensure that the converted pointer has
1269         the same cv-qualification as the input.
1271 2007-04-09  Paolo Carlini  <pcarlini@suse.de>
1273         * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1275 2007-04-08  Steven Bosscher  <steven@gcc.gnu.org>
1277         * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1278         Do not set it.
1279         (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1280         * tree.c (cp_add_pending_fn_decls): Remove.
1281         * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1283 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
1285         Revert change removing staticp.
1287 2007-04-06  Daniel Berlin  <dberlin@dberlin.org>
1289         * cp-objcp-common.c (cxx_staticp): Remove.
1290         * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1291         * cp-tree.h (cxx_staticp):      
1293 2007-04-04  Danny Smith  <dannysmith.users.sourceforge.net>
1295         * class.c (check_for_override): Don't remove dllmport attribute
1296         of virtual methods.
1298 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
1300         PR c++/30847
1301         * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1302         type issue error and return early.
1304 2007-03-30  Jason Merrill  <jason@redhat.com>
1306         PR c++/31187
1307         * typeck.c (cp_type_readonly): New fn.
1308         * cp-tree.h: Declare it.
1309         * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1310         (cp_finish_decl): Not here.
1312 2007-03-31  Richard Guenther  <rguenther@suse.de>
1314         * optimize.c (maybe_clone_body): Replace splay-tree usage by
1315         pointer-map.
1317 2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>
1319         PR c++/31138
1320         PR c++/31140
1321         PR c++/31141
1322         * parser.c (declarator_can_be_parameter_pack): New.
1323         (cp_parser_template_parameter): Only parse the `...' if the
1324         declarator can be a parameter pack.
1325         (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1326         is NULL.
1327         * pt.c (find_parameter_packs_r): Look into the bounds on integer
1328         types (they could be used as array bounds). 
1329         (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1330         (tsubst_pack_expansion): Handle failure to expand parameter
1331         packs.
1332         
1333 2007-03-30  Paolo Carlini  <pcarlini@suse.de>
1335         PR c++/26099
1336         * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1337         TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1338         (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1339         (CLASS_TYPE_NON_UNION_P): Add.
1340         (struct lang_type_class): Add has_complex_dflt.
1341         (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1342         (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1343         * cp-tree.def: Add TRAIT_EXPR.
1344         * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1345         * lex.c (struct resword): Add __has_nothrow_assign,
1346         __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1347         __has_trivial_constructor, __has_trivial_copy,
1348         __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1349         __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1350         __is_pod, __is_polymorphic, __is_union.
1351         * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1352         (cp_parser_trait_expr): New.
1353         * semantics.c (finish_trait_expr, trait_expr_value
1354         classtype_has_nothrow_copy_or_assign_p): New.
1355         * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1356         as static.
1357         * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1358         * class.c (check_bases, check_field_decl, check_bases_and_members):
1359         Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1360         * pt.c (uses_template_parms, tsubst_copy_and_build,
1361         value_dependent_expression_p, type_dependent_expression_p): Deal with
1362         TRAIT_EXPR.
1363         * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1365 2007-03-29  Richard Guenther  <rguenther@suse.de>
1367         * tree.c (cp_walk_subtrees): Do not set input_location.
1369 2007-03-28  Simon Martin  <simartin@users.sourceforge.net>
1371         PR c++/29077
1372         * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1373         destructor.
1375 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1377         * parser.c (struct cp_parser): Update comment for
1378         greater_than_is_operator_p.
1379         (cp_parser_primary_expression): In C++0x mode, a cast operator can
1380         be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1381         (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1382         !GREATER_THAN_IS_OPERATOR_P.
1383         (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1384         `>>' operators that will become two `>' tokens in C++0x.
1385         (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1386         mode, allowing it to terminate default arguments.
1387         (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1388         `>>' like two consecutive `>' tokens.
1389         (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1390         (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1391         ends a template argument.
1393 2007-03-28  Douglas Gregor  <doug.gregor@gmail.com>
1395         * decl.c (redeclaration_error_message): Complain when redeclaring
1396         a friend function with default template arguments (C++0x mode only).
1397         * cp-tree.h (check_default_tmpl_args): Declare.
1398         * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1399         template arguments in function templates. Add support for checking
1400         the default template arguments of friend templates.
1401         (push_template_decl_real): Fix call to check_default_tmpl_args.
1402         (type_unification_real): If a template parameter has not been
1403         deduced but provides a default template argument, substitute into
1404         that default template argument.
1405         * parser.c (cp_parser_init_declarator): When declaring (but not
1406         defining!) a function template in C++0x mode, check for default
1407         template arguments.
1409 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1411         PR c++/29993
1412         * decl.c (grokdeclarator): Deal with cv-qualified function type
1413         typedefs in the same way for member and non-member functions.
1415 2007-03-26  Dirk Mueller  <dmueller@suse.de>
1417         * parser.c (cp_parser_member_declaration): Pedwarn
1418         about stray semicolons after member declarations.
1420 2007-03-26  Paolo Carlini  <pcarlini@suse.de>
1422         PR c++/30500
1423         * pt.c (instantiate_decl): Set in_system_header.
1425 2007-03-22  Mark Mitchell  <mark@codesourcery.com>
1427         * cp-tree.h (current_tempalte_parms): Improve documentation.
1428         * pt.c (current_template_args): Likewise.
1430         PR c++/30863
1431         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1432         not consume tokens when failing.
1434 2007-03-22  Jim Wilson  <wilson@specifix.com>
1435             Mark Mitchell  <mark@codesourcery.com>
1437         PR c++/31273
1438         * call.c (standard_conversion): Use type_decays_to.  Keep FCODE
1439         consistent with FROM.
1441 2007-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1443         * error.c (dump_expr): Handle dependent names that designate types.
1444         * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1446 2007-03-17  Kazu Hirata  <kazu@codesourcery.com>
1448         * cp-tree.def, parser.c, pt.c: Fix comment typos.
1450 2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1452         * cvt.c (cp_convert_and_check) : Define.
1453         * cp-tree.h (cp_convert_and_check): Declare.
1454         * call.c (convert_conversion_warnings): Rename to
1455         conversion_null_warnings.  The warning for floating-point to
1456         integer is handled by convert_and_check in convert_like_real.
1457         (convert_like_real): convert_conversion_warnings was renamed as
1458         conversion_null_warnings.
1459         * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1460         overflow and changes of value during conversion.
1462 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1464         PR c++/30891
1465         * parser.c (cp_parser_statement): If 'namespace' is found, this
1466         only can be a namespace alias definition, so parse it now.
1467         (cp_parser_namespace_alias_definition): if we find an open brace
1468         instead of '=', then this is actually a misplaced namespace
1469         definition.
1470         
1471 2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1473         PR c++/24924
1474         * decl.c (cxx_init_decl_processing): Move command-line options
1475         processing to c-opts.c.
1476         
1477 2007-03-15  Douglas Gregor  <doug.gregor@gmail.com>
1479         * ptree.c (cxx_print_type): Use formatting markup for integers
1480         when printing template parameter index/level/orig level.
1481         (cxx_print_xnode): Ditto.
1482         * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1483         (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1484         Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1485         HOST_WIDE_INTs.
1486         (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1487         rather than a HOST_WIDE_INT.
1488         Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1489         NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1490         better bit-packing.
1491         (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1492         RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1493         IN_BASE_INITIALIZER bool bitfields.
1494         (struct cp_declarator): Make KIND a 4-bit field. Make
1495         PARAMETER_PACK_P a bool bitfield just after KIND.
1496         * pt.c (uses_parameter_packs): Destroy the pointer set.
1497         (make_pack_expansion): Ditto.
1498         (check_for_bare_parameter_packs): Ditto.
1499         * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1500         
1501 2007-03-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1503         PR c++/31165
1504         * call.c  (convert_default_arg): Instead of copying the node,
1505         unshare it.
1507 2007-03-15  Dirk Mueller  <dmueller@suse.de>
1509         PR c++/30860
1510         * call.c (convert_conversion_warnings): New..
1511         (convert_like_real): .. factored out from here.
1512         (convert_conversion_warnings): Add warning about
1513         false being converted to NULL in argument passing.
1515 2007-03-14  Dirk Mueller  <dmueller@suse.de>
1517         * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1518         (finish_do_body): Warn about empty body in do/while statement.
1520 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1522         * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1523         
1524 2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1526         PR c/21438
1527         * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1528         warning.
1529         
1530 2007-03-13  Alexandre Oliva  <aoliva@redhat.com>
1532         * cp/repo.c (init_repo): Initialize random_seed saved options.
1533         (finish_repo): Adjust.
1535 2007-03-13  Mark Mitchell  <mark@codesourcery.com>
1537         PR bootstrap/30899
1538         * Make-lang.in (doc/g++.1): Use $< to specify the location from
1539         which to copy.
1541 2007-03-12  Seongbae Park <seongbae.park@gmail.com>
1543         * decl.c (compute_array_index_type): New warning flag warn_vla.
1545 2007-03-12  Mark Mitchell  <mark@codesourcery.com>
1547         PR c++/30108
1548         * call.c (convert_default_arg): Copy non-constant arguments.
1550 2007-03-11  Mark Mitchell  <mark@codesourcery.com>
1552         PR c++/31038
1553         * parser.c (cp_parser_postfix_expression): Disallow compound
1554         literals in constant expressions.
1556         PR c++/30328
1557         * semantics.c (finish_typeof): Use unlowered_expr_type.
1558         
1559 2007-03-10  Mark Mitchell  <mark@codesourcery.com>
1561         PR c++/30274
1562         * cp-tree.h (unlowered_expr_type): New function.
1563         * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1564         COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1565         (unlowered_expr_type): New function.
1566         (build_unary_op): Disallow predecrements of bool bitfields.
1567         * call.c (build_conditional_expr): Use unlowered_expr_type.
1568         * pt.c (type_unification_real): Likewise.
1570 2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>
1572         PR c++/20599
1573         * typeck.c (check_return_expr): Check for bare parameter packs.
1574         (comptypes): Compare template parameter packs and
1575         type pack expansions.
1576         * decl.c (grokdeclarator): Deal with the declaration of function
1577         parameter packs.
1578         (grokparms): Verify that the (optional) function parameter pack is
1579         at the end of the parameter list.
1580         (xref_basetypes): Handle pack expansions in the base class.
1581         (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1582         * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1583         (NONTYPE_ARGUMENT_PACK): New.
1584         (TYPE_PACK_EXPANSION): New.
1585         (EXPR_PACK_EXPANSION): New.
1586         (ARGUMENT_PACK_SELECT): New.
1587         * cp-objcp-common.c (cp_tree_size): Compute size of
1588         (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1589         ARGUMENT_PACK_SELECT.
1590         * error.c (dump_template_argument): Print template argument packs.
1591         (dump_template_argument_list): Ditto.
1592         (dump_template_parameter): Dump `...' for template type parameter
1593         packs.
1594         (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1595         (dump_parameters): Print function parameter packs.
1596         (dump_template_parms): Print template argument packs.
1597         (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1598         (maybe_warn_variadic_templates): New.
1599         * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1600         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1601         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1602         CAST_EXPR. 
1603         * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1604         (write_template_arg): Write argument packs as separate arguments.
1605         * cp-tree.h (struct template_parm_index_s): Add flag that
1606         indicates that the template parameter is actually a parameter
1607         pack.
1608         (struct tree_argument_pack_select): New.
1609         (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1610         (union lang_tree_node): Add argument_pack_select.
1611         (FUNCTION_PARAMETER_PACK_P): New.
1612         (PACK_EXPANSION_P): New.
1613         (PACK_EXPANSION_PATTERN): New.
1614         (SET_PACK_EXPANSION_PATTERN): New.
1615         (PACK_EXPANSION_PARAMETER_PACKS): New.
1616         (ARGUMENT_PACK_P): New.
1617         (ARGUMENT_PACK_ARGS): New.
1618         (SET_ARGUMENT_PACK_ARGS): New.
1619         (ARGUMENT_PACK_INCOMPLETE_P): New.
1620         (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1621         (TEMPLATE_PARM_PARAMETER_PACK): New.
1622         (TEMPLATE_TYPE_PARAMETER_PACK): New.
1623         (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1624         (ARGUMENT_PACK_SELECT_INDEX): New.
1625         (ARGUMENT_PACK_SELECT_ARG): New.
1626         (struct cp_declarator): Add parameter_pack_p flag.
1627         (maybe_warn_variadic_templates): Declare.
1628         (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1629         indicate a template parameter pack. 
1630         (uses_parameter_packs): Declare.
1631         (template_parameter_pack_p): Declare.
1632         (template_parms_variadic_p): Declare.
1633         (make_pack_expansion): Declare.
1634         (check_for_bare_parameter_packs): Declare.
1635         * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1636         sizeof... expressions. 
1637         (pp_cxx_expression): Print pack expansions and non-type argument
1638         packs.
1639         (pp_cxx_exception_specification): Print pack expansions. 
1640         (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1641         (pp_cxx_ctor_initializer): Print pack expansions.
1642         (pp_cxx_type_id): Print pack expansions.
1643         (pp_cxx_template_argument_list): Print argument packs.
1644         (pp_cxx_template_parameter): Print ellipsis for template parameter
1645         packs.
1646         * pt.c (comp_template_parms): Compare template parameter packs.
1647         (template_parameter_pack_p): New.
1648         (template_parms_variadic_p): New.
1649         (template_args_variadic_p): New.
1650         (make_ith_pack_parameter_name): New.
1651         (struct find_parameter_pack_data): New.
1652         (find_parameter_packs_r): New.
1653         (uses_parameter_packs): New.
1654         (make_pack_expansion): New.
1655         (check_for_bare_parameter_packs): New.
1656         (expand_template_argument_pack): New.
1657         (reduce_template_parm_level): Propagate parameter pack flag.
1658         (process_template_parm): Add is_parameter_pack parameter to state
1659         when the parameter is actually a parameter pack. Create template
1660         parameter packs when is_parameter_pack is true.
1661         (current_template_args): The argument for a template parameter
1662         pack is an argument pack containing a single pack expansion.
1663         (process_partial_specialization): When checking that non-type
1664         argument expressions do not involve template parameters, loop over
1665         the arguments in argument packs separately.
1666         (push_template_decl_real): Check that the type of the declaration
1667         does not have any bare parameter packs. Check that primary
1668         templates have no more than one parameter pack, and that it comes
1669         at the end of the template parameter list.
1670         (convert_template_argument): Handle coercions for pack expansion
1671         expressions by coercing the pattern then rebuilding the expansion.
1672         (coerce_template_parms): When coercing the arguments for a
1673         variadic template, pack "extra" arguments into an argument pack.
1674         (coerce_template_template_parms): Cannot coerce between parameter
1675         packs and non-pack parameters.
1676         (template_args_equal): Compare PACK_EXPANSION_P expressions.
1677         (comp_template_args): Expand all template arguments packs before
1678         comparing template argument lists.
1679         (mangle_class_name_for_template): Make argument packs as separate
1680         template arguments.
1681         (for_each_template_parm_r): No need to handle BASELINK. 
1682         (instantiate_class_template): Handle pack expansions in the base
1683         class list.
1684         (tsubst_pack_expansion): New.
1685         (tsubst_template_args): Handle substitutions of argument packs and
1686         pack expansion into template argument lists.
1687         (tsubst_decl): Expand function parameter packs into separate
1688         function parameters.
1689         (tsubst_arg_types): Expand a type pack expansion into separate
1690         argument types.
1691         (tsubst_exception_specification): Handle pack expansions in
1692         exception specifiers.
1693         (tsubst): See through ARGUMENT_PACK_SELECT arguments when 
1694         replacing a template parameter with its argument. If we encounter
1695         a substitution for an argument pack, just return the parameter
1696         itself. 
1697         (tsubst_copy): sizeof(X...) returns the number of elements in
1698         parameter pack X.  See through ARGUMENT_PACK_SELECT when the
1699         PARM_DECL is a parameter pack.
1700         (tsubst_expr): Expression pack expansions and argument packs
1701         cannot show up here; they will all be handled through function
1702         calls, sizeof, and template argument lists.
1703         (tsubst_copy_and_build): sizeof(X...) returns the number of
1704         elements in parameter pack X.  Handle pack expansions in TREE_LIST
1705         and CONSTRUCTOR nodes.
1706         (fn_type_unification): Handle "incomplete" explicit template
1707         argument lists that specify some of the arguments for a template
1708         parameter pack.
1709         (type_unification_real): Unify arguments against pack expansions.
1710         (template_parm_level_and_index): New, helper function.
1711         (unify_pack_expansion): New.
1712         (unify): Unify argument packs on an argument-by-argument basis,
1713         handling variadic argument packs as well.
1714         (more_specialized_fn): Handle unification of function parameter
1715         packs. All things being equal, prefer non-variadic function
1716         templates to variadic function templates.
1717         (more_specialized_class): Prefer the variadic class template
1718         partial specialization that binds fewer arguments to a parameter
1719         pack.
1720         (regenerate_decl_from_template): Expand function parameter packs
1721         into separate parameters.
1722         (instantiate_decl): Ditto.
1723         (tsubst_initializer_list): Handle pack expansions for base-class
1724         initializers.
1725         (dependent_type_p_r): Determine dependent types in argument packs
1726         and pack expansions.
1727         (value_dependent_expression_p): Determine value-dependence of
1728         non-type argument packs.
1729         (dependent_template_arg_p): Handle argument packs.
1730         * semantics.c (finish_cond): Check for bare parameter packs.
1731         (finish_expr_stmt): Ditto.
1732         (finish_for_expr): Ditto.
1733         (finish_switch_cond): Ditto.
1734         (finish_mem_initializers): Ditto.
1735         * name-lookup.c (arg_assoc_type): Handle pack expansions and
1736         argument packs.
1737         * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1738         * parser.c (make_declarator): Declarator is not an expansion.
1739         (make_pointer_declarator): Transfer parameter pack flag to outer
1740         declarator.
1741         (make_reference_declarator): Ditto.
1742         (make_ptrmem_declarator): Ditto.
1743         (make_call_declarator): Ditto.
1744         (make_array_declarator): Ditto.
1745         (cp_parser_postfix_expression): Allow pack expansion expressions
1746         in the argument list for a call expression.
1747         (cp_parser_parenthesized_expression_list): Add new parameter
1748         ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1749         into separate arguments."
1750         (cp_parser_new_placement): Allow pack expansion expressions.
1751         (cp_parser_new_initializer): Ditto.
1752         (cp_parser_mem_initializer_list): Allow ellipsis to create a
1753         base-class initializer expansion.
1754         (cp_parser_mem_initializer): Ditto.
1755         (cp_parser_template_parameter_list): Keep track of whether the
1756         template parameter is a template parameter pack.
1757         (cp_parser_template_parameter): Parse the ellipsis to indicate a
1758         template parameter pack.
1759         (cp_parser_type_parameter): Ditto.
1760         (cp_parser_template_argument_list): Parse the ellipsis to indicate
1761         a pack expansion.
1762         (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1763         this declarator is a parameter pack.
1764         (cp_parser_parameter_declaration): The ellipsis does not end the
1765         parameter declaration, because it might be a parameter pack. Parse
1766         the ellipsis to indicate a parameter pack.
1767         (cp_parser_initializer): Allow pack expansions.
1768         (cp_parser_initializer_list): Allow ellipsis to create an
1769         initializer expansion.
1770         (cp_parser_base_clause): Allow ellipsis to create a base specifier
1771         expansion.
1772         (cp_parser_type_id_list): Allow ellipsis to create an exception
1773         specifier expansion.
1774         (cp_parser_attribute_list): Don't allow pack expansions.
1775         (cp_parser_functional_cast): Allow pack expansions.
1776         (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1777         compute the length of a parameter pack.
1778         (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1779         end a template argument.
1780         * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1781         NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1782         CAST_EXPR. 
1784 2007-03-09  Dirk Mueller  <dmueller@suse.de>
1786         * cp/call.c (build_new_op): Call warn_logical_operator.
1788 2007-03-08  Volker Reichelt  <reichelt@netcologne.de>
1790         PR c++/30852
1791         * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1793         PR c++/30534
1794         * pt.c (any_template_arguments_need_structural_equality_p):
1795         Robustify.
1797 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
1799         * decl.c (grokdeclarator): Disable warnings for anonymous
1800         bitfields.
1802 2007-03-05  Volker Reichelt  <reichelt@netcologne.de>
1804         * typeck2.c (readonly_error): Always emit a hard error.
1805         Remove last argument.
1806         * cp-tree.h (readonly_error): Adjust prototype.
1807         * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1808         * typeck.c (build_unary_op): Likewise.
1809         (build_modify_expr): Likewise.
1811 2007-03-04  Simon Martin  <simartin@users.sourceforge.net>
1813         PR c++/30895
1814         * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1816 2007-03-03  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1818         PR c++/15787
1819         * parser.c (struct cp_parser): New IN_IF_STMT.
1820         (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1821         returning if parsing the body of an 'if' statement or issuing an
1822         error and continuing.
1823         (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1824         body of 'if'.
1825         (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1826         
1827 2007-03-02  Simon Martin  <simartin@users.sourceforge.net>
1829         PR c++/28253
1830         * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1831         for thunks.
1833 2007-03-02  Geoffrey Keating  <geoffk@apple.com>
1835         * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1836         Objective-C++.  Don't exit early if -shared-libgcc needs to be
1837         added.
1839 2007-03-02  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1841         * typeck.c (common_base_type): Delete unused function.
1842         
1843 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1845         * Make-lang.in: Add dummy lang.install-pdf target.
1847 2007-03-01  Simon Baldwin <simonb@google.com>
1849         PR c++/23689
1850         * decl.c (check_tag_decl): Added new warning for typedef ignored
1851         when it precedes an otherwise valid non-typedef declaration.
1853 2007-02-28  Sandra Loosemore  <sandra@codesourcery.com>
1855         * typeck.c (build_function_call): Store converted arguments
1856         in a stack-allocated array instead of building a list.
1857         (convert_arguments): Store arguments in the array passed in as an
1858         argument, and return the actual number of arguments.
1859         * call.c (build_call): Delete, and replace with...
1860         (build_call_n, build_call_a): New.
1861         (build_op_delete_call): Rewrite to avoid constructing argument lists.
1862         (build_over_call): Store converted arguments in a stack-allocated
1863         array instead of building a list.
1864         (build_cxx_call): Pass arguments in an array instead of as a list.
1865         (build_java_interface_fn_ref): Rewrite to avoid constructing
1866         argument lists.
1867         * tree.h: Update declarations to reflect above changes.
1868         * method.c (use_thunk): Use a stack-allocated array to hold
1869         the arguments instead of a list.
1870         * rtti.c (throw_bad_cast): Update call to cxx_call.
1871         (throw_bad_typeid): Likewise.
1872         (build_dynamic_cast_1): Likewise.
1873         * init.c (build_builtin_delete_call): Use build_call_n.
1874         * decl.c (expand_static_init): Likewise.
1875         * except.c (cp_protect_cleanup_actions): Likewise.
1876         * cp-gimplify.c (genericize_eh_spec_block): Likewise.
1877         (gimplify_must_not_throw_expr): Likewise.
1878         (cxx_omp_apply_fn): Use build_call_a.
1880 2007-02-26  Mark Mitchell  <mark@codesourcery.com>
1882         * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
1883         * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
1885 2007-02-25  Mark Mitchell  <mark@codesourcery.com>
1887         * cp-tree.h (static_ctors): Remove.
1888         * cp-tree.h (static_dtors): Likewise.
1889         * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
1890         refactoring of tree_map hierarchy.
1891         (decl_shadowed_for_var_insert): Likewise.
1892         * semantics.c (expand_body): Use c_expand_body.
1893         (expand_or_defer_fn): Don't update static_ctors or static_dtors.
1894         * decl2.c (static_ctors): Remove.
1895         (static_dtors): Likewise.
1896         (generate_ctor_or_dtor_function): Pass NULL_TREE to
1897         objc_generate_static_init_call.  Do not call static_[cd]tors.
1898         (generate_ctor_and_dtor_functions_for_priority): Do not check for
1899         static_[cd]tors.
1900         (cp_write_global_declarations): Likewise.
1902 2007-02-23  Richard Guenther  <rguenther@suse.de>
1904         * class.c (note_name_declared_in_class): Make declaration
1905         changes meaning a pedwarn.
1907 2007-02-22  Michael Matz  <matz@suse.de>
1909         PR c++/29433
1910         * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
1911         * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
1912         dump_function_decl): Guard emitting outer scopes by new flag.
1913         * cp-lang.c (cxx_dwarf_name): New function.
1914         (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
1915         * pt.c (classtype_mangled_name, mangle_class_name_for_template):
1916         Remove functions.
1917         (push_template_decl_real, lookup_template_class): Remove calls
1918         to above functions.
1920 2007-02-19  Mark Mitchell  <mark@codesourcery.com>
1922         * call.c (build_new_method_call): Ensure that explicit calls of
1923         destructors have type "void".
1925 2007-02-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1927         * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
1928         and -Walways-true with -Waddress.
1929         * cvt.c (convert_to_void): Replace unconditional warning with
1930         -Waddress.
1932 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1934         * decl.c, tree.c: Fix comment typos.
1936 2007-02-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1938         PR C++/30158
1939         * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the 
1940         statement expression if we had an error mark node.
1942 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1943             Brooks Moses  <brooks.moses@codesourcery.com>
1944             Lee Millward  <lee.millward@codesourcery.com>
1946         * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
1947         Change class to tcc_vl_exp.
1949         * call.c (build_call): Use build_call_list instead 
1950         of build3. 
1951         (build_over_call): Likewise.
1952         (build_new_method_call): Use build_min_non_dep_call_list 
1953         instead of build_min_non_dep.
1955         * error.c (dump_call_expr_args): New function.
1956         (dump_aggr_init_expr_args): New function.
1957         (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
1958         Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
1960         * cvt.c (convert_to_void): Use build_call_array instead
1961         of build3; use new AGGR_INIT_EXPR accessor macros.
1963         * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
1964         instead of TREE_CODE_LENGTH.
1966         * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
1967         AGGR_INIT_EXPR accessor macros.
1969         * cp-gimplify.c (cp_gimplify_init_expr): Use 
1970         AGGR_INIT_EXPR_SLOT to set the slot operand.
1972         * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
1973         (AGGR_INIT_EXPR_SLOT): New macro.
1974         (AGGR_INIT_EXPR_ARG): New macro.
1975         (aggr_init_expr_nargs): New macro.
1976         (AGGR_INIT_EXPR_ARGP): New macro.
1977         (aggr_init_expr_arg_iterator): New.
1978         (init_aggr_init_expr_arg_iterator): New.
1979         (next_aggr_init_expr_arg): New.
1980         (first_aggr_init_expr_arg): New.
1981         (more_aggr_init_expr_args_p): New.
1982         (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
1983         (stabilize_aggr_init): New declaration.
1984         (build_min_non_dep_call_list): Likewise.
1986         * tree.c (process_aggr_init_operands): New function.
1987         (build_aggr_init_array) New function.
1988         (build_cplus_new): Update to use new CALL_EXPR and
1989         AGGR_INIT_EXPR accessor macros. Replace use of build3 with
1990         build_aggr_init_array.
1991         (build_min_non_dep_call_list) New function.
1992         (build_min_nt): Assert input code parameter is not a variable
1993         length expression class.
1994         (build_min, build_min_non_dep): Likewise.
1995         (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
1996         to check for equality instead of recursing. Handle tcc_vl_exp
1997         tree code classes.
1998         (stabilize_call): Update to only handle CALL_EXPRs, not 
1999         AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2000         (stabilize_aggr_init): New function.
2001         (stabilize_init): Use it.
2003         * cxx-pretty-print.c (pp_cxx_postfix_expression)
2004         <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2005         AGGR_INIT_EXPR accessor macros and argument iterators.
2006         
2007         * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2008         build_vl_exp. Iterate through the operands, recursively 
2009         processing each one.
2010         (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2011         CALL_EXPR accessor macros.
2012         (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2013         tree code classes. Use TREE_OPERAND_LENGTH instead of 
2014         TREE_CODE_LENGTH.
2016         * semantics.c (finish_call_expr): Use build_nt_call_list
2017         instead of build_nt.
2018         (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
2019         accessor macros. Use build_call_array to construct the 
2020         CALL_EXPR node instead of build3
2021         
2022         * decl2.c (build_offset_ref_call_from_tree): Use 
2023         build_nt_call_list and build_min_non_dep_call_list instead
2024         of build_min_nt and build_min_non_dep.
2026         * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2027         Use build_nt_call_list instead of build_min_nt.
2029 2007-02-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2031         PR c++/28943
2032         * call.c (build_conditional_expr): Improve error message.
2033         
2034 2007-02-13  Dirk Mueller  <dmueller@suse.de>
2036         * friend.c (do_friend): Annotate warning about friend
2037         declarations in templates with OPT_Wnon_template_friend.
2038         Convert informal message from warning() to inform().
2040 2007-02-12  Simon Martin  <simartin@users.sourceforge.net>
2041             Mark Mitchell  <mark@codesourcery.com>
2043         PR c++/14622
2044         * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2045         instantiations for variables.
2047 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2049         PR middle-end/7651
2050         * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2051         Check warn_unused_value just once.
2053 2007-02-11  Mark Mitchell  <mark@codesourcery.com>
2055         PR c++/26988
2056         * pt.c (determine_specialization): Use skip_artificial_parms_for.
2057         (fn_type_unificiation): Likewise.
2058         (get_bindings): Likewise.
2060 o2007-02-06  Mark Mitchell  <mark@codesourcery.com>
2062         PR target/29487
2063         * decl.c (finish_function): Use DECL_REPLACEABLE.
2064         * tree.c (cp_cannot_inline_tree_fn): Likewise.
2066 2007-02-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2068         * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2070 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
2072         * decl.c (grokvardecl): Don't error if !have_tls.
2073         (grokdeclarator): Likewise.
2074         * parser.c (cp_parser_omp_threadprivate): Likewise.
2076 2007-02-07  Jakub Jelinek  <jakub@redhat.com>
2078         PR c++/30703
2079         * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2080         parameters and result decls in omp clauses.
2081         (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2082         by reference.
2084 2007-02-05  Dirk Mueller  <dmueller@suse.de>
2086         PR bootstrap/30510
2087         * parser.c (cp_parser_class_specifier): Always initialize bases.
2089 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2091         * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2092         (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2093         * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2094         expressions.
2095         * semantics.c (finish_omp_atomic): Store a whole expression node
2096         in operand 1, and integer_zero_node in operand 0, for dependent
2097         OMP_ATOMIC.  Rewrite to make flow easier to understand.
2099 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2101         * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2103 2007-02-04  Kazu Hirata  <kazu@codesourcery.com>
2105         * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2106         parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2108 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
2110        * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2111        keyword warning to -Wc++0x-compat.
2112         
2113 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2115         * decl.c (grokdeclarator): Update documentation.
2117 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
2119         PR c++/30536
2120         * decl.c (grokdeclarator): If __thread is used together with
2121         a storage class other than extern and static, clear thread_p
2122         after issuing diagnostics and fall through to checking the
2123         storage class.
2125 2007-01-30  Roger Sayle  <roger@eyesopen.com>
2127         * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2128         calculating the size of an array (to avoid recursive errors).
2130 2007-01-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2132         PR c++/24745
2133         * typeck.c (build_binary_op): Fix logic for warning. Move warning
2134         to -Wpointer-arith.
2135         * call.c (convert_like_real): Don't warn when converting to
2136         boolean type.
2137         
2138 2007-01-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2140         * decl.c (pop_label): Replace warning with call to
2141         warn_for_unused_label.
2143 2007-01-28  Andrew Pinski  <pinskia@gmail.com>
2145         PR C++/28988
2146         * semantics.c (finish_pseudo_destructor_expr): Check the
2147         destrutor name by calling check_dtor_name.
2149 2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
2151         * lex.c (D_CPP0X): Rename.
2152         (D_CXX0X): To this.
2153         (reswords): D_CPP0X -> D_CXX0X.
2154         (init_reswords): Ditto.
2155         * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2156         of C++0x keywords as identifiers.
2158 2007-01-23  Simon Martin  <simartin@users.sourceforge.net>
2160         PR c++/27492
2161         * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2162         function decls.
2164 2007-01-23  Ian Lance Taylor  <iant@google.com>
2166         * typeck.c (convert_for_assignment): Only warn about a = b = c
2167         when converting to bool.
2169 2007-01-23  Roger Sayle  <roger@eyesopen.com>
2171         * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2172         TREE_OVERFLOW.
2173         * typeck.c (ignore_overflows): Remove the remaining uses of
2174         TREE_CONSTANT_OVERFLOW.
2176 2007-01-20  Jan Hubicka  <jh@suse.cz>
2178         * decl2.c (start_objects, start_static_storage_duration_function):
2179         Do not make the functions uninlinable.
2181 2007-01-17  Ian Lance Taylor  <iant@google.com>
2183         * class.c (add_method): Call VEC_reserve_exact rather than passing
2184         a negative size to VEC_reserve.
2186 2007-01-11  Simon Martin  <simartin@users.sourceforge.net>
2188         PR c++/29573
2189         * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2191 2007-01-10  Mark Mitchell  <mark@codesourcery.com>
2193         PR c++/28999
2194         * decl.c (make_typename_type): If the qualified name is not a
2195         type, issue an error.
2196         * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2197         formatting.
2199 2007-01-08  Geoffrey Keating  <geoffk@apple.com>
2201         * rtti.c: Include target.h.
2202         (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2203         don't emit typeinfo for fundamental types as weak.
2204         * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2206 2007-01-08  Richard Guenther  <rguenther@suse.de>
2208         * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2210 2007-01-08  Mark Shinwell  <shinwell@codesourcery.com>
2212         * call.c (standard_conversion): Pass flag to
2213         vector_types_convertible_p to disallow emission of note.
2214         * typeck.c (convert_for_assignment): Pass flag to
2215         vector_types_convertible_p to allow emission of note.
2216         (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2217         to disallow emission of note.
2219 2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2221         PR c++/28986
2222         * typeck.c (build_binary_op): Call overflow_warning if
2223         TREE_OVERFLOW_P is true for the result and not for any of the
2224         operands.
2225         
2226 2007-01-06  Lee Millward  <lee.millward@codesourcery.com>
2228        PR c++/19439
2229        * class.c (add_method): Don't wait until template
2230        instantiation time to complain about duplicate methods.
2231         
2232 2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2234         PR c/19978
2235         * semantics.c (finish_unary_op_expr): Warn only if result
2236         overflowed and operands did not.
2238 2007-01-05  Ian Lance Taylor  <iant@google.com>
2240         * typeck.c (build_binary_op): Warn about comparing a non-weak
2241         address to NULL.
2243 2007-01-05  Douglas Gregor  <doug.gregor@gmail.com>
2245         * pt.c (tsubst): Propagate the need for structural equality checks
2246         when reducing the level of template parameters.
2248 2007-01-03  Kazu Hirata  <kazu@codesourcery.com>
2250         * pt.c: Fix a comment typo.
2252 2007-01-02  Ian Lance Taylor  <iant@google.com>
2254         * semantics.c (maybe_convert_cond): Optionally warn when using an
2255         assignment as a condition.
2256         * typeck.c (convert_for_assignment): Optionally warn about
2257         assigning the result of an assignment to a bool.
2259 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2261         * pt.c (canonical_template_parms): Correct typo in comment.
2262         
2263 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2265         * typeck.c (structural_comptypes): Renamed from "comptypes".
2266         (comptypes): Use canonical type information to perform fast type
2267         comparison. When VERIFY_CANONICAL_TYPES, verify that the
2268         canonical type comparison returns the same results as we would see
2269         from the current, structural check. Support COMPARE_STRUCTURAL
2270         when we need structural checks.
2271         * decl.c (typename_compare): Fix comment.
2272         (build_typename_type): TYPENAME_TYPE nodes require structural
2273         equality checks, because they resolve different based on the
2274         current class type.
2275         (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2276         require structural equality checks (for now).
2277         (build_ptrmemfunc_type): Build the canonical pointer to member
2278         function type.
2279         (compute_array_index_type): Whenever we build a new index type
2280         to represent the size of an array in a template, we need to mark
2281         this index type as requiring structural equality. This goes for
2282         arrays with value-dependent sizes with the current ABI, or all
2283         arrays with ABI-1.
2284         * tree.c (cplus_array_hash): New.
2285         (struct cplus_array_info): New.
2286         (cplus_array_compare): New.
2287         (cplus_array_htab): New.
2288         (build_cplus_array_type_1): Use a hash table to cache the array
2289         types we build. Build the canonical array type for each array
2290         type.
2291         (cp_build_qualified_type_real): When building a cv-qualified array
2292         type, use the hash table of array types and build canonical array
2293         types as necessary.
2294         (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2295         use structural equality (for now).
2296         * cp-tree.h (COMPARE_STRUCTURAL): New.
2297         * pt.c (canonical_template_parms): New.
2298         (canonical_type_parameter): New.
2299         (process_template_parm): Find the canonical type parameter.
2300         (lookup_template_class): When we have named the primary template
2301         type, set the canonical type for our template class to the primary
2302         template type. If any of the template arguments need structural
2303         equality checks, the template class needs structural equality
2304         checks.
2305         (tsubst): When reducing the level of a template template
2306         parameter, we require structural equality tests for the resulting
2307         parameter because its template parameters have not had their types
2308         canonicalized. When reducing a template type parameter, find the
2309         canonical reduced type parameter.
2310         (any_template_arguments_need_structural_equality_p): New.