OSDN Git Service

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