OSDN Git Service

830fc4b69febcc7fcebb778f5274bf027cf70dba
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2004-07-15  Jason Merrill  <jason@redhat.com>
2
3         * cp-lang.c (cxx_types_compatible_p): To the middle-end,
4         references and pointers are compatible.
5
6 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
7
8         * decl.c (xref_basetypes): Refactor.
9         * tree.c (copy_base_binfos): Replace with ...
10         (copy_binfo): ... this. Deep copy the given binfo, (not the just
11         bases of the given base).
12         * cp-tree.h (copy_base_binfo): Remove.
13         (copy_binfo): Declare.
14
15 2004-07-15  Mark Mitchell  <mark@codesourcery.com>
16
17         * name-lookup.c (set_inherited_value_binding_p): Add class_type 
18         parameter.
19         (get_class_binding): Adjust.
20         (push_class_level_binding): Don't use set_inherited_value_binding_p.
21
22 2004-07-15  Nathan Sidwell  <nathan@codesourcery.com>
23
24         * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
25         * decl.c (xref_basetypes): Set it here.
26
27         * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
28         Don't check for incomplete base.
29         (get_vfield_name): Simplify while loop.
30         * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
31
32 2004-07-14  Mark Mitchell  <mark@codesourcery.com>
33
34         * lex.c (cxx_make_type): Remove call to get_pointer_type.
35
36         * cp-tree.h (IDENTIFIER_VALUE): Remove.
37         (BINFO_PUSHDECLS_MARKED): Likewise.
38         (maybe_inject_for_scope_var): Likewise.
39         (push_class_decls): Likewise.
40         * name-lookup.h (push_class_binding): Remove.
41         (innermost_non_namespace_value): New function.
42         (outer_binding): Likewise.
43         * class.c (add_method): Push bindings before adding to
44         TYPE_METHODS.
45         (restore_class_cache): Do not restore class_shadowed.
46         (pushclass): Do not add USING_DECLs.  Do not call
47         push_class_decls.
48         * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
49         * decl.c (pushdecl): Use outer_binding.
50         (poplevel): Set the scope for an out-of-scope for-loop declaration
51         appropriately.
52         (cp_finish_decl): Don't call maybe_inject_for_scope_var.
53         * name-lookup.c (new_class_binding): New function.
54         (push_binding): Use it.
55         (pushdecl): Use innermost_non_namespace_value.
56         (maybe_inject_for_scope_var): Remove.
57         (push_class_binding): Remove.
58         (set_inherited_value_binding_p): New function.
59         (get_class_binding): New function.
60         (push_class_level_binding): Assert that the current_class_type is
61         being defined.
62         (outer_binding): New function.
63         (innermost_non_namespace_value): Likewise.
64         (lookup_name_real): Use outer_binding.
65         (lookup_name_current_level): Ignore out-of-scope variables.
66         * pt.c (check_template_shadow): Use innermost_non_namespace_value.
67         (lookup_template_class): Likewise.
68         * search.c (dfs_push_type_decls): Remove.
69         (dfs_push_decls): Likewise.
70         (setup_class_bindings): Likewise.
71         (lookup_field_1): Handle USING_DECLs from dependent scopes.
72         (marked_pushdecls_p): Remove.
73         (unmarked_pushdecls_p): Remove.
74         (marked_identifiers): Remove.
75         (setup_class_bindings): Remove.
76         (dfs_push_type_decls): Remove.
77         (dfs_push_decls): Remove.
78         (push_class_decls): Remove.
79         
80 2004-07-13  Mark Mitchell  <mark@codesourcery.com>
81
82         PR c++/16518
83         PR c++/16337
84         * decl.c (grokvardecl): Make declspecs parameter const.
85         (grokdeclarator): Likewise.  Adjust accordingly.
86         * decl.h (grokdeclarator): Adjust declaration.
87         * parser.c (cp_parser_init_declarator): Do not clear
88         decl_specifiers->attributes.
89
90         * cp-tree.h (lang_identifier): Remove class_value.
91         (IDENTIFIER_CLASS_VALUE): Remove.
92         (pop_class_decls): Likewise.
93         (init_search_processing): Likewise.
94         * class.c (handle_using_decl): Use lookup_member, not
95         IDENTIFIER_CLASS_VALUE.
96         (restore_class_cache): New function, split out from ...
97         (pushclass): ... here.  Do not call clear_identifier_class_values.
98         (invalidate_class_lookup_cache): Do not clear
99         IDENTIFIER_CLASS_VALUE.
100         (popclass): Do not call pop_class_decls.
101         (maybe_note_name_used_in_class): Do not save names looked up after
102         the class is complete.  Use lookup_member, not
103         IDENTIFIER_CLASS_VALUE.
104         * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
105         * decl.c (cxx_init_decl_processing): Do not call
106         init_search_processing.
107         * method.c (do_build_copy_constructor): Remove unnecessary code.
108         (do_build_assign_ref): Likewise.
109         * name-lookup.c (pushdecl): Use lookup_member, not
110         IDENTIFIER_CLASS_VALUE.
111         (set_identifier_type_value_with_scope): Set TREE_TYPE on the
112         type_shadowed list.
113         (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
114         (push_class_binding): Do not set it.
115         (clear_identifier_class_values): Remove.
116         (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
117         (store_binding): Do not save it.
118         (pop_from_top_level): Do not restore it.
119         * name-lookup.h (cxx_saved_binding): Remove class_value.
120         (clear_identifier_class_values): Remove.
121         * ptree.c (cxx_print_identifier): Do not print
122         IDENTIFIER_CLASS_VALUE.
123         * search.c (search_obstack): Remove.
124         (push_stack_level): Remove.
125         (pop_stack_level): Remove.
126         (search_level): Remove.
127         (search_stack): Remove.
128         (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
129         (setup_class_bindings): Use IDENTIFIER_MARKED, not
130         IDENTIFIER_CLASS_VALUE.
131         (marked_identifiers): New variable.
132         (push_class_decls): Clear IDENTIFIER_MARKED.
133         (pop_class_decls): Don't call pop_search_level.
134         (init_search_processing): Remove.
135
136 2004-07-12  Mark Mitchell  <mark@codesourcery.com>
137
138         * cp-tree.h (get_aggr_typedef): Remove.
139         * init.c (get_aggr_typedef): Likewise.
140
141         * name-lookup.c (push_class_level_binding): Simplify.
142
143 2004-07-12  Andrew Pinski  <apinski@apple.com>
144
145         PR c++/16475
146         Revert:
147         2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
148                 PR c++/16276
149                 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
150                 is not public.
151
152 2004-07-12  Eric Christopher  <echristo@redhat.com>
153
154         * parser.c (cp_parser_class_head): Remove unused variable.
155
156 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
157
158         * decl.c (grok_op_properties): Reject [de-]allocation functions
159         declared in a namespace, or declared as static.
160
161 2004-07-12  Nathan Sidwell  <nathan@codesourcery.com>
162
163         * cp-tree.h (make_binfo): Remove.
164         * decl.c (xref_basetypes): Use make_tree_binfo directly.
165         * tree.h (copy_base_binfos): Likewise.
166         (make_binfo): Remove.
167
168         * call.c (build_user_type_conversion_1, build_new_op,
169         check_constructor_callable, build_temp,
170         perform_direct_initialization_of_possible): Pass type directly to
171         lookup_fnfields & build_special_member_call.
172         (build_special_member_call): Accept a type, and complete it.
173         * class.c (finish_stuct_bits): Copy the BINFOs here.
174         * cvt.c (ocp_convert): Pass type directly to
175         build_special_member_call.
176         * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
177         (xref_basetypes): Allocate the binfo here. Adjust.
178         * init.c (build_init, build_new_1): Pass type directly to
179         build_special_member_call.
180         * lex.c (cxx_make_type): Do not allocate binfo here.
181         * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
182         * parser.c (cp_parser_class_head): Always call xref_basetypes.
183         * pt.c (instantiate_class_template): Likewise. Inhibit access
184         checking for template friends.
185         * ptree.c (cxx_print_type): Adjust record printing.
186         * search.c (lookup_base): When taking a type, complete it before
187         looking for a binfo.
188         (lookup_member): Delay completing a type.
189         (push_class_decls): Don't walk an incomplete type.
190         (lookup_conversions): Likewise.
191         * semantics.c (finish_stmt_expr_expr): Pass type directly to
192         build_special_member_call.
193         * tree.c (copy_base_binfos): Adjust.
194         (make_binfo): Likewise.
195         * typeck.c (build_modify_expr): Pass type directly to
196         build_special_member_call.
197         * typeck2.c (process_init_constructor): Check a binfo exists.
198         (build_m_component_ref): Allow accessing an incomplete type.
199         (build_functional_cast): Pass type directly to
200         build_special_member_call.
201
202 2004-07-12  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
203
204         PR c++/2204
205         * config-lang.in (gtfiles): Add typeck2.c.
206         * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
207         gt-cp-typeck2.h.
208         * cp-tree.h: Declare complete_type_check_abstract.
209         * typeck2.c (pat_calc_hash, pat_compare,
210         complete_type_check_abstract): New functions.
211         (abstract_virtuals_error): If the type is abstract, register the
212         declaration within abstract_pending_vars for further checks.
213         Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
214         * decl.c (cp_finish_decl): Do not strip array types.
215         (create_array_type_for_decl): Check for abstractness of the element
216         type.
217         (complete_vars): Call complete_type_check_abstract.
218         * class.c (finish_struct): Prepare a list of virtual functions for
219         template types, and call complete_vars on it to check for abstractness.
220
221 2004-07-12  Paolo Bonzini  <bonzini@gnu.org>
222
223         PR tree-optimization/14107
224         * decl.c (finish_function): Remove temporary band-aid.
225
226 2004-07-11  Mark Mitchell  <mark@codesourcery.com>
227
228         * call.c (build_operator_new_call): Avoid using push_to_top_level.
229         (build_new_op): Adjust call to lookup_function_nonclass.
230         * name-lookup.c (identifier_type_value): Adjust call to
231         lookup_name_real.
232         (lookup_name_real): Add block_p parameter.
233         (lookup_name_nonclass): Adjust call to lookup_name_real.
234         (lookup_function_nonclass): Likewise.
235         (lookup_name): Likewise.
236         * name-lookup.h (lookup_name_real): Change prototype.
237         (lookup_name_nonclass): Likewise.
238         * parser.c (cp_parser_lookup_name): Likewise.
239
240         * cp-tree.h (saved_scope): Make old_bindings a vector.
241         (unuse_fields): Remove.
242         * name-lookup.h (cxx_saved_binding): Define it.
243         * class.c (pushclass): Don't use unuse_fields.
244         * name-lookup.c (cxx_saved_binding_make): Remove.
245         (store_binding): Add new bindings to a vector, using an
246         accumulator style, rather than adding them to a list.
247         (store_bindings): Adjust accordingly.
248         (store_class_bindings): Likewise.
249         (push_to_top_level): Likewise.
250         (pop_from_top_level): Likewise.
251         * optimize.c (maybe_clone_body): Must push_to_top_level and
252         pop_from_top_level calls outside of loop.
253         * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
254         calls here from cp_parser_late_parsing_default_args.
255         (cp_parser_save_default_args): Record the class type in which the
256         function is declared.
257         (cp_parser_late_parsing_default_args): Do not call
258         push_nested_class/pop_nested_class.
259         * search.c (dfs_unuse_fields): Remove.
260         (unuse_fields): Remove.
261
262 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
263
264         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
265         LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
266         * cp-tree.h (poplevel): Declare.
267         (set_block): Remove.
268         * decl.c (set_block): Remove.
269
270 2004-07-10  Mike Stump  <mrs@apple.com>
271
272         * decl2.c (import_export_class): Never export/import vtables
273         with inline key functions.
274
275 2004-07-09  Steven Bosscher  <stevenb@suse.de>
276
277         * typeck.c (c_expand_asm_operands): Remove.
278
279 2004-07-09  Mike Stump  <mrs@apple.com>
280
281         * typeck.c (build_class_member_access_expr): Skip null deref
282         warning when we don't dereference it.
283
284 2004-07-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
285
286         PR c++/8211
287         PR c++/16165
288         * class.c (check_field_decls): Improve -Weffc++ warning: do not
289         warn for pointers to functions/members, or for classes without
290         destructors.
291
292 2004-07-08  Mark Mitchell  <mark@codesourcery.com>
293
294         * name-lookup.h (struct cp_binding_level): Update documentation
295         for class_shadowed.
296
297 2004-07-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
298
299         PR c++/16169
300         * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
301         returning CALL_EXPR, and non-reference return type.
302
303 2004-07-08  Nathan Sidwell  <nathan@codesourcery.com>
304
305         * name-lookup.c (push_binding): Use VEC_reserve.
306
307 2004-07-08  Richard Henderson  <rth@redhat.com>
308
309         * cp-tree.h (expand_eh_spec_block): Remove.
310
311 2004-07-07  Mark Mitchell  <mark@codesourcery.com>
312
313         * cp-tree.h (saved_scope): Remove x_previous_class_type and
314         x_previous_class_values; add x_previous_class_level.
315         (previous_class_type): Remove.
316         (previous_class_values): Remove.
317         (previous_class_level): New macro.
318         * class.c (pushclass): Restore the identifier cache more
319         expeditiously.
320         (invalidate_class_lookup_cache): Use vector for class_shadowed and
321         previous_class_values.
322         * decl.c (poplevel): Likewise.
323         * name-lookup.c (cxx_binding_init): New function.
324         (cxx_binding_make): Use it.
325         (push_binding): For a binding in a class level, use a vector of
326         cp_class_binding nodes.
327         (push_binding_level): New function.
328         (begin_scope): Use it.
329         (leave_scope): Do not put class binding levels on the free list.
330         (print_binding_level): Adjust for the fact that class_shadowed is
331         a vector.
332         (poplevel_class): Likewise.
333         (clear_identifier_class_values): Likewise.
334         (push_class_level_binding): Likewise.
335         (set_class_shadows): Remove.
336         (store_binding): New function.
337         (store_class_bindings): New function.
338         (push_to_top_level): Use store_class_bindings as appropriate.
339         (pop_from_top_level): Use previous_class_level, not
340         previous_class_type.
341         * name-lookup.h (cp_class_binding): New type.
342         (cp_binding_level): Use a vector object for class_shadowed.
343         (push_binding_level): Declare.
344         (set_class_shadows): Remove.
345
346 2004-07-07  Andrew Pinski  <apinski@apple.com>
347
348         * class.c (instantiate_type): BUFFER_REF is dead.
349         * lex.c (init_operators): IN_EXPR is dead.
350
351 2004-07-07  Jason Merrill  <jason@redhat.com>
352
353         PR c++/16334
354         * call.c (build_new_op): Give overload warnings for built-in
355         candidates.
356
357 2004-07-07  H.J. Lu  <hongjiu.lu@intel.com>
358
359         PR c++/16276
360         * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
361         is not public.
362
363 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
364
365         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
366         * class.c (build_primary_vtable, check_bases,
367         determine_primary_base, finish_struct_bits,
368         maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
369         get_basefndecls, warn_hidden, walk_subobject_offsets,
370         build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
371         layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
372         finish_struct_1, get_vfield_name, contains_empty_class_p,
373         dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
374         dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
375         add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
376         BINFO macros.
377         * decl.c (xref_basetypes): Likewise.
378         * dump.c (cp_dump_tree): Likewise.
379         * error.c (dump_expr): Likewise.
380         * init.c (sort_mem_initializers, expand_member_init,
381         push_base_cleanups): Likewise.
382         * method.c (do_build_copy_constructor, do_build_assign_reg,
383         synthesize_exception_spec): Likewise.
384         * name-lookup.c (arg_assoc_class):
385         * pt.c (instantiate_class_template, tsubst,
386         get_template_base_recursive):
387         * ptree.c (cxx_print_type):
388         * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
389         * search.c (lookup_base_r, dynamic_cast_base_recurse,
390         dfs_access_in_type, access_in_type, lookup_field_queue_p,
391         bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
392         marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
393         dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
394         binfo_for_vtable, copied_binfo, original_binfo): Likewise
395         * tree.c (copy_base_binfos, make_binfo): Likewise.
396         * typeck.c (commmon_base_type): Likewise
397         * typeck2.c (process_init_constructor): Likewise
398
399 2004-07-06  Joseph S. Myers  <jsm@polyomino.org.uk>
400
401         * decl.c (check_tag_decl): Name redeclared type in diagnostic.
402
403 2004-07-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
404
405         PR c++/3671
406         * pt.c (convert_nontype_argument): Disallow conversions between
407         different enumeration types.
408
409 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
410
411         * cp-tree.h (BINFO_MARKED): Remove.
412         (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
413         BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
414         BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
415         (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
416         * class.c (build_base_path): Use BINFO_VIRTUAL_P.
417         (mark_primary_bases, determine_primary_base, base_derived_from,
418         dfs_find_final_overrider, dfs_find_final_overrider_q,
419         dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
420         dfs_modify_vtables, walk_subobject_offsets,
421         layout_nonempty_base_or_field, build_base_field,
422         build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
423         end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
424         finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
425         build_ctor_vtbl_group, accumulate_vtble_inits,
426         dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
427         build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
428         add_vcall_offset_vtbl_entries_1): Likewise.
429         * decl.c (xref_basetypes): Incomming virtual base indicated by
430         TREE_TYPE. Adjust.
431         * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
432         * init.c (finish_init_stmts, sort_mem_initializers,
433         emit_mem_initializers, build_vtble_address, expand_member_init,
434         push_base_cleanups): Likewise.
435         * method.c (do_build_copy_constructor): Likewise.
436         * pt.c (instantiate_class_template,
437         get_template_base_recursive): Likewise.
438         * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
439         get_pseudo_ti_desc): Likewise.
440         * search.c (lookup_base_r, dynamic_cast_base_recurse,
441         binfo_from_vbase, binfo_via_virtual, copied_binfo,
442         original_binfo): Likewise.
443         * semantics.c (finish_base_specifier): Virtualness is indicated
444         by TREE_TYPE.
445         * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
446
447 2004-07-06  Mark Mitchell  <mark@codesourcery.com>
448
449         Revert:
450         2004-06-24  Jason Merrill  <jason@redhat.com>
451         PR c++/16115
452         * decl.c (grokparms): Give the PARM_DECL reference type if the
453         parameter is passed by invisible reference.
454
455 2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
456
457         * cp-lang.c (cp_var_mod_type_p): Add extra arg.
458         * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
459         * pt.c (check_instantiated_args, unify): Likewise.
460
461 2004-07-05  Phil Edwards  <phil@codesourcery.com>
462
463         * Make-lang.in (check-c++, lang_checks):  Add some comments.
464
465 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
466
467         * cp-mudflap.c: Delete file.
468         * Makefile.in: Remove all references to cp-mudflap.o.
469
470 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
471
472         * decl.c (cxx_init_decl_processing): Call
473         build_common_tree_nodes before creating the global NAMESPACE_DECL.
474
475 2004-07-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
476
477         PR c++/2518
478         * call.c (build_operator_new_call): Look only at global scope.
479
480 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
481
482         * call.c (enforce_access): Expect TREE_BINFO.
483         * class.c (binfo_ctor_vtable): Check TREE_BINFO.
484         * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
485         (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
486         Adjust.
487         (BINFO_LANG_ELTS): Remove.
488         (BINFO_LANG_SLOTS): New.
489         (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
490         (CLASSTYPE_TEMPLATE_INFO): Adjust.
491         * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
492         * search.c (lookup_member): Check TREE_BINFO.
493         * semantics.c (perform_or_defer_access_check): Likewise.
494         (check_accessibility_of_qualified_id): Check
495         deferred_access_no_check.
496         * tree.c (make_binfo): Use make_tree_binfo.
497
498 2004-07-04  Mark Mitchell  <mark@codesourcery.com>
499
500         * method.c (implicitly_declare_fn): Set linkage of generated
501         functions.
502
503 2004-07-04  Richard Henderson  <rth@redhat.com>
504
505         * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
506
507 2004-07-03  Scott Brumbaugh  <scottb.lists@verizon.net>
508
509         PR c++/3761
510         * name-lookup.c (push_class_level_binding): Don't pass a
511         TREE_LIST of ambiguous names to check_template_shadow as it
512         only handles declarations. Instead, pull the declaration
513         out and pass that.
514
515 2004-07-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
516
517         PR c++/14971
518         * pt.c (check_explicit_specialization): Clarify error message.
519
520 2004-07-02  Richard Henderson  <rth@redhat.com>
521
522         * tree.c (cp_unsave_r): Update remap_save_expr call.
523
524 2004-07-02  Mark Mitchell  <mark@codesourcery.com>
525
526         PR c++/16240
527         * mangle.c (write_template_arg): Correct mangling.
528
529         PR c++/16297
530         * decl.c (grokdeclarator): Robustify.
531
532 2004-07-01  Richard Henderson  <rth@redhat.com>
533
534         * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
535         * method.c (synthesize_method): Don't clear_last_expr.
536         * name-lookup.c (maybe_push_cleanup_level): Likewise.
537
538 2004-07-01  Nick Clifton  <nickc@redhat.com>
539
540         * decl2.c (import_export_class): Invoke the
541         import_export_class field in the gcc_target structure if it is not
542         empty.
543
544 2004-06-30  Richard Henderson  (rth@redhat.com>
545
546         * decl.c (start_preparsed_function): Don't set immediate_size_expand.
547         * method.c (use_thunk): Likewise.
548
549 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
550
551         * call.c (build_over_call), typeck.c (build_function_call): Call
552         check_function_arguments instead of check_function_format.
553
554 2004-06-30  Joseph S. Myers  <jsm@polyomino.org.uk>
555
556         * call.c (build_over_call), typeck.c (build_function_call): Update
557         calls to check_function_format.
558
559 2004-06-30  Richard Henderson  <rth@redhat.com>
560
561         * call.c (build_over_call): Use __builtin_memcpy for copying
562         CLASS_AS_BASE rather than funny casting.
563
564 2004-06-30  Richard Henderson  <rth@redhat.com>
565
566         * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
567         TYPE_SIZE_UNIT of full_type.
568
569 2004-06-30  Per Bothner  <per@bothner.com>
570
571         Conditionally compile support for --enable-mapped_location.
572         * decl.c (pop_label):  Handle (imperfectly) USE_MAPPED_LOCATION case.
573         * decl2.c:  If USE_MAPPED_LOCATION, don't do some line number
574         adjustments - which I don't understand.
575         * error.c (dump_decl):  Rename "<interrnal>" to "<built-in>".
576         * error.c:  Use LOCATION_FILE and EXPR_LOCATION macros.
577         (print_instantiation_partial_context):  Use expand_location.
578         * decl.c (duplicate_decl):  Use new DECL_IS_BUILTIN macro.
579         * name-lookup.c:  Likewise.
580         * lex.c (cxx_init):  Likewise.  Also use BUILTINS_LOCATION.
581         * name-lookup.c:  Use input_line macro.
582         * parser.c (cp_lexer_get_preprocessor_token):  Use UNKNOWN_LOCATION.
583         (cp_parser_statement):  Rename locaal variable statement_locus to
584         statement_location and use SET_EXPR_LOCATION macro.
585         * pt.c:  Handle USE_MAPPED_LOCATION case.  Use new macros.
586         * tree.c (cp_walk_subtrees):  Likewise.
587
588 2004-06-29  Per Bothner  <per@bothner.com>
589
590         * tree.c (build_min_nt, build_min, build_min_non_dep):
591         Don't set TREE_COMPLEXITY from input_line.
592
593 2004-06-29  Paul Brook  <paul@codesourcery.com>
594
595         * init.c: Include target.h.
596         (get_cookie_size): Remove and replace with target hook.
597         Update callers.
598         (build_new_1): Store the element size in the cookie.
599
600 2004-06-29  Nathan Sidwell  <nathan@codesourcery.com>
601
602         PR c++/16260
603         * parser.c (cp_parser_template_declaration_after_export): Disable
604         access checks here ...
605         (cp_parser_class_specifier): ... not here.
606
607 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
608
609         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
610         VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
611         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
612         TREE_CHECK macro.
613
614 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
615
616         * cp-tree.h (struct deferred_access): Move to ...
617         * semantics.c (struct deferred_access): ... here. Adjust.
618         (deferred_access_stack): Make a VEC(deferred_access),
619         (deferred_access_free_list): Remove.
620         (deferred_access_no_check): New.
621         (push_deferring_access_checks, resume_deferring_access_checks,
622         stop_deferring_access_checks, pop_deferring_access_checks,
623         get_deferred_access_checks, pop_to_parent_deferring_access_checks,
624         perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
625
626 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
627
628         PR c++/16174
629         * call.c (build_temp): Declare.
630         (check_constructor_callable): New.
631         (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
632         CONSTRUCTOR_CALLABLE.
633         (convert_like_real, initialize_reference): Use
634         check_constructor_callable.
635         * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
636         (LOOKUP_*): Renumber.
637
638 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
639
640         * friend.c (add_friend): Only perform access checks when context
641         is a class.
642         * lex.c (cxx_make_type): Only create a binfo for aggregate types.
643         * parser.c (cp_parser_class_specifier): Disable access checks here
644         when parsing the body of a templated class.
645         * semantics.c (perform_or_defer_access_checks): Reorder to allow
646         NULL binfos when not checking access.
647
648 2004-06-28  Nathan Sidwell  <nathan@codesourcery.com>
649
650         Use vector API for vbase list.
651         * cp-tree.h: Include vec.h
652         (DEF_VEC_P (tree)): New type.
653         (struct lang_type_class): Change vbase's member type.
654         (binfo_for_vbase): Declare.
655         * class.c (determine_primary_base, base_derived_from,
656         update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
657         warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
658         build_vtbl_initializer): Adjust.
659         * decl.c (xref_basetypes): Adjust, accumulate upper bound of
660         vbases.
661         * init.c (sort_mem_initializers, expand_member_init,
662         push_base_cleanups): Adjust.
663         * method.c (do_build_copy_constructor): Adjust.
664         * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
665         (binfo_for_vbase): New.
666         * tree.c (copy_base_binfos): Adjust.
667
668 2004-06-28  Mark Mitchell  <mark@codesourcery.com>
669
670         * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
671
672 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
673
674         PR c++/14123
675         * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
676         paranthesis in case of pointers to array members.
677         * error.c (dump_type_prefix): Likewise.
678         (dump_type_suffix): Maybe issue a whitespace when printing
679         ARRAY_TYPE.
680
681 2004-06-27  Mark Mitchell  <mark@codesourcery.com>
682
683         PR c++/16193
684         * parser.c (cp_parser_set_decl_spec_type): Refine test for
685         redefinition of built-in types.
686
687 2004-06-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
688
689         * error.c (pp_template_argument_list_start): Remove.
690         (pp_template_argument_list_end): Likewise.
691         (pp_separate_with_comma): Use pp_cxx_separate_with.
692         (reinit_global_formatting_buffer): Remove.
693         (pp_non_consecutive_character): Likewise.
694         (dump_scope): Use pp_cxx_colon_colon.
695         (dump_template_parameter): Use pp_cxx_identifier,
696         pp_cxx_tree_identifier and pp_cxx_whitespace.
697         (dump_templat_bindings): Replace use of pp_string with sequence
698         of pp_cxx_whitespace and pp_equal.
699         (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
700         pp_cxx_colon_colon, pp_cxx_whitespace throughout.  Don't set
701         padding here.
702         (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
703         (dump_type_prefix): Don't set padding.  Use pp_cxx_whitespace,
704         pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
705         (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
706         pp_cxx_right_bracket, pp_cxx_identifier throughout,
707         (dump_decl): Likewise.
708         (dump_template_decl): Likewise.
709         (dump_function_decl): Likewise.  Set padding as appropriate.
710         (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
711         pp_cxx_right_paren.
712         (dump_exception_spec): Likewise.
713         (dump_function_name): Use pp_cxx_tree_identifier and
714         pp_cxx_identifier.
715         (dump_template_parms): Use pp_cxx_begin_template_argument_list and
716         pp_cxx_end_template_argument_list.
717         (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
718         pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
719         pp_cxx_whitespace throughout.
720         (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
721         pp_cxx_right_paren.
722         (dump_unary_op): Likewise.
723         (reinit_cxx_pp): New function.
724         (type_as_string); Use it.
725         (expr_as_string): Likewise.
726         (decl_as_string); Likewise.
727         (context_as_string): Likewise.
728         (lang_decl_name): Likewise.
729         (decl_to_string): Likewise.
730         (expr_to_string): Likewise.
731         (parm_to_string): Likewise.
732         (type_to_string): Likewise.
733         (args_to_string): Likewise.
734         (cv_to_string): Likewise.
735
736 2004-06-26  Mark Mitchell  <mark@codesourcery.com>
737
738         * cp-tree.h (cp_cv_quals): New type.
739         (cp_declarator): Use it instead of "tree" as appropriate.
740         (grok_method_quals): Adjust prototype.
741         (grokclassfn): Likewise.
742         (do_friend): Likewise.
743         * decl.c (grokfndecl): Use cp_cv_quals, not tree.
744         (grokdeclarator): Likewise.
745         * decl2.c (grok_method_quals): Likewise.
746         (grokclassfn): Likewise.
747         * friend.c (do_friend): Likewise.
748         * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
749         * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
750         (make_pointer_declarator): Likewise.
751         (make_reference_declarator): Likewise.
752         (make_ptrmem_declarator): Likewise.
753         (cp_parser_ptr_operator): Likewise.
754         (cp_parser_cv_qualifier_seq_opt): Likewise.
755         (cp_parser_cv_qualifier_opt): Remove.
756         (cp_parser_new_declarator_opt): Adjust call to
757         cp_parser_ptr_operator.
758         (cp_parser_conversion_declaration_opt): Likewise.
759         (cp_parser_declarator): Use cp_cv_quals, not tree.
760         (cp_parser_direct_declarator): Likewise.
761
762 2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
763
764         * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
765         Rename DECL_STMT to DECL_EXPR.
766         * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
767         * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
768         * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
769
770 2004-06-26  Jan Hubicka  <jh@suse.cz>
771
772         PR C++/14865
773         * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
774         reachability analysis.
775
776 2004-06-25  Mark Mitchell  <mark@codesourcery.com>
777
778         * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
779         2004-06-23 change.
780
781 2004-06-25  Paul Brook  <paul@codesourcery.com>
782
783         * decl2.c (get_guard): Call targetm.cxx.guard_type.
784         (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
785
786 2004-06-24  Mark Mitchell  <mark@codesourcery.com>
787
788         * decl.c (grokdeclarator): Restore error messages about __thread.
789         * parser.c (cp_parser_decl_specifier_seq): Likewise.
790
791 2004-06-24  Jason Merrill  <jason@redhat.com>
792
793         PR c++/16115
794         * decl.c (grokparms): Give the PARM_DECL reference type if the
795         parameter is passed by invisible reference.
796
797 2004-06-24  Andreas Schwab  <schwab@suse.de>
798
799         * cp-tree.h (enum cp_storage_class): Remove trailing comma.
800
801 2004-06-23  Mark Mitchell  <mark@codesourcery.com>
802
803         * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
804         (cp/decl.o): Likewise.
805         (cp/decl2.o): Likewise.
806         (cp/pt.o): Likewise.
807         (cp/semantics.o): Likewise.
808         * config-lang.in (gtfiles): Do not reference cp/lex.h.
809         * class.c: Do not include lex.h.
810         (add_implicitly_declared_members): Do not use
811         adding_implicit_members.
812         (check_bases_and_members): Do not talk about grok_x_components.
813         * cp/cp-tree.h (adding_implicit_members): Remove.
814         (cp_storage_class): New type.
815         (cp_decl_spec): Likewise.
816         (cp_decl_specifier_seq): Likewise.
817         (cp_parameter_declarator): Use it for the decl_specifiers field.
818         (check_tag_decl): Adjust prototype.
819         (shadow_tag): Likewise.
820         (groktypename): Likewise.
821         (start_decl): Likewise.
822         (start_function): Likewise.
823         (start_method): Likewise.
824         (grok_x_components): Remove.
825         (grokfield): Adjust prototype.
826         (grokbitfield): Likewise.
827         (finish_member_class_template): Remove.
828         * decl.c: Do not include lex.h.
829         (adding_implicit_members): Do not define.
830         (check_tag_decl): Do not use trees to represent decl-specifiers.
831         (shadow_tag): Likewise.
832         (groktypename): Likewise.
833         (start_decl): Likewise.
834         (grokvardecl): Likewise.
835         (grokdeclarator): Likewise.
836         (grokparms): Likewise.
837         (start_function): Likewise.
838         (start_method): Likewise.
839         * decl.h (grokdeclarator): Adjust prototype.
840         * decl2.c: Do not include lex.h.
841         (grok_x_components): Remove.
842         (grokfield): Do not use trees to represent decl-specifiers.
843         (grokbitfield): Likewise.
844         * lex.c: Do not include lex.h.
845         * lex.h: Remove.
846         * parser.c: Include target.h.
847         (clear_decl_specs): New function.
848         (cp_parser_translation_unit): Do not use trees to represent
849         decl-specifiers.
850         (cp_parser_postfix_expression): Likewise.
851         (cp_parser_new_type_id): Likewise.
852         (cp_parser_condition): Likewise.
853         (cp_parser_simple_declaration): Likewise.
854         (cp_parser_decl_specifier_seq): Likewise.
855         (cp_parser_function_specifier_opt): Likewise.
856         (cp_parser_conversion_type_id): Likewise.
857         (cp_parser_template_parameter): Likewise.
858         (cp_parser_explicit_instantiation): Likewise.
859         (cp_parser_type_specifier): Likewise.
860         (cp_parser_simple_type_specifier): Likewise.
861         (cp_parser_init_declarator): Likewise.
862         (cp_parser_type_id): Likewise.
863         (cp_parser_type_specifier_seq): Likewise.
864         (cp_parser_parameter_declaration): Likewise.
865         (cp_parser_member_declaration): Likewise.
866         (cp_parser_exception_declaration): Likewise.
867         (cp_parser_function_definition_from_specifiers_and_declarator):
868         Likewise.
869         (cp_parser_single_declaration): Likewise.
870         (cp_parser_save_member_function_body): Likewise.
871         (cp_parser_friend_p): Likewise.
872         (cp_parser_set_storage_class): New function.
873         (cp_parser_set_decl_spec_type): Likewise.
874         * pt.c: Do not include lex.h.
875         * semantics.c: Likewise.
876         (finish_member_class_template): Remove.
877
878 2004-06-23  Roger Sayle  <roger@eyesopen.com>
879
880         * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
881         longer take both "args" and "convert_args" as arguments.
882         (build_op_delete_call): Update call to build_cxx_call.
883         (build_over_call): Likewise, update call to build_cxx_call.
884         * cp-tree.h (build_cxx_call): Update funtion prototype.
885         * typeck.c (build_function_call): Don't call expand_tree_builtin.
886         * rtti.c (throw_bad_cast): Update call to build_cxx_call.
887         (throw_bad_typeid): Likewise.
888         (build_dynamic_cast_1): Likewise.
889
890 2004-06-22  Richard Henderson  <rth@redhat.com>
891
892         * class.c (build_vfn_ref): Take a pointer not object.  Build
893         an OBJ_TYPE_REF.
894         (cp_fold_obj_type_ref): New.
895         * call.c (build_over_call): Update build_vfn_ref call.
896         * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
897         * cp-tree.h (cp_fold_obj_type_ref): Declare.
898
899 2004-06-21  Jason Merrill  <jason@redhat.com>
900
901         PR c++/16112
902         * cp-gimplify.c (cp_gimplify_init_expr): Look through
903         CLEANUP_POINT_EXPR.
904
905 2004-06-21  Mark Mitchell  <mark@codesourcery.com>
906
907         * cp-tree.def (NEW_EXPR): Add a fourth slot.
908         * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
909         (TREE_PARMLIST): Likewise.
910         (CALL_DECLARATOR_PARMS): Likewise.
911         (CALL_DECLARATOR_QUALS): Likewise.
912         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
913         (cp_declarator_kind): New type.
914         (cp_parameter_declarator): Likewise.
915         (cp_declarator): Likewise.
916         (cp_error_declarator): Likewise.
917         (no_parameters): Likewise.
918         (groktypename): Change prototype.
919         (start_decl): Likewise.
920         (start_handler_parms): Likewise.
921         (get_scope_of_declarator): Likewise.
922         (start_function): Likewise.
923         (start_preparsed_function): New function.
924         (start_function): Change prototype.
925         (start_method): Likewise.
926         (grokfield): Likewise.
927         (grokbitfield): Likewise.
928         (build_new): Likewise.
929         (make_pointer_declarator): Remove.
930         (make_reference_declarator): Likewise.
931         (make_call_declarator): Likewise.
932         (set_quals_and_spec): Likewise.
933         (process_template_parm): Change prototype.
934         (begin_function_definition): Remove.
935         (finish_parmlist): Remove.
936         * decl.c (groktypename): Do not use trees to represent
937         declarators.
938         (start_decl): Likewise.
939         (start_handler_parms): Remove.
940         (get_scope_of_declarator): Reimplement.
941         (grokdeclarator): Do not use trees to represent declarators.
942         (grokparms): Likewise.
943         (start_function): Likewise.
944         (start_method): Likewise.
945         (build_void_list_mode): Do not use TREE_PARMLIST.
946         * decl.h (grokdeclarator): Change prototype.
947         * decl2.c (grok_method_quals): Robustify.
948         (grok_x_components): Do not use trees to represent declarators.
949         (grokfield): Likewise.
950         (grokbitfield): Likewise.
951         (start_objects): Build FUNCTION_DECLs, not declarators.
952         (start_static_storage_duration_function): Likewise.
953         * init.c (build_new): Simplify.
954         * lex.c (make_pointer_declarator): Remove.
955         (make_reference_declarator): Likewise.
956         (make_call_declarator): Likewise.
957         (set_quals_and_spec): Likewise.
958         * method.c (use_thunk): Use start_preparsed_function.
959         (synthesize_method): Likewise.
960         (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
961         * optimize.c (maybe_clone_body): Use start_preparsed_function.
962         * parser.c (cp_error_declarator): New variable.
963         (declarator_obstack): Likewise.
964         (alloc_declarator): New function.
965         (make_declarator): Likewise.
966         (make_id_declarator): Likewise.
967         (make_pointer_declarator): Likewise.
968         (make_reference_declarator): Likewise.
969         (make_ptrmem_declarator): Likewise.
970         (make_call_declarator): Likewise.
971         (make_array_declarator): Likewise.
972         (no_parameters): New variable.
973         (make_parameter_declarator): Likewise.
974         (cp_parser_check_for_definition_in_return_type): Do not use trees
975         to represent declarators.
976         (cp_parser_translation_unit): Likewise.
977         (cp_parser_new_expression): Likewise.
978         (cp_parser_new_type_id): Likewise.
979         (cp_parser_new_declarator_opt): Likewise.
980         (cp_parser_direct_new_declarator): Likewise.
981         (cp_parser_condition): Likewise.
982         (cp_parser_declaration_statement): Likewise.
983         (cp_parser_declaration): Likewise.
984         (cp_parser_conversion_type_id): Likewise.
985         (cp_parser_conversion_declarator_opt): Likewise.
986         (cp_parser_template_parameter_list): Likewise.
987         (cp_parser_template_parameter): Likewise.
988         (cp_parser_explicit_instantiation): Likewise.
989         (cp_parser_init_declarator): Likewise.
990         (cp_parser_declarator): Likewise.
991         (cp_parser_direct_declarator): Likewise.
992         (cp_parser_type_id): Likewise.
993         (cp_parser_parameter_declaration_clause): Likewise.
994         (cp_parser_parameter_declaration_list): Likewise.
995         (cp_parser_parameter_declaration): Likewise.
996         (cp_parser_member_declaration): Likewise.
997         (cp_parser_exception_declaration): Likewise.
998         (cp_parser_check_declarator_template_parameters): Likewise.
999         (cp_parser_function_definition_from_specifiers_and_declarator):
1000         Likewise.
1001         (cp_parser_save_member_function_body): Likewise.
1002         * pt.c (process_template_parm): Add is_non_type parameter.
1003         (convert_template_argument): Adjust call to groktypename.
1004         (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1005         (tsubst): Do not expect declarators.
1006         (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1007         argument.
1008         (instantiate_decl): Use start_preparsed_function.
1009         * semantics.c (begin_function_definition): Remove.
1010         (finish_parmlist): Remove.
1011         * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1012         declarators.
1013
1014 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1015
1016         * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1017         (build_new_method_call): Likewise.
1018         * decl.c (local_variable_p_walkfn): Don't walk into types.
1019         * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1020         (build_anon_union_vars): Add new operand for COMPONENT_REF.
1021         * init.c (buld_new): Add new operand for ARRAY_REF.
1022         * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1023         (do_build_assign_ref): Likewise.
1024         * parser.c (cp_parser_direct_new_declarator): Add new operands
1025         for ARRAY_REF.
1026         (cp_parser_direct_declarator): Likewise.
1027         * pt.c (tsubst): Likewise.
1028         (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1029         for COMPONENT_REF.
1030         * semantics.c (finish_non_static_data_member): Add new operand
1031         for COMPONENT_REF.
1032         * typeck.c (build_class_member_access_expr): Likewise.
1033         (build_class_member_access_expr, finish_class_member_access_expr):
1034         Likewise.
1035         (build_ptrmemfunc_access_expr): Likewise.
1036         (build_array_ref): Add new operands for ARRAY_REF.
1037         * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1038         * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1039
1040 2004-06-21  Richard Henderson  <rth@redhat.com>
1041
1042         * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1043         * parser.c (cp_parser_jump_statement): Update commentary.
1044         * pt.c (tsubst_expr): Use RETURN_EXPR.
1045         * semantics.c (finish_return_stmt): Likewise.
1046         (finalize_nrv_r): Likewise.
1047         * typeck.c, typeck2.c: Update file start commentary.
1048
1049 2004-06-21  Richard Henderson  <rth@redhat.com>
1050
1051         * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1052
1053 2004-06-20  Richard Henderson  <rth@redhat.com>
1054
1055         * cp-tree.h (add_decl_stmt): Declare.
1056         * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1057         * semantics.c (maybe_cleanup_point_expr): New.
1058         (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1059         finish_for_expr, finish_switch_cond): Use it.
1060         (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
1061
1062 2004-06-20  Richard Henderson  <rth@redhat.com>
1063
1064         * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1065         * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1066         (cp_gimplify_expr): Call it.
1067         (gimplify_cleanup_stmt): Move from c-gimplify.c.
1068         (cp_genericize): New.
1069         * decl.c (finish_function): Call it.
1070         * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1071         (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1072         (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1073         (cp_genericize): Declare.
1074         * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1075         * dump.c (cp_dump_tree): Likewise.
1076         * semantics.c (push_cleanup): Move from c-semantics.c.
1077
1078 2004-06-20  Zack Weinberg  <zack@codesourcery.com>
1079
1080         * cp-lang.c (has_c_linkage): Implement.
1081
1082         * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1083         * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1084         (builtin_function_1): Don't call make_decl_rtl.
1085         (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1086         (grokvardecl): Don't call mangle_decl.
1087         * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1088         DECL_ASSEMBLER_NAME.
1089         * method.c (set_mangled_name_for_decl): Delete.
1090         * name-lookup.c (pushdecl): When a local extern shadows a
1091         file-scope declaration of the same object, give both DECLs the
1092         same DECL_UID.
1093         * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1094         on DECL_ASSEMBLER_NAME.
1095
1096 2004-06-19  Richard Henderson  <rth@redhat.com>
1097
1098         * cp-gimplify.c: Remove unnecessary prototypes.
1099         (cp_gimplify_stmt): Merge into ...
1100         (cp_gimplify_expr): ... here.  Move to end of file.  Handle
1101         stmts_are_full_exprs_p frobbing.
1102         * cp-tree.h (cp_gimplify_stmt): Remove.
1103         * pt.c (tsubst_expr): Merge prep_stmt and unify.
1104         * tree.c (init_tree): Don't set lang_gimplify_stmt.
1105
1106 2004-06-18  Richard Henderson  <rth@redhat.com>
1107
1108         PR c++/16034
1109         * semantics.c (begin_cond): New.
1110         (finish_cond): Rewrite to handle template DECL_STMTs specially.
1111         Assume that non-template decls go land before the conditional.
1112         (simplify_loop_decl_cond): Likewise.
1113         (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1114         finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1115         begin_switch_stmt, finish_switch_cond): Update to match.
1116
1117 2004-06-17  Jason Merrill  <jason@redhat.com>
1118
1119         PR c++/16015
1120         * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1121         (finish_stmt_expr_expr): Update type after conversions.
1122         (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1123         Handle void initializer.
1124         * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1125
1126 2004-06-17  Geoffrey Keating  <geoffk@apple.com>
1127
1128         * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1129         * cp-tree.h (defer_fn): Delete.
1130         * decl2.c (defer_fn): Delete.
1131         (finish_file): Simplify deferred_fns loops; check that
1132         only used inline functions get into deferred_fns.
1133         (mark_used): Inline previous contents of defer_fn.
1134
1135 2004-06-16  Richard Henderson  <rth@redhat.com>
1136
1137         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1138         (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1139         * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1140         of CTOR_INITIALIZER ...
1141         (pp_cxx_statement): ... here.
1142         * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1143         (finish_function): Use alloc_stmt_list to zap entire function.
1144         * parser.c (cp_parser_compound_statement): Update commentary.
1145         * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1146         * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1147         (finish_stmt_expr): Don't look through COMPOUND_STMT.
1148
1149 2004-06-16  Geoffrey Keating  <geoffk@apple.com>
1150
1151         * pt.c (mark_decl_instantiated): Don't call defer_fn.
1152
1153 2004-06-16  Richard Henderson  <rth@redhat.com>
1154
1155         * parser.c (cp_parser_labeled_statement): Update commentary.
1156         * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1157         * tree.c (mark_local_for_remap_r): Likewise.
1158
1159 2004-06-16  Richard Henderson  <rth@redhat.com>
1160
1161         * parser.c (cp_parser_asm_definition): Update commentary.
1162         * pt.c (tsubst_expr): Use ASM_EXPR.
1163         * semantics.c (finish_asm_stmt): Likewise.
1164
1165 2004-06-16  Richard Henderson  <rth@redhat.com>
1166
1167         * decl.c (finish_destructor_body): Use LABEL_EXPR.
1168         * parser.c (cp_parser_statement): Update commentary.
1169         * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1170         * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1171         * tree.c (mark_local_for_remap_r): Likewise.
1172
1173 2004-06-16  Richard Henderson  <rth@redhat.com>
1174
1175         PR c++/16012
1176         * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1177         statement in FOR_INIT_STMT for templates.
1178
1179 2004-06-15  Richard Henderson  <rth@redhat.com>
1180
1181         * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1182         * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1183         (genericize_try_block): Use gimplify_stmt.
1184         (genericize_catch_block, genericize_eh_spec_block): Likewise.
1185         (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1186         (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1187         * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1188         (cp_tree_chain_matters_p): Remove.
1189         * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1190         (COMPOUND_STMT_BODY_BLOCK): New.
1191         (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1192         (EXPR_STMT_STMT_EXPR_RESULT): New.
1193         (building_stmt_tree): Check cur_stmt_list.
1194         (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1195         (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1196         * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1197         (cp_finish_decl): Use push_cleanup.
1198         (start_function, finish_function): Use statement lists.
1199         (finish_stmt): Do nothing.
1200         * except.c (begin_eh_spec_block): Use statement lists.
1201         (check_handlers_1, check_handlers): Likewise.
1202         * init.c (construct_virtual_base): Don't add extra compound stmts.
1203         (build_vec_init): Likewise.
1204         * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1205         * name-lookup.h (struct cp_binding_level): Add statement_list.
1206         * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1207         (cp_parser_labeled_statement, cp_parser_expression_statement,
1208         cp_parser_statement_seq_opt): Likewise.
1209         (cp_parser_compound_statement): Likewise.  Take bool for try block.
1210         (cp_parser_selection_statement): Tidy if processing.
1211         (cp_parser_already_scoped_statement): Rewrite to do what it says.
1212         * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1213         (tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
1214         Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1215         * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1216         (finish_cond): New, rewritten from FINISH_COND.
1217         (simplify_loop_decl_cond): New.
1218         (finish_expr_stmt): Avoid nested EXPR_STMTs.
1219         (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1220         begin_else_clause, finish_else_clause, finish_if_stmt,
1221         begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1222         begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1223         finish_for_cond, finish_for_stmt, begin_switch_stmt,
1224         finish_switch_cond, finish_switch_stmt, begin_try_block,
1225         finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1226         finish_handler_sequence, finish_function_handler_sequence,
1227         begin_handler, finish_handler_parms, finish_handler,
1228         begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1229         using statement lists.
1230         (begin_compound_stmt): Replace has_no_scope argument with flags.
1231         Update all callers.  Use statement lists.
1232         (finish_compound_stmt): Likewise.
1233         (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1234         (current_scope_stmt_stack): Remove.
1235         (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1236         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1237         Rewrite with statement lists.
1238
1239 2004-06-15  Alexandre Oliva  <aoliva@redhat.com>
1240
1241         * parser.c: Change all assignments of c_lex_string_translate
1242         to true and false to 1 and 0.
1243         (cp_lexer_read_token): Convert type of the translated string.
1244         (cp_parser_skip_to_closing_parentheses): Preserve original
1245         value of c_lex_string_translate, and set it to -1 while
1246         running.
1247         (cp_parser_cache_group): Likewise.
1248         (cp_parser_cache_group_1): Renamed.
1249         (cp_parser_asm_operand_list): Remove redundant setting of
1250         c_lex_string_translate.
1251         (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1252         Handle chained strings.
1253
1254 2004-06-12  Andrew Pinski  <apinski@apple.com>
1255
1256         PR c++/14639
1257         Revert:
1258         2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
1259
1260                 * cp-tree.h: Fix typo.
1261
1262                 * cp-tree.h: Include cgraph.h
1263                 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1264                 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1265
1266 2004-06-12  Jason Merrill  <jason@redhat.com>
1267
1268         PR tree-optimization/14107
1269         * decl.c (finish_function): Warn about no return in all functions.
1270
1271 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1272
1273         * cp-tree.h (struct language_function): Remove cannot_inline.
1274         * decl.c (save_function_data): cannot_inline is no more.
1275         (cxx_push_function_context): Likewise.
1276         * decl2.c (start_objects, start_static_storage_duration_function):
1277         Reset DECL_INLINE, set DECL_UNINLINABLE.
1278
1279 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1280
1281         PR c++/15967
1282         * search.c (lookup_field): Propagate the ambiguity list.
1283         (lookup_fnfields): Likewise.
1284
1285 2004-06-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1286
1287         PR c++/15947
1288         * parser.c (cp_parser_template_name): Ctors/dtors never need a
1289         template keyword to disambiguate.
1290
1291 2004-06-14  Mark Mitchell  <mark@codesourcery.com>
1292
1293         PR c++/15096
1294         * decl.c (grokdeclarator): Ignore pointer-to-members when
1295         computing template depth.
1296
1297         PR c++/14930
1298         * name-lookup.c (pushtag): Do not try to put class declarations in
1299         explicit specialization scopes.
1300
1301 2004-06-11  Andrew Pinski  <pinskia@physics.uc.edu>
1302
1303         * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1304
1305 2004-06-11  Mark Mitchell  <mark@codesourcery.com>
1306
1307         PR c++/15862
1308         * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1309         bindings for undeclared built-ins.
1310
1311 2004-06-11  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1312
1313         * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1314         appear at the correct location.
1315
1316 2004-06-10  Jason Merrill  <jason@redhat.com>
1317
1318         PR c++/15875
1319         Revert:
1320         2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1321         * init.c (build_offset_ref): Build SCOPE_REF with non-null
1322         TREE_TYPE for non-dependent names.
1323         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1324         unknown_type_node as its TREE_TYPE.
1325         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1326         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1327         (dump_expr) <SCOPE_REF case>: Likewise.
1328
1329 2004-06-10  Mark Mitchell  <mark@codesourcery.com>
1330
1331         PR c++/15227
1332         * parser.c (cp_parser_direct_declarator): Robustify.
1333
1334         PR c++/15877
1335         * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1336         constants in non-dependent contexts.
1337
1338         PR c++/14211
1339         PR c++/15076
1340         * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1341         necessary.
1342
1343 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
1344
1345         PR c++/14791
1346         * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1347         specially.
1348
1349 2004-06-09  Mark Mitchell  <mark@codesourcery.com>
1350
1351         Revert:
1352         PR c++/15815
1353         2004-06-07  Mark Mitchell  <mark@codesourcery.com>
1354         * lex.c (handle_pragma_interface): Deprecate.
1355         (handle_pragma_implementation): Likewise.
1356
1357 2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>
1358
1359         * g++spec.c (lang_specific_driver): Remove check for -lm
1360         and -lmath when check it see if it was the math library.
1361
1362 2004-06-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1363
1364         PR c++/7841
1365         * parser.c (cp_parser_direct_declarator): Reject constructor named
1366         as qualified template-id.
1367
1368 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
1369
1370         PR c++/15815
1371         * lex.c (handle_pragma_interface): Deprecate.
1372         (handle_pragma_implementation): Likewise.
1373
1374 2004-06-07  Mark Mitchell  <mark@codesourcery.com>
1375
1376         PR c++/15766
1377         * parser.c (cp_parser_iteration_statement): Fix typo in error
1378         message.
1379
1380         PR c++/14777
1381         * pt.c (tsubst_default_argument): Do not defer access checks
1382         while substituting into the default argument.
1383
1384         PR c++/15554
1385         * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1386         constant in a non-dependent context.
1387
1388         PR c++/15057
1389         * except.c (build_throw): Ensure that temp_expr has been
1390         initialized.
1391
1392 2004-06-06  Roger Sayle  <roger@eyesopen.com>
1393
1394         * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1395
1396 2004-06-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1397
1398         PR c++/15503
1399         * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1400         'typename', and accept 'template'.
1401
1402 2004-06-03  Andrew Pinski  <pinskia@physics.uc.edu>
1403             Jan Hubicka  <jh@suse.cz>
1404
1405         PR c++/14639
1406         * method.c (use_think): Do not mark thunk as referenced.
1407
1408 2004-06-03  Matt Austern  <austern@apple.com>
1409
1410         PR c++/15428
1411         * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1412         is nonzero, and if we see a noninline definition of a key method,
1413         make the vtables nonweak.
1414
1415 2004-06-02  Matt Austern  <austern@apple.com>
1416
1417         * cp-tree.h (instantiate_decl): new boolean parameter,
1418         undefined_ok. Current behavior is equivalent to its being 0.
1419         * decl2.c (mark_used): Add new argument when calling instantiate_decl
1420         * pt.c (mark_decl_instantiated): Unconditionally make
1421         instantiations explicit unconditionally
1422         (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1423         since mark_decl_instantiated now does it.
1424         (instantiate_class_member): New.  Instantiate a member of an
1425         explicitly instantiated class template.
1426         (do_type_instantiation): Explicitly instantiate members of an
1427         explicitly instantiated class template.
1428         (instantiate_decl): if undefined_ok is nonzero, and if we're
1429         trying to explicitly instantiated a template with no definition,
1430         change it to an implicit instantiation.
1431         (instantiate_pending_templates): Add new argument to instantiate_decl.
1432         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1433
1434 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
1435
1436         * cp-tree.h: Fix typo.
1437
1438         * cp-tree.h: Include cgraph.h
1439         (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1440         TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1441
1442 2004-06-01  Jason Merrill  <jason@redhat.com>
1443
1444         PR c++/15142
1445         * call.c (call_builtin_trap): Remove type parm.
1446         (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1447         (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1448
1449 2004-06-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1450
1451         PR c++/13092
1452         * init.c (build_offset_ref): Build SCOPE_REF with non-null
1453         TREE_TYPE for non-dependent names.
1454         * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1455         unknown_type_node as its TREE_TYPE.
1456         * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1457         * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1458         (dump_expr) <SCOPE_REF case>: Likewise.
1459
1460 2004-06-01  Richard Henderson  <rth@redhat.com>
1461             Andrew Pinski  <pinskia@physics.uc.edu>
1462
1463         * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1464         * parser.c (struct cp_parser): Remove in_offsetof.
1465         (cp_parser_new): Don't set it.
1466         (cp_parser_unary_expression): Don't check it.
1467         (cp_parser_postfix_open_square_expression): Split out from ...
1468         (cp_parser_postfix_expression): ... here.
1469         (cp_parser_postfix_dot_deref_expression): Likewise.
1470         (cp_parser_builtin_offsetof): New.
1471         (cp_parser_primary_expression): Use it.
1472
1473 2004-06-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1474
1475         PR c++/14932
1476         * parser.c (cp_parser_postfix_expression): Allow subscript
1477         operator in offsetof.
1478
1479 2004-05-31  Mark Mitchell  <mark@codesourcery.com>
1480
1481         PR c++/15701
1482         * friend.c (add_friend): Do not try to perform access checks for
1483         functions from dependent classes.
1484
1485 2004-05-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1486
1487         * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1488         (pp_cxx_begin_template_argument_list): Turn into a function.
1489         (pp_cxx_end_template_argument_list): Likewise.
1490         (pp_cxx_separate_with): Define.
1491         (pp_cxx_unqualified_id): Tidy.
1492         (pp_cxx_primary_expression): Likewise.
1493         (pp_cxx_postfix_expression): Likewise.
1494         (pp_cxx_expression): Likewise.
1495         (pp_cxx_simple_type_specifier): Likewise.
1496         (pp_cxx_type_specifier_seq): Likewise.
1497         (pp_cxx_parameter_declaration_clause): Likewise.
1498         (pp_cxx_exception_specification): Likewise.
1499         (pp_cxx_direct_declarator): Likewise.
1500         (pp_cxx_type_id): Likewise.
1501         * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1502         cxx-pretty-print.c.
1503         (pp_cxx_left_paren): Likewise.
1504         (pp_cxx_right_paren): Likewise.
1505         (pp_cxx_left_brace): Likewise.
1506         (pp_cxx_right_brace): Likewise.
1507         (pp_cxx_left_bracket): Likewise.
1508         (pp_cxx_right_bracket): Likewise.
1509         (pp_cxx_dot): Likewise.
1510         (pp_cxx_identifier): Likewise.
1511         (pp_cxx_tree_identifier): Likewise.
1512         (pp_cxx_ampersand): New macro.
1513         (pp_cxx_star): Likewise.
1514         (pp_cxx_arrow): Likewise.
1515         (pp_cxx_semicolon): Likewise.
1516         (pp_cxx_complement): Likewise.
1517         (pp_cxx_begin_template_argument_list): Declaree.
1518         (pp_cxx_end_template_argument_list): Likewise.
1519         (pp_cxx_colon_colon): likewise.
1520
1521 2004-05-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
1522
1523         * parser.c (cp_parser_simple_type_specifier): Explicitly test
1524         against NULL_TREE.
1525
1526 2004-05-31  Kazu Hirata  <kazu@cs.umass.edu>
1527
1528         * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1529         typeck.c: Fix comment formatting.
1530
1531 2004-05-30  Andrew Pinski  <pinskia@physics.uc.edu>
1532
1533         * cp-lang.c (cp_expand_decl): Remove.
1534         (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1535
1536 2004-05-30  Andreas Jaeger  <aj@suse.de>
1537
1538         * lang-specs.h: Add missing initializers for .ii.
1539
1540 2004-05-28  Aldy Hernandez  <aldyh@redhat.com>
1541
1542         * decl.c (cp_make_fname_decl): Free return value from
1543         fname_as_string.
1544
1545 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
1546
1547         PR c++/15083
1548         * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1549         even in a templat.e
1550         * init.c (build_new): Likewise.
1551
1552         PR c++/15640
1553         * name-lookup.c (arg_assoc): Robustify.
1554
1555         PR c++/15471
1556         * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1557         when determining the scope to use for a pointer to member.
1558         (lookup_anon_field): Give it external linkage.
1559         * cp-tree.h (lookup_anon_field): Declare it.
1560         * expr.c (cplus_expand_constant): Use it.
1561
1562 2004-05-28  Mark Mitchell  <mark@codesourcery.com>
1563
1564         PR c++/14668
1565         * parser.c (cp_parser_simple_type_specifier): Call
1566         maybe_note_name_used_in_class.
1567
1568 2004-05-28  Tom Marshall  <tmarshall@real.com>
1569
1570         PR c++/15214
1571         * class.c (finish_struct_1): Warn only if the dtor is non-private or
1572         the class has friends.
1573
1574 2004-05-27  Adam Nemet  <anemet@lnxw.com>
1575
1576         PR c++/12883
1577         * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1578         TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1579
1580 2004-05-24  Geoffrey Keating  <geoffk@apple.com>
1581
1582         * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1583         if it might be needed.
1584         * pt.c (mark_decl_instantiated): Only call defer_fn if
1585         the function actually needs processing in finish_file.
1586         * decl2.c (finish_file): Add check that elements in
1587         deferred_fns_used are really needed there.  Remove unnecessary
1588         test of DECL_SAVED_TREE.
1589
1590 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
1591
1592         * Make-lang.in: No need to specify $(LIBCPP).
1593
1594 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1595
1596         PR c++/15044
1597         * parser.c (cp_parser_class_head): Robustify.
1598
1599         PR c++/15317
1600         * parser.c (cp_parser_decl_specifier_seq): Correct error in
1601         comment.
1602         (cp_parser_constructor_declarator_p): Treat attributes
1603         as decl-specifiers.
1604
1605         PR c++/15329
1606         * typeck.c (build_unary_op): Do not attempt to resolve casts to
1607         base classes in templates.
1608
1609 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1610
1611         PR c++/15165
1612         * pt.c (instantiate_template): Robustify.
1613
1614 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1615
1616         PR c++/15025
1617         * decl.c (xref_tag): Issue errors about redeclaring template
1618         classes as non-template classes.
1619
1620 2004-05-23  Mark Mitchell  <mark@codesourcery.com>
1621
1622         PR c++/14821
1623         * name-lookup.c (supplement_binding): Allow redefinitions of
1624         namespace aliases.
1625
1626         PR c++/14883
1627         * parser.c (cp_parser_template_argument): Robustify.
1628
1629 2004-05-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1630
1631         * class.c (alter_access): Use %E format specifier to print an
1632         identifier node.  Avoid looking at the IDENTIFIER_POINTER.
1633         (push_lang_context): Likewise.
1634         * decl.c (lookup_label): Likewise.
1635         (grokdeclarator): Likewise.
1636         * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
1637         * pt.c (do_type_instantiation): Likewise.
1638         * tree.c (handle_java_interface_attribute): Likewise.
1639         (handle_com_interface_attribute): Likewise.
1640         (handle_init_priority_attribute): Likewise.
1641
1642 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
1643
1644         PR c++/15285
1645         PR c++/15299
1646         * pt.c (build_non_dependent_expr): Expand the set of tree nodes
1647         recognized as overloaded functions.
1648
1649 2004-05-22  Mark Mitchell  <mark@codesourcery.com>
1650
1651         PR c++/15507
1652         * class.c (layout_nonempty_base_or_field): Do not try to avoid
1653         layout conflicts for unions.
1654
1655         PR c++/15542
1656         * typeck.c (build_x_unary_op): Instantiate template class
1657         specializations before looking for "operator &".
1658
1659         PR c++/15427
1660         * typeck.c (complete_type): Layout non-dependent array types, even
1661         in templates.
1662
1663         PR c++/15287
1664         * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
1665         template.
1666
1667 2004-05-22  Roger Sayle  <roger@eyesopen.com>
1668
1669         * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
1670         returning when TREE_TYPE is error_mark_node.
1671         * typeck.c (require_complete_type): Return error_mark_node if
1672         value's type is an error_mark_node.
1673
1674 2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
1675
1676         * optimize.c (calls_setjmp_r): Remove.
1677         (calls_setjmp_p): Remove.
1678         * cp-tree.c (calls_setjmp_p): Remove.
1679         * decl.c (finish_function): Do not call calls_setjmp_p.
1680
1681 2004-05-18  Zack Weinberg  <zack@codesourcery.com>
1682
1683         * decl.c (cp_finish_decl): Use mark_decl_referenced.
1684         * decl2.c (maybe_make_one_only): Likewise.
1685         * method.c (use_thunk): Likewise.
1686
1687 2004-05-18  Jason Merrill  <jason@redhat.com>
1688
1689         * class.c (build_base_path): Tidy a bit.
1690
1691 2004-05-14  Geoffrey Keating  <geoffk@apple.com>
1692
1693         * name-lookup.c (struct scope_binding): New.
1694         (EMPTY_SCOPE_BINDING): New.
1695         (lookup_using_namespace): Take a scope_binding instead of a
1696         cxx_binding.
1697         (qualified_lookup_using_namespace): Likewise.
1698         (cxx_binding_clear): Delete.
1699         (do_nonmember_using_decl): Use a scope_binding instead of a
1700         cxx_binding.
1701         (lookup_tag): Don't call select_decl.
1702         (ambiguous_decl): Don't return anything (and change callers to match).
1703         Take a scope_binding as the second parameter.
1704         (lookup_namespace_name): Use a scope_binding instead of a
1705         cxx_binding.
1706         (unqualified_namespace_lookup): Likewise.
1707         (lookup_qualified_name): Likewise.
1708         (select_decl): Take a scope_binding instead of a cxx_binding.
1709         Use macros rather than hand-coding tests for type-ness.
1710
1711 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1712
1713         * cp-gimplify.c: Rename from cp-simplify.c.
1714         * Make-lang.in, optimize.c: Update.
1715
1716 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
1717
1718         Merge from tree-ssa-20020619-branch.  See
1719         ChangeLog.tree-ssa for details.
1720
1721         * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
1722         cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
1723         expr.c, init.c, name-lookup.h, optimize.c, parser.c,
1724         pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
1725         Merged.
1726         * cp-mudflap.c: New file.
1727         * cp-simplify.c:: New file.
1728
1729 2004-05-03  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1730
1731         PR c++/14389
1732         * decl2.c (check_classfn): For member templates, compare also the
1733         template parameters to match the declaration.
1734         * cp-tree.h: Adjust declaration of check_classfn.
1735         * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
1736         * friend.c (do_friend): Likewise.
1737         * pt.c (tsubst_friend_function): Likewise.
1738
1739 2004-05-01  Zack Weinberg  <zack@codesourcery.com>
1740
1741         * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
1742         Instead, dig into the representation type to find the array bound.
1743
1744 2004-04-30  Jason Merrill  <jason@redhat.com>
1745
1746         Refer to base members using COMPONENT_REFs where possible.
1747         * class.c (build_simple_base_path): New fn.
1748         (build_base_path): Use it for non-virtual base references.
1749         (layout_class_type): Change base fields to their real type
1750         after layout is done.
1751         * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
1752         * cp-lang.c (cxx_get_alias_set): Use it.
1753
1754 2004-04-30  Kazu Hirata  <kazu@cs.umass.edu>
1755
1756         * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
1757         comment typos.
1758
1759 2004-04-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
1760
1761         PR c++/15064
1762         * parser.c (cp_parser_postfix_expression): typeid operator cannot be
1763         used in integral constant expressions.
1764
1765 2004-04-22  Mark Mitchell  <mark@codesourcery.com>
1766
1767         * init.c (build_aggr_init): Fix accidental use of C99 construct in
1768         previous change.
1769
1770         * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
1771         braced initializer.
1772         * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
1773         * decl.c (reshape_init): Use it.
1774         * init.c (perform_member_init): Remove redundant condition.
1775         (build_aggr_init): Adjust to handle brace-enclosed initializers
1776         correctly.
1777         (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1778
1779         * parser.c (cp_parser_initializer_clause): Do not set
1780         TREE_HAS_CONSTRUCTOR on the initializer.
1781         * rtti.c (tinfo_base_init): Likewise.
1782         (generic_initializer): Likewise.
1783         (ptr_initializer): Likewise.
1784         (ptm_initializer): Likewise.
1785         (class_initializer): Likewise.
1786         (get_pseudo_ti_init): Likewise.
1787         * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1788
1789 2004-04-22  Alan Modra  <amodra@bigpond.net.au>
1790
1791         * name-lookup.c (anonymous_namespace_name): Make static.
1792
1793 2004-04-19  Roger Sayle  <roger@eyesopen.com>
1794
1795         PR middle-end/14531
1796         * class.c (build_base_path): Call fold whilst building the NULL
1797         pointer check expression trees.
1798
1799 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
1800
1801         * init.c (build_new_1): Don't use type size argument for Java
1802         _Jv_AllocObject call.
1803
1804 2004-04-09  Danny Smith  <dannysmith@users.sourceforge.net>
1805
1806         * method.c (make_alias_for_thunk): Remove preprocessor guard on
1807         declaration and definition.
1808
1809 2004-04-08  Danny Smith  <dannysmith@users.sourceforge.net>
1810
1811         PR c++/14808
1812         * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1813         than ASM_OUTPUT_DEF.
1814
1815 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
1816
1817         * decl2.c (mark_used): Don't segfault if cfun != NULL but
1818         current_function_decl == NULL.
1819
1820 2004-04-05  Nathan Sidwell  <nathan@codesourcery.com>
1821
1822         PR c++/3518
1823         * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1824         level.
1825
1826 2004-04-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1827
1828         * init.c (decl_constant_value): Don't look at DECL_INITIAL
1829         of PARM_DECL.
1830         * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1831         or TREE_SIDE_EFFECTS of a type.
1832
1833 2004-04-02  Nathan Sidwell  <nathan@codesourcery.com>
1834
1835         PR c++/14007
1836         * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1837         cv-qualifier unification.
1838         * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1839
1840 2004-04-02  Jan Hubicka  <jh@suse.cz>
1841
1842         * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1843         * cp-tree.h (cp_update_decl_after_saving): Declare.
1844         * tree.c (cp_update_decl_after_saving): Define.
1845
1846 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
1847
1848         PR c++/14803
1849         * typeck.c (get_delta_difference): Call fold before returning the
1850         value.
1851
1852 2004-04-01  Richard Henderson  <rth@redhat.com>
1853
1854         PR c++/14804
1855         * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1856         * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1857
1858 2004-04-01  Mark Mitchell  <mark@codesourcery.com>
1859
1860         PR c++/14810
1861         * name-lookup.c (maybe_push_cleanup_level): Robustify.
1862
1863 2004-04-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1864
1865         * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1866
1867 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1868
1869         * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1870         * class.c (check_bitfield_decl): Likewise.
1871         * cvt.c (type_promotes_to): Likewise.
1872         * decl.c (finish_enum): Likewise.
1873         * mangle.c (write_builtin_type): Likewise.
1874         * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1875         * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1876         (build_binary_op): Likewise.
1877
1878 2004-03-31  Jan Hubicka  <jh@suse.cz>
1879
1880         * tree.h (optimize_function): Kill prototype.
1881         * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1882         * semantics.c (expand_body): Kill.
1883
1884 2004-03-30  Mark Mitchell  <mark@codesourcery.com>
1885
1886         PR c++/14724
1887         * decl.c (start_decl_1): Do not decide whether or not to create a
1888         new cleanup level until after the type has been completed.
1889
1890         PR c++/14763
1891         * pt.c (tsubst_default_argument): Clear current_function_decl.
1892
1893 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
1894
1895         * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1896
1897 2004-03-29  Zack Weinberg  <zack@codesourcery.com>
1898
1899         * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1900         is null, just print the literal name and return.
1901
1902 2004-03-25  Kazu Hirata  <kazu@cs.umass.edu>
1903
1904         * cxx-pretty-print.c: Fix comment typos.
1905
1906 2004-03-24  Kazu Hirata  <kazu@cs.umass.edu>
1907
1908         * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1909         Update copyright.
1910
1911 2004-03-23  Ziemowit Laski  <zlaski@apple.com>
1912
1913         * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1914         * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1915         target hook.
1916
1917 2004-03-23  Zack Weinberg  <zack@codesourcery.com>
1918
1919         PR 12267, 12391, 12560, 13129, 14114, 14133
1920         * cp-lang.c (c_reset_state): Delete.
1921         (push_file_scope, pop_file_scope): New stubs.
1922         * parser.c (c_parse_file): Call sorry() here if called more than once.
1923
1924 2004-03-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1925
1926         * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1927         for INTEGER_CST.
1928
1929 2004-03-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1930
1931         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1932
1933 2004-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1934
1935         * error.c (enum pad): Remove.
1936         (dump_qualifiers): Likewise.
1937         (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1938         (dump_aggr_type): Likewise.
1939         (dump_type_suffix): Likewise.
1940         (dump_simple_decl): Likewise.
1941         (dump_function_decl): Likewise.
1942         (cv_to_string): Likewise.
1943         (dump_type_prefix): Likewise.  Adjust return void.
1944         * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1945         cxx_pretty_print.h.
1946         (pp_cxx_template_keyword_if_needed): Document.
1947         (pp_cxx_qualified_id): Document case FUNCTION_DECL.  Tidy.
1948         (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1949         MUST_NOT_THROW_EXPR.
1950
1951 2004-03-21  Mark Mitchell  <mark@codesourcery.com>
1952
1953         PR c++/14616
1954         * decl.c (cp_finish_decl): Compute the size of arrays declared in
1955         templates, if their type is non-dependent.
1956
1957 2004-03-19  Mark Mitchell  <mark@codesourcery.com>
1958
1959         * call.c (build_op_delete_call): Do not forget the placement
1960         arguments when iterating through mutiple delete operators.
1961
1962         * cp-tree.h (svaed_scope): Remove last_parms.
1963         (NEW_DELETE_OPNAME_P): New macro.
1964         (last_function_parms): Remove.
1965         (do_friend): Adjust prototype.
1966         * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1967         using last_function_parms.
1968         (grokfndecl): Take the PARM_DECLs as an argument, rather than
1969         using last_function_parms.
1970         (grokdeclarator): Adjust accordingly.  Do not form METHOD_TYPEs
1971         for class-specific operator new and operator delete.
1972         (grok_op_properties): Do not look for allocation functions with
1973         METHOD_TYPEs.
1974         (start_function): Use DECL_ARGUMENTS instead of
1975         last_function_parms.
1976         * decl.h (last_function_parms): Do not declare.
1977         * decl2.c (grokclassfn): Do not use last_function_parms.
1978         * friend.c (do_friend): Remove parmdecls parameter.
1979         * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1980         (pop_from_top_level): Do not restore it.
1981         * pt.c (check_explicit_specialization): Do not adjust
1982         last_function_parms.
1983
1984         * name-lookup.c (do_local_using_decl): Create a local binding for
1985         types brought in via using declarations.
1986
1987         * name-lookup.c (lookup_arg_dependent): Handle block-scope
1988         function declarations correctly.
1989
1990         * semantics.c (finish_id_expression): Correct handling of
1991         conversion operators to dependent types.
1992
1993         * typeck.c (lookup_destructor): Allow the use of destructors from
1994         base classes.
1995
1996 2004-03-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1997
1998         * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1999         TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2000         * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2001         the field is named TEMPLATE_TYPE_PARM_INDEX.
2002
2003 2004-03-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2004
2005         PR c++/14545
2006         * parser.c (cp_parser_functional_cast): A cast to anything
2007         but integral or enumaration type is not an integral constant
2008         expression.
2009         * pt.c (value_dependent_expression_p): Handle cast expressions
2010         without operands (such as "int()").
2011
2012 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
2013
2014         * semantics.c (finish_pseudo_destructor_expr): Allow differing
2015         cv-qualification between the type named by the
2016         pseudo-destructor-name and the object-type.
2017
2018         * search.c (accessible_base_p): Handle non-proper bases.
2019
2020         * name-lookup.c (do_nonmember_using_decl): If a using declaration
2021         refers to a single overloaded function, set the type of the
2022         function.
2023         * tree.c (lvalue_type): Simplify.
2024         * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2025         unknown type.
2026         (build_unary_op): Handle OVERLOADs with known types.
2027
2028         * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2029         function templates.
2030
2031         * parser.c (cp_parser_postfix_expression): Handle the use of
2032         "typename" in non-dependent contexts.  Convert appropriately when
2033         when using a qualified name after "->" or ".".
2034
2035         * call.c (conditional_conversion): Honor the requirement that some
2036         conversions refer to the original object.
2037
2038 2004-03-18  Mark Mitchell  <mark@codesourcery.com>
2039
2040         * call.c (build_conditional_expr): Do not call force_rvalue for
2041         operands of void_type when the conditional expression itself has
2042         void type.
2043         * name-lookup.c (pushdecl): Don't consider a declaration of a
2044         function named "main" to be an overload of a type named "main".
2045         * parser.c (cp_parser_template_name): Perform name lookup when the
2046         template name is proceeded by "template" if the qualifying scope
2047         is non-dependent.
2048         * typeck.c (composite_pointer_type_r): Correctly handle
2049         pointer-to-member types.
2050         (build_const_cast): Likewise.
2051
2052 2004-03-18  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2053
2054         * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2055         * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2056         (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2057         (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2058         (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2059         (TYPEOF_TYPE_EXPR): New macro.
2060         * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2061         * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2062         * pt.c (tsubst): Likewise.
2063         * semantics.c (finish_typeof): Likewise.
2064         * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2065         and TEMPLATE_TYPE_PARM.
2066         * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2067         (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2068
2069 2004-03-16  Mark Mitchell  <mark@codesourcery.com>
2070
2071         PR c++/14586
2072         * cp-tree.h (build_new_op): Change prototype.
2073         (build_x_binary_op): Likewise.
2074         * call.c (build_new_op): Add overloaded_p parameter.
2075         * decl2.c (grok_array_decl): Adjust call to build_new_op.
2076         * parser.c (cp_parser_binary_expression): Note that uses of
2077         overloaded operators prevents an expression from being considered
2078         an integral constant.
2079         * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2080         build_x_binary_op.
2081         * semantics.c (finish_call_expr): Likewise.
2082         * typeck.c (rationalize_conditional_expr): Likewise.
2083         (build_x_indirect_ref): Likewise.
2084         (build_x_binary_op): Likewise.
2085         (build_x_unary_op): Likewise.
2086         (build_x_compound_expr): Likewise.
2087         (build_modify_expr): Likewise.
2088         * typeck2.c (build_x_arrow): Likewise.
2089
2090 2004-03-15  Kazu Hirata  <kazu@cs.umass.edu>
2091
2092         * cp-lang.c, ptree.c: Update copyright.
2093
2094 2004-03-13  Mark Mitchell  <mark@codesourcery.com>
2095
2096         PR c++/14550
2097         * parser.c (cp_parser_non_integral_constant_expression): Encode
2098         more of the idiom that surrounded calls to this function within
2099         the function itself
2100         (cp_parser_primary_expression): Adjust accordingly.
2101         (cp_parser_postfix_expression): Likewise.
2102         (cp_parser_unary_expression): Likewise.
2103         (cp_parser_cast_expression): Likewise.
2104         (cp_parser_assignment_expression): Likewise.
2105         (cp_parser_expression): Likewise.
2106         (cp_parser_new_expression): Note that new-expressions are not
2107         allowed in integral constant expressions.
2108         (cp_parser_delete_expression): Likewise.
2109
2110 2004-03-12  Matt Austern  <austern@apple.com>
2111
2112         * decl2.c (maybe_make_one_only): Look at
2113         TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2114         to make an explicit instantiation weak.
2115         * method.c (use_thunk): Make sure we call comdat_linkage
2116         when appropriate.
2117         * pt.c (do_type_instantiation): On systems where weak symbols
2118         don't go in a static archive's TOC, explicit instantiation of a
2119         class must imply *explicit* instantiation of its memeber.
2120
2121 2004-03-11  Kazu Hirata  <kazu@cs.umass.edu>
2122
2123         * call.c, cp-tree.h, pt.c: Fix comment typos.
2124
2125 2004-03-10  Mark Mitchell  <mark@codesourcery.com>
2126
2127         PR c++/14510
2128         * decl.c (xref_tag): Disregard non-type declarations when
2129         looking up a tagged type.
2130
2131 2004-03-09  Nathan Sidwell  <nathan@codesourcery.com>
2132
2133         PR c++/14397
2134         * call.c (convert_like_real): Build a const qualified temporary,
2135         when testing ctor access.
2136
2137 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
2138
2139         * call.c (initialize_reference): Fix typo.
2140
2141 2004-03-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2142
2143         PR c++/14409
2144         * pt.c (determine_specialization): For member templates, match also
2145         constness.
2146
2147         PR c++/14448
2148         * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2149         non-dependent.
2150         * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2151
2152 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
2153
2154         PR c++/14230
2155         * call.c (initialize_reference): Handle initializers that are
2156         class-member access expressions applies to rvalues.
2157
2158 2004-03-09  Mark Mitchell  <mark@codesourcery.com>
2159
2160         PR c++/14432
2161         * name-lookup.c (supplement_binding): Ignore functions that are
2162         marked DECL_ANTICIPATED.
2163
2164 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
2165
2166         PR c++/14401
2167         * class.c (check_field_decls): Complain about non-static data
2168         members of reference type in unions.  Propagate
2169         CLASSTYPE_REF_FIELDS_NEED_INIT and
2170         CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2171         data members.
2172         * init.c (perform_member_init): Complain about mbmers with const
2173         type that are not explicitly initialized.
2174
2175 2004-03-08  Mark Mitchell  <mark@codesourcery.com>
2176
2177         * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2178         * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2179         (lang_identifier): Remove implicit_decl and error_locus.
2180         (IDENTIFIER_IMPLICIT_DECL): Remove.
2181         (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2182         (IDENTIFIER_ERROR_LOCUS): Likewise.
2183         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2184         (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2185         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2186         (implicitly_declare): Remove.
2187         * decl.c (warn_extern_redeclared_static): Remove check of
2188         IDENTIFIER_IMPLICIT_DECL.
2189         (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2190         (implicitly_declare): Remove.
2191         (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2192         (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2193         (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2194         * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2195         in the innermost scope, rather than at namespace scope.
2196         * name-lookup.c (push_local_binding): Give it external linkage.
2197         (pushdecl): Remove dead code.
2198         * name-lookup.h (push_local_binding): Declare it.
2199         * ptree.c (cxx_print_identifier): Don't print
2200         IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2201         * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2202         not IDENTIFIER_ERROR_LOCUS.
2203         * typeck.c (build_function_call): Remove dead code.
2204
2205 2004-03-08  Jason Merrill  <jason@redhat.com>
2206
2207         PR c++/13170
2208         * decl.c (xref_tag): Remove attribute handling.
2209         * cp-tree.h: Adjust prototype.
2210         * decl.c, parser.c, rtti.c: Adjust callers.
2211         * parser.c (cp_parser_class_head): Pass back attributes in the
2212         class head.
2213         (cp_parser_class_specifier): Adjust.
2214
2215 2004-03-08  Matt Austern  <austern@apple.com>
2216
2217         PR debug/14079
2218         * name-lookup.c (add_decl_to_level): Add extern variables, as well
2219         as static, to static_decls array.
2220
2221 2004-03-05  Jason Merrill  <jason@redhat.com>
2222
2223         * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2224
2225 2004-03-04  Geoffrey Keating  <geoffk@apple.com>
2226
2227         * decl.c (grokfndecl): Update old incorrect comment.
2228         (grokvardecl): Diagnose C++ variables of type with no linkage.
2229
2230 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
2231
2232         PR c++/14369
2233         * pt.c (build_non_dependent_expr): Do not create a
2234         NON_DEPENDENT_EXPR for a THROW_EXPR.
2235
2236 2004-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2237
2238         PR c++/14369
2239         * error.c (dump_expr): Handle THROW_EXPR.
2240
2241 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
2242
2243         PR c++/14360
2244         * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2245         lookup if ordinary name-lookup finds a non-function.
2246         * pt.c (tsubst_copy_and_build): Likewise.
2247
2248         PR c++/14361
2249         * parser.c (cp_parser_late_parsing_default_args): Check that there
2250         are no extra tokens after the end of the default-argument
2251         expression.
2252
2253 2004-03-01  Mark Mitchell  <mark@codesourcery.com>
2254
2255         PR c++/14324
2256         * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2257         having C++ linkage for name-mangling purposes.
2258
2259         PR c++/14260
2260         * parser.c (cp_parser_direct_declarator): Recognize constructor
2261         declarators that use a template-id to name the class being
2262         constructed.
2263
2264         PR c++/14337
2265         * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2266         (tsubst_expr): Do not call tsubst_copy, even when
2267         processing_template_decl.
2268
2269 2004-03-01  Jeff Law  <law@redhat.com>
2270
2271         * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2272         the proper type.
2273
2274 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
2275
2276         PR c++/14138
2277         * name-lookup.h (push_scope): Change prototype.
2278         * name-lookup.c (push_scope): Do not reenter the current class
2279         scope.
2280         * decl.c (grokfndecl): Check return code from push_scope before
2281         calling pop_scope.
2282         * decl2.c (check_classfn): Likewise.
2283         * parser.c (cp_parser_conversion_function_id): Likewise.
2284         (cp_parser_init_declarator): Likewise.
2285         (cp_parser_direct_declarator): Likewise.
2286         (cp_parser_class_specifier): Likewise.
2287         (cp_parser_class_head): Likewise.
2288         (cp_parser_lookup_name): Likewise.
2289         (cp_parser_constructor_declarator_p): Likewise.
2290         * pt.c (instantiate_class_template): Likewise.
2291         (resolve_typename_type): Likewise.
2292
2293 2004-02-29  Mark Mitchell  <mark@codesourcery.com>
2294
2295         PR c++/14267
2296         * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2297         extension.
2298
2299         PR debug/12103
2300         * class.c (update_vtable_entry_for_fn): Do not go through
2301         covariance machinery if the type returned by an overrider is the
2302         same as the original.
2303
2304 2004-02-29  Kazu Hirata  <kazu@cs.umass.edu>
2305
2306         * call.c: Fix a comment typo.
2307
2308 2004-02-27  Ziemowit Laski  <zlaski@apple.com>
2309
2310         * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2311
2312 2004-02-26  Mark Mitchell  <mark@codesourcery.com>
2313
2314         PR c++/14278
2315         * parser.c (cp_parser_parameter_declaration_list): Commit
2316         to fewer tentative parses.
2317
2318 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2319
2320         PR c++/14284
2321         * pt.c (dependent_type_p_r): A template template parameter is a
2322         dependent type.
2323
2324 2004-02-26  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2325
2326         PR c++/14246
2327         * mangle.c (write_template_arg_literal): Don't rely on identity for
2328         boolean constants.
2329
2330 2004-02-24  Jason Merrill  <jason@redhat.com>
2331
2332         * tree.c (build_exception_variant): Use check_qualified_type.
2333
2334 2004-02-23  Zack Weinberg  <zack@codesourcery.com>
2335             Kazu Hirata  <kazu@cs.umass.edu>
2336
2337         * decl.c (cxx_init_decl_processing): Don't check
2338         flag_writable_strings.
2339
2340 2004-02-23  Andrew Pinski  <pinskia@physics.uc.edu>
2341
2342         PR c++/14156
2343         * typeck.c (maybe_warn_about_returning_address_of_location):
2344         Change check for VAR_DECL to use DECL_P instead.
2345
2346 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2347
2348         PR c++/14250
2349         * cvt.c (build_expr_type_conversion): Type must be complete before
2350         looking up for conversions.
2351
2352 2004-02-23  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2353
2354         PR c++/14143
2355         * name-lookup.c (arg_assoc_class): Don't look into template
2356         arguments if it is not a primary template.
2357
2358 2004-02-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2359
2360         PR c++/12007
2361         * method.c (use_thunk): Always clone function argument tree.
2362
2363 2004-02-20  Mark Mitchell  <mark@codesourcery.com>
2364
2365         PR c++/14199
2366         * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2367
2368         PR c++/14173
2369         * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2370         for all type variants.
2371
2372 2004-02-19  Mark Mitchell  <mark@codesourcery.com>
2373
2374         PR c++/13927
2375         * decl.c (duplicate_decls): Return error_mark_node for invalid
2376         redeclarations.
2377         * name-lookup.c (push_namespace): Ignore the return value from
2378         pushdecl.
2379         * pt.c (push_template_decl_real): Robustify.
2380
2381         PR c++/14186
2382         * name-lookup.c (push_class_level_binding): Do not complain about
2383         adding a binding for a member whose name is the same as the
2384         enclosing class if the member is located in a base class of the
2385         current class.
2386
2387 2004-02-19  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2388
2389         PR c++/14181
2390         * parser.c (cp_parser_new_expression): Parse an ill-formed
2391         direct-new-declarator after a parenthesized type-id to emit good
2392         diagnostic.
2393
2394 2004-02-18  Kazu Hirata  <kazu@cs.umass.edu>
2395
2396         * cp-tree.def, cvt.c: Update copyright.
2397
2398 2004-02-17  Mark Mitchell  <mark@codesourcery.com>
2399
2400         PR c++/11326
2401         * cp-tree.h (abi_version_at_least): Remove.
2402         * mangle.c: Include flags.h.
2403
2404 2004-02-15  Mark Mitchell  <mark@codesourcery.com>
2405
2406         PR c++/13971
2407         * call.c (build_conditional_expr): Handle conversions between
2408         class types which result in differently cv-qualified type
2409         variants.
2410
2411         PR c++/14086
2412         * class.c (delete_duplicate_fields_1): Remove.
2413         (delete_duplicate_fields): Likewise.
2414         (finish_struct_anon): Remove check for members with the same name
2415         as their enclosing class.
2416         (check_field_decls): Do not call duplicate_fields.
2417         * decl.c (grokdeclarator): Remove check for static data members
2418         with the same name as their enclosing class.
2419         * name-lookup.c (push_class_level_binding): Check for members with
2420         the same name as their enclosing class.
2421
2422 2004-02-15  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2423
2424         PR c++/14085
2425         * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2426
2427 2004-02-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2428
2429         PR c++/13635
2430         * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2431         has full set of arguments.
2432
2433 2004-02-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2434
2435         PR c++/13927
2436         * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2437
2438 2004-02-13  Mark Mitchell  <mark@codesourcery.com>
2439
2440         PR c++/14122
2441         * cp-tree.h (delete_sanity): Change prototype.
2442         * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2443         Remove dead code.  Adjust code to warn about deleting an array.
2444         * typekc.c (decay_conversion): Use build_address and build_nop.
2445
2446         PR c++/14108
2447         * search.c (accessible_p): Do not check access in thunks.
2448
2449         PR c++/14083
2450         * call.c (build_conditional_expr): Call force_rvalue on the
2451         non-void operand in the case that one result is a throw-expression
2452         and the other is not.
2453
2454 2004-02-13  Ian Lance Taylor  <ian@wasabisystems.com>
2455
2456         PR c++/9851
2457         * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2458         the type name and look ahead for ::~, and bail out early with a
2459         better error message if the parse is going to fail.
2460
2461 2004-02-12  Mark Mitchell  <mark@codesourcery.com>
2462
2463         * call.c (conversion_kind): New type.
2464         (conversion_rank): Likewise.
2465         (conversion): Likewise.
2466         (CONVERSION_RANK): New macro.
2467         (conversion_obstack): New variable.
2468         (obstack_initialized): Likewise.
2469         (z_candidate): Change type of convs and second_conv.
2470         (candidate_warning): New type.
2471         (IDENTITY_RANK): Remove.
2472         (EXACT_RANK): Likewise.
2473         (PROMO_RANK): Likewise.
2474         (STD_RANK): Likewise.
2475         (PBOOL_RANK): Likewise.
2476         (USER_RANK): Likewise.
2477         (ELLIPSIS_RANK): Likewise.
2478         (BAD_RANK): Likewise.
2479         (ICS_RANK): Likewise.
2480         (ICS_STD_RANK): Likewise.
2481         (ICS_USER_FLAG): Likewise.
2482         (ICS_ELLIPSIS_FLAG): Likewise.
2483         (ICS_THIS_FLAG): Likewise.
2484         (ICS_BAD_FLAG): Likewise.
2485         (NEED_TEMPORARY_P): Likewise.
2486         (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2487         (USER_CONV_CAND): Likewise.
2488         (USER_CONV_FN): Likewise.
2489         (conversion_obstack_alloc): New function.
2490         (alloc_conversion): Likewise.
2491         (validate_conversion_obstack): Likewise.
2492         (alloc_conversions): Likewise.
2493         (build_conv): Adjust to deal with new conversion data structures.
2494         (build_identity_conv): New function.
2495         (build_ambiguous_conv): Likewise.
2496         (standard_conversion): Adjust to deal with new conversion data
2497         structures.
2498         (convert_class_to_reference): Likewise.
2499         (direct_reference_binding): Likewise.
2500         (reference_binding): Likewise.
2501         (implicit_conversion): Likewise.
2502         (add_candidate): Likewise.
2503         (add_function_candidate): Likewise.
2504         (add_conv_candidate): Likewise.
2505         (build_builtin_candidate): Likewise.
2506         (print_z_candidate): Likewise.
2507         (merge_conversion_sequences): Likewise.
2508         (build_user_type_conversion_1): Likewise.
2509         (build_user_type_conversion): Likewise.
2510         (build_new_function_call): Likewise.
2511         (build_object_call): Likewise.
2512         (conditional_conversion): Likewise.
2513         (build_conditional_expr): Likewise.
2514         (build_new_op): Likewise.
2515         (build_op_delete_call): Likewise.
2516         (convert_like_real): Likewise.
2517         (build_over_call): Likewise.
2518         (build_new_method_call): Likewise.
2519         (is_subseq): Likewise.
2520         (maybe_handle_implicit_object): Likewise.
2521         (maybe_handle_ref_bind): Likewise.
2522         (compare_ics): Likewise.
2523         (source_type): Likewise.
2524         (add_warning): Likewise.
2525         (joust): Likewise.
2526         (can_convert_arg): Likewise.
2527         (can_convert_arg_bad): Likewise.
2528         (perform_implicit_conversion): Likewise.
2529         (perform_direct_initialization_if_possible): Likewise.
2530         (initialize_reference): Likewise.
2531         * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2532         * cp-tree.def (WRAPPER): Likewise.
2533         (IDENTITY_CONV): Remove.
2534         (LVALUE_CONV): Likewise.
2535         (QUAL_CONV): Likewise.
2536         (STD_CONV): Likewise.
2537         (PTR_CONV): Likewise.
2538         (PMEM_CONV): Likewise.
2539         (BASE_CONV): Likewise.
2540         (REF_BIND): Likewise.
2541         (USER_CONV): Likewise.
2542         (AMBIG_CONV): Likewise.
2543         (RVALUE_CONV): Likewise.
2544         * cp-tree.h (tree_wrapper): Remove.
2545         (WRAPPER_ZC): Remove.
2546         (lang_tree_node): Remove wrapper.
2547         (LOOKUP_SPECULATIVELY): Remove.
2548         (build_op_delete_call): Adjust prototype.
2549         (validate_conversion_obstack): Declare.
2550         (build_zc_wrapper): Remove.
2551         * cvt.c (convert_to_reference): Remove dead code.
2552         (ocp_convert): Likewise.
2553         * decl.c (redeclaration_error_message): Correct handling of
2554         templates.
2555         (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2556         (cp_tree_node_structure): Remove WRAPPER case.
2557         * decl2.c (finish_file): Call validate_conversion_obstack.
2558         * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2559         (build_op_delete_call): Likewise.
2560         (build_x_delete): Likewise.
2561         (build_delete): Adjust call to build_op_delete_call.
2562         * pt.c (tsubst_friend_declaration): Adjust code to determine
2563         whether or not a friend template is a definition.
2564         (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2565         * tree.c (build_zc_wrapper): Remove.
2566
2567 2004-02-12  Zack Weinberg  <zack@codesourcery.com>
2568
2569         * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2570         * cp-tree.h: Don't declare cxx_builtin_type_decls.
2571         * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2572         (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2573
2574 2004-02-10  Mark Mitchell  <mark@codesourcery.com>
2575
2576         * typeck.c (lookup_destructor): Fix typo in error message.
2577
2578 2004-02-09  Kazu Hirata  <kazu@cs.umass.edu>
2579
2580         * call.c, parser.c, tree.c: Fix comment typos.
2581
2582 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
2583
2584         Bug 13856
2585         * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2586         * decl.c (duplicate_decls, start_function): Likewise.
2587
2588 2004-02-07  Zack Weinberg  <zack@codesourcery.com>
2589
2590         * name-lookup.c (pushdecl): Issue shadow warnings directly.
2591         * parser.c (free_parser_stacks): Delete.
2592
2593 2004-02-07  Kazu Hirata  <kazu@cs.umass.edu>
2594
2595         * rtti.c: Update copyright.
2596
2597 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2598
2599         PR c++/14033
2600         * decl.c (require_complete_types_for_parms): Do not insert
2601         error_mark_node in the parameter list.
2602
2603 2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2604
2605         PR c++/14028
2606         * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2607         error when terminator can not be found.
2608
2609 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
2610
2611         Make-lang.in (po-generated):  Delete.
2612
2613 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
2614
2615         * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
2616         targetm.calls.promote_prototypes.
2617
2618 2004-02-05  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2619
2620         PR middle-end/13750
2621         Revert:
2622         2004-01-15  Geoffrey Keating  <geoffk@apple.com>
2623         PR pch/13361
2624         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2625         (handle_pragma_implementation): Likewise.
2626
2627 2004-02-05  Mark Mitchell  <mark@codesourcery.com>
2628
2629         PR c++/13714
2630         * typeck.c (lookup_destructor): Tweak error message.
2631
2632 2004-02-05  Jan Hubicka  <jh@suse.cz>
2633
2634         * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
2635         functions.
2636
2637 2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2638
2639         PR c++/14008
2640         * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
2641         code, only emits the diagnostic now. Added lookup of the identifier
2642         and support for qualified ids.
2643         (cp_parser_parse_and_diagnose_invalid_type_name): New function.
2644         Parse an (invalid) type name as id-expression within a declarator.
2645         (cp_parser_simple_declaration): Use it.
2646         (cp_parser_member_declaration): Likewise.
2647         (cp_parser_make_typename_type): New function. Handle errors through
2648         cp_parser_diagnose_invalid_typename.
2649         (cp_parser_elaborated_type_specifier): Use it.
2650
2651 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2652
2653         PR c++/13932
2654         * call.c (convert_like_real): Use "converting" rather than
2655         "argument" as the descriptive keyword to
2656         dubious_conversion_warnings.
2657         * typeck.c (convert_for_assignment): Do not call
2658         dubious_conversion_warnings.
2659
2660 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2661
2662         PR c++/13086
2663         * init.c (build_delete): Emit a more informative error message in
2664         case of an incomplete type, and on the correct source line.
2665
2666 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
2667
2668         * error.c, search.c: Update copyright.
2669
2670 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2671
2672         PR c++/9941
2673         * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
2674         linkage for the typeinfo name string.
2675
2676 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2677
2678         PR c++/13969
2679         * cp-tree.h (fold_non_dependent_expr): New function.
2680         * parser.c (cp_parser_fold_non_dependent_expr): Remove.
2681         (cp_parser_template_argument): Use fold_non_dependent_expr.
2682         (cp_parser_direct_declarator): Likewise.
2683         * pt.c (fold_non_dependent_expr): New function.
2684         (convert_nontype_argument): Use it.
2685         (tsubst_qualified_id): Simplify.
2686         (tsubst_copy_and_build): Likewise.
2687
2688 2004-02-04  Mark Mitchell  <mark@codesourcery.com>
2689
2690         * decl.c (cxx_push_function_context): Do not set
2691         current_function_is_thunk.
2692         * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
2693         actual function.
2694
2695 2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2696
2697         PR c++/13997
2698         * pt.c (more_specialized_class): Increase processing_template_decl
2699         while partial ordering.
2700
2701 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
2702
2703         PR c++/13925
2704         * decl.c (start_function): Do not call pushdecl for any
2705         instantiation or specialization of a primary template.
2706
2707 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
2708
2709         PR c++/13950
2710         * parser.c (cp_parser_class_name): Robustify.
2711
2712         PR c++/13970
2713         * parser.c (cp_parser_cache_group): Do not consume the EOF token.
2714
2715         PR c++/14002
2716         * semantics.c (finish_id_expression): Do not return an
2717         IDENTIFIER_NODE when lookup finds a PARM_DECL.
2718
2719 2004-02-03  Mark Mitchell  <mark@codesourcery.com>
2720
2721         PR c++/13978
2722         * pt.c (build_non_dependent_expr): Do not build
2723         NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
2724
2725         PR c++/13968
2726         * semantics.c (finish_id_expression): Do not return an
2727         IDENTIFIER_NODE when lookup finds a VAR_DECL.
2728
2729         PR c++/13975
2730         * parser.c (cp_parser_simple_declaration): When skipping to the
2731         end of the statement swallow the terminating semicolon.
2732
2733 2004-02-02  Mark Mitchell  <mark@codesourcery.com>
2734
2735         PR c++/13113
2736         * init.c (build_offset_ref): Improve error recovery for invalid
2737         uses of non-static member functions.
2738
2739         PR c++/13854
2740         * cp-tree.h (cp_build_type_attribute_variant): New function.
2741         * class.c (build_clone): Use cp_build_type_attribute_variant.
2742         * decl.c (duplicate_decls): Likewise.
2743         * pt.c (copy_default_args_to_explicit_spec): Likewise.
2744         (tsubst_function_type): Likewise.
2745         * tree.c (build_exception_variant): Check attributes before
2746         concluding that two types are the same.
2747         (cp_build_type-attribute_variant): New method.
2748         * typeck.c (merge_types): Use cp_build_type_attribute_variant.
2749
2750         PR c++/13907
2751         * call.c (convert_class_to_reference): Keep better track of
2752         pedantically invalid user-defined conversions.
2753
2754 2004-02-01  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2755
2756         PR c++/13957
2757         * pt.c (tsubst_qualified_id): Improved error message when a type
2758         is expected but not found.
2759
2760 2004-01-31  Kazu Hirata  <kazu@cs.umass.edu>
2761
2762         * class.c: Fix comment typos.
2763         * decl.c: Likewise.
2764         * error.c: Likewise.
2765         * parser.c: Likewise.
2766         * pt.c: Likewise.
2767         * search.c: Likewise.
2768         * typeck.c: Likewise.
2769
2770 2004-01-30  Richard Henderson  <rth@redhat.com>
2771
2772         PR c++/13693
2773         * method.c (use_thunk): Don't force_target_expr for void thunks.
2774         * tree.c (build_target_expr_with_type): Assert non-void type.
2775         (force_target_expr): Likewise.
2776
2777 2004-01-30  Michael Matz  <matz@suse.de>
2778
2779         * parser.c (cp_parser_labeled_statement): Accept case ranges.
2780
2781 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2782
2783         DR206
2784         PR c++/13813
2785         * decl.c (grokdeclarator): Check immediatly type completeness for
2786         non-dependent types.
2787
2788 2004-01-30  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2789
2790         PR c++/13683
2791         * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2792         a sizeof expression.block
2793
2794 2004-01-29  Mark Mitchell  <mark@codesourcery.com>
2795
2796         PR c++/13883
2797         * mangle.c (write_encoding): Correct encoding of member template
2798         constructors.
2799
2800 2004-01-28  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2801
2802         * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2803         template name as it was `<::' (digraph typo).
2804         (cp_parser_nth_token_starts_template_argument_list_p): New function.
2805         (cp_parser_id_expression): Use it.
2806         (cp_parser_nested_name_specifier_opt): Likewise.
2807         (cp_parser_template_name): Likewise.
2808         (cp_parser_class_name): Likewise.
2809         (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2810
2811 2004-01-28  Mark Mitchell  <mark@codesourcery.com>
2812
2813         PR c++/13791
2814         * typeck.c (merge_types): Do not merge attributes into
2815         TYPENAME_TYPEs.
2816
2817         PR c++/13736
2818         * parser.c (cp_parser_direct_declarator): Do not prevent
2819         backtracking inside a parenthesized declarator.
2820         (cp_parser_parameter_declaration): Fix typo in comment.
2821
2822 2004-01-28  Jan Hubicka  <jh@suse.cz>
2823
2824         * semantics.c (expand_body)  Do emit_associated_thunks before
2825         expansion.
2826
2827 2004-01-27  Devang Patel  <dpatel@apple.com>
2828
2829         * name-lookup.c: Include "debug.h"
2830         (do_namespace_alias): Invoke debug_hooks to emit debug info
2831         for namespace alias.
2832         (do_local_using_decl): Invoke debug_hooks to emit debug info
2833         for using decl.
2834         (do_class_using_decl): Same.
2835         (do_toplevel_using_decl): Same.
2836         (do_using_directive): Same.
2837         (cp_emit_debug_info_for_using): New function.
2838         * Make-lang.in (cp/parser.o): Depend on debug.h
2839         (cp/name-lookup.o): Same.
2840
2841 2004-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2842
2843         * cp-tree.h (language_function, lang_type_header): Use
2844         BOOL_BITFIELD.
2845         * name-lookup.h (cp_binding_level): Likewise.
2846
2847 2004-01-26  Mark Mitchell  <mark@codesourcery.com>
2848
2849         PR c++/13663
2850         * semantics.c (finish_for_expr): Check for unresolved overloaded
2851         functions.
2852
2853         * class.c (add_method): Just check processing_template_decl to
2854         determine whether or not we are within a template.
2855         * decl2.c (maybe_retrofit_in_chrg): Likewise.
2856         * init.c (decl_constant_value): Check the type of the declaration,
2857         not TREE_READONLY.
2858         * name-lookup.c (maybe_push_to_top_level): Rename to ...
2859         (push_to_top_level): ... this.
2860         * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2861         * pt.c (push_template_decl_real): Reorder condition for speed.
2862         (convert_template_argument): Use dependency-checking functions in
2863         place of uses_template_parms.
2864         (lookup_template_class): Avoid calling uses_template_parms more
2865         than once.
2866         (uses_template_parms): Reimplement, using dependency-checking
2867         functions.
2868         (instantiate_class_template): Use push_to_top_level, not
2869         maybe_push_to_top_level.
2870         (type_unification_real): Simplify.
2871         (type_dependent_expression_p): Handle OFFSET_REFs and
2872         TEMPLATE_DECLs.
2873         (any_dependent_template_arguments_p): Handle multiple levels of
2874         template argument.
2875         * semantics.c (expand_or_defer_fn): Do not check
2876         uses_template_parms for template instantiations.
2877         * typeck.c (comptypes): Avoid calling cp_type_quals.
2878
2879 2004-01-25  Mark Mitchell  <mark@codesourcery.com>
2880
2881         PR c++/13833
2882         * call.c (build_over_call): Do not convert arguments when
2883         processing a template.
2884         * pt.c (build_non_dependent_expr): Do not build a
2885         NON_DEPENDENT_EXPR for arithmetic constants.
2886
2887 2004-01-25  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2888
2889         PR c++/13810
2890         * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2891         returns a TYPE_DECL. no further lookup is required.
2892         * semantics.c (check_template_template_default_arg): A TYPE_DECL
2893         is invalid. Rework to give better diagnostics.
2894
2895 2004-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2896
2897         PR c++/13797
2898         * pt.c (instantiate_class_template): Add an error_mark_node
2899         check.
2900         (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2901
2902 2004-01-23  Andrew Pinski  <pinskia@physics.uc.edu>
2903
2904         PR c++/13701
2905         * decl.c (finish_function): Move the call to
2906         finish_fname_decls below the call to
2907         finish_eh_spec_block.
2908
2909 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
2910
2911         * optimize.c, typeck2.c: Update copyright.
2912
2913 2004-01-21  Kazu Hirata  <kazu@cs.umass.edu>
2914
2915         * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2916         init.c, mangle.c, typeck.c: Update copyright.
2917
2918 2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2919
2920         * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2921
2922 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2923
2924         * Make-lang.in: Replace $(docdir) with doc.
2925         (c++.info, c++.srcinfo): Dummy entry.
2926         (c++.man, c++.srcman): New rules.
2927         (c++.install-man): Revamp rule.
2928
2929 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
2930
2931         * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2932         CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2933         immediate $(shell) instead of deferred backquote.
2934
2935 2004-01-19  Mark Mitchell  <mark@codesourcery.com>
2936
2937         PR c++/13651
2938         * parser.c (cp_parser_postfix_expression): When encountering
2939         incomplete type on left-hand side of "->" or ".", treat the entire
2940         expression as erroneous.
2941
2942         PR c++/13592
2943         * call.c (build_field_call): Remove.
2944         (n_build_method_call): Likewise.
2945         (build_method_call): Likewise.
2946         (build_new_method_call): Do not call build_field_call.
2947         * class.c (n_build_method_call): Remove.
2948         (print_class_statistics): Do not print it.
2949         * cp-tree.h (build_method_call): Remove declaration.
2950         (finish_object_call_expr): Likewise.
2951         (build_new_1): Do not use build_method_call.
2952         * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2953         when the function appearing on the right-hand-side of "." or "->"
2954         is not actually a function.
2955         * pt.c (tsubst_copy_and_build): Likewise.
2956         * semantics.c (finish_object_call_expr): Remove.
2957
2958 2004-01-18  Mark Mitchell  <mark@codesourcery.com>
2959
2960         PR c++/13710
2961         * pt.c (tsubst): Use finish_typeof.
2962
2963 2004-01-18  Jason Merrill  <jason@redhat.com>
2964
2965         PR c++/11725
2966         * except.c (build_throw): In a template, set
2967         current_function_returns_abnormally.
2968
2969 2004-01-17  Fred Fish  <fnf@intrinsity.com>
2970
2971         PR c++/11895
2972         * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2973         except don't call array_type_nelts() with a VECTOR_TYPE.
2974
2975 2004-01-16  Jan Hubicka  <jh@suse.cz>
2976
2977         * mangle.c (write_mangled_name): Remove inline modifier.
2978
2979 2004-01-16  Mark Mitchell  <mark@codesourcery.com>
2980
2981         PR c++/13574
2982         * decl.c (compute_array_index_type): Fix grammar in comment.
2983         * init.c (build_zero_init): Handle zero-sized arrays correctly.
2984
2985         PR c++/13178
2986         * call.c (name_as_c_string): Print conversion operator names
2987         correctly.
2988
2989         PR c++/13478
2990         * call.c (initialize_reference): Pass -1 for inner parameter to
2991         convert_like_real.
2992
2993 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
2994
2995         PR c++/13407
2996         * parser.c (cp_parser_base_specifier): Check for an invalid
2997         keyword `typename' and emit an user-friendly error message.
2998
2999 2004-01-15  Geoffrey Keating  <geoffk@apple.com>
3000
3001         PR pch/13361
3002         * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3003         (handle_pragma_implementation): Likewise.
3004
3005 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3006
3007         PR c++/9259
3008         * typeck.c (build_class_member_access_expr): Allow to access members
3009         of the currently open class.
3010         (finish_class_member_access_expr): Likewise.
3011
3012 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
3013
3014         PR c++/13659
3015         * name-lookup.c (validate_nonmember_using_decl): Take scope and
3016         name by value, instead of computing them.
3017         (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3018         arguments.  Pass them to validate_nonmember_using_decl.
3019         * name-lookup.h (do_local_using_decl): Adjust.
3020         (do_toplevel_using_decl): Likewise.
3021         * parser.c (cp_parser_using_declaration): Likewise.
3022         * pt.c (tsubst_expr): Likewise.
3023
3024 2004-01-15  Alexandre Oliva  <aoliva@redhat.com>
3025
3026         PR c++/13594
3027         PR c++/13658
3028         * name-lookup.c (qualified_lookup_using_namespace): Search
3029         strongly-associated namespaces first, and only then try other
3030         namespaces.
3031
3032 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
3033
3034         * Make-lang.in (c++.srcextra): Dummy entry.
3035
3036 2004-01-15  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3037
3038         PR c++/8856
3039         * parser.c (cp_parser_template_name): Don't try to parse a
3040         conversion-function-id, as it cannot be a template-name.
3041         (cp_parser_simple_type_specifier): Check for invalid template-ids
3042         even after a built-in type.
3043
3044 2004-01-14  Jan Hubicka  <jh@suse.cz>
3045
3046         PR c++/12850
3047         * pt.c (instantiate_decl):  Do not increase function_depth.
3048
3049 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
3050
3051         PR c++/9021
3052         PR c++/11005
3053         * parser.c (cp_parser_elaborated_type_specifier): Warn about
3054         attributes and discard.
3055         * decl.c (xref_tag): Don't overwite existing attributes with
3056         NULL_TREE.
3057
3058 2004-01-14  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3059
3060         PR c++/12335
3061         * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3062         is no destructor while looking up a BIT_NOT_EXPR.
3063
3064 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
3065
3066         * cxxfilt.c: Remove unused file.
3067
3068 2004-01-14  Jan Hubicka  <jh@suse.cz>
3069
3070         Partial fix to PR c++/12850
3071         * decl2.c (mark_used): Do not proactively instantiate templates
3072         when compiling in unit-at-a-time or not optimizing.
3073         * optimize.c (maybe_clone_body): Do not increase function depth.
3074
3075 2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3076
3077         PR c++/13474
3078         * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3079
3080 2004-01-12  Steven Bosscher  <stevenb@suse.de>
3081
3082         PR c++/13558
3083         * parser.c (cp_parser_member_declaration): Any non-type is also
3084         not a class or a function.
3085
3086 2004-01-12  Jason Merrill  <jason@redhat.com>
3087
3088         PR c++/12815
3089         * class.c (build_base_path): Do not mark vtable references as
3090         TREE_CONSTANT.
3091         (build_vtbl_ref_1): Likewise.
3092
3093 2004-01-12  Richard Henderson  <rth@redhat.com>
3094
3095         PR opt/10776
3096         * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3097         (store_init_value): Use it.
3098         * decl.c (check_initializer): Expect full initialization code
3099         from store_init_value.
3100         * init.c (expand_aggr_init_1): Likewise.
3101         * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3102
3103 2004-01-12  Mark Mitchell  <mark@codesourcery.com>
3104
3105         * class.c (layout_class_type): For non-POD class types, also copy
3106         the DECL_SIZE and DECL_MODE of fields to the base class type.
3107
3108 2004-01-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3109
3110         PR c++/13289
3111         * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3112         calling regenerate_decl_from_template.
3113
3114 2004-01-12  Scott Brumbaugh  <scottb.lists@verizon.net>
3115
3116         PR c++/4100
3117         * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3118         decl-specifier occurring along with a class definition.
3119
3120 2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>
3121
3122         * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3123         clauses to comments describing declares_class_or_enum.
3124         (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3125         false.
3126
3127 2004-01-12  Jan Hubicka  <jh@suse.cz>
3128
3129         * pt.c (for_each_template_parm): Do not check for duplicates.
3130         (for_each_template_parm): Use walk_tree duplicate checking code.
3131
3132 2004-01-11  Ian Lance Taylor  <ian@wasabisystems.com>
3133
3134         PR c++/3478
3135         * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3136         is error_mark_node, don't add any more decl_specs.
3137         (cp_parser_init_declarator): After committing to a declaration, if
3138         the decl_specifiers start with error_mark_node, issue an error and
3139         change the type to "int".
3140
3141 2004-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
3142
3143         PR bootstrap/7817
3144         * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3145
3146 2004-01-10  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3147
3148         DR 337
3149         PR c++/9256
3150         * pt.c (tsubst): Substitution must fail if we are attempting to
3151         create an array with element type that is an abstract class type.
3152         * decl.c (cp_finish_decl): Strip pointers and array types recursively
3153         before calling abstract_virtuals_error.
3154
3155 2004-01-09  Alexandre Oliva  <aoliva@redhat.com>
3156
3157         * name-lookup.c (qualified_lookup_using_namespace): Consider
3158         strong using directives even if we've already found a binding.
3159
3160 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
3161
3162         * cp-tree.h (cxx_expand_expr): Change prototype.
3163         * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3164
3165 2004-01-08  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
3166
3167         PR c++/12573
3168         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3169         looking into them recursively. They can be there because of the
3170         new __offsetof__ extension.
3171
3172 2004-01-07  Zack Weinberg  <zack@codesourcery.com>
3173
3174         * parser.c (cp_parser_save_member_function_body): Mark the
3175         definition static.
3176
3177 2004-01-05  Mark Mitchell  <mark@codesourcery.com>
3178
3179         PR c++/13057
3180         * class.c (build_clone): Copy type attributes from the original
3181         function to the clone.
3182
3183         PR c++/12815
3184         * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3185         references as constant.
3186
3187         PR c++/12132
3188         * parser.c (cp_parser_explicit_instantiation): Improve error
3189         recovery.
3190         (cp_parser_require): Improve indication of the error location.
3191
3192         PR c++/13451
3193         * parser.c (cp_parser_class_head): Reorder logic to check for
3194         invalid qualification.
3195
3196 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
3197
3198         PR c++/13157
3199         * name-lookup.c (lookup_using_namespace): Remove spacesp
3200         parameter.
3201         (unqualified_namespace_lookup): Likewise.
3202         (lookup_qualified_name): Adjust accordingly.
3203         (lookup_name_real): Likewise.
3204         (lookup_arg_dependent): Do not eliminate the namespace of the
3205         functions found by unqualified name lookup unless that is the
3206         current namespace.
3207
3208 2004-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
3209
3210         * semantics.c (push_deferring_access_checks): Fix format.
3211         (resume_deferring_access_checks): Likewise.
3212         (stop_deferring_access_checks): Likewise.
3213         (pop_deferring_access_checks): Likewise.
3214         (get_deferred_access_checks): Likewise.
3215         (pop_to_parent_deferring_access_checks): Likewise.
3216         (perform_deferred_access_checks): Likewise.
3217         (perform_or_defer_access_check): Likewise.
3218
3219 2004-01-04  Richard Henderson  <rth@redhat.com>
3220
3221         * call.c (build_over_call): Don't create a save_expr of an
3222         aggregate, but rather its address.
3223
3224 2004-01-04  Mark Mitchell  <mark@codesourcery.com>
3225
3226         PR c++/13529
3227         * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3228         an offsetof expression.
3229
3230         * parser.c (cp_parser_parameter_declaration): Fix comment.
3231
3232         PR c++/12226
3233         * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3234         (reference_binding): Set it when appropriate.
3235         (build_temp): New function, split out from ...
3236         (convert_like_real): ... here.  Honor CHECK_COPY_CONSTRUCTOR_P.
3237         (initialize_reference): Likewise.
3238
3239         PR c++/13536
3240         * parser.c (cp_parser): Add in_type_id_in_expr_p.
3241         (cp_parser_new): Initialize it.
3242         (cp_parser_postfix_expression): Set it.
3243         (cp_parser_sizeof_operand): Likewise.
3244         (cp_parser_parameteR_declaration): Do not commit early to tenative
3245         parsers when in_type_id_in_expr_p is set.
3246
3247 2004-01-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3248
3249         PR c++/13094
3250         * parser.c (cp_parser_template_argument): Don't call
3251         make_unbound_class_template directly.
3252         (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3253         UNBOUND_CLASS_TEMPLATE tree node.
3254
3255 2004-01-02  Richard Sandiford  <rsandifo@redhat.com>
3256
3257         PR target/12729
3258         * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3259
3260 2004-01-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3261
3262         PR c++/13520
3263         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3264         (DECL_FUNCTION_TEMPLATE_P): Use it.
3265         (DECL_CLASS_TEMPLATE_P): Likewise.
3266         * parser.c (cp_parser_lookup_name): Add is_template parameter.
3267         (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3268         (cp_parser_template_name): Likewise.
3269         (cp_parser_elaborated_type_specifier): Likewise.
3270         (cp_parser_namespace_name): Likewise.
3271         (cp_parser_class_name): Likewise.
3272         (cp_parser_lookup_name_simple): Likewise.
3273
3274 See ChangeLog.3 for earlier changes.