OSDN Git Service

Oops, wrong email on previous changelog
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
2
3         * decl.c (struct binding_level): Adjust class_shadowed comments
4         to reflect reality.
5         (push_class_level_binding): Ajust comments to reflect reality.
6         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
7         Don't set TREE_VALUE on the class_shadowed list.
8
9 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10
11         * decl2.c (grokfield): Don't accept `asm' specifiers for
12         non-static data members.
13
14 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15
16         * expr.c (cplus_expand_expr): Don't reset `target'.
17
18 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
19
20         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
21
22 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
23
24         * parse.y (template_datadef): Check for error_mark_node.
25
26 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
27
28         * cp-tree.def (DEFAULT_ARG): Make `x' class.
29
30 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
31
32         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
33         (record_builtin_type): Make non-static.
34         (flag_short_double): Don't declare.
35         (init_decl_processing): Remove the creation of many tree nodes now
36         in c_common_nodes_and_builtins.
37         (build_void_list_node): New function.
38         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
39         * cp-tree.h (flag_short_wchar): Don't declare.
40
41 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
42
43         * call.c (build_conv): Don't use build1 for USER_CONV.
44         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
45
46 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
47
48         * lex.c (lang_init): Call c_common_lang_init.
49
50 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
51
52         * search.c (lookup_fnfields_here): Remove.
53         (look_for_overrides_r): Use lookup_fnfields_1.
54         Ignore functions from using declarations.
55
56 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
57
58         Implement exceptions specifiers for implicit member functions.
59         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
60         * method.c (synthesize_exception_spec): New function.
61         (locate_dtor, locate_ctor, locate_copy): New functions.
62         (implicitly_declare_fn): Generate the exception spec too.
63         * search.c (check_final_overrider): Check artificial functions
64         too.
65         * typeck2.c (merge_exception_specifiers): New function. 
66
67 2001-01-03  Jason Merrill  <jason@redhat.com>
68
69         * init.c (build_default_init): New fn.
70         (perform_member_init): Split out from here.
71         (build_new_1): Use it.  Simplify initialization logic.
72         (build_vec_init): Take an array, rather than a pointer and maxindex.
73         Speed up simple initializations.  Don't clean up if we're assigning.
74         * cp-tree.h: Adjust.
75         * decl2.c (do_static_initialization): Remove TREE_VEC case.
76         * parse.y (new_initializer): Return void_zero_node for ().
77         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
78         * typeck2.c (digest_init): Only complain about user-written
79         CONSTRUCTORs.
80
81 2000-12-22  Mike Stump  <mrs@wrs.com>
82
83         * decl2.c: (max_tinst_depth): Increase to 50.
84
85 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
86
87         * class.c (invalidate_class_lookup_cache): Zero the
88         previous_class_values.
89         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
90         TREE_INT_CST_HIGH.
91         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
92         * decl.c (free_bindings): New variable.
93         (push_binding): Don't create a new binding if we have one on the
94         free list.
95         (pop_binding): Put old bindings on the free list.
96         (init_decl_processing): Use size_int, not build_int_2.
97         Register free_bindings as a GC root.
98         (cp_make_fname_decl): Use size_int, not build_int_2.
99         (push_inline_template_parms_recursive): Likewise.
100         (end_template_parm_list): Likewise.
101         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
102         (tsubst_template_parms): Use size_int, not build_int_2.
103         (tsubst): Likewise.
104         * rtti.c (get_vmi_pseudo_type_info): Likewise.
105         
106 2001-01-02  Richard Henderson  <rth@redhat.com>
107
108         * parse.y (asm): Set ASM_INPUT_P.
109
110 2001-01-02  Jason Merrill  <jason@redhat.com>
111
112         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
113         for v3 ABI.
114
115         * typeck.c (cp_truthvalue_conversion): New fn.
116         * cvt.c (ocp_convert): Use it.
117
118         * cp-tree.h: Lose c-common.c decls.
119
120         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
121         * cvt.c (convert_to_void): Use type_unknown_p.
122
123         * typeck.c (strip_all_pointer_quals): Also strip quals from 
124         pointer-to-member types.
125
126         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
127         parse.y as C.
128
129         * call.c (build_new_method_call): Do evaluate the object parameter
130         when accessing a static member.
131         * typeck.c (build_component_ref): Likewise.
132
133 2001-01-02  Andreas Jaeger  <aj@suse.de>
134
135         * decl.c (cp_missing_noreturn_ok_p): New.
136         (init_decl_processing): Set lang_missing_noreturn_ok_p.
137
138 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
139
140         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
141
142 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
143
144         * class.c (pushclass): Remove #if 0'd code.
145         * cp-tree.h (overload_template_name): Remove.
146         * decl.c (store_bindings): Simplify.
147         (pop_from_top_level): Likewise.
148         * pt.c (overload_template_name): Remove.
149         (instantiate_decl): Don't call push_to_top_level if it's not
150         needed.
151
152 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
153
154         * pt.c (register_local_specialization): Don't return a value.
155         (lookup_template_class): Use move-to-front heuristic when looking
156         up template instantiations.
157         (instantiate_decl): Only push_to_top_level when we're actually
158         going to instantiate the template.
159
160 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
161
162         * search.c (binfo_for_vtable): Return least derived class, not
163         most.  Handle secondary vtables.
164
165 2000-12-22  Jason Merrill  <jason@redhat.com>
166
167         * pt.c (more_specialized): Don't optimize len==0.
168         (fn_type_unification): If we're adding the return type, increase len.
169
170         * typeck.c (build_binary_op): Fix pmf comparison logic.
171
172         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
173         DECL_STATIC_FUNCTION_P.
174
175         * semantics.c (genrtl_finish_function): Don't try to jump to
176         return_label unless it exists.
177
178         In partial ordering for a call, ignore parms for which we don't have
179         a real argument.
180         * call.c (joust): Pass len to more_specialized.
181         (add_template_candidate_real): Strip 'this', pass len.
182         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
183         (get_bindings_order): New fn.  Pass len down.
184         (get_bindings_real): Strip 'this', pass len.
185         (fn_type_unification): Likewise.
186         (type_unification_real): Succeed after checking 'len' args.
187         (most_specialized_instantiation): Lose explicit_args parm.
188         * class.c (resolve_address_of_overloaded_function): Strip 'this',
189         pass len.
190
191 2000-12-21  Jason Merrill  <jason@redhat.com>
192
193         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
194         DECL_TEMPLATE_RESULT.
195
196         * search.c (lookup_field_r): Call lookup_fnfields_1, not
197         lookup_fnfields_here.
198
199         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
200
201         * call.c (build_object_call): Also allow conversions that return
202         reference to pointer to function.
203         (add_conv_candidate): Handle totype being ref to ptr to fn.
204         (build_field_call): Also allow members of type reference to function.
205         Lose support for calling pointer to METHOD_TYPE fields.
206
207         * error.c (dump_expr): Handle *_CAST_EXPR.
208
209         * typeck2.c (build_scoped_ref): Always convert to the naming class.
210
211         * tree.c (break_out_cleanups): Lose.
212         * cp-tree.h: Remove prototype.
213         * typeck.c (build_component_ref): Don't break_out_cleanups.
214         (build_compound_expr): Likewise.
215         * semantics.c (finish_expr_stmt): Likewise.
216
217 2000-12-20  Richard Henderson  <rth@redhat.com>
218
219         * cp-tree.h: Update declarations.
220         * decl.c (finish_case_label): Return the new stmt node.
221         * semantics.c (finish_goto_stmt): Likewise.
222         (finish_expr_stmt, finish_return_stmt): Likewise.
223         (finish_break_stmt, finish_continue_stmt): Likewise.
224         (finish_asm_stmt): Likewise.
225         * parse.y (already_scoped_stmt): Set STMT_LINENO.
226         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
227         (simple_if, simple_stmt): Return the new stmt node.
228         (save_lineno): New.
229
230 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
231
232         * cp-tree.h: Don't declare warn_long_long.
233
234 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
235
236         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
237         IS_AGGR_TYPE.
238
239 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
240
241         * pt.c (unify): Handle when both ARG and PARM are
242         BOUND_TEMPLATE_TEMPLATE_PARM.
243
244 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
245
246         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
247         DECL_TEMPLATE_PARM_P.
248
249 2000-12-15  Jason Merrill  <jason@redhat.com>
250
251         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
252
253         * init.c (build_new_1): Don't strip quals from type.
254
255         * decl.c (pushdecl): Don't check for linkage on a non-decl.
256
257         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
258
259         * call.c (build_new_function_call): Lose space before paren in
260         error message.
261         (build_new_method_call): Likewise.
262
263         * typeck2.c (build_m_component_ref): Propagate quals from datum.
264
265 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
266
267         * pt.c (check_explicit_specialization): Propagate default
268         function arguments to explicit specializations.
269
270 2000-12-13  DJ Delorie  <dj@redhat.com>
271
272         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
273         and <? operators.
274
275 2000-12-08  Jason Merrill  <jason@redhat.com>
276
277         * error.c (dump_function_name): Don't let the user see __comp_ctor.
278
279         Clean up copy-initialization in overloading code.
280         * call.c (build_user_type_conversion_1): Die if we are asked to
281         convert to the same or a base type.
282         (implicit_conversion): Avoid doing so.  Lose reference binding code.
283         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
284         direct-initialization.  Also do direct-init part of copy-init.
285         (build_user_type_conversion): Don't provide context to convert_like.
286         * cvt.c (ocp_convert): build_user_type_conversion will now provide
287         the constructor call for copy-init.
288
289         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
290         instantiation of a member template.
291         (do_decl_instantiation): Not here.
292
293 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
294
295         * class.c (check_field_decls): Don't special case anonymous
296         fields in error messages.
297         (note_name_declared_in_class): Use %D on diagnostic.
298
299         * tree.c (pod_type_p): Use strip_array_types.
300         (cp_valid_lang_attribute): Likewise.
301         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
302         multiple evaluations.
303         (cp_has_mutable_p): Use strip_array_types.
304
305 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
306
307         * cp-tree.h (sufficient_parms_p): Declare new function.
308         * call.c (sufficient_parms_p): New function, broken out of ...
309         (add_function_candidate): ... here. Use it.
310         (add_conv_candidate): Use it.
311         * decl.c (grok_ctor_properties): Use it.
312
313 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
314
315         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
316
317 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
318
319         * decl2.c (lang_decode_option): Handle -Wformat-security.
320
321 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
322
323         * pt.c (verify_class_unification): New function.
324         (get_class_bindings): Use it.
325         (try_class_unification): Tidy.
326         (unify): Handle when argument of a template-id is not
327         template parameter dependent.
328         (template_args_equal): Handle when TREE_CODE's do not match.
329
330 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
331
332         * lang-specs.h (c++): When invoking the stand-alone preprocessor
333         for -save-temps, pass all relevant -Defines to it, and then don't
334         pass them to cc1plus.
335
336 2000-12-05  Will Cohen  <wcohen@redhat.com>
337
338         * decl.c (finish_case_label): Cleared
339         more_cleanups_ok in surrounding function scopes.
340         (define_label): Likewise.
341
342 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
343
344         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
345         (get_matching_virtual): Remove.
346         (look_for_overrides): Declare new function.
347         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
348         DECL_VINDEX here.
349         * class.c (check_for_override): Move base class iteration code
350         to look_for_overrides.
351         * search.c (next_baselink): Remove.
352         (get_virtuals_named_this): Remove.
353         (get_virtual_destructor): Remove.
354         (tree_has_any_destructors_p): Remove.
355         (struct gvnt_info): Remove.
356         (check_final_overrider): Remove `virtual' from error messages.
357         (get_matching_virtuals): Remove. Move functionality to ...
358         (look_for_overrides): ... here, and ...
359         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
360         to be overriding.
361
362 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
363
364         * typeck.c (get_delta_difference): If via a virtual base,
365         return zero.
366         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
367         adjustment.
368
369 2000-12-04  Richard Henderson  <rth@redhat.com>
370
371         * error.c (dump_tree): Use output_add_string not OB_PUTS.
372
373 2000-12-04  Jason Merrill  <jason@redhat.com>
374
375         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
376         (write_builtin_type): Pass intSI_type_node and the like through
377         type_for_mode.
378         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
379         Pass intSI_type_node and the like through type_for_mode.
380         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
381         * pt.c (tsubst, unify): Likewise.
382         * tree.c (walk_tree): Likewise.
383         * error.c (dump_type): Likewise.
384         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
385
386         * Make-lang.in: Tweak top comment for emacs.
387         (cp/TAGS): Restore.
388
389         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
390
391         * class.c (clone_function_decl): Robustify.
392
393 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
394
395         * decl.c (store_bindings): Only search in the non modified
396         old_bindings for duplicates.
397
398 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
399
400         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
401         TYPE_POLYMORPHIC_P.
402
403         * typeck.c (build_static_cast): Remove unused variable.
404
405 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
406
407         * pt.c: Fix typo in comment.
408
409 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
410
411         * decl2.c (warn_format): Remove definition.
412         (lang_decode_option): Handle -Wformat-nonliteral,
413         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
414
415 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
416
417         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
418         (init_decl_processing): Don't create string_type_node,
419         const_string_type_node, wint_type_node, intmax_type_node,
420         uintmax_type_node, default_function_type, ptrdiff_type_node and
421         unsigned_ptrdiff_type_node.  Adjust position of call to
422         c_common_nodes_and_builtins.
423         (identifier_global_value): New function.
424
425 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
426
427         * call.c (standard_conversion): Reject pointer to member
428         conversions from ambiguous, inaccessible or virtual bases.
429         * typeck.c (build_static_cast): Don't check pointers to members
430         specially.
431
432 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
433
434         * method.c (do_build_copy_constructor): Preserve cv
435         qualifications when accessing source object members.
436         (do_build_assign_ref): Likewise. Remove separate diagnostics for
437         unnamed fields.
438
439 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
440
441         * method.c (do_build_assign_ref): Construct appropriately
442         CV-qualified base reference. Don't allow const casts in base
443         conversion.
444
445 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
446
447         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
448         incomplete return type.
449
450 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
451
452         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
453         * semantics.c (finish_base_specifier): Accept a _TYPE not a
454         _DECL.
455
456 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
457
458         * spew.c (yyerror): Cope if yylval.ttype is NULL.
459
460 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
461
462         * decl.c (grokdeclarator): Diagnose undefined template contexts.
463
464 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
465
466         * decl.c (grokdeclarator): Do type access control on friend
467         class.
468
469 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
470
471         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
472         bison parser ickiness.
473         * pt.c (tsubst_friend_function): Enter namespace scope when
474         tsubsting the function name.
475         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
476
477 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
478
479         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
480         * cvt.c (cp_convert_to_pointer): Add force parameter.
481         Allow conversions via virtual base if forced.
482         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
483         (ocp_convert): Likewise.
484         * search.c (binfo_from_vbase): Return the virtual base's binfo.
485         * typeck.c (get_delta_difference): Adjust handling of virtual
486         bases.
487
488 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
489
490         * tree.c (struct list_hash): Remove.
491         (list_hash_table): Make it be an htab.
492         (struct list_proxy): New type.
493         (list_hash_eq): New function.
494         (list_hash_pieces): Renamed from ...
495         (list_hash): ... this.
496         (list_hash_lookup): Remove.
497         (list_hash_add): Remove.
498         (hash_tree_cons): Use the generic hashtable.
499         (mark_list_hash): Remove.
500         (init_tree): Create the hashtable.
501
502 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
503
504         * method.c (build_mangled_C9x_name): Rename to
505         build_mangled_C99_name.  Change C9X references in comments to
506         refer to C99.
507
508 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
509
510         * parse.y (unary_expr): Move VA_ARG from here ...
511         (primary): ... to here.
512
513 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
514
515         * semantics.c (finish_id_expr): If type is error_mark, return
516         error_mark.
517
518 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
519
520         * pt.c (lookup_template_class): Simplify loop exit constructs.
521         Cope when there is no partial instantiation of a template
522         template member.
523
524 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
525
526         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
527
528 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
529
530         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
531         prefix.
532
533         * pt.c (do_decl_instantiate): Explicitly clone constructors and
534         destructors that haven't already been cloned.
535
536 2000-11-20  Richard Henderson  <rth@redhat.com>
537
538         * parse.y (yyparse_1): Rename the parser entry point.
539
540 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
541
542         * mangle.c (write_name): Use <unscoped-name> for names directly in
543         function scope.
544         (write_unscoped_name): Accept names directly in function scope.
545
546 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
547
548         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
549         * parse.y (extdef): Add EXPORT reduction.
550         * spew.c (yylex): Don't skip export here.
551
552 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
553
554         * decl.c (init_decl_processing): Correct name of pure virtual
555         function under the new ABI.
556         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
557         (throw_bad_typeid): Likewise for bad typeid function.
558
559 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
560
561         * decl.c (grokparms): Don't even function types of `void' type,
562         either.
563         * mangle.c (write_type): Don't crash when confronted with the
564         error_mark_node.
565
566         * decl.c (grokparms): Don't create parameters of `void' type.
567
568 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
569
570         * lex.c (mark_impl_file_chain): Delete.
571         (init_parse): Remove call to ggc_add_string_root.  No need to
572         ggc_strdup a string constant.  Do not add impl_file_chain to GC
573         roots.
574         (handle_pragma_implementation): No need to ggc_strdup main_filename.
575
576 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
577
578         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
579
580 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
581
582         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
583         * decl.c (grokdeclarator): Don't reject void parms here.
584         (require_complete_types_for_parms): Simplify, use
585         complete_type_or_else.
586         (grokparms): Remove bitrot. Remove funcdef parm.
587         Deal with ellipsis parm lists here.
588         * semantics.c (finish_parmlist): Don't append void_list_node
589         here. Set PARMLIST_ELLIPSIS_P.
590
591 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
592
593         * typeck2.c (incomplete_type_error): Reorganise to avoid
594         excessive diagnostics.
595
596 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
597
598         * lex.c (struct impl_files, internal_filename): Constify a char *.
599
600 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
601
602         * mangle.c (write_special_name_constructor): Don't generate
603         assembler junk when confronted with an old-style constructor.
604         (write_special_name_destructor): Likewise.
605         (mangle_decl_string): Do it here instead.
606
607 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
608
609         * call.c (op_error): Make error messages clearer.
610
611 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
612
613         * decl.c (wrapup_globals_for_namespace): Don't mark things
614         TREE_ASM_WRITTEN when they're not.
615
616 2000-11-15  Jason Merrill  <jason@redhat.com>
617
618         * typeck2.c (friendly_abort): Uncount the error before handing
619         off to fancy_abort.
620
621 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
622
623         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
624
625 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
626
627         * class.c (build_vtbl_initializer): Fix typo in comment.
628         * typeck.c (expr_sizeof): Don't crash on errors.
629
630 2000-11-14  Jim Wilson  <wilson@redhat.com>
631
632         * lang-specs.h: Add %2 after %(cc1_options).
633
634 2000-11-14  Richard Henderson  <rth@redhat.com>
635
636         * typeck.c (c_sizeof): Be strict about casting result value
637         back to c_size_type_node.
638         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
639
640 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
641
642         * typeck.c (build_unary_op): Use boolean_increment from
643         c-common.c, moving the relevant code there.
644
645 2000-11-11  Jason Merrill  <jason@redhat.com>
646
647         * typeck.c (mark_addressable): Don't call put_var_into_stack.
648
649         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
650         in inlines.
651
652 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
653
654         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
655         * lex.c (copy_lang_decl): Likewise.
656
657 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
658
659         * dump.c (cp_dump_tree): Don't dump function bodies here.
660
661         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
662         (dump.o): Update dependency list.
663         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
664         (flag_dump_translation_unit): Likewise.
665         (CP_TYPE_QUALS): Adjust definition.
666         (DECL_C_BIT_FIELD): Remove.
667         (SET_DECL_C_BIT_FIELD): Likewise.
668         (CLEAR_DECL_C_BIT_FIELD): Likewise.
669         (add_maybe_template): Likewise.
670         (strip_array_types): Likewise.
671         (dump_node_to_file): Likewise.
672         (cp_dump_tree): New function.
673         * decl.c (init_decl_processing): Set lang_dump_tree.
674         * decl2.c (flag_dump_translation_unit): Remove.
675         * dump.c: Move most of it to ../c-dump.c.
676         (cp_dump_tree): New function.
677         * pt.c (add_maybe_template): Remove.
678         * typeck.c (strip_array_types): Likewise.
679
680 2000-11-07  Eric Christopher  <echristo@redhat.com>
681
682         * decl.c (init_decl_processing): Change definition of
683         __wchar_t to wchar_t.  Remove artificial declaration of
684         wchar_t.
685         * lex.c: Change instances of __wchar_t to wchar_t.
686
687 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
688
689         * lex.c (do_identifier): Don't lookup_name for operators.
690         * parse.y (operator): Save looking_for_typename.
691         (unoperator): Restore it.
692         * spew.c (frob_opname): Use nth_token for lookahead.
693
694 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
695
696         * decl.c (grok_op_properties): Always use coerce_new_type and
697         coerce_delete_type.
698         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
699         exception specification. Tidy up.
700         (coerce_delete_type): Preserve exception specification. Tidy up.
701
702 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
703
704         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
705         (push_binding_level), error.c (cp_tree_printer), pt.c
706         (process_partial_specialization, tsubst_template_arg_vector),
707         search.c (lookup_member): Use memset () instead of bzero ().
708
709 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
710
711         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
712
713 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
714
715         * Make-lang.in (c++.distdir): Remove.
716
717 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
718
719         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
720         declarations from different namespaces to be combined.
721
722 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
723
724         * decl.c: Include tm_p.h.
725
726 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
727
728         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
729
730 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
731
732         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
733         (build_overload_value), repo.c (open_repo_file), xref.c
734         (open_xref_file): Use strchr () and strrchr () instead of index ()
735         and rindex ().
736
737 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
738
739         * call.c (build_over_call): Call fold on the CALL_EXPR.
740
741 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
742
743         * error.c (dump_template_decl): Separate template hearders with
744         space not comma.
745
746 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
747
748         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
749         TS_* flags with corresponding TFF_*.  Adjust prototypes of
750         functions (which used to take a tree_string_flags) to take an int.
751
752         * cp-tree.h (enum tree_string_flags): Remove
753         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
754         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
755         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
756         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
757         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
758         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
759         (type_as_string, decl_as_string, expr_as_string,
760         context_as_string): Adjust prototype.
761
762         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
763         instead of TS_PLAIN.
764
765         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
766         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
767         plain `0'.
768
769 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
770
771         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
772         (linkage_kind): New enumeration.
773         (decl_linkage): New function.
774         * decl2.c (comdat_linkage): Extend comment.
775         * error.c (dump_function_decl): Print the arguments used to
776         instantiate a template, even when not printing the type of the
777         function.
778         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
779         not TREE_PUBLIC, to test for external linkage.
780         * tree.c (decl_linkage): New function.
781
782 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
783
784         * pt.c (instantiate_decl): Always instantiate static data members
785         initialized in-class.
786
787 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
788
789         * Make-lang.in: Move all build rules here from Makefile.in,
790         adapt to new context.  Wrap all rules that change the current
791         directory in parentheses.  Expunge all references to $(P).
792         When one command depends on another and they're run all at
793         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
794         all object-file generation rules.  Delete obsolete variables.
795
796         * Makefile.in: Delete.
797         * config-lang.in: Delete outputs= line.
798
799 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
800
801         * error.c (dump_function_decl): Print no space between
802         `ptr-operator' the `type-specifier' of the return type.
803         (dump_type_prefix): Make sure we put space at the appropriate
804         place.
805
806 2000-10-23  Jason Merrill  <jason@redhat.com>
807
808         * call.c (equal_functions): Also call decls_match for extern "C" fns.
809
810 2000-10-22  Jason Merrill  <jason@redhat.com>
811
812         * call.c (build_conditional_expr): Use ocp_convert to force
813         rvalue conversion.
814
815 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
816
817         * call.c (standard_conversion): Use RVALUE_CONVs for all
818         expressions that satisfy lvalue_p, not just those that satisfy
819         real_lvalue_p.
820
821         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
822
823         * typeck.c (c_sizeof): Return an expression of `size_t' type,
824         not one with TYPE_IS_SIZETYPE set.
825         (dubious_conversion_warnings): Remove special-case code.
826
827 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
828
829         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
830         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
831         (dump_type_prefix): Print vector-of-int as 'int vector'.
832         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
833         * tree.c (walk_tree): Handle VECTOR_TYPE.
834
835         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
836
837 2000-10-21  Jason Merrill  <jason@redhat.com>
838
839         * parse.y (operator): Set got_object from got_scope.
840         Set looking_for_typename.
841         * decl.c (lookup_name_real): Clear val after setting from_obj.
842         Reorganize diagnostic.
843
844 2000-10-20  Jason Merrill  <jason@redhat.com>
845
846         * tree.c (walk_tree): Don't walk into default args.
847
848         * error.c (dump_expr): Use host_integerp.
849
850 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
851
852         * typeck2.c (abstract_virtuals_error): Use "because" instead of
853         "since" in error message.
854
855 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
856
857         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
858
859 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
860
861         * decl.c (revert_static_member_fn): Fixed typo.
862
863 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
864
865         * class.c (subobject_offset_fn): New type.
866         (dfs_record_base_offsets): Remove.
867         (record_base_offsets): Likewise.
868         (dfs_search_base_offsets): Likewise.
869         (record_subobject_offset): New function.
870         (check_subobject_offset): Likewise.
871         (walk_subobject_offsets): Likewise.
872         (record_subobject_offsets): Likewise.
873         (layout_conflict_p): Reimplement.
874         (layout_nonempty_base_or_field): Correct handling of type
875         conflicts during layout.
876         (layout_empty_base): Likewise.
877         (build_base_field): Adjust to handle new representation of empty
878         base offset table.
879         (build_base_fields): Likewise.
880         (layout_virtual_bases): Likewise.
881         (splay_tree_compare_integer_csts): New function.
882         (layout_class_type): Use a splay_tree, rather than a varray, to
883         represent the offsets of empty bases.
884
885         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
886         * decl.c (select_decl): Don't return declarations that are
887         DECL_ANTICIPATED.
888
889 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
890
891         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
892         (fake_std_node): New macro.
893         * decl.c (in_std): Rename to ...
894         (in_fake_std): ... this.
895         (flag_no_builtin): Remove.
896         (flag_no_nonansi_builtin): Likewise.
897         (walk_namespaces_r): Use fake_std_node.
898         (push_namespace): Use std_identifier.
899         (pop_namespace): Use in_fake_std.
900         (lookup_name_real): Use fake_std_node.
901         (init_decl_processing): When -fhonor-std, create the `std'
902         namespace.  Don't create a dummy fake_std_node in that case.
903         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
904         (builtin_function): Put builtins whose names don't begin
905         with `_' in the std namespace.
906         * decl2.c (flag_no_builtin): Remove.
907         (flag_no_nonansi_builtin): Likewise.
908         (set_decl_namespace): Use fake_std_node.
909         (validate_nonmember_using_decl): Likewise.
910         (do_using_directive): Likewise.
911         (handle_class_head): Likewise.
912         * dump.c (dequeue_and_dump): Likewise.
913         * except.c (init_exception_processing): Use std_identifier.
914         * init.c (build_member_call): Use fake_std_node.
915         * rtti.c (init_rtti_processing): Use std_identifier.
916
917 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
918
919         * cp-tree.h (back_end_hook): Remove declaration.
920         * decl2.c (back_end_hook): Remove definition.
921
922         * dump.c (dequeue_and_dump): Dump TREE_USED.
923
924 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
925
926         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
927
928 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
929
930         * decl.c (WINT_TYPE): Define.
931         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
932         c_size_type_node, signed_size_type_node and wint_type_node.
933
934 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
935
936         * decl2.c (warn_missing_format_attribute): New variable.
937         (lang_decode_option): Decode -Wmissing-format-attribute.
938
939 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
940
941         * typeck.c (qualify_type): Remove.
942         (composite_pointer_type): Fix handling of conversions to `cv void*'.
943
944 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
945
946         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
947
948 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
949
950         * Makefile.in (parse.c, parse.h): Create atomically.
951
952 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
953
954         * class.c (current_obstack): Remove.
955         * decl.c (ggc_p): Remove.
956         (start_decl): Don't use decl_tree_cons.
957         (grokdeclarator): Don't use build_decl_list.
958         (start_function): Don't use decl_tree_cons.
959         (finish_function): Don't mess with obstacks.
960         * decl2.c (grok_x_components): Don't use build_decl_list.
961         * lex.c (make_call_declarator): Don't call decl_tree_cons.
962         (implicitly_declare_fn): Don't call build_decl_list.
963         * parse.y (frob_specs): Don't call build_decl_list or
964         decl_tree_cons.
965         (expr_or_declarator_intern): Don't call decl_tree_cons.
966         (primary): Don't call build_decl_list.
967         (fcast_or_absdcl): Likewise.
968         (typed_declspecs): Don't call decl_tree_cons.
969         (reserved_declspecs): Don't call build_decl_list.
970         (declmods): Likewise.
971         (reserved_typespecquals): Likewise.
972         (aggr): Likewise.
973         (new_type_id): Likewise.
974         (cv_qualifiers): Likewise.
975         (after_type_declarator_intern): Likewise.
976         (notype_declarator_intern): Likewise.
977         (absdcl_intern): Likewise.
978         (named_parm): Likewise.
979         * pt.c (most_specialized_class): Likewise.
980         * repo.c (temporary_obstack): Make it a structure, not a pointer.
981         (init_repo): Initialize it.
982         * search.c (current_obstack): Remove.
983         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
984
985 2000-10-09  Richard Henderson  <rth@cygnus.com>
986
987         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
988         (c++ language support bits for libgcc): Remove.
989         (c++.clean): Remove cplib2.txt cleanup.
990         * config-lang.in (headers, lib2funcs): Remove.
991
992         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
993         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
994         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
995         * inc/new.h, inc/typeinfo: Remove files.
996
997 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
998
999         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
1000         defined.
1001         (init_decl_processing): Initialize intmax_type_node and
1002         uintmax_type_node.
1003
1004 2000-10-06  Richard Henderson  <rth@cygnus.com>
1005
1006         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
1007         (original_result_rtx): Remove.
1008         * decl.c (save_function_data): Don't clear x_result_rtx.
1009         (mark_lang_function): Don't mark it either.
1010         * expr.c (fixup_result_decl): Remove.
1011         * semantics.c (genrtl_named_return_value): Frob the return decl
1012         before calling emit_local_var.
1013         (genrtl_finish_function): Don't call fixup_result_decl.
1014         Always emit the jump to return_label.
1015
1016 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
1017
1018         * pt.c (lookup_template_class): Set current access for enum.
1019         (tsubst_enum): Set file & line for enum decl.
1020
1021         * spew.c (yylex): Remove unused variable.
1022
1023 2000-10-05  Richard Henderson  <rth@cygnus.com>
1024
1025         * semantics.c (genrtl_finish_function): Don't init or check
1026         can_reach_end; remove noreturn and return value checks.
1027
1028 2000-10-05  Tom Tromey  <tromey@cygnus.com>
1029
1030         * init.c (build_java_class_ref): Use `build_static_name' with a
1031         suffix, not a prefix, to build the class object's name.
1032
1033 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1034
1035         * cp-tree.h (access_kind): Fix comment typo.
1036         * decl2.c (grokfield): Fix diagnostic typo.
1037         * semantics.c (finish_template_type): Fix comment typo.
1038         (finish_qualified_object_call_expr): Likewise.
1039
1040 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1041
1042         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
1043         tsubsting fails.
1044
1045 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1046
1047         * spew.c (frob_id): New static function.
1048         (frob_opname): Use it.
1049         (yylex): Use it.
1050
1051 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
1052
1053         * decl.c (lang_mark_false_label_stack): Remove.
1054         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
1055
1056 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
1057
1058         * gxxint.texi: Use @email for formatting email addresses.
1059
1060 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
1061
1062         * error.c: Remove direct obstack manipulation.  Replace with
1063         output_buffer-based formatting.  Adjust calls to removed macros.
1064         (obstack_chunk_alloc, obstack_chunk_free): Remove.
1065         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
1066         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
1067
1068 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
1069
1070         * ir.texi: Move to ../c-tree.texi.
1071
1072 2000-09-20  Jason Merrill  <jason@redhat.com>
1073
1074         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
1075
1076 2000-09-21  Andreas Jaeger  <aj@suse.de>
1077
1078         * errfn.c: Move declaration of cp_printer and cp_printers to ...
1079         * cp-tree.h: ... here.
1080
1081         * error.c: Remove declaration of cp_printer.
1082
1083 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
1084
1085         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
1086
1087 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
1088
1089         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
1090         users.
1091
1092 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
1093
1094         * decl.c (start_function): Robustify.
1095
1096 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1097
1098         * cp-tree.h (check_function_format): Accept a `status' parameter.
1099
1100         * call.c, typeck.c: Updates calls to `check_function_format'.
1101
1102 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
1103
1104         * decl2.c (handle_class_head): Always push some scope even
1105         in the error case.
1106
1107 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
1108
1109         * cp-tree.h (struct cp_language_function): Remove
1110         x_scope_stmt_stack and name_declared.
1111         (current_scope_stmt_stack): Remove.
1112         (function_name_declared_p): New macro.
1113         (struct lang_decl_flags): Use c_lang_decl as a base class.
1114         (context): Remove.
1115         (struct lang_decl): Replace saved_tree with context.
1116         (DECL_FRIEND_CONTEXT): Adjust accordingly.
1117         (SET_DECL_FRIEND_CONTEXT): Likewise.
1118         (DECL_VIRTUAL_CONTEXT): Likewise.
1119         (DECL_SAVED_TREE): Remove.
1120         (C_DECLARED_LABEL_FLAG): Likewise.
1121         (cplus_expand_expr_stmt): Don't declare.
1122         (add_decl_stmt): Likewise.
1123         (add_scope_stmt): Likewise.
1124         * decl.c (mark_stmt_tree): Remove.
1125         (case_compare): Likewise.
1126         (finish_case_label): Use c_add_case_label.
1127         (init_decl_processing): Set more language-specific hooks.
1128         (build_enumerator): Fix typo in comment.
1129         (cplus_expand_expr_stmt): Remove.
1130         (mark_lang_function): Use mark_c_language_function.
1131         (lang_mark_tree): Use c_mark_lang_decl.
1132         * decl2.c: Change order of inclusion.
1133         * except.c: Likewise.
1134         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
1135         back on c_expand_expr.
1136         * friend.c: Include expr.h.
1137         * init.c: Change order of inclusion.
1138         * Makefile.in: Update dependencies.
1139         * lex.h (free_lang_decl_chain): Remove.
1140         * optimize.c (maybe_clone_body): Use function_name_declared_p.
1141         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
1142         it doesn't exist.
1143         (instantiate_decl): Use function_name_declared_p.
1144         * semantics.c (lang_expand_expr_stmt): Remove.
1145         (set_current_function_name_declared): Likewise.
1146         (current_function_name_declared): Likewise.
1147         (begin_compound_stmt): Use function_name_declared_p.
1148         (add_decl_stmt): Remove.
1149         (setup_vtbl_ptr): Use function_name_declared_p.
1150         (add_scope_stmt): Remove.
1151         (current_scope_stmt_stack): New function.
1152         (cp_expand_stmt): Don't handle SCOPE_STMTs.
1153         (expand_body): Use function_name_declared_p.
1154         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
1155         * typeck.c: Change order of includes.
1156         (convert_sequence): Remove.
1157
1158 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
1159
1160         * lex.c (reswords): Add _Complex.
1161
1162 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1163
1164         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
1165
1166 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
1167
1168         * init.c (begin_init_stmts): Don't use // comments.
1169
1170 2000-09-12  Jason Merrill  <jason@redhat.com>
1171
1172         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
1173         all non-extern arrays.
1174
1175         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
1176         typenames, too.  Downgrade complaint to pedwarn.
1177         (xref_tag): Warn about surprising behavior of 'friend struct T'.
1178         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
1179         'class This::Inherited'.
1180
1181 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
1182
1183         * decl.c (finish_case_label): Given the LABEL_DECL a
1184         DECL_CONTEXT.
1185
1186 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
1187
1188         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
1189         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
1190         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
1191         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
1192         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
1193         New macros.
1194         (sorry_for_unsupported_tree, print_scope_operator,
1195         print_left_paren, print_right_paren, print_left_bracket,
1196         print_right_bracket, print_whitespace): Likewise.
1197         (aggr_variety): Rename to class_key_or_enum.
1198         (print_type): Rename to print_type_id.
1199         (print_type_specifier_seq, print_simple_type_specifier,
1200         print_elaborated_type_specifier,
1201         print_rest_of_abstract_declarator,
1202         print_parameter_declaration_clause, print_exception_specification,
1203         print_nested_name_specifier, print_template_id,
1204         typedef_original_name,  print_template_argument_list_start,
1205         print_template_argument_list_end): New functions.
1206
1207 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
1208
1209         * ir.texi: Add more documentation.
1210
1211 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
1212
1213         * cp-tree.h (struct saved_scope): Remove x_function_parms.
1214         (current_function_parms): Don't define.
1215         (struct cp_language_function): Remove parms_stored.
1216         (current_function_just_assigned_this): Don't define.
1217         (current_function_parms_stored): Likewise.
1218         (static_ctors): Declare.
1219         (static_dtors): Likewise.
1220         (SF_EXPAND): Don't define.
1221         (expand_start_early_try_stmts): Remove declaration.
1222         (store_parm_decls): Likewise.
1223         * decl.c (static_ctors): Don't declare.
1224         (static_dtors): Likewise.
1225         (struct binding_level): Remove this_block.
1226         (poplevel): Remove dead code.
1227         (set_block): Likewise.
1228         (mark_binding_level): Don't mark this_block.
1229         (mark_saved_scope): Don't mark x_function_parms.
1230         (init_decl_processing): Don't add current_function_parms as a GC
1231         root.
1232         (check_function_type): Change prototype.
1233         (start_function): Remove RTL-generation code.
1234         (expand_start_early_try_stmts): Remove.
1235         (store_parm_decls): Give it internal linkage.  Remove
1236         RTL-generation code.
1237         (finish_function): Remove RTL-generation code.
1238         * decl2.c (static_ctors): Fix formatting.
1239         (static_dtors): Likewise.
1240         * method.c (use_thunk): Don't call store_parm_decls.
1241         (synthesize_method): Likewise.
1242         * optimize.c (maybe_clone_body): Likewise.
1243         * parse.y (fn.def2): Likewise.
1244         (.set_base_init): Likewise.
1245         (nodecls): Likewise.
1246         * pt.c (instantiate_decl): Likewise.
1247         * rtti.c (synthesize_tinfo_fn): Likewise.
1248         * semantics.c (genrtl_try_block): Simplify.
1249         (expand_body): Use genrtl_start_function and
1250         genrtl_finish_function.
1251         (genrtl_start_function): New function.
1252         (genrtl_finish_function): Likewise.
1253
1254 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
1255
1256         * error.c (cp_tree_printer, case 'P'): Append break.
1257
1258 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
1259
1260         * cp-tree.h (frob_opname): Declare.
1261         * parse.y (saved_scopes): New static variable.
1262         (cp_parse_init): Adjust.
1263         (do_id): If lastiddecl is NULL, do do_identifier.
1264         (operator): Save scope information.
1265         (unoperator): New reduction. Restore scope information.
1266         (operator_name): Append unoperator. Call frob_opname.
1267         * spew.c (frob_opname): Define.
1268
1269 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
1270
1271         * decl.c, rtti.c: Include defaults.h if not already included.
1272         Don't define the *_TYPE_SIZE macros.
1273
1274 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
1275
1276         * cp-tree.h (push_switch): Change prototype.
1277         (check_cp_case_value): Remove declaration.
1278         (decl_constant_value): Likewise.
1279         * decl.c (struct cp_switch): Add switch_stmt and cases.
1280         (case_compare): New function.
1281         (push_switch): Set switch_stmt.  Initialize cases.
1282         (pop_switch): Clean up cases.
1283         (define_case_label): Rename to ...
1284         (finish_case_label): ... this.  Do semantic analysis for case
1285         labels here.
1286         (start_function): Correct comment.
1287         * decl2.c (check_cp_case_value): Remove.
1288         * expr.c (do_case): Remove.
1289         * pt.c (tsubst_expr): Adjust call to finish_case_label.
1290         * semantics.c (genrtl_do_poplevel): Remove declaration.
1291         (RECHAIN_STMTS): Remove.
1292         (finish_break_stmt): Use build_break_stmt.
1293         (finish_continue_stmt): Use build_continue_stmt.
1294         (finish_switch_cond): Adjust condition here, rater than in
1295         c_expand_start_case.
1296         (finish_case_label): Remove.
1297         * typeck.c (c_expand_return): Remove.
1298         (c_expand_start_case): Likewise.
1299
1300 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
1301
1302         * ir.texi: Document type nodes.
1303
1304 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
1305
1306         * cp-tree.h (init_cp_semantics): Declare.
1307         (genrtl_try_block): Don't declare.
1308         (genrtl_handler): Likewise.
1309         (genrtl_catch_block): Likewise.
1310         (genrtl_ctor_stmt): Likewise.
1311         (genrtl_subobject): Likewise.
1312         (genrtl_do_poplevel): Likewise.
1313         (genrtl_named_return_value): Likewise.
1314         * lex.c (init_parse): Call init_cp_semantics.
1315         * semantics.c (genrtl_try_block): Give it internal linkage.
1316         (genrtl_handler): Likewise.
1317         (genrtl_catch_block): Likewise.
1318         (genrtl_ctor_stmt): Likewise.
1319         (genrtl_subobject): Likewise.
1320         (genrtl_do_poplevel): Likewise.
1321         (genrtl_named_return_value): Likewise.
1322         (lang_expand_stmt): Rename to ...
1323         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
1324         (init_cp_semantics): Define.
1325
1326         * decl.c (initialize_local_var): Remove RTL-generating code.
1327         * semantics.c (genrtl_try_block): Fix formatting.
1328
1329         Move statement-tree facilities from C++ to C front-end.
1330         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
1331         (void_zero_node): Remove.
1332         (stmt_tree): Likewise.
1333         (scope_chain): Adjust.
1334         (language_function): Rename to cp_language_function.
1335         (cp_function_chain): Adjust.
1336         (current_stmt_tree): Remove.
1337         (last_tree): Likewise.
1338         (last_expr_type): Likewise.
1339         (struct lang_decl): Adjust.
1340         (STMT_IS_FULL_EXPR_P): Remove.
1341         (add_tree): Remove.
1342         (begin_stmt_tree): Likewise.
1343         (finish_stmt_tree): Likewise.
1344         (walk_tree_fn): Likewise.
1345         (walk_stmt_tree): Likewise.
1346         * class.c (finish_struct): Replace use of add_tree with add_stmt.
1347         * decl.c (mark_stmt_tree): Adjust type.
1348         (init_decl_processing): Don't build void_zero_node.
1349         (initialize_local_var): Adjust usage of current_stmt_tree.
1350         (finish_enum): Use add_stmt, not add_tree.
1351         (save_function_data): Adjust use of language_function.
1352         (finish_constructor_body): Use add_stmt, not add_tree.
1353         (finish_destructor_body): Likewise.
1354         (push_cp_function_context): Adjust use of language_function.
1355         (pop_cp_function_context): Likewise.
1356         (mark_lang_function): Likewise.
1357         (mark_cp_function_context): Likewise.
1358         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
1359         (build_vec_init): Likewise.
1360         * semantics.c (SET_LAST_STMT): Remove.
1361         (RECHAIN_STMTS): Don't use it.
1362         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
1363         (current_stmt_tree): Define.
1364         (add_tree): Remove.
1365         (finish_goto_stmt): Use add_stmt, not add_tree.
1366         (finish_expr_stmt): Likewise.
1367         (begin_if_stmt): Likewise.
1368         (finish_then_clause): Likewise.
1369         (begin_while_stmt): Likewise.
1370         (begin_do_stmt): Likewise.
1371         (finish_return_stmt): Likewise.
1372         (begin_for_stmt): Likewise.
1373         (finish_break_stmt): Likewise.
1374         (finish_continue_stmt): Likewise.
1375         (begin_switch_stmt): Likewise.
1376         (finish_case_label): Likewise.
1377         (begin_try_block): Likewise.
1378         (begin_function_try_block): Likewise.
1379         (begin_handler): Likewise.
1380         (begin_catch_block): Likewise.
1381         (begin_compound_stmt): Likewise.
1382         (begin_asm_stmt): Likewise.
1383         (finish_asm_stmt): Likewise.
1384         (finish_label_stmt): Likewise.
1385         (add_decl_stmt): Likewise.
1386         (finish_subobject): Likewise.
1387         (finish_decl_cleanup): Likewise.
1388         (finish_named_return_value): Likewise.
1389         (setup_vtbl_ptr): Likewise.
1390         (add_scope_stmt): Likewise.
1391         (finish_stmt_expr): Likewise.
1392         (prune_unused_decls): Remove.
1393         (begin_stmt_tree): Likewise.
1394         (finish_stmt_tree): Likewise.
1395         (prep_stmt): Adjust use of current_stmt_tree.
1396         (lang_expand_stmt): Likewise.
1397         * tree.c (statement_code_p): Remove.
1398         (cp_statement_code_p): New function.
1399         (walk_stmt_tree): Remove.
1400         (init_tree): Set lang_statement_code_p.
1401
1402 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
1403
1404         Integrated preprocessor.
1405
1406         * Make-lang.in, Makefile.in: Remove all references to input.c,
1407         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
1408         * gxx.gperf, hash.h, input.c: Delete.
1409         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
1410         initialized properly.
1411
1412         * class.c (fixup_pending_inline): Take a tree, not a
1413         struct pending_inline *.  All callers changed.
1414         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
1415         RID_PROTECTED entries in ridpointers[] array here.
1416         * decl.c (duplicate_decls): Do not refer to struct
1417         pending_inline.
1418         (record_builtin_type, init_decl_processing): Use RID_MAX not
1419         CP_RID_MAX.
1420         (grokdeclarator): Use C_IS_RESERVED_WORD.
1421         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
1422         cpplib.
1423         (grok_x_components): Do not inspect pending_inlines chain.
1424
1425         * cp-tree.h (struct lang_identifier): Add rid_code entry.
1426         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
1427         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
1428         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
1429         TIME_IDENTIFIER_FILEINFO): Kill.
1430         Update prototypes.
1431         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
1432         single 32-bit word.
1433         * parse.y: Call do_pending_inlines unconditionally.
1434         reinit_parse_for_method is now snarf_method.  fn.defpen is no
1435         longer necessary.  Remove unnecessary <itype> annotation on
1436         SCOPE.  Do not refer to end_of_file or struct pending_inline.
1437         * semantics.c (begin_inline_definitions): Call
1438         do_pending_inlines unconditionally.
1439
1440         * lex.c: Remove all code now shared with C front end.
1441         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
1442         into the get_identifier table.  Rewrite pragma handling to
1443         work with the registry.  Move code to save tokens for later
1444         processing to spew.c.
1445
1446         * spew.c: Rewrite everything in terms of token streams instead
1447         of text.  Move routines here from lex.c / input.c as
1448         appropriate.  GC-mark trees hanging off the pending inlines
1449         chain.
1450
1451 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
1452
1453         * NEWS: Mention that the named return value extension has been
1454         deprecated.
1455         * cp-tree.h (original_result_rtx): Define.
1456         (TREE_REFERENCE_EXPR): Remove.
1457         (DECL_VPARENT): Likewise.
1458         (pushdecl_nonclass_level): Likewise.
1459         (store_return_init): Likewise.
1460         (reinit_lang_specific): Likewise.
1461         (genrtl_named_return_value): Change prototype.
1462         * decl.c (original_result_rtx): Remove.
1463         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
1464         Do not generate RTL for local variables here.
1465         (store_return_init): Remove.
1466         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
1467         store_return_init.
1468         (finish_named_return_value): Adjust accordingly.  Warn that this
1469         extension is deprecated.
1470         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
1471
1472 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1473
1474         * pt.c (type_unification_real): Replace switch with if.
1475         (unify): Tsubst non-type parms before comparing.
1476
1477 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1478
1479         * error.c (dump_typename): New function, broken out of ...
1480         (dump_type): ... here. Use it.
1481         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
1482
1483 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1484
1485         * init.c (build_offset_ref): Deal with namespace scoped
1486         TEMPLATE_ID_EXPRs.
1487
1488 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1489
1490         * class.c (resolve_address_of_overloaded_function): Add
1491         explanation message.
1492         * decl.c (define_case_label): Reformat explanation.
1493         * decl2.c (finish_static_data_member_decl): Likewise.
1494         (grokfield): Likewise.
1495         * friend.c (do_friend): Likewise.
1496
1497 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
1498
1499         * tree.c (walk_tree): Expose tail recursion.
1500         (walk_stmt_tree): New function.
1501         * cp-tree.h: Prototype walk_stmt_tree.
1502         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
1503         the BLOCKs directly.  If a BLOCK has no variables after
1504         pruning, discard it.
1505         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
1506         restore the line number.
1507
1508 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
1509
1510         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
1511         (pt.o): Remove dependency on HTAB_H.
1512         * cp-tree.h: Include hashtab.h.
1513         (walk_tree): Change prototype.
1514         (walk_tree_without_duplicates): New function.
1515         * decl.c (check_default_argument): Use it.
1516         * optimize.c (remap_decl): Adjust calls to walk_tree.
1517         (copy_body): Likewise.
1518         (expand_calls_inline): Likewise.
1519         (calls_setjmp_p): Use walk_tree_without_duplicates.
1520         * pt.c: Don't include hashtab.h.
1521         (for_each_template_parm): Use walk_tree_without_duplicates.
1522         * semantics.c (finish-stmt_tree): Likewise.
1523         (expand_body): Likewise.
1524         * tree.c (walk_tree): Add additional parameter.
1525         (walk_tree_without_duplicates): New function.
1526         (count_trees): Use it.
1527         (verify_stmt_tree): Adjust call to walk_tree.
1528         (find_tree): Use walk_tree_without_duplicates.
1529         (no_linkage_check): Likewise.
1530         (break_out_target_exprs): Adjust call to walk_tree.
1531         (cp_unsave): Likewise.
1532
1533 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1534
1535         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
1536         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1537         * cp-tree.h (TYPE_BINFO): Adjust comment.
1538         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1539         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1540         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1541         (TYPE_TEMPLATE_INFO): Likewise.
1542         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
1543         * class.c (push_nested_class): Likewise.
1544         * decl.c (lookup_name_real): Likewise.
1545         (grokdeclarator): Likewise.
1546         (grok_op_properties): Likewise.
1547         (xref_tag): Likewise.
1548         (xref_basetypes): Likewise.
1549         * decl2.c (constructor_name_full): Likewise.
1550         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
1551         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1552         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
1553         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1554         (dump_type_suffix): Likewise.
1555         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
1556         instead.
1557         (get_aggr_from_typedef): Likewise.
1558         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
1559         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1560         (write_template_parm): Likewise.
1561         (write_template_template_parm): Check tree code instead of
1562         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1563         * method.c (build_overload_nested_name): Add
1564         BOUND_TEMPLATE_TEMPLATE_PARM.
1565         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
1566         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1567         * pt.c (convert_template_argument): Check tree code instead of
1568         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1569         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
1570         (for_each_template_parm): Adjust comment.
1571         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
1572         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1573         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
1574         template_args_equal to compare template template parameter cases.
1575         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1576         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
1577         instead.
1578         * tree.c (copy_template_template_parm): Decide whether to create
1579         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
1580         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1581         (copy_tree_r): Likewise.
1582         * typeck.c (comptypes): Likewise.  Check tree code instead of
1583         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1584
1585 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
1586
1587         * decl.c (finish_function): Move the code for handling functions
1588         marked with the constructor and destructor attributes inside the
1589         expand_p block.
1590
1591 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1592
1593         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
1594
1595 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1596
1597         * pt.c (lookup_template_class): Remove abort.
1598         * tree.c (get_type_decl): Allow error_mark_node.
1599
1600 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1601
1602         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
1603         TEMPLATE_ID_EXPRs.
1604
1605 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
1606
1607         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
1608         new ABI mangling.
1609
1610 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
1611
1612         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
1613         union tag mismatch error reporting.
1614
1615 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
1616
1617         * call.c (build_scoped_method_call): Check it is not a namespace.
1618
1619 2000-08-30  Jason Merrill  <jason@redhat.com>
1620
1621         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
1622
1623         * tree.c (bot_manip): Check TREE_CONSTANT rather than
1624         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
1625         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
1626
1627         * decl.c (start_function): Always call make_function_rtl.
1628
1629 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
1630
1631         * semantics.c (prune_unused_decls): New function.
1632         (finish_stmt_tree): Call it via walk_tree.
1633
1634 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
1635
1636         * class.c (build_secondary_vtable): Constify a char *.
1637         * decl.c (init_decl_processing): Initialize function_id_node,
1638         pretty_function_id_node, and func_id_node.
1639         * input.c (struct input_source): Constify 'str'.
1640         (feed_input): Constify first argument.
1641         * mangle.c (write_identifier): Constify argument.
1642         * pt.c (mangle_class_name_for_template): Constify argument.
1643
1644 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
1645
1646         * typeck.c (mark_addressable): Remove code that pokes around in
1647         RTL.
1648
1649 2000-08-28  Jason Merrill  <jason@redhat.com>
1650
1651         * lex.c (file_name_nondirectory): Move to toplev.c.
1652
1653         * cp-tree.h (LOCAL_CLASS_P): New macro.
1654         * class.c (finish_struct_1): Use it.
1655
1656 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
1657
1658         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
1659         (write_encoding): Pass another argument to write_name.
1660         (write_name): Add ignore_local_scope parameter.  Fix handling of
1661         local names.
1662         (write_nested_name): Use write_unqualified_name.
1663         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
1664         (write_template_prefix): Use write_unqualified_name.
1665         (write_component): Remove.
1666         (write_local_name): Add parameter.  Use direct local entity to
1667         discriminator calculation.
1668         (write_class_enum_type): Pass another argument to write_name.
1669         (write_template_template_arg): Likewise.
1670         (make_guard_variable): Likewise.
1671
1672 2000-08-27  Jason Merrill  <jason@redhat.com>
1673
1674         * decl.c (pushdecl): Matching decls for local externs are found in
1675         the current level.  Propagate linkage information from previous
1676         declarations.
1677
1678 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1679
1680         * ir.texi (Expressions): Fix typo.
1681
1682 2000-08-25  Greg McGary  <greg@mcgary.org>
1683
1684         * tree.c (init_tree): Use ARRAY_SIZE.
1685
1686 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
1687
1688         * error.c (cp_tree_printer): Rework.
1689
1690 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
1691
1692         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
1693         dyn-string.o.
1694         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
1695         (cp-demangle.o): Remove target.
1696         (dyn-string.o): Likewise.
1697
1698         * decl.c (grokfndecl): Require that `main' return an `int'.
1699         * mangle.c (write_encoding): Don't mangle return types for
1700         conversion functions.
1701
1702 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
1703
1704         * error.c (tree_formatting_info): New data type.
1705         (tree_being_formatted): New macro.
1706         (tree_formatting_flags): Likewise.
1707         (put_whitespace): Likewise.
1708         (print_tree_identifier): Likewise.
1709         (print_identifier): Likewise.
1710         (cp_tree_printer, print_function_argument_list, print_declaration,
1711         print_expression, print_function_declaration,
1712         print_function_parameter, print_type, print_cv_qualifier): New
1713         functions.
1714         (init_error): Initialize lang_printer.
1715
1716 2000-08-24  Jason Merrill  <jason@redhat.com>
1717
1718         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
1719         adjustment necessary.
1720
1721 2000-08-24  Greg McGary  <greg@mcgary.org>
1722
1723         * cp-tree.h (MAIN_NAME_P): Remove macro.
1724
1725 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
1726
1727         * error.c (print_instantiation_context): Don't forget to flush the
1728         buffer.
1729
1730 2000-08-23  Jason Merrill  <jason@redhat.com>
1731
1732         * typeck.c (build_ptrmemfunc): Save the input pmf.
1733
1734         * method.c (process_modifiers): Use same_type_p.
1735
1736 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
1737
1738         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
1739         * mangle.c (write_function_type): Change prototype.
1740         (write_encoding): Don't mangle return types for
1741         constructors or destructors.
1742         (write_type): Adjust call to write_function_type.
1743         * pt.c (instantiate_template): Instantiate alternate entry points
1744         when instantiating the main function.
1745
1746 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
1747
1748         * error.c (cp_print_error_function): Don't use embedded '\n' in
1749         output_printf.
1750
1751 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
1752
1753         * decl.c (init_decl_processing): Remove bogus initialization.
1754         * error.c (lang_print_error_function): Restore here.
1755         (init_error): Initialize print_error_function.
1756
1757 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
1758
1759         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
1760
1761 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
1762
1763         * Makefile.in (error.o): Depends on diagnostic.h
1764
1765         * cp-tree.h (problematic_instantiation_changed,
1766         record_last_problematic_instantiation, current_instantiation,
1767         print_instantiation_context): Declare.
1768         (maybe_print_template_context): Remove.
1769
1770         * decl.c (init_decl_processing): Set print_error_function to NULL.
1771         (lang_print_error_function): Remove, since we're using a new
1772         machinery.
1773
1774         * error.c: #include diagnostic.h
1775         (function_category): New function.
1776         (cp_diagnostic_starter): Likewise.
1777         (cp_diagnostic_finalizer): Likewise.
1778         (cp_print_error_function): Likewise.
1779         (maybe_print_instantiation_context): Likewise.
1780         (print_instantiation_full_context): Likewise.
1781         (print_instantiation_partial_context): Likewise.
1782         (print_instantiation_context): Define.
1783         (init_error): Initialize diagnostic pager and finalizer.
1784
1785         * pt.c (problematic_instantiation_changed): Define.
1786         (record_last_problematic_instantiation): Likewise.
1787         (current_instantiation): Likewise.
1788         (maybe_print_template_context): Remove.
1789         (print_template_context): Likewise.
1790         (current_tinst_level): Make static to reflect Brendan Kehoe's
1791         change of 1995-04-13.
1792         (push_tinst_level): Call print_instantiation_context.
1793
1794 2000-08-21  Nix  <nix@esperi.demon.co.uk>
1795
1796         * lang-specs.h: Do not process -o or run the assembler if
1797         -fsyntax-only.
1798
1799 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
1800
1801         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
1802         variables.
1803         * decl2.c (lang_decode_option): Disable gettext attributes for
1804         -ansi.
1805
1806 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
1807
1808         * lex.c (lang_init_options): Default diagnostic message maximum
1809         length to 80, when line-wrapping.
1810
1811 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
1812
1813         * class.c (build_vtbl_initializer): Clear the entire
1814         vtbl_init_data.  Start keeping track of the functions for which we
1815         have created vcall offsets here.
1816         (dfs_build_vcall_offset_vtbl_entries): Remove.
1817         (build_vcall_offset_vtbl_entries): Reimplement.
1818         (add_vcall_offset_vtbl_entries_r): New function.
1819         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
1820         computing when vcall offsets are necessary.
1821
1822 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1823
1824         * decl.c (member_function_or_else): Use cp_error ... %T.
1825         (grokdeclarator): Likewise.
1826         (start_method): Likewise.
1827         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
1828
1829 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1830
1831         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
1832         TYPE_DECLs.
1833
1834 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1835
1836         * cp-tree.h (PTRMEM_OK_P): New macro.
1837         (itf_ptrmem_ok): New enumeration value.
1838         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
1839         argument. Diagnose implicit pointer to member.
1840         (instantiate_type): Don't diagnose implicit pointer to member
1841         here. Pass itf_ptrmem_ok if ok. Adjust calls to
1842         resolve_address_of_overloaded_function.
1843         * init.c (build_offset_ref): Set PTRMEM_OK_P.
1844         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
1845         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
1846         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
1847         (build_unary_op): Deal with single non-static member in
1848         microsoft-land.
1849
1850 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1851
1852         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
1853
1854 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1855
1856         * cp-tree.h (enum_name_string): Remove prototype.
1857         (report_case_error): Remove prototype.
1858         * cp/typeck2.c (enum_name_string): Remove.
1859         (report_case_error): Remove.
1860         * error.c (dump_expr): Deal with enum values directly.
1861         Correctly negate integer constant.
1862
1863 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1864
1865         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
1866         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
1867         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
1868         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
1869         (__cxa_vec_new): Use __cxa_vec_new2.
1870         (__cxa_vec_delete): Use __cxa_vec_delete2.
1871
1872 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1873
1874         * vec.cc (__cxa_vec_new): Set "C" linkage.
1875         (__cxa_vec_ctor): Likewise.
1876         (__cxa_vec_cctor): Likewise.
1877         (__cxa_vec_dtor): Likewise.
1878         (__cxa_vec_delete): Likewise.
1879         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
1880         (__cxa_vec_ctor): Likewise.
1881         (__cxa_vec_cctor): Likewise.
1882         (__cxa_vec_dtor): Likewise.
1883         (__cxa_vec_delete): Likewise.
1884
1885 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1886
1887         * class.c (instantiate_type): Reinstate local variable
1888         deleted in previous change.
1889
1890         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
1891         itf_no_attributes.
1892
1893 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1894
1895         * cp-tree.h (instantiate_type_flags): New enumeration.
1896         (instantiate_type): Change parameter.
1897         * class.c (instantiate_type): Adjust prototype. Adjust.
1898         * call.c (standard_conversion): Adjust instantiate_type call.
1899         (reference_binding): Likewise.
1900         (build_op_delete_call): Likewise.
1901         (convert_like_real): Likewise.
1902         * cvt.c (cp_convert_to_pointer): Likewise.
1903         (convert_to_reference): Likewise.
1904         * pt.c (convert_nontype_argument): Likewise.
1905         * typeck.c (build_binary_op): Likewise.
1906         (build_ptrmemfunc): Likewise.
1907         (convert_for_assignment): Likewise.
1908
1909 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1910
1911         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
1912         (current_aggr): Define.
1913         * decl.c (grokdeclarator): Make sure a friend class is an
1914         elaborated type specifier.
1915         * parse.y (current_aggr): Remove static definition.
1916         (cp_parse_init): Adjust.
1917         (structsp): Clear and restore current_aggr.
1918         (component_decl_list): Clear current_aggr.
1919
1920         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
1921         aggregate tag on the typename's context.
1922
1923         * pt.c (tsubst_friend_class): Return error_mark_node, if
1924         parms becomes NULL.
1925         (instantiate_class_template): Ignore error_mark_node friend types.
1926
1927 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
1928
1929         * cvt.c (warn_ref_binding): New static function, broken out of ...
1930         (convert_to_reference): ... here. Use it.
1931
1932 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1933
1934         * parse.y (template_arg): Add rule for template qualified with
1935         global scope.
1936
1937 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1938
1939         * decl2.c (add_function): Reorganize.
1940         (arg_assoc): Do not consider function template decls.
1941
1942 2000-08-11  Jason Merrill  <jason@redhat.com>
1943
1944         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
1945         looking inside.
1946
1947 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1948
1949         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
1950         (lookup_nested_tag): Likewise.
1951
1952         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
1953         can be produced.
1954
1955 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1956
1957         * parse.y (named_complex_class_head_sans_basetype): Remove
1958         always true if.
1959
1960 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1961
1962         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
1963         explicit TEMPLATE_ID_EXPR args.
1964         (build_expr_from_tree, case CALL_EXPR): Likewise.
1965
1966 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1967
1968         * decl.c (check_tag_decl): Diagnose typename's which don't
1969         declare anything.
1970
1971 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1972
1973         * init.c (build_aggr_init): Reject bogus array initializers
1974         early.
1975
1976 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
1977
1978         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
1979         runtime.
1980         * cp/tinfo.cc (__dynamic_cast): Likewise.
1981         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
1982
1983 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
1984
1985         * cvt.c (convert_to_pointer_force): Fix error message when
1986         attempting to cast from ambiguous base.
1987
1988 2000-08-08  Jason Merrill  <jason@redhat.com>
1989
1990         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
1991         (tsubst_template_arg_vector): Likewise.
1992
1993         * decl2.c (build_anon_union_vars): Choose the largest field; don't
1994         assume that one will be as large as the union.
1995
1996 2000-08-07  Kazu Hirata  <kazu@hxi.com>
1997
1998         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
1999         * decl.c (pop_labels): Likewise.
2000
2001 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
2002
2003         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
2004         specifications.
2005         (__pointer_to_member_type_info): Likewise.
2006         (__base_class_info): Likewise.
2007         (__class_type_info): Likewise.
2008         (__si_class_type_info): Likewise.
2009         (__vmi_class_type_info): Likewise.
2010         * tinfo.cc (__si_class_type_info::__do_find_public_src):
2011         Changed member names to match specifications.
2012         (__vmi_class_type_info::__do_find_public_src): Likewise.
2013         (__si_class_type_info::__do_dyncast): Likewise.
2014         (__vmi_class_type_info::__do_dyncast): Likewise.
2015         (__si_class_type_info::__do_upcast): Likewise.
2016         (__vmi_class_type_info::__do_upcast): Likewise.
2017         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
2018         (__pbase_type_info::__pointer_catch): Likewise.
2019         (__pointer_type_info::__pointer_catch): Likewise.
2020         (__pointer_to_member_type_info::__pointer_catch): Likewise.
2021
2022 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
2023
2024         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
2025         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
2026         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
2027
2028 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
2029
2030         * cp-tree.h (add_method): Change prototype.
2031         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
2032         Don't double the size of the method vector in the error case.
2033         (handle_using_decl): Adjust call to add_method.
2034         (add_implicitly_declared_members): Likewise.
2035         (clone_function_decl): Likewise.
2036         * decl2.c (check_classfn): Likewise.
2037         * semantics.c (finish_member_declaration): Likewise.
2038
2039 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
2040
2041         * decl.c (flag_isoc94): New variable.
2042
2043 2000-08-02  Jason Merrill  <jason@redhat.com>
2044
2045         * pt.c (do_type_instantiation): Add complain parm; don't complain
2046         if called recursively.
2047         * cp-tree.h, parse.y: Adjust.
2048
2049 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
2050
2051         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
2052         -Wno-strict-prototypes.
2053
2054         * g++spec.c: Adjust type of second argument to
2055         lang_specific_driver, and update code as necessary.
2056
2057         * cp-tree.h: Don't prototype min_precision here.
2058         (my_friendly_assert): Cast expression to void.
2059         * semantics.c (do_poplevel): Initialize scope_stmts.
2060
2061 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
2062
2063         * cp-tree.h (DECL_NEEDED_P): Tweak.
2064
2065 2000-07-28  Jason Merrill  <jason@redhat.com>
2066
2067         * lang-specs.h: Use %i in rule for .ii files.
2068
2069 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
2070
2071         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
2072
2073 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
2074
2075         Allow indirect primary bases.
2076         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
2077         primary_base.
2078         (CLASSTYPE_VFIELD_PARENT): Remove.
2079         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
2080         (BINFO_PRIMARY_BINFO): Remove.
2081         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
2082         (BINFO_VBASE_PRIMARY_P): Likewise.
2083         (BINFO_PRIMARY_BASE_OF): New macro.
2084         (BINFO_INDIRECT_PRIMARY_P): Likewise.
2085         (get_primary_binfo): New function.
2086         * decl.c (lang_mark_tree): Make lang_type::primary_base.
2087         * class.c (vcall_offset_data_s): Rename to ...
2088         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
2089         and add ctor_vtbl_p.
2090         (get_derived_offset): Use get_primary_binfo.
2091         (dfs_mark_primary_bases): Adjust handling of virtual primary
2092         bases.
2093         (mark_primary_bases): Likewise.
2094         (set_primary_base): Take a binfo, not an integer, as a
2095         representation of the primary base.
2096         (indirect_primary_base_p): Remove.
2097         (determine_primary_base): Adjust for indirect primary bases.
2098         (dfs_find_final_overrider): Fix typo in coment.
2099         (update_vtable_entry_for_fn): Use get_primary_binfo.
2100         (layout_nonempty_base_or_field): Tweak.
2101         (build_base_fields): Adjust for new primary base semantics.
2102         (dfs_propagate_binfo_offsets): Remove.
2103         (propagate_binfo_offsets): Rewrite.
2104         (dfs_set_offset_for_shared_vbases): Remove.
2105         (layout_virtual_bases): Don't use it.
2106         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
2107         ABI.
2108         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
2109         CLASSTYPE_VFIELD_PARENT.
2110         (dfs_get_primary_binfo): New function.
2111         (get_primary_binfo): Likewise.
2112         (dump_class_hierarchy_r): Tweak printing of primary bases.
2113         (build_vtbl_initializer): Fix typo in comments.  Use
2114         vtbl_init_data.
2115         (build_vcall_and_vbase_vtbl_entries): Likewise.
2116         (build_vbaes_offset_vtbl_entries): Likewise.
2117         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
2118         BV_VCALL_INDEX to handle indirect primary bases.
2119         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
2120         (build_rtti_vtbl_entries): Likewise.
2121         * search.c (get_shared_vbase_if_not_primary): Tweak.
2122         (find_vbase_instance): Likewise.
2123         (binfo_for_vtable): Simplify.
2124         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
2125         (make_binfo): Make it have 11 entries.
2126
2127 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
2128
2129         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
2130         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
2131         ascertaining primaryness.
2132         (G): Remove template_args.
2133         (decl_is_template_id): New function.
2134         (write_encoding): Use decl_is_template_id.
2135         (write_name): Likewise.  Handle type_decls.  Get main variant of
2136         type decls.
2137         (write_nested_name): Likewise.
2138         (write_prefix): Likewise.
2139         (write_template_prefix): Likewise.
2140         (write_special_name_constructor): Remove defunct production from
2141         comment.
2142         (write_bare_function_type): Remove comment about absent parameter.
2143         (write_template_template_arg): Add missing grammar production to
2144         comment.
2145
2146 2000-07-27  Jason Merrill  <jason@redhat.com>
2147
2148         * decl.c (duplicate_decls): If common_type produces a non-typedef
2149         type for a typedef, just use the old type.
2150
2151 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
2152
2153         * cp-tree.h (function_depth): Declare.
2154         (verify_stmt_tree): Likewise.
2155         (find_tree): Likewise.
2156         * decl.c (function_depth): Give it external linkage.
2157         * optimize.c (optimize_function): Increment and decrement it.
2158         * tree.c (verify_stmt_tree_r): New function.
2159         (verify_stmt_tree): Likewise.
2160         (find_tree_r): Likewise.
2161         (find_tree): Likewise.
2162
2163 2000-07-27  Jason Merrill  <jason@redhat.com>
2164
2165         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
2166         TYPE_PTRMEMFUNC_P.
2167         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
2168
2169 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
2170
2171         * decl.c (start_cleanup_fn): Mark the function as `inline'.
2172         * decl2.c (get_guard): Call cp_finish_decl, not
2173         rest_of_decl_compilation, for local guards.
2174         * lex.c (do_identifier): Remove unused variable.
2175
2176 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
2177
2178         * parse.y:  Add missing ';'.
2179
2180 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
2181
2182         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
2183         of `extern "C++"'.
2184
2185 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2186
2187         Kill strict_prototype. Backwards compatibility only for
2188         non NO_IMPLICIT_EXTERN_C systems.
2189         * cp-tree.h (flag_strict_prototype): Remove.
2190         (strict_prototype): Remove.
2191         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2192         * decl.c (maybe_push_to_top_level): Adjust.
2193         (pop_from_top_level): Adjust.
2194         (decls_match): Only allow sloppy parm matching for ancient
2195         system headers.
2196         (init_decl_processing): Adjust.
2197         (grokdeclarator): Adjust.
2198         * decl2.c (flag_strict_prototype): Remove.
2199         (strict_prototype): Remove.
2200         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2201         (lang_f_options): Remove "strict-prototype".
2202         (unsupported-options): Add "strict-prototype".
2203         * lex.c (do_identifier): Adjust.
2204         (do_scoped_id): Adjust.
2205         * parse.y (empty_parms): Adjust.
2206         * class.c (push_lang_context): Adjust.
2207         (pop_lang_context): Adjust.
2208         * typeck.c (comp_target_parms): Adjust.
2209
2210 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2211
2212         * decl.c (poplevel): Deal with anonymous variables at for scope.
2213         (maybe_inject_for_scope_var): Likewise.
2214
2215 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
2216
2217         * decl.c: Remove all signal handling code, now done in toplev.c.
2218
2219 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
2220
2221         * decl.c (make_rtl_for_nonlocal_decl): Rework.
2222
2223         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
2224         correctly.
2225
2226 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
2227
2228         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
2229         Define my_friendly_assert and my_friendly_abort as macros
2230         which may call friendly_abort.  Prototype friendly abort, not
2231         my_friendly_abort or my_friendly_assert.
2232         * decl.c (signal_catch): Report the signal caught in the error
2233         message.  Call fatal directly.
2234         * typeck2.c (ack, my_friendly_assert): Delete.
2235         (my_friendly_abort): Rename to friendly_abort.  Expect file,
2236         line, and function parameters.  Report the abort code, then
2237         call fancy_abort.  Do not mask an abort if errors have
2238         already occurred.
2239
2240 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2241
2242         * typeck.c (comp_target_parms): Remove obsolete parameter.
2243         (comp_target_types): Adjust.
2244
2245 2000-07-17  Jason Merrill  <jason@redhat.com>
2246
2247         * typeck.c (mark_addressable): Never set TREE_USED.
2248         * call.c (build_call): Don't abort on calls to library functions
2249         that have been declared normally.
2250
2251         * typeck.c (build_binary_op): Fix grammar in warning.
2252
2253         * exception.cc (__eh_free): Fix prototype.
2254
2255         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
2256
2257         * decl.c (pushdecl): Handle seeing an OVERLOAD in
2258         IDENTIFIER_NAMESPACE_VALUE.
2259
2260 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
2261
2262         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
2263         * method.c (use_thunk): Correct handling of vcall offsets.
2264
2265 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
2266
2267         * .cvsignore: parse.h and parse.c have no cp- prefix.
2268
2269 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
2270
2271         * .cvsignore: New file.
2272
2273 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
2274
2275         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
2276
2277 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
2278
2279         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
2280         * parse.c: Remove.
2281         * parse.h: Likewise.
2282
2283 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
2284
2285         * class.c (layout_class_type): Add pointers to virtual bases after
2286         base classes under the old ABI.
2287
2288 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
2289
2290         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
2291         (finish_continue_stmt): Likewise.
2292         (begin_for_stmt): Remove call to note_level_for_for.
2293         (finish_goto_stmt): Change call from build_min_nt
2294         to build_stmt.
2295         (finish_expr_stmt): Likewise.
2296         (begin_if_stmt): Likewise.
2297         (begin_while_stmt): Likewise.
2298         (finish_while_stmt): Likewise.
2299         (finish_return_stmt): Likewise.
2300         (begin_for_stmt): Likewise.
2301         (finish_for_stmt): Likewise.
2302         (finish_break_stmt): Likewise.
2303         (begin_switch_stmt): Likewise.
2304         (finish_case_label): Likewise.
2305         (genrtl_try_block): Likewise.
2306         (begin_try_block): Likewise.
2307         (begin_handler): Likewise.
2308         (begin_compound_stmt): Likewise.
2309         (finish_asm_stmt): Likewise.
2310         (finish_label_stmt): Likewise.
2311         (add_decl_stmt): Likewise.
2312         (finish_subobject): Likewise.
2313         (finish_decl_cleanup): Likewise.
2314         (finish_named_return_value): Likewise.
2315         (setup_vtbl_ptr): Likewise.
2316         (add_scope_stmt): Likewise.
2317         * decl.c (finish_constructor_body): Likewise.
2318         (finish_destructor_body): Likewise.
2319         * optimize.c (copy_body_r): Likewise.
2320         (initialize_inlined_parameters): Likewise.
2321         (declare_return_variable): Likewise.
2322         (expand_call_inline): Likewise.
2323
2324 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
2325
2326         * semantics.c (expand_body): Sync interface information
2327         at the end of function body expansion.
2328
2329 2000-07-09  Jason Merrill  <jason@redhat.com>
2330
2331         * init.c (build_new_1): Bail early if the call to new fails.
2332
2333         * decl.c (compute_array_index_type): Check specifically for
2334         an INTEGER_CST, not just TREE_CONSTANT.
2335
2336         * decl.c (duplicate_decls): Don't call duplicate_decls on
2337         the DECL_TEMPLATE_RESULT.
2338         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
2339         codes.
2340
2341         * error.c (dump_template_bindings): Don't crash if we had an
2342         invalid argument list.
2343
2344         * typeck.c (c_expand_start_case): Do narrowing here.
2345         * semantics.c (finish_switch_cond): Not here.
2346
2347 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
2348
2349         * parse.y (asm_clobbers): Do string concatenation.
2350
2351 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
2352
2353         * decl.c (pushtag): Don't put local classes in template functions
2354         on the local_classes list.
2355
2356 2000-07-04  Scott Snyder  <snyder@fnal.gov>
2357
2358         * decl2.c (get_guard): Add missing return for old ABI local
2359         variable case.
2360
2361 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
2362
2363         * cp-tree.h (char_type_p): New function.
2364         * decl.c (init_decl_processing): Don't initialize
2365         signed_wchar_type_node or unsigned_wchar_type_node.
2366         (complete_array_type): Handle brace-enclosed string-constants.
2367         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
2368         * tree.c (char_type_p): New function.
2369         * typeck2.c (digest_init): Use char_type_p.
2370
2371 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2372
2373         * pt.c (tsubst): Don't layout type, if it's error_mark.
2374
2375 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2376
2377         * pt.c (instantiate_pending_templates): Reset template level.
2378
2379 2000-07-05  Jason Merrill  <jason@redhat.com>
2380
2381         * call.c (joust): Don't complain about `operator char *()' beating
2382         `operator const char *() const'.
2383
2384 2000-07-04  scott snyder  <snyder@fnal.gov>
2385             Jason Merrill  <jason@redhat.com>
2386
2387         * repo.c (repo_get_id): Handle the case where a class with virtual
2388         bases has a null TYPE_BINFO_VTABLE.
2389
2390 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
2391             Jason Merrill  <jason@redhat.com>
2392
2393         * parse.y (member_init): Just pass in the type.
2394         * init.c (expand_member_init): Handle getting a type.
2395
2396 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2397             Jason Merrill  <jason@redhat.com>
2398
2399         * decl.c (finish_function): Warn if a function has no return
2400         statement.
2401         Suggested by Andrew Koenig.
2402         * typeck.c (check_return_expr): Do set current_function_returns_value
2403         if we got an error_mark_node.
2404
2405 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2406
2407         * decl2.c (push_decl_namespace): Push the original namespace.
2408
2409 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2410
2411         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
2412         * semantics.c (begin_class_definition): Clear it.
2413
2414 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
2415
2416         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
2417         (genrtl_expr_stmt): Likewise.
2418         (genrtl_decl_stmt): Likewise.
2419         (genrtl_if_stmt): Likewise.
2420         (genrtl_while_stmt): Likewise.
2421         (genrtl_do_stmt): Likewise.
2422         (genrtl_return_stmt): Likewise.
2423         (genrtl_for_stmt): Likewise.
2424         (genrtl_break_stmt): Likewise.
2425         (genrtl_continue_stmt): Likewise.
2426         (genrtl_scope_stmt): Likewise.
2427         (genrtl_switch_stmt): Likewise.
2428         (genrtl_case_label): Likewise.
2429         (genrtl_begin_compound_stmt): Likewise.
2430         (genrtl_finish_compound_stmt): Likewise.
2431         (genrtl_compound_stmt): Likewise.
2432         (genrtl_asm_stmt): Likewise.
2433
2434         * init.c (begin_init_stmts): Remove call to
2435         genrtl_begin_compound_stmt.
2436         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
2437
2438         * semantics.c (lang_expand_stmt): Changed call to
2439         genrtl_compound_stmt to ignore return value.
2440
2441 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
2442
2443         * mangle.c (canonicalize_for_substitution): Return the canonical
2444         variant of a type.
2445
2446         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
2447         TYPE_DECL.
2448         * typeck.c (commonparms): Remove obstack manipulations.
2449
2450 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
2451
2452         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
2453
2454         * Makefile.in (OBJS): Added ../c-semantics.o.
2455         (OBJDEPS): Likewise.
2456
2457         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
2458         ../c-common.h.
2459         (struct stmt_tree): Added comment.
2460         (current_function_name_declared): Removed.
2461         (stmts_are_full_exprs_p): Likewise.
2462         (genrtl_do_pushlevel): Likewise.
2463         (genrtl_clear_out_block): Likewise.
2464         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
2465         (DECL_ANON_UNION_ELEMS): Likewise.
2466         (emit_local_var): Likewise.
2467         (make_rtl_for_local_static): Likewise.
2468         (do_case): Likewise.
2469         (expand_stmt): Likewise.
2470         (genrtl_decl_cleanup): Likewise.
2471         (c_expand_asm_operands): Likewise.
2472         (c_expand_return): Likewise.
2473         (c_expand_start_case): Likewise.
2474
2475         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
2476         (emit_local_var): Likewise.
2477         (initialize_local_var): Change reference to
2478         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2479         Change reference to stmts_are_full_exprs_p to
2480         current_stmt_tree->stmts_are_full_exprs_p.
2481         (push_cp_function_context): Likewise.
2482
2483         * expect.c (expand_throw): Change reference to
2484         stmts_are_full_exprs_p.
2485
2486         * init.c (build_aggr_init): Change reference to
2487         stmts_are_full_exprs_p.
2488         (build_vec_init): Likewise.
2489
2490         * optimize.c (maybe_clone_body): Change reference to
2491         current_function_name_declared to
2492         cp_function_chain->name_declared.
2493
2494         * pt.c (instantiate_decl): Change reference to
2495         current_function_name_declared to
2496         cp_function_chain->name_declared.
2497
2498         * semantics.c (expand_cond): Moved declaration to c-common.h.
2499         (genrtl_do_pushlevel): Moved to c-semantics.c.
2500         (genrtl_clear_out_block): Likewise.
2501         (genrtl_goto_stmt): Likewise.
2502         (genrtl_expr_stmt): Likewise.
2503         (genrtl_decl_stmt): Likewise.
2504         (gerntl_if_stmt): Likewise.
2505         (genrtl_while_stmt): Likewise.
2506         (genrtl_do_stmt): Likewise.
2507         (genrtl_return_stmt): Likewise.
2508         (genrtl_for_stmt): Likewise.
2509         (genrtl_break_stmt): Likewise.
2510         (genrtl_continue_stmt): Likewise.
2511         (genrtl_scope_stmt): Likewise.
2512         (genrtl_switch_stmt): Likewise.
2513         (genrtl_case_label): Likewise.
2514         (genrtl_begin_compound_stmt): Likewise.
2515         (genrtl_finish_compound_stmt): Likewise.
2516         (genrtl_compound_stmt): Likewise.
2517         (genrtl_asm_stmt): Likewise.
2518         (genrtl_decl_cleanup): Likewise.
2519         (expand_cond): Likewise.
2520         (expand_stmt): Renamed to ...
2521         (lang_expand_stmt): ... this.
2522         (lang_expand_expr_stmt): Initialize.
2523         (set_current_function_name_declared): Likewise.
2524         (stmts_are_full_exprs_p): Likewise.
2525         (current_function_name_declared): Likewise.
2526         (anon_aggr_type_p): Likewise.
2527         (do_poplevel): Change reference to
2528         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2529         Change reference to stmts_are_full_exprs_p to
2530         current_stmt_tree->stmts_are_full_exprs_p.
2531         (add_tree): Likewise.
2532         (finish_expr_stmt): Likewise.
2533         (prep_stmt): Likewise.
2534         (lang_expand_stmt): Likewise.
2535         (begin_compound_stmt): Change reference to
2536         current_function_name_declared to
2537         cp_function_chain->name_declared and call to
2538         current_function_name_declared().
2539         (setup_vtbl_ptr): Likewise.
2540         (genrtl_do_poplevel): Removed.
2541
2542 2000-06-30  Jason Merrill  <jason@redhat.com>
2543
2544         * init.c (init_init_processing): Go back to aligning like
2545         double_type_node for old ABI.
2546         (get_cookie_size): Make cookie larger if we get a type that needs
2547         more alignment.
2548         (build_vec_delete): Call it.
2549
2550         * typeck.c (qualify_type_recursive): New fn.
2551         (composite_pointer_type): Use it.
2552         (build_binary_op): Use composite_pointer_type.
2553
2554 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
2555             Jason Merrill  <jason@redhat.com>
2556
2557         * typeck.c (check_return_expr): Don't complain about returning
2558         NULL from operator new if -fcheck-new.
2559         * cp-tree.h: Declare flag_check_new here.
2560         * init.c: Not here.
2561
2562 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
2563
2564         * mangle.c (find_substitution): Use same_type_p.
2565         (write_encoding): Don't check for substitutions.
2566
2567 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2568
2569         * parse.y (expr_no_comma_rangle): New non-terminal.
2570         (template_parm): Use it for default parameter case.
2571         (template_arg): Use it.
2572         (expr_no_commas): Remove commented out undefined extensions.
2573         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2574         * parse.h, parse.c: Rebuilt.
2575
2576 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
2577
2578         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
2579         (finish_asm_stmt): Do it here, instead.
2580
2581         * cp-tree.h (ridpointers): Don't declare.
2582         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
2583         (record_builtin_java_type): Likewise.
2584         (init_decl_processing): Likewise.
2585         * lex.c: Move inclusion of lex.h.
2586         (ridpointers): Don't define.
2587         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
2588         RID_MAX.
2589         * lex.h (enum rid): Rename to ...
2590         (enum cp_rid): ... this.
2591         (ridpointers): Don't declare.
2592         * parse.y: Move inclusion of lex.h.
2593         * parse.c: Regenerated.
2594         * spew.c: Move inclusion of lex.h.
2595
2596         * cp-tree.h (struct language_function): Remove temp_name_counter.
2597         (temp_name_counter): Remove.
2598         (get_temp_name): Change prototype.
2599         (get_guard): New function.
2600         (get_guard_cond): Likewise.
2601         (set_guard): Likewise.
2602         * cvt.c (build_up_reference): Adjust call to get_temp_name.
2603         * decl.c (expand_static_init): Use get_guard and friends to
2604         implement guard variables.
2605         * decl2.c (get_temp_name): Assume that the variables created are
2606         always static.
2607         (get_sentry): Rename to ...
2608         (get_guard): ... this.  Implement new ABI guard variables.
2609         (get_guard_bits): New function.
2610         (get_guard_cond): Likewise.
2611         (set_guard): Likewise.
2612         (start_static_initialization_or_destruction): Use them.
2613         (do_static_initialization): Replace sentry with guard throughout.
2614         (do_static_destruction): Likewise.
2615         * init.c (create_temporary_var): Add comment.
2616
2617 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
2618
2619         * mangle.c (find_substitution): Use same_type_p.
2620         (write_encoding): Don't check for substitutions.
2621
2622 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2623
2624         * parse.y (expr_no_comma_rangle): New non-terminal.
2625         (template_parm): Use it for default parameter case.
2626         (template_arg): Use it.
2627         (expr_no_commas): Remove commented out undefined extensions.
2628         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2629         * parse.h, parse.c: Rebuilt.
2630
2631 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
2632
2633         * cp-tree.h (flag_const_strings): Remove.
2634         (warn_parentheses): Likewise.
2635         (warn_format): Likewise.
2636         (common_type): Likewise.
2637         (default_conversion): Likewise.
2638         (build_binary_op): Likewise.
2639         (cp_build_binary_op): New macro.
2640         * call.c (build_new_op): Use cp_build_binary_op instead of
2641         build_binary_op.
2642         * class.c (build_vtable_entry_ref): Likewise.
2643         * decl.c (expand_static_init): Likewise.
2644         (compute_array_index_type): Likewise.
2645         (build_enumerator): Likewise.
2646         * decl2.c (delete_sanity): Likewise.
2647         (start_static_initialization_or_destruction): Likewise.
2648         * error.c (dump_type_suffix): Likewise.
2649         * init.c (resolve_offset_ref): Likewise.
2650         (build_new): Likewise.
2651         (build_new_1): Likewise.
2652         (build_vec_delete_1): Likewise.
2653         (build_vec_init): Likewise.
2654         (build_delete): Likewise.
2655         * rtti.c (synthesize_tinfo_fn): Likewise.
2656         (synthesize_tinfo_var): Likewise.
2657         * search.c (expand_upcast_fixups): Likewise.
2658         (fixup_all_virtual_upcast_offsets): Likewise.
2659         * typeck.c (build_array_ref): Likewise.
2660         (get_member_function_from_ptrfunc): Likewise.
2661         (build_binary_op): Add parameter.
2662         (pointer_int_sum): Use cp_build_binary_op.
2663         (pointer_diff): Likewise.
2664         (build_modify_expr): Likewise.
2665         (get_delta_difference): Likewise.
2666         (build_ptrmemfunc): Likewise.
2667
2668 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
2669
2670         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
2671         * decl.c (create_implicit_typedef): Adjust.
2672         * decl2.c (build_artificial_parm): Adjust.
2673         * method.c (implicitly_declare_fn): Adjust.
2674         * pt.c (push_inline_template_parms_recursive): Adjust.
2675         (process_template_parm): Adjust.
2676         (overloaded_template_name): Adjust.
2677         * semantics.c (finish_template_template_parm): Adjust.
2678
2679 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
2680
2681         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
2682         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
2683         where to emit thunks.
2684         (build_vtt): Adjust call to build_vtt_inits.
2685         (build_vtt_inits): Add parameter to indicate whether or not
2686         sub-VTTs for virtual bases should be included.  Adjust handling of
2687         construction vtables.
2688         (get_matching_base): New function.
2689         (dfs_build_vtt_inits): Rename to ...
2690         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
2691         construction vtables.
2692         (dfs_fixup_binfo_vtbls): Likewise.
2693         (build_ctor_vtbl_groups): Build construction vtables for virtual
2694         bases, too.
2695         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
2696         to build construction vtbls.
2697         (dfs_accumulate_vtbl_inits): Adjust handling of
2698         construction vtables.
2699
2700         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
2701         types correctly.
2702
2703 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
2704
2705         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
2706
2707 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2708
2709         * search.c (hides): Remove.
2710         (is_subobject_of_p): Add most_derived parameter. Use
2711         CANONICAL_BINFO.
2712         (lookup_field_queue_p): Adjust.
2713         (lookup_field_r): Adjust.
2714
2715 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2716
2717         * decl2.c (handle_class_head): Bash typedefs to the type's main
2718         decl.
2719
2720 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
2721
2722         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
2723         (begin_global_stmt_expr): ... this.
2724         (genrtl_finish_stmt_expr): Rename to ...
2725         (finish_global_stmt_expr): ... this.
2726         * init.c (begin_init_stmts): Adjust calls.
2727         (finish_init_stmts): Likewise.
2728         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
2729         (begin_global_stmt_expr): ... this.
2730         (genrtl_finish_stmt_expr): Rename to ...
2731         (finish_global_stmt_expr): ... this.
2732
2733 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2734
2735         * search.c (lookup_member): Fix typo in comment.
2736
2737 2000-06-24  Jason Merrill  <jason@redhat.com>
2738
2739         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
2740         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
2741
2742 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2743
2744         * parse.y (complex_direct_notype_declarator): Support global_scope.
2745         * Makefile.in: Adjust conflict count.
2746
2747 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
2748
2749         * parse.y (template_arg): Convert TEMPLATE_DECL
2750         that is a template template paramter to
2751         TEMPLATE_TEMPLATE_PARM here.
2752
2753         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2754         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
2755         (copy_template_template_parm): Adjust prototype.
2756         * decl.c (grokdeclarator): Remove dead code.
2757         * pt.c (process_template_parm): Tidy.
2758         (lookup_template_class): Construct nodes in
2759         copy_template_template_parm.
2760         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
2761         lookup_template_class.  Use TYPE_TI_TEMPLATE.
2762         * tree.c (copy_template_template_parm): Add NEWARGS
2763         parameter.
2764         (mapcar): Adjust call to copy_template_template_parm.
2765         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2766         * method.c (build_template_template_parm_names): Change error
2767         code to avoid compilation warning.
2768
2769         * gxxint.texi: Document template template parameter
2770         name mangling.
2771
2772 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
2773
2774         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
2775         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
2776         (cp-demangle.o): New rule.
2777         (dyn-string.o): Likewise.
2778         * inc/cxxabi.h (__cxa_demangle): New declaration.
2779
2780 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
2781
2782         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
2783         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
2784         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
2785         a tree, not an int.
2786         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
2787         (make_thunk): Change prototype.
2788         (emit_thunk): Rename to use_thunk.
2789         (mangle_thunk): Change prototype.
2790         * class.c (get_derived_offset): Simplify.
2791         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
2792         BV_GENERATE_THUNK_WITH_VTABLE_P.
2793         (build_primary_vtable): Simplify.
2794         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
2795         (dfs_find_base): Remove.
2796         (update_vtable_entry_for_fn): Correct bug in finding the base
2797         where a virtual function was first declared.  Figure out whether
2798         or not to emit a vcall-thunk with the vtables in which it appears.
2799         Correct logic for deciding whether to use an ordinary thunk, or a
2800         vcall thunk.
2801         (finish_struct_1): Remove unnecssary code.
2802         (build_vtbl_initializer): Use ssize_int for the running counter of
2803         negative indices.
2804         (build_vtbl_initializer): Only use vcall thunks where necessary.
2805         Mark thunks as needing to be emitted with their vtables, or not.
2806         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
2807         indices.  Use size_binop.
2808         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
2809         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
2810         size_binop.
2811         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
2812         (build_vtable_entry): Mark thunks as needing to be emitted with
2813         their vtables, or not.
2814         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
2815         * decl2.c (mark_vtable_entries): Use use_thunk instead of
2816         emit_thunk.
2817         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
2818         information.
2819         * error.c (dump_expr): Use BV_FN.
2820         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
2821         not an int.
2822         * method.c (make_thunk): Likewise.
2823         (emit_thunk): Rename to use_thunk.  Allow callers to decide
2824         whether or not to actually emit the thunk.  Adjust for changes in
2825         representation of vcall offsets.
2826         * search.c (dfs_get_pure_virtuals): Use BV_FN.
2827         * semantics.c (emit_associated_thunks): New function.
2828         (expand_body): Use it.
2829         * ir.texi: Adjust decriptions of thunks.
2830
2831 2000-06-22  Jason Merrill  <jason@redhat.com>
2832
2833         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
2834         (tsubst_friend_function): Copy it here.
2835
2836         * decl.c (grok_op_properties): Fix typo.
2837
2838         * decl2.c (delete_sanity): Clarify warning, avoid failure on
2839         deleting void*.
2840
2841         * pt.c (check_explicit_specialization): Clarify error.
2842
2843         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
2844         an old OVERLOAD when we're declaring a non-function.
2845         (pushdecl, destroy_local_var): Check for error_mark_node.
2846         (warn_extern_redeclared_static): Also bail early if
2847         we're a CONST_DECL.
2848         (push_overloaded_decl): Ignore an old error_mark_node.
2849
2850 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
2851
2852         * call.c (build_x_va_arg): Check if in a template decl.
2853         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
2854
2855 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2856
2857         * class.c (push_lang_context): TYPE_NAME gets you to the Java
2858         types DECLs.
2859         * decl.c (check_goto): Computed gotos assumed OK.
2860
2861 2000-06-20  Jason Merrill  <jason@redhat.com>
2862
2863         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
2864         for which we don't need to look for instantiations.
2865
2866 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
2867
2868         * parse.y (program): Always call finish_translation_unit.
2869         * parse.c, parse.h: Rebuilt.
2870
2871 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
2872
2873         * method.c: Don't include hard-reg-set.h.
2874
2875 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2876
2877         * rtti.c (get_base_offset): Cope when vbase field is in a base.
2878
2879 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2880
2881         * call.c (build_conditional_expr): Use VOID_TYPE_P.
2882         * cvt.c (cp_convert_to_pointer): Likewise.
2883         (convert_to_void): Likewise.
2884         * error.c (dump_expr): Likewise.
2885         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
2886         * init.c (build_delete): Likewise.
2887         * method.c (emit_thunk): Likewise.
2888         * optmize.c (declare_return_variable): Likewise.
2889         * rtti.c (get_tinfo_decl_dynamic): Likewise.
2890         (get_typeid): Likewise.
2891         (build_dynamic_cast_1): Likewise.
2892         * typeck.c (composite_pointer_type): Likewise.
2893         (common_type): Likewise.
2894         (build_indirect_ref): Likewise.
2895         (build_binary_op): Likewise.
2896         (build_x_compound_expr): Likewise.
2897         (check_return_expr): Likewise.
2898         * typeck2.c (add_exception_specifier): Likewise.
2899
2900         * mangle.c (write_method_parms): Use direct comparison for end
2901         of parmlist.
2902
2903 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
2904
2905         * cp-tree.h (genrtl_try_block): Declare function.
2906         (genrtl_handler): Likewise.
2907         (genrtl_catch_block): Likewise.
2908         (genrtl_ctor_stmt): Likewise.
2909         (genrtl_subobject): Likewise.
2910         (genrtl_decl_cleanup): Likewise.
2911         (genrtl_do_poplevel): Likewise.
2912         (genrtl_do_pushlevel): Likewise.
2913         (genrtl_clear_out_block): Likewise.
2914         (genrtl_goto_stmt): Likewise.
2915         (genrtl_expr_stmt): Likewise.
2916         (genrtl_decl_stmt): Likewise.
2917         (genrtl_if_stmt): Likewise.
2918         (genrtl_while_stmt): Likewise.
2919         (genrtl_do_stmt): Likewise.
2920         (genrtl_return_stmt): Likewise.
2921         (genrtl_for_stmt): Likewise.
2922         (genrtl_break_stmt): Likewise.
2923         (genrtl_continue_stmt): Likewise.
2924         (genrtl_scope_stmt): Likewise.
2925         (genrtl_switch_stmt): Likewise.
2926         (genrtl_case_label): Likewise.
2927         (genrtl_begin_compound_stmt): Likewise.
2928         (genrtl_finish_compound_stmt): Likewise.
2929         (genrtl_compound_stmt): Likewise.
2930         (genrtl_asm_stmt): Likewise.
2931         (genrtl_named_return_value): Likewise.
2932         (genrtl_begin_stmt_expr): Likewise.
2933         (genrtl_finish_stmt_expr): Likewise.
2934         (finish_for_stmt): Removed first argument.
2935         (finish_switch_stmt): Likewise.
2936
2937         * semantics.c (genrtl_try_block): Define function.
2938         (genrtl_handler): Likewise.
2939         (genrtl_catch_block): Likewise.
2940         (genrtl_ctor_stmt): Likewise.
2941         (genrtl_subobject): Likewise.
2942         (genrtl_decl_cleanup): Likewise.
2943         (genrtl_do_poplevel): Likewise.
2944         (genrtl_do_pushlevel): Likewise.
2945         (genrtl_clear_out_block): Likewise.
2946         (genrtl_goto_stmt): Likewise.
2947         (genrtl_expr_stmt): Likewise.
2948         (genrtl_decl_stmt): Likewise.
2949         (genrtl_if_stmt): Likewise.
2950         (genrtl_while_stmt): Likewise.
2951         (genrtl_do_stmt): Likewise.
2952         (genrtl_return_stmt): Likewise.
2953         (genrtl_for_stmt): Likewise.
2954         (genrtl_break_stmt): Likewise.
2955         (genrtl_continue_stmt): Likewise.
2956         (genrtl_scope_stmt): Likewise.
2957         (genrtl_switch_stmt): Likewise.
2958         (genrtl_case_label): Likewise.
2959         (genrtl_begin_compound_stmt): Likewise.
2960         (genrtl_finish_compound_stmt): Likewise.
2961         (genrtl_compound_stmt): Likewise.
2962         (genrtl_asm_stmt): Likewise.
2963         (genrtl_named_return_value): Likewise.
2964         (genrtl_begin_stmt_expr): Likewise.
2965         (genrtl_finish_stmt_expr): Likewise.
2966         (finish_for_stmt): Removed first argument and generate rtl
2967         specific code.
2968         (finish_switch_stmt): Likewise.
2969         (do_poplevel): Removed generate rtl specific code.
2970         (do_pushlevel): Likewise.
2971         (add_tree): Likewise.
2972         (finish_goto_stmt): Likewise.
2973         (finish_expr_stmt): Likewise.
2974         (begin_if_stmt): Likewise.
2975         (finish_if_stmt_cond): Likewise.
2976         (finish_then_clause): Likewise.
2977         (begin_else_clause): Likewise.
2978         (finish_else_clause): Likewise.
2979         (finish_if_stmt): Likewise.
2980         (clear_out_block): Likewise.
2981         (begin_while_stmt): Likewise.
2982         (finish_while_stmt_cond): Likewise.
2983         (finish_while_stmt): Likewise.
2984         (begin_do_stmt): Likewise.
2985         (finish_do_body): Likewise.
2986         (finish_do_stmt): Likewise.
2987         (finish_return_stmt): Likewise.
2988         (begin_for_stmt): Likewise.
2989         (finish_for_init_stmt): Likewise.
2990         (finish_for_cond): Likewise.
2991         (finish_for_expr): Likewise.
2992         (finish_break_stmt): Likewise.
2993         (finish_continue_stmt): Likewise.
2994         (begin_switch_stmt): Likewise.
2995         (finish_switch_cond): Likewise.
2996         (finish_case_label): Likewise.
2997         (begin_try_block): Likewise.
2998         (begin_function_try_block): Likewise.
2999         (finish_try_block): Likewise.
3000         (finish_cleanup_try_block): Likewise.
3001         (finish_cleanup): Likewise.
3002         (finish_function_try_block): Likewise.
3003         (finish_handler_sequence): Likewise.
3004         (finish_function_handler_sequence): Likewise.
3005         (begin_handler): Likewise.
3006         (finish_handler_parms): Likewise.
3007         (begin_catch_block): Likewise.
3008         (finish_handler): Likewise.
3009         (begin_compound_stmt): Likewise.
3010         (finish_compound_stmt): Likewise.
3011         (finish_asm_stmt): Likewise.
3012         (finish_label_stmt): Likewise.
3013         (finish_label_decl): Likewise.
3014         (finish_subobject): Likewise.
3015         (finish_decl_cleanup): Likewise.
3016         (finish_named_return_value): Likewise.
3017         (begin_stmt_expr): Likewise.
3018         (finish_stmt_expr): Likewise.
3019
3020         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
3021         to call genrtl_expr_stmt when appropriate.
3022
3023         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
3024         begin_compound_expr to call genrtl_begin_stmt_expr and
3025         genrtl_begin_compound_expr when appropriate.
3026         (finish_init_stmts): Changed calls to finish_compound_expr and
3027         finish_stmt_expr to call genrtl_finish_compound_expr and
3028         genrtl_finish_stmt_expr when appropriate.
3029         (expand_default_init): Changed call to finish_expr_stmt to call
3030         genrtl_expr_stmt when appropriate.
3031         (build_vec_init): Likewise.
3032
3033         * parse.y (simple_stmt): Removed first argument from call to
3034         finish_for_stmt. Removed first argument from call to
3035         finish_switch_stmt.
3036
3037         * parse.c: Regenerated.
3038
3039         * pt.c (tsubst_expr): Removed first argument from call to
3040         finish_for_stmt. Removed first argument from call to
3041         finish_switch_stmt.
3042
3043 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
3044
3045         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
3046         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
3047
3048         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
3049         (cplus_tree_code_length[]): Likewise.
3050         (cplus_tree_code_name[]): Likewise.
3051         (init_parse): Added call to add_c_tree_codes. Changed
3052         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
3053
3054 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
3055
3056         * cp-tree.h (finish_mem_initializers): Declare.
3057         (count_trees): Likewise.
3058         * parse.y (base_init): Use finish_mem_initializers.
3059         * semantics.c (finish_mem_initializers): New function.
3060
3061         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
3062         the number of trees.
3063         (n_trees): Remove.
3064         (count_trees): Don't use it.
3065
3066 2000-06-15  Jason Merrill  <jason@redhat.com>
3067
3068         * tree.c (count_trees): New debugging function.
3069
3070         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
3071         * init.c (build_member_call): Pull out the name of a DECL.
3072
3073         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
3074         * semantics.c (expand_body): Push to TV_INTEGRATION here.
3075         * optimize.c (optimize_function): Not here.
3076         * pt.c (instantiate_decl): Push to TV_PARSE.
3077
3078 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
3079
3080         * cp-tree.h (struct language_function): Remove x_base_init_list
3081         and x_member_init_list.
3082         (current_base_init_list): Remove.
3083         (current_member_init_list): Likewise.
3084         (setup_vtbl_ptr): Change prototype.
3085         (emit_base_init): Likewise.
3086         (expand_member_init): Likewise.
3087         (reinit_parse_for_function): Remove.
3088         * decl.c (save_function_data): Don't clear x_base_init_list and
3089         x_member_init_list.
3090         (mark_language_function): Don't mark them.
3091         * init.c (perform_member_init): Tweak comment.
3092         (sort_member_init): Take the list of initializers as an argument.
3093         (sort_base_init): Likewise.
3094         (emit_base_init): Likewise.
3095         (expand_member_init): Return the initializer.  Don't use global
3096         variables.
3097         * lex.c (reinit_parse_for_function): Remove.
3098         * method.c (build_template_parm_names): Correct substitution.
3099         (do_build_copy_constructor): Don't use current_member_init_list
3100         and current_base_init_list.
3101         (synthesize_method): Likewise.
3102         * parse.y (base_init): Split mem-initializers into
3103         base-initializers and field-initializers.
3104         (member_init_list): Build up the list here.
3105         (member_init): Return the initializer.
3106         (fn.depfn): Don't use reinit_parse_for_function.
3107         * parse.c: Regenerated.
3108         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
3109         ERROR_MARK.
3110         (tsubst_expr): Don't use current_member_init_list
3111         and current_base_init_list.
3112         (tsubst_expr_values): Rename to ...
3113         (tsubst_initializer_list): ... this.  Use convert_from_reference.
3114         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
3115         and current_base_init_list.
3116         (begin_function_definition): Don't call reinit_parse_for_function.
3117
3118         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
3119
3120         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
3121         correctly.
3122
3123         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
3124
3125 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
3126
3127         * cp-tree.h (IF_COND): Move to c-common.h.
3128         (THEN_CLAUSE): Likewise.
3129         (ELSE_CLAUSE): Likewise.
3130         (WHILE_COND): Likewise.
3131         (WHILE_BODY): Likewise.
3132         (DO_COND): Likewise.
3133         (DO_BODY): Likewise.
3134         (RETURN_EXPR): Likewise.
3135         (EXPR_STMT_EXPR): Likewise.
3136         (FOR_INIT_STMT): Likewise.
3137         (FOR_COND): Likewise.
3138         (FOR_EXPR): Likewise.
3139         (FOR_BODY): Likewise.
3140         (SWITCH_COND): Likewise.
3141         (SWITCH_BODY): Likewise.
3142         (CASE_LOW): Likewise.
3143         (CASE_HIGH): Likewise.
3144         (GOTO_DESTINATION): Likewise.
3145         (COMPOUND_BODY): Likewise.
3146         (ASM_CV_QUAL): Likewise.
3147         (ASM_STRING): Likewise.
3148         (ASM_OUTPUTS): Likewise.
3149         (ASM_INPUTS): Likewise.
3150         (ASM_CLOBBERS): Likewise.
3151         (DECL_STMT_DECL): Likewise.
3152         (STMT_EXPR_STMT): Likewise.
3153         (LABEL_STMT_LABEL): Likewise.
3154         (SCOPE_BEGIN_P): Likewise.
3155         (SCOPE_END_P): Likewise.
3156         (SCOPE_STMT_BLOCK): Likewise.
3157         (SCOPE_NULLIFIED_P): Likewise.
3158         (SCOPE_NO_CLEANUPS_P): Likewise.
3159         (SCOPE_PARTIAL_P): Likewise.
3160         (ASM_VOLATILE_P): Likewise.
3161         (STMT_LINENO): Likewise.
3162         (STMT_LINENO_FOR_FN_P): Likewise.
3163
3164         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
3165         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
3166         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
3167         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
3168         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
3169
3170         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
3171
3172         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
3173         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
3174
3175         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
3176         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
3177         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
3178
3179 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
3180
3181         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
3182         * class.c (dfs_find_final_overrider): Set it appropriately.
3183         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
3184         avoid unneeded secondary vptrs.
3185
3186 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
3187
3188         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
3189         (check_bitfield_decl, check_field_decl): Likewise.
3190         (build_vtbl_or_vbase_field, build_base_field): Likewise.
3191         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
3192         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
3193         (xfer_tag, finish_enum): Likewise.
3194         * decl2.c (finish_builtin_type): Likewise.
3195         * init.c (init_init_processing): Likewise.
3196         * pt.c (instantiate_class_template): Likewise.
3197         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
3198         * cp-tree.h (struct lang_type): Add user_align member.
3199         (CLASSTYPE_USER_ALIGN): Define.
3200
3201 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3202
3203         * Make-lang.in (c++.install-common): Install g++-cross in
3204         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
3205         $(target_alias)-g++ and $(target_alias)-c++.
3206
3207 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
3208
3209         * class.c (vcall_offset_data_s): Add last_init and fns.
3210         (overrides): Rename to same_signature_p.
3211         (dfs_find_final_overrider): Adjust accordingly.
3212         (mark_overriders): Likewise.
3213         (warn_hidden): Likewise.
3214         (build_vtbl_initializer): Reorganize machinery for building things
3215         at negative offsets.
3216         (build_vcall_and_vbase_vtbl_entries): Likewise.
3217         (build_vbase_offset_vtbl_entries): Likewise.
3218         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
3219         offset entries.  Do not create two entries for functions with the
3220         same signature.
3221         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
3222         (build_rtti_vtbl_entries): Reorganize machinery for building things
3223         at negative offsets.
3224
3225         * optimize.c (expand_call_inline): Don't recurse into the code
3226         used to initialize the parameters more than once.
3227
3228 2000-06-11  Mark Mitchell <mark@codesourcery.com>
3229
3230         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
3231         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
3232         (find_substitution): Only use the `Sa' substitution for
3233         std::allocator, not instantiations of it.
3234         (write_template_prefix): Move comment.  Only use a TREE_LIST to
3235         represent substitutions for a member template.
3236         (write_array_type): Mangle array dimensions correctly.
3237         * optimize.c (maybe_clone_body): Copy more information from the
3238         cloned function.
3239         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
3240         on the regenerated declaration.
3241
3242 2000-06-11  Chip Salzenberg  <chip@valinux.com>
3243             Mark Mitchell <mark@codesourcery.com>
3244
3245         * class.c (build_vtable): Clarify comment.
3246         (build_ctor_vtbl_group): Pass the most derived type to
3247         build_vtable.
3248
3249 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3250
3251         * decl2.c (compare_options): Don't needlessly cast away const-ness.
3252
3253 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
3254
3255         * decl.c (add_binding): Handle duplicate declarations of external
3256         variables.
3257
3258 2000-06-09  Chip Salzenberg  <chip@valinux.com>
3259             Mark Mitchell <mark@codesourcery.com>
3260
3261         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
3262         argument.
3263         (write_signed_number): New macro.
3264         (write_unsigned_number): Likewise.
3265         (write_source_name): Use them.
3266         (write_number): Handle signed and unsigned values.
3267         (write_integer_cst): Use tree_int_cst_sgn, and use
3268         write_unsigned_number or write_signed_number as appropriate.
3269         (write_discriminator): Use write_unsigned_number or
3270         write_signed_number as appropriate.
3271         (write_template_arg_literal): Likewise.
3272         (write_array_type): Use tree_low_cst.
3273         (write_template_parm):  Use write_unsigned_number or
3274         write_signed_number as appropriate.
3275         (write_substitution): Adjust call to write_number.
3276         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
3277         (write_expression): Handle non-type template arguments of
3278         reference type correctly.
3279         (mangle_thunk): Use write_signed_number.
3280
3281 2000-06-09  Chip Salzenberg  <chip@valinux.com>
3282
3283         * mangle.c (find_substition): Don't mangle objects with typename
3284         substitutions (e.g. "cin" as "Si").
3285
3286 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
3287
3288         * call.c (add_candidate): Use ggc_alloc_cleared.
3289         * decl.c (lookup_label): Likewise.
3290         * lex.c (retrofit_lang_decl): Likewise.
3291
3292 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
3293
3294         * semantics.c (expand_body): Push to TV_EXPAND.
3295         * optimize.c (optimize_function): Push to TV_INTEGRATION.
3296         * decl.c (start_function): Always call announce_function.
3297
3298         * tinfo2.cc: Just declare abort.
3299
3300 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
3301
3302         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
3303         whenever @ is a symbolic name.
3304
3305 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
3306
3307         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
3308
3309 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
3310
3311         * decl.c (pushdecl): Look up functions by DECL_NAME, not
3312         DECL_ASSEMBLER_NAME.
3313
3314 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
3315
3316         * decl2.c (c_language): Define.
3317
3318 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3319
3320         * lex.c (lang_init_options): Tweak.
3321
3322         * decl2.c: Remove #inclusion of diagnostic.h
3323         (lang_decode_option): Move diagnostic formatting options to
3324         toplevel.
3325
3326         * lang-options.h: Remove documentation for diagnostic options.
3327
3328         * Makefile.in (lex.o): Depends upon diagnostic.h
3329
3330 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
3331
3332         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
3333         the same DECL_RESULT, it's not a redefinition.
3334         * pt.c (tsubst_decl): Remove code to handle illegal
3335         specializations.
3336
3337 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
3338
3339         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
3340
3341 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
3342
3343         * search.c (maybe_suppress_debug_info): Don't check
3344         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
3345
3346         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
3347         here if extern_p.
3348
3349         Remember instantiation context in deferred instantiations.
3350         * cp-tree.h (struct tinst_level): Remove.
3351         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
3352         * pt.c (current_tinst_level): Now a tree.
3353         (print_template_context, push_tinst_level, pop_tinst_level,
3354         tinst_for_decl): Adjust.
3355         (reopen_tinst_level): New fn.
3356         (init_pt): Register current_tinst_level as a root.
3357         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
3358         of the pending templates list.
3359         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
3360         * lex.c (extract_interface_info): Adjust.
3361         * decl2.c (warn_if_unknown_interface): Adjust.
3362
3363 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
3364
3365         * class.c (indirect_primary_base_p): New function.
3366         (determine_primary_base): Use it.
3367
3368 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3369
3370         Update new-abi dynamic cast algorithm.
3371         * tinfo.cc (__class_type_info::__dyncast_result): Add
3372         whole_details. Adjust constructor.
3373         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
3374         Avoid unnecessary searching.
3375         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
3376
3377 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3378
3379         * decl.c (init_decl_processing): Don't call record_component_aliases.
3380         * tree.c (build_cplus_array_type_1): Likewise.
3381
3382 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
3383
3384         * ir.texi: Correct typo.
3385         * mangle.c (write_expression): Handle non-type template arguments
3386         with reference type.
3387         * method.c (build_overload_value): Likewise.
3388         * pt.c (convert_nontype_argument): Explicitly represent conversion
3389         to a reference with an ADDR_EXPR.
3390         (unify): Always unify arguments in left-to-right order.
3391
3392 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
3393             Mark Mitchell  <mark@codesourcery.com>
3394
3395         * Make-lang.in (CXX_SRCS): Add mangle.c.
3396         * Makefile.in (CXX_OBJS): Add mangle.o.
3397         (mangle.o): New rule.
3398
3399         * class.c (local_classes): New variable.
3400         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
3401         (get_vtt_name): Use mangle_vtt_name for new ABI.
3402         (init_class_processing): Initialize local_classes.
3403         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
3404         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
3405         (std_identifier): New macro.
3406         (DECL_VOLATILE_MEMFUNC_P): New macro.
3407         (DECL_NAMESPACE_STD_P): Likewise.
3408         (local_classes): Declare.
3409         (get_mostly_instantiated_function_type): Declare.
3410         (init_mangle): Declare.
3411         (mangle_decl): Likewise.
3412         (mangle_type_string): Likewise.
3413         (mangle_type): Likewise.
3414         (mangle_typeinfo_for_type): Likewise.
3415         (mangle_typeinfo_string_for_type): Likewise.
3416         (mangle_vtbl_for_type): Likewise.
3417         (mangle_vtt_for_type): Likewise.
3418         (mangle_ctor_vtbl_for_type): Likewise.
3419         (mangle_thunk): Likewise.
3420         (mangle_conv_op_name_for_type): Likewise.
3421         (mangle_guard_variable): Likewise.
3422         * decl.c (pushtag): Keep track of local classes.
3423         (initialize_predefined_identifiers): Initialize std_identifier.
3424         (init_decl_processing): Use std_identifier.
3425         (start_decl): Don't treat instantiations as specializations.
3426         (grokdeclarator): Likewise.
3427         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
3428         name for fully-instantiated templates.
3429         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
3430         destructors with the new ABI.
3431         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
3432         (grokfield): Use mangle_type for new ABI.
3433         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
3434         (get_sentry): Use mangle_guard_variable for new ABI.
3435         (start_static_initialization_or_destruction): Likewise.
3436         * expr.c (extract_aggr_init): Remove.
3437         (extract_scalar_init): Likewise.
3438         (extract_init): Remove #if 0'd code.
3439         * mangle.c: New function.
3440         * method.c (build_mangled_name): Assert not flag_new_abi.
3441         (build_static_name): Likewise.
3442         (build_decl_overload_real): Likewise.
3443         (build_typename_overload): Likewise.
3444         (build_overload_with_type): Likewise.
3445         (build_overload_name): Likewise.
3446         (get_ctor_vtbl_name): Likewise.
3447         (start_squangling): Likewise.
3448         (get_id_2): Likewise.
3449         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
3450         (init_method): Call init_mangle for new ABI.
3451         (make_thunk): Call mangle_thunk for new ABI.
3452         * operators.def: Correct new ABI manglings for the `%' operator.
3453         Add `::' operator.
3454         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
3455         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
3456         (lookup_template_class): Call mangle_decl for new ABI.
3457         (get_mostly_instantiated_function_type): New function.
3458         (set_mangled_name_for_template_decl): Use it.
3459         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
3460         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
3461         conversion op names.
3462         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
3463         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
3464         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
3465         mangle_typeinfo_string_for_type.
3466
3467 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
3468
3469         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
3470         (INNERMOST_TEMPLATE_ARGS): New macro.
3471         (innermost_args): Remove.
3472         (get_innermost_template_args): New function.
3473         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
3474         * error.c (dump_function_decl): Be caution when using
3475         most_general_template.
3476         * method.c (build_template_parm_names):  Use
3477         INNERMOST_TEMPLATE_ARGS.
3478         * pt.c (add_to_template_args): Tidy comment
3479         (get_innermost_template_args): New function.
3480         (check_explicit_specialization): Clear DECL_INITIAL for a new
3481         specialization.
3482         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
3483         Tidy.
3484         (push_template_decl): Always register specializations of the most
3485         general template.
3486         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
3487         (coerce_template_parms): Likewise.
3488         (lookup_template_class): Likewise.
3489         (innermost_args): Remove.
3490         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
3491         (tsubst_decl): Handle tricky specializations.  Use
3492         get_innermost_template_args.
3493         (instantiate_template): Simplify handling of partial
3494         instantiations.
3495         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
3496         (most_general_template): Reimplement, in a more straightforward
3497         manner.
3498         (regenerate_decl_from_template): Tweak formatting.  Use
3499         TMPL_ARGS_DEPTH for clarity.
3500         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
3501
3502         * dump.c (dequeue_and_dump): Dump information about thunks.
3503
3504 2000-06-01  Richard Henderson  <rth@cygnus.com>
3505
3506         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
3507
3508 2000-06-01  Richard Henderson  <rth@cygnus.com>
3509
3510         * decl2.c (unsupported_options): Fix typo, make const.
3511         (lang_decode_option): Fix bsearch argument order.
3512
3513 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
3514
3515         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
3516         on FIELD_DECLs.
3517
3518 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3519
3520         * cp-tree.h (c_get_alias_set): Deleted.
3521         * Makefile.in (decl.o): Include ../expr.h.
3522         * decl.c (expr.h): Include.
3523         (init_decl_processing): Call record_component_aliases for arrays.
3524         (grokdeclarator): Likewise.
3525         Set TREE_ADDRESSABLE for fields that aren't bitfields.
3526         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
3527
3528 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
3529
3530         Remove guiding declaration support.
3531         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
3532         (flag_guiding_decls): Remove.
3533         * call.c (build_user_type_conversion_1): Remove support for
3534         guiding decls.
3535         (build_new_function_call): Likewise.
3536         (build_new_op): Likewise.
3537         (build_new_method_call): Likewise.
3538         * decl.c (start_function): Likewise.
3539         * friend.c (is_friend): Likewise.
3540         (do_friend): Likewise.
3541         * decl2.c ((flag_dump_translation_unit): Make it const.
3542         (flag_guiding_decls): Remove.
3543         (unsupported_options): New variable
3544         (compare_options): New function.
3545         (lang_decode_option): Use them.
3546
3547         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
3548
3549         * method.c (mangle_expression): Adjust test for legal expression
3550         operators.
3551
3552         * pt.c (instantiate_decl): Save and restore the local
3553         specializations list.
3554
3555 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
3556
3557         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
3558
3559 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
3560
3561         * call.c (add_template_candidate_real): Handle member template
3562         constructors for classes with virtual bases.
3563         (build_user_type_conversion_1): Use in_charge_arg_for_name.
3564         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
3565
3566         * ir.texi: Update thunk documentation.
3567
3568         * call.c (joust): Fix handling of overloaded builtin operators.
3569
3570 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
3571
3572         * cp-tree.h (DECL_ANTICIPATED): New macro.
3573         Document new use of DECL_LANG_FLAG_7.
3574         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
3575         in the user namespace.
3576         * lex.c (do_identifier): If the identifier's declaration has
3577         DECL_ANTICIPATED on, it has not yet been declared.  But do not
3578         replace it with an ordinary implicit declaration.
3579
3580         * tinfo2.cc: Include stdlib.h.
3581
3582 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
3583
3584         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
3585         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
3586         CLASSTYPE_ALIGN.
3587
3588 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3589
3590         * decl2.c (lang_decode_option): Use skip_leading_substring instead
3591         of plain strncmp.
3592
3593 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
3594
3595         * operators.def (<?): Duplicated, should have been...
3596         (>?): this.  Fixed.
3597
3598 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
3599             Mark Mitchell  <mark@codesourcery.com>
3600
3601         * cp-tree.h (ansi_opname): Make it a macro.
3602         (ansi_assopname): Likewise.
3603         (struct lang_decl_flags): Add assignment_operator_p.
3604         (struct lang_decl): Add operator_code.
3605         (DECL_VTT_PARM): Adjust.
3606         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
3607         overloaded operator.
3608         (SET_OVERLOADED_OPERATOR_CODE): New macro.
3609         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
3610         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
3611         (opname_tab): Remove.
3612         (assignop_tab): Likewise.
3613         (operator_name_info_t): New type.
3614         (operator_name_info): New variable.
3615         (assignment_operator_name_info): Likewise.
3616         (build_cp_library_fn): Remove declaration.
3617         (push_cp_library_fn): Likewise.
3618         (operator_name_string): Likewise.
3619         (build_decl_overload): Likewise.
3620         * call.c (print_z_candidates): Simplify.
3621         (build_object_call): Adjust usage of ansi_opname.  Use
3622         DECL_OVERLOADED_OPERATOR_P.
3623         (op_error): Adjust operator name lookup.
3624         (build_conditional_expr): Adjust usage of ansi_opname.
3625         (build_new_op): Likewise.
3626         (build_op_delete_call): Likewise.
3627         (build_over_call): Likewise.
3628         (joust): Use DECL_OVERLOADED_OPERATOR_P.
3629         * decl.c (duplicate_decls): Copy operator_code.
3630         (init_decl_processing): Adjust parameters to push_cp_library_fn.
3631         (builtin_function): Adjust parameters to build_library_fn_1.
3632         (build_library_fn_1): Accept an overloaded operator code.
3633         (build_library_fn): Pass ERROR_MARK.
3634         (build_cp_library_fn): Accept an overloaded operator code.
3635         (push_cp_library_fn): Likewise.
3636         (grokfndecl): Tweak.
3637         (grokdeclarator): Simplify code to compute names of overloaded
3638         operators.  Adjust use of ansi_opname.
3639         (ambi_op_p): Work on tree_codes, not identifiers.
3640         (unary_op_p): Likewise.
3641         (grok_op_properties): Likewise.
3642         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
3643         (lang_mark_tree): Don't try to mark the operator_code.
3644         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
3645         * error.c (dump_decl): Remove special handling for operator
3646         names.
3647         (dump_function_name): Likewise.
3648         (dump_expr): Adjust name lookup of operators.
3649         (op_to_string): Simplify.
3650         (assop_to_string): Likewise.
3651         * init.c (build_new_1): Adjust use of ansi_opname.
3652         * lex.c (opname_tab): Remove.
3653         (assignop_tab): Likewise.
3654         (ansi_opname): Likewise.
3655         (ansi_assopname): Likewise.
3656         (operator_name_string): Likewise.
3657         (reinit_lang_specific): Likewise.
3658         (operator_name_info): New variable.
3659         (assignment_operator_name_info): Likewise.
3660         (init_operators): New function.
3661         (init_parse): Use it.
3662         (do_identifier): Adjust use of ansi_opname.
3663         * method.c (mangle_expression): Don't use ansi_opname for
3664         mangling.
3665         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
3666         (build_decl_overload): Remove.
3667         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
3668         (do_build_assign_ref): Adjust use of ansi_opname.
3669         (synthesize_method): Likewise.
3670         (implicitly_declare_fn): Likewise.
3671         * operators.def: New file.
3672         * parse.y (operator): Adjust use of ansi_opname.
3673         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
3674         (set_mangled_name_for_template_decl): Don't play games with
3675         current_namespace.
3676         (special_function_p): Adjust use of ansi_opname.
3677         * typeck.c (check_return_expr): Likewise.
3678         * Make-lang.in (cc1plus): Depend on operators.def.
3679         * Makefile.in (lex.o): Likewise.
3680         (decl.o): Likewise.
3681
3682 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
3683
3684         * Make-lang.in (cplib2.ready): Eradicate.
3685
3686 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3687
3688         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
3689         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
3690         (built_min, cp_tree_equal): Likewise.
3691
3692 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
3693
3694         * class.c (layout_nonempty_base_or_field): Replace
3695         `record_layout_info' with `record_layout_info_s'.
3696
3697 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
3698
3699         Fix goto checking.
3700         * cp-tree.h (struct language_function): x_named_labels is now
3701         a struct named_label_list*.
3702         * decl.c (struct named_label_use_list): Renamed from...
3703         (struct named_label_list): ...this.  New struct.
3704         (push_binding_level): Don't set eh_region.
3705         (note_level_for_eh): New fn.
3706         (pop_label): Take label and old value directly.
3707         (pop_labels): Adjust for new named_labels format.
3708         (lookup_label): Likewise.
3709         (poplevel): Note characteristics of a binding level containing a
3710         named label.  Mess with named label lists earlier.
3711         (mark_named_label_lists): New fn.
3712         (mark_lang_function): Call it.
3713         (use_label): New fn, split out from...
3714         (make_label_decl): ...here.  Don't call it.
3715         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
3716         check_previous_gotos): New fns, split out from...
3717         (define_label): ...here.
3718         (check_switch_goto): New fn.
3719         (define_case_label): Call it.
3720         (check_goto): New fn.
3721         * semantics.c (finish_goto_stmt): Call it and use_label.
3722         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
3723         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
3724
3725 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
3726
3727         * class.c (build_vtable_entry_ref): Correct usage of
3728         get_vtbl_decl_for_binfo.
3729
3730         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
3731         * method.c (implicitly_declare_fn): Not here.
3732
3733 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
3734
3735         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
3736         (CPTI_PTMD_DESC_TYPE): ... here.
3737         (ptmd_desc_type_node): Rename to ...
3738         (ptm_desc_type_node): ... here.
3739         * decl.c: Likewise.
3740         * rtti.c (ptmd_initializer): Rename to ...
3741         (ptm_initializer): ... here.
3742         (sythesize_tinfo_var): Adjust. Deal with pointer to member
3743         function.
3744         (create_tinfo_types): Adjust.
3745
3746 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
3747
3748         Finish implementation of VTTs.
3749         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
3750         CPTI_VTT_PARM_IDENTIFIER.
3751         (vtt_parm_identifier): New macro.
3752         (vtt_parm_type): Likewise.
3753         (BINFO_SUBVTT_INDEX): Likewise.
3754         (BINFO_VPTR_INDEX): Likewise.
3755         (struct lang_decl): Add vtt_parm.
3756         (DECL_VTT_PARM): New macro.
3757         (DECL_USE_VTT_PARM): Likewise.
3758         (DECL_NEEDS_VTT_PARM_P): Likewise.
3759         (get_vtt_name): Declare.
3760         (build_artifical_parm): Likewise.
3761         (fixup_all_virtual_upcast_offsets): Likewise.
3762         (expand_indirect_vtbls_init): Remove.
3763         * call.c (build_new_method_call): Pass the vtt to subobject
3764         constructors and destructors.
3765         * class.c (get_vtt_name): Give it external linkage.
3766         (build_clone): Handle the magic VTT parameters for clones.
3767         (clone_function_decl): Fix typo in comment.
3768         (build_vtt): Keep track of the indices in the VTTs where various
3769         entities are stored.
3770         (build_vtt_inits): Likewise.
3771         (dfs_build_vtt_inits): Likewise.
3772         (build_ctor_vtbl_group): Tweak type of construction vtables.
3773         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
3774         primary bases, when building construction vtables.
3775         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
3776         (initialize_predefined_identifiers): Add vtt_parm_identifier.
3777         (init_decl_processing): Initialize vtt_parm_type.
3778         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
3779         (lang_mark_tree): Make vtt_parm.
3780         * decl2.c (build_artificial_parm): New function.
3781         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
3782         (grokclassfn): Use build_artificial_parm.
3783         * init.c (initialize_vtbl_ptrs): Call
3784         fixup_all_virtual_upcast_offsets directly.
3785         (perform_member_init): Use the complete subobject destructor for
3786         member cleanups.
3787         (build_vtbl_address): New function.
3788         (expand_virtual_init): Handle VTTs.
3789         * optimize (maybe_clone_body): Likewise.
3790         * search.c (fixup_all_virtual_upcast_offsets): Give it external
3791         linkage.
3792         (expand_indirect_vtbls_init): Remove.
3793         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
3794         * tree.c (make_binfo): Make them bigger.
3795
3796 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
3797
3798         * inc/cxxabi.h (__pbase_type_info): Define, based on
3799         __pointer_type_info.
3800         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
3801         (__pointer_to_member_type_info): Likewise.
3802         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
3803         (__pointer_to_member_type_info::__is_pointer_p): Remove.
3804         (__pointer_type_info::__do_catch): Rename to ...
3805         (__pbase_type_info::__do_catch): ... here. Adjust.
3806         (__pbase_type_info::__pointer_catch): Implement.
3807         (__pointer_type_info::__pointer_catch): Adjust.
3808         (__pointer_to_member_type_info::__pointer_catch): Adjust.
3809
3810 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
3811
3812         * tinfo.h (__user_type_info::contained_virtual_p): New
3813         predicate.
3814         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
3815         shaped heirarchy.
3816         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
3817         diamond shaped heirarchy. Add early out for mixed diamond and
3818         duplicate shaped heirarchy.
3819
3820 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
3821
3822         * cp-tree.h (build_delete): Change prototype.
3823         (build_vec_delete): Likewise.
3824         * call.c (build_scoped_method_call): Use special_function_kind
3825         values to indicate the kind of destruction to be done.
3826         (build_method_call): Likewise.
3827         * decl.c (finish_destructor_body): Likewise.
3828         (maybe_build_cleanup_1): Likewise.  Rename to ...
3829         (maybe_build_cleanup): ... this.
3830         * decl2.c (delete_sanity): Use special_function_kind
3831         values to indicate the kind of destruction to be done.
3832         (build_cleanup): Likewise.
3833         * init.c (perform_member_init): Likewise.
3834         (build_vec_delete_1): Likewise.
3835         (build_dtor_call): Simplify.
3836         (build_delete): Use special_function_kind
3837         values to indicate the kind of destruction to be done.
3838         (build_vbase_delete): Likewise.
3839         (build_vec_delete): Likewise.
3840
3841         * init.c (sort_member_init): Fix typo in error message generation
3842         code.
3843
3844 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
3845
3846         * semantics.c (begin_class_definition): make the packed
3847         attribute be sensitive to the "-fpack-struct" command line flag
3848
3849 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
3850
3851         Update new-abi upcast algorithm.
3852         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
3853         prototype and meaning of return value.
3854         (__si_class_type_info::__do_upcast): Likewise.
3855         (__vmi_class_type_info::__do_upcast): Likewise.
3856         * tinfo.cc (__class_type_info::__upcast_result): Replace
3857         whole2dst with part2dst. Adjust ctor.
3858         (__class_type_info::__do_upcast): Adjust call of worker function.
3859         (__class_type_info::__do_upcast): Adjust.
3860         (__si_class_type_info::__do_upcast): Adjust. Use parent's
3861         __do_upcast.
3862         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
3863         virtual base in diamond heirarchy bug.
3864
3865 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
3866
3867         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
3868         and bitfield to tinfo_fn_p.
3869         (DECL_TINFO_FN_P): Adjust.
3870         (SET_DECL_TINFO_FN_P): Likewise.
3871         (DECL_MUTABLE_P): Likewise.
3872         (DECL_C_BIT_FIELD): Likewise.
3873         (SET_DECL_C_BIT_FIELD): Likewise.
3874         (CLEAR_DECL_C_BIT_FIELD): Likewise.
3875         (DECL_UNINLINABLE): Likewise.
3876         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
3877         (handle_using_decl): Remove assertion.
3878         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
3879         to build FIELD_DECLs.
3880         (build_base_field): Likewise.
3881         (layout_class_type): Likewise.
3882         * decl.c (init_decl_processing): Likewise.
3883         (build_ptrmemfunc_type): Likewise.
3884         (grokdeclarator): Likewise.
3885         * decl2.c (grok_x_components): Likewise.
3886         * except.c (call_eh_info): Likewise.
3887         * init.c (init_init_processing): Likewise.
3888         * rtti.c (expand_class_desc): Likewise.
3889         (create_pseudo_type_info): Likewise.
3890         (get_vmi_pseudo_type_info): Likewise.
3891         (create_tinfo_types): Likewise.
3892         * ptree.c (print_lang_decl): Adjust.
3893         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
3894         before checking DECL_MUTABLE_P.
3895
3896         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
3897         parameters for template functions.
3898         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
3899         destructors as well as constructors.
3900
3901 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
3902
3903         * class.c (build_ctor_vtbl_group): Set inits.
3904         * optimize.c (maybe_clone_body): Set DECL_INLINE and
3905         DECL_THIS_INLINE appropriately for clones.
3906
3907         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
3908         (DECL_CONV_FN_P): Simplify.
3909         (DECL_OPERATOR): Remove.
3910         (language_to_string): Declare.
3911         * decl.c (duplicate_decls): Fix typo in comment.
3912         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
3913         (grok_op_properties): Use DECL_CONV_FN_P instead of
3914         IDENTIFIER_TYPENAME_P.
3915         * dump.c (dequeue_and_dump): Dump the language linkage of
3916         declarations.
3917         * error.c (language_to_string): Give it external linkage.
3918         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
3919         (implicitly_declare_fn): Set DECL_LANGUAGE.
3920         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
3921         IDENTIFIER_TYPENAME_P.
3922         (tsubst_decl): Likewise.
3923         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
3924         * semantics.c (finish_member_declaration): Don't mark members of
3925         classes declared in an extern "C" region as extern "C".
3926
3927 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3928
3929         * decl2.c (qualified_lookup_using_namespace): Look through
3930         namespace aliases.
3931
3932         * decl.c (push_using_decl): Return the old decl on namespace level.
3933
3934 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
3935
3936         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
3937         (VTT_NAME_PREFIX): New macro.
3938         (CTOR_VTBL_NAME_PREFIX): Likewise.
3939         (get_ctor_vtbl_name): New function.
3940         * class.c (get_vtable_name): Simplify.
3941         (get_vtt_name): New function.
3942         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
3943         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
3944         when a virtual base becomes primary.
3945         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
3946         VTTs.
3947         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
3948         additional parameters.
3949         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
3950         (initialize_array): New function.
3951         (build_vtt): Likewise.
3952         (build_vtt_inits): Likewise.
3953         (dfs_build_vtt_inits): Likewise.
3954         (dfs_fixup_binfo_vtbls): Likewise.
3955         (build_ctor_vtbl_group): Likewise.
3956         (initialize_vtable): Use initialize_array.
3957         (accumulate_vtbl_inits): Reimplement to handle construction
3958         vtables.
3959         (dfs_accumulate_vtbl_inits): Likewise.
3960         (bulid_vtbl_initializer): Adjust parameter name.
3961         * method.c (build_typename_overload): Remove #if 0'd code.
3962         (get_ctor_vtbl_name): New function.
3963         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
3964         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
3965
3966         * cp-tree.h (struct lang_type): Remove search_slot.
3967         (CLASSTYPE_SEARCH_SLOT): Remove.
3968         (emit_base_init): Change prototype.
3969         (initialize_vtbl_ptrs): Likewise.
3970         (expand_indirect_vtbls_init): Likewise.
3971         (clear_search_slots): Remove.
3972         * decl.c (lang_mark_tree): Don't mark search_slot.
3973         * init.c (initialize_vtbl_ptrs): Simplify.
3974         (emit_base_init): Likewise.
3975         * search.c (struct vbase_info): Document decl_ptr.
3976         (convert_pointer_to_single_level): Remove.
3977         (dfs_find_vbases): Remove.
3978         (dfs_init_base_pointers): Simplify.
3979         (dfs_clear_vbase_slots): Remove.
3980         (dfs_vtable_path_unmark): New function.
3981         (init_vbase_pointers): Simplify.
3982         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
3983         (expand_indirect_vtbls_init): Simplify.  Don't call
3984         mark_all_temps_used.
3985         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
3986         initialize_vtbl_ptrs.
3987
3988 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
3989
3990         * except.c: Add static prototypes.
3991
3992 2000-05-20  H.J. Lu  <hjl@gnu.org>
3993
3994         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
3995
3996 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
3997
3998         Don't create a separate copy of virtual bases for the
3999         CLASSTYPE_VBASECLASSES list.
4000         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
4001         (BINFO_FOR_VBASE): Remove.
4002         (CANONICAL_BINFO): Adjust.
4003         (binfo_for_vbase): New function.
4004         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
4005         instead of BINFO_FOR_VBASE.
4006         (build_vbase_pointer): Likewise.
4007         (build_secondary_vtable): Likewise.
4008         (dfs_mark_primary_bases): Likewise.
4009         (mark_primary_bases): Likewise.
4010         (layout_nonempty_base_or_field): Likewise.
4011         (dfs_set_offset_for_shared_vbases): Likewise.
4012         (dfs_set_offset_for_unshared_vbases): Likewise.
4013         (layout_virtual_bases): Likewise.  Adjust for changes to the
4014         CLASSTYPE_VBASECLASSES list.
4015         (dump_class_hierarchy_r): Use binfo_for_vbase
4016         instead of BINFO_FOR_VBASE.
4017         (dump_class_hierarchy): Likewise.
4018         (finish_vtbls): Likewise.
4019         (build_vtbl_initializer): Adjust for changes to the
4020         CLASSTYPE_VBASECLASSES list.
4021         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
4022         * decl.c (finish_destructor_body): Adjust for changes to the
4023         CLASSTYPE_VBASECLASSES list.
4024         * init.c (sort_base_init): Use binfo_for_vbase.
4025         (construct_virtual_bases): Adjust for changes to the
4026         CLASSTYPE_VBASECLASSES list.
4027         (expand_member_init): Use binfo_for_vbase.
4028         (build_vbase_delete):  Adjust for changes to the
4029         CLASSTYPE_VBASECLASSES list.
4030         * method.c (do_build_copy_constructor): Likewise.
4031         * rtti.c (get_base_offset): Use binfo_for_vbase.
4032         (expand_class_desc): Remove #if 0'd code.
4033         * search.c (struct vbase_info): Remove vbase_types.
4034         (get_base_distance):  Use binfo_for_vbase.
4035         (lookup_field_queue_p): Use CANONICAL_BINFO.
4036         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
4037         (get_pure_virtuals): Adjust for changes to the
4038         CLASSTYPE_VBASECLASSES list.
4039         (dfs_find_vbases): Use binfo_for_vbase.
4040         (dfs_init_vbase_pointers): Likewise.
4041         (init_vbase_pointers): Don't initialize vi.vbase_types.
4042         (virtual_context): Use binfo_for_vbase.
4043         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
4044         CLASSTYPE_VBASECLASSES list.
4045         (expand_indirect_vtbls_init): Simplify.
4046         (dfs_get_vbase_types): Don't replicate virtual bases.
4047         (find_vbase_instance): Use binfo_for_vbase.
4048         (binfo_for_vbase): New function.
4049         * typeck.c (get_delta_difference): Use binfo_for_vbase.
4050
4051 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
4052
4053         * decl2.c (finish_anon_union): Generalize error messages to handle
4054         anonymous structures.
4055         * init.c (perform_member_init): Remove `name' parameter.
4056         (build_field_list): New function.
4057         (sort_member_init): Handle anonymous union initialization order
4058         correctly.  Check for multiple initializations of the same union.
4059         (emit_base_init): Don't look up fields by name here.
4060         (expand_member_init): Record the result of name lookup for future
4061         reference.
4062         * typeck.c (build_component_ref): Fix formatting.
4063
4064 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
4065
4066         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
4067         * typeck.c (build_x_compound_expr): Replace warn_unused with
4068         warn_unused_value.
4069
4070         * decl2.c (lang_decode_option): Update -Wall unused flags by
4071         calling set_Wunused.
4072
4073 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
4074
4075         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
4076         * init.c (dfs_vtable_path_unmark): Remove.
4077         * search.c (marked_new_vtable_p): Likewise.
4078         (unmarked_new_vtable_p): Likewise.
4079         (dfs_search_slot_nonempty_p): Likewise.
4080         (dfs_mark): Likewise.
4081         (dfs_vtable_path_unmark): Likewise.
4082         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
4083         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
4084         (dfs_init_vbase_pointers): Remove special-case new ABI code.
4085         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
4086         (init_vbase_pointers): Simplify.
4087         (expand_indirect_vtbls_init): Likewise.
4088
4089         * class.c (copy_virtuals): New function.
4090         (build_primary_table): Use it.
4091         (build_secondary_vtable): Likewise.
4092         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
4093         indicate that no vcall offset is required.
4094         (add_virtual_function): Likewise.
4095         (modify_all_vtables): Likewise.
4096         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
4097         (dfs_accumulate_vtbl_inits): Likewise.
4098         (build_vtbl_initializer): Make changes to handle construction
4099         vtables.
4100         (dfs_build_vcall_offset_vtbl_entries): Likewise.
4101         (build_rtti_vtbl_entries): Likewise.
4102         (build_vtable_entries): Handle a NULL vcall_index.
4103
4104 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4105
4106         * decl2.c (lang_decode_option): Fix thinko.
4107
4108 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
4109
4110         * except.c (check_handlers): New fn.
4111         * cp-tree.h: Declare it.
4112         * semantics.c (finish_handler_sequence): Call it.
4113         (finish_function_handler_sequence): Likewise.
4114         (finish_handler_parms): Set TREE_TYPE on the handler.
4115         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
4116         * search.c (get_base_distance_recursive): If protect>1, ignore
4117         special access.
4118         (get_base_distance): Don't reduce watch_access.
4119
4120 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
4121
4122         * lex.c: #include diagnostic.h.
4123         (lang_init_options): Set default prefixing rules.
4124
4125         * lang-options.h: Add -fdiagnostics-show-location=.
4126
4127         * decl2.c: #include diagnostic.h.
4128         (lang_decode_option): Handle -fdiagnostics-show-location=.
4129
4130 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
4131
4132         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
4133         * vec.cc: Revert my 2000-05-07 change.
4134
4135 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
4136
4137         * class.c (check_field_decls): Complain about non-static data
4138         members with same name as class in class with constructor.
4139
4140 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
4141
4142         * decl.c (grokdeclarator): Allow non-static data members with
4143         same name as class.
4144
4145 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
4146
4147         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
4148         and pending_inline.filename.  Update prototypes.
4149         * decl.c (define_label): Constify filename parameter.
4150         * decl2.c (warn_if_unknown_interface): Constify local char *.
4151         * input.c Constify input_source.filename. Don't declare
4152         input_filename or lineno.  Constify filename parameter to feed_input.
4153         * lex.c (init_parse): Constify parameter and return value.
4154         (cp_pragma_interface, cp_pragma_implementation): Constify
4155         filename argument.
4156         (reinit_parse_for_method, reinit_parse_for_block,
4157         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
4158         Constify local char *.
4159         * pt.c: Don't declare lineno or input_filename.
4160         (print_template_context, tsubst_friend_function, tsubst_decl,
4161         tsubst, instantiate_decl): Constify local char *.
4162         * semantics.c (expand_body): Constify local char *.
4163         * tree.c (build_srcloc): Constify filename parameter.
4164         * typeck.c (c_expand_asm_operands): Constify filename
4165         parameter.
4166
4167 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
4168
4169         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
4170         offsetof expansion.
4171
4172 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
4173
4174         * inc/cxxabi.h:  Fix typos in comment.
4175         (__base_class_info::__offset): Use a static_cast.
4176
4177 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
4178
4179         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
4180         of std::size_t and std::ptrdiff_t respectively.
4181         * tinfo.cc: Likewise.
4182         * vec.cc: Likewise.
4183
4184 2000-05-06  Richard Henderson  <rth@cygnus.com>
4185
4186         * typeck.c (build_c_cast): Don't warn integer->pointer size
4187         mismatch for constants.
4188
4189 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
4190
4191         * rtti.c (ptmd_initializer): Set non-public, if class is
4192         incomplete.
4193
4194         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
4195         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4196         __cxa_vec_delete): Likewise.
4197         * tinfo.cc (__dynamic_cast): Likewise.
4198         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4199         __cxa_vec_delete): Likewise.
4200
4201 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
4202
4203         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
4204         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
4205         (lang_decl_flags): Add vcall_offset.
4206         (THUNK_VCALL_OFFSET): Use it.
4207         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
4208         * method.c (make_thunk): Create the lang_decl here, not in
4209         emit_thunk.
4210         (emit_thunk): Make generic thunks into ordinary functions once
4211         they have been fed to expand_body.
4212         * semantics.c (expand_body): Set current_function_is_thunk here.
4213
4214 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4215
4216         * class.c (update_vtable_entry_for_fn): Prototype.
4217
4218         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
4219         and `tmpl'.
4220
4221         * search.c (dfs_build_inheritance_graph_order): Prototype.
4222
4223 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
4224
4225         * cp-tree.h (special_function_kind): Add various kinds of
4226         destructors.
4227         (special_function_p): New function.
4228         * class.c (overrides): Don't let one kind of destructor override
4229         another.
4230         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
4231         whether or not to instantiate a template.
4232         * tree.c (special_function_p): Define.
4233
4234 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
4235
4236         * cp-tree.def (THUNK_DECL): Remove.
4237         * cp-tree.h (DECL_THUNK_P): New macro.
4238         (DECL_NON_THUNK_FUNCTION_P): Likewise.
4239         (DECL_EXTERN_C_FUNCTION_P): Likewise.
4240         (SET_DECL_THUNK_P): Likewise.
4241         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
4242         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
4243         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
4244         * decl.c (decls_match): Use DECL_EXTERN_C_P.
4245         (duplicate_decls): Likewise.
4246         (pushdecl): Likewise.  Adjust thunk handling.
4247         (grokfndecl): Use DECL_EXTERN_C_P.
4248         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
4249         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
4250         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
4251         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
4252         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
4253         DECL_NO_STATIC_CHAIN.
4254         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
4255         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
4256         * search.c (covariant_return_p): Remove THUNK_DECL handling.
4257         * ir.texi: Update.
4258
4259 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
4260
4261         * tree.c (walk_tree): Set lineno.
4262
4263 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
4264
4265         * exception.cc: Update license notice.
4266         * new.cc: Likewise.
4267         * new1.cc: Likewise.
4268         * new2.cc: Likewise.
4269         * tinfo.cc: Likewise.
4270         * tinfo2.cc: Likewise.
4271         * vec.cc: Likewise.
4272         * inc/cxxabi.h: Likewise.
4273         * inc/exception: Likewise.
4274         * inc/new: Likewise.
4275         * inc/new.h: Likewise.
4276         * inc/typeinfo: Likewise.
4277
4278 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
4279
4280         * tree.c (build_target_expr_with_type): If we already have a
4281         TARGET_EXPR, just return it.
4282
4283         * optimize.c (initialize_inlined_parameters): Don't generate an
4284         EXPR_STMT if we can just use DECL_INITIAL.
4285         * decl.c (emit_local_var): Only make the initialization a
4286         full-expression if stmts_are_full_exprs_p.
4287
4288 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
4289
4290         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
4291         macro.
4292         * call.c (standard_conversion): Use it.
4293         (direct_reference_binding): Likewise.
4294         (build_over_call): Likewise.
4295         (is_properly_derived_from): Likewise.
4296         (compare_ics): Likewise.
4297         * class.c (resolves_to_fixed_type_p): Likewise.
4298         * optimize.c (declare_return_variable): Likewise.
4299         * pt.c (is_specialization_of): Likewise.
4300         (unify): Likewise.
4301         * typeck.c (comp_target_parms): Likeiwse.
4302         (build_static_cast): Likewise.
4303         (build_reinterpret_cast): Likewise.
4304         (build_const_cast): Likewise.
4305         (comp_ptr_ttypes_real): Likewise.
4306         (comp_ptr_ttypes_const): Likewise.
4307         * typeck2.c (process_init_constructor): Likewise.
4308
4309 2000-04-30  Scott Snyder <snyder@fnal.gov>
4310
4311         * decl.c (finish_destructor_body): Use the base destructor when
4312         destroying virtual bases.
4313
4314 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
4315
4316         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
4317         STMT_EXPRs.
4318         * optimize.c (struct inline_data): Add target_exprs field.
4319         (declare_return_variable): When a function returns an aggregate,
4320         use the variable declared in the TARGET_EXPR as the remapped
4321         DECL_RESULT.
4322         (expand_call_inline): Update the pending target_exprs stack.
4323         (optimize_function): Initialize the stack.
4324
4325         * decl2.c (finish_file): Fix typo in comment.
4326
4327         * method.c (emit_thunk): Don't try to return a `void' value.
4328
4329         * optimize.c (initialize_inlined_parameters): If the parameter is
4330         addressable, we need to make a new VAR_DECL, even if the
4331         initializer is constant.
4332
4333 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
4334
4335         * decl.c (grok_op_properties): Add an extra check of argtypes.
4336
4337 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
4338
4339         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
4340         variables.
4341         (initialize_inlined_parameters): Try to avoid creating new
4342         VAR_DECLs.
4343
4344 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
4345
4346         * lex.c (my_get_run_time): Remove.
4347         (init_filename_times): Use get_run_time instead of my_get_run_time.
4348         (check_newline): Likewise.
4349         (dump_time_statistics): Likewise.
4350         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
4351         of computing elapsed time explicitly.
4352
4353 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
4354
4355         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
4356         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
4357         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
4358         before calling decl_constant_value.
4359         * class.c (check_bitfield_decl): Likewise.
4360         * cvt.c (ocp_convert): Likewise.
4361         (convert): Likewise.
4362         * decl.c (compute_array_index_type): Likewise.
4363         (build_enumerator): Likewise.
4364         * decl2.c (check_cp_case_value): Likewise.
4365         * pt.c (convert_nontype_argument): Likewise.
4366         (tsubst): Likewise.
4367         * typeck.c (decay_conversion): Likewise.
4368         (build_compound_expr): Likewise.
4369         (build_reinterpret_cast): Likewise.
4370         (build_c_cast): Likewise.
4371         (convert_for_assignment): Likewise.
4372
4373 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
4374
4375         * decl.c (finish_function): Don't play games with DECL_INLINE.
4376
4377 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
4378
4379         * ir.texi: Correct typo.
4380
4381 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4382
4383         * decl.c (grokdeclarator): Reject VLAs as members.
4384
4385 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
4386
4387         * call.c (standard_conversion): Accept conversion between
4388         COMPLEX_TYPEs.
4389
4390         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
4391
4392 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
4393
4394         * decl2.c (finish_file): Remove double setup for accounting
4395         compile time.
4396
4397 2000-04-24  Robert Lipe <robertlipe@usa.net>
4398
4399         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
4400
4401 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
4402
4403         * new.cc (set_new_handler): Needs to be in std::.
4404
4405 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
4406
4407         * cp-tree.h (lang_decl): Remove pretty_function_p.
4408         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
4409         language-specific node.
4410         * decl.c (cp_make_fname_decl): Use build_decl, not
4411         build_lang_decl, to build the variables.
4412         (grokvardecl): Don't call build_lang_decl for local variables in
4413         templates.
4414         (grokdeclarator): Don't call build_lang_decl for local type
4415         declarations in templates.
4416         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
4417         zero'd memory, rather than calling memset.
4418         * pt.c: Include hashtab.h.
4419         (local_specializations): New variable.
4420         (retrieve_local_specialization): Use it.
4421         (register_local_specialization): Likewise.
4422         (tsubst_decl): Don't assume local variables have
4423         DECL_LANG_SPECIFIC.
4424         (instantiate_decl): Set up local_specializations.
4425         * Makefile.in (HTAB_H): New variable.
4426
4427 2000-04-23  Richard Henderson  <rth@cygnus.com>
4428
4429         * typeck.c (c_expand_asm_operands): Restore the original
4430         contents of the output list.
4431
4432 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
4433
4434         * ir.texi:  Document complex number representation.
4435
4436 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4437
4438         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
4439         (target_incomplete_p): New function.
4440         (tinfo_base_init): Create comdat NTBS name variable.
4441         (ptr_initializer): Add non_public parameter. Calculate it.
4442         (ptmd_initializer): Likewise.
4443         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
4444         (create_real_tinfo_var): Add non_public parameter. Use it.
4445         Push proxy into global namespace.
4446         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
4447         New enumeration.
4448         * inc/typeinfo (type_info::before, type_info::operator==):
4449         Compare __name addresses.
4450
4451         * tinfo2.cc: Remove new-abi builtins comment.
4452
4453 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
4454
4455         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
4456
4457         * call.c (joust): Exit early if we get the same function, too.
4458
4459         * decl2.c (key_method): Return NULL_TREE for template classes.
4460         (import_export_class): Don't need to check for template classes.
4461
4462 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
4463
4464         * lex.c: Remove references to cccp.c.
4465
4466 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
4467
4468         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
4469         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
4470         (DECL_DESTRUCTOR_P): Use destructor_attr.
4471         (DECL_CONST_MEMFUNC_P): Reimplement.
4472         (DECL_VOLATILE_MEMFUNC_P): Remove.
4473         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
4474         (overrides): Use DECL_DESTRUCTOR_P.
4475         (check_for_override): Likewise.
4476         * decl.c (start_function): Likewise.
4477         * decl2.c (grokfclassfn): Likewise.
4478         (check_classfn): Likewise.
4479         (grok_function_init): Likewise.
4480
4481 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
4482
4483         * decl2.c (grokfield): Issue error on illegal data member
4484         declaration.
4485
4486 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
4487
4488         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
4489
4490 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
4491
4492         * class.c (build_vtable_entry): Don't build thunks for type-info
4493         functions.
4494
4495 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
4496
4497         * decl.c (decls_match): Allow a redeclaration of a builtin to
4498         specify args while the builtin did not.
4499
4500 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
4501
4502         * cp-tree.def (THUNK_DECL): Add to documentation.
4503         * cp-tree.h (flag_huge_objects): Declare.
4504         * class.c (modify_vtable_entry): Tidy.
4505         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
4506         Calculate delta appropriately for the new ABI.
4507         (dfs_modify_vtables): Use it.
4508         (modify_all_vtables): Fix thinko in code to add overriding copies
4509         of functions to primary vtables.
4510         (build_clone): Fix typo in comment.
4511         (clone_function_decl): Correct order of destructors in vtable.
4512         (build_vbase_offset_vtbl_entries): Adjust comment.
4513         (dfs_vcall_offset_queue_p): Remove.
4514         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
4515         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
4516         (build_vtable_entry): Correct check for pure virtual functions.
4517         Don't declare flag_huge_objects.
4518         * decl.c (flag_huge_objects): Remove declaration.
4519         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
4520         Use int_size_in_bytes.
4521         (emit_thunk): Handle vcall offset thunks.
4522
4523 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4524
4525         * decl2.c (parse_time, varconst_time): Delete declarations.
4526         (finish_file): Delete LINENO declaration.
4527         START_TIME and THIS_TIME now long.
4528
4529 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
4530
4531         * class.c (build_base_field): Reformat comment.
4532
4533         * inc/cxxabi.h (stddef.h): Comment inclusion.
4534         (__base_class_info::__offset): Comment shift.
4535
4536 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
4537
4538         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
4539         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
4540         (cp_push_exception_identifier): New macro.
4541         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
4542         (DECL_BASE_DESTRUCTOR_P): Likewise.
4543         (DECL_DELETING_DESTRUCTOR_P): Likewise.
4544         (get_vtbl_decl_for_binfo): Fix formatting.
4545         (in_charge_arg_for_name): New macro.
4546         (maybe_build_cleanup_and_delete): Remove declaration.
4547         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
4548         (in_charge_arg_for_name): New function.
4549         (build_new_method_call): Use it.  Handle cloned destructors.
4550         (build_clone): Don't make the base constructor virtual.
4551         Automatically defer generated functions.
4552         (clone_function_decl): Handle destructors, too.
4553         (clone_constructors_and_destructors): Likewise.
4554         (create_vtable_ptr): Don't create a vtable entry for a cloned
4555         function.
4556         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
4557         (initialize_predefined_identifiers): Update appropriately.
4558         (finish_destructor_body): Simplify.
4559         (maybe_build_cleanup_and_delete): Remove.
4560         * except.c (expand_throw): Handle new-ABI destructors.
4561         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
4562         (build_dtor_call): New function.
4563         (build_delete): Use it.  Simplify.
4564         * optimize.c (maybe_clone_body): Handle destructors.
4565         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
4566
4567         * exception.cc (cleanup_fn): New typedef.
4568         (CALL_CLEANUP): New macro.
4569         (cp_eh_info): Use them.
4570         (__cp_push_exception): Likewise.
4571         (__cp_pop_exception): Likewise.
4572
4573 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
4574
4575         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
4576         (complete_dtor_identifier): New macro.
4577         (CLASSTYPE_FIRST_CONVERSION): Remove.
4578         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
4579         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
4580         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
4581         (CLASSTYPE_CONSTRUCTORS): Likewise.
4582         (CLASSTYPE_DESTRUCTORS): Likewise.
4583         (lang_decl): Add cloned_function.
4584         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
4585         (DECL_BASE_CONSTRUCTOR_P): Likewise.
4586         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
4587         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
4588         (DECL_CLONED_FUNCTION_P): Likewise.
4589         (DECL_CLONED_FUNCTION): Likewise.
4590         (clone_function_decl): Declare.
4591         (maybe_clone_body): Likewise.
4592         * call.c (build_user_type_conversion_1): Call complete object
4593         constructors in the new ABI.
4594         (build_new_method_call): Don't add in-charge parameters under the
4595         new ABI.
4596         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
4597         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
4598         CLASSTYPE_DESTRUCTOR_SLOT.
4599         (build_clone): New function.
4600         (clone_function_decl): Likewise.
4601         (clone_constructors_and_destructors): Likewise.
4602         (check_bases_and_members): Use it.
4603         * decl.c (iniitialize_predefined_identifiers): Initialize
4604         complete_dtor_identifier.
4605         (finish_function): Don't add extra code to a clone.
4606         (lang_mark_tree): Mark cloned_function.
4607         * decl2.c (mark_used): Don't bother trying to instantiate things
4608         we synthesized.
4609         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
4610         * method.c (set_mangled_name_for_decl): Don't treat clones as
4611         constructors.
4612         (synthesize_method): Sythesize cloned functions, not the clones.
4613         * optimize.c (inline_data): Update comment on ret_label.
4614         (remap_block): Don't assume DECL_INITIAL exists.
4615         (copy_body_r): Allow ret_label to be NULL.
4616         (maybe_clone_body): Define.
4617         * pt.c (tsubst_decl): Handle clones.
4618         (instantiate_clone): New function.
4619         (instantiate_template): Use it.
4620         (set_mangled_name_for_template_decl): Don't treat clones as
4621         constructors.
4622         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
4623         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
4624         * semantics.c (expand_body): Clone function bodies as necessary.
4625
4626         * optimize.c (remap_decl): Avoid sharing structure for arrays
4627         whose size is only known at run-time.
4628         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
4629
4630         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
4631         to has_in_charge_parm_p.
4632         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
4633         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
4634         (DECL_COPY_CONSTRUCTOR_P): New macro.
4635         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
4636         (build_user_type_conversion_1): Likewise.
4637         (convert_like_real): Likewise.
4638         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
4639         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
4640         (copy_args_p): Likewise.
4641         (grok_ctor_properties): Likewise.
4642         (start_function): Likewise.
4643         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
4644         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
4645         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
4646         * method.c (do_build_copy_constructor): Use
4647         DECL_HAS_IN_CHARGE_PARM_P.
4648         (synthesize_method): Likewise.
4649         * pt.c (instantiate_template): Remove goto.
4650         * tree.c (build_cplus_method_type): Remove mention of obstacks in
4651         comment.
4652
4653         * cp-tre.h (finish_function): Change prototype.
4654         * decl.c (end_cleanup_fn): Adjust caller.
4655         (finish_function): Take only one parameter.
4656         * decl2.c (finish_objects): Adjust caller.
4657         (finish_static_storage_duration_function): Likewise.
4658         * method.c (emit_thunk): Likewise.
4659         * parse.y: Likewise.
4660         * parse.c: Regenerated.
4661         * pt.c (instantiate_decl): Likewise.
4662         * rtti.c (synthesize_tinfo_fn): Likewise.
4663         * semantics.c (expand_body): Likewise.
4664
4665         * cp-tree.h (copy_decl): New function.
4666         * class.c (finish_struct_1): Use it.
4667         * lex.c (copy_decl): Define it.
4668         * pt.c (tsubst_decl): Likewise.
4669         * tree.c (copy_template_template_parm): Likewise.
4670
4671         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
4672         has_nonpublic_assign_ref.
4673         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
4674         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
4675         * class.c (finish_struct_methods): Don't set
4676         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
4677         (interface_only): Don't declare.
4678         (interface_unknown): Likewise.
4679
4680 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4681
4682         * tree.h (HAVE_TEMPLATES): Remove definition.
4683         * lang-options.h (-fthis-is-variable): Remove documentation.
4684
4685 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
4686
4687         * class.c (instantiate_type): Handle object-relative template-id.
4688
4689         * semantics.c (finish_expr_stmt): Call convert_to_void here.
4690         * decl.c (cplus_expand_expr_stmt): Not here.
4691
4692         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
4693         Initialize exprtype earlier.
4694
4695         * parse.y (fn.def1): Check for defining types in return types.
4696
4697         * decl.c (check_tag_decl): Notice extra fundamental types.
4698         Diagnose empty decls in classes, too.
4699
4700         * decl.c (grokdeclarator): Don't override an anonymous name if no
4701         declarator was given.
4702
4703         * cvt.c (convert_to_void): Call resolve_offset_ref.
4704
4705         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
4706
4707         * decl2.c (decl_namespace): Handle getting a type.
4708
4709         * typeck.c (build_c_cast): Re-enable warning for cast between
4710         pointer and integer of different size.
4711
4712 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4713
4714         * inc/cxxabi.h (__pointer_type_info): Add restrict and
4715         incomplete flags.
4716         (__pointer_type_info::__pointer_catch): New virtual function.
4717         (__pointer_to_member_type_info): Derive from
4718         __pointer_type_info. Adjust.
4719         (__pointer_to_member_type_info::__do_catch): Remove.
4720         (__pointer_to_member_type_info::__is_pointer_p): Declare.
4721         (__pointer_to_member_type_info::__pointer_catch): Declare.
4722         * rtti.c (qualifier_flags): Add restrict flag.
4723         (ptmd_initializer): Reorder members.
4724         (create_tinfo_types): Expand comments. Reorder
4725         ptmd_desc_type_node members.
4726         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
4727         Implement.
4728         (__pointer_type_info::__do_catch): Move specific code into
4729         __pointer_catch. Call it.
4730         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
4731         specific catch checking. Fix void conversion check.
4732         (__pointer_to_member_type_info::__do_catch): Remove.
4733         (__pointer_to_member_type_info::__pointer_catch): Implement.
4734
4735 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4736
4737         * lex.c (init_parse): Remove traces of classof and headof.
4738         * decl2.c (flag_operator_names): Default to 1.
4739         (lang_decode_option): Do not set it for -ansi.
4740
4741 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
4742
4743         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
4744         (DECL_MAIN_VARIANT): Remove.
4745         * decl.c (duplicate_decls): Don't set it.
4746         (start_function): Likewise.
4747         (lang_mark_tree): Don't mark it.
4748         * decl2.c (defer_fn): Don't use it.
4749         * lex.c (retrofit_lang_decl): Don't set it.
4750         * pt.c (tsubst_decl): Likewise.
4751         * ptree.c (print_lang_decl): Don't print it.
4752         * typeck.c (mark_addressable): Don't use it.
4753
4754 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
4755
4756         * vec.cc: Include <new> and <exception>.
4757         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
4758         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
4759         terminate.
4760         (__cxa_vec_delete): Catch dtor exceptions.
4761
4762 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
4763
4764         Prepend __ to implementation defined names.
4765         * inc/typeinfo (type_info): Rename _name to __name.
4766         (type_info::type_info): Rename parameter.
4767         (type_info::operator==, type_info::operator!=,
4768         type_info::before): Likewise.
4769         (type_info::is_pointer_p, type_info::is_function_p,
4770         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
4771         parameters.
4772         * inc/cxxabi.h
4773         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
4774         (__pointer_type_info::__pointer_type_info): Likewise.
4775         (__pointer_type_info::is_pointer_p,
4776         __pointer_type_info::do_catch): Prepend __. Rename parameters.
4777         (__array_type_info::__array_type_info): Rename parameters.
4778         (__function_type_info::__function_type_info): Likewise.
4779         (__function_type_info::is_function_p): Prepend __.
4780         (__enum_type_info::__enum_type_info): Rename parameters.
4781         (__pointer_to_member_type_info::__pointer_to_member_type_info):
4782         Likewise.
4783         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
4784         parameters.
4785         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
4786         (__class_type_info::__class_type_info): Rename parameters.
4787         (__class_type_info::sub_kind): Prepend __. Adjust member names.
4788         (__class_type_info::upcast_result,
4789         __class_type_info::dyncast_result): Prepend __. Move definition
4790         into tinfo.cc.
4791         (__class_type_info::do_upcast, __class_type_info::do_catch,
4792         __class_type_info::find_public_src,
4793         __class_type_info::do_dyncast,
4794         __class_type_info::do_find_public_src): Prepend __. Rename
4795         parameters.
4796         (__si_class_type_info::__si_class_type_info): Rename parameters.
4797         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
4798         __si_class_type_info::do_find_public_src): Prepent __. Rename
4799         parameters.
4800         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
4801         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
4802         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
4803         parameters.
4804         (__dynamic_cast): Rename parameters.
4805         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
4806         type_info::do_catch, type_info::do_upcast): Prepend __.
4807         (contained_p, public_p, virtual_p, contained_public_p,
4808         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
4809         (__class_type_info::do_catch,
4810         __class_type_info::do_upcast): Prepend __. Adjust.
4811         (__class_type_info::__upcast_result,
4812         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
4813         Adjust.
4814         (__class_type_info::find_public_src): Prepend __. Adjust.
4815         (__class_type_info::do_find_public_src,
4816         __si_class_type_info::do_find_public_src,
4817         __vmi_class_type_info::do_find_public_src): Likewise.
4818         (__class_type_info::do_dyncast,
4819         __si_class_type_info::do_dyncast,
4820         __vmi_class_type_info::do_dyncast): Likewise.
4821         (__class_type_info::do_upcast,
4822         __si_class_type_info::do_upcast,
4823         __vmi_class_type_info::do_upcast): Likewise.
4824         (__dynamic_cast): Adjust.
4825         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
4826         (__function_type_info::is_function_p): Likewise.
4827         (__pointer_type_info::do_catch): Likewise. Adjust.
4828         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
4829         (__throw_type_match_rtti_2): Adjust.
4830         (__is_pointer): Adjust.
4831
4832 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
4833
4834         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
4835         (complete_ctor_identifier): New macro.
4836         (special_function_kind): Add sfk_copy_constructor and
4837         sfk_assignment_operator.
4838         (LOOKUP_HAS_IN_CHARGE): Remove.
4839         (cons_up_default_function): Rename to ...
4840         (implicitly_declare_fn): ... this.
4841         * call.c (build_new_method_call): Add in-charge parameters for
4842         constructors here.
4843         * class.c (add_implicitly_declared_members): Change parameter name
4844         from cant_have_assignment to cant_have_const_assignment.
4845         Replace calls to cons_up_default_function to implicitly_declare_fn.
4846         * cvt.c (ocp_convert): Use complete_ctor_identifier.
4847         * decl.c (initialize_predefined_identifiers): Initialize it.
4848         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
4849         complex expression.
4850         * init.c (expand_default_init): Don't calculate the in-charge
4851         parameter here.
4852         (build_new_1): Likewise.
4853         * lex.c (cons_up_default_function): Move to method.c.
4854         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
4855         (implicitly_declare_fn): New function.
4856         * typeck.c (build_static_cast): Use complete_ctor_identifier.
4857         (build_modify_expr): Likewise.
4858         * typeck2.c (build_functional_cast): Likewise.
4859
4860         Under the new ABI, constructors don't return `this'.
4861         * cp-tree.h (warn_reorder): Declare.
4862         (special_function_kind): New enum.
4863         (global_base_init_list): Remove declaration.
4864         (emit_base_init): Don't return a value.
4865         (check_base_init): Don't declare.
4866         (is_aggr_typedef): Likewise.
4867         * decl.c (check_special_function_return_type): New function.
4868         (return_types): Remove.
4869         (grokdeclarator): Use check_special_function_return_type.
4870         (start_function): Don't initialize ctor_label under the new ABI.
4871         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
4872         * init.c (begin_init_stmts): Move to top of file.
4873         (finish_init_stmts): Likewise.
4874         (warn_reorder): Don't declare.
4875         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
4876         value.
4877         (check_base_init): Remove.
4878         (is_aggr_typedef): Likewise.
4879         (build_new_1): Don't use the return value of a constructor.
4880         * semantics.c (setup_vtbl_ptr): Don't use the return value
4881         of emit_base_init.
4882         * typeck.c (check_return_expr): Don't magically convert return
4883         statements into `return this' in constructors under the new ABI.
4884
4885         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
4886         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
4887         (base_ctor_identifier): New macro.
4888         (base_dtor_identifier): Likewise.
4889         (deleting_dtor_identifier): Likewise.
4890         * decl.c: Don't include obstack.h.
4891         (obstack_chunk_alloc): Don't define.
4892         (obstack_chunk_free): Likewise.
4893         (struct predefined_identifier): New type.
4894         (initialize_predefined_identifiers): New function.
4895         (init_decl_processing): Use it.
4896         (debug_temp_inits): Remove.
4897         (start_method): Don't call preserve_data.
4898         (hack_incomplete_structures): Update comment.
4899         * init.c (init_init_processing): Don't initialize
4900         nelts_identifier.
4901         (build_offset_rf): Remove dead code.
4902         (build_delete): Use CLASSTYPE_N_BASECLASSES.
4903         * search.c (init_search_processing): Don't initialize
4904         vptr_identifier.
4905
4906 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4907
4908         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
4909         some sign_compare warnings.
4910
4911 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
4912
4913         Rename abi::__vmi_class_type_info members.
4914         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
4915         base_list, detail_masks members to vmi_flags, vmi_base_count,
4916         vmi_bases and vmi_flags_masks respectively.
4917         (__vmi_class_type_info::vmi_flags_masks): Rename
4918         details_unknown_mask to flags_unknown_mask.
4919         * tinfo.cc (__class_type_info::do_upcast): Adjust.
4920         (__vmi_class_type_info::do_find_public_src): Adjust.
4921         (__vmi_class_type_info::do_dyncast): Adjust.
4922         (__vmi_class_type_info::do_upcast): Adjust.
4923
4924 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
4925
4926         * tinfo.cc (convert_to_base): New function.
4927         (get_vbase_offset): Remove. Move into convert_to_base.
4928         (__vmi_class_type_info::do_find_public_src): Adjust.
4929         (__vmi_class_type_info::do_dyncast): Adjust.
4930         (__vmi_class_type_info::do_upcast): Adjust.
4931
4932 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
4933
4934         * tinfo.cc (operator=): Use __builtin_strcmp.
4935         * tinfo2.cc (before): Likewise.
4936
4937 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
4938
4939         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
4940         (DECL_SAVED_INLINE): Rename to ...
4941         (DECL_DEFERRED_FN): ... this.
4942         (in_function_p): Remove declaration.
4943         (mark_inline_for_output): Rename to ...
4944         (defer_fn): ... this.
4945         * decl.c (finish_function): Adjust call to mark_inline_for_output.
4946         (in_function_p): Remove definition.
4947         * decl2.c (saved_inlines): Rename to ...
4948         (deferred_fns): ... this.
4949         (saved_inlines_used): Rename to ...
4950         (deferred_fns_used): ... this.
4951         (mark_inline_for_output): Rename to ...
4952         (defer_fn): ... this.
4953         (finish_file): Adjust accordingly.
4954         (init_decl2): Likewise.
4955         * lex.c (cons_up_default_function): Likewise.
4956         * pt.c (mark_decl_instantiated): Likewise.
4957         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
4958         circumstances.
4959         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
4960         * semantics.c (expand_body): Defer more functions.
4961
4962 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
4963
4964         * vec.cc: New file.
4965         * Make-lang.in (CXX_LIB2FUNCS): Add it.
4966         (vec.o): Build it.
4967         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4968         __cxa_vec_delete): Declare.
4969
4970 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
4971
4972         * rtti.c (dfs_class_hint_mark): New static function.
4973         (dfs_class_hint_unmark): New static function.
4974         (class_hint_flags): Use them.
4975
4976 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
4977
4978         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
4979
4980 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
4981
4982         * cp-tree.h (instantiate_decl): Change prototype.
4983         * decl2.c (mark_used): Adjust call.
4984         * optimize.c (inlinable_function_p): Adjust handling of templates.
4985         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
4986         (do_type_instantiation): Likewise.
4987         (instantiate_decl): Defer more templates.
4988         (instantiate_pending_templates): Adjust logic to handle inline
4989         friend functions.
4990
4991         * Makefile.in (GGC_H): New variable.  Use it throughout in place
4992         of ggc.h.
4993
4994         * call.c: Don't include obstack.h.  Include ggc.h.
4995         (obstack_chunk_alloc): Don't define.
4996         (obstack_chunk_free): Likewise.
4997         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
4998         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
4999         (pop_switch): Free it.
5000
5001         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
5002
5003         * dump.c (dequeue_and_dump): Don't try to print the bit_position
5004         if we don't have a DECL_FIELD_OFFSET.
5005
5006 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
5007
5008         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
5009         special_function_p.
5010
5011 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5012
5013         * cfns.gperf (hash, libc_name_p): Prototype.
5014
5015         * rtti.c (build_dynamic_cast_1): Constification.
5016
5017         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
5018
5019         * semantics.c (deferred_type_access_control): Prototype.
5020
5021 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
5022
5023         Correct many new ABI issues regarding vbase and vcall offset
5024         layout.
5025         * cp-tree.h (BINFO_VTABLE): Document.
5026         (struct lang_type): Tweak formatting.
5027         (BINFO_PRIMARY_BINFO): Add to documentation.
5028         (CLASSTYPE_VSIZE): Fix typo in comment.
5029         (CLASSTYPE_VBASECLASSES): Update documentation.
5030         (BINFO_VBASE_MARKED): Remove.
5031         (SET_BINFO_VBASE_MARKED): Likewise.
5032         (CLEAR_BINFO_VBASE_MARKED): Likewise.
5033         (BINFO_FIELDS_MARKED): Remove.
5034         (SET_BINFO_FIELDS_MARKED): Likewise.
5035         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
5036         (enum access_kind): New enumeration.
5037         (num_extra_vtbl_entries): Remove declaration.
5038         (size_extra_vtbl_entries): Likewise.
5039         (get_vtbl_decl_for_binfo): New function.
5040         (dfs_vbase_unmark): Remove declaration.
5041         (mark_primary_bases): Likewise.
5042         * class.c (SAME_FN): Remove.
5043         (struct vcall_offset_data_s): Move definition.
5044         (build_vbase_pointer): Use `build', not `build_binary_op', to
5045         access the vbase pointer under the new ABI.
5046         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
5047         (build_primary_vtable): Likewise.
5048         (dfs_mark_primary_bases): Move here from search.c.
5049         (mark_primary_bases): Likewise.
5050         (determine_primary_bases): Under the new ABI, don't make a base
5051         class a primary base just because we don't yet have any virtual
5052         functions.
5053         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
5054         (num_vfun_entries): Remove.
5055         (dfs_count_virtuals): Likewise.
5056         (num_extra_vtbl_entries): Likewise.
5057         (size_extra_vtbl_entries): Likewise.
5058         (layout_virtual_bases): Iterate in inheritance graph order under
5059         the new ABI.
5060         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
5061         indicate that a vfield is present.
5062         (init_class_processing): Initialize access_public_node, etc., from
5063         ak_public, etc.
5064         (get_vtbl_decl_for_binfo): New function.
5065         (dump_class_hierarchy_r): Likewise.
5066         (dump_class_hierarchy): Use it.
5067         (finish_vtbls): Build the vtbls in inheritance graph order.
5068         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5069         (initialize_vtable): Use get_vtbl_decl_for_binfo.
5070         (accumulate_vtbl_inits): Add comments explaining why a pre-order
5071         walk is required.
5072         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
5073         where the vptr points, even for primary vtables.
5074         (build_vtbl_initializer): Adjust handling of vbase and vcall
5075         offsets.
5076         (build_vcall_and_vbase_vtable_entries): New function.
5077         (dfs_build_vbase_offset_vtbl_entries): Remove.
5078         (build_vbase_offset_vtbl_entries): Reimplement.
5079         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
5080         were already handled in a primary base class vtable.
5081         (build_vcall_offset_vtbl_entries): Adjust.
5082         (build_rtti_vtbl_entries): Adjust.
5083         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
5084         * init.c (expand_virtual_init): Simplify.
5085         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
5086         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
5087         * search.c (BINFO_ACCESS): New macro.
5088         (SET_BINFO_ACCESS): Likewise.
5089         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
5090         (access_in_type): Likewise.
5091         (dfs_accessible_p): Likewise.
5092         (protected_accessible_p): Likewise.
5093         (lookup_fnfields_1): Adjust documentation.
5094         (dfs_mark_primary_bases): Move to class.c
5095         (mark_primary_bases): Likewise.
5096         (dfs_vbase_unmark): Remove.
5097         (virtual_context): Use BINFO_FOR_VBASE.
5098         (dfs_get_vbase_types): Simplify.
5099         (dfs_build_inheritance_graph_order): New function.
5100         (get_vbase_types): Use it.
5101         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
5102
5103         * tinfo.cc (get_vbase_offset): New function.
5104         (__vmi_class_type_info::do_find_public_src): Use it.
5105         (__vmi_class_type_info::do_dyncast): Likewise.
5106         (__vmi_class_type_info::do_upcast): Likewise.
5107
5108 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
5109
5110         * lang-specs.h: Pass -fno-show-column to the preprocessor.
5111
5112 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
5113
5114         * rtti.c (class_hint_flags): Rename flags.
5115         (class_initializer): Remove flags.
5116         (synthesize_tinfo_var): Combine offset and flags. Add flags
5117         for __vmi_class_type_info.
5118         (create_tinfo_types): Remove flags from __class_type_info and
5119         __si_class_type_info. Merge flags and offset from
5120         base_class_type_info.
5121         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
5122         (__base_class_info::is_virtual_p): Adjust.
5123         (__base_class_info::is_public_p): Adjust.
5124         (__base_class_info::offset): New accessor.
5125         (__class_type_info::details): Remove member.
5126         (__class_type_info::__class_type_info): Lose details.
5127         (__class_type_info::detail_masks): Remove.
5128         (__si_class_type_info::__si_class_type_info): Lose details.
5129         (__vmi_class_type_info::details): New member.
5130         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
5131         (__vmi_class_type_info::detail_masks): New member.
5132         * tinfo.cc (__class_type_info::do_upcast): Initialize result
5133         with unknown_details_mask.
5134         (__vmi_class_type_info::do_find_public_src): Adjust
5135         (__vmi_class_type_info::do_dyncast): Adjust.
5136         (__vmi_class_type_info::do_upcast): Set result details, if
5137         needed. Adjust.
5138         (__dynamic_cast): Temporarily #if out optimization.
5139
5140 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
5141
5142         * rtti.c (get_tinfo_decl): Mark used.
5143         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
5144         mark as dealt with, if we output it.
5145
5146 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
5147
5148         * class.c: Reorganize to put virtual function table initialization
5149         machinery at the end of the file.
5150
5151 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
5152
5153         * class.c (finish_struct): Use bitsize_zero_node.
5154         * pt.c (instantiate_class_template): Likewise.
5155
5156 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
5157
5158         Put RTTI entries at negative offsets in new ABI.
5159         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
5160         vbase offset at index -3, not -1.
5161         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
5162         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
5163         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
5164         (build_rtti_vtbl_entries): New function.
5165         (set_rtti_entry): Remove.
5166         (build_primary_vtable): Don't use it.
5167         (build_secondary_vtable): Likewise.
5168         (start_vtable): Remove.
5169         (first_vfun_index): New function.
5170         (set_vindex): Likewise.
5171         (add_virtual_function): Don't call start_vtable.  Do call
5172         set_vindex.
5173         (set_primary_base): Rename parameter.
5174         (determine_primary_base): Likewise.
5175         (num_vfun_entries): Don't use skip_rtti_stuff.
5176         (num_extra_vtbl_entries): Include RTTI information.
5177         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
5178         (skip_rtti_stuff): Remove.
5179         (dfs_modify_vtables): Don't use it.
5180         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
5181         (layout_nonempty_base_or_field): Update size handling.
5182         (create_vtable_ptr): Tweak.
5183         (layout_class_type): Adjust parameter names.
5184         (finish_struct_1): Simplify.
5185         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
5186         (skip_rtti_stuff): Remove.
5187         (first_vfun_index): New function.
5188         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5189         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
5190         (marked_vtable_pathp): Declare.
5191         (unmarked_vtable_pathp): Likewise.
5192         * error.c (dump_expr): Use first_vfun_index to calculate vtable
5193         offsets.
5194         * rtti.c (build_headof): Look for RTTI at negative offsets.
5195         (get_tinfo_decl_dynamic): Likewise.
5196         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
5197         here.
5198         (create_pseudo_type_info): Do it here instead.  Adjust so that
5199         vptr points at first virtual function.
5200         * search.c (marked_vtable_pathp): Make it global.
5201         (unmarked_vtable_pathp): Likewise.
5202         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5203         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5204         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
5205         (get_pure_virtuals): Likewise.
5206         (expand_upcast_fixups): Likewise.
5207         * tree.c (debug_binfo): Likewise.
5208         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
5209         negative offset.
5210
5211 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5212
5213         * class.c (check_field_decl): Fix typo.
5214         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
5215         (check_methods): Likewise.
5216         (check_field_decls): Likewise.
5217         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
5218         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
5219         Use DECL_RESULT_FLD, not DECL_RESULT.
5220         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
5221         * lex.c (identifier_type): Likewise.
5222         * pt.c (determine_specialization, lookup_template_class): Likewise.
5223         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
5224         (resolve_overloaded_unification, more_specialized): Likewise.
5225         * semantics.c (finish_member_declaration): Likewise.
5226         * typeck.c (build_x_function_call): Likewise.
5227
5228 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
5229
5230         * class.c (layout_empty_base): Handle empty bases with non-byte
5231         alignment.
5232         (build_base_field): Likewise.
5233         (layout_virtual_bases): Likewise.
5234
5235         * class.c (finish_struct_1): Fix typo in this change:
5236
5237         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5238
5239 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
5240
5241         * decl.c (grokdeclarator): Count partial specializations when
5242         keeping track of how many template classes have been seen.
5243
5244         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
5245
5246 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5247
5248         * class.c (build_vbase_pointer_fields): layout_field now place_field.
5249         (get_vfield_offset): Use byte_position.
5250         (set_rtti_entry): Set OFFSET to ssizetype zero.
5251         (get_binfo_offset_as_int): Deleted.
5252         (dfs_record_base_offsets): Use tree_low_cst.
5253         (dfs_search_base_offsets): Likewise.
5254         (layout_nonempty_base_or_field): Reflect changes in RLI format
5255         and call byte_position.
5256         (layout_empty_base): Convert offset to ssizetype.
5257         (build_base_field): use rli_size_unit_so_far.
5258         (dfs_propagate_binfo_offsets): Do computation in proper type.
5259         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
5260         (layout_class_type): Reflect changes in RLI names and fields.
5261         (finish_struct_1): Set DECL_FIELD_OFFSET.
5262         * dump.c (dequeue_and_dump): Call bit_position.
5263         * expr.c (cplus_expand_constant): Use byte_position.
5264         * rtti.c (expand_class_desc): Use bitsize_one_node.
5265         * typeck.c (build_component_addr): Use byte_position and don't
5266         special case for zero offset.
5267
5268 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
5269
5270         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
5271
5272         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
5273         tinfo object.
5274         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
5275         vtable.
5276
5277 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5278
5279         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
5280         DECL_P macros.
5281         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
5282         make_typename_type, check_initializer, cp_finish_decl,
5283         xref_tag): Likewise.
5284         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
5285         decl_namespace, arg_assoc_template_arg, arg_assoc,
5286         validate_nonmember_using_decl, do_class_using_decl): Likewise.
5287         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
5288         args_to_string): Likewise.
5289         * friend.c (is_friend): Likewise.
5290         * lex.c (note_got_semicolon, note_list_got_semicolon,
5291         is_global): Likewise.
5292         * method.c (build_overload_nested_name, build_overload_value,
5293         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
5294         * parse.y (typename_sub, typename_sub1): Likewise.
5295         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
5296         process_partial_specialization, convert_template_argument,
5297         template_args_equal, add_pending_template, lookup_template_class,
5298         for_each_template_parm_r, maybe_fold_nontype_arg,
5299         tsubst, instantiate_template, type_unification_real, unify,
5300         instantiate_pending_templates, set_mangled_name_for_template_decl):
5301         Likewise.
5302         * repo.c (repo_get_id, repo_template_used): Likewise.
5303         * search.c (lookup_field_1): Likewise.
5304         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
5305         * xref.c (classname): Likewise.
5306
5307 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
5308
5309         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
5310         (CANONICAL_BINFO): New macro.
5311         (BINFO_NEW_VTABLE_MARKED): Use it.
5312         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
5313         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
5314         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
5315         not TREE_TYPE.
5316         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5317         (build_secondary_vtable): Likewise.
5318         (dfs_finish_vtbls): Likewise.
5319         (dfs_accumulate_vtbl_inits): Likewise.
5320         (accumulate_vtbl_inits): New function.
5321         (finish_vtbls): Make sure that virtual bases come after
5322         non-virtual bases in the vtable group.
5323         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
5324         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5325         * search.c (struct vbase_info): Move definition.
5326         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5327         (unmarked_new_vtable_p): Likewise.
5328         (dfs_mark_vtable_path): Remove.
5329         (dfs_mark_new_vtable): Remove.
5330         (dfs_unmark_new_vtable): Likewise.
5331         (dfs_clear_search_slot): Likewise.
5332         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
5333         (dfs_clear_vbase_slots): Likewise.
5334         (init_vbase_pointers): LIkewise.
5335
5336 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
5337
5338         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
5339         SIZETYPE to a non-SIZETYPE.
5340
5341 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
5342
5343         * class.c (layout_virtual_bases): Adjust names in conditionally
5344         compiled code.
5345
5346         * class.c (record_base_offsets): New function.
5347         (layout_conflict_p): Likewise.
5348         (layout_nonempty_base_or_field): Use it.
5349         (layout_empty_base): New function.
5350         (build_base_field): Use it.
5351         (build_base_fields): Update comment.
5352         (layout_virtual_bases): Fold in a little code form
5353         layout_basetypes.  Use layout_empty_base.
5354         (layout_basetypes): Remove.
5355         (end_of_class): New function.
5356         (layout_class_type): Use it.  Adjust.
5357
5358         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
5359         (fntype_p): Remove.
5360         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
5361         comment.
5362         (dfs_skip_nonprimary_vbases_markedp): Likewise.
5363         * typeck.c (fntype_p): Remove.
5364
5365         * cp-tree.h (TI_SPEC_INFO): Remove.
5366         (CLASSTYPE_TI_SPEC_INFO): Likewise.
5367         * pt.c (process_partial_specialization): Likewise.
5368
5369         * class.c (build_base_field): Fix thinko in computation of binfo
5370         offsets.
5371
5372         * tree.c (mark_local_for_remap_p): Mark variables declared in
5373         TARGET_EXPRs as well.
5374
5375 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
5376
5377         * typeck.c (require_complete_type, complete_type,
5378         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
5379         build_array_ref, convert_arguments, pointer_diff,
5380         build_x_unary_op, build_unary_op, build_c_cast,
5381         build_modify_expr): Use COMPLETE_TYPE_P etc.
5382         * call.c (is_complete, convert_like_real,
5383         build_new_method_call): Likewise.
5384         * class.c (build_vbase_pointer_fields, check_bases,
5385         build_base_field, finish_struct_1, pushclass): Likewise.
5386         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
5387         * decl.c (maybe_process_template_type_declaration, pushtag,
5388         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
5389         layout_var_decl, check_initializer, cp_finish_decl,
5390         grokdeclarator, require_complete_types_for_parms,
5391         grok_op_properties, xref_tag, xref_basetypes,
5392         check_function_type): Likewise.
5393         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
5394         * friend.c (do_friend): Likewise.
5395         * init.c (build_offset_ref): Likewise.
5396         * parse.y (structsp): Likewise.
5397         * pt.c (maybe_process_partial_specialization,
5398         tsubst_friend_function, instantiate_class_template, tsubst,
5399         do_type_instantiation, instantiate_pending_templates): Likewise.
5400         * repo.c (repo_get_id): Likewise.
5401         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
5402         synthesize_tinfo_var, emit_support_tinfos): Likewise.
5403         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
5404         * semantics.c (begin_class_definition): Likewise.
5405         * tree.c (build_cplus_method_type): Likewise.
5406         * typeck2.c (digest_init, build_functional_cast,
5407         add_exception_specifier): Likewise.
5408         * parse.h, parse.c: Regenerated.
5409
5410 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
5411
5412         * inc/cxxabi.h: New header file. Define new-abi entry points.
5413         (__pointer_type_info::target): Rename member to ...
5414         (__pointer_type_info::type): ... here.
5415         (__base_class_info::type): Rename member to ...
5416         (__base_class_info::base): ... here.
5417         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
5418         * cp-tree.h (CPTI_ABI): New global tree enumeration.
5419         (abi_node): New global tree node.
5420         * decl.c (abi_node): Document.
5421         (init_decl_processing): Initialize abi_node.
5422         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
5423         (get_vmi_pseudo_type_info): Likewise.
5424         (create_tinfo_types): Likewise.
5425         (emit_support_tinfos): Likewise.
5426         * tinfo.h (cxxabi.h): Include for new-abi.
5427         Move rtti class definitions to new header file.
5428         * tinfo.cc (abi): Use the namespace.
5429         (std): Move new abi rtti classes from here ...
5430         (__cxxabiv1): ... to here.
5431         * tinfo2.cc (cxxabi.h): Include for new-abi.
5432         Move rtti class definitions to new header file.
5433         (std): Move new abi rtti classes from here ...
5434         (__cxxabiv1): ... to here.
5435         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
5436         namespace.
5437
5438 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
5439             Jason Merrill  <jason@casey.cygnus.com>
5440
5441         * method.c (build_overload_int): Use host_integerp.
5442
5443 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5444
5445         * init.c (build_offset_ref): Handle the case of a templated member
5446         function.
5447
5448 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5449
5450         * except.c (expand_exception_blocks): Clear catch_clauses_last.
5451
5452 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
5453
5454         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
5455         * class.c (check_bitfield_decl): Turn illegal bitfields into
5456         non-bitfields.
5457         (dfs_propagate_binfo_offsets): Adjust for new size_binop
5458         semantics.
5459         (dfs_offset_for_unshared_vbases): Likewise.
5460         * cvt.c (cp_convert_to_pointer): Convert NULL to a
5461         pointer-to-member correctly under the new ABI.
5462         * expr.c (cplus_expand_constant): Don't use cp_convert when
5463         turning an offset into a pointer-to-member.
5464         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
5465         when dereferencing them under the new ABI.
5466         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
5467         of pointers-to-members under the new ABI.
5468
5469         * class.c (check_bitfield_decl): Remove restriction on really long
5470         bitfields.
5471         (layout_class_type): Implement new ABI handling of bitfields
5472         longer than their types.
5473
5474 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5475
5476         * parse.y (extdefs): Call ggc_collect.
5477         * parse.c: Regenerated.
5478
5479 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
5480
5481         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
5482         (note_name_declared_in_class): Use OVL_CURRENT to get at a
5483         potential overload.
5484
5485 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5486
5487         * class.c (build_vbase_path): Use integer_zerop.
5488         (build_vtable_entry): Use tree_low_cst.
5489         (get_vfield_offset): Use bit_position.
5490         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
5491         Use tree_low_cst.
5492         (check_bitfield_decl): Set DECL_SIZE using convert.
5493         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
5494         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
5495         Use tree_low_cst.
5496         (finish_struct_1): Use bit_position.
5497         (dump_class_hierarchy): Use tree_low_cst.
5498         * cp-tree.h (min_precision): Add declaration.
5499         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
5500         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
5501         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
5502         * expr.c (cplus_expand_constant): Use bit_position.
5503         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
5504         * rtti.c (get_base_offset): Use bit_position.
5505         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
5506         host_integerp, and tree_low_cst.
5507         (pointer_int_sum): Use integer_zerop.
5508         (build_component_addr): Use bit_position.
5509
5510 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
5511
5512         * typeck.c (require_complete_type): Don't assume size_zero_node.
5513         (complete_type_or_else): Likewise.
5514
5515 2000-03-16  Steven Grady <grady@digitaldeck.com>
5516             Jason Merrill  <jason@casey.cygnus.com>
5517
5518         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
5519
5520 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5521
5522         * decl2.c (grokfield): Bail out if type is error_mark_node.
5523
5524 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5525
5526         * tinfo2.cc (__ptr_to_member_data): Rename to ...
5527         (__pointer_to_member_data): ... here. Adjust.
5528         * rtti.c (create_tinfo_types): Adjust.
5529
5530 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5531
5532         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
5533         * decl.c (ref_desc_type_node): Undocument.
5534         * rtti.c (ptr_ref_initializer): Rename to ...
5535         (ptr_initializer): ... here. Adjust comments.
5536         (ptmd_initializer): Fix comment thinko.
5537         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
5538         (create_tinfo_types): Remove ref_desc_type_node init.
5539         * tinfo2.cc (__reference_type_info): Remove.
5540
5541 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5542
5543         * decl.c (cp_finish_decl): Remove obsolete comment.
5544
5545         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
5546
5547 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
5548
5549         * cp-tree.h: Tweak documentation.
5550         * class.c (build_vbase_pointer_fields): Layout the fields, too.
5551         (avoid_overlap): Remove.
5552         (get_binfo_offset_as_int): New function.
5553         (dfs_serach_base_offsets): Likewise.
5554         (layout_nonempty_base_or_field): Likewise.
5555         (build_base_field): Layout fields here.  Avoid placing two objects
5556         of the same type at the same address, under the new ABI.
5557         (build_base_fields): Adjust accordingly.
5558         (create_vtable_ptr): Return the new field, but don't attach it to
5559         TYPE_FIELDS.
5560         (remove_base_field): Remove.
5561         (remove_base_fields): Remove.
5562         (layout_basetypes): Adjust accordingly.
5563         (layout_class_type): Call layout_field for each field, rather than
5564         just making a wholesale call to layout_type.
5565
5566 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
5567
5568         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
5569
5570 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
5571
5572         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
5573
5574         * except.c (dtor_nothrow): New fn.
5575         (do_pop_exception): Use it.  Take type parm.
5576         (push_eh_cleanup): Take type parm.
5577         (expand_start_catch_block): Pass it.
5578         (build_eh_type_type_ref): Accept null type.
5579
5580 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
5581
5582         * cp-tree.h (revert_static_member_fn): Change prototype.
5583         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
5584         (grok_op_properties): Likewise.
5585         (start_function): Likewise.
5586         (revert_static_member_fn): Simplify.
5587         * pt.c (check_explicit_specialization): Adjust call to
5588         revert_static_member_fn.
5589
5590 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
5591
5592         * cp-tree.h (scope_kind): New type.
5593         (tmpl_spec_kind): Likewise.
5594         (declare_pseudo_global_level): Remove.
5595         (pseudo_global_level_p): Rename to template_parm_scope_p.
5596         (pushlevel): Remove declaration.
5597         (begin_scope): New function.
5598         (finish_scope): Likewise.
5599         (current_tmpl_spec_kind): Likewise.
5600         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
5601         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
5602         Add template_spec_p.
5603         (toplevel_bindings_p): Adjust.
5604         (declare_pseudo_global_level): Remove.
5605         (pseudo_global_level_p): Rename to template_parm_scope_p.
5606         (current_tmpl_spec_kind): New function.
5607         (begin_scope): Likewise.
5608         (finish_scope): Likewise.
5609         (maybe_push_to_top_level): Adjust.
5610         (maybe_process_template_type_declaration): Likewise.
5611         (pushtag): Likewise.
5612         (pushdecl_nonclass_level): Likewise.
5613         (lookup_tag): Likewise.
5614         (grokfndecl): Handle member template specializations.  Share
5615         constructor and non-constructor code.
5616         * decl2.c (check_classfn): Handle member template specializations.
5617         * pt.c (begin_template_parm_list): Use begin_scope.
5618         (begin_specialization): Likewise.
5619         (end_specialization): Likewise.
5620         (check_explicit_specialization): Use current_tmpl_spec_kind.
5621         Handle member template specializations.
5622         (end_template_decl): Use finish_scope.  Remove call to
5623         get_pending_sizes.
5624         (push_template_decl_real): Remove bogus error message.
5625         (tsubst_decl): Fix typo in code contained in comment.
5626         (instantiate_template): Handle member template specializations.
5627         (most_general_template): Likewise.
5628
5629 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
5630
5631         * lex.c (whitespace_cr): Compress consecutive calls to warning().
5632         (do_identifier): Ditto for error().
5633
5634         * pt.c (convert_nontype_argument): Ditto for cp_error().
5635         (convert_template_argument): Ditto for cp_pedwarn().
5636
5637 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
5638
5639         * exception.cc (__check_null_eh_spec): New fn.
5640         * except.c (expand_end_eh_spec): Call it if the spec is throw().
5641
5642 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
5643
5644         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
5645         * except.c (expand_end_eh_spec): Add the return type.
5646         * rtti.c (throw_bad_cast): Add the parmtypes.
5647         (throw_bad_typeid): Likewise.
5648
5649         * semantics.c (expand_stmt): Only leave out rtl for unused
5650         artificials, and set DECL_IGNORED_P on them as well.
5651         * decl.c (wrapup_globals_for_namespace): Likewise.
5652
5653 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
5654
5655         * decl.c (maybe_commonize_var): Skip all artificial decls.
5656         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
5657
5658 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
5659
5660         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
5661         * cp-tree.h: Declare flag_enforce_eh_specs.
5662         * decl.c (store_parm_decls, finish_function): Check it.
5663
5664         C library functions don't throw.
5665         * Makefile.in (cfns.h): New target.
5666         (except.o): Depend on it.
5667         * Make-lang.in (cc1plus): Depend on cfns.gperf.
5668         * cfns.gperf: New file.
5669         * cfns.h: Generated.
5670         * except.c: Include it.
5671         (nothrow_libfn_p): New fn.
5672         * decl.c (grokfndecl): Use it.
5673         * cp-tree.h: Declare it.
5674
5675         * decl.c (push_overloaded_decl_1, auto_function,
5676         define_function): Lose.
5677         (build_library_fn_1): New static fn.
5678         (builtin_function): Use it.
5679         (get_atexit_node): Use build_library_fn_ptr.
5680         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
5681         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
5682         push_void_library_fn, push_throw_library_fn): New fns.
5683         * cp-tree.h: Declare them.
5684         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
5685         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
5686         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
5687         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
5688         * rtti.c (build_runtime_decl): Lose.
5689         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
5690         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
5691         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
5692
5693         * call.c (build_call): Remove result_type parm.
5694         Call mark_used on unused artificial fns.
5695         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
5696
5697 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
5698
5699         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
5700         appropriate.
5701         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
5702         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
5703         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
5704         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
5705         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5706         expand_generic_desc): Likewise.
5707
5708 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5709
5710         * exception.cc (__cp_pop_exception): Cleanup the original object.
5711
5712 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5713
5714         * decl.c (grok_op_properties): Merge conversion to void warning
5715         with other silly op warnings.
5716
5717 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
5718
5719         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
5720         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
5721
5722 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5723
5724         * decl.c (cp_make_fname_decl): New function.
5725         (wrapup_globals_for_namespace): Don't emit unused static vars.
5726         (init_decl_processing): Remove comment about use of
5727         array_domain_type. Set make_fname_decl.
5728         (cp_finish_decl): Remove __FUNCTION__ nadgering.
5729         * semantics.c (begin_compound_stmt): Remove
5730         current_function_name_declared flagging.
5731         (expand_stmt): Don't emit unused local statics.
5732         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
5733         specially.
5734
5735 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5736
5737         * typeck.c (convert_for_assignment): Don't look at array
5738         initializer.
5739         * call.c (convert_like_real): Likewise.
5740
5741 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
5742
5743         Add initial support for '\uNNNN' specifier.
5744         * lex.c (read_ucs): New fn.
5745         (readescape, skip_white_space): Call it.
5746         (is_extended_char, is_extended_char_1): New fns.
5747         (utf8_extend_token): New fn, #if 0'd out.
5748         (real_yylex): Treat extended chars like letters.
5749
5750         * search.c (note_debug_info_needed): Walk the bases even if we
5751         weren't deferring the type itself.
5752
5753 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5754
5755         * decl2.c (finish_objects): Constify a char*.
5756
5757         * method.c (emit_thunk): Likewise.
5758
5759 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
5760
5761         * typeck.c (dubious_conversion_warnings): Look through
5762         REFERENCE_TYPE.
5763
5764 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5765
5766         * class.c (dfs_modify_vtables): I is now unsigned.
5767         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
5768         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
5769         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
5770         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
5771         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
5772         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
5773         Call integer_all_onesp.
5774         * typeck2.c (process_init_constructor): Use compare_tree_int.
5775
5776         * lang-specs.h (as): Don't call if -syntax-only.
5777
5778 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
5779
5780         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
5781         RTL_EXPR_HAS_NO_SCOPE after all.
5782
5783 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
5784
5785         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
5786         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
5787         RTL_EXPR_HAS_NO_SCOPE.
5788
5789         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
5790         later.
5791
5792         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
5793
5794 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
5795
5796         * call.c (convert_like): Macrofy.
5797         (convert_like_with_context): New macro.
5798         (convert_like_real): Renamed from convert_like.  Add calling
5799         context parameters, for diagnostics. Add recursive flag.  Call
5800         dubious_conversion_warnings for outer conversion.
5801         (build_user_type_conversion): Use convert_like_with_context.
5802         (build_over_call): Likewise. Don't warn about dubious
5803         conversions here. Adjust convert_default_arg calls.
5804         (convert_default_arg): Add context parameters for diagnostics.
5805         Pass throught to convert_like_with_context.
5806         * cp-tree.h (convert_default_arg): Add context parameters.
5807         (dubious_conversion_warnings): Prototype new function.
5808         * typeck.c (convert_arguments): Adjust convert_default_arg call.
5809         (dubious_conversion_warnings): New function, broken
5810         out of convert_for_assignment.
5811         (convert_for_assignment): Adjust.
5812
5813 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
5814
5815         * decl2.c (key_method): Break out from...
5816         (import_export_vtable, import_export_class): ...here.
5817
5818         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
5819         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
5820
5821         * search.c (note_debug_info_needed, dfs_debug_mark,
5822         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
5823         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
5824
5825 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
5826
5827         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
5828         typos.
5829
5830 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
5831
5832         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
5833         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
5834         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
5835         (lang_type): Split gets_new into has_new and has_array_new.
5836         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5837         (TYPE_GETS_NEW): Split into ...
5838         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
5839         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
5840         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
5841         (build_op_new_call): Don't declare.
5842         (build_new_1): Likewise.
5843         * call.c (build_op_new_call): Remove.
5844         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5845         instead of TYPE_NEEDS_DESTRUCTOR.
5846         (finish_struct_bits): Likewise.
5847         (add_implicitly_declared_members): Likewise.
5848         (check_field_decl): Likewise.
5849         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
5850         correctly under the new ABI.
5851         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5852         instead of TYPE_NEEDS_DESTRUCTOR.
5853         (initialize_local_var): Likewise.
5854         (destroy_local_var): Likewise.
5855         (cp_finish_decl): Likewise.
5856         (register_dtor_fn): Likewise.
5857         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
5858         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
5859         TYPE_VEC_DELETE_TAKES_SIZE here.
5860         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
5861         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
5862         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5863         (finish_destructor_body): Likewise.
5864         (maybe_build_cleanup_1): Likewise.
5865         * decl2.c (do_static_destruction): Likewise.
5866         * init.c (build_new_1): Make it static.
5867         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5868         (expand_cleanup_for_base): Likewise.
5869         (get_cookie_size): New function.
5870         (build_new_1): Handle array-new cookies correctly under the new
5871         ABI.
5872         (build_vec_delete_1): Likewise.
5873         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5874         (build_delete): Likewise.
5875         (build_vec_delete): Handle array-new cookies correctly under the new
5876         ABI.
5877         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5878         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
5879         TYPE_HAS_ARRAY_NEW_OPERATOR.
5880         * ptree.c (print_lang_type): Check them.
5881         * search.c (context_for_name_lookup): Fix typo in comment.
5882         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5883         * tree.c (break_out_cleanups): Likewise.
5884         (build_cplus_array_test_1): Likewise.
5885         (cp_build_qualified_type_real): Likewise.
5886         * typeck.c (complete_type): Likewise.
5887
5888         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
5889         the command-line, not the end.
5890
5891 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
5892
5893         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
5894
5895 2000-03-02  Tom Tromey  <tromey@cygnus.com>
5896
5897         * cp-tree.h (build_java_class_ref): Declare.
5898         * init.c (build_java_class_ref): No longer static.
5899         * except.c (expand_throw): Generate a Java-style `throw' if the
5900         thrown object is a "Java" object.
5901         (initialize_handler_parm): Generate a Java-style lookup of
5902         exception info if the caught object is a "Java" object.
5903         (catch_language, catch_language_init): New globals.
5904         (decl_is_java_type): New function.
5905         (expand_start_catch_block): Don't call push_eh_info() or
5906         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
5907         class reference to build_catch_block.
5908
5909 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5910
5911         * typeck.c (comptypes): Treat sizetype like its language equivalent.
5912
5913 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
5914
5915         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
5916         to merge reference/pointer code and fix incorrect warnings.
5917
5918 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
5919
5920         * search.c (protected_accessible_p): Use context_for_name_lookup.
5921
5922         * init.c (construct_virtual_bases): Fix thinko.
5923         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
5924
5925 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5926
5927         * decl.c (current_function_decl): Move to toplev.c.
5928
5929 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
5930
5931         * pt.c (fn_type_unification): Unify return type, whenever
5932         provided.
5933         (get_bindings_real): Only pass return type when necessary.
5934         Remove explicit return type check.
5935         * class.c (resolve_address_of_overloaded_function): Pass desired
5936         return type to fn_type_unification.
5937
5938 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5939
5940         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
5941         DECL_FIELD_SIZE.
5942         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
5943         DECL_FIELD_SIZE.
5944         * rtti.c (expand_class_desc): Likewise.
5945         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
5946         (THUNK_VCALL_OFFSET): Likewise.
5947         (THUNK_DELTA): Reflect changes in ../tree.h.
5948
5949 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
5950
5951         * search.c (protected_accessible_p): Also allow the access if
5952         the member is public in DERIVED.  Lose TYPE parm.
5953         (friend_accessible_p): Lose TYPE parm.
5954         (accessible_p): Adjust.
5955
5956 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5957
5958         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
5959         on things that are not sizes; ssize_binop deleted.
5960         Call size_diffop when appropriate.
5961         (dfs_build_vcall_offset_vtbl_entries): Likewise.
5962         (build_primary_vtable, build_secondary_vtable): Likewise.
5963         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
5964         Variable I is HOST_WIDE_INT.
5965         (get_vfield_offset): Pass proper types to size_binop.
5966         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
5967         (finish_struct_1): Likewise.
5968         (skip_rtti_stuff): Arg N is now pointer to signed.
5969         (layout_class_type): Use size_zero_node.
5970         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
5971         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
5972         * decl.c (complete_arry_type): Pass proper types to size_binop.
5973         (xref_basetypes): BINFO_OFFSET is sizetype.
5974         * error.c (dump_expr): Don't use size_binop non-sizes.
5975         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
5976         * init.c (construct_virtual_bases): Fix type error.
5977         (build_vec_delete_1): Pass proper type to size_binop and don't
5978         fold result.
5979         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
5980         * rtti.c (get_base_offset): Pass proper type to size_binop.
5981         * search.c (dfs_find_vbases): Fix type error.
5982         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
5983         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
5984         * tree.c (debug_binfo): Variable N is signed.
5985         Use HOST_WIDE_INT_PRINT_DEC.
5986         * typeck.c (comptypes): sizetype is same as equivalent integer type.
5987         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
5988         size_one_node and size_zero_node.
5989         (c_alignof): Use size_one_node.
5990         (build_component_addr): Pass proper types to size_binop.
5991         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
5992
5993 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
5994
5995         Implement class scope using-declarations for functions.
5996         * class.c (handle_using_decl): Call add_method for used functions.
5997         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
5998         (add_method): Used functions are hidden by local functions.
5999         (check_bases_and_members): Handle using-decls before finalizing
6000         CLASSTYPE_METHOD_VEC.
6001         * call.c (add_function_candidate): Add ctype parm; if non-zero,
6002         override the type of 'this' accordingly.
6003         (add_template_candidate, add_template_candidate_real): Add ctype parm.
6004         (convert_class_to_reference, build_user_type_conversion_1,
6005         build_new_function_call, build_object_call, build_new_op,
6006         build_new_method_call): Pass ctype parm.
6007
6008         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
6009         the baselink.
6010         * call.c (convert_class_to_reference, build_user_type_conversion_1,
6011         build_new_function_call, build_object_call, build_new_op,
6012         build_new_method_call, build_op_delete_call): Don't get basetype_path
6013         from a baselink.
6014         * typeck.c (build_component_ref): Likewise.
6015         * init.c (build_offset_ref): Likewise.
6016         (resolve_offset_ref): Don't call enforce_access.
6017         Call build_scoped_ref.
6018         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
6019         would cause an error or if -pedantic.
6020         * class.c (alter_access): Lose binfo parm.
6021
6022 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
6023
6024         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
6025         types.
6026
6027 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
6028
6029         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
6030         pseudo_type_info creation into the std namespace
6031
6032 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
6033
6034         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
6035         (import_export_class): Remove declaration.
6036         * decl2.c (import_export_class): Make it static.
6037         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
6038         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
6039         EXPR_WITH_FILE_LOCATION.
6040         * lex.c (check_newline): Tweak filename/lineno setting.
6041         * semantics.c (begin_while_stmt): Fix typo in comment.
6042
6043 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6044
6045         * lang-options.h (-fmessage-length=): Add missing option.
6046
6047         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
6048
6049 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
6050
6051         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
6052
6053 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
6054
6055         * optimize.c (expand_call_inline): Emit the return label before
6056         evaluating the return value.
6057
6058 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
6059
6060         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
6061         than duplicating functionality here.
6062         * optimize.c: Include input.h.
6063         (expand_call_inline): Use push_srcloc and pop_srcloc.
6064         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
6065         * parse.c: Regenerated.
6066         * Makefile.in (lex.o): Depend on input.h.
6067         (optimize.o): Likewise.
6068
6069 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
6070
6071         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
6072         function type, rather than ICE.
6073
6074 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
6075
6076         * decl.c (grokdeclarator): Call decl_type_access_control.
6077         * parse.y (parse_end_decl): Don't call decl_type_access_control if
6078         decl is null.
6079
6080 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
6081
6082         * decl.c (decls_match): Remove obsolete static member nadgering.
6083
6084 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6085
6086         * decl.c (grokdeclarator): Change ANSI to ISO.
6087         * lex.c (consume_string, readescape, do_identifier): Likewise.
6088         (parse_float, real_yylex): Likewise.
6089         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
6090         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
6091         new_type_id, maybe_label_decls, simple_stmt,
6092         for.init.statement): Likewise.
6093         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
6094         * semantics.c (finish_named_return_value): Likewise.
6095         * parse.c: Regenerate.
6096
6097 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
6098
6099         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
6100         (CPTI_CLASS_STAR_TYPE): Remove.
6101         (vtable_index_type): Likewise.
6102         (class_star_type_node): Remove.
6103         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
6104         (build_binary_op_nodefault): Remove.
6105         * call.c (build_new_op): Use build_binary_op instead of
6106         build_binary_op_nodefault.
6107         * decl.c (init_decl_processing): Remove class_star_type_node
6108         initialization.  Make delta_type_node ptrdiff_type_node under the
6109         new ABI.  Initialize vtable_index_type.
6110         (build_ptrmemfunc_type): Build different structures for the new
6111         ABI.
6112         (build_enumerator): Use build_binary_op instead of
6113         build_binary_op_nodefault.
6114         * method.c (build_overload_value): Mangle pointers-to-members
6115         appropriately under the new ABI.
6116         * typeck.c (build_array_ref): Use build_binary_op instead of
6117         build_binary_op_nodefault.
6118         (get_member_function_from_ptrfunc): Adjust for the new ABI.
6119         (build_binary_op_nodefault): Rename to ...
6120         (build_binary_op): ... this.  Remove old version.  Adjust for
6121         pointer-to-member comparisons under the new ABI.
6122         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
6123         (build_ptrmemfunc): Adjust for the new ABI.
6124         (expand_ptrmemfunc_cst): Likewise.
6125         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
6126         (pfn_from_ptrmemfunc): Adjust for the new ABI.
6127
6128 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
6129
6130         * call.c (build_object_call): Compress consecutive calls to
6131         cp_error.
6132         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
6133         (build_op_delete_call): Adjust message formatting.
6134
6135         * class.c (check_bases): Compress consecutive calls to
6136         cp_pedwarn.
6137         (finish_struct_anon): Say 'ISO C++'.
6138
6139         * decl.c (start_decl): Same here.
6140         (grok_reference_init): Likewise.
6141         (grokfndecl): Correct message formatting.
6142         (grokfndecl): Improve diagnostic.
6143         (check_static_variable_definition): Likewise. Say 'ISO C++'
6144         (compute_array_index_type): Say 'ISO C++'
6145         (create_array_type_for_decl): Compress consecutive calls to
6146         cp_error.
6147         (grokdeclarator): Say 'ISO C++'
6148         (grok_op_properties): Likewise.
6149
6150         * decl2.c (delete_sanity): Clairify diagnostic.
6151         (check_member_template): Same here.
6152         (grok_function_init): Use consistent terminology.
6153
6154         * expr.c (do_case): Say 'ISO C++'
6155
6156         * friend.c (do_friend): Compress consecutive calls to warning.
6157
6158 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
6159
6160         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
6161         * class.c (build_secondary_vtable): Reorganize.  Don't create a
6162         new vtable under the new ABI.
6163         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
6164         computing the size.
6165         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
6166         the initializing elements.
6167         (initialize_vtable): New function.
6168         (dfs_finish_vtbls): Use it.
6169         (dfs_accumulate_vtbl_inits): New function.
6170         (finish_vtbls): Merge primary and secondary vtables under the new
6171         ABI.
6172         (finish_struct_1): Remove redundant call to layout_vtable_decl.
6173         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
6174         aren't VAR_DECLs.
6175
6176         * class.c (build_vtable): New function, split out from ...
6177         (get_vtable_decl): ... here, and ...
6178         (build_secondary_vtable): ... here.
6179
6180         * pt.c (tsubst_decl): Fix formatting.
6181
6182 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6183
6184         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
6185         (avoid_overlap, build_base_field): Likewise.
6186         (build_base_field, build_base_fields, is_empty_class):
6187         Test DECL_SIZE with integer_zero.
6188         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
6189         * cp-tree.h (struct lang_type): New field size_unit.
6190         (CLASSTYPE_SIZE_UNIT): New macro.
6191         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
6192         (cp_finish_decl): Delete -Wlarger-than processing.
6193         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
6194         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
6195         * tree.c (make_binfo): binfo vector is one entry longer.
6196         (walk_tree): Walk DECL_SIZE_UNIT.
6197
6198 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
6199
6200         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
6201         comment.
6202         (build_vtable_entry): Don't assume all vtable entries are
6203         functions.
6204         (build_vtbl_initializer): Adjust accordingly.
6205         (get_vtable_decl): Fix formatting.
6206
6207 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
6208
6209         * semantics.c (deferred_type_access_control): Walk the entire
6210         type_lookups list.
6211         (save_type_access_control): Rename from
6212         initial_deferred_type_access_control.  Just remember the value.
6213         (decl_type_access_control): New fn.
6214         (begin_function_definition): Use deferred_type_access_control, after
6215         we've started the function.  Set type_lookups to error_mark_node.
6216         * parse.y (frob_specs, fn.def1): Adjust.
6217         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
6218         (parse_end_decl, parse_bitfield0, parse_method): New fns.
6219         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
6220         (after_type_component_declarator0): Likewise.
6221         (after_type_component_declarator): Likewise.
6222         (notype_component_declarator): Likewise.
6223         * cp-tree.h: Adjust.
6224
6225         * decl.c (redeclaration_error_message): Allow redeclaration of
6226         namespace-scope decls.
6227
6228 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6229
6230         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
6231
6232 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
6233
6234         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
6235         * decl2.c (grokclassfn): Likewise.
6236
6237         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
6238
6239         * decl2.c (lang_decode_option): Don't set default message length
6240         here.
6241         * lex.c (lang_init_options): Set it here.
6242
6243 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
6244
6245         Make DECL_CONTEXT mean the class in which a member function was
6246         declared, even for a virtual function.
6247         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
6248         (DECL_FRIEND_CONTEXT): New macro.
6249         (DECL_REAL_CONTEXT): Remove.
6250         (SET_DECL_FRIEND_CONTEXT): Likewise.
6251         (DECL_VIRTUAL_CONTEXT): Adjust.
6252         (DECL_CLASS_SCOPE_P): Use TYPE_P.
6253         (add_friends): Remove.
6254         (hack_decl_function_context): Likewise.
6255         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
6256         CP_DECL_CONTEXT.
6257         (build_over_call): Fix indentation.  Use DECL_CONTEXT
6258         instead of DECL_CLASS_CONTEXT.
6259         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
6260         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6261         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6262         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
6263         (build_base_field): Likewise.
6264         (finish_struct_1): Likewise.
6265         (build_self_reference): Likewise.
6266         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
6267         DECL_REAL_CONTEXT.
6268         (pushtag): Use decl_function_context, not
6269         hack_decl_function_context.
6270         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6271         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
6272         (pushdecl): Remove bogus code.
6273         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
6274         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6275         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6276         Use decl_function_context, nothack_decl_function_context.
6277         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
6278         (grokdeclarator): Likewise.  Use decl_function_context, not
6279         hack_decl_function_context.
6280         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
6281         (start_function): Use DECL_FRIEND_CONTEXT, not
6282         DECL_CLASS_CONTEXT.  Use decl_function_context, not
6283         hack_decl_function_context.
6284         (finish_function): Use decl_function_context, not
6285         hack_decl_function_context.
6286         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
6287         DECL_CLASS_CONTEXT.
6288         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
6289         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
6290         (grokfield): Likewise.
6291         (finish_builtin_type): Likewise.
6292         (finish_vtable_vardec): Use decl_function_context, not
6293         hack_decl_function_context.
6294         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6295         (start_static_initialization_or_destruction): Likewise.
6296         (finish_static_initialization_or_destruction): Likewise.
6297         (mark_used): Adjust logic for deciding when to synthesize methods.
6298         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
6299         DECL_REAL_CONTEXT.
6300         * error.c (dump_function_decl): Use DECL_CONTEXT, not
6301         DECL_CLASS_CONTEXT.
6302         * friend.c (is_friend): Likewise.
6303         (add_friends): Remove.
6304         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
6305         * lex.c (begin_definition_of_inclass_inline): Use
6306         decl_function_context, not hack_decl_function_context.
6307         (process_next_inline): Likewise.
6308         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6309         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
6310         DECL_CLASSS_CONTEXT.
6311         (hack_identifier): Likewise.
6312         (synthesize_method):  Use decl_function_context, not
6313         hack_decl_function_context.
6314         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
6315         DECL_REAL_CONTEXT.
6316         (is_member_template): Use decl_function_context, not
6317         hack_decl_function_context.  Use DECL_CONTEXT, not
6318         DECL_CLASS_CONTEXT.
6319         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
6320         DECL_CLASS_CONTEXT.
6321         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
6322         DECL_REAL_CONTEXT.
6323         (push_template_decl_real): Likewise.
6324         (instantiate_class_template): Don't call add_friends.
6325         (tsubst_default_argument): Use DECL_CONTEXT, not
6326         DECL_REAL_CONTEXT.
6327         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6328         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6329         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
6330         DECL_CLASS_CONTEXT.
6331         * repo.c (repo_inline_used): Likewise.
6332         * search.c (current_scope): Adjust for new _CONTEXT macros.
6333         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
6334         DECL_REAL_CONTEXT.
6335         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6336         (lookup_fnfields_here):Likewise.
6337         (check_final_overrider): Likewise.
6338         (init_vbase_pointers): Likewise.
6339         (virtual_context): Likewise.
6340         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
6341         (expand_body): Use decl_function_context, not
6342         hack_decl_function_context.
6343         * tree.c (hack_decl_function_context): Remove.
6344         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
6345         DECL_CLASS_CONTEXT.
6346         * typeck2.c (error_not_base_type): Likewise.
6347
6348 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
6349
6350         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
6351
6352 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6353
6354         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
6355
6356 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
6357
6358         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
6359
6360 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
6361
6362         * decl2.c (lang_decode_option): Enable automatic line wrapping.
6363
6364 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
6365
6366         * parse.y (frob_specs): Split out...
6367         (parse_decl): From here.
6368         (fn.def2): Call initial_deferred_type_access_control.
6369         (after_type_component_declarator0): Call frob_specs.
6370         (notype_component_declarator0): Likewise.
6371         * search.c (friend_accessible_p): Nested classes are friends of their
6372         enclosing classes.
6373
6374 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
6375
6376         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
6377         used to create an implicit temporary.
6378
6379         * class.c (dfs_modify_vtables): Tweak calculation of functions to
6380         override.
6381
6382 2000-02-08  Nathan Sidwell  <nathan@acm.org>
6383
6384         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
6385         strip array element qualifiers too.
6386
6387 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
6388
6389         * decl.c (store_parm_decls): Don't build cleanups for parameters
6390         while processing_template_decl.
6391
6392 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
6393
6394         * cp-tree.h (struct saved_scope): Add incomplete field.
6395         (namespace_scope_incomplete): New macro.
6396         * decl.c (pushdecl): Use it.
6397         (hack_incomplete_structures): Use it.  See through artificial
6398         binding levels.
6399         (mark_saved_scope): Mark it.
6400
6401         Implement access control for nested types.
6402         * search.c (type_access_control): New fn.
6403         (accessible_p): Now we do perform access control for types.
6404         * semantics.c (deferred_type_access_control): New fn.
6405         (initial_deferred_type_access_control): New fn.
6406         (begin_function_definition): Call it.  Add lookups parm.
6407         * decl.c (struct binding_level): Add this_class field.
6408         (pushlevel_class): Set it.
6409         (mark_binding_level): Mark it.
6410         (lookup_name_real): Use it.  Call type_access_control.
6411         (mark_saved_scope): Mark lookups field.
6412         * cp-tree.h (flagged_type_tree): Add lookups field.
6413         (struct saved_scope): Add lookups field.
6414         (type_lookups): New macro.
6415         * parse.y (declmods): Now <ftype>.
6416         (parse_decl): Add lookups parm.  Call
6417         initial_deferred_type_access_control.
6418         (lang_extdef): Clear type_lookups.
6419         (typed_declspecs, declmods, typespec): Set lookups field.
6420         (initdcl): Call deferred_type_access_control.
6421         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
6422         component_decl_1, named_parm): Adjust.
6423         * friend.c (is_friend): Nested classes are friends of their
6424         enclosing classes.
6425
6426         * class.c (currently_open_derived_class): New fn.
6427         * method.c (hack_identifier): Use it.
6428
6429         * lex.c (do_identifier): Remove obsolete code.
6430
6431         * parse.y (typed_typespecs): Propagate new_type_flag properly.
6432
6433 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
6434
6435         * tinfo.h: Remove apostrophes from C++ comment (xgettext
6436         thinks this file is plain C).
6437
6438 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6439
6440         * Makefile.in (call.o): Depend on $(EXPR_H).
6441
6442         * call.c: Include "expr.h".
6443
6444         * class.c (dump_class_hierarchy): Add prototype.
6445
6446         * search.c (dfs_get_pure_virtuals): Likewise.
6447
6448 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
6449
6450         * parse.y (simple_stmt): Allow :: token in asm parameter list.
6451         * parse.c: Rebuilt.
6452
6453 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
6454
6455         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
6456         Store it in DECL_FCONTEXT.
6457         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
6458
6459 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
6460
6461         * tinfo.h (old abi): #include "tconfig.h".
6462         * tinfo.cc (convert_to_base): Move into old abi section.
6463
6464 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
6465
6466         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
6467         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
6468         (BINFO_PRIMARY_BINFO): New macro.
6469         (BF_DELTA): Rename to ...
6470         (BV_DELTA): ... this.
6471         (BF_VCALL_INDEX): Rename to ...
6472         (BV_VCALL_INDEX): ... this.
6473         (BF_FN): Rename to ...
6474         (BV_FN): ... this.
6475         * class.c (build_vbase_path): Adjust for changes to reverse_path.
6476         (set_rtti_entry): Rename BF_ macros to BV_ variants.
6477         (modify_vtable_entry): Simplify.
6478         (add_virtual_function): Rename BF_ macros to BV_ variants.
6479         (build_vtable_initializer): Likewise.
6480         (get_class_offset_1): Remove.
6481         (dfs_get_class_offset): Likewise.
6482         (get_class_offset): Likewise.
6483         (dfs_find_final_overrider): New function.
6484         (find_final_overrider): Likewise.
6485         (modify_one_vtable): Remove.
6486         (dfs_find_base): New function.
6487         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
6488         find_final_overrider.
6489         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
6490         virtuals.
6491         (dfs_fixup_vtable_deltas): Remove.
6492         (override_one_vtable): Remove.
6493         (merge_overrides): Likewise.
6494         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
6495         unreal chilren of virtual bases.
6496         (finish_struct_1): Don't use merge_overrides.  Don't use
6497         dfs_fixup_vtable_deltas.
6498         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
6499         BINFOs.
6500
6501 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6502             Jason Merrill  <jason@yorick.cygnus.com>
6503
6504         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
6505
6506 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
6507
6508         * exception.cc (__throw_bad_typeid): Add missing std::.
6509
6510 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6511
6512         * cp-tree.h (make_thunk): PROTO -> PARAMS.
6513
6514 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
6515
6516         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
6517
6518         Runtime support for new-abi rtti.
6519         * inc/typeinfo (type_info::operator!=): Define in class.
6520         (type_info::before, type_info::name, type_info::operator==,
6521         type_info::operator!=): Define new ABI implementations.
6522         (type_info::is_pointer_p, type_info::is_function_p): Declare
6523         new virtual functions.
6524         (type_info::do_catch, type_info::do_upcast): Likewise.
6525
6526         * tinfo.h (__base_class_info): Define new class.
6527         (__class_type_info): Likewise.
6528         (__si_class_type_info): Likewise.
6529         (__vmi_class_type_info): Likewise.
6530         (__dynamic_cast): Prototype.
6531
6532         * tinfo.cc: Conditionalize old and new rtti mechanisms.
6533         (type_info::is_pointer_p): Define new function.
6534         (type_info::is_function_p): Likewise.
6535         (type_info::do_catch): Likewise.
6536         (type_info::do_upcast): Likewise.
6537         (vtable_prefix): New structure for vtable access.
6538         (adjust_pointer): Define new template function.
6539         (contained_p, public_p, virtual_p, contained_public_p,
6540         contained_nonpublic_p, contained_nonvirtual_p): Define new
6541         functions.
6542         (nonvirtual_base_type): New local variable.
6543         (__class_type_info::~__class_type_info): Define.
6544         (__si_class_type_info::~__si_class_type_info): Likewise.
6545         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
6546         (__class_type_info::do_catch): Define new function.
6547         (__class_type_info::do_upcast): Likewise.
6548         (__class_type_info::find_public_src): Likewise.
6549         (__class_type_info::do_find_public_src): Likewise.
6550         (__si_class_type_info::do_find_public_src): Likewise.
6551         (__vmi_class_type_info::do_find_public_src): Likewise.
6552         (__class_type_info::do_dyncast): Likewise.
6553         (__si_class_type_info::do_dyncast): Likewise.
6554         (__vmi_class_type_info::do_dyncast): Likewise.
6555         (__class_type_info::do_upcast): Likewise.
6556         (__si_class_type_info::do_upcast): Likewise.
6557         (__vmi_class_type_info::do_upcast): Likewise.
6558         (__dynamic_cast): Likewise.
6559
6560         * tinfo2.cc (__fundamental_type_info): Define new class.
6561         (__pointer_type_info): Likewise.
6562         (__reference_type_info): Likewise.
6563         (__array_type_info): Likewise.
6564         (__function_type_info): Likewise.
6565         (__enum_type_info): Likewise.
6566         (__ptr_to_member_type_info): Likewise.
6567         (__fundamental_type_info::~__fundamental_type_info): Define.
6568         (__pointer_type_info::~__pointer_type_info): Likewise.
6569         (__reference_type_info::~__reference_type_info): Likewise.
6570         (__array_type_info::~__array_type_info): Likewise.
6571         (__function_type_info::~__function_type_info): Likewise.
6572         (__enum_type_info::~__enum_type_info): Likewise.
6573         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
6574         (__pointer_type_info::do_catch): Define new function.
6575         (__ptr_to_member_type_info::do_catch): Define new function.
6576
6577         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
6578         (__is_pointer): Likewise.
6579
6580         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
6581
6582 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
6583
6584         * cp/class.c (build_vtable): Rename to build_primary_vtable.
6585         (prepare_fresh_vtable): Rename to build_secondary_vtable.
6586         (make_new_vtable): New function.
6587         (modify_vtable_entry): Handle generation of new vtables correctly.
6588         (modify_one_vtable): Remove unused parameter.
6589         (dfs_fixup_vtable_deltas): Likewise.
6590         (override_one_vtable): Use build_secondary_vtable.
6591         (finish_struct_1): Use build_primary_vtable and
6592         build_secondary_vtable.
6593
6594 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
6595
6596         * cp/decl.c: Adjust variable names, comments, help strings.
6597
6598 2000-01-29  Nathan Sidwell  <nathan@acm.org>
6599
6600         * new2.cc (operator delete[]): Use operator delete, don't assume
6601         implementation.
6602
6603 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
6604
6605         * class.c (build_vtbl_initializer): Add argument to
6606         build_vtable_entry call.
6607
6608 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
6609
6610         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
6611         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
6612         (BF_DELTA): New macro.
6613         (BF_VCALL_INDEX): Likewise.
6614         (BF_FN): Likewise.
6615         (THUNK_VCALL_OFFSET): Likewise.
6616         (make_thunk): Change prototype.
6617         * class.c (build_vtable_entry): Integrate
6618         build_vtable_entry_for_fn.  Handle vcall indices.
6619         (build_vtable_entry_for_fn): Remove.
6620         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
6621         BF_VCALL_INDEX, BF_FN.
6622         (modify_vtable_entry): Integrate common code from
6623         modify_one_vtable and dfs_fixup_vtable_deltas.
6624         (add_virtual_function): Set BF_VCALL_INDEX.
6625         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
6626         and BF_FN.
6627         (modify_one_vtable): Simplify.
6628         (dfs_fixup_vtable_deltas): Likewise.
6629         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
6630         * method.c (make_thunk): Handle vcall indices.
6631
6632 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
6633
6634         Compiler side new abi rtti (not enabled).
6635         * cp-tree.h (new_abi_rtti_p): New macro.
6636         (emit_support_tinfos): Prototype new function.
6637         (tinfo_decl_p): Likewise.
6638         (emit_tinfo_decl): Likwise.
6639         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
6640         macros.
6641         (doing_runtime): New local static.
6642         (init_rtti_processing): Add new-abi initializer.
6643         (get_tinfo_decl): Add new-abi logic.
6644         (tinfo_from_decl): Likewise.
6645         (build_dynamic_cast_1): Likewise.
6646         (qualifier_flags): New static function.
6647         (tinfo_base_init): Likewise.
6648         (generic_initializer): Likewise.
6649         (ptr_ref_initializer): Likewise.
6650         (ptmd_initializer): Likewise.
6651         (class_hint_flags): Likewise.
6652         (class_initializer): Likewise.
6653         (synthesize_tinfo_var): Likewise.
6654         (create_real_tinfo_var): Likewise.
6655         (create_pseudo_type_info): Likewise.
6656         (get_vmi_pseudo_type_info): Likewise.
6657         (create_tinfo_types): Likewise.
6658         (emit_support_tinfos): New global function.
6659         (tinfo_decl_p): New global predicate.
6660         (emit_tinfo_decl): New global function.
6661         * class.c (set_rtti_entry): Generalize for old and new rtti.
6662         (build_vtbl_initializer): Likewise.
6663         * decl2.c (finish_file): Likewise.
6664
6665 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
6666
6667         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
6668         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
6669
6670 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
6671
6672         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
6673         for scopes.
6674
6675 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
6676
6677         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
6678
6679 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
6680
6681         * optimize.c (calls_setjmp_r): Supply new argument
6682         to special_function_p.
6683
6684 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6685
6686         * call.c: PROTO -> PARAMS.
6687         * class.c: Likewise.
6688         * cp-tree.h: Likewise.
6689         * cvt.c: Likewise.
6690         * decl.c: Likewise.
6691         * decl.h: Likewise.
6692         * decl2.c: Likewise.
6693         * dump.c: Likewise.
6694         * errfn.c: Likewise.
6695         * error.c: Likewise.
6696         * except.c: Likewise.
6697         * expr.c: Likewise.
6698         * init.c: Likewise.
6699         * input.c: Likewise.
6700         * lex.c: Likewise.
6701         * lex.h: Likewise.
6702         * method.c: Likewise.
6703         * optimize.c: Likewise.
6704         * parse.y: Likewise.
6705         * pt.c: Likewise.
6706         * repo.c: Likewise.
6707         * rtti.c: Likewise.
6708         * search.c: Likewise.
6709         * semantics.c: Likewise.
6710         * spew.c: Likewise.
6711         * tree.c: Likewise.
6712         * typeck.c: Likewise.
6713         * typeck2.c: Likewise.
6714         * xref.c: Likewise.
6715
6716 2000-01-25  Richard Henderson  <rth@cygnus.com>
6717
6718         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
6719
6720 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
6721
6722         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
6723         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
6724         (struct vcall_offset_data_s): New type.
6725         (dfs_vcall_offset_queue_p): New function.
6726         (dfs_build_vcall_offset_vtbl_entries): Likewise.
6727         (build_vcall_offset_vtbl_entries): Likewise.
6728         (layout_vtable_decl): Likewise.
6729         (num_vfun_entries): Likewise.
6730         (num_extra_vtbl_entries): Add the entries for vcall offsets.
6731         (build_vtbl_initializer): Likewise.
6732         (dfs_finish_vtabls): Use layout_vtable_decl.
6733         (modify_one_vtables): Always duplicate vtables under the new ABI.
6734         (finish_struct_1): Use layout_vtable_decl.
6735
6736 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6737
6738         * decl.c (member_function_or_else): Change third arg from a format
6739         specifier to an `enum overload_flags'.  Callers changed.
6740
6741 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6742
6743         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
6744         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
6745         build_const_cast, get_delta_difference, check_return_expr): Avoid
6746         ANSI string concatenation usage.
6747
6748 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
6749
6750         * class.c (layout_class_type): Put the fields required to make a
6751         class non-empty at the end, not the beginning, of the TYPE_FIELDs
6752         list.
6753
6754 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
6755
6756         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
6757         template.
6758
6759         * decl2.c (mark_used): Do instantiate inlines that have been
6760         explicitly instantiated.
6761
6762 2000-01-24  Richard Henderson  <rth@cygnus.com>
6763
6764         * call.c (build_over_call): Use expand_tree_builtin.
6765         * typeck.c (build_function_call_real): Likewise.
6766         (build_binary_op_nodefault): Handle unordered compares.
6767
6768 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
6769
6770         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
6771         cp_tree_index values.
6772         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
6773         New global node #defines for them.
6774         * rtti.c (call_void_fn): Replace with ...
6775         (build_runtime_decl): ... new static function.
6776         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
6777         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
6778         (build_dynamic_cast_1): Always produce correctly typed result.
6779         Explicitly produce type_info addresses. Use dynamic_cast_node.
6780         * exception.cc (__throw_bad_cast): Return `void *'.
6781         (__throw_bad_typeid): Return `const type_info &'.
6782
6783 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
6784
6785         * cp-tree.h (get_vtable_decl): Prototype new function.
6786         * class.c (get_vtable_decl): New function. Broken out from ...
6787         (build_vtable): ... here. Use it.
6788         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
6789         by get_vtable_decl.
6790
6791 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
6792
6793         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
6794         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
6795         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
6796         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
6797         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
6798         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
6799         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
6800         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
6801         (CPTI_TINFO_VAR_ID): New enumeration.
6802         (__tp_desc_type_node, __access_mode_type_node,
6803         __bltn_desc_type_node, __user_desc_type_node,
6804         __class_desc_type_node, __ptr_desc_type_node,
6805         __attr_desc_type_node, __func_desc_type_node,
6806         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
6807         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
6808         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
6809         enum_desc_type_node, class_desc_type_node,
6810         si_class_desc_type_node, vmi_class_desc_type_node,
6811         ptmd_desc_type_node, base_desc_type_node): New #defines.
6812         (tinfo_fn_id, tinfo_fn_type): Rename to ...
6813         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
6814         (tinfo_var_id): New enumeration.
6815         (DECL_TINFO_FN_P): Augment comment.
6816         * decl.c (cp_global_trees): Adjust documentation.
6817         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
6818         tinfo_decl_type and tinfo_var_id.
6819         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
6820         (build_typeid): Remove unused variable.
6821         (get_tinfo_var): Use tinfo_var_id.
6822         (tinfo_name): New static function.
6823         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
6824         (tinfo_from_decl): Likewise.
6825         (get_base_offset): New static function, broken out of
6826         expand_class_desc.
6827         (expand_si_desc): Use tinfo_name.
6828         (expand_class_desc): Likewise. Lose local static variable.
6829         Use base_desc_type_node. Use get_base_offset.
6830         (expand_ptr_desc): Use tinfo_name.
6831         (expand_attr_desc): Likewise.
6832         (expand_generic_desc): Likewise.
6833
6834         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
6835         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
6836
6837 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
6838
6839         * cp-tree.h (__eprintf): Remove declaration.
6840         * tree.c (__eprintf): Remove definition.
6841
6842 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
6843             Mark Mitchell  <mark@codesourcery.com>
6844
6845         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
6846         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
6847
6848 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
6849
6850         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
6851
6852 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
6853
6854         * cp-tree.h (register_dtor_fn): New function.
6855         * decl.c (destroy_local_static): Rename to ...
6856         (register_dtor_fn): ... this.  Give it external linkage.
6857         (expand_static_init): Use it.
6858         * decl2.c (do_static_initialization): Likewise, if using
6859         __cxa_atexit.
6860         (do_static_destruction): Check that __cxa_atexit is not in use.
6861         (finish_file): Don't call do_static_destruction if using
6862         __cxa_atexit.
6863
6864         * typeck.c (convert_arguments): Restore two-message error
6865         reporting.
6866
6867 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
6868
6869         Remap dynamic cast hint values to be consistent across ABIs.
6870         * search.c (dynamic_cast_base_recurse): Remap generated value.
6871         (get_dynamic_cast_base_type): Adjust documentation.
6872         * tinfo.h (__user_type_info::dyncast): Likewise.
6873         (__user_type_info::find_public_subobj): Remap BOFF meaning.
6874         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
6875         (__class_type_info::do_dyncast): Likewise.
6876         (__class_type_info::do_find_public_subobj): Likewise.
6877         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
6878
6879 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
6880
6881         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
6882
6883         * typeck2.c (incomplete_type_error): Restore previous
6884         cp_error and cp_error_at call sequence.
6885
6886 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
6887
6888         * class.c (dump_class_hierarchy): Make format agree with argument;
6889         cast pointer to unsigned long and print with %lx.
6890
6891 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
6892
6893         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
6894
6895         * typeck.c (composite_pointer_type, common_type,
6896         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
6897         build_function_call_real, convert_arguments,
6898         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
6899         build_unary_op, mark_addressable, build_compound_expr,
6900         build_static_cast, build_reinterpret_cast, build_const_cast,
6901         build_c_cast, build_modify_expr, get_delta_difference,
6902         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
6903         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
6904         into a single one.
6905         * typeck2.c (readonly_error, abstract_virtuals_error,
6906         process_init_constructor, check_for_new_type): Likewise.
6907
6908 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
6909
6910         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
6911         VAR_DECLs.
6912
6913 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
6914
6915         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
6916         (build_x_typeid): Likewise.
6917         (get_tinfo_fn): Likewise.
6918         (get_tinfo_fn_unused): Rename to ...
6919         (get_tinfo_decl): ... here.
6920         * rtti.c (build_headof): Replace logic error with assertion.
6921         (get_tinfo_fn_dynamic): Rename to ...
6922         (get_tinfo_decl_dynamic): ... here. Make static. Use
6923         complete_type_or_else.
6924         (build_x_typeid): Move into ...
6925         (build_typeid): ... here. Adjust call to
6926         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
6927         throw_bad_typeid expression.
6928         (get_tinfo_fn_unused): Rename to ...
6929         (get_tinfo_decl): ... here. Adjust comment.
6930         (get_tinfo_fn): Delete.
6931         (tinfo_from_decl): New static function.
6932         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
6933         (get_typeid): Use complete_type_or_else.
6934         (build_dynamic_cast_1): Adjust calls to
6935         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
6936         * parse.y (primary): Adjust call to build_typeid.
6937         * except.c (build_eh_type_type_ref): Adjust call to
6938         get_tinfo_decl. Mark as used.
6939         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
6940         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
6941         * parse.c: Regenerated.
6942
6943 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
6944
6945         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
6946         calling convention.
6947         (resolves_to_fixed_type_p): Document calling convention.
6948         * rtti.c (build_x_typeid): Initialize NONNULL.
6949
6950         * cp-tree.h (build_shared_int_cst): New function.
6951         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
6952         * class.c (modify_vtable_entry): Likewise.
6953         (add_virtual_function): Split out code to generated shared
6954         INTEGER_CSTs to build_share_int_cst.
6955         (modify_all_vtables): Handle all the overridden functions here.
6956         Add overridden functions from non-primary virtual bases to the
6957         primary vtable.
6958         (finish_struct_1): Adjust call to modify_all_vtables.  Add
6959         overridden functions from non-primary bases to the vtable.
6960         * tree.c (build_shared_int_cst): New function.
6961
6962         * cp-tree.h (scratchalloc): Remove.
6963         (build_scratch_list): Likewise.
6964         * call.c (convert_class_to_reference): Replace build_scratch_list
6965         and build_expr_list with build_tree_list.
6966         (add_candidate): Replace scratchalloc with expralloc.  Note memory
6967         leak.
6968         (build_user_type_conversion_1):  Replace build_scratch_list
6969         and build_expr_list with build_tree_list.
6970         (build_new_op): Likewise.
6971         (build_op_delete_call): Likewise.
6972         (convert_like): Likewise.
6973         * cvt.c (ocp_convert): Likewise.
6974         * decl.c (start_decl): Likewise.
6975         (start_function): Likewise.
6976         (finish_destructor_body): Likewise.
6977         (maybe_build_cleanup_1): Likewise.
6978         * decl2.c (reparse_decl_as_expr): Likewise.
6979         * init.c (perform_member_init): Likewise.
6980         (expand_cleanup_for_base): Likewise.
6981         (build_builtin_delete_call): Likewise.
6982         (build_new_1): Likewise.
6983         (build_delete): Likewise.
6984         * method.c (do_build_assign_ref): Likewise.
6985         * parse.y (already_scoped_stmt): Likewise.
6986         (nontrivial_exprlist): Likewise.
6987         (net_initializer): Likewise.
6988         (initlist): Likewise.
6989         * parse.c: Regenerated.
6990         * rtti.c (build_x_typeid): Likewise.
6991         (build_dynamic_cast_1): Likewise.
6992         * typeck.c (build_x_compound_expr): Likewise.
6993         (build_static_cast): Likewise.
6994         (build_modify_expr): Likewise.
6995
6996         * cp-tree.h (DECL_VINDEX): Add documentation.
6997         * class.c (build_vtable_entry): Likewise.
6998         (start_vtable): Add comment.
6999         (add_virtual_function): Replace pending_hard_virtuals with
7000         overridden_virtuals and pending_virtuals with new_virtuals.
7001         Replace redundant assignments with assertions.
7002         (check_for_override): Add comment.
7003         (check_bases_and_members): Replace pending_hard_virtuals with
7004         overridden_virtuals and pending_virtuals with new_virtuals.
7005         (create_vtbl_ptr): Likewise.
7006         (layout_class_type): Likewise.
7007         (finish_struct_1): Likewise.  Add comments.
7008
7009 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
7010
7011         * class.c (finish_struct_1): Replace redundant code with
7012         assertions.
7013
7014         * cp-tree.h (flag_new_abi): Move.
7015         (flag_use_cxa_atexit): Likewise.
7016         (flag_honor_std): Likewise.
7017         (flag_rtti): Likewise.
7018         (vbase_offsets_in_vtable_p): Define.
7019         (vptrs_present_everywhere_p): Likewise.
7020         (TYPE_CONTAINS_VPTR_P): Likewise.
7021         (dfs_walk_real): Declare.
7022         * class.c (build_vbase_pointer_fields): Check
7023         vbase_offsets_in_vtable_p.
7024         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
7025         BINFO_VPTR_FIELD.
7026         (build_vbase_offset_vtbl_entries): Simplify.
7027         (build_vbase_offset_vtbl_entries): Adjust.
7028         (build_vbase_pointer): Add ability to look up vbase offsets in
7029         vtable.
7030         (start_vtable): New function.
7031         (add_virtual_function): Use it.
7032         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
7033         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
7034         (build_vtbl_initializer): Take the type of the complete object as
7035         input.  Use it to correctly calculate vbase offsets.
7036         (dfs_finish_vtbls): Pass the complete type to
7037         build_vtbl_initializer.
7038         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
7039         (create_vtable_ptr): Create a vtable even if there are no
7040         new virtual functions, under the new ABI.
7041         (finish_struct_1): Likewise.
7042         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
7043         * decl.c (exapnd_static_init): Remove call to
7044         preserve_initializer.
7045         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
7046         vtables.
7047         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
7048         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
7049         (construct_virtual_bases): Don't initialize virtual base pointers
7050         under the new ABI.
7051         (build_aggr_init): Clean up comment.
7052         (expand_aggr_init_1): Likewise.
7053         * rtti.c (expand_class_desc): Store the virtual function table
7054         index where the vbase offset lives in the offset field.
7055         * search.c (dfs_walk_real): Make it global.
7056         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
7057         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
7058
7059         * tinfo.h (USItype): Make it signed under the new ABI.
7060         * tinfo.cc (convert_to_base): New function.  Encapsulate base
7061         conversion logic here.
7062         (__class_type_info::do_upcast): Use it.
7063         (__class_type_info::do_dyncast): Likewise.
7064         (__class_type_info::do_find_public_subobj): Likewise.
7065
7066         * init.c (construct_virtual_bases): Don't look up the addresses of
7067         virtual bases at run-time.
7068
7069         * class.c (build_vbase_pointer): Relocate.
7070         (build_vbase_pointer_fields): Likewise.
7071         (dfs_build_vbase_offset_vtbl_entries): Likewise.
7072         (build_vbase_offset_vtbl_entries): Likewise.
7073
7074         * decl.c (init_decl_processing): Complain if -fnew-abi
7075         -fno-vtable-thunks is used.
7076
7077         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
7078         flag_new_abi.
7079
7080 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
7081
7082         * cp-tree.h (num_extra_vtbl_entries): New function.
7083         (size_extra_vtbl_entries): Likewise.
7084         (dfs_vtable_path_unmark): Likewise.
7085         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
7086         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7087         * class.c (num_extra_vtbl_entries): New function.
7088         (size_extra_vtbl_entries): Likewise.
7089         (dfs_build_vbase_offset_vtbl_entries): New function.
7090         (build_vbase_offset_vtbl_entries): Likewise.
7091         (build_vtbl_initializer): Use it.
7092         (finish_struct_1): Adjust vtable sizes (using
7093         num_extra_vtbl_entries).
7094         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
7095         THUNK_DECL is non-NULL before expanding it.
7096         * init.c (expand_virtual_init): Adjust the vtable pointer by
7097         size_extra_vtbl_entries before storing it.
7098         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
7099         Handle TREE_LIST parameters here, not in the dfs_* functions.
7100         (dfs_unmarked_real_bases_queue_p): Adjust.
7101         (dfs_marked_real_bases_queue_p): Likewise.
7102         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
7103         (dfs_vtable_path_marked_real_bases_queue_p): New function.
7104         (dfs_vtable_path_unmark): Likewise.
7105
7106 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
7107
7108         * optimize.c (copy_body_r): Clear the operand three of a
7109         TARGET_EXPR when copying it.
7110
7111 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7112
7113         * method.c (build_decl_overload_real): Check whether we are in ::
7114         before returning __builtin_new/delete.
7115
7116 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
7117
7118         * pt.c (tsubst_friend_function): Improve comment.
7119         (instantiate_decl): Avoid crashing when a "nested" function is
7120         instantiated from the top level.
7121
7122         * dump.c (dqeueue_and_dump): Dump
7123         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
7124
7125 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7126
7127         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
7128
7129 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
7130
7131         * g++spec.c (lang_specific_driver): Add -fnew-abi if
7132         ENABLE_NEW_GXX_ABI defined.
7133         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
7134         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
7135         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
7136
7137 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
7138
7139         * decl.c (start_cleanup_fn): Call pushdecl.
7140
7141         * call.c (convert_class_to_reference): Fix typos.
7142         (build_conditional_expr): Handle errors gracefully.
7143         * class.c (push_nested_class): Likewise.
7144         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
7145         (DECL_THIS_EXTERN): Use it.
7146         (DECL_THIS_STATIC): Likewise.
7147         * cvt.c (convert_to_void): Handle errors gracefully.
7148         (build_expr_type_conversion): Likewise.
7149         * decl.c (maybe_push_decl): Likewise.
7150         (start_decl_1): Likewise.
7151         (require_complete_types_for_parms): Likewise.
7152         * parse.y (structsp): Likewise.
7153         (base_class): Likewise.
7154         * parse.c: Regenerated.
7155         * pt.c (finish_member_template_decl): Likewise.
7156         * typeck.c (decay_conversion): Likewise.
7157
7158         * cp-tree.h (dfs_skip_vbases): New function.
7159         (find_vbase_instance): Likewise.
7160         * class.c (determine_primary_base): Allow a nearly empty base to
7161         serve as a primary base class under the new ABI.
7162         (get_class_offset_1): Rename to ...
7163         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
7164         messages here.
7165         (get_class_offset): Use it.  Issue error messages here.
7166         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
7167         find the right copies of virtual bases.
7168         (fixup_vtable_deltas1): Rename to ...
7169         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
7170         bases as primary bases.
7171         (fixup_vtable_deltas): Remove.
7172         (override_one_vtable): Handle virtual bases as primary bases.
7173         (merge_overrides): Likewise.
7174         (finish_struct_1): Likewise.
7175         (dump_class_hierarchy): Dump primary-ness of bases as well.
7176         * search.c (mark_primary_bases): Use a pre-order traversal to
7177         handle primary virtual bases.
7178         (dfs_skip_vbases): New fiunction.
7179         (expand_upcast_fixups): Adjust to handle primary virtual bases.
7180         (fixup_virtual_upcast_offsets): Likewise.
7181         (fixup_all_virtual_upcast_offsets): Likewise.
7182         (dfs_find_vbase_instances): New function.
7183         (find_vbase_instance): Likewise.
7184
7185 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
7186
7187         * lex.c (DIR_SEPARATOR): Delete macro.
7188
7189 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
7190
7191        * decl2.c (lang_decode_option): Handle automatic line wrapping
7192        option.
7193
7194 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
7195
7196         * friend.c (do_friend): Don't resolve scopes when processing
7197         template declarations, even if the qualifying scope doesn't
7198         involve template parameters.
7199
7200 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
7201
7202         * class.c (dfs_modify_vtables_queue_p): Remove.
7203         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
7204         and dfs_marked_real_bases_queue_p instead of
7205         dfs_modify_vtables_queue_p.
7206
7207         * class.c (build_vbase_path): Simplify.
7208         (dfs_propagate_binfo_offsets): New function.
7209         (propagate_binfo_offsets): Use it.
7210         (remove_base_field): Simplify.
7211         (dfs_set_offset_for_vbases): Remove.
7212         (dfs_set_offset_for_shared_vbases): New function.
7213         (dfs_set_offset_for_unshared_vbases): Likewise.
7214         (layout_virtual_bases): Use them.
7215         (layout_basetypes): Don't call propagate_binfo_offsets.
7216         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
7217         for the vbases.
7218
7219         * class.c (build_base_field): New function, split out from ...
7220         (build_base_fields): ... here.  Use it.  Allocate primary bases
7221         first, under the new ABI.
7222         (get_vtable_entry): Remove.
7223         (remove_base_field): New function, split out from ...
7224         (remove_base_fields): ... here.  Adjust since primary bases come
7225         first under the new ABI.
7226
7227         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
7228         (initialize_vtbl_ptrs): New function.
7229         (expand_indirect_vtbls_init): Change prototype.
7230         (convert_pointer_to_vbase): Declare.
7231         * init.c (expand_direct_vtbls_init): Remove.
7232         (dfs_initialize_vtbl_ptrs): New function.
7233         (initialize_vtbl_ptrs): Likewise.
7234         (emit_base_init): Use initialize_vtbl_ptrs.
7235         * search.c (convert_pointer_to_vbase): Make it global.
7236         (expand_indirect_vtbls_init): Remove vtable initialization code.
7237         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
7238
7239         * class.c (dfs_finish_vtbls): New function.
7240         (finish_vtbls): Use it.
7241         (dump_class_hierarchy): New function.
7242
7243         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
7244         (BINFO_VBASE_PRIMARY_P): New macro.
7245         (BINFO_VIRTUALS): Add to documentation.
7246         (SET_BINFO_PRIMARY_MARKED_P): Remove.
7247         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7248         (dfs_mark_primary_bases_queue_p): Likewise.
7249         (dfs_unmarked_real_bases_queue_p): New function.
7250         (dfs_marked_real_bases_queue_p): Likewise.
7251         * search.c (dfs_mark_primary_bases): Adjust.
7252         (mark_primary_bases): Likewise.
7253         (get_shared_vbase_if_not_primary): New function.
7254         (dfs_unmarked_real_bases_queue_p): Likewise.
7255         (dfs_marked_real_bases_queue_p): Likewise.
7256         (dfs_get_pure_virtuals): Simplify.
7257         (get_pure_virtuals): Likewise.
7258
7259 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7260
7261         * lex.c: Include tm_p.h.
7262
7263 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
7264
7265         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
7266
7267 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
7268
7269         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
7270         * pt.c (instantiate_decl): Defer comdat templates that might not be
7271         needed.
7272
7273         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
7274         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
7275         (finish_file): Likewise.
7276
7277         * decl2.c (import_export_class): Undo 12/14 change.
7278
7279         * error.c (dump_decl): operator new, not operatornew.
7280
7281         * class.c (field_decl_cmp): A nontype is "greater" than a type.
7282         * search.c (lookup_field_1): Look for the last field with the
7283         desired name.
7284
7285 2000-01-05  Nathan Sidwell  <nathan@acm.org>
7286
7287         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
7288         FUNCTION_DECL.
7289
7290 2000-01-05  Nathan Sidwell  <nathan@acm.org>
7291
7292         * typeck.c (build_static_cast): Don't strip target qualifiers
7293         when casting from a class.
7294
7295 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7296
7297         * class.c (warn_hidden): Initialize variable `fndecl'.
7298
7299 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
7300
7301         * decl.c (flag_isoc9x): New variable to be able to use code in
7302         c-common.c.  For now always zero.
7303
7304 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
7305
7306         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
7307         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
7308         or unshare_base_binfos for virtual bases here.
7309         * search.c (dfs_get_vbase_types): Do it here.
7310         (get_vbase_types): Adjust.
7311
7312 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
7313
7314         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
7315         (BINFO_PRIMARY_MARKED_P): Use flag 5.
7316         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7317         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7318         (unmark_primary_bases): Remove declaration.
7319         (unmarkedp): Declare.
7320         (dfs_vbase_unmark): Likewise.
7321         * class.c (determine_primary_base): Return immediately if there
7322         are no base classes.  Call mark_primary_bases here.
7323         (modify_all_direct_vtables): Remove.
7324         (modify_all_indirect_vtables): Remove.
7325         (dfs_modify_vtables_queue_p): New function.
7326         (dfs_modify_vtables): New function.
7327         (modify_all_vtables): Use them.
7328         (build_base_fields): Build FIELD_DECLs for primary virtual base
7329         classes.
7330         (create_vtable_ptr): Don't call determine_primary_base here.
7331         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
7332         (dfs_set_offset_for_vbases): ... this.
7333         (layout_virtual_bases): Use it.
7334         (layout_class_type): Call determine_primary_base here.
7335         * search.c (unmarkedp): Make it global.
7336         (shared_marked_p): Simplify.
7337         (shared_unmarked_p): Likewise.
7338         (dfs_primary_bases_queue_p): Remove.
7339         (dfs_unmark_primary_bases): Likewise.
7340         (unmark_primary_bases): Likewise.
7341         (mark_primary_bases): Simplify.
7342         (get_pure_virtuals): Don't call mark_primary_bases here.
7343         (dfs_vbase_unmark): New function.
7344         (get_vbase_types): Simplify.
7345
7346         * class.c (struct base_info): Remove.
7347         (determine_primary_base): Take has_virtual_p rather than a
7348         base_info as input.  Don't calculate max_has_virtual.
7349         (finish_struct_bits): Remove max_has_virtual argument.
7350         (create_vtable_ptr): Remove max_has_virtual_p argument.
7351         (layout_virtual_bases): Remove max argument.
7352         (layout_basetypes): Likewise.
7353         (layout_class_type): Remove max_has_virtual_p argument.
7354         (finish_struct_1): Remove max_has_virtual.
7355
7356         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
7357         (layout_basetypes): Remove.
7358         * class.c (propagate_binfo_offsets): Moved here from tree.c.
7359         Update to handle primary virtual bases.
7360         (remove_base_fields): New function, split out from
7361         layout_basetypes.
7362         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
7363         (layout_virtual_bases): New function, split out from
7364         layout_basetypes.  Update to handle primary virtual bases.
7365         (layout_basetypes): Moved here from tree.c.  Use
7366         remove_base_fields and layout_virtual_bases.
7367         * search.c (dfs_mark_primary_bases_queue_p): New function.
7368         (mark_primary_bases): Use it.
7369         * tree.c (CEIL): Remove.
7370         (propagate_binfo_offsets): Remove.
7371         (layout_basetypes): Remove.
7372
7373 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
7374
7375         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
7376         (BINFO_PRIMARY_MARKED_P): New macro.
7377         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7378         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7379         (mark_primary_bases): New function.
7380         (unmark_primary_bases): Likewise.
7381         * search.c (get_abstract_virtuals_1): Remove.
7382         (dfs_mark_primary_bases): New function.
7383         (mark_primary_bases): Likewise.
7384         (dfs_unmark_primary_bases): Likewise.
7385         (unmark_primary_bases): Likewise.
7386         (dfs_get_pure_virtuals): Likewise.
7387
7388 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
7389
7390         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
7391         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
7392         (modify_one_vtable): Adjust.
7393         (fixup_vtable_deltas1): Likewise.
7394         (override_one_vtable): Likewise.
7395         * search.c (get_abstract_virtuals_1): Likewise.
7396         (get_pure_virtuals): Likewise.
7397         (expand_upcast_fixups): Likewise.
7398         * tree.c (debug_binfo): Likewise.
7399
7400         * class.c (build_vtable): Don't return a value.  Don't rebuild
7401         vtables for bases that have already been handled.
7402         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
7403         already been handled.
7404         (modify_one_vtable): Adjust accordingly.
7405         (fixup_vtable_deltas1): Likewise.
7406         (finish_struct_1): Likewise.
7407
7408 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7409
7410         * call.c (build_new_method_call): Also check destructors.