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