OSDN Git Service

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