OSDN Git Service

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